Create a two dimensional range 0.._globalWidth 0.._globalHeight 0../_globalDepth in groups defined by localWidth localHeight localDepth . Note that for this range to be valid _globalWidth > 0 && _globalHeight >0 _globalDepth >0 && _loca
(Device _device, int _globalWidth, int _globalHeight, int _globalDepth, int _localWidth,
int _localHeight, int _localDepth)
| 311 | * @return |
| 312 | */ |
| 313 | public static Range create3D(Device _device, int _globalWidth, int _globalHeight, int _globalDepth, int _localWidth, |
| 314 | int _localHeight, int _localDepth) { |
| 315 | final Range range = new Range(_device, 3); |
| 316 | |
| 317 | range.setGlobalSize_0(_globalWidth); |
| 318 | range.setLocalSize_0(_localWidth); |
| 319 | range.setGlobalSize_1(_globalHeight); |
| 320 | range.setLocalSize_1(_localHeight); |
| 321 | range.setGlobalSize_2(_globalDepth); |
| 322 | range.setLocalSize_2(_localDepth); |
| 323 | range.setValid((range.getLocalSize_0() > 0) && (range.getLocalSize_1() > 0) && (range.getLocalSize_2() > 0) |
| 324 | && ((range.getLocalSize_0() * range.getLocalSize_1() * range.getLocalSize_2()) <= range.getMaxWorkGroupSize()) |
| 325 | && (range.getLocalSize_0() <= range.getMaxWorkItemSize()[0]) |
| 326 | && (range.getLocalSize_1() <= range.getMaxWorkItemSize()[1]) |
| 327 | && (range.getLocalSize_2() <= range.getMaxWorkItemSize()[2]) |
| 328 | && ((range.getGlobalSize_0() % range.getLocalSize_0()) == 0) |
| 329 | && ((range.getGlobalSize_1() % range.getLocalSize_1()) == 0) |
| 330 | && ((range.getGlobalSize_2() % range.getLocalSize_2()) == 0)); |
| 331 | |
| 332 | return (range); |
| 333 | } |
| 334 | |
| 335 | /** |
| 336 | * Create a three dimensional range <code>0.._globalWidth * 0.._globalHeight *0../_globalDepth</code> |
no test coverage detected