Fixed the CUDA interface: replaced nullptr with 0

pull/238/head
Cedric Nugteren 2018-01-06 13:38:44 +01:00
parent e71c037304
commit ad197da08d
3 changed files with 4 additions and 4 deletions

View File

@ -494,7 +494,7 @@ StatusCode Gemm(const Layout layout, const Transpose a_transpose, const Transpos
const T beta,
CUdeviceptr c_buffer, const size_t c_offset, const size_t c_ld,
const CUcontext context, const CUdevice device,
CUdeviceptr temp_buffer = nullptr);
CUdeviceptr temp_buffer = 0);
// Symmetric matrix-matrix multiplication: SSYMM/DSYMM/CSYMM/ZSYMM/HSYMM
template <typename T>

View File

@ -1732,8 +1732,8 @@ StatusCode Gemm(const Layout layout, const Transpose a_transpose, const Transpos
const auto device_cpp = Device(device);
auto queue_cpp = Queue(context_cpp, device_cpp);
auto routine = Xgemm<T>(queue_cpp, nullptr);
const auto temp_buffer_provided = temp_buffer != nullptr;
auto temp_buffer_cpp = temp_buffer_provided ? Buffer<T>(temp_buffer) : Buffer<T>(nullptr);
const auto temp_buffer_provided = temp_buffer != 0;
auto temp_buffer_cpp = temp_buffer_provided ? Buffer<T>(temp_buffer) : Buffer<T>(0);
routine.DoGemm(layout, a_transpose, b_transpose,
m, n, k,
alpha,

View File

@ -159,7 +159,7 @@ class Xgemm: public Routine {
const Buffer<T> &b_buffer, const size_t b_offset, const size_t b_ld,
const T beta,
const Buffer<T> &c_buffer, const size_t c_offset, const size_t c_ld,
const Buffer<T> &temp_buffer = Buffer<T>(nullptr), const bool temp_buffer_provided = false);
const Buffer<T> &temp_buffer = Buffer<T>(0), const bool temp_buffer_provided = false);
// Indirect version of GEMM (with pre and post-processing kernels)
void GemmIndirect(const size_t m, const size_t n, const size_t k,