September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
18
Task/Concurrent-computing/BaCon/concurrent-computing.bacon
Normal file
18
Task/Concurrent-computing/BaCon/concurrent-computing.bacon
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
' Concurrent computing using the OpenMP extension in GCC. Requires BaCon 3.6 or higher.
|
||||
|
||||
' Specify compiler flag
|
||||
PRAGMA OPTIONS -fopenmp
|
||||
|
||||
' Sepcify linker flag
|
||||
PRAGMA LDFLAGS -lgomp
|
||||
|
||||
' Declare array with text
|
||||
DECLARE str$[] = { "Enjoy", "Rosetta", "Code" }
|
||||
|
||||
' Indicate MP optimization for FOR loop
|
||||
PRAGMA omp parallel for num_threads(3)
|
||||
|
||||
' The actual FOR loop
|
||||
FOR i = 0 TO 2
|
||||
PRINT str$[i]
|
||||
NEXT
|
||||
Loading…
Add table
Add a link
Reference in a new issue