40 void print(
int decimals);
Represents a vector with GPU-accelerated operations.
void subtract_scalar(double scalar)
Subtracts a scalar value from all elements in the vector.
void randomize()
Randomize the vector elements with values between -0.5 and 0.5.
int get_rows() const
Get the number of elements in the vector.
~Vector()
Destroy the Vector object.
void divide_scalar(double scalar)
Divides all elements in the vector by a scalar.
void multiply_scalar(double scalar)
Multiplies all elements in the vector by a scalar.
void initialize()
Initialize the vector (typically sets all elements to zero)
Vector(int rows)
Construct a new Vector object.
double * get_data() const
Get the raw data pointer of the vector.
Vector copy() const
Creates a deep copy of the vector.
void print(int decimals)
Print the vector contents.