how to transfer an initial field before solve ax=b #1135
Answered
by
pratikvn
ztdepztdep
asked this question in
Q&A
-
how to transfer an initial field before solve ax=b |
Beta Was this translation helpful? Give feedback.
Answered by
pratikvn
Oct 6, 2022
Replies: 1 comment 2 replies
-
Do you mean the initial solution, auto x = gko::matrix::Dense<ValueType>::create(exec,
gko::dim<2>(num_elems, 1),
gko::array<ValueType>::view(exec, num_elems, dx),
stride); This will not allocate new memory, but use the data that |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
pratikvn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you mean the initial solution,
x
? If you have a pointer (saydx
) to the data onexec
which can be eitherReferenceExecutor
orCudaExecutor
, then you can just do:(Updated):
This will not allocate new memory, but use the data that
dx
points to and which is of sizenum_elems