![]() The loop index k is implicitly private according to the OpenMP specification. ![]() The variable FLOPS_ARRAY_SIZE is implicitly mapped to the accelerator. Array fb and the variable a are required as input to the calculation and are not modified, so there is no need to copy them out. #pragma omp target map(tofrom:fa), map(to:fb,a)Īrray fa is mapped both to and from the accelerator since fa is both input to and output from the calculation. The C++ code snippet below targets a SAXPY computation to the accelerator. Other OpenMP tasks may be used for asynchronous execution on the host use the nowait clause to specify that the encountering thread does not wait for the target region to complete. The host thread waits until the offloaded computations are complete. Variables are mapped between the host and the target device. ![]() The OpenMP target construct is used to transfer control from the host to the target device.
0 Comments
Leave a Reply. |