using Eigen with CUDA in windows


I understood that it is possible to directly use Eigen in CUDA kernels on linux , what about in windows with Microsoft visual studio?

I’m just trying to have a combination cuda and cpp program, in .cpp program I used Eigen and have no error, but for using in .cu file, by just entering #include <Eigen/Core> I had lots of error about defining Eigen source and the problem is only in .cu file…

errors are like: error C2244: ‘Eigen::DenseBase::NullaryExpr’ : unable to match function definition to an existing declaration c:\project\3rdparty-win64\eigen\3.3.2\eigen\src\Core\CwiseNullaryOp.h

Thank you in advance.