Date: Fri, 29 Mar 2024 02:48:36 -0500 (CDT) Message-ID: <625678573.1133.1711698516711@wiki-n2.rice.edu> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_1132_1816310881.1711698516707" ------=_Part_1132_1816310881.1711698516707 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
#pragma omp task =3D> async
The block of code enclosed by an omp task is now enclosed in an async bl= ock
OpenMP provide the following clause to define how a task should access v= ariables
Equivalent in HC:
#pragma omp taskwait
Need to create a finish block that encloses each asyncs (omp tasks) the = application needs to wait for.
#pragma omp critical: enclosed block executed by only one thread at a ti=
me
HC doesn't provide the "isolated" construct as HJ does. Currently, you'll =
need to use any lock implementation available in C.
One solution is to use pthread_mutex_lock / pthread_mutex_unlock
#pragma omp atomic: atomic operation translated to hardware specific ope=
ration.
You should use one of the primitive provided by HC. Have a look at hc_sysd=
ep.h in the HC runtime src folder. It provides implementations such as atom=
ic CAS, atomic increment, etc... for various platforms.