GPUOcelot
Classes | Public Types | Public Member Functions

cuda::CudaWorkerThread Class Reference

A worker thread that allows asynchronous execution of kernels on an Ocelot device. More...

#include <CudaWorkerThread.h>

Collaboration diagram for cuda::CudaWorkerThread:
Collaboration graph
[legend]

List of all members.

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< LaunchLaunchQueue
 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.

Detailed Description

A worker thread that allows asynchronous execution of kernels on an Ocelot device.


Member Typedef Documentation

typedef std::vector<char> cuda::CudaWorkerThread::DataVector

A raw data array storing kernel parameters.

A queue of kernel launches.


Constructor & Destructor Documentation

cuda::CudaWorkerThread::CudaWorkerThread ( )

Put the thread in a consistent state.

cuda::CudaWorkerThread::~CudaWorkerThread ( )

Signal for the thread to die, wait until it joins.


Member Function Documentation

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines