File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232#endif
3333
3434// Preserve C names in shared library
35- #define CUBOOL_EXPORT extern "C"
35+ #ifdef __cplusplus
36+ #define CUBOOL_EXPORT extern "C"
37+ #else
38+ #define CUBOOL_EXPORT
39+ #endif
3640
3741// Exporting/importing symbols for Microsoft Visual Studio
3842#if (_MSC_VER && !__INTEL_COMPILER )
Original file line number Diff line number Diff line change 2424
2525#include < cuda/matrix_csr.hpp>
2626#include < core/error.hpp>
27- #include < utils/exclusive_scan.hpp>
2827#include < utils/timer.hpp>
2928#include < algorithm>
3029
@@ -96,7 +95,7 @@ namespace cubool {
9695 return mMatrixImpl .m_vals == 0 ;
9796 }
9897
99- void MatrixCsr::transferToDevice (const std::vector<index> &rowOffsets, const std::vector<index> &colIndices) {
98+ void MatrixCsr::transferToDevice (const std::vector<index> &rowOffsets, const std::vector<index> &colIndices) const {
10099 // Create device buffers and copy data from the cpu side
101100 thrust::device_vector<index, DeviceAlloc<index>> rowsDeviceVec (rowOffsets.size ());
102101 thrust::device_vector<index, DeviceAlloc<index>> colsDeviceVec (colIndices.size ());
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ namespace cubool {
6565 void clearAndResizeStorageToDim () const ;
6666 bool isStorageEmpty () const ;
6767 bool isMatrixEmpty () const ;
68- void transferToDevice (const std::vector<index> &rowOffsets, const std::vector<index> &colIndices);
68+ void transferToDevice (const std::vector<index> &rowOffsets, const std::vector<index> &colIndices) const ;
6969 void transferFromDevice (std::vector<index> &rowOffsets, std::vector<index> &colIndices) const ;
7070
7171 // Uses nsparse csr matrix implementation as a backend
You can’t perform that action at this time.
0 commit comments