Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 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