Skip to content
Discussion options

You must be logged in to vote

The first thing you need to do is to create a ginkgo array with this raw pointer. This example shows how to do that:

auto view = gko::make_array_view(exec, size, raw_pointer);

where size is the number of elements allocated at the raw_pointer. The exec is a gko::Executor. You have to make sure that the exec matches the memory space of the raw_pointer. So, if the raw pointer points to CPU memory, it needs to be an OmpExecutor or a ReferenceExecutor. If it points to GPU memory, you need to use CudaExecutor for example.

You then need to create ginkgo arrays for the row pointers, the column indices, and the values. If you have them, you can create a CSR matrix with:

auto row_ptr_view = ...;
auto

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Fabian188
Comment options

Answer selected by Fabian188
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants