CUDA Networks
src
linear_algebra
vector_initialize.cu
Go to the documentation of this file.
1
/**
2
* @file vector_initialize.cu
3
* @brief Implementation of the Vector::initialize method.
4
*/
5
#include "
vector.h
"
6
#include <cuda_runtime.h>
7
8
void
Vector::initialize
() {
9
// Use cudaMemset to set all elements of d_data to 0
10
cudaMemset(d_data, 0, rows *
sizeof
(
double
));
11
}
Vector::initialize
void initialize()
Initialize the vector (typically sets all elements to zero)
Definition:
vector_initialize.cu:8
vector.h
Defines the Vector class for GPU-accelerated vector operations.
Generated by
1.9.1