#include <iostream> #include <flens/flens.cxx> using namespace flens; #ifndef FLOAT_TYPE #define FLOAT_TYPE std::complex<float> #endif int main() { typedef FLOAT_TYPE T; typedef GeMatrix<FullStorage<T> > TGeMatrix; typedef TGeMatrix::IndexType IndexType; Underscore<IndexType> _; TGeMatrix A(3,3); TGeMatrix B(3,3); TGeMatrix C(3,3); T alpha = 1; T beta = 0; A = 1, 2, 3, 4, 5, 6, 7, 8, 9; B = 9, 8, 7, 6, 5, 4, 3, 2, 1; blas::mm(NoTrans, NoTrans, alpha, A, B, beta, C); std::cout << "A = " << A << std::endl; std::cout << "B = " << B << std::endl; std::cout << "C = " << C << std::endl; blas::sm(Left, NoTrans, alpha, A.upperUnit(), B); std::cout << "B = " << B << std::endl; blas::r(alpha, B(_,1), B(1,_), A); std::cout << "A = " << A << std::endl; A(_,1) *= T(2); std::cout << "A = " << A << std::endl; } |