You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using CUDA, StaticArrays
N =10
SV =@SVectorrand(N);
SA =@SMatrixrand(N,N);
MV =@MVectorrand(N);
MA =@MMatrixrand(N,N);
typeof(cu(SV))
typeof(cu(SA))
typeof(cu(MV))
typeof(cu(MA))
A feature; SVector is a bitstype so can be used on the GPU directly. MArray is mutable, so you can't pass it to a kernel, and the fallback definition treating it as an array (so yielding a CuArray) kicks in.
Although there's something to be said that cu(SVector) should also return a CuArray. But then cu((1,)) will also result in a CuArray, which may be a fairly breaking change. I'm not sure it's worth doing so.
Here's a MWE:
Results:
Environments:
Is this a bug or feature?
The text was updated successfully, but these errors were encountered: