[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
What are the problem of programming for parallel cores or CPUs?

You are currently reading a thread in /g/ - Technology

Thread replies: 6
Thread images: 2
File: selection_025.png (11 KB, 1070x391) Image search: [Google]
selection_025.png
11 KB, 1070x391
What are the problem of programming for parallel cores or CPUs?
>>
Overhead from calling.
Now go to Google or >>sqt
>>
This is a huge topic

Get a fucking book
>>
need a good language tbqh
let rec fib x = if x <= 2 then 1 else fib(x-1) + fib(x-2)

let fibs =
Async.Parallel [ for i in 0..40 -> async { return fib(i) } ]
|> Async.RunSynchronously


The above code sample shows the elements of the Parallel CPU Asyncs pattern:

(a) “async { … }” is used to specify a number of CPU tasks
(b) These are composed in parallel using the fork-join combinator Async.Parallel

In this case the composition is executed using Async.RunSynchronously, which starts an instance of the async and synchronously waits for the overall result.
>>
File: parallelconcurrenthaskell.jpg (795 KB, 2100x2756) Image search: [Google]
parallelconcurrenthaskell.jpg
795 KB, 2100x2756
Not using enough Haskell
>>
>>54834420
1) data dependencies
2) depending on the amount and type of data to be processed, the act of distributing data among workers may cause overheads that wipe out the gains.
3) scheduling
Thread replies: 6
Thread images: 2

[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK