GPUIterator¶
- iter GPU(c: range(?), GPUCallBack: func(int, int, int, void), CPUPercent: int = 0)¶
- Arguments
c : range(?) – The range to iterate over. The length of the range must be greater than zero.
GPUCallBack : func(int, int, int, void) – The reference to a Chapel function that is invoked after the iterator has computed a subrange for the GPU portion. It must take three integers:
lo:int, hi:int, n:int
, wherelo
andhi
are the lower and the upper bound of the GPU portion respectively, andn
ishi-lo+1
.CPUPercent : int – The percentage of the iteration space will be executed on the CPU. The default number for it is zero, meaning the whole itreration space goes to the GPU side.
- Yields
Indices in the CPU portion of the range
c
.
- iter GPU(D: domain, GPUCallBack: func(int, int, int, void), CPUPercent: int = 0)
- Arguments
D : domain – The domain to iterate over. The length of the range must be greater than zero. It must be a rectangular domain. Also, if
D
isdmapped
, it must beBlockDist
.GPUCallBack : func(int, int, int, void) – The reference to a Chapel function that is invoked after the iterator has computed a subrange for the GPU portion. It must take three integers:
lo:int, hi:int, n:int
, wherelo
andhi
are the lower and the upper bound of the GPU portion respectively, andn
ishi-lo+1
.CPUPercent : int – The percentage of the iteration space will be executed on the CPU. The default number for it is zero, meaning the whole itreration space goes to the GPU side.
- Yields
Indices in the CPU portion of the range
D
.