diff --git a/src/CudaMatrix.cpp b/src/CudaMatrix.cpp index 6108797..e17c779 100644 --- a/src/CudaMatrix.cpp +++ b/src/CudaMatrix.cpp @@ -1062,7 +1062,7 @@ bool CudaMatrix::setBlock(int aDim,int aBeginIndex, int aEndIndex, const CudaMat unaryCompare(this->getData(),aMatrix.getData(),data,this->getDataSize(),::NE); return out; } - float CudaMatrix::getValue(size_t index){ + float CudaMatrix::getValue(size_t index) const{ float result; cudaError_t cuda_error = cudaMemcpy(&result, getData() + index, sizeof(float), cudaMemcpyDeviceToHost); diff --git a/src/CudaMatrix.h b/src/CudaMatrix.h index 5daec9a..32a1fbb 100644 --- a/src/CudaMatrix.h +++ b/src/CudaMatrix.h @@ -113,7 +113,7 @@ namespace Aurora CudaMatrix operator!=(const CudaMatrix &aMatrix) const; // sub - float getValue(size_t index); + float getValue(size_t index) const; void setValue(size_t index, const float& value); /**