Git Product home page Git Product logo

chapel-data-structures's People

Contributors

louisjenkinscs avatar

Stargazers

 avatar  avatar

Watchers

 avatar

chapel-data-structures's Issues

Channel and N-Body Simulations

I'd like to add a nice and fast 'Channel' such as the one described here: chapel-lang/chapel#12660

In essence, it will be like Golang's Channel (or like Rust's Crossbeam Channel) which enables a CSP programming style. The N-Bodies simulation seems like a very apt benchmark and example for it. It'd be a way to get my feet wet with more HPC while also allowing me to benefit the Chapel language as a whole. If I understand it right, there are two kinds of ways to implement N-Bodies: Time-Step/Epoch-Based which is entirely data-parallel (which Chapel can handle very well on its own), and then you have the Chaotic message-passing based where particles go flying everywhere! That is, a particle collides with its neighbors and sends a message, and as soon as this message is received it handles collisions with its neighbors, and so forth. Something, at a very high-level and at risk of over-simplification, will be like this...

// channelMatrix[i,j] => (send_j, recv_i) where send_j is paired with recv_j
var channelMatrix : [0..#numLocales, 0..#numLocales] (Channel, Channel);
coforall loc in Locales do on loc {
   coforall tid in 0..#here.maxTaskPar {
      var (send, recv) = select(channelMatrix[loc.id,0..#numLocales]);
      var x = recv.receive();
      for n in neighbors() do channelMatrix[loc.id, n][1].send(f(x));
   }
}

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.