Cleanup: Make WorkPackage a struct
This commit is contained in:
parent
ba5961b4cd
commit
6ebd34c802
|
@ -24,8 +24,8 @@ CPUDevice::CPUDevice(int thread_id) : m_thread_id(thread_id)
|
|||
|
||||
void CPUDevice::execute(WorkPackage *work)
|
||||
{
|
||||
const unsigned int chunkNumber = work->getChunkNumber();
|
||||
ExecutionGroup *executionGroup = work->getExecutionGroup();
|
||||
const unsigned int chunkNumber = work->chunk_number;
|
||||
ExecutionGroup *executionGroup = work->execution_group;
|
||||
rcti rect;
|
||||
|
||||
executionGroup->determineChunkRect(&rect, chunkNumber);
|
||||
|
|
|
@ -61,8 +61,8 @@ void OpenCLDevice::deinitialize()
|
|||
|
||||
void OpenCLDevice::execute(WorkPackage *work)
|
||||
{
|
||||
const unsigned int chunkNumber = work->getChunkNumber();
|
||||
ExecutionGroup *executionGroup = work->getExecutionGroup();
|
||||
const unsigned int chunkNumber = work->chunk_number;
|
||||
ExecutionGroup *executionGroup = work->execution_group;
|
||||
rcti rect;
|
||||
|
||||
executionGroup->determineChunkRect(&rect, chunkNumber);
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
#include "COM_WorkPackage.h"
|
||||
|
||||
WorkPackage::WorkPackage(ExecutionGroup *group, unsigned int chunkNumber)
|
||||
WorkPackage::WorkPackage(ExecutionGroup *execution_group, unsigned int chunk_number)
|
||||
{
|
||||
this->m_executionGroup = group;
|
||||
this->m_chunkNumber = chunkNumber;
|
||||
this->execution_group = execution_group;
|
||||
this->chunk_number = chunk_number;
|
||||
}
|
||||
|
|
|
@ -27,41 +27,23 @@ class ExecutionGroup;
|
|||
* \brief contains data about work that can be scheduled
|
||||
* \see WorkScheduler
|
||||
*/
|
||||
class WorkPackage {
|
||||
private:
|
||||
struct WorkPackage {
|
||||
/**
|
||||
* \brief executionGroup with the operations-setup to be evaluated
|
||||
*/
|
||||
ExecutionGroup *m_executionGroup;
|
||||
ExecutionGroup *execution_group;
|
||||
|
||||
/**
|
||||
* \brief number of the chunk to be executed
|
||||
*/
|
||||
unsigned int m_chunkNumber;
|
||||
unsigned int chunk_number;
|
||||
|
||||
public:
|
||||
/**
|
||||
* constructor
|
||||
* \param group: the ExecutionGroup
|
||||
* \param chunkNumber: the number of the chunk
|
||||
* \param chunk_number: the number of the chunk
|
||||
*/
|
||||
WorkPackage(ExecutionGroup *group, unsigned int chunkNumber);
|
||||
|
||||
/**
|
||||
* \brief get the ExecutionGroup
|
||||
*/
|
||||
ExecutionGroup *getExecutionGroup() const
|
||||
{
|
||||
return this->m_executionGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief get the number of the chunk
|
||||
*/
|
||||
unsigned int getChunkNumber() const
|
||||
{
|
||||
return this->m_chunkNumber;
|
||||
}
|
||||
WorkPackage(ExecutionGroup *group, unsigned int chunk_number);
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkPackage")
|
||||
|
|
Loading…
Reference in New Issue