Code Monkey home page Code Monkey logo

insideloop's Introduction

InsideLoop is a C++11 library for high performance scientific applications running on processors (including Xeon) and coprocessors (Cuda). This library has been designed to provide you with:

  • Efficient containers:
    • Arrays and multi-dimensional arrays with different allocation policies
    • sets and maps implemented using open addressing with quadratic probing
    • Unicode Strings implemented with small size optimization
    • An efficient dynamic type
  • IO using the binary Numpy file format for arrays and the textual TOML file format for structured data
  • A pure C++11 library with no dependency for easy integration in both free software and commercial products
  • For those who can afford a library dependency, an easy access to the best numerical libraries from Intel (MKL) and nVidia (cuBLAS and cuSPARSE)

In a few words, InsideLoop should appeal to scientific programmers looking for easy-to-use containers and wrappers around the best numerical libraries available today.

Note that for the time being, InsideLoop is a work in progress. Although some parts of it have been used in production code, it should be used at your own risk. The API getting stabilized.

The documentation is currently begin written and is available here: Documentation

Remarks, feature request, bug report

Please send them to [email protected]

insideloop's People

Contributors

francoisfayard avatar

Stargazers

Larry Gritz avatar Alexander Knorre avatar abdul dakkak avatar Lorenz avatar Filippo Broggini avatar  avatar Gaetano Checinski avatar Jefferson Amstutz avatar Stefan Gränitz avatar Evgeniy avatar Lorenzo Benedetti avatar Marcel Stimberg avatar Emre Şafak avatar Cyrille Rossant avatar Victor Zverovich avatar Brice Lecampion avatar  avatar Joël Thieffry avatar O. Libre avatar  avatar Pierre Kestener avatar Jeff Hammond avatar Sreekumar Thaithara Balan avatar

Watchers

James Cloos avatar Filippo Broggini avatar  avatar Lorenzo Benedetti avatar

Forkers

filippo82

insideloop's Issues

static_assert does not constrain a type

For example

namespace il {
template <typename T, il::int_t small_size>
class SmallArray {
  static_assert(small_size >= 1,
                "il::SmallArray<T, small_size>: small_size must be positive");
. . . 

Nothing stops the bad type making

using will_explode_later = il::SmallArray<bool, -1> ;

I have written on this. static_assert() does constrain an instantiation, not a type.

Although this seems a good and useful library :)

ps: I would consider constraining both the lower and upper bounds of the container size.

Perhaps with a policy class:

template <std::size_t k, std::size_t lower = 1, std::size_t upper = 0xFFFF
#if __cplusplus >= 202002L
> 
// C++20 (and later) code
requires  // requires-clause (ad-hoc constraint)
    (k >= lower && k <= upper)
#else  // make sure to use c++17
, std::enable_if_t<k >= lower && k <= upper, int> = 0 >
#endif
        struct container_boundaries {

            constexpr static std::size_t LOWER_LIMIT = lower ;
            constexpr static std::size_t UPPER_LIMIT = upper ;
};

using boundaries = container_boundaries<1> ;

And then

   template<typename T, size_t N = 1>
    struct my_vector :  container_boundaries<boundaries::LOWER_LIMIT> {};

 my_vector<int> v0;

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.