Skip to content

How can I use Three Dimensional Array #556

Closed Answered by jjfumero
silvercall asked this question in Q&A
Discussion options

You must be logged in to vote

TornadoVM does not support explicit 2D and 3D Java ND-Arrays. Instead, TornadoVM offers 2D and 3D Panama segments (implemented in with flatten arrays). I don't think we have for int types, but we have for float:

public void testMatrix10() throws TornadoExecutionPlanException {
final int N = 256;
Matrix3DFloat matrixA = new Matrix3DFloat(N, N, N);
Matrix3DFloat matrixB = new Matrix3DFloat(N, N, N);
Random r = new Random();
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
for (int k = 0; k < N; k++) {

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jjfumero
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested support
2 participants