CUDA Networks
vector_constructor.cu
Go to the documentation of this file.
1 /**
2  * @file vector_constructor.cu
3  * @brief Implementation of the Vector class constructor.
4  */
5 #include "vector.h"
6 #include <cuda_runtime.h>
7 
8 Vector::Vector(int rows) : rows(rows) {
9  // Allocate memory on the GPU for the vector data
10  cudaMalloc(&d_data, rows * sizeof(double));
11 }
Vector(int rows)
Construct a new Vector object.
Defines the Vector class for GPU-accelerated vector operations.