My Project
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
LibThread::RawKernelJob Class Reference

Public Member Functions

 RawKernelJob (void(*func)(long ndeps, Job **deps))
 
virtual void execute ()
 
- Public Member Functions inherited from LibThread::Job
 Job ()
 
 ~Job ()
 
void addDep (Job *job)
 
void addDep (vector< Job * > &jobs)
 
void addDep (long ndeps, Job **jobs)
 
void addNotify (vector< Job * > &jobs)
 
void addNotify (Job *job)
 
virtual bool ready ()
 
virtual void execute ()=0
 
void run ()
 
- Public Member Functions inherited from LibThread::SharedObject
 SharedObject ()
 
virtual ~SharedObject ()
 
void set_type (int type_init)
 
int get_type ()
 
void set_name (std::string &name_init)
 
void set_name (const char *s)
 
std::string & get_name ()
 
void incref (int by=1)
 
long decref ()
 
long getref ()
 
virtual BOOLEAN op2 (int op, leftv res, leftv a1, leftv a2)
 
virtual BOOLEAN op3 (int op, leftv res, leftv a1, leftv a2, leftv a3)
 

Private Attributes

void(* cfunc )(long ndeps, Job **deps)
 

Additional Inherited Members

- Data Fields inherited from LibThread::Job
ThreadPoolpool
 
long prio
 
size_t id
 
long pending_index
 
vector< Job * > deps
 
vector< Job * > notify
 
vector< Trigger * > triggers
 
vector< string > args
 
string result
 
void * data
 
bool fast
 
bool done
 
bool queued
 
bool running
 
bool cancelled
 

Detailed Description

Definition at line 2434 of file shared.cc.

Constructor & Destructor Documentation

◆ RawKernelJob()

LibThread::RawKernelJob::RawKernelJob ( void(*)(long ndeps, Job **deps func)
inline

Definition at line 2438 of file shared.cc.

2438: cfunc(func) { }
void(* cfunc)(long ndeps, Job **deps)
Definition: shared.cc:2436

Member Function Documentation

◆ execute()

virtual void LibThread::RawKernelJob::execute ( )
inlinevirtual

Implements LibThread::Job.

Definition at line 2439 of file shared.cc.

2439 {
2440 long ndeps = deps.size();
2441 Job **jobs = (Job **) omAlloc0(sizeof(Job *) * ndeps);
2442 for (long i = 0; i < ndeps; i++)
2443 jobs[i] = deps[i];
2444 cfunc(ndeps, jobs);
2445 omFree(jobs);
2446 }
int i
Definition: cfEzgcd.cc:132
vector< Job * > deps
Definition: shared.cc:1555
#define omFree(addr)
Definition: omAllocDecl.h:261
#define omAlloc0(size)
Definition: omAllocDecl.h:211

Field Documentation

◆ cfunc

void(* LibThread::RawKernelJob::cfunc) (long ndeps, Job **deps)
private

Definition at line 2436 of file shared.cc.


The documentation for this class was generated from the following file: