mercredi 3 juin 2015

nvcc/CUDA 6.5 & c++11(future) - gcc 4.4.7

When I compile the following code containing the design C++11, I get errors - it does not compile. I've tried with different flags, but I haven't found a solution.

My setting: CUDA 6.5, gcc 4.4.7 I am not able to change the settings. How can I still make this work?

#include <stdio.h>
#include <vector>
#include "KD_tree.h"
#include "KD_tree.cpp"
#include <iostream>
#include <algorithm>
#include <cmath>
#include <future>
#define MYDEVICE 0

using namespace std;


int main()
{
    //do something..... 

    cudaDeviceProp devProp;
    cudaGetDeviceProperties(&devProp, MYDEVICE);
    printDevProp(devProp);
    int max_threads = devProp.warpSize;

   //do something else ... 

    return 0;
}

I've tried compiling with different flags:

nvcc -std=c++11 cudaMain.cu KD_tree.cpp -arch=sm_20 -o tree.out
In file included from cudaMain.cu:14:
simple_kd_tree.h:12:19: warning: extra tokens at end of #include directive
cudaMain.cu:19:18: error: future: No such file or directory


nvcc --std=c++11 cudaMain.cu KD_tree.cpp -arch=sm_20 -o tree.out
In file included from cudaMain.cu:14:
simple_kd_tree.h:12:19: warning: extra tokens at end of #include directive
cudaMain.cu:19:18: error: future: No such file or directory


nvcc --std=c++11 cudaMain.cu KD_tree.cpp -arch=sm_20 -c -o tree.out
nvcc fatal   : A single input file is required for a non-link phase when an outputfile is specified

Do I have to split the c++ part? How would I do this exactly?

Aucun commentaire:

Enregistrer un commentaire