// ConstMatrixRow matrixRow = this->getRow( row );// If the program even compiles, this line fails because a segfault is thrown on the first line of getRow()
// WHEN debugging with GDB:
// (gdb) p this->rowPointers[0]
// Could not find operator[].
// (gdb) p rowPointers.getElement(0)
// Attempt to take address of value not located in memory.
// PROBLEM: If the second parameter of getNonZeroRowLengthCudaKernel is '&resultCuda', the following issue is thrown:
// 'error: no instance of function template "TNL::Matrices::getNonZeroRowLengthCudaKernel" matches the argument list'
TNL::Matrices::getNonZeroRowLengthCudaKernel<ConstMatrixRow,IndexType><<<1,1>>>(matrixRow,resultCuda);// matrixRow works fine, tested them both separately
delete[]cols;
delete[]vals;
std::cout<<"Checkpoint BEFORE passFromDevice"<<std::endl;
resultHost=Devices::Cuda::passFromDevice(resultCuda);// This causes a crash: Illegal memory address in Cuda_impl.h at TNL_CHECK_CUDA_DEVICE
std::cout<<"Checkpoint AFTER passFromDevice"<<std::endl;
// // ConstMatrixRow matrixRow = this->getRow( row );// If the program even compiles, this line fails because a segfault is thrown on the first line of getRow()
// // WHEN debugging with GDB:
// // (gdb) p this->rowPointers[0]
// // Could not find operator[].
// // (gdb) p rowPointers.getElement(0)
// // Attempt to take address of value not located in memory.