Since November 2016 (Release of Eigen 3.3), a new option exists: Using Eigen directly inside CUDA kernels - see this question.
Example from the linked question:
__global__ void cu_dot(Eigen::Vector3f *v1, Eigen::Vector3f *v2, double *out, size_t N)
{
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if(idx < N)
{
out[idx] = v1[idx].dot(v2[idx]);
}
return;
}
Copying an array of Eigen::Vector3f
to device:
Eigen::Vector3f *host_vectors = new Eigen::Vector3f[N];
Eigen::Vector3f *dev_vectors;
cudaMalloc((void **)&dev_vectors, sizeof(Eigen::Vector3f)*N)
cudaMemcpy(dev_vectors, host_vectors, sizeof(Eigen::Vector3f)*N, cudaMemcpyHostToDevice)
std::complex<double>
in this context. You can have real matrices in eigen... Your question is chaotic: "It's easy to work with basic data types, like basic float arrays, and just copy it to device memory and pass the pointer to cuda kernels.", you mean Eigen is easy to work with plain types, or CUDA? – Biocatalystcomplex<double>
array, then it should be possible to copy the raw data to acuComplex
vector. What prevents you to do this? – Exhalant