GPUOcelot
|
A worker thread that allows asynchronous execution of kernels on an Ocelot device. More...
#include <CudaWorkerThread.h>
Classes | |
class | Launch |
A description of a kernel launch. More... | |
Public Types | |
typedef std::vector< char > | DataVector |
A raw data array storing kernel parameters. | |
typedef std::queue< Launch > | LaunchQueue |
A queue of kernel launches. | |
Public Member Functions | |
CudaWorkerThread () | |
Put the thread in a consistent state. | |
~CudaWorkerThread () | |
Signal for the thread to die, wait until it joins. | |
void | setDevice (executive::Device *d) |
Set the device associated with this worker. | |
void | launch (const std::string &module, const std::string &kernel, const ir::Dim3 &grid, const ir::Dim3 &block, size_t sharedMemory, const void *argumentBlock, size_t argumentBlockSize, const trace::TraceGeneratorVector &traceGenerators, const ir::ExternalFunctionSet *externals) |
Launch the specified kernel on this thread. | |
void | wait () |
Wait for all kernels that have been launched on this device to complete. | |
bool | areAnyKernelsRunning () |
Check if there are any running kernels. | |
void | execute () |
The entry point to the threaded function. |
A worker thread that allows asynchronous execution of kernels on an Ocelot device.
typedef std::vector<char> cuda::CudaWorkerThread::DataVector |
A raw data array storing kernel parameters.
typedef std::queue<Launch> cuda::CudaWorkerThread::LaunchQueue |
A queue of kernel launches.
cuda::CudaWorkerThread::CudaWorkerThread | ( | ) |
Put the thread in a consistent state.
cuda::CudaWorkerThread::~CudaWorkerThread | ( | ) |
Signal for the thread to die, wait until it joins.
bool cuda::CudaWorkerThread::areAnyKernelsRunning | ( | ) |
Check if there are any running kernels.
void cuda::CudaWorkerThread::execute | ( | ) |
The entry point to the threaded function.
void cuda::CudaWorkerThread::launch | ( | const std::string & | module, |
const std::string & | kernel, | ||
const ir::Dim3 & | grid, | ||
const ir::Dim3 & | block, | ||
size_t | sharedMemory, | ||
const void * | argumentBlock, | ||
size_t | argumentBlockSize, | ||
const trace::TraceGeneratorVector & | traceGenerators, | ||
const ir::ExternalFunctionSet * | externals | ||
) |
Launch the specified kernel on this thread.
void cuda::CudaWorkerThread::setDevice | ( | executive::Device * | d | ) |
Set the device associated with this worker.
Note: The worker must *not* be running.
void cuda::CudaWorkerThread::wait | ( | ) |
Wait for all kernels that have been launched on this device to complete.