GithubHelp home page GithubHelp logo

sobol's Introduction

Sobol library for Futhark CI Documentation

This library is a convenient and modular library for efficiently generating large quantities of quasi-random numbers (in multiple dimensions) in a parallel and purely functional setting. Sobol numbers are particularly useful for Monte Carlo simulations, which are a core application of massive parallelism.

Sobol sequences are quasi-random low-discrepancy sequences frequently used in Monte-Carlo algorithms and they generalize nicely to multiple dimensions. Sobol sequences are superior to traditional pseudo-random numbers for numeric integration (by Monte-Carlo simulation). Sobol sequences simply span the space much better than their pseudo-random counterparts. In fact, it has been shown that while the value of a multi-dimensional integral for a continuous and differentiable function can be approximated with a convergence rate of 1/n using pseudo-random numbers, using Sobol sequences, the convergence rate is 1/sqrt(n).

For a discussion of the implementation, please consult [1].

Installation

$ futhark-pkg add github.com/diku-dk/sobol
$ futhark-pkg sync

Usage example

$ futhark repl
> import "lib/github.com/diku-dk/sobol/sobol-dir-50"
> import "lib/github.com/diku-dk/sobol/sobol"
> module s = Sobol sobol_dir { let D = 2 }
> s.sobol 3
[[0.0f64, 0.0f64], [0.5f64, 0.5f64], [0.75f64, 0.25f64]]

References

[1] Troels Henriksen, Martin Elsman, and Cosmin E. Oancea. Modular Acceleration: Tricky Cases of Functional High-Performance Computing. In Proceedings of the 6th ACM SIGPLAN workshop on Functional High-Performance Computing (FHPC โ€˜18). St. Louis, Missouri, USA. September 2018.

sobol's People

Contributors

athas avatar melsman avatar jonesz avatar

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.