Registered Member
|
I just downloaded Eigen 3.2 and created an MS Visual Studio C++ 2008 project with one file containing the code below.
It builds and runs fine as a .cpp file, but when I set up the project with this code in a .cu file so that the CUDA 5.0 nvcc compiler will be used, I get 103 errors, all in the eigen source code. What is the procedure of using CUDA with the Eigen source code? I can post the errors, but they are numerous. Thanks, bajabob #include <iostream> #include <cuda_runtime.h> #include <Eigen/Dense> using namespace Eigen; using namespace std; int main() { MatrixXd m = MatrixXd::Random(3,3); m = (m + MatrixXd::Constant(3,3,1.2)) * 50; cout << "m =" << endl << m << endl; VectorXd v(3); v << 1, 2, 3; cout << "m * v =" << endl << m * v << endl; getchar(); } |
Moderator
|
Look at the devel branch where we started to add preliminary support for NVCC. With MSVC, you need to be careful with the compilation flags. On Linux with GCC, this port already permits to write CUDA kernels calling Eigen. See test/cuda_basic.cpp for examples.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]