Is there any function to test if a mxGPUArray is empty or not?
显示 更早的评论
I know for mxArray, there is a way, which is shown here: http://www.mathworks.com/help/matlab/apiref/mxisempty.html
Is there a similar function to test mxGPUArray?
Thanks!
回答(1 个)
Edric Ellis
2015-9-27
There isn't a directly equivalent method, but you can call
bool const isEmpty = (mxGPUGetNumberOfElements(myArray) == mwSize(0));
类别
在 帮助中心 和 File Exchange 中查找有关 GPU CUDA and MEX Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!