My Project
Loading...
Searching...
No Matches
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 ()
 
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 2429 of file shared.cc.

Constructor & Destructor Documentation

◆ RawKernelJob()

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

Definition at line 2433 of file shared.cc.

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

Member Function Documentation

◆ execute()

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

Implements LibThread::Job.

Definition at line 2434 of file shared.cc.

2434 {
2435 long ndeps = deps.size();
2436 Job **jobs = (Job **) omAlloc0(sizeof(Job *) * ndeps);
2437 for (long i = 0; i < ndeps; i++)
2438 jobs[i] = deps[i];
2439 cfunc(ndeps, jobs);
2440 omFree(jobs);
2441 }
int i
Definition cfEzgcd.cc:132
vector< Job * > deps
Definition shared.cc:1550
#define omFree(addr)
#define omAlloc0(size)

Field Documentation

◆ cfunc

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

Definition at line 2431 of file shared.cc.


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