Gordon Smith de2939e222 HPCC-27136 Clean up CMake warnings and errors 3 years ago
..
CMakeLists.txt de2939e222 HPCC-27136 Clean up CMake warnings and errors 3 years ago
README.md adae826495 HPCC-16282 Add BLAS wrappers as standard library attributes and plugins 8 years ago
dasum.cpp 937173f4fe HPCC-16571 Mangle the functions exported from eclblas plugin 8 years ago
daxpy.cpp 937173f4fe HPCC-16571 Mangle the functions exported from eclblas plugin 8 years ago
dgemm.cpp bcf397408e HPCC-17543 Work around misaligned double access in eclblas::dgemm 8 years ago
dgetf2.cpp 937173f4fe HPCC-16571 Mangle the functions exported from eclblas plugin 8 years ago
dpotf2.cpp 937173f4fe HPCC-16571 Mangle the functions exported from eclblas plugin 8 years ago
dscal.cpp 937173f4fe HPCC-16571 Mangle the functions exported from eclblas plugin 8 years ago
dsyrk.cpp 937173f4fe HPCC-16571 Mangle the functions exported from eclblas plugin 8 years ago
dtrsm.cpp 937173f4fe HPCC-16571 Mangle the functions exported from eclblas plugin 8 years ago
eclblas.cpp adae826495 HPCC-16282 Add BLAS wrappers as standard library attributes and plugins 8 years ago
eclblas.hpp 116fab0239 Merge branch 'candidate-6.2.0' into candidate-6.4.0 8 years ago
extract_tri.cpp fa2e97e93e HPCC-16655 Extract_Tri anomaly in eclblas 8 years ago
lib_eclblas.ecllib fa2e97e93e HPCC-16655 Extract_Tri anomaly in eclblas 8 years ago
make_diag.cpp 937173f4fe HPCC-16571 Mangle the functions exported from eclblas plugin 8 years ago
sourcedoc.xml adae826495 HPCC-16282 Add BLAS wrappers as standard library attributes and plugins 8 years ago

README.md

ECL BLAS Plugin

This is the ECL plugin to utilize the Basic Linear Algebra Sysem (BLAS). It utilizes the C wrappers for BLAS

Installation and Dependencies

To build the plugin with the HPCC-Platform, is required.

sudo apt-get install atlas-dev

Getting started

The libcblas.so library can be found in several packages including ATLAS and LAPACK.

The Actual Plugin

The eclblas plugin features are exposed via the ECL Standard library Std.BLAS module.

###An ECL Example

IMPORT Std.BLAS AS BLAS;
IMPORT BLAS.Types AS Types;
Types.matrix_t init1 := [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0];
Types.matrix_t init2 := [9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0];
Types.matrix_t init3 := [1.0, 2.0, 3.0];
Types.matrix_t init4 := [2.0, 2.0, 2.0];

Test1_mat := BLAS.dgemm(FALSE, TRUE, 3, 3, 1, 1.0, init3, init4);
Test2_mat := BLAS.dgemm(TRUE, FALSE, 1, 1, 3, 1.0, init3, init4);
Test3_mat := BLAS.dgemm(FALSE, TRUE, 3, 1, 3, -1.0, init1, init4);
Test4_mat := BLAS.dgemm(FALSE, TRUE, 3, 1, 3, 1.0, init1, init4, 5, init3);
OUTPUT(Test1_mat);
OUTPUT(Test2_mat);
OUTPUT(Test3_mat);
OUTPUT(test4_mat);

Yields the various matrix products.

Behavior and Implementation Details

All of the arrays are column major. The underlying Fortran code expects column major, so we do not need the library to interpret the data as row major (usual C convention).