Skip to content

Commit

Permalink
Put CGPUMatrix::vcl_matrix() under SWIG guard to avoid SWIG issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lambday committed Apr 7, 2015
1 parent 1a66f12 commit a1fda77
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/shogun/lib/GPUMatrix.h
Expand Up @@ -111,23 +111,24 @@ template <class T> class CGPUMatrix
/** Creates a gpu matrix using data from an SGMatrix */
CGPUMatrix(const SGMatrix<T>& cpu_mat);

/** Converts the matrix into an SGMatrix */
operator SGMatrix<T>() const;

#ifndef SWIG // SWIG should skip this part
#ifdef HAVE_EIGEN3
CGPUMatrix(const EigenMatrixXt& cpu_mat);

/** Converts the matrix into an Eigen3 matrix */
operator EigenMatrixXt() const;
#endif
#endif

/** Converts the matrix into an SGMatrix */
operator SGMatrix<T>() const;
#endif // HAVE_EIGEN3

/** Returns a ViennaCL matrix wrapped around the data of this matrix. Can be
* used to call native ViennaCL methods on this matrix
*/
VCLMatrixBase vcl_matrix();

#endif // SWIG

/** Sets all the elements of the matrix to zero */
void zero();

Expand Down

0 comments on commit a1fda77

Please sign in to comment.