Name
create_barriercreate_barrierCreateBarrierCreateBarrier — Create a barrier synchronization object.
void CreateBarrier(const HTuple& AttribName, const HTuple& AttribValue, const HTuple& TeamSize, HTuple* BarrierHandle)
void HBarrier::HBarrier(const HTuple& AttribName, const HTuple& AttribValue, Hlong TeamSize)
void HBarrier::HBarrier(const HString& AttribName, const HString& AttribValue, Hlong TeamSize)
void HBarrier::HBarrier(const char* AttribName, const char* AttribValue, Hlong TeamSize)
void HBarrier::CreateBarrier(const HTuple& AttribName, const HTuple& AttribValue, Hlong TeamSize)
void HBarrier::CreateBarrier(const HString& AttribName, const HString& AttribValue, Hlong TeamSize)
void HBarrier::CreateBarrier(const char* AttribName, const char* AttribValue, Hlong TeamSize)
static void HOperatorSet.CreateBarrier(HTuple attribName, HTuple attribValue, HTuple teamSize, out HTuple barrierHandle)
public HBarrier(HTuple attribName, HTuple attribValue, int teamSize)
public HBarrier(string attribName, string attribValue, int teamSize)
void HBarrier.CreateBarrier(HTuple attribName, HTuple attribValue, int teamSize)
void HBarrier.CreateBarrier(string attribName, string attribValue, int teamSize)
A barrier is a synchronization object blocking a thread until a previous
defined number of threads have reached this barrier.
create_barriercreate_barrierCreateBarrierCreateBarrierCreateBarrier allocates and initializes the barrier object returned
in BarrierHandleBarrierHandleBarrierHandleBarrierHandlebarrierHandle according to the attributes specified in
AttribNameAttribNameAttribNameAttribNameattribName and AttribValueAttribValueAttribValueAttribValueattribValue.
AttribNameAttribNameAttribNameAttribNameattribName specifies the attribute class and AttribValueAttribValueAttribValueAttribValueattribValue
the kind of the barrier. The description beneath lists all barrier kinds
supported by following parameter classes:
- ''""""""""
empty string sets the default attributes.
- 'type'"type""type""type""type"
-
specifies what happens if a thread waits at a barrier:
- 'sleep'"sleep""sleep""sleep""sleep"
simply suspends the calling thread (default).
- 'spin'"spin""spin""spin""spin"
a fast barrier implementation for short waits
that waits busy.
The TeamSizeTeamSizeTeamSizeTeamSizeteamSize argument specifies the number of threads that must
call wait_barrierwait_barrierWaitBarrierWaitBarrierWaitBarrier before any of them successfully return from
waiting. The value hold in TeamSizeTeamSizeTeamSizeTeamSizeteamSize must be greater than zero.
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Barrier attribute.
Default value: []
List of values: 'type'"type""type""type""type"
Barrier attribute value.
Number of elements: AttribValue == AttribName
Default value: []
List of values: 'sleep'"sleep""sleep""sleep""sleep", 'spin'"spin""spin""spin""spin"
Barrier team size.
Default value: 1
Barrier synchronization object.
create_barriercreate_barrierCreateBarrierCreateBarrierCreateBarrier returns 2 (H_MSG_TRUE) if all parameters are correct.
If necessary, an exception is raised.
wait_barrierwait_barrierWaitBarrierWaitBarrierWaitBarrier,
clear_barrierclear_barrierClearBarrierClearBarrierClearBarrier
Foundation