4 ms·
So this is a bunch of constructs for creating function-pointers and the like which then would be sent to mpi or other parallel libraries to do the actual interf
by joe_the_user 11y ago
So this is a bunch of constructs for creating function-pointers and the like which then would be sent to mpi or other parallel libraries to do the actual interfacing with the parallel mechanism.
Any idea how this would work with (random stuff I'm thinking about) Cuda or Tensorflow?
- haptork 11y agoThanks for your interest. There are indeed no function pointers, no void pointers, no preprocessor hacks, no wild type-casting involved anywhere in the library. This is completely compile time type-safe. Still, the kind of things you can do would be a far cry for all the hacks with those shoddy pointers. There are a lot of features like column manipulation, passing vector of a values for multiple rows and just a value for a single row etc. that make composability and ease of use way better. All of these features are implemented using template meta programming and traits available in modern C++. The language has become quite impressive from what we used to think of. You must check it out. A map/reduce/rise take a template parameter which can be of any class type and library has nothing to do what a function object or function does in the function body. The function just need to take in the arguments that the prior unit passes it and return something. I don't think there will be any problem if one uses any other library to perform computation inside a function, even if some library does not work out of the box, I'm pretty positive it can be done with little tinkering. I hope this makes things clear.
- joe_the_user 11y agoThanks for the reply! I'm probably not as up on the most modern c++ approaches as I should be but I'm quite interested. I have downloaded the code and I'm looking through it. Basically, it uses template metaprogramming to go from the higher-level map/reduce/rise semantics to lower level for-loops and calls. Beyond the particulars, the question/challenge I'd have would be - "how would you use this dynamically generate map/reduce/rise calls?"
- haptork 11y agoIf you can give some idea of the client code / API that you are expecting, I might be able to give some view on that.