NumCpp
NumCpp copied to clipboard
Question :: It could be used inside a CUDA kernel ?
Hi, thanks for this great library!
I was wondering if it could be used inside a CUDA kernel like Eigen?
For example:
__global__ void test_kernel(int n, float * r) {
typedef Eigen::Matrix<thrust::complex<float>,2,2> cuMatrixXcf;
cuMatrixXcf m;
m << 1,0, 0,1;
m *= threadIdx.x;
Eigen::SelfAdjointEigenSolver< cuMatrixXcf > solver;
solver.compute(m, Eigen::EigenvaluesOnly);
auto const& D = solver.eigenvalues();
for (int i = 0; i < n; ++i)
r[n*threadIdx.x + i] = D(i);
}
Best regards, Andrews
It has been several years since I last played around with any CUDA, and even then it was only little bits... With that said, I don't believe NumCpp would work in a CUDA kernel, and there has definitely been no effort in the library (if that is required, I would assume so?) to make sure that it would.
Closing due to inactivity.