
#include <PythonCCS.h>

Public Member Functions | |
| void | pyRequest (CkCcsRequestMsg *msg) |
| void | execute (CkCcsRequestMsg *msg, CcsDelayedReply *reply) |
| void | print (PythonPrint *pyMsg, CcsDelayedReply *reply) |
| void | finished (PythonFinished *pyMsg, CcsDelayedReply *reply) |
| void | cleanup (PythonExecute *pyMsg, PyThreadState *pts, CmiUInt4 pyVal) |
| void | getPrint (CkCcsRequestMsg *msg) |
| void | executeThread (PythonExecute *pyMsg) |
| virtual PyMethodDef * | getMethods () |
| virtual const char * | getMethodsDoc () |
| PythonObject () | |
| void | pythonSetString (PyObject *, char *, char *) |
| void | pythonSetString (PyObject *, char *, char *, int) |
| void | pythonSetInt (PyObject *, char *, long) |
| void | pythonSetLong (PyObject *, char *, long) |
| void | pythonSetLong (PyObject *, char *, unsigned long) |
| void | pythonSetLong (PyObject *, char *, double) |
| void | pythonSetFloat (PyObject *, char *, double) |
| void | pythonSetComplex (PyObject *, char *, double, double) |
| void | pythonSetPointer (PyObject *, char *, void *) |
| void | pythonGetString (PyObject *, char *, char **) |
| void | pythonGetInt (PyObject *, char *, long *) |
| void | pythonGetLong (PyObject *, char *, long *) |
| void | pythonGetLong (PyObject *, char *, unsigned long *) |
| void | pythonGetLong (PyObject *, char *, double *) |
| void | pythonGetFloat (PyObject *, char *, double *) |
| void | pythonGetComplex (PyObject *, char *, double *, double *) |
| void | pythonGetPointer (PyObject *, char *, void **) |
| PyObject * | pythonGetArg (int) |
| void | pythonReturn (int) |
| void | pythonReturn (int, PyObject *) |
| void | pythonAwake (int) |
| void | pythonSleep (int) |
| virtual PyObject * | read (PyObject *where) |
| virtual void | write (PyObject *where, PyObject *what) |
| virtual int | buildIterator (PyObject *&, void *) |
| virtual int | nextIteratorUpdate (PyObject *&, PyObject *, void *) |
Static Public Member Functions | |
| static void | replyIntValue (PythonObject *obj, CcsDelayedReply *reply, CmiUInt4 *value) |
| static void | _callthr_executeThread (CkThrCallArg *impl_arg) |
Data Fields | |
| CmiUInt4 | pyNumber |
| PythonTable | pyWorkers |
| void(* | replyIntFn )(PythonObject *, CcsDelayedReply *, CmiUInt4 *) |
Protected Member Functions | |
| int | prepareInterpreter (PythonExecute *pyMsg) |
| This method prepares a python interpreter for execution of code inside it. | |
Static Private Attributes | |
| static PyMethodDef | CkPy_MethodsCustom [] |
| static const char * | CkPy_MethodsCustomDoc = "" |
Definition at line 55 of file PythonCCS.h.
| PythonObject::PythonObject | ( | ) | [inline] |
| void PythonObject::pyRequest | ( | CkCcsRequestMsg * | msg | ) |
Definition at line 178 of file PythonCCS.C.
References CkCcsRequestMsg::data, execute(), finished(), PythonAbstract::isExecute(), PythonAbstract::isFinished(), PythonAbstract::isPrint(), print(), CkCcsRequestMsg::reply, and PythonAbstract::unpack().
| void PythonObject::execute | ( | CkCcsRequestMsg * | msg, | |
| CcsDelayedReply * | reply | |||
| ) |
Definition at line 303 of file PythonCCS.C.
References _callthr_executeThread(), _startTime, ckout, CmiWallTimer(), CthCreate(), CthResume(), CkCcsRequestMsg::data, endl(), executeThread(), PythonExecute::isHighLevel(), PythonExecute::isWait(), prepareInterpreter(), pyWorkers, replyIntFn, and PythonExecute::unpack().
Referenced by pyRequest().
| void PythonObject::print | ( | PythonPrint * | pyMsg, | |
| CcsDelayedReply * | reply | |||
| ) |
Definition at line 200 of file PythonCCS.C.
References CcsNoDelayedReply(), CcsSendDelayedReply(), CkReductionMgr::contribute(), PythonReplyString::data, group(), PythonPrint::interpreter, PythonPrint::isKill(), PythonPrint::isWait(), length, pythonCcsProxy, pyWorkers, PythonCCS::reduceString, PythonReplyString::reply, replyIntFn, and PythonPrint::unpack().
Referenced by pyRequest().
| void PythonObject::finished | ( | PythonFinished * | pyMsg, | |
| CcsDelayedReply * | reply | |||
| ) |
Definition at line 268 of file PythonCCS.C.
References PythonFinished::interpreter, PythonFinished::isWait(), pyWorkers, replyIntFn, and PythonFinished::unpack().
Referenced by pyRequest().
| int PythonObject::prepareInterpreter | ( | PythonExecute * | pyMsg | ) | [protected] |
This method prepares a python interpreter for execution of code inside it.
It either allocates a new interpreter or uses an existing one, depending on the input parameters. The python lock is acquired if the interpreter is successfully prepared.
Definition at line 361 of file PythonCCS.C.
References CkPy_MethodsDefault, CkPythonDebugf(), getMethods(), getMethodsDoc(), PythonExecute::interpreter, PythonExecute::isHighLevel(), PythonExecute::isKeepPrint(), pyNumber, and pyWorkers.
Referenced by execute().
| void PythonObject::replyIntValue | ( | PythonObject * | obj, | |
| CcsDelayedReply * | reply, | |||
| CmiUInt4 * | value | |||
| ) | [static] |
Definition at line 165 of file PythonCCS.C.
References CkReduction::bitvec_and, CcsSendDelayedReply(), Converse::CkMyPe(), CkPythonDebugf(), CkReductionMgr::contribute(), group(), pythonCcsProxy, PythonReplyInt::reply, and PythonReplyInt::value.
Referenced by PythonObject().
| void PythonObject::cleanup | ( | PythonExecute * | pyMsg, | |
| PyThreadState * | pts, | |||
| CmiUInt4 | pyVal | |||
| ) |
Definition at line 687 of file PythonCCS.C.
References PythonExecute::isPersistent(), pyWorkers, and replyIntFn.
Referenced by executeThread().
| void PythonObject::getPrint | ( | CkCcsRequestMsg * | msg | ) |
Definition at line 719 of file PythonCCS.C.
| void PythonObject::_callthr_executeThread | ( | CkThrCallArg * | impl_arg | ) | [static] |
Definition at line 485 of file PythonCCS.C.
References CkCcsRequestMsg::data, CkThrCallArg::msg, and CkThrCallArg::obj.
Referenced by execute().
| void PythonObject::executeThread | ( | PythonExecute * | pyMsg | ) |
Definition at line 494 of file PythonCCS.C.
References _startTime, buildIterator(), Ck_printclient(), ckout, CkPythonDebugf(), cleanup(), CmiWallTimer(), PythonExecute::code, CthSelf(), endl(), PythonExecute::info, PythonExecute::isHighLevel(), PythonExecute::isIterate(), PythonExecute::methodName, nextIteratorUpdate(), and pyWorkers.
Referenced by execute().
| virtual PyMethodDef* PythonObject::getMethods | ( | ) | [inline, virtual] |
Definition at line 76 of file PythonCCS.h.
References CkPy_MethodsCustom.
Referenced by prepareInterpreter().
| virtual const char* PythonObject::getMethodsDoc | ( | ) | [inline, virtual] |
Definition at line 77 of file PythonCCS.h.
References CkPy_MethodsCustomDoc.
Referenced by prepareInterpreter().
| void PythonObject::pythonSetString | ( | PyObject * | arg, | |
| char * | descr, | |||
| char * | value | |||
| ) |
Definition at line 724 of file PythonCCS.C.
| void PythonObject::pythonSetString | ( | PyObject * | arg, | |
| char * | descr, | |||
| char * | value, | |||
| int | len | |||
| ) |
Definition at line 730 of file PythonCCS.C.
| void PythonObject::pythonSetInt | ( | PyObject * | arg, | |
| char * | descr, | |||
| long | value | |||
| ) |
Definition at line 742 of file PythonCCS.C.
| void PythonObject::pythonSetLong | ( | PyObject * | arg, | |
| char * | descr, | |||
| long | value | |||
| ) |
Definition at line 754 of file PythonCCS.C.
| void PythonObject::pythonSetLong | ( | PyObject * | arg, | |
| char * | descr, | |||
| unsigned long | value | |||
| ) |
Definition at line 760 of file PythonCCS.C.
| void PythonObject::pythonSetLong | ( | PyObject * | arg, | |
| char * | descr, | |||
| double | value | |||
| ) |
Definition at line 766 of file PythonCCS.C.
| void PythonObject::pythonSetFloat | ( | PyObject * | arg, | |
| char * | descr, | |||
| double | value | |||
| ) |
Definition at line 790 of file PythonCCS.C.
Definition at line 802 of file PythonCCS.C.
| void PythonObject::pythonSetPointer | ( | PyObject * | arg, | |
| char * | descr, | |||
| void * | ptr | |||
| ) |
Definition at line 815 of file PythonCCS.C.
| void PythonObject::pythonGetString | ( | PyObject * | arg, | |
| char * | descr, | |||
| char ** | result | |||
| ) |
Definition at line 736 of file PythonCCS.C.
| void PythonObject::pythonGetInt | ( | PyObject * | arg, | |
| char * | descr, | |||
| long * | result | |||
| ) |
Definition at line 748 of file PythonCCS.C.
| void PythonObject::pythonGetLong | ( | PyObject * | arg, | |
| char * | descr, | |||
| long * | result | |||
| ) |
Definition at line 772 of file PythonCCS.C.
| void PythonObject::pythonGetLong | ( | PyObject * | arg, | |
| char * | descr, | |||
| unsigned long * | result | |||
| ) |
Definition at line 778 of file PythonCCS.C.
| void PythonObject::pythonGetLong | ( | PyObject * | arg, | |
| char * | descr, | |||
| double * | result | |||
| ) |
Definition at line 784 of file PythonCCS.C.
| void PythonObject::pythonGetFloat | ( | PyObject * | arg, | |
| char * | descr, | |||
| double * | result | |||
| ) |
Definition at line 796 of file PythonCCS.C.
Definition at line 808 of file PythonCCS.C.
| void PythonObject::pythonGetPointer | ( | PyObject * | arg, | |
| char * | descr, | |||
| void ** | ptr | |||
| ) |
Definition at line 821 of file PythonCCS.C.
| PyObject * PythonObject::pythonGetArg | ( | int | handle | ) |
| void PythonObject::pythonReturn | ( | int | handle | ) |
Definition at line 834 of file PythonCCS.C.
| void PythonObject::pythonReturn | ( | int | handle, | |
| PyObject * | data | |||
| ) |
| void PythonObject::pythonAwake | ( | int | handle | ) |
Definition at line 852 of file PythonCCS.C.
| void PythonObject::pythonSleep | ( | int | handle | ) |
Definition at line 860 of file PythonCCS.C.
| virtual PyObject* PythonObject::read | ( | PyObject * | where | ) | [inline, virtual] |
Definition at line 115 of file PythonCCS.h.
| virtual void PythonObject::write | ( | PyObject * | where, | |
| PyObject * | what | |||
| ) | [inline, virtual] |
Definition at line 116 of file PythonCCS.h.
| virtual int PythonObject::buildIterator | ( | PyObject *& | , | |
| void * | ||||
| ) | [inline, virtual] |
| virtual int PythonObject::nextIteratorUpdate | ( | PyObject *& | , | |
| PyObject * | , | |||
| void * | ||||
| ) | [inline, virtual] |
PyMethodDef PythonObject::CkPy_MethodsCustom [static, private] |
Initial value:
{
{NULL, NULL}
}
Definition at line 56 of file PythonCCS.h.
Referenced by getMethods().
const char * PythonObject::CkPy_MethodsCustomDoc = "" [static, private] |
Definition at line 60 of file PythonCCS.h.
Referenced by cleanup(), execute(), executeThread(), finished(), prepareInterpreter(), print(), pythonGetArg(), and pythonReturn().
| void(* PythonObject::replyIntFn)(PythonObject *, CcsDelayedReply *, CmiUInt4 *) |
Referenced by cleanup(), execute(), finished(), print(), and PythonObject().
1.5.5