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
ThreadPool * | pool
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.

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

## Member Function Documentation

## execute()

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

inline virtual

Implements LibThread::Job.

Definition at line 2434 of file shared.cc.

{
long ndeps = deps.size();
Job **jobs = (Job **) omAlloc0(sizeof(Job *) * ndeps);
for (long i = 0; i < ndeps; i++)
jobs[i] = deps[i];
cfunc(ndeps, jobs);
omFree(jobs);
}
i
int i
Definition cfEzgcd.cc:132
LibThread::Job::deps
vector< Job * > deps
Definition shared.cc:1550
LibThread::Job::Job
Job()
Definition shared.cc:1561
omFree
#define omFree(addr)
Definition omAllocDecl.h:261
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211

## 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:

- Singular/dyn_modules/systhreads/shared.cc