-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Jacob See edited this page Mar 18, 2015
·
1 revision
Creates a square matrix object of single-precision floating-point values.
Matrix CreateSquareMatrix(int side_length, int type);
-
side_length
- An integer representing the length of a single side of a square matrix. -
type
- Initialization type. Either INIT_ZEROES or INIT_RANDOM.
Prints the contents of a square matrix object to the console's standard output.
void PrintMatrix(Matrix m, int side_length);
-
m
- The matrix object to be printed. -
side_length
- The length of one side of the input matrix.
Multiplies two input matrices using OpenCL, either on the CPU or on an available GPU.
void CLSquareMatrixMultiply(Matrix src_a_matrix, Matrix src_b_matrix, Matrix &dest_h, int side_length, int device_type);
-
src_a_matrix
- First matrix object to be multiplied. -
src_b_matrix
- Second matrix object to be multiplied. -
dest_h
- The matrix object to be populated with the multiplication result. -
side_length
- The length of one side of one of the square input matrices. -
device_type
- The target device to perform the multiplication. Either DEVICE_TYPE_CPU or DEVICE_TYPE_GPU.
Frees the memory occupied by a matrix object.
void Free(Matrix m, int size);
-
m
- The matrix object to be freed. -
size
- The length of one side of the square matrix object to be freed.