Clover Git
OpenCL 1.1 software implementation
Functions

worker.cpp File Reference

Code running in the worker threads launched by Coal::CPUDevice. More...

#include "worker.h"
#include "device.h"
#include "buffer.h"
#include "kernel.h"
#include "builtins.h"
#include "../commandqueue.h"
#include "../events.h"
#include "../memobject.h"
#include "../kernel.h"
#include <sys/mman.h>
#include <cstring>
#include <iostream>
Include dependency graph for worker.cpp:

Go to the source code of this file.

Functions

void * worker (void *data)
 Main loop of the CPU worker threads.

Detailed Description

Code running in the worker threads launched by Coal::CPUDevice.

See also:
builtins.cpp

Definition in file worker.cpp.


Function Documentation

void* worker ( void *  data)

Main loop of the CPU worker threads.

This function is run by as many thread as they are CPU cores on the host system. As explained by Command Queues, Events and Worker Threads , this function waits until there are Coal::Event objects to process and handle them.

Definition at line 52 of file worker.cpp.

References Coal::NativeKernelEvent::args(), Coal::BufferEvent::buffer(), Coal::CopyBufferEvent::cb(), Coal::ReadWriteBufferEvent::cb(), Coal::CommandQueue::cleanEvents(), Coal::Event::Complete, Coal::Event::CopyBuffer, Coal::Event::CopyBufferRect, Coal::Event::CopyBufferToImage, Coal::Event::CopyImage, Coal::Event::CopyImageToBuffer, Coal::CPUBuffer::data(), Coal::CopyBufferRectEvent::destination(), Coal::CopyBufferEvent::destination(), Coal::MemObject::deviceBuffer(), Coal::Event::deviceData(), Coal::ReadWriteCopyBufferRectEvent::dst_origin(), Coal::ReadWriteCopyBufferRectEvent::dst_row_pitch(), Coal::ReadWriteCopyBufferRectEvent::dst_slice_pitch(), Coal::Event::End, Coal::CPUKernelEvent::finished(), Coal::NativeKernelEvent::function(), Coal::CPUDevice::getEvent(), getWorkItemsData(), imageData(), Coal::CommandQueue::info(), Coal::Event::MapBuffer, Coal::Event::MapImage, Coal::Event::NativeKernel, Coal::Event::NDRangeKernel, Coal::CopyImageToBufferEvent::offset(), Coal::CopyBufferToImageEvent::offset(), Coal::ReadWriteBufferEvent::offset(), Coal::ReadWriteBufferRectEvent::ptr(), Coal::ReadWriteBufferEvent::ptr(), Coal::Event::ReadBuffer, Coal::Event::ReadBufferRect, Coal::Event::ReadImage, Coal::ReadWriteCopyBufferRectEvent::region(), Coal::CPUKernelWorkGroup::run(), setWorkItemsData(), Coal::ReadWriteCopyBufferRectEvent::source(), Coal::CopyBufferEvent::source(), Coal::ReadWriteCopyBufferRectEvent::src_origin(), Coal::ReadWriteCopyBufferRectEvent::src_row_pitch(), Coal::ReadWriteCopyBufferRectEvent::src_slice_pitch(), Coal::Event::Start, Coal::CPUKernelEvent::takeInstance(), Coal::Event::TaskKernel, Coal::Event::type(), Coal::Event::WriteBuffer, Coal::Event::WriteBufferRect, and Coal::Event::WriteImage.

Referenced by Coal::CPUDevice::init().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines