API Design for Task / Parallelization Library

I have just completed a significant revision of my task pool / parallelization library for the D programming language. I am interested in APIs , criticisms , especially people who are not regular D users , but know a decent amount of use cases for such a library. I would like to avoid the group approach that will be created if you ask for an opinion on a relatively small community of D hardcore users for their opinion.

  • Do you think that the API is designed to the desired level, i.e. not ridiculously overloaded or not prepared enough?

  • Do you think the documentation is clear enough so that someone who is not Guru D yet can figure out how to use it?

  • Do you think there are any major missing features that need to be added or useless functions that should be removed?

  • Do you think this is a general design?

+3
source share
1 answer

Disclaimer: participation in D 2.0 is possible after 10 days (tick "not using D regularly"). I believe this is an opportunity to learn something about D.

Regarding 1 and 2: Easy to read and understand ( writeln("Sum = ", myFuture.spinWait());probably should be in the example writeln("Sum = ", myTask.spinWait());).

3: a , . D, , - .

4:, , , , , , . ( , ). NUMA "" , "" . , API . : , , parallel_for ? D , ?

: , . ( ) . , :

  • ( parallelism) ( parallelism). ++ (TBB, OpenMP, MS PPL TPL). , : (, GPU) (, ).

  • , TaskPool. , , . Intel TBB FAQ , :

[...] , . , . , TBB . , ; [...] k TBB k . , k, , - .

+2

Source: https://habr.com/ru/post/1729789/


All Articles