Skip to content

Instantly share code, notes, and snippets.

@lambday
Created May 31, 2016 15:54
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 lambday/123b97bfe6f15f98d0f7d24ce8dd35b5 to your computer and use it in GitHub Desktop.
Save lambday/123b97bfe6f15f98d0f7d24ce8dd35b5 to your computer and use it in GitHub Desktop.
#include <linalg.h>
#include <shogun/lib/SGVector.h>
using namespace shogun;
template <class T>
struct GPUVector<T>::GPUArray
{
GPUArray(){}
};
template <class T>
GPUVector<T>::GPUVector(const SGVector<T> &vector) : gpuarray(std::unique_ptr<GPUArray>(new GPUVector<T>::GPUArray()))
{
}
#ifndef LINALG_H_
#define LINALG_H_
#include <memory>
namespace shogun
{
template <typename T> class SGVector;
template <typename T>
struct BaseVector
{
};
template <class T>
struct GPUVector : public BaseVector<T>
{
GPUVector(const SGVector<T>& orig);
private:
struct GPUArray;
std::unique_ptr<GPUArray> gpuarray;
};
}
#endif
[lambday@lambday.iitb.ac.in oxphos]$ g++ -c -std=c++11 -I. linalg.cpp -lshogun
[lambday@lambday.iitb.ac.in oxphos]$ echo $?
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment