OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
TestGSLBLAS.cpp File Reference

Unit tests for GSL BLAS (Basic Linear Algebra Subprograms) operations. More...

#include <gtest/gtest.h>
#include <cmath>
#include "Utilities/GSLBLAS.h"
#include "Utilities/GSLComplex.h"
#include "Utilities/GSLMatrix.h"
Include dependency graph for TestGSLBLAS.cpp:

Go to the source code of this file.

Classes

class  GSLBLASTest
 

Functions

 TEST_F (GSLBLASTest, DGEMM_NoTrans)
 
 TEST_F (GSLBLASTest, DGEMM_WithBeta)
 
 TEST_F (GSLBLASTest, DGEMM_Transpose)
 
 TEST_F (GSLBLASTest, DGEMV)
 
 TEST_F (GSLBLASTest, ZGEMM_Complex)
 

Detailed Description

Unit tests for GSL BLAS (Basic Linear Algebra Subprograms) operations.

This file contains unit tests for GSL-compatible BLAS operations including matrix-matrix and matrix-vector multiplications for both real and complex data types.

Test:
GSLBLASTest::DGEMM_NoTrans Tests double-precision general matrix-matrix multiplication without transposition: \(\mathbf{C} = \alpha \mathbf{A} \mathbf{B} + \beta \mathbf{C}\) with \(\alpha = 1\) and \(\beta = 0\). Verifies correct computation of matrix product for non-square matrices.
Test:
GSLBLASTest::DGEMM_WithBeta Tests matrix-matrix multiplication with non-zero \(\beta\) coefficient. Verifies that the operation \(\mathbf{C} = \alpha \mathbf{A} \mathbf{B} + \beta \mathbf{C}\) correctly combines the matrix product with the existing matrix \(\mathbf{C}\).
Test:
GSLBLASTest::DGEMM_Transpose Tests matrix-matrix multiplication with transposed matrices. Verifies that \(\mathbf{C} = \mathbf{A}^T \mathbf{B}\) is computed correctly, including the case where \(\mathbf{A}^T\) and \(\mathbf{B}\) have compatible dimensions.
Test:
GSLBLASTest::DGEMV Tests double-precision general matrix-vector multiplication: \(\mathbf{y} = \alpha \mathbf{A} \mathbf{x} + \beta \mathbf{y}\). Verifies correct computation of matrix-vector product and combination with existing vector \(\mathbf{y}\).
Test:
GSLBLASTest::ZGEMM_Complex Tests complex matrix-matrix multiplication using double-precision complex numbers. Verifies that complex matrix products are computed correctly, including the identity matrix case \(\mathbf{I} \mathbf{I} = \mathbf{I}\).

Definition in file TestGSLBLAS.cpp.

Function Documentation

◆ TEST_F() [1/5]

TEST_F ( GSLBLASTest  ,
DGEMM_NoTrans   
)

Definition at line 51 of file TestGSLBLAS.cpp.

References CblasNoTrans, gsl_blas_dgemm(), gsl_matrix_alloc(), gsl_matrix_free(), gsl_matrix_get(), gsl_matrix_set(), and gsl_matrix_set_zero().

Here is the call graph for this function:

◆ TEST_F() [2/5]

TEST_F ( GSLBLASTest  ,
DGEMM_Transpose   
)

Definition at line 115 of file TestGSLBLAS.cpp.

References CblasNoTrans, CblasTrans, gsl_blas_dgemm(), gsl_matrix_alloc(), gsl_matrix_free(), gsl_matrix_get(), and gsl_matrix_set_identity().

Here is the call graph for this function:

◆ TEST_F() [3/5]

TEST_F ( GSLBLASTest  ,
DGEMM_WithBeta   
)

Definition at line 91 of file TestGSLBLAS.cpp.

References CblasNoTrans, gsl_blas_dgemm(), gsl_matrix_alloc(), gsl_matrix_free(), gsl_matrix_get(), gsl_matrix_set_all(), and gsl_matrix_set_identity().

Here is the call graph for this function:

◆ TEST_F() [4/5]

◆ TEST_F() [5/5]