diff --git a/src/shogun/mathematics/linalgrefactor/BaseVector.h b/src/shogun/mathematics/linalgrefactor/BaseVector.h index 1aaac3814fd..c5aa6889b57 100644 --- a/src/shogun/mathematics/linalgrefactor/BaseVector.h +++ b/src/shogun/mathematics/linalgrefactor/BaseVector.h @@ -12,7 +12,7 @@ template struct BaseVector { BaseVector(){} - const virtual bool onGPU() = 0; + virtual bool onGPU() = 0 ; index_t vlen; }; diff --git a/src/shogun/mathematics/linalgrefactor/CPUBackend.cpp b/src/shogun/mathematics/linalgrefactor/CPUBackend.cpp index 19ebd475c39..e6b0b3ac29f 100644 --- a/src/shogun/mathematics/linalgrefactor/CPUBackend.cpp +++ b/src/shogun/mathematics/linalgrefactor/CPUBackend.cpp @@ -12,4 +12,5 @@ template T CPUBackend::dot(const CPUVector &a, const CPUVector(const CPUVector &a, const CPUVector &b); +template float32_t CPUBackend::dot(const CPUVector &a, const CPUVector &b); } diff --git a/src/shogun/mathematics/linalgrefactor/CPUVector.cpp b/src/shogun/mathematics/linalgrefactor/CPUVector.cpp index feab2a403ec..ac354bba024 100644 --- a/src/shogun/mathematics/linalgrefactor/CPUVector.cpp +++ b/src/shogun/mathematics/linalgrefactor/CPUVector.cpp @@ -15,5 +15,5 @@ CPUVector::CPUVector(const CPUVector &vector) : CPUptr(vector.CPUptr), vlen(vector.vlen) { } template struct CPUVector; - +template struct CPUVector; } diff --git a/src/shogun/mathematics/linalgrefactor/CPUVector.h b/src/shogun/mathematics/linalgrefactor/CPUVector.h index 1e102819a29..b7492753c92 100644 --- a/src/shogun/mathematics/linalgrefactor/CPUVector.h +++ b/src/shogun/mathematics/linalgrefactor/CPUVector.h @@ -20,7 +20,7 @@ struct CPUVector : public BaseVector CPUVector(const CPUVector &vector); - const bool onGPU() { return false; } + bool onGPU() { return false; } }; } diff --git a/src/shogun/mathematics/linalgrefactor/GPUArray.cpp b/src/shogun/mathematics/linalgrefactor/GPUArray.cpp index bfaba73652c..2e9dc53a249 100644 --- a/src/shogun/mathematics/linalgrefactor/GPUArray.cpp +++ b/src/shogun/mathematics/linalgrefactor/GPUArray.cpp @@ -42,5 +42,5 @@ GPU_Vector::GPUArray::GPUArray(const SGVector &vector) #endif template struct GPU_Vector; - +template struct GPU_Vector; } diff --git a/src/shogun/mathematics/linalgrefactor/GPUBackend.cpp b/src/shogun/mathematics/linalgrefactor/GPUBackend.cpp index e02646e8a8a..2f0baacb19d 100644 --- a/src/shogun/mathematics/linalgrefactor/GPUBackend.cpp +++ b/src/shogun/mathematics/linalgrefactor/GPUBackend.cpp @@ -25,5 +25,5 @@ template T GPUBackend::dot(const GPU_Vector &a, const GPU_Vector } template int32_t GPUBackend::dot(const GPU_Vector &a, const GPU_Vector &b); - +template float32_t GPUBackend::dot(const GPU_Vector &a, const GPU_Vector &b); } diff --git a/src/shogun/mathematics/linalgrefactor/GPU_Vector.cpp b/src/shogun/mathematics/linalgrefactor/GPU_Vector.cpp index bf3e8cd298e..95bd0392658 100644 --- a/src/shogun/mathematics/linalgrefactor/GPU_Vector.cpp +++ b/src/shogun/mathematics/linalgrefactor/GPU_Vector.cpp @@ -59,5 +59,5 @@ GPU_Vector& GPU_Vector::operator=(const GPU_Vector &other) template GPU_Vector::~GPU_Vector() { } template struct GPU_Vector; - +template struct GPU_Vector; } diff --git a/src/shogun/mathematics/linalgrefactor/GPU_Vector.h b/src/shogun/mathematics/linalgrefactor/GPU_Vector.h index a6ffbf6d752..558375ccc46 100644 --- a/src/shogun/mathematics/linalgrefactor/GPU_Vector.h +++ b/src/shogun/mathematics/linalgrefactor/GPU_Vector.h @@ -32,7 +32,7 @@ struct GPU_Vector : public BaseVector GPU_Vector& operator=(const GPU_Vector &other); - const bool onGPU() { return true; } + bool onGPU() { return true; } public: /** Vector length */ diff --git a/src/shogun/mathematics/linalgrefactor/linalgRefactor.cpp b/src/shogun/mathematics/linalgrefactor/linalgRefactor.cpp index f8a07ff9121..9e2b91326b9 100644 --- a/src/shogun/mathematics/linalgrefactor/linalgRefactor.cpp +++ b/src/shogun/mathematics/linalgrefactor/linalgRefactor.cpp @@ -33,7 +33,7 @@ GPUBackend* Linalg::get_gpu_backend() } template -T Linalg::dot(BaseVector const * const a, BaseVector const * const b) +T Linalg::dot(BaseVector *a, BaseVector *b) { if (a->onGPU() && b->onGPU()) { @@ -72,6 +72,6 @@ bool Linalg::hasGPUBackend() return m_gpubackend != nullptr; } -template int32_t Linalg::dot(BaseVector const * const a, BaseVector const * const b); - +template int32_t Linalg::dot(BaseVector *a, BaseVector *b); +template float32_t Linalg::dot(BaseVector *a, BaseVector *b); } diff --git a/src/shogun/mathematics/linalgrefactor/linalgRefactor.h b/src/shogun/mathematics/linalgrefactor/linalgRefactor.h index 777f14d3490..b97512d6065 100644 --- a/src/shogun/mathematics/linalgrefactor/linalgRefactor.h +++ b/src/shogun/mathematics/linalgrefactor/linalgRefactor.h @@ -73,7 +73,7 @@ class Linalg GPUBackend* get_gpu_backend(); template - T dot(BaseVector const * const a, BaseVector const * const b); + T dot(BaseVector *a, BaseVector *b); bool hasGPUBackend();