SOFA API  ca665544
Open source framework for multi-physics simuation
sofa::simulation::Task Class Referenceabstract

#include <Task.h>

Inheritance diagram for sofa::simulation::Task:

Detailed Description

Task class interface

Classes

class  Allocator
 Task Allocator class interface used to allocate tasks. More...
 
class  Status
 Task Status class interface used to synchronize tasks. More...
 

Public Attributes

int m_id
 

Protected Attributes

int m_scheduledThread
 

Public Member Functions

 Task (int scheduledThread)
 
virtual ~Task ()=default
 
virtual MemoryAlloc run ()=0
 
virtual Task::StatusgetStatus (void) const =0
 
int getScheduledThread () const
 

Static Public Member Functions

static void * operator new (std::size_t sz)
 
static void operator delete (void *ptr)
 
static void operator delete (void *ptr, std::size_t sz)
 
static void * operator new[] (std::size_t sz)=delete
 
static Task::AllocatorgetAllocator ()
 
static void setAllocator (Task::Allocator *allocator)
 

Attribute details

◆ m_id

int sofa::simulation::Task::m_id

◆ m_scheduledThread

int sofa::simulation::Task::m_scheduledThread
protected

Constructor details

◆ Task()

sofa::simulation::Task::Task ( int  scheduledThread)

◆ ~Task()

virtual sofa::simulation::Task::~Task ( )
virtualdefault

Function details

◆ getAllocator()

Task::Allocator * sofa::simulation::Task::getAllocator ( )
static

◆ getScheduledThread()

int sofa::simulation::Task::getScheduledThread ( ) const

◆ getStatus()

virtual Task::Status* sofa::simulation::Task::getStatus ( void  ) const
pure virtual

Implemented in sofa::simulation::CpuTask.

◆ operator delete() [1/2]

void sofa::simulation::Task::operator delete ( void *  ptr)
static

◆ operator delete() [2/2]

void sofa::simulation::Task::operator delete ( void *  ptr,
std::size_t  sz 
)
static

◆ operator new()

void * sofa::simulation::Task::operator new ( std::size_t  sz)
static

◆ operator new[]()

static void* sofa::simulation::Task::operator new[] ( std::size_t  sz)
staticdelete

◆ run()

virtual MemoryAlloc sofa::simulation::Task::run ( )
pure virtual

◆ setAllocator()

void sofa::simulation::Task::setAllocator ( Task::Allocator allocator)
static

Enum details

◆ MemoryAlloc

Enumerator
Stack 
Dynamic 
Static