From a1fda77e6f1b759c08f58e6f3b2a6ff702841469 Mon Sep 17 00:00:00 2001 From: lambday Date: Wed, 8 Apr 2015 00:42:59 +0530 Subject: [PATCH] Put CGPUMatrix::vcl_matrix() under SWIG guard to avoid SWIG issue --- src/shogun/lib/GPUMatrix.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/shogun/lib/GPUMatrix.h b/src/shogun/lib/GPUMatrix.h index 3dfa5de3bb7..d2f666a71d1 100644 --- a/src/shogun/lib/GPUMatrix.h +++ b/src/shogun/lib/GPUMatrix.h @@ -111,23 +111,24 @@ template class CGPUMatrix /** Creates a gpu matrix using data from an SGMatrix */ CGPUMatrix(const SGMatrix& cpu_mat); + /** Converts the matrix into an SGMatrix */ + operator SGMatrix() 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() 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();