You ar calling det
on the GPU, which in turn calls mapreduce
. That kind of functionality is not available within a kernel, where you can only do relatively simple computations. The array allocation in test
is also not possible in a kernel. Just hard-code the expression to calculate the determinant of your 3x3 matrix. Or you could try using StaticArrays, which you can allocate in a kernel (since it’s stack based), and it looks like they provide a det
method.
2 Likes