I think there are a few things going on here. All functions assume ELL indices and values are stored in column major format but you are creating a few indicating row_major which should either be a compile error or it should adapt the internal access patterns [1] . Another issue is that the alignment of entries for ELL should be propagated throughout but those settings seem to be ignored at the moment when a ELL matrix or view is created. I created an issue to track this bug since it could cause a lot of issues for people creating their own views.
#include <cusp/coo_matrix.h>
#include <cusp/ell_matrix.h>
#include <cusp/print.h>
int main (int argc, char* argv[])
{
cusp::array2d<float,cusp::host_memory> A(4,4);
A(0,0) = 2; A(0,1) = -1; A(0,2) = 0; A(0,3) = 0;
A(1,0) = -1; A(1,1) = 2; A(1,2) =-1; A(1,3) = 0;
A(2,0) = 0; A(2,1) = -1; A(2,2) = 2; A(2,3) =-1;
A(3,0) = 0; A(3,1) = 0; A(3,2) =-1; A(3,3) = 2;
cusp::ell_matrix<int,float,cusp::host_memory> B(4,4,10,4);
B = A;
cusp::print(B.column_indices.values);
return 0;
}