Skip to content

Instantly share code, notes, and snippets.

@jeremyherbert
Created October 15, 2014 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremyherbert/755014e35b174aa07f3b to your computer and use it in GitHub Desktop.
Save jeremyherbert/755014e35b174aa07f3b to your computer and use it in GitHub Desktop.
////// nvcc_test.h
#ifndef _NVCC_TEST_H_
#define _NVCC_TEST_H_
#include <vector>
std::vector<int> get_v();
#endif
////// nvcc_test2.cu
#include <iostream>
#include <vector>
#include "pretty_print.hpp"
#include "nvcc_test.h"
std::vector<int> get_v() {
std::vector<int> v {{1, 2, 3}};
std::cout << v << std::endl;
return v;
}
////// nvcc_test.cu
#include <iostream>
#include <vector>
#include "pretty_print.hpp"
#include "nvcc_test.h"
int main(void) {
std::vector<int> v = get_v();
std::cout << v << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment