How to set all one gpuArray in mex?
Afficher commentaires plus anciens
Hi,
I need to set a all-one double gpuArray. I think I could use mxGPUCreateGPUArray to initial it. But it seems mxGPUCreateGPUArray could only initial a all-zero array like below.
mxGPUArray *x = mxGPUCreateGPUArray(ndim, dims, mxDOUBLE_CLASS, mxREAL, MX_GPU_INITIALIZE_VALUES);
Is there any good way to do this? Do I need to write a kernel function to do it with cuda function? Thank you.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur GPU CUDA and MEX Programming dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!