Git Product home page Git Product logo

satyr's Introduction

satyr

A library for numerical computing. It provides

  • Expression templates for vectors, matrices, and higher-dimensional arrays.
  • Support for execution policies including SIMD vectorization and task-based parallelization.
  • Strongly typed versions of structural matrices (e.g. triangular and symmetric).
  • A modern C++ interface to BLAS and LAPACK.

Dependencies

  • GCC 7 or later.
  • TBB for parallelization. (optional but recommended)
  • BLAS and LAPACK libraries (See, for example, MKL or ATLAS (optional)).
  • jemalloc. (optional).

Installation

git clone https://github.com/rnburn/satyr
cd satyr
mkdir .build && cd .build
cmake -DWITH_TBB=[ON|OFF] \
      -DWITH_JEMALLOC=[ON|OFF]  \
      -DWITH_BLAS_LAPACK=[ON|OFF] \
      ..
make && make install

Quick Start

// Declare some random vector and matrices.
satyr::vector<double> v(5);
satyr::matrix<double> A(5, 5), B(5, 5);
satyr::symmetric_matrix<double> S(5);
satyr::lower_triangular_matrix<double> L(5);

// The standard arithmetic operators and mathematical functions can be used to
// execute expression templates.
A = B + 2.0 * cos(S);

// Expressions involving only structural matrices are computed in an efficient
// manner that avoids unnecessary work.
S = sqrt(abs(S));  // computes only over a triangular portion of the matrix.

// Additionally execution policies can be applied to parallelize or vectorize
// the computation.
A = sqrt(abs(L)) << satyr::parallel_v << satyr::simd_v;

// For parallelization, you can also specify a grainsize if the cost of
// managing tasks could potentially be more expensive than the computation
// itself.
A += cos(B) - as_diagonal_matrix(v) << satyr::grainsize{
         10};  // Don't create tasks with fewer than 10 iterations.

// Additionally, you can declare numerical arrays of arbitrary dimension.
satyr::n_array<float, 3> H(5, 2, 6);

// And all array-like objects support indexing and slicing.
A(0, 0) -= 5;
A += H(satyr::all_v, 1, satyr::range{1, 6});

// There is a wrapper for many BLAS-LAPACK functions.
auto C = product(A, B);     // calls gemm.
auto w = left_solve(L, v);  // calls trsv.

satyr's People

Contributors

mrinalsardar avatar rnburn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

satyr's Issues

$(AR) not defined

export PATH=$$(dirname $(AR)):$$PATH

I am trying to build tensorflow for my mac from source and it uses this library.

Getting the following error:

ERROR: /private/var/tmp/_bazel_sardarmrinal/841c8c9a203505f6ff7b50ea63697e9e/external/tbb/BUILD.bazel:12:1: in cmd attribute of genrule rule @tbb//:build_tbb: $(AR) not defined

Doubts about tbb.BUILD

When I was compiling tensorflow-2.2.0, I encountered a problem: in cmd attribute of genrule rule @tbb //: build_tbb: $ (AR) not defined. Then referenced your tbb.BUILD and it worked. thank you very much.
My question is that I did not encounter this problem when using tensorflow-1.4.0, is it a bug? Do you know why this is needed: $ (AR)-> $$ AR. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.