XcalableMP Programming Model and Language
29
Fig. 21 Example of tasks construct
In such a case, the programmer must specify a tasks construct surrounding the
tasks to execute them in parallel (Fig. 21).
XcalableMP C
#pragma xmp nodes p[4]
#pragma xmp tasks
{
5 #pragma xmp task on p[0:2]
{
func_a();
}
#pragma xmp task on p[2:2]
10 {
func_b();
}
}
29
Fig. 21 Example of tasks construct
In such a case, the programmer must specify a tasks construct surrounding the
tasks to execute them in parallel (Fig. 21).
XcalableMP C
#pragma xmp nodes p[4]
#pragma xmp tasks
{
5 #pragma xmp task on p[0:2]
{
func_a();
}
#pragma xmp task on p[2:2]
10 {
func_b();
}
}
