This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Integrating Eigen with a CUDA project

Tags: None
(comma "," separated)
angelogiuseppespinosa
Registered Member
Posts
1
Karma
0
Good evening to all,
I'm currently working on a project developed with GeNN, a neural network simulator that works with CUDA, on Windows. In this project, I have the need to use a library for some matrix computations with several data, then I discovered Eigen library and I decided to use it due to its simplicity. I tested some capabilities with Dev-C++ and all worked fine.
The problem is what happens when I want to include Eigen within my GeNN project. Just to give you an idea: GeNN requires two main files, one dedicated to the neural network model definition and the other that deals with the simulation.
Here, there's the code of the model: http://pastebin.com/MkPVdvBJ
and here there's the simulation code: http://pastebin.com/CaXxpUEG
In particular, Eigen is used within the second file I reported but I cannot understand why it gives me a lot of errors when I try to compile it. This is what I type on command prompt for compiling it:
Code: Select all
nmake /f WINmakefile clean && nmake /f WINmakefile

and this is the result:
First screenshot: https://postimg.org/image/hufnwb1y3/
Second screenshot: https://postimg.org/image/uizum3awl/
Third screenshot: https://postimg.org/image/cr6ydlo5j/
I cannot understand what goes wrong, but I hope you'll help to solve this bunch of errors.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
I'm not sure why it fails because nvcc compiles fine Eigen, but it might help to only include <Eigen/LU> instead of <Eigen/Dense> and to split your file into a .cpp file for pure CPU code, and a .cu file for cuda related stuff only.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]