1<!---======================= begin_copyright_notice ============================ 2 3Copyright (C) 2020-2021 Intel Corporation 4 5SPDX-License-Identifier: MIT 6 7============================= end_copyright_notice ==========================--> 8 9 10 11## Opcode 12 13 WAIT = 0x5b 14 15## Format 16 17| | 18| --- | 19| 0x5b(WAIT) | Mask | 20 21 22## Semantics 23 24 25 26 27 //Each TDR is a struct with two fields: a bool valid bit and a thread id. 28 //It is initialized during thread dispatch 29 for (i = 0; i < 8; ++i) { 30 if (mask & (1<< i)) { 31 TDR[i].valid = false; 32 } 33 if (TDR[i].valid) { 34 wait for TDR[i].thread to finish; 35 } 36 } 37 38## Description 39 40 41 If a thread dependency pattern is specified during the creation of the 42 kernel's thread space, this instruction will cause the thread to wait 43 until all of its dependency threads have finished their execution. The 44 8-bit thread dependency clear mask provides finer-grained dependency 45 control. Each bit corresponds to one of the eight threads this thread 46 may depend on; if set, dependency is cleared, and this thread will not 47 wait for the corresponding thread's termination. 48 49- **Mask(scalar):** The thread dependency clear mask. Must have type UB 50 51#### Properties 52 53 54## Text 55``` 56 57 58 WAIT <Mask> 59``` 60 61 62 63## Notes 64 65 66 67 This instruction may only be used with the global thread space execution model. 68