#include <iostream>
#include <TNL/Matrices/LambdaMatrix.h>
int
main( int argc, char* argv[] )
{
auto compressedRowLengths = [ = ]
__cuda_callable__(
const int rows,
const int columns,
const int rowIdx ) ->
int
{
return 1;
};
auto matrixElements1 =
const int rows, const int columns, const int rowIdx, const int localIdx, int& columnIdx, double& value )
{
columnIdx = rowIdx;
value = 1.0;
};
auto matrixElements2 =
const int rows, const int columns, const int rowIdx, const int localIdx, int& columnIdx, double& value )
{
columnIdx = rowIdx;
value = rowIdx;
};
const int size = 5;
matrixElements1, compressedRowLengths ) );
MatrixType m1( size, size, matrixElements1, compressedRowLengths );
auto m2 =
m2.setDimensions( size, size );
}
#define __cuda_callable__
Definition Macros.h:49
static auto create(MatrixElementsLambda &matrixElementsLambda, CompressedRowLengthsLambda &compressedRowLengthsLambda) -> LambdaMatrix< MatrixElementsLambda, CompressedRowLengthsLambda, Real, Device, Index >
Creates lambda matrix with given lambda functions.
Definition LambdaMatrix.h:572