Hi all, 

I have a question regarding the GPU implementation. I am not following a 
matrix-free implementation but looking at step-64 It it is given this help:

*unsigned int size = 10;*
*LinearAlgebra::ReadWriteVector<double> 
<https://www.dealii.org/current/doxygen/deal.II/classLinearAlgebra_1_1ReadWriteVector.html>
 
rw_vector(size);*
*...do something with the rw_vector...*
*// Move the data to the device:*
*LinearAlgebra::CUDAWrappers::Vector<double> vector_dev(size);*
*vector_dev.import(rw_vector, VectorOperations::insert 
<https://www.dealii.org/current/doxygen/deal.II/namespaceVectorTools_1_1EvaluationFlags.html#ac6721740e24732d6afabcf28ddfc1ffda4ed1da4f7c4036896a6aeb19338d1a81>);*
*...do some computations on the device...*
*// Move the data back to the host:*
*rw_vector.import(vector_dev, VectorOperations::insert 
<https://www.dealii.org/current/doxygen/deal.II/namespaceVectorTools_1_1EvaluationFlags.html#ac6721740e24732d6afabcf28ddfc1ffda4ed1da4f7c4036896a6aeb19338d1a81>);*

It is not clear to me when do I need to use __device__. Is it in the 
function that already move data to and from device, or is in the function 
that do some computations on the device after moving data?

Is it any example of gpu implementation without matrix-free to see how the 
data is moved and managed?

Thank you

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/c1931092-cbc8-4930-a1f0-2ebf0543931an%40googlegroups.com.

Reply via email to