So in MATLAB, if I make a N x N x N x N x 6 dimensional matrix, I can assign values to the matrix in groups of 6 as so:
myMatrix(1,1,1,1,:) = [69, 3, 864, 21, 95, 20];
Is there an analogous way to write into an N x N x N x N x 6 dimensional matrix in C++ in groups of 6?
Also, is there an analogous way to set 6 elements equal to another 6 elements I.e myArray(N,N,N,8,:) = myArray(N,N,N,6,:)?
(No std::vector solutions please- need to keep the matrix in array form as the existing code was built for arrays using c++/CUDA and is extremely complex)
stlsolutions.stlwould be to use expression templates, see Implementing Matlab's colon : operator in C++ expression templates class. You may wish to have a look at the BlueBird library which implements expression templates with CUDA.stl:stlis not supported in CUDA kernel code. See Using std::vector in CUDA device code and Does CUDA 5 support STL or THRUST inside the device code?.