java.lang.Object
uk.ac.manchester.tornado.api.AbstractWorkerGrid
- All Implemented Interfaces:
WorkerGrid
- Direct Known Subclasses:
WorkerGrid1D,WorkerGrid2D,WorkerGrid3D
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected long[]protected long[]protected long[]protected long[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong[]Returns an array of 3 elements with the offset per dimension.long[]Returns an array of 3 elements with the total number of threads per dimension.long[]Returns an array of 3 elements with the total number of threads per for the local work groups.long[]Returns an array with the total number of work groups per dimension.voidsetGlobalOffset(long x, long y, long z) Sets the global offsets per dimension.voidsetGlobalWork(long x, long y, long z) Sets the total number of threads per dimension to launch on the accelerator.voidsetLocalWork(long x, long y, long z) Sets the local work group threads per dimension to launch on the accelerator.voidSets the local work group to null.voidSets the global work group to null.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface uk.ac.manchester.tornado.api.WorkerGrid
dimension
-
Field Details
-
globalWork
protected long[] globalWork -
localWork
protected long[] localWork -
numOfWorkgroups
protected long[] numOfWorkgroups -
globalOffset
protected long[] globalOffset
-
-
Constructor Details
-
AbstractWorkerGrid
protected AbstractWorkerGrid(long x, long y, long z)
-
-
Method Details
-
getGlobalWork
public long[] getGlobalWork()Description copied from interface:WorkerGridReturns an array of 3 elements with the total number of threads per dimension.- Specified by:
getGlobalWorkin interfaceWorkerGrid- Returns:
-
invalid reference
long[]
-
getLocalWork
public long[] getLocalWork()Description copied from interface:WorkerGridReturns an array of 3 elements with the total number of threads per for the local work groups.- Specified by:
getLocalWorkin interfaceWorkerGrid- Returns:
-
invalid reference
long[]
-
getNumberOfWorkgroups
public long[] getNumberOfWorkgroups()Description copied from interface:WorkerGridReturns an array with the total number of work groups per dimension.- Specified by:
getNumberOfWorkgroupsin interfaceWorkerGrid- Returns:
-
invalid reference
long[]
-
getGlobalOffset
public long[] getGlobalOffset()Description copied from interface:WorkerGridReturns an array of 3 elements with the offset per dimension.- Specified by:
getGlobalOffsetin interfaceWorkerGrid- Returns:
-
invalid reference
long[]
-
setGlobalWork
public void setGlobalWork(long x, long y, long z) Description copied from interface:WorkerGridSets the total number of threads per dimension to launch on the accelerator.- Specified by:
setGlobalWorkin interfaceWorkerGrid- Parameters:
x-y-z-
-
setLocalWork
public void setLocalWork(long x, long y, long z) Description copied from interface:WorkerGridSets the local work group threads per dimension to launch on the accelerator.- Specified by:
setLocalWorkin interfaceWorkerGrid- Parameters:
x-y-z-
-
setGlobalOffset
public void setGlobalOffset(long x, long y, long z) Description copied from interface:WorkerGridSets the global offsets per dimension.- Specified by:
setGlobalOffsetin interfaceWorkerGrid- Parameters:
x-y-z-
-
setLocalWorkToNull
public void setLocalWorkToNull()Description copied from interface:WorkerGridSets the local work group to null. In this case, the corresponding driver will launch a default number of thread blocks (e.g., OpenCL Runtime).- Specified by:
setLocalWorkToNullin interfaceWorkerGrid
-
setNumberOfWorkgroupsToNull
public void setNumberOfWorkgroupsToNull()Description copied from interface:WorkerGridSets the global work group to null.- Specified by:
setNumberOfWorkgroupsToNullin interfaceWorkerGrid
-