Showing posts with label English. Show all posts
Showing posts with label English. Show all posts

Friday, October 24, 2014

Atmosphere GM - Statistical package


Project site: 9il.github.io/atmosphere_gm

Features

  1. Separating mixtures of probability distributions
  2. Grid methods
  3. Parameterized algorithms
  4. Optimization over sliding window

Documentation

Documentation can be found here.

Installation

To use this package, put the following dependency into your project's dub.json into the dependencies section:
{
    ...
    "dependencies": {
        "atmosphere_gm": ">=0.0.1"
    }
}

Benchmarking

It is suggested the llvm D compiler be used for benchmarks. Project requires LDC version >= 0.15.0 or DMD >= 2.066, or corresponding GDC release. The DMD is easy way to start.

Saturday, August 17, 2013

SIMD implementation of dot-product.
Benchmarks

Dot product can be auto-vectorized only with fast-math or similar compiler option. fast-math allows compiler to use associative floating point transformations. Other math functions like exponent can be damaged consequently.
Possible solutions:
  1. Compile fast_math code from other program separately and then link it. This is easy solution. However this is a step back to C.
  2. To introduce a @fast_math attribute. This is hard to realize. But I hope this will be done for future compilers.
  3. Do vectorization yourself. In that case you need to realize SIMD accessory functions like unaligned load.

So I wrote implementations of dot product for real and complex numbers.

Code

Dot product for real numbers:

Complex version is similar. The main loop:

There are gdc and ldc implementations, but ldc implementation was not tested. Source code is available at GitHub.

Benchmarks

Processor Intel i5-4570, Haswell
Instruction set AVX2
System Ubuntu 13.10
Compiler GDC-4.8.1
Compiler flags -march=native -fno-bounds-check -frename-registers -frelease -O3