Create CUDA device buffers

This commit is contained in:
Tom Deakin 2016-04-26 14:50:22 +01:00
parent 03b01e190f
commit ee4820b5e4

View File

@ -16,7 +16,11 @@ CUDAStream<T>::CUDAStream(const unsigned int ARRAY_SIZE)
{ {
// Create device buffers // Create device buffers
cudaMalloc(&d_a, ARRAY_SIZE*sizeof(T)); cudaMalloc(&d_a, ARRAY_SIZE*sizeof(T));
check_error();
cudaMalloc(&d_b, ARRAY_SIZE*sizeof(T));
check_error();
cudaMalloc(&d_c, ARRAY_SIZE*sizeof(T));
check_error();
} }
template <typename T> template <typename T>