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