Created
March 27, 2017 06:52
-
-
Save agibsonccc/01ae98f8635ba4d84402d203aad4a3ab to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/transforms/LogSoftMax.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
::java::lang::Class *LogSoftMax::class$ = NULL; | |
jmethodID *LogSoftMax::mids$ = NULL; | |
bool LogSoftMax::live$ = false; | |
jclass LogSoftMax::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/transforms/LogSoftMax"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_fa4e6ed8] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_4237560b] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_init$_321bc445] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_exec_54c6a166] = env->getMethodID(cls, "exec", "()V"); | |
mids$[mid_exec_1efc2008] = env->getMethodID(cls, "exec", "([I)V"); | |
mids$[mid_isExecSpecial_54c6a16a] = env->getMethodID(cls, "isExecSpecial", "()Z"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
LogSoftMax::LogSoftMax() : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
LogSoftMax::LogSoftMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
LogSoftMax::LogSoftMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
LogSoftMax::LogSoftMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_fa4e6ed8, a0.this$, a1.this$, a2.this$)) {} | |
LogSoftMax::LogSoftMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_4237560b, a0.this$, a1.this$, a2)) {} | |
LogSoftMax::LogSoftMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_321bc445, a0.this$, a1.this$, a2.this$, a3)) {} | |
void LogSoftMax::exec() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_54c6a166]); | |
} | |
void LogSoftMax::exec(const JArray< jint > & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_1efc2008], a0.this$); | |
} | |
jboolean LogSoftMax::isExecSpecial() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isExecSpecial_54c6a16a]); | |
} | |
::java::lang::String LogSoftMax::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jfloat LogSoftMax::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble LogSoftMax::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jdouble LogSoftMax::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
jfloat LogSoftMax::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op LogSoftMax::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ops::Op LogSoftMax::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
jint LogSoftMax::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
static PyObject *t_LogSoftMax_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_LogSoftMax_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_LogSoftMax_init_(t_LogSoftMax *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_LogSoftMax_exec(t_LogSoftMax *self, PyObject *args); | |
static PyObject *t_LogSoftMax_isExecSpecial(t_LogSoftMax *self, PyObject *args); | |
static PyObject *t_LogSoftMax_name(t_LogSoftMax *self, PyObject *args); | |
static PyObject *t_LogSoftMax_op(t_LogSoftMax *self, PyObject *args); | |
static PyObject *t_LogSoftMax_opForDimension(t_LogSoftMax *self, PyObject *args); | |
static PyObject *t_LogSoftMax_opNum(t_LogSoftMax *self, PyObject *args); | |
static PyObject *t_LogSoftMax_get__execSpecial(t_LogSoftMax *self, void *data); | |
static PyGetSetDef t_LogSoftMax__fields_[] = { | |
DECLARE_GET_FIELD(t_LogSoftMax, execSpecial), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_LogSoftMax__methods_[] = { | |
DECLARE_METHOD(t_LogSoftMax, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_LogSoftMax, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_LogSoftMax, exec, METH_VARARGS), | |
DECLARE_METHOD(t_LogSoftMax, isExecSpecial, METH_VARARGS), | |
DECLARE_METHOD(t_LogSoftMax, name, METH_VARARGS), | |
DECLARE_METHOD(t_LogSoftMax, op, METH_VARARGS), | |
DECLARE_METHOD(t_LogSoftMax, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_LogSoftMax, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(LogSoftMax, t_LogSoftMax, ::org::nd4j::linalg::api::ops::BaseTransformOp, LogSoftMax, t_LogSoftMax_init_, 0, 0, t_LogSoftMax__fields_, 0, 0); | |
void t_LogSoftMax::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(LogSoftMax), module, "LogSoftMax", 0); | |
} | |
void t_LogSoftMax::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(LogSoftMax).tp_dict, "class_", make_descriptor(LogSoftMax::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(LogSoftMax).tp_dict, "wrapfn_", make_descriptor(t_LogSoftMax::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(LogSoftMax).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_LogSoftMax_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, LogSoftMax::initializeClass, 1))) | |
return NULL; | |
return t_LogSoftMax::wrap_Object(LogSoftMax(((t_LogSoftMax *) arg)->object.this$)); | |
} | |
static PyObject *t_LogSoftMax_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, LogSoftMax::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_LogSoftMax_init_(t_LogSoftMax *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
LogSoftMax object((jobject) NULL); | |
INT_CALL(object = LogSoftMax()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
LogSoftMax object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = LogSoftMax(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
LogSoftMax object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = LogSoftMax(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
LogSoftMax object((jobject) NULL); | |
if (!parseArgs(args, "kkk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = LogSoftMax(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
LogSoftMax object((jobject) NULL); | |
if (!parseArgs(args, "kkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = LogSoftMax(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
LogSoftMax object((jobject) NULL); | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = LogSoftMax(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_LogSoftMax_exec(t_LogSoftMax *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
OBJ_CALL(self->object.exec()); | |
Py_RETURN_NONE; | |
} | |
break; | |
case 1: | |
{ | |
JArray< jint > a0((jobject) NULL); | |
if (!parseArgs(args, "[I", &a0)) | |
{ | |
OBJ_CALL(self->object.exec(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(LogSoftMax), (PyObject *) self, "exec", args, 2); | |
} | |
static PyObject *t_LogSoftMax_isExecSpecial(t_LogSoftMax *self, PyObject *args) | |
{ | |
jboolean result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.isExecSpecial()); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(LogSoftMax), (PyObject *) self, "isExecSpecial", args, 2); | |
} | |
static PyObject *t_LogSoftMax_name(t_LogSoftMax *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(LogSoftMax), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_LogSoftMax_op(t_LogSoftMax *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(LogSoftMax), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_LogSoftMax_opForDimension(t_LogSoftMax *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(LogSoftMax), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_LogSoftMax_opNum(t_LogSoftMax *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(LogSoftMax), (PyObject *) self, "opNum", args, 2); | |
} | |
static PyObject *t_LogSoftMax_get__execSpecial(t_LogSoftMax *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isExecSpecial()); | |
Py_RETURN_BOOL(value); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/meta/PostulateMetaOp.h" | |
#include "org/nd4j/linalg/api/ops/ScalarOp.h" | |
#include "org/nd4j/linalg/api/ops/grid/OpDescriptor.h" | |
#include "java/lang/Class.h" | |
#include "org/nd4j/linalg/api/ops/Accumulation.h" | |
#include "org/nd4j/linalg/api/ops/TransformOp.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace meta { | |
::java::lang::Class *PostulateMetaOp::class$ = NULL; | |
jmethodID *PostulateMetaOp::mids$ = NULL; | |
bool PostulateMetaOp::live$ = false; | |
jclass PostulateMetaOp::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/meta/PostulateMetaOp"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_8ffee82c] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ops/grid/OpDescriptor;Lorg/nd4j/linalg/api/ops/grid/OpDescriptor;)V"); | |
mids$[mid_init$_d5213a23] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ops/TransformOp;Lorg/nd4j/linalg/api/ops/Accumulation;)V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_a0db74ce] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ops/ScalarOp;Lorg/nd4j/linalg/api/ops/Accumulation;)V"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
PostulateMetaOp::PostulateMetaOp() : ::org::nd4j::linalg::api::ops::impl::meta::BaseMetaOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
PostulateMetaOp::PostulateMetaOp(const ::org::nd4j::linalg::api::ops::grid::OpDescriptor & a0, const ::org::nd4j::linalg::api::ops::grid::OpDescriptor & a1) : ::org::nd4j::linalg::api::ops::impl::meta::BaseMetaOp(env->newObject(initializeClass, &mids$, mid_init$_8ffee82c, a0.this$, a1.this$)) {} | |
PostulateMetaOp::PostulateMetaOp(const ::org::nd4j::linalg::api::ops::TransformOp & a0, const ::org::nd4j::linalg::api::ops::Accumulation & a1) : ::org::nd4j::linalg::api::ops::impl::meta::BaseMetaOp(env->newObject(initializeClass, &mids$, mid_init$_d5213a23, a0.this$, a1.this$)) {} | |
PostulateMetaOp::PostulateMetaOp(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::impl::meta::BaseMetaOp(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
PostulateMetaOp::PostulateMetaOp(const ::org::nd4j::linalg::api::ops::ScalarOp & a0, const ::org::nd4j::linalg::api::ops::Accumulation & a1) : ::org::nd4j::linalg::api::ops::impl::meta::BaseMetaOp(env->newObject(initializeClass, &mids$, mid_init$_a0db74ce, a0.this$, a1.this$)) {} | |
::java::lang::String PostulateMetaOp::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jint PostulateMetaOp::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace meta { | |
static PyObject *t_PostulateMetaOp_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_PostulateMetaOp_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_PostulateMetaOp_init_(t_PostulateMetaOp *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_PostulateMetaOp_name(t_PostulateMetaOp *self, PyObject *args); | |
static PyObject *t_PostulateMetaOp_opNum(t_PostulateMetaOp *self, PyObject *args); | |
static PyMethodDef t_PostulateMetaOp__methods_[] = { | |
DECLARE_METHOD(t_PostulateMetaOp, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_PostulateMetaOp, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_PostulateMetaOp, name, METH_VARARGS), | |
DECLARE_METHOD(t_PostulateMetaOp, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(PostulateMetaOp, t_PostulateMetaOp, ::org::nd4j::linalg::api::ops::impl::meta::BaseMetaOp, PostulateMetaOp, t_PostulateMetaOp_init_, 0, 0, 0, 0, 0); | |
void t_PostulateMetaOp::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(PostulateMetaOp), module, "PostulateMetaOp", 0); | |
} | |
void t_PostulateMetaOp::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(PostulateMetaOp).tp_dict, "class_", make_descriptor(PostulateMetaOp::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(PostulateMetaOp).tp_dict, "wrapfn_", make_descriptor(t_PostulateMetaOp::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(PostulateMetaOp).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_PostulateMetaOp_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, PostulateMetaOp::initializeClass, 1))) | |
return NULL; | |
return t_PostulateMetaOp::wrap_Object(PostulateMetaOp(((t_PostulateMetaOp *) arg)->object.this$)); | |
} | |
static PyObject *t_PostulateMetaOp_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, PostulateMetaOp::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_PostulateMetaOp_init_(t_PostulateMetaOp *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
PostulateMetaOp object((jobject) NULL); | |
INT_CALL(object = PostulateMetaOp()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ops::grid::OpDescriptor a0((jobject) NULL); | |
::org::nd4j::linalg::api::ops::grid::OpDescriptor a1((jobject) NULL); | |
PostulateMetaOp object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ops::grid::OpDescriptor::initializeClass, ::org::nd4j::linalg::api::ops::grid::OpDescriptor::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = PostulateMetaOp(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::TransformOp a0((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Accumulation a1((jobject) NULL); | |
PostulateMetaOp object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ops::TransformOp::initializeClass, ::org::nd4j::linalg::api::ops::Accumulation::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = PostulateMetaOp(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
PostulateMetaOp object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = PostulateMetaOp(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::ScalarOp a0((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Accumulation a1((jobject) NULL); | |
PostulateMetaOp object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ops::ScalarOp::initializeClass, ::org::nd4j::linalg::api::ops::Accumulation::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = PostulateMetaOp(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_PostulateMetaOp_name(t_PostulateMetaOp *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(PostulateMetaOp), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_PostulateMetaOp_opNum(t_PostulateMetaOp *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(PostulateMetaOp), (PyObject *) self, "opNum", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/compression/impl/Uint8.h" | |
#include "org/nd4j/linalg/compression/CompressionType.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace compression { | |
namespace impl { | |
::java::lang::Class *Uint8::class$ = NULL; | |
jmethodID *Uint8::mids$ = NULL; | |
bool Uint8::live$ = false; | |
jclass Uint8::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/compression/impl/Uint8"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_getCompressionType_720905ec] = env->getMethodID(cls, "getCompressionType", "()Lorg/nd4j/linalg/compression/CompressionType;"); | |
mids$[mid_getDescriptor_14c7b5c5] = env->getMethodID(cls, "getDescriptor", "()Ljava/lang/String;"); | |
mids$[mid_compressPointer_53d68b83] = env->getMethodID(cls, "compressPointer", "(Lorg/nd4j/linalg/api/buffer/DataBuffer$TypeEx;Lorg/bytedeco/javacpp/Pointer;II)Lorg/nd4j/linalg/compression/CompressedDataBuffer;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Uint8::Uint8() : ::org::nd4j::compression::impl::AbstractCompressor(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
::org::nd4j::linalg::compression::CompressionType Uint8::getCompressionType() const | |
{ | |
return ::org::nd4j::linalg::compression::CompressionType(env->callObjectMethod(this$, mids$[mid_getCompressionType_720905ec])); | |
} | |
::java::lang::String Uint8::getDescriptor() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_getDescriptor_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace compression { | |
namespace impl { | |
static PyObject *t_Uint8_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Uint8_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Uint8_init_(t_Uint8 *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Uint8_getCompressionType(t_Uint8 *self, PyObject *args); | |
static PyObject *t_Uint8_getDescriptor(t_Uint8 *self, PyObject *args); | |
static PyObject *t_Uint8_get__compressionType(t_Uint8 *self, void *data); | |
static PyObject *t_Uint8_get__descriptor(t_Uint8 *self, void *data); | |
static PyGetSetDef t_Uint8__fields_[] = { | |
DECLARE_GET_FIELD(t_Uint8, compressionType), | |
DECLARE_GET_FIELD(t_Uint8, descriptor), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Uint8__methods_[] = { | |
DECLARE_METHOD(t_Uint8, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Uint8, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Uint8, getCompressionType, METH_VARARGS), | |
DECLARE_METHOD(t_Uint8, getDescriptor, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Uint8, t_Uint8, ::org::nd4j::compression::impl::AbstractCompressor, Uint8, t_Uint8_init_, 0, 0, t_Uint8__fields_, 0, 0); | |
void t_Uint8::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Uint8), module, "Uint8", 0); | |
} | |
void t_Uint8::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Uint8).tp_dict, "class_", make_descriptor(Uint8::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Uint8).tp_dict, "wrapfn_", make_descriptor(t_Uint8::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Uint8).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Uint8_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Uint8::initializeClass, 1))) | |
return NULL; | |
return t_Uint8::wrap_Object(Uint8(((t_Uint8 *) arg)->object.this$)); | |
} | |
static PyObject *t_Uint8_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Uint8::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Uint8_init_(t_Uint8 *self, PyObject *args, PyObject *kwds) | |
{ | |
Uint8 object((jobject) NULL); | |
INT_CALL(object = Uint8()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_Uint8_getCompressionType(t_Uint8 *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::compression::CompressionType result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getCompressionType()); | |
return ::org::nd4j::linalg::compression::t_CompressionType::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(Uint8), (PyObject *) self, "getCompressionType", args, 2); | |
} | |
static PyObject *t_Uint8_getDescriptor(t_Uint8 *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getDescriptor()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Uint8), (PyObject *) self, "getDescriptor", args, 2); | |
} | |
static PyObject *t_Uint8_get__compressionType(t_Uint8 *self, void *data) | |
{ | |
::org::nd4j::linalg::compression::CompressionType value((jobject) NULL); | |
OBJ_CALL(value = self->object.getCompressionType()); | |
return ::org::nd4j::linalg::compression::t_CompressionType::wrap_Object(value); | |
} | |
static PyObject *t_Uint8_get__descriptor(t_Uint8 *self, void *data) | |
{ | |
::java::lang::String value((jobject) NULL); | |
OBJ_CALL(value = self->object.getDescriptor()); | |
return j2p(value); | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/transforms/Or.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/Number.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
::java::lang::Class *Or::class$ = NULL; | |
jmethodID *Or::mids$ = NULL; | |
bool Or::live$ = false; | |
jclass Or::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/transforms/Or"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_e22a7318] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Ljava/lang/Number;)V"); | |
mids$[mid_init$_4237560b] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_init$_fa4e6ed8] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_84295506] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Ljava/lang/Number;)V"); | |
mids$[mid_init$_321bc445] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_init$_7925b9a7] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Ljava/lang/Number;J)V"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Or::Or() : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
Or::Or(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
Or::Or(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::java::lang::Number & a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_e22a7318, a0.this$, a1.this$, a2.this$)) {} | |
Or::Or(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_4237560b, a0.this$, a1.this$, a2)) {} | |
Or::Or(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_fa4e6ed8, a0.this$, a1.this$, a2.this$)) {} | |
Or::Or(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, const ::java::lang::Number & a3) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_84295506, a0.this$, a1.this$, a2.this$, a3.this$)) {} | |
Or::Or(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_321bc445, a0.this$, a1.this$, a2.this$, a3)) {} | |
Or::Or(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, const ::java::lang::Number & a3, jlong a4) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_7925b9a7, a0.this$, a1.this$, a2.this$, a3.this$, a4)) {} | |
::java::lang::String Or::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jdouble Or::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jfloat Or::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble Or::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
jfloat Or::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op Or::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ops::Op Or::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
jint Or::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
static PyObject *t_Or_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Or_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Or_init_(t_Or *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Or_name(t_Or *self, PyObject *args); | |
static PyObject *t_Or_op(t_Or *self, PyObject *args); | |
static PyObject *t_Or_opForDimension(t_Or *self, PyObject *args); | |
static PyObject *t_Or_opNum(t_Or *self, PyObject *args); | |
static PyMethodDef t_Or__methods_[] = { | |
DECLARE_METHOD(t_Or, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Or, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Or, name, METH_VARARGS), | |
DECLARE_METHOD(t_Or, op, METH_VARARGS), | |
DECLARE_METHOD(t_Or, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_Or, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Or, t_Or, ::org::nd4j::linalg::api::ops::BaseTransformOp, Or, t_Or_init_, 0, 0, 0, 0, 0); | |
void t_Or::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Or), module, "Or", 0); | |
} | |
void t_Or::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Or).tp_dict, "class_", make_descriptor(Or::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Or).tp_dict, "wrapfn_", make_descriptor(t_Or::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Or).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Or_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Or::initializeClass, 1))) | |
return NULL; | |
return t_Or::wrap_Object(Or(((t_Or *) arg)->object.this$)); | |
} | |
static PyObject *t_Or_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Or::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Or_init_(t_Or *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
Or object((jobject) NULL); | |
INT_CALL(object = Or()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
Or object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = Or(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::java::lang::Number a2((jobject) NULL); | |
Or object((jobject) NULL); | |
if (!parseArgs(args, "kkO", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &::java::lang::PY_TYPE(Number), &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = Or(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
Or object((jobject) NULL); | |
if (!parseArgs(args, "kkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = Or(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
Or object((jobject) NULL); | |
if (!parseArgs(args, "kkk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = Or(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
::java::lang::Number a3((jobject) NULL); | |
Or object((jobject) NULL); | |
if (!parseArgs(args, "kkkO", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &::java::lang::PY_TYPE(Number), &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = Or(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
Or object((jobject) NULL); | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = Or(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 5: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
::java::lang::Number a3((jobject) NULL); | |
jlong a4; | |
Or object((jobject) NULL); | |
if (!parseArgs(args, "kkkOJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &::java::lang::PY_TYPE(Number), &a0, &a1, &a2, &a3, &a4)) | |
{ | |
INT_CALL(object = Or(a0, a1, a2, a3, a4)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_Or_name(t_Or *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Or), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_Or_op(t_Or *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Or), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_Or_opForDimension(t_Or *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Or), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_Or_opNum(t_Or *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Or), (PyObject *) self, "opNum", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/MinMaxStrategy.h" | |
#include "java/lang/Class.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/NormalizerStrategy.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/stats/NormalizerStats$Builder.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/stats/MinMaxStats.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace preprocessor { | |
::java::lang::Class *MinMaxStrategy::class$ = NULL; | |
jmethodID *MinMaxStrategy::mids$ = NULL; | |
bool MinMaxStrategy::live$ = false; | |
jclass MinMaxStrategy::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/dataset/api/preprocessor/MinMaxStrategy"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_b1e28678] = env->getMethodID(cls, "<init>", "(DD)V"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_getMaxRange_54c6a174] = env->getMethodID(cls, "getMaxRange", "()D"); | |
mids$[mid_getMinRange_54c6a174] = env->getMethodID(cls, "getMinRange", "()D"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_newStatsBuilder_0db41fcd] = env->getMethodID(cls, "newStatsBuilder", "()Lorg/nd4j/linalg/dataset/api/preprocessor/stats/NormalizerStats$Builder;"); | |
mids$[mid_preProcess_40983998] = env->getMethodID(cls, "preProcess", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/dataset/api/preprocessor/stats/MinMaxStats;)V"); | |
mids$[mid_revert_40983998] = env->getMethodID(cls, "revert", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/dataset/api/preprocessor/stats/MinMaxStats;)V"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
MinMaxStrategy::MinMaxStrategy() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
MinMaxStrategy::MinMaxStrategy(jdouble a0, jdouble a1) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_b1e28678, a0, a1)) {} | |
jboolean MinMaxStrategy::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
jdouble MinMaxStrategy::getMaxRange() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_getMaxRange_54c6a174]); | |
} | |
jdouble MinMaxStrategy::getMinRange() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_getMinRange_54c6a174]); | |
} | |
jint MinMaxStrategy::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
::org::nd4j::linalg::dataset::api::preprocessor::stats::NormalizerStats$Builder MinMaxStrategy::newStatsBuilder() const | |
{ | |
return ::org::nd4j::linalg::dataset::api::preprocessor::stats::NormalizerStats$Builder(env->callObjectMethod(this$, mids$[mid_newStatsBuilder_0db41fcd])); | |
} | |
void MinMaxStrategy::preProcess(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::dataset::api::preprocessor::stats::MinMaxStats & a2) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_preProcess_40983998], a0.this$, a1.this$, a2.this$); | |
} | |
void MinMaxStrategy::revert(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::dataset::api::preprocessor::stats::MinMaxStats & a2) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_revert_40983998], a0.this$, a1.this$, a2.this$); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace preprocessor { | |
static PyObject *t_MinMaxStrategy_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_MinMaxStrategy_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_MinMaxStrategy_init_(t_MinMaxStrategy *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_MinMaxStrategy_equals(t_MinMaxStrategy *self, PyObject *args); | |
static PyObject *t_MinMaxStrategy_getMaxRange(t_MinMaxStrategy *self); | |
static PyObject *t_MinMaxStrategy_getMinRange(t_MinMaxStrategy *self); | |
static PyObject *t_MinMaxStrategy_hashCode(t_MinMaxStrategy *self, PyObject *args); | |
static PyObject *t_MinMaxStrategy_newStatsBuilder(t_MinMaxStrategy *self); | |
static PyObject *t_MinMaxStrategy_preProcess(t_MinMaxStrategy *self, PyObject *args); | |
static PyObject *t_MinMaxStrategy_revert(t_MinMaxStrategy *self, PyObject *args); | |
static PyObject *t_MinMaxStrategy_get__maxRange(t_MinMaxStrategy *self, void *data); | |
static PyObject *t_MinMaxStrategy_get__minRange(t_MinMaxStrategy *self, void *data); | |
static PyGetSetDef t_MinMaxStrategy__fields_[] = { | |
DECLARE_GET_FIELD(t_MinMaxStrategy, maxRange), | |
DECLARE_GET_FIELD(t_MinMaxStrategy, minRange), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_MinMaxStrategy__methods_[] = { | |
DECLARE_METHOD(t_MinMaxStrategy, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_MinMaxStrategy, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_MinMaxStrategy, equals, METH_VARARGS), | |
DECLARE_METHOD(t_MinMaxStrategy, getMaxRange, METH_NOARGS), | |
DECLARE_METHOD(t_MinMaxStrategy, getMinRange, METH_NOARGS), | |
DECLARE_METHOD(t_MinMaxStrategy, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_MinMaxStrategy, newStatsBuilder, METH_NOARGS), | |
DECLARE_METHOD(t_MinMaxStrategy, preProcess, METH_VARARGS), | |
DECLARE_METHOD(t_MinMaxStrategy, revert, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(MinMaxStrategy, t_MinMaxStrategy, ::java::lang::Object, MinMaxStrategy, t_MinMaxStrategy_init_, 0, 0, t_MinMaxStrategy__fields_, 0, 0); | |
void t_MinMaxStrategy::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(MinMaxStrategy), module, "MinMaxStrategy", 0); | |
} | |
void t_MinMaxStrategy::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(MinMaxStrategy).tp_dict, "class_", make_descriptor(MinMaxStrategy::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(MinMaxStrategy).tp_dict, "wrapfn_", make_descriptor(t_MinMaxStrategy::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(MinMaxStrategy).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_MinMaxStrategy_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, MinMaxStrategy::initializeClass, 1))) | |
return NULL; | |
return t_MinMaxStrategy::wrap_Object(MinMaxStrategy(((t_MinMaxStrategy *) arg)->object.this$)); | |
} | |
static PyObject *t_MinMaxStrategy_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, MinMaxStrategy::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_MinMaxStrategy_init_(t_MinMaxStrategy *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
MinMaxStrategy object((jobject) NULL); | |
INT_CALL(object = MinMaxStrategy()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
MinMaxStrategy object((jobject) NULL); | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
INT_CALL(object = MinMaxStrategy(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_MinMaxStrategy_equals(t_MinMaxStrategy *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(MinMaxStrategy), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_MinMaxStrategy_getMaxRange(t_MinMaxStrategy *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.getMaxRange()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_MinMaxStrategy_getMinRange(t_MinMaxStrategy *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.getMinRange()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_MinMaxStrategy_hashCode(t_MinMaxStrategy *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(MinMaxStrategy), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_MinMaxStrategy_newStatsBuilder(t_MinMaxStrategy *self) | |
{ | |
::org::nd4j::linalg::dataset::api::preprocessor::stats::NormalizerStats$Builder result((jobject) NULL); | |
OBJ_CALL(result = self->object.newStatsBuilder()); | |
return ::org::nd4j::linalg::dataset::api::preprocessor::stats::t_NormalizerStats$Builder::wrap_Object(result); | |
} | |
static PyObject *t_MinMaxStrategy_preProcess(t_MinMaxStrategy *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::dataset::api::preprocessor::stats::MinMaxStats a2((jobject) NULL); | |
if (!parseArgs(args, "kkk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::dataset::api::preprocessor::stats::MinMaxStats::initializeClass, &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(self->object.preProcess(a0, a1, a2)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "preProcess", args); | |
return NULL; | |
} | |
static PyObject *t_MinMaxStrategy_revert(t_MinMaxStrategy *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::dataset::api::preprocessor::stats::MinMaxStats a2((jobject) NULL); | |
if (!parseArgs(args, "kkk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::dataset::api::preprocessor::stats::MinMaxStats::initializeClass, &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(self->object.revert(a0, a1, a2)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "revert", args); | |
return NULL; | |
} | |
static PyObject *t_MinMaxStrategy_get__maxRange(t_MinMaxStrategy *self, void *data) | |
{ | |
jdouble value; | |
OBJ_CALL(value = self->object.getMaxRange()); | |
return PyFloat_FromDouble((double) value); | |
} | |
static PyObject *t_MinMaxStrategy_get__minRange(t_MinMaxStrategy *self, void *data) | |
{ | |
jdouble value; | |
OBJ_CALL(value = self->object.getMinRange()); | |
return PyFloat_FromDouble((double) value); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/stats/NormalizerStats$Builder.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/stats/NormalizerStats.h" | |
#include "org/nd4j/linalg/dataset/api/DataSet.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace preprocessor { | |
namespace stats { | |
::java::lang::Class *NormalizerStats$Builder::class$ = NULL; | |
jmethodID *NormalizerStats$Builder::mids$ = NULL; | |
bool NormalizerStats$Builder::live$ = false; | |
jclass NormalizerStats$Builder::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/dataset/api/preprocessor/stats/NormalizerStats$Builder"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_add_0b7d4d21] = env->getMethodID(cls, "add", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)Lorg/nd4j/linalg/dataset/api/preprocessor/stats/NormalizerStats$Builder;"); | |
mids$[mid_addFeatures_0c558a1d] = env->getMethodID(cls, "addFeatures", "(Lorg/nd4j/linalg/dataset/api/DataSet;)Lorg/nd4j/linalg/dataset/api/preprocessor/stats/NormalizerStats$Builder;"); | |
mids$[mid_addLabels_0c558a1d] = env->getMethodID(cls, "addLabels", "(Lorg/nd4j/linalg/dataset/api/DataSet;)Lorg/nd4j/linalg/dataset/api/preprocessor/stats/NormalizerStats$Builder;"); | |
mids$[mid_build_8a6b5cce] = env->getMethodID(cls, "build", "()Lorg/nd4j/linalg/dataset/api/preprocessor/stats/NormalizerStats;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
NormalizerStats$Builder NormalizerStats$Builder::add(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) const | |
{ | |
return NormalizerStats$Builder(env->callObjectMethod(this$, mids$[mid_add_0b7d4d21], a0.this$, a1.this$)); | |
} | |
NormalizerStats$Builder NormalizerStats$Builder::addFeatures(const ::org::nd4j::linalg::dataset::api::DataSet & a0) const | |
{ | |
return NormalizerStats$Builder(env->callObjectMethod(this$, mids$[mid_addFeatures_0c558a1d], a0.this$)); | |
} | |
NormalizerStats$Builder NormalizerStats$Builder::addLabels(const ::org::nd4j::linalg::dataset::api::DataSet & a0) const | |
{ | |
return NormalizerStats$Builder(env->callObjectMethod(this$, mids$[mid_addLabels_0c558a1d], a0.this$)); | |
} | |
::org::nd4j::linalg::dataset::api::preprocessor::stats::NormalizerStats NormalizerStats$Builder::build() const | |
{ | |
return ::org::nd4j::linalg::dataset::api::preprocessor::stats::NormalizerStats(env->callObjectMethod(this$, mids$[mid_build_8a6b5cce])); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace preprocessor { | |
namespace stats { | |
static PyObject *t_NormalizerStats$Builder_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_NormalizerStats$Builder_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_NormalizerStats$Builder_of_(t_NormalizerStats$Builder *self, PyObject *args); | |
static PyObject *t_NormalizerStats$Builder_add(t_NormalizerStats$Builder *self, PyObject *args); | |
static PyObject *t_NormalizerStats$Builder_addFeatures(t_NormalizerStats$Builder *self, PyObject *arg); | |
static PyObject *t_NormalizerStats$Builder_addLabels(t_NormalizerStats$Builder *self, PyObject *arg); | |
static PyObject *t_NormalizerStats$Builder_build(t_NormalizerStats$Builder *self); | |
static PyObject *t_NormalizerStats$Builder_get__parameters_(t_NormalizerStats$Builder *self, void *data); | |
static PyGetSetDef t_NormalizerStats$Builder__fields_[] = { | |
DECLARE_GET_FIELD(t_NormalizerStats$Builder, parameters_), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_NormalizerStats$Builder__methods_[] = { | |
DECLARE_METHOD(t_NormalizerStats$Builder, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_NormalizerStats$Builder, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_NormalizerStats$Builder, of_, METH_VARARGS), | |
DECLARE_METHOD(t_NormalizerStats$Builder, add, METH_VARARGS), | |
DECLARE_METHOD(t_NormalizerStats$Builder, addFeatures, METH_O), | |
DECLARE_METHOD(t_NormalizerStats$Builder, addLabels, METH_O), | |
DECLARE_METHOD(t_NormalizerStats$Builder, build, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(NormalizerStats$Builder, t_NormalizerStats$Builder, ::java::lang::Object, NormalizerStats$Builder, abstract_init, 0, 0, t_NormalizerStats$Builder__fields_, 0, 0); | |
PyObject *t_NormalizerStats$Builder::wrap_Object(const NormalizerStats$Builder& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_NormalizerStats$Builder::wrap_Object(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_NormalizerStats$Builder *self = (t_NormalizerStats$Builder *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
PyObject *t_NormalizerStats$Builder::wrap_jobject(const jobject& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_NormalizerStats$Builder::wrap_jobject(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_NormalizerStats$Builder *self = (t_NormalizerStats$Builder *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
void t_NormalizerStats$Builder::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(NormalizerStats$Builder), module, "NormalizerStats$Builder", 0); | |
} | |
void t_NormalizerStats$Builder::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(NormalizerStats$Builder).tp_dict, "class_", make_descriptor(NormalizerStats$Builder::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(NormalizerStats$Builder).tp_dict, "wrapfn_", make_descriptor(t_NormalizerStats$Builder::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(NormalizerStats$Builder).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_NormalizerStats$Builder_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, NormalizerStats$Builder::initializeClass, 1))) | |
return NULL; | |
return t_NormalizerStats$Builder::wrap_Object(NormalizerStats$Builder(((t_NormalizerStats$Builder *) arg)->object.this$)); | |
} | |
static PyObject *t_NormalizerStats$Builder_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, NormalizerStats$Builder::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_NormalizerStats$Builder_of_(t_NormalizerStats$Builder *self, PyObject *args) | |
{ | |
if (!parseArg(args, "T", 1, &(self->parameters))) | |
Py_RETURN_SELF; | |
return PyErr_SetArgsError((PyObject *) self, "of_", args); | |
} | |
static PyObject *t_NormalizerStats$Builder_add(t_NormalizerStats$Builder *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
NormalizerStats$Builder result((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.add(a0, a1)); | |
return t_NormalizerStats$Builder::wrap_Object(result, self->parameters[0]); | |
} | |
PyErr_SetArgsError((PyObject *) self, "add", args); | |
return NULL; | |
} | |
static PyObject *t_NormalizerStats$Builder_addFeatures(t_NormalizerStats$Builder *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::dataset::api::DataSet a0((jobject) NULL); | |
NormalizerStats$Builder result((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::dataset::api::DataSet::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.addFeatures(a0)); | |
return t_NormalizerStats$Builder::wrap_Object(result, self->parameters[0]); | |
} | |
PyErr_SetArgsError((PyObject *) self, "addFeatures", arg); | |
return NULL; | |
} | |
static PyObject *t_NormalizerStats$Builder_addLabels(t_NormalizerStats$Builder *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::dataset::api::DataSet a0((jobject) NULL); | |
NormalizerStats$Builder result((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::dataset::api::DataSet::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.addLabels(a0)); | |
return t_NormalizerStats$Builder::wrap_Object(result, self->parameters[0]); | |
} | |
PyErr_SetArgsError((PyObject *) self, "addLabels", arg); | |
return NULL; | |
} | |
static PyObject *t_NormalizerStats$Builder_build(t_NormalizerStats$Builder *self) | |
{ | |
::org::nd4j::linalg::dataset::api::preprocessor::stats::NormalizerStats result((jobject) NULL); | |
OBJ_CALL(result = self->object.build()); | |
return self->parameters[0] != NULL ? wrapType(self->parameters[0], result.this$) : ::org::nd4j::linalg::dataset::api::preprocessor::stats::t_NormalizerStats::wrap_Object(result); | |
} | |
static PyObject *t_NormalizerStats$Builder_get__parameters_(t_NormalizerStats$Builder *self, void *data) | |
{ | |
return typeParameters(self->parameters, sizeof(self->parameters)); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/transforms/Set.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
::java::lang::Class *Set::class$ = NULL; | |
jmethodID *Set::mids$ = NULL; | |
bool Set::live$ = false; | |
jclass Set::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/transforms/Set"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_4237560b] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_init$_321bc445] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Set::Set() : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
Set::Set(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
Set::Set(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
Set::Set(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_4237560b, a0.this$, a1.this$, a2)) {} | |
Set::Set(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_321bc445, a0.this$, a1.this$, a2.this$, a3)) {} | |
::java::lang::String Set::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jfloat Set::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble Set::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jdouble Set::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
jfloat Set::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op Set::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
::org::nd4j::linalg::api::ops::Op Set::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
jint Set::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
static PyObject *t_Set_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Set_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Set_init_(t_Set *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Set_name(t_Set *self, PyObject *args); | |
static PyObject *t_Set_op(t_Set *self, PyObject *args); | |
static PyObject *t_Set_opForDimension(t_Set *self, PyObject *args); | |
static PyObject *t_Set_opNum(t_Set *self, PyObject *args); | |
static PyMethodDef t_Set__methods_[] = { | |
DECLARE_METHOD(t_Set, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Set, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Set, name, METH_VARARGS), | |
DECLARE_METHOD(t_Set, op, METH_VARARGS), | |
DECLARE_METHOD(t_Set, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_Set, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Set, t_Set, ::org::nd4j::linalg::api::ops::BaseTransformOp, Set, t_Set_init_, 0, 0, 0, 0, 0); | |
void t_Set::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Set), module, "Set", 0); | |
} | |
void t_Set::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Set).tp_dict, "class_", make_descriptor(Set::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Set).tp_dict, "wrapfn_", make_descriptor(t_Set::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Set).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Set_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Set::initializeClass, 1))) | |
return NULL; | |
return t_Set::wrap_Object(Set(((t_Set *) arg)->object.this$)); | |
} | |
static PyObject *t_Set_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Set::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Set_init_(t_Set *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
Set object((jobject) NULL); | |
INT_CALL(object = Set()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
Set object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = Set(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
Set object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = Set(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
Set object((jobject) NULL); | |
if (!parseArgs(args, "kkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = Set(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
Set object((jobject) NULL); | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = Set(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_Set_name(t_Set *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Set), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_Set_op(t_Set *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Set), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_Set_opForDimension(t_Set *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Set), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_Set_opNum(t_Set *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Set), (PyObject *) self, "opNum", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/lossfunctions/impl/LossNegativeLogLikelihood.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace lossfunctions { | |
namespace impl { | |
::java::lang::Class *LossNegativeLogLikelihood::class$ = NULL; | |
jmethodID *LossNegativeLogLikelihood::mids$ = NULL; | |
bool LossNegativeLogLikelihood::live$ = false; | |
jclass LossNegativeLogLikelihood::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/lossfunctions/impl/LossNegativeLogLikelihood"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
LossNegativeLogLikelihood::LossNegativeLogLikelihood() : ::org::nd4j::linalg::lossfunctions::impl::LossMCXENT(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
LossNegativeLogLikelihood::LossNegativeLogLikelihood(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::lossfunctions::impl::LossMCXENT(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
::java::lang::String LossNegativeLogLikelihood::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace lossfunctions { | |
namespace impl { | |
static PyObject *t_LossNegativeLogLikelihood_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_LossNegativeLogLikelihood_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_LossNegativeLogLikelihood_init_(t_LossNegativeLogLikelihood *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_LossNegativeLogLikelihood_toString(t_LossNegativeLogLikelihood *self, PyObject *args); | |
static PyMethodDef t_LossNegativeLogLikelihood__methods_[] = { | |
DECLARE_METHOD(t_LossNegativeLogLikelihood, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_LossNegativeLogLikelihood, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_LossNegativeLogLikelihood, toString, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(LossNegativeLogLikelihood, t_LossNegativeLogLikelihood, ::org::nd4j::linalg::lossfunctions::impl::LossMCXENT, LossNegativeLogLikelihood, t_LossNegativeLogLikelihood_init_, 0, 0, 0, 0, 0); | |
void t_LossNegativeLogLikelihood::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(LossNegativeLogLikelihood), module, "LossNegativeLogLikelihood", 0); | |
} | |
void t_LossNegativeLogLikelihood::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(LossNegativeLogLikelihood).tp_dict, "class_", make_descriptor(LossNegativeLogLikelihood::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(LossNegativeLogLikelihood).tp_dict, "wrapfn_", make_descriptor(t_LossNegativeLogLikelihood::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(LossNegativeLogLikelihood).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_LossNegativeLogLikelihood_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, LossNegativeLogLikelihood::initializeClass, 1))) | |
return NULL; | |
return t_LossNegativeLogLikelihood::wrap_Object(LossNegativeLogLikelihood(((t_LossNegativeLogLikelihood *) arg)->object.this$)); | |
} | |
static PyObject *t_LossNegativeLogLikelihood_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, LossNegativeLogLikelihood::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_LossNegativeLogLikelihood_init_(t_LossNegativeLogLikelihood *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
LossNegativeLogLikelihood object((jobject) NULL); | |
INT_CALL(object = LossNegativeLogLikelihood()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
LossNegativeLogLikelihood object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = LossNegativeLogLikelihood(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_LossNegativeLogLikelihood_toString(t_LossNegativeLogLikelihood *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(LossNegativeLogLikelihood), (PyObject *) self, "toString", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/lossfunctions/impl/LossBinaryXENT.h" | |
#include "java/lang/Class.h" | |
#include "org/nd4j/linalg/lossfunctions/ILossFunction.h" | |
#include "org/nd4j/linalg/activations/IActivation.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace lossfunctions { | |
namespace impl { | |
::java::lang::Class *LossBinaryXENT::class$ = NULL; | |
jmethodID *LossBinaryXENT::mids$ = NULL; | |
bool LossBinaryXENT::live$ = false; | |
jclass LossBinaryXENT::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/lossfunctions/impl/LossBinaryXENT"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_computeGradient_de5850f8] = env->getMethodID(cls, "computeGradient", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/activations/IActivation;Lorg/nd4j/linalg/api/ndarray/INDArray;)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_computeScore_9884c448] = env->getMethodID(cls, "computeScore", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/activations/IActivation;Lorg/nd4j/linalg/api/ndarray/INDArray;Z)D"); | |
mids$[mid_computeScoreArray_de5850f8] = env->getMethodID(cls, "computeScoreArray", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/activations/IActivation;Lorg/nd4j/linalg/api/ndarray/INDArray;)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_getWeights_eef1d225] = env->getMethodID(cls, "getWeights", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
LossBinaryXENT::LossBinaryXENT() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
LossBinaryXENT::LossBinaryXENT(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
::org::nd4j::linalg::api::ndarray::INDArray LossBinaryXENT::computeGradient(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::activations::IActivation & a2, const ::org::nd4j::linalg::api::ndarray::INDArray & a3) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_computeGradient_de5850f8], a0.this$, a1.this$, a2.this$, a3.this$)); | |
} | |
jdouble LossBinaryXENT::computeScore(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::activations::IActivation & a2, const ::org::nd4j::linalg::api::ndarray::INDArray & a3, jboolean a4) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_computeScore_9884c448], a0.this$, a1.this$, a2.this$, a3.this$, a4); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray LossBinaryXENT::computeScoreArray(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::activations::IActivation & a2, const ::org::nd4j::linalg::api::ndarray::INDArray & a3) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_computeScoreArray_de5850f8], a0.this$, a1.this$, a2.this$, a3.this$)); | |
} | |
jboolean LossBinaryXENT::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray LossBinaryXENT::getWeights() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getWeights_eef1d225])); | |
} | |
jint LossBinaryXENT::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
::java::lang::String LossBinaryXENT::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace lossfunctions { | |
namespace impl { | |
static PyObject *t_LossBinaryXENT_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_LossBinaryXENT_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_LossBinaryXENT_init_(t_LossBinaryXENT *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_LossBinaryXENT_computeGradient(t_LossBinaryXENT *self, PyObject *args); | |
static PyObject *t_LossBinaryXENT_computeScore(t_LossBinaryXENT *self, PyObject *args); | |
static PyObject *t_LossBinaryXENT_computeScoreArray(t_LossBinaryXENT *self, PyObject *args); | |
static PyObject *t_LossBinaryXENT_equals(t_LossBinaryXENT *self, PyObject *args); | |
static PyObject *t_LossBinaryXENT_getWeights(t_LossBinaryXENT *self); | |
static PyObject *t_LossBinaryXENT_hashCode(t_LossBinaryXENT *self, PyObject *args); | |
static PyObject *t_LossBinaryXENT_toString(t_LossBinaryXENT *self, PyObject *args); | |
static PyObject *t_LossBinaryXENT_get__weights(t_LossBinaryXENT *self, void *data); | |
static PyGetSetDef t_LossBinaryXENT__fields_[] = { | |
DECLARE_GET_FIELD(t_LossBinaryXENT, weights), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_LossBinaryXENT__methods_[] = { | |
DECLARE_METHOD(t_LossBinaryXENT, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_LossBinaryXENT, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_LossBinaryXENT, computeGradient, METH_VARARGS), | |
DECLARE_METHOD(t_LossBinaryXENT, computeScore, METH_VARARGS), | |
DECLARE_METHOD(t_LossBinaryXENT, computeScoreArray, METH_VARARGS), | |
DECLARE_METHOD(t_LossBinaryXENT, equals, METH_VARARGS), | |
DECLARE_METHOD(t_LossBinaryXENT, getWeights, METH_NOARGS), | |
DECLARE_METHOD(t_LossBinaryXENT, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_LossBinaryXENT, toString, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(LossBinaryXENT, t_LossBinaryXENT, ::java::lang::Object, LossBinaryXENT, t_LossBinaryXENT_init_, 0, 0, t_LossBinaryXENT__fields_, 0, 0); | |
void t_LossBinaryXENT::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(LossBinaryXENT), module, "LossBinaryXENT", 0); | |
} | |
void t_LossBinaryXENT::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(LossBinaryXENT).tp_dict, "class_", make_descriptor(LossBinaryXENT::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(LossBinaryXENT).tp_dict, "wrapfn_", make_descriptor(t_LossBinaryXENT::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(LossBinaryXENT).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_LossBinaryXENT_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, LossBinaryXENT::initializeClass, 1))) | |
return NULL; | |
return t_LossBinaryXENT::wrap_Object(LossBinaryXENT(((t_LossBinaryXENT *) arg)->object.this$)); | |
} | |
static PyObject *t_LossBinaryXENT_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, LossBinaryXENT::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_LossBinaryXENT_init_(t_LossBinaryXENT *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
LossBinaryXENT object((jobject) NULL); | |
INT_CALL(object = LossBinaryXENT()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
LossBinaryXENT object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = LossBinaryXENT(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_LossBinaryXENT_computeGradient(t_LossBinaryXENT *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::activations::IActivation a2((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a3((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "kkkk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::activations::IActivation::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
OBJ_CALL(result = self->object.computeGradient(a0, a1, a2, a3)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "computeGradient", args); | |
return NULL; | |
} | |
static PyObject *t_LossBinaryXENT_computeScore(t_LossBinaryXENT *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::activations::IActivation a2((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a3((jobject) NULL); | |
jboolean a4; | |
jdouble result; | |
if (!parseArgs(args, "kkkkZ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::activations::IActivation::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3, &a4)) | |
{ | |
OBJ_CALL(result = self->object.computeScore(a0, a1, a2, a3, a4)); | |
return PyFloat_FromDouble((double) result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "computeScore", args); | |
return NULL; | |
} | |
static PyObject *t_LossBinaryXENT_computeScoreArray(t_LossBinaryXENT *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::activations::IActivation a2((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a3((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "kkkk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::activations::IActivation::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
OBJ_CALL(result = self->object.computeScoreArray(a0, a1, a2, a3)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "computeScoreArray", args); | |
return NULL; | |
} | |
static PyObject *t_LossBinaryXENT_equals(t_LossBinaryXENT *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(LossBinaryXENT), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_LossBinaryXENT_getWeights(t_LossBinaryXENT *self) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
OBJ_CALL(result = self->object.getWeights()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
static PyObject *t_LossBinaryXENT_hashCode(t_LossBinaryXENT *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(LossBinaryXENT), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_LossBinaryXENT_toString(t_LossBinaryXENT *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(LossBinaryXENT), (PyObject *) self, "toString", args, 2); | |
} | |
static PyObject *t_LossBinaryXENT_get__weights(t_LossBinaryXENT *self, void *data) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
OBJ_CALL(value = self->object.getWeights()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(value); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/profiler/data/StringAggregator.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace profiler { | |
namespace data { | |
::java::lang::Class *StringAggregator::class$ = NULL; | |
jmethodID *StringAggregator::mids$ = NULL; | |
bool StringAggregator::live$ = false; | |
jclass StringAggregator::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/profiler/data/StringAggregator"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_asPercentageString_14c7b5c5] = env->getMethodID(cls, "asPercentageString", "()Ljava/lang/String;"); | |
mids$[mid_asString_14c7b5c5] = env->getMethodID(cls, "asString", "()Ljava/lang/String;"); | |
mids$[mid_putTime_4372eed5] = env->getMethodID(cls, "putTime", "(Ljava/lang/String;J)V"); | |
mids$[mid_putTime_b280c629] = env->getMethodID(cls, "putTime", "(Ljava/lang/String;Lorg/nd4j/linalg/api/ops/Op;J)V"); | |
mids$[mid_reset_54c6a166] = env->getMethodID(cls, "reset", "()V"); | |
mids$[mid_getSum_5fdc3f54] = env->getMethodID(cls, "getSum", "(Ljava/lang/String;)J"); | |
mids$[mid_getAverage_5fdc3f54] = env->getMethodID(cls, "getAverage", "(Ljava/lang/String;)J"); | |
mids$[mid_getMedian_5fdc3f54] = env->getMethodID(cls, "getMedian", "(Ljava/lang/String;)J"); | |
mids$[mid_getMinimum_5fdc3f54] = env->getMethodID(cls, "getMinimum", "(Ljava/lang/String;)J"); | |
mids$[mid_getMaximum_5fdc3f54] = env->getMethodID(cls, "getMaximum", "(Ljava/lang/String;)J"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
StringAggregator::StringAggregator() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
::java::lang::String StringAggregator::asPercentageString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_asPercentageString_14c7b5c5])); | |
} | |
::java::lang::String StringAggregator::asString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_asString_14c7b5c5])); | |
} | |
void StringAggregator::putTime(const ::java::lang::String & a0, jlong a1) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_putTime_4372eed5], a0.this$, a1); | |
} | |
void StringAggregator::putTime(const ::java::lang::String & a0, const ::org::nd4j::linalg::api::ops::Op & a1, jlong a2) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_putTime_b280c629], a0.this$, a1.this$, a2); | |
} | |
void StringAggregator::reset() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_reset_54c6a166]); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace profiler { | |
namespace data { | |
static PyObject *t_StringAggregator_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_StringAggregator_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_StringAggregator_init_(t_StringAggregator *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_StringAggregator_asPercentageString(t_StringAggregator *self); | |
static PyObject *t_StringAggregator_asString(t_StringAggregator *self); | |
static PyObject *t_StringAggregator_putTime(t_StringAggregator *self, PyObject *args); | |
static PyObject *t_StringAggregator_reset(t_StringAggregator *self); | |
static PyMethodDef t_StringAggregator__methods_[] = { | |
DECLARE_METHOD(t_StringAggregator, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_StringAggregator, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_StringAggregator, asPercentageString, METH_NOARGS), | |
DECLARE_METHOD(t_StringAggregator, asString, METH_NOARGS), | |
DECLARE_METHOD(t_StringAggregator, putTime, METH_VARARGS), | |
DECLARE_METHOD(t_StringAggregator, reset, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(StringAggregator, t_StringAggregator, ::java::lang::Object, StringAggregator, t_StringAggregator_init_, 0, 0, 0, 0, 0); | |
void t_StringAggregator::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(StringAggregator), module, "StringAggregator", 0); | |
} | |
void t_StringAggregator::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(StringAggregator).tp_dict, "class_", make_descriptor(StringAggregator::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(StringAggregator).tp_dict, "wrapfn_", make_descriptor(t_StringAggregator::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(StringAggregator).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_StringAggregator_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, StringAggregator::initializeClass, 1))) | |
return NULL; | |
return t_StringAggregator::wrap_Object(StringAggregator(((t_StringAggregator *) arg)->object.this$)); | |
} | |
static PyObject *t_StringAggregator_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, StringAggregator::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_StringAggregator_init_(t_StringAggregator *self, PyObject *args, PyObject *kwds) | |
{ | |
StringAggregator object((jobject) NULL); | |
INT_CALL(object = StringAggregator()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_StringAggregator_asPercentageString(t_StringAggregator *self) | |
{ | |
::java::lang::String result((jobject) NULL); | |
OBJ_CALL(result = self->object.asPercentageString()); | |
return j2p(result); | |
} | |
static PyObject *t_StringAggregator_asString(t_StringAggregator *self) | |
{ | |
::java::lang::String result((jobject) NULL); | |
OBJ_CALL(result = self->object.asString()); | |
return j2p(result); | |
} | |
static PyObject *t_StringAggregator_putTime(t_StringAggregator *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
::java::lang::String a0((jobject) NULL); | |
jlong a1; | |
if (!parseArgs(args, "sJ", &a0, &a1)) | |
{ | |
OBJ_CALL(self->object.putTime(a0, a1)); | |
Py_RETURN_NONE; | |
} | |
} | |
break; | |
case 3: | |
{ | |
::java::lang::String a0((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op a1((jobject) NULL); | |
jlong a2; | |
if (!parseArgs(args, "skJ", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(self->object.putTime(a0, a1, a2)); | |
Py_RETURN_NONE; | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "putTime", args); | |
return NULL; | |
} | |
static PyObject *t_StringAggregator_reset(t_StringAggregator *self) | |
{ | |
OBJ_CALL(self->object.reset()); | |
Py_RETURN_NONE; | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/transforms/Round.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
::java::lang::Class *Round::class$ = NULL; | |
jmethodID *Round::mids$ = NULL; | |
bool Round::live$ = false; | |
jclass Round::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/transforms/Round"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_4237560b] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_init$_321bc445] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Round::Round() : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
Round::Round(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
Round::Round(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
Round::Round(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_4237560b, a0.this$, a1.this$, a2)) {} | |
Round::Round(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_321bc445, a0.this$, a1.this$, a2.this$, a3)) {} | |
::java::lang::String Round::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jfloat Round::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble Round::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jdouble Round::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
jfloat Round::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op Round::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
::org::nd4j::linalg::api::ops::Op Round::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
jint Round::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
static PyObject *t_Round_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Round_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Round_init_(t_Round *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Round_name(t_Round *self, PyObject *args); | |
static PyObject *t_Round_op(t_Round *self, PyObject *args); | |
static PyObject *t_Round_opForDimension(t_Round *self, PyObject *args); | |
static PyObject *t_Round_opNum(t_Round *self, PyObject *args); | |
static PyMethodDef t_Round__methods_[] = { | |
DECLARE_METHOD(t_Round, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Round, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Round, name, METH_VARARGS), | |
DECLARE_METHOD(t_Round, op, METH_VARARGS), | |
DECLARE_METHOD(t_Round, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_Round, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Round, t_Round, ::org::nd4j::linalg::api::ops::BaseTransformOp, Round, t_Round_init_, 0, 0, 0, 0, 0); | |
void t_Round::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Round), module, "Round", 0); | |
} | |
void t_Round::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Round).tp_dict, "class_", make_descriptor(Round::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Round).tp_dict, "wrapfn_", make_descriptor(t_Round::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Round).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Round_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Round::initializeClass, 1))) | |
return NULL; | |
return t_Round::wrap_Object(Round(((t_Round *) arg)->object.this$)); | |
} | |
static PyObject *t_Round_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Round::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Round_init_(t_Round *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
Round object((jobject) NULL); | |
INT_CALL(object = Round()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
Round object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = Round(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
Round object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = Round(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
Round object((jobject) NULL); | |
if (!parseArgs(args, "kkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = Round(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
Round object((jobject) NULL); | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = Round(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_Round_name(t_Round *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Round), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_Round_op(t_Round *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Round), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_Round_opForDimension(t_Round *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Round), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_Round_opNum(t_Round *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Round), (PyObject *) self, "opNum", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/transforms/VectorFFT.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
::java::lang::Class *VectorFFT::class$ = NULL; | |
jmethodID *VectorFFT::mids$ = NULL; | |
bool VectorFFT::live$ = false; | |
jclass VectorFFT::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/transforms/VectorFFT"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_84a4e6fa] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;I)V"); | |
mids$[mid_init$_6d1833f8] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;I)V"); | |
mids$[mid_init$_c0c12f4b] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;JI)V"); | |
mids$[mid_init$_6a3839e5] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;JI)V"); | |
mids$[mid_exec_54c6a166] = env->getMethodID(cls, "exec", "()V"); | |
mids$[mid_isPassThrough_54c6a16a] = env->getMethodID(cls, "isPassThrough", "()Z"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
mids$[mid_setX_97661d74] = env->getMethodID(cls, "setX", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_setY_97661d74] = env->getMethodID(cls, "setY", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_setZ_97661d74] = env->getMethodID(cls, "setZ", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
VectorFFT::VectorFFT() : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
VectorFFT::VectorFFT(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
VectorFFT::VectorFFT(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, jint a1) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_84a4e6fa, a0.this$, a1)) {} | |
VectorFFT::VectorFFT(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jint a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_6d1833f8, a0.this$, a1.this$, a2)) {} | |
VectorFFT::VectorFFT(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2, jint a3) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_c0c12f4b, a0.this$, a1.this$, a2, a3)) {} | |
VectorFFT::VectorFFT(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3, jint a4) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_6a3839e5, a0.this$, a1.this$, a2.this$, a3, a4)) {} | |
void VectorFFT::exec() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_54c6a166]); | |
} | |
jboolean VectorFFT::isPassThrough() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isPassThrough_54c6a16a]); | |
} | |
::java::lang::String VectorFFT::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jdouble VectorFFT::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jfloat VectorFFT::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble VectorFFT::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
jfloat VectorFFT::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op VectorFFT::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ops::Op VectorFFT::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
jint VectorFFT::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
void VectorFFT::setX(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setX_97661d74], a0.this$); | |
} | |
void VectorFFT::setY(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setY_97661d74], a0.this$); | |
} | |
void VectorFFT::setZ(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setZ_97661d74], a0.this$); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
static PyObject *t_VectorFFT_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_VectorFFT_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_VectorFFT_init_(t_VectorFFT *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_VectorFFT_exec(t_VectorFFT *self, PyObject *args); | |
static PyObject *t_VectorFFT_isPassThrough(t_VectorFFT *self, PyObject *args); | |
static PyObject *t_VectorFFT_name(t_VectorFFT *self, PyObject *args); | |
static PyObject *t_VectorFFT_op(t_VectorFFT *self, PyObject *args); | |
static PyObject *t_VectorFFT_opForDimension(t_VectorFFT *self, PyObject *args); | |
static PyObject *t_VectorFFT_opNum(t_VectorFFT *self, PyObject *args); | |
static PyObject *t_VectorFFT_setX(t_VectorFFT *self, PyObject *args); | |
static PyObject *t_VectorFFT_setY(t_VectorFFT *self, PyObject *args); | |
static PyObject *t_VectorFFT_setZ(t_VectorFFT *self, PyObject *args); | |
static PyObject *t_VectorFFT_get__passThrough(t_VectorFFT *self, void *data); | |
static int t_VectorFFT_set__x(t_VectorFFT *self, PyObject *arg, void *data); | |
static int t_VectorFFT_set__y(t_VectorFFT *self, PyObject *arg, void *data); | |
static int t_VectorFFT_set__z(t_VectorFFT *self, PyObject *arg, void *data); | |
static PyGetSetDef t_VectorFFT__fields_[] = { | |
DECLARE_GET_FIELD(t_VectorFFT, passThrough), | |
DECLARE_SET_FIELD(t_VectorFFT, x), | |
DECLARE_SET_FIELD(t_VectorFFT, y), | |
DECLARE_SET_FIELD(t_VectorFFT, z), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_VectorFFT__methods_[] = { | |
DECLARE_METHOD(t_VectorFFT, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_VectorFFT, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_VectorFFT, exec, METH_VARARGS), | |
DECLARE_METHOD(t_VectorFFT, isPassThrough, METH_VARARGS), | |
DECLARE_METHOD(t_VectorFFT, name, METH_VARARGS), | |
DECLARE_METHOD(t_VectorFFT, op, METH_VARARGS), | |
DECLARE_METHOD(t_VectorFFT, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_VectorFFT, opNum, METH_VARARGS), | |
DECLARE_METHOD(t_VectorFFT, setX, METH_VARARGS), | |
DECLARE_METHOD(t_VectorFFT, setY, METH_VARARGS), | |
DECLARE_METHOD(t_VectorFFT, setZ, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(VectorFFT, t_VectorFFT, ::org::nd4j::linalg::api::ops::BaseTransformOp, VectorFFT, t_VectorFFT_init_, 0, 0, t_VectorFFT__fields_, 0, 0); | |
void t_VectorFFT::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(VectorFFT), module, "VectorFFT", 0); | |
} | |
void t_VectorFFT::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(VectorFFT).tp_dict, "class_", make_descriptor(VectorFFT::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(VectorFFT).tp_dict, "wrapfn_", make_descriptor(t_VectorFFT::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(VectorFFT).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_VectorFFT_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, VectorFFT::initializeClass, 1))) | |
return NULL; | |
return t_VectorFFT::wrap_Object(VectorFFT(((t_VectorFFT *) arg)->object.this$)); | |
} | |
static PyObject *t_VectorFFT_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, VectorFFT::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_VectorFFT_init_(t_VectorFFT *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
VectorFFT object((jobject) NULL); | |
INT_CALL(object = VectorFFT()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
VectorFFT object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = VectorFFT(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
jint a1; | |
VectorFFT object((jobject) NULL); | |
if (!parseArgs(args, "kI", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = VectorFFT(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jint a2; | |
VectorFFT object((jobject) NULL); | |
if (!parseArgs(args, "kkI", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = VectorFFT(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
jint a3; | |
VectorFFT object((jobject) NULL); | |
if (!parseArgs(args, "kkJI", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = VectorFFT(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 5: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
jint a4; | |
VectorFFT object((jobject) NULL); | |
if (!parseArgs(args, "kkkJI", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3, &a4)) | |
{ | |
INT_CALL(object = VectorFFT(a0, a1, a2, a3, a4)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_VectorFFT_exec(t_VectorFFT *self, PyObject *args) | |
{ | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(self->object.exec()); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(VectorFFT), (PyObject *) self, "exec", args, 2); | |
} | |
static PyObject *t_VectorFFT_isPassThrough(t_VectorFFT *self, PyObject *args) | |
{ | |
jboolean result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.isPassThrough()); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(VectorFFT), (PyObject *) self, "isPassThrough", args, 2); | |
} | |
static PyObject *t_VectorFFT_name(t_VectorFFT *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(VectorFFT), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_VectorFFT_op(t_VectorFFT *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(VectorFFT), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_VectorFFT_opForDimension(t_VectorFFT *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(VectorFFT), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_VectorFFT_opNum(t_VectorFFT *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(VectorFFT), (PyObject *) self, "opNum", args, 2); | |
} | |
static PyObject *t_VectorFFT_setX(t_VectorFFT *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.setX(a0)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(VectorFFT), (PyObject *) self, "setX", args, 2); | |
} | |
static PyObject *t_VectorFFT_setY(t_VectorFFT *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.setY(a0)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(VectorFFT), (PyObject *) self, "setY", args, 2); | |
} | |
static PyObject *t_VectorFFT_setZ(t_VectorFFT *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.setZ(a0)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(VectorFFT), (PyObject *) self, "setZ", args, 2); | |
} | |
static PyObject *t_VectorFFT_get__passThrough(t_VectorFFT *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isPassThrough()); | |
Py_RETURN_BOOL(value); | |
} | |
static int t_VectorFFT_set__x(t_VectorFFT *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setX(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "x", arg); | |
return -1; | |
} | |
static int t_VectorFFT_set__y(t_VectorFFT *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setY(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "y", arg); | |
return -1; | |
} | |
static int t_VectorFFT_set__z(t_VectorFFT *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setZ(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "z", arg); | |
return -1; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/indexing/conditions/Condition.h" | |
#include "java/lang/Boolean.h" | |
#include "java/lang/Number.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace indexing { | |
namespace conditions { | |
::java::lang::Class *Condition::class$ = NULL; | |
jmethodID *Condition::mids$ = NULL; | |
bool Condition::live$ = false; | |
jclass Condition::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/indexing/conditions/Condition"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_apply_7a17c395] = env->getMethodID(cls, "apply", "(Ljava/lang/Number;)Ljava/lang/Boolean;"); | |
mids$[mid_condtionNum_54c6a179] = env->getMethodID(cls, "condtionNum", "()I"); | |
mids$[mid_getValue_54c6a174] = env->getMethodID(cls, "getValue", "()D"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
::java::lang::Boolean Condition::apply(const ::java::lang::Number & a0) const | |
{ | |
return ::java::lang::Boolean(env->callObjectMethod(this$, mids$[mid_apply_7a17c395], a0.this$)); | |
} | |
jint Condition::condtionNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_condtionNum_54c6a179]); | |
} | |
jdouble Condition::getValue() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_getValue_54c6a174]); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace indexing { | |
namespace conditions { | |
static PyObject *t_Condition_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Condition_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Condition_apply(t_Condition *self, PyObject *arg); | |
static PyObject *t_Condition_condtionNum(t_Condition *self); | |
static PyObject *t_Condition_getValue(t_Condition *self); | |
static PyObject *t_Condition_get__value(t_Condition *self, void *data); | |
static PyGetSetDef t_Condition__fields_[] = { | |
DECLARE_GET_FIELD(t_Condition, value), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Condition__methods_[] = { | |
DECLARE_METHOD(t_Condition, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Condition, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Condition, apply, METH_O), | |
DECLARE_METHOD(t_Condition, condtionNum, METH_NOARGS), | |
DECLARE_METHOD(t_Condition, getValue, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Condition, t_Condition, ::java::lang::Object, Condition, abstract_init, 0, 0, t_Condition__fields_, 0, 0); | |
void t_Condition::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Condition), module, "Condition", 0); | |
} | |
void t_Condition::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Condition).tp_dict, "class_", make_descriptor(Condition::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Condition).tp_dict, "wrapfn_", make_descriptor(t_Condition::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Condition).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Condition_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Condition::initializeClass, 1))) | |
return NULL; | |
return t_Condition::wrap_Object(Condition(((t_Condition *) arg)->object.this$)); | |
} | |
static PyObject *t_Condition_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Condition::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_Condition_apply(t_Condition *self, PyObject *arg) | |
{ | |
::java::lang::Number a0((jobject) NULL); | |
::java::lang::Boolean result((jobject) NULL); | |
if (!parseArg(arg, "O", &::java::lang::PY_TYPE(Number), &a0)) | |
{ | |
OBJ_CALL(result = self->object.apply(a0)); | |
return ::java::lang::t_Boolean::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "apply", arg); | |
return NULL; | |
} | |
static PyObject *t_Condition_condtionNum(t_Condition *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.condtionNum()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_Condition_getValue(t_Condition *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.getValue()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_Condition_get__value(t_Condition *self, void *data) | |
{ | |
jdouble value; | |
OBJ_CALL(value = self->object.getValue()); | |
return PyFloat_FromDouble((double) value); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/activations/impl/ActivationReLU.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/Object.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace activations { | |
namespace impl { | |
::java::lang::Class *ActivationReLU::class$ = NULL; | |
jmethodID *ActivationReLU::mids$ = NULL; | |
bool ActivationReLU::live$ = false; | |
jclass ActivationReLU::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/activations/impl/ActivationReLU"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_getActivation_962df300] = env->getMethodID(cls, "getActivation", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Z)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
ActivationReLU::ActivationReLU() : ::org::nd4j::linalg::activations::BaseActivationFunction(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
jboolean ActivationReLU::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray ActivationReLU::getActivation(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, jboolean a1) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getActivation_962df300], a0.this$, a1)); | |
} | |
jint ActivationReLU::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
::java::lang::String ActivationReLU::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace activations { | |
namespace impl { | |
static PyObject *t_ActivationReLU_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_ActivationReLU_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_ActivationReLU_init_(t_ActivationReLU *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_ActivationReLU_equals(t_ActivationReLU *self, PyObject *args); | |
static PyObject *t_ActivationReLU_getActivation(t_ActivationReLU *self, PyObject *args); | |
static PyObject *t_ActivationReLU_hashCode(t_ActivationReLU *self, PyObject *args); | |
static PyObject *t_ActivationReLU_toString(t_ActivationReLU *self, PyObject *args); | |
static PyMethodDef t_ActivationReLU__methods_[] = { | |
DECLARE_METHOD(t_ActivationReLU, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ActivationReLU, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ActivationReLU, equals, METH_VARARGS), | |
DECLARE_METHOD(t_ActivationReLU, getActivation, METH_VARARGS), | |
DECLARE_METHOD(t_ActivationReLU, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_ActivationReLU, toString, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(ActivationReLU, t_ActivationReLU, ::org::nd4j::linalg::activations::BaseActivationFunction, ActivationReLU, t_ActivationReLU_init_, 0, 0, 0, 0, 0); | |
void t_ActivationReLU::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(ActivationReLU), module, "ActivationReLU", 0); | |
} | |
void t_ActivationReLU::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(ActivationReLU).tp_dict, "class_", make_descriptor(ActivationReLU::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(ActivationReLU).tp_dict, "wrapfn_", make_descriptor(t_ActivationReLU::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(ActivationReLU).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_ActivationReLU_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, ActivationReLU::initializeClass, 1))) | |
return NULL; | |
return t_ActivationReLU::wrap_Object(ActivationReLU(((t_ActivationReLU *) arg)->object.this$)); | |
} | |
static PyObject *t_ActivationReLU_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, ActivationReLU::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_ActivationReLU_init_(t_ActivationReLU *self, PyObject *args, PyObject *kwds) | |
{ | |
ActivationReLU object((jobject) NULL); | |
INT_CALL(object = ActivationReLU()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_ActivationReLU_equals(t_ActivationReLU *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(ActivationReLU), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_ActivationReLU_getActivation(t_ActivationReLU *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
jboolean a1; | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "kZ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.getActivation(a0, a1)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(ActivationReLU), (PyObject *) self, "getActivation", args, 2); | |
} | |
static PyObject *t_ActivationReLU_hashCode(t_ActivationReLU *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(ActivationReLU), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_ActivationReLU_toString(t_ActivationReLU *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(ActivationReLU), (PyObject *) self, "toString", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/accum/Norm1.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace accum { | |
::java::lang::Class *Norm1::class$ = NULL; | |
jmethodID *Norm1::mids$ = NULL; | |
bool Norm1::live$ = false; | |
jclass Norm1::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/accum/Norm1"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_4237560b] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_init$_321bc445] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_combineSubResults_f1b0c014] = env->getMethodID(cls, "combineSubResults", "(FF)F"); | |
mids$[mid_combineSubResults_b1e2866a] = env->getMethodID(cls, "combineSubResults", "(DD)D"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_noOp_eef1d225] = env->getMethodID(cls, "noOp", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
mids$[mid_update_f1b0c014] = env->getMethodID(cls, "update", "(FF)F"); | |
mids$[mid_update_b1e2866a] = env->getMethodID(cls, "update", "(DD)D"); | |
mids$[mid_update_5348eb3d] = env->getMethodID(cls, "update", "(FFF)F"); | |
mids$[mid_update_c5d3f3bd] = env->getMethodID(cls, "update", "(DDD)D"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Norm1::Norm1() : ::org::nd4j::linalg::api::ops::BaseAccumulation(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
Norm1::Norm1(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::api::ops::BaseAccumulation(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
Norm1::Norm1(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::BaseAccumulation(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
Norm1::Norm1(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2) : ::org::nd4j::linalg::api::ops::BaseAccumulation(env->newObject(initializeClass, &mids$, mid_init$_4237560b, a0.this$, a1.this$, a2)) {} | |
Norm1::Norm1(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) : ::org::nd4j::linalg::api::ops::BaseAccumulation(env->newObject(initializeClass, &mids$, mid_init$_321bc445, a0.this$, a1.this$, a2.this$, a3)) {} | |
jfloat Norm1::combineSubResults(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_combineSubResults_f1b0c014], a0, a1); | |
} | |
jdouble Norm1::combineSubResults(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_combineSubResults_b1e2866a], a0, a1); | |
} | |
::java::lang::String Norm1::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray Norm1::noOp() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_noOp_eef1d225])); | |
} | |
jfloat Norm1::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble Norm1::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
::org::nd4j::linalg::api::ops::Op Norm1::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ops::Op Norm1::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
jint Norm1::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
jfloat Norm1::update(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_update_f1b0c014], a0, a1); | |
} | |
jdouble Norm1::update(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_update_b1e2866a], a0, a1); | |
} | |
jfloat Norm1::update(jfloat a0, jfloat a1, jfloat a2) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_update_5348eb3d], a0, a1, a2); | |
} | |
jdouble Norm1::update(jdouble a0, jdouble a1, jdouble a2) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_update_c5d3f3bd], a0, a1, a2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace accum { | |
static PyObject *t_Norm1_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Norm1_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Norm1_init_(t_Norm1 *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Norm1_combineSubResults(t_Norm1 *self, PyObject *args); | |
static PyObject *t_Norm1_name(t_Norm1 *self, PyObject *args); | |
static PyObject *t_Norm1_noOp(t_Norm1 *self, PyObject *args); | |
static PyObject *t_Norm1_op(t_Norm1 *self, PyObject *args); | |
static PyObject *t_Norm1_opForDimension(t_Norm1 *self, PyObject *args); | |
static PyObject *t_Norm1_opNum(t_Norm1 *self, PyObject *args); | |
static PyObject *t_Norm1_update(t_Norm1 *self, PyObject *args); | |
static PyMethodDef t_Norm1__methods_[] = { | |
DECLARE_METHOD(t_Norm1, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Norm1, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Norm1, combineSubResults, METH_VARARGS), | |
DECLARE_METHOD(t_Norm1, name, METH_VARARGS), | |
DECLARE_METHOD(t_Norm1, noOp, METH_VARARGS), | |
DECLARE_METHOD(t_Norm1, op, METH_VARARGS), | |
DECLARE_METHOD(t_Norm1, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_Norm1, opNum, METH_VARARGS), | |
DECLARE_METHOD(t_Norm1, update, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Norm1, t_Norm1, ::org::nd4j::linalg::api::ops::BaseAccumulation, Norm1, t_Norm1_init_, 0, 0, 0, 0, 0); | |
void t_Norm1::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Norm1), module, "Norm1", 0); | |
} | |
void t_Norm1::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Norm1).tp_dict, "class_", make_descriptor(Norm1::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Norm1).tp_dict, "wrapfn_", make_descriptor(t_Norm1::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Norm1).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Norm1_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Norm1::initializeClass, 1))) | |
return NULL; | |
return t_Norm1::wrap_Object(Norm1(((t_Norm1 *) arg)->object.this$)); | |
} | |
static PyObject *t_Norm1_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Norm1::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Norm1_init_(t_Norm1 *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
Norm1 object((jobject) NULL); | |
INT_CALL(object = Norm1()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
Norm1 object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = Norm1(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
Norm1 object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = Norm1(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
Norm1 object((jobject) NULL); | |
if (!parseArgs(args, "kkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = Norm1(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
Norm1 object((jobject) NULL); | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = Norm1(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_Norm1_combineSubResults(t_Norm1 *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.combineSubResults(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.combineSubResults(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Norm1), (PyObject *) self, "combineSubResults", args, 2); | |
} | |
static PyObject *t_Norm1_name(t_Norm1 *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Norm1), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_Norm1_noOp(t_Norm1 *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.noOp()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(Norm1), (PyObject *) self, "noOp", args, 2); | |
} | |
static PyObject *t_Norm1_op(t_Norm1 *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Norm1), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_Norm1_opForDimension(t_Norm1 *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Norm1), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_Norm1_opNum(t_Norm1 *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Norm1), (PyObject *) self, "opNum", args, 2); | |
} | |
static PyObject *t_Norm1_update(t_Norm1 *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.update(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.update(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 3: | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat a2; | |
jfloat result; | |
if (!parseArgs(args, "FFF", &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(result = self->object.update(a0, a1, a2)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble a2; | |
jdouble result; | |
if (!parseArgs(args, "DDD", &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(result = self->object.update(a0, a1, a2)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Norm1), (PyObject *) self, "update", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/factory/Nd4j$PadMode.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace factory { | |
::java::lang::Class *Nd4j$PadMode::class$ = NULL; | |
jmethodID *Nd4j$PadMode::mids$ = NULL; | |
bool Nd4j$PadMode::live$ = false; | |
Nd4j$PadMode *Nd4j$PadMode::CONSTANT = NULL; | |
Nd4j$PadMode *Nd4j$PadMode::EDGE = NULL; | |
Nd4j$PadMode *Nd4j$PadMode::LINEAR_RAMP = NULL; | |
Nd4j$PadMode *Nd4j$PadMode::MAXIMUM = NULL; | |
Nd4j$PadMode *Nd4j$PadMode::MEAN = NULL; | |
Nd4j$PadMode *Nd4j$PadMode::MEDIAN = NULL; | |
Nd4j$PadMode *Nd4j$PadMode::MINIMUM = NULL; | |
Nd4j$PadMode *Nd4j$PadMode::REFLECT = NULL; | |
Nd4j$PadMode *Nd4j$PadMode::SYMMETRIC = NULL; | |
Nd4j$PadMode *Nd4j$PadMode::WRAP = NULL; | |
jclass Nd4j$PadMode::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/factory/Nd4j$PadMode"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_valueOf_3fdcbd79] = env->getStaticMethodID(cls, "valueOf", "(Ljava/lang/String;)Lorg/nd4j/linalg/factory/Nd4j$PadMode;"); | |
mids$[mid_values_efd319cf] = env->getStaticMethodID(cls, "values", "()[Lorg/nd4j/linalg/factory/Nd4j$PadMode;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
cls = (jclass) class$->this$; | |
CONSTANT = new Nd4j$PadMode(env->getStaticObjectField(cls, "CONSTANT", "Lorg/nd4j/linalg/factory/Nd4j$PadMode;")); | |
EDGE = new Nd4j$PadMode(env->getStaticObjectField(cls, "EDGE", "Lorg/nd4j/linalg/factory/Nd4j$PadMode;")); | |
LINEAR_RAMP = new Nd4j$PadMode(env->getStaticObjectField(cls, "LINEAR_RAMP", "Lorg/nd4j/linalg/factory/Nd4j$PadMode;")); | |
MAXIMUM = new Nd4j$PadMode(env->getStaticObjectField(cls, "MAXIMUM", "Lorg/nd4j/linalg/factory/Nd4j$PadMode;")); | |
MEAN = new Nd4j$PadMode(env->getStaticObjectField(cls, "MEAN", "Lorg/nd4j/linalg/factory/Nd4j$PadMode;")); | |
MEDIAN = new Nd4j$PadMode(env->getStaticObjectField(cls, "MEDIAN", "Lorg/nd4j/linalg/factory/Nd4j$PadMode;")); | |
MINIMUM = new Nd4j$PadMode(env->getStaticObjectField(cls, "MINIMUM", "Lorg/nd4j/linalg/factory/Nd4j$PadMode;")); | |
REFLECT = new Nd4j$PadMode(env->getStaticObjectField(cls, "REFLECT", "Lorg/nd4j/linalg/factory/Nd4j$PadMode;")); | |
SYMMETRIC = new Nd4j$PadMode(env->getStaticObjectField(cls, "SYMMETRIC", "Lorg/nd4j/linalg/factory/Nd4j$PadMode;")); | |
WRAP = new Nd4j$PadMode(env->getStaticObjectField(cls, "WRAP", "Lorg/nd4j/linalg/factory/Nd4j$PadMode;")); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Nd4j$PadMode Nd4j$PadMode::valueOf(const ::java::lang::String & a0) | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return Nd4j$PadMode(env->callStaticObjectMethod(cls, mids$[mid_valueOf_3fdcbd79], a0.this$)); | |
} | |
JArray< Nd4j$PadMode > Nd4j$PadMode::values() | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return JArray< Nd4j$PadMode >(env->callStaticObjectMethod(cls, mids$[mid_values_efd319cf])); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace factory { | |
static PyObject *t_Nd4j$PadMode_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Nd4j$PadMode_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Nd4j$PadMode_of_(t_Nd4j$PadMode *self, PyObject *args); | |
static PyObject *t_Nd4j$PadMode_valueOf(PyTypeObject *type, PyObject *args); | |
static PyObject *t_Nd4j$PadMode_values(PyTypeObject *type); | |
static PyObject *t_Nd4j$PadMode_get__parameters_(t_Nd4j$PadMode *self, void *data); | |
static PyGetSetDef t_Nd4j$PadMode__fields_[] = { | |
DECLARE_GET_FIELD(t_Nd4j$PadMode, parameters_), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Nd4j$PadMode__methods_[] = { | |
DECLARE_METHOD(t_Nd4j$PadMode, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Nd4j$PadMode, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Nd4j$PadMode, of_, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4j$PadMode, valueOf, METH_VARARGS | METH_CLASS), | |
DECLARE_METHOD(t_Nd4j$PadMode, values, METH_NOARGS | METH_CLASS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Nd4j$PadMode, t_Nd4j$PadMode, ::java::lang::Enum, Nd4j$PadMode, abstract_init, 0, 0, t_Nd4j$PadMode__fields_, 0, 0); | |
PyObject *t_Nd4j$PadMode::wrap_Object(const Nd4j$PadMode& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_Nd4j$PadMode::wrap_Object(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_Nd4j$PadMode *self = (t_Nd4j$PadMode *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
PyObject *t_Nd4j$PadMode::wrap_jobject(const jobject& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_Nd4j$PadMode::wrap_jobject(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_Nd4j$PadMode *self = (t_Nd4j$PadMode *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
void t_Nd4j$PadMode::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Nd4j$PadMode), module, "Nd4j$PadMode", 0); | |
} | |
void t_Nd4j$PadMode::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "class_", make_descriptor(Nd4j$PadMode::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "wrapfn_", make_descriptor(t_Nd4j$PadMode::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
env->getClass(Nd4j$PadMode::initializeClass); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "CONSTANT", make_descriptor(t_Nd4j$PadMode::wrap_Object(*Nd4j$PadMode::CONSTANT))); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "EDGE", make_descriptor(t_Nd4j$PadMode::wrap_Object(*Nd4j$PadMode::EDGE))); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "LINEAR_RAMP", make_descriptor(t_Nd4j$PadMode::wrap_Object(*Nd4j$PadMode::LINEAR_RAMP))); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "MAXIMUM", make_descriptor(t_Nd4j$PadMode::wrap_Object(*Nd4j$PadMode::MAXIMUM))); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "MEAN", make_descriptor(t_Nd4j$PadMode::wrap_Object(*Nd4j$PadMode::MEAN))); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "MEDIAN", make_descriptor(t_Nd4j$PadMode::wrap_Object(*Nd4j$PadMode::MEDIAN))); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "MINIMUM", make_descriptor(t_Nd4j$PadMode::wrap_Object(*Nd4j$PadMode::MINIMUM))); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "REFLECT", make_descriptor(t_Nd4j$PadMode::wrap_Object(*Nd4j$PadMode::REFLECT))); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "SYMMETRIC", make_descriptor(t_Nd4j$PadMode::wrap_Object(*Nd4j$PadMode::SYMMETRIC))); | |
PyDict_SetItemString(PY_TYPE(Nd4j$PadMode).tp_dict, "WRAP", make_descriptor(t_Nd4j$PadMode::wrap_Object(*Nd4j$PadMode::WRAP))); | |
} | |
static PyObject *t_Nd4j$PadMode_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Nd4j$PadMode::initializeClass, 1))) | |
return NULL; | |
return t_Nd4j$PadMode::wrap_Object(Nd4j$PadMode(((t_Nd4j$PadMode *) arg)->object.this$)); | |
} | |
static PyObject *t_Nd4j$PadMode_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Nd4j$PadMode::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_Nd4j$PadMode_of_(t_Nd4j$PadMode *self, PyObject *args) | |
{ | |
if (!parseArg(args, "T", 1, &(self->parameters))) | |
Py_RETURN_SELF; | |
return PyErr_SetArgsError((PyObject *) self, "of_", args); | |
} | |
static PyObject *t_Nd4j$PadMode_valueOf(PyTypeObject *type, PyObject *args) | |
{ | |
::java::lang::String a0((jobject) NULL); | |
Nd4j$PadMode result((jobject) NULL); | |
if (!parseArgs(args, "s", &a0)) | |
{ | |
OBJ_CALL(result = ::org::nd4j::linalg::factory::Nd4j$PadMode::valueOf(a0)); | |
return t_Nd4j$PadMode::wrap_Object(result); | |
} | |
return callSuper(type, "valueOf", args, 2); | |
} | |
static PyObject *t_Nd4j$PadMode_values(PyTypeObject *type) | |
{ | |
JArray< Nd4j$PadMode > result((jobject) NULL); | |
OBJ_CALL(result = ::org::nd4j::linalg::factory::Nd4j$PadMode::values()); | |
return JArray<jobject>(result.this$).wrap(t_Nd4j$PadMode::wrap_jobject); | |
} | |
static PyObject *t_Nd4j$PadMode_get__parameters_(t_Nd4j$PadMode *self, void *data) | |
{ | |
return typeParameters(self->parameters, sizeof(self->parameters)); | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/aggregates/impl/AggregateCBOW.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace aggregates { | |
namespace impl { | |
::java::lang::Class *AggregateCBOW::class$ = NULL; | |
jmethodID *AggregateCBOW::mids$ = NULL; | |
bool AggregateCBOW::live$ = false; | |
jclass AggregateCBOW::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/aggregates/impl/AggregateCBOW"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_ab75c1e4] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;I[I[I[IIIIDJI)V"); | |
mids$[mid_init$_919b8b6d] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;I[I[I[IIIIDJIIZLorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_getSharedMemorySize_54c6a179] = env->getMethodID(cls, "getSharedMemorySize", "()I"); | |
mids$[mid_getThreadsPerInstance_54c6a179] = env->getMethodID(cls, "getThreadsPerInstance", "()I"); | |
mids$[mid_maxArguments_54c6a179] = env->getMethodID(cls, "maxArguments", "()I"); | |
mids$[mid_maxIndexArguments_54c6a179] = env->getMethodID(cls, "maxIndexArguments", "()I"); | |
mids$[mid_maxIntArraySize_54c6a179] = env->getMethodID(cls, "maxIntArraySize", "()I"); | |
mids$[mid_maxIntArrays_54c6a179] = env->getMethodID(cls, "maxIntArrays", "()I"); | |
mids$[mid_maxRealArguments_54c6a179] = env->getMethodID(cls, "maxRealArguments", "()I"); | |
mids$[mid_maxShapes_54c6a179] = env->getMethodID(cls, "maxShapes", "()I"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
AggregateCBOW::AggregateCBOW(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, const ::org::nd4j::linalg::api::ndarray::INDArray & a3, const ::org::nd4j::linalg::api::ndarray::INDArray & a4, jint a5, const JArray< jint > & a6, const JArray< jint > & a7, const JArray< jint > & a8, jint a9, jint a10, jint a11, jdouble a12, jlong a13, jint a14) : ::org::nd4j::linalg::api::ops::aggregates::BaseAggregate(env->newObject(initializeClass, &mids$, mid_init$_ab75c1e4, a0.this$, a1.this$, a2.this$, a3.this$, a4.this$, a5, a6.this$, a7.this$, a8.this$, a9, a10, a11, a12, a13, a14)) {} | |
AggregateCBOW::AggregateCBOW(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, const ::org::nd4j::linalg::api::ndarray::INDArray & a3, const ::org::nd4j::linalg::api::ndarray::INDArray & a4, jint a5, const JArray< jint > & a6, const JArray< jint > & a7, const JArray< jint > & a8, jint a9, jint a10, jint a11, jdouble a12, jlong a13, jint a14, jint a15, jboolean a16, const ::org::nd4j::linalg::api::ndarray::INDArray & a17) : ::org::nd4j::linalg::api::ops::aggregates::BaseAggregate(env->newObject(initializeClass, &mids$, mid_init$_919b8b6d, a0.this$, a1.this$, a2.this$, a3.this$, a4.this$, a5, a6.this$, a7.this$, a8.this$, a9, a10, a11, a12, a13, a14, a15, a16, a17.this$)) {} | |
jint AggregateCBOW::getSharedMemorySize() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getSharedMemorySize_54c6a179]); | |
} | |
jint AggregateCBOW::getThreadsPerInstance() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getThreadsPerInstance_54c6a179]); | |
} | |
jint AggregateCBOW::maxArguments() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxArguments_54c6a179]); | |
} | |
jint AggregateCBOW::maxIndexArguments() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxIndexArguments_54c6a179]); | |
} | |
jint AggregateCBOW::maxIntArraySize() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxIntArraySize_54c6a179]); | |
} | |
jint AggregateCBOW::maxIntArrays() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxIntArrays_54c6a179]); | |
} | |
jint AggregateCBOW::maxRealArguments() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxRealArguments_54c6a179]); | |
} | |
jint AggregateCBOW::maxShapes() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxShapes_54c6a179]); | |
} | |
::java::lang::String AggregateCBOW::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jint AggregateCBOW::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace aggregates { | |
namespace impl { | |
static PyObject *t_AggregateCBOW_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_AggregateCBOW_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_AggregateCBOW_init_(t_AggregateCBOW *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_AggregateCBOW_getSharedMemorySize(t_AggregateCBOW *self, PyObject *args); | |
static PyObject *t_AggregateCBOW_getThreadsPerInstance(t_AggregateCBOW *self, PyObject *args); | |
static PyObject *t_AggregateCBOW_maxArguments(t_AggregateCBOW *self, PyObject *args); | |
static PyObject *t_AggregateCBOW_maxIndexArguments(t_AggregateCBOW *self, PyObject *args); | |
static PyObject *t_AggregateCBOW_maxIntArraySize(t_AggregateCBOW *self, PyObject *args); | |
static PyObject *t_AggregateCBOW_maxIntArrays(t_AggregateCBOW *self, PyObject *args); | |
static PyObject *t_AggregateCBOW_maxRealArguments(t_AggregateCBOW *self, PyObject *args); | |
static PyObject *t_AggregateCBOW_maxShapes(t_AggregateCBOW *self, PyObject *args); | |
static PyObject *t_AggregateCBOW_name(t_AggregateCBOW *self, PyObject *args); | |
static PyObject *t_AggregateCBOW_opNum(t_AggregateCBOW *self, PyObject *args); | |
static PyObject *t_AggregateCBOW_get__sharedMemorySize(t_AggregateCBOW *self, void *data); | |
static PyObject *t_AggregateCBOW_get__threadsPerInstance(t_AggregateCBOW *self, void *data); | |
static PyGetSetDef t_AggregateCBOW__fields_[] = { | |
DECLARE_GET_FIELD(t_AggregateCBOW, sharedMemorySize), | |
DECLARE_GET_FIELD(t_AggregateCBOW, threadsPerInstance), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_AggregateCBOW__methods_[] = { | |
DECLARE_METHOD(t_AggregateCBOW, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_AggregateCBOW, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_AggregateCBOW, getSharedMemorySize, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateCBOW, getThreadsPerInstance, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateCBOW, maxArguments, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateCBOW, maxIndexArguments, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateCBOW, maxIntArraySize, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateCBOW, maxIntArrays, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateCBOW, maxRealArguments, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateCBOW, maxShapes, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateCBOW, name, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateCBOW, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(AggregateCBOW, t_AggregateCBOW, ::org::nd4j::linalg::api::ops::aggregates::BaseAggregate, AggregateCBOW, t_AggregateCBOW_init_, 0, 0, t_AggregateCBOW__fields_, 0, 0); | |
void t_AggregateCBOW::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(AggregateCBOW), module, "AggregateCBOW", 0); | |
} | |
void t_AggregateCBOW::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(AggregateCBOW).tp_dict, "class_", make_descriptor(AggregateCBOW::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(AggregateCBOW).tp_dict, "wrapfn_", make_descriptor(t_AggregateCBOW::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(AggregateCBOW).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_AggregateCBOW_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, AggregateCBOW::initializeClass, 1))) | |
return NULL; | |
return t_AggregateCBOW::wrap_Object(AggregateCBOW(((t_AggregateCBOW *) arg)->object.this$)); | |
} | |
static PyObject *t_AggregateCBOW_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, AggregateCBOW::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_AggregateCBOW_init_(t_AggregateCBOW *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 15: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a3((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a4((jobject) NULL); | |
jint a5; | |
JArray< jint > a6((jobject) NULL); | |
JArray< jint > a7((jobject) NULL); | |
JArray< jint > a8((jobject) NULL); | |
jint a9; | |
jint a10; | |
jint a11; | |
jdouble a12; | |
jlong a13; | |
jint a14; | |
AggregateCBOW object((jobject) NULL); | |
if (!parseArgs(args, "kkkkkI[I[I[IIIIDJI", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9, &a10, &a11, &a12, &a13, &a14)) | |
{ | |
INT_CALL(object = AggregateCBOW(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 18: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a3((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a4((jobject) NULL); | |
jint a5; | |
JArray< jint > a6((jobject) NULL); | |
JArray< jint > a7((jobject) NULL); | |
JArray< jint > a8((jobject) NULL); | |
jint a9; | |
jint a10; | |
jint a11; | |
jdouble a12; | |
jlong a13; | |
jint a14; | |
jint a15; | |
jboolean a16; | |
::org::nd4j::linalg::api::ndarray::INDArray a17((jobject) NULL); | |
AggregateCBOW object((jobject) NULL); | |
if (!parseArgs(args, "kkkkkI[I[I[IIIIDJIIZk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9, &a10, &a11, &a12, &a13, &a14, &a15, &a16, &a17)) | |
{ | |
INT_CALL(object = AggregateCBOW(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_AggregateCBOW_getSharedMemorySize(t_AggregateCBOW *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getSharedMemorySize()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateCBOW), (PyObject *) self, "getSharedMemorySize", args, 2); | |
} | |
static PyObject *t_AggregateCBOW_getThreadsPerInstance(t_AggregateCBOW *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getThreadsPerInstance()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateCBOW), (PyObject *) self, "getThreadsPerInstance", args, 2); | |
} | |
static PyObject *t_AggregateCBOW_maxArguments(t_AggregateCBOW *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxArguments()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateCBOW), (PyObject *) self, "maxArguments", args, 2); | |
} | |
static PyObject *t_AggregateCBOW_maxIndexArguments(t_AggregateCBOW *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxIndexArguments()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateCBOW), (PyObject *) self, "maxIndexArguments", args, 2); | |
} | |
static PyObject *t_AggregateCBOW_maxIntArraySize(t_AggregateCBOW *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxIntArraySize()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateCBOW), (PyObject *) self, "maxIntArraySize", args, 2); | |
} | |
static PyObject *t_AggregateCBOW_maxIntArrays(t_AggregateCBOW *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxIntArrays()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateCBOW), (PyObject *) self, "maxIntArrays", args, 2); | |
} | |
static PyObject *t_AggregateCBOW_maxRealArguments(t_AggregateCBOW *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxRealArguments()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateCBOW), (PyObject *) self, "maxRealArguments", args, 2); | |
} | |
static PyObject *t_AggregateCBOW_maxShapes(t_AggregateCBOW *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxShapes()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateCBOW), (PyObject *) self, "maxShapes", args, 2); | |
} | |
static PyObject *t_AggregateCBOW_name(t_AggregateCBOW *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(AggregateCBOW), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_AggregateCBOW_opNum(t_AggregateCBOW *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateCBOW), (PyObject *) self, "opNum", args, 2); | |
} | |
static PyObject *t_AggregateCBOW_get__sharedMemorySize(t_AggregateCBOW *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getSharedMemorySize()); | |
return PyInt_FromLong((long) value); | |
} | |
static PyObject *t_AggregateCBOW_get__threadsPerInstance(t_AggregateCBOW *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getThreadsPerInstance()); | |
return PyInt_FromLong((long) value); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/learning/Adam$AdamAggregator.h" | |
#include "org/nd4j/linalg/learning/GradientUpdater.h" | |
#include "org/nd4j/linalg/learning/GradientUpdaterAggregator.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
::java::lang::Class *Adam$AdamAggregator::class$ = NULL; | |
jmethodID *Adam$AdamAggregator::mids$ = NULL; | |
bool Adam$AdamAggregator::live$ = false; | |
jclass Adam$AdamAggregator::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/learning/Adam$AdamAggregator"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_aggregate_eeea4eab] = env->getMethodID(cls, "aggregate", "(Lorg/nd4j/linalg/learning/GradientUpdater;)V"); | |
mids$[mid_combine_37615f37] = env->getMethodID(cls, "combine", "(Lorg/nd4j/linalg/learning/GradientUpdaterAggregator;)Lorg/nd4j/linalg/learning/GradientUpdaterAggregator;"); | |
mids$[mid_getUpdater_a54e28ba] = env->getMethodID(cls, "getUpdater", "()Lorg/nd4j/linalg/learning/GradientUpdater;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Adam$AdamAggregator::Adam$AdamAggregator() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
void Adam$AdamAggregator::aggregate(const ::org::nd4j::linalg::learning::GradientUpdater & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_aggregate_eeea4eab], a0.this$); | |
} | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator Adam$AdamAggregator::combine(const ::org::nd4j::linalg::learning::GradientUpdaterAggregator & a0) const | |
{ | |
return ::org::nd4j::linalg::learning::GradientUpdaterAggregator(env->callObjectMethod(this$, mids$[mid_combine_37615f37], a0.this$)); | |
} | |
::org::nd4j::linalg::learning::GradientUpdater Adam$AdamAggregator::getUpdater() const | |
{ | |
return ::org::nd4j::linalg::learning::GradientUpdater(env->callObjectMethod(this$, mids$[mid_getUpdater_a54e28ba])); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
static PyObject *t_Adam$AdamAggregator_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Adam$AdamAggregator_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Adam$AdamAggregator_init_(t_Adam$AdamAggregator *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Adam$AdamAggregator_aggregate(t_Adam$AdamAggregator *self, PyObject *arg); | |
static PyObject *t_Adam$AdamAggregator_combine(t_Adam$AdamAggregator *self, PyObject *arg); | |
static PyObject *t_Adam$AdamAggregator_getUpdater(t_Adam$AdamAggregator *self); | |
static PyObject *t_Adam$AdamAggregator_get__updater(t_Adam$AdamAggregator *self, void *data); | |
static PyGetSetDef t_Adam$AdamAggregator__fields_[] = { | |
DECLARE_GET_FIELD(t_Adam$AdamAggregator, updater), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Adam$AdamAggregator__methods_[] = { | |
DECLARE_METHOD(t_Adam$AdamAggregator, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Adam$AdamAggregator, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Adam$AdamAggregator, aggregate, METH_O), | |
DECLARE_METHOD(t_Adam$AdamAggregator, combine, METH_O), | |
DECLARE_METHOD(t_Adam$AdamAggregator, getUpdater, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Adam$AdamAggregator, t_Adam$AdamAggregator, ::java::lang::Object, Adam$AdamAggregator, t_Adam$AdamAggregator_init_, 0, 0, t_Adam$AdamAggregator__fields_, 0, 0); | |
void t_Adam$AdamAggregator::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Adam$AdamAggregator), module, "Adam$AdamAggregator", 0); | |
} | |
void t_Adam$AdamAggregator::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Adam$AdamAggregator).tp_dict, "class_", make_descriptor(Adam$AdamAggregator::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Adam$AdamAggregator).tp_dict, "wrapfn_", make_descriptor(t_Adam$AdamAggregator::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Adam$AdamAggregator).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Adam$AdamAggregator_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Adam$AdamAggregator::initializeClass, 1))) | |
return NULL; | |
return t_Adam$AdamAggregator::wrap_Object(Adam$AdamAggregator(((t_Adam$AdamAggregator *) arg)->object.this$)); | |
} | |
static PyObject *t_Adam$AdamAggregator_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Adam$AdamAggregator::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Adam$AdamAggregator_init_(t_Adam$AdamAggregator *self, PyObject *args, PyObject *kwds) | |
{ | |
Adam$AdamAggregator object((jobject) NULL); | |
INT_CALL(object = Adam$AdamAggregator()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_Adam$AdamAggregator_aggregate(t_Adam$AdamAggregator *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::learning::GradientUpdater::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.aggregate(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "aggregate", arg); | |
return NULL; | |
} | |
static PyObject *t_Adam$AdamAggregator_combine(t_Adam$AdamAggregator *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator a0((jobject) NULL); | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator result((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::learning::GradientUpdaterAggregator::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.combine(a0)); | |
return ::org::nd4j::linalg::learning::t_GradientUpdaterAggregator::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "combine", arg); | |
return NULL; | |
} | |
static PyObject *t_Adam$AdamAggregator_getUpdater(t_Adam$AdamAggregator *self) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater result((jobject) NULL); | |
OBJ_CALL(result = self->object.getUpdater()); | |
return ::org::nd4j::linalg::learning::t_GradientUpdater::wrap_Object(result); | |
} | |
static PyObject *t_Adam$AdamAggregator_get__updater(t_Adam$AdamAggregator *self, void *data) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater value((jobject) NULL); | |
OBJ_CALL(value = self->object.getUpdater()); | |
return ::org::nd4j::linalg::learning::t_GradientUpdater::wrap_Object(value); | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/nativeblas/Nd4jCpuPresets.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace nativeblas { | |
::java::lang::Class *Nd4jCpuPresets::class$ = NULL; | |
jmethodID *Nd4jCpuPresets::mids$ = NULL; | |
bool Nd4jCpuPresets::live$ = false; | |
jclass Nd4jCpuPresets::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/nativeblas/Nd4jCpuPresets"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Nd4jCpuPresets::Nd4jCpuPresets() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace nativeblas { | |
static PyObject *t_Nd4jCpuPresets_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Nd4jCpuPresets_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Nd4jCpuPresets_init_(t_Nd4jCpuPresets *self, PyObject *args, PyObject *kwds); | |
static PyMethodDef t_Nd4jCpuPresets__methods_[] = { | |
DECLARE_METHOD(t_Nd4jCpuPresets, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Nd4jCpuPresets, instance_, METH_O | METH_CLASS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Nd4jCpuPresets, t_Nd4jCpuPresets, ::java::lang::Object, Nd4jCpuPresets, t_Nd4jCpuPresets_init_, 0, 0, 0, 0, 0); | |
void t_Nd4jCpuPresets::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Nd4jCpuPresets), module, "Nd4jCpuPresets", 0); | |
} | |
void t_Nd4jCpuPresets::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Nd4jCpuPresets).tp_dict, "class_", make_descriptor(Nd4jCpuPresets::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Nd4jCpuPresets).tp_dict, "wrapfn_", make_descriptor(t_Nd4jCpuPresets::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Nd4jCpuPresets).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Nd4jCpuPresets_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Nd4jCpuPresets::initializeClass, 1))) | |
return NULL; | |
return t_Nd4jCpuPresets::wrap_Object(Nd4jCpuPresets(((t_Nd4jCpuPresets *) arg)->object.this$)); | |
} | |
static PyObject *t_Nd4jCpuPresets_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Nd4jCpuPresets::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Nd4jCpuPresets_init_(t_Nd4jCpuPresets *self, PyObject *args, PyObject *kwds) | |
{ | |
Nd4jCpuPresets object((jobject) NULL); | |
INT_CALL(object = Nd4jCpuPresets()); | |
self->object = object; | |
return 0; | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/dataset/api/iterator/cache/DataSetCache.h" | |
#include "java/lang/String.h" | |
#include "org/nd4j/linalg/dataset/DataSet.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace iterator { | |
namespace cache { | |
::java::lang::Class *DataSetCache::class$ = NULL; | |
jmethodID *DataSetCache::mids$ = NULL; | |
bool DataSetCache::live$ = false; | |
jclass DataSetCache::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/dataset/api/iterator/cache/DataSetCache"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_contains_5fdc3f44] = env->getMethodID(cls, "contains", "(Ljava/lang/String;)Z"); | |
mids$[mid_get_cd10355a] = env->getMethodID(cls, "get", "(Ljava/lang/String;)Lorg/nd4j/linalg/dataset/DataSet;"); | |
mids$[mid_isComplete_5fdc3f44] = env->getMethodID(cls, "isComplete", "(Ljava/lang/String;)Z"); | |
mids$[mid_put_8ae46833] = env->getMethodID(cls, "put", "(Ljava/lang/String;Lorg/nd4j/linalg/dataset/DataSet;)V"); | |
mids$[mid_setComplete_f3691645] = env->getMethodID(cls, "setComplete", "(Ljava/lang/String;Z)V"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
jboolean DataSetCache::contains(const ::java::lang::String & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_contains_5fdc3f44], a0.this$); | |
} | |
::org::nd4j::linalg::dataset::DataSet DataSetCache::get(const ::java::lang::String & a0) const | |
{ | |
return ::org::nd4j::linalg::dataset::DataSet(env->callObjectMethod(this$, mids$[mid_get_cd10355a], a0.this$)); | |
} | |
jboolean DataSetCache::isComplete(const ::java::lang::String & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isComplete_5fdc3f44], a0.this$); | |
} | |
void DataSetCache::put(const ::java::lang::String & a0, const ::org::nd4j::linalg::dataset::DataSet & a1) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_put_8ae46833], a0.this$, a1.this$); | |
} | |
void DataSetCache::setComplete(const ::java::lang::String & a0, jboolean a1) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setComplete_f3691645], a0.this$, a1); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace iterator { | |
namespace cache { | |
static PyObject *t_DataSetCache_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_DataSetCache_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_DataSetCache_contains(t_DataSetCache *self, PyObject *arg); | |
static PyObject *t_DataSetCache_get(t_DataSetCache *self, PyObject *arg); | |
static PyObject *t_DataSetCache_isComplete(t_DataSetCache *self, PyObject *arg); | |
static PyObject *t_DataSetCache_put(t_DataSetCache *self, PyObject *args); | |
static PyObject *t_DataSetCache_setComplete(t_DataSetCache *self, PyObject *args); | |
static PyMethodDef t_DataSetCache__methods_[] = { | |
DECLARE_METHOD(t_DataSetCache, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_DataSetCache, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_DataSetCache, contains, METH_O), | |
DECLARE_METHOD(t_DataSetCache, get, METH_O), | |
DECLARE_METHOD(t_DataSetCache, isComplete, METH_O), | |
DECLARE_METHOD(t_DataSetCache, put, METH_VARARGS), | |
DECLARE_METHOD(t_DataSetCache, setComplete, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(DataSetCache, t_DataSetCache, ::java::lang::Object, DataSetCache, abstract_init, 0, 0, 0, 0, 0); | |
void t_DataSetCache::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(DataSetCache), module, "DataSetCache", 0); | |
} | |
void t_DataSetCache::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(DataSetCache).tp_dict, "class_", make_descriptor(DataSetCache::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(DataSetCache).tp_dict, "wrapfn_", make_descriptor(t_DataSetCache::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(DataSetCache).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_DataSetCache_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, DataSetCache::initializeClass, 1))) | |
return NULL; | |
return t_DataSetCache::wrap_Object(DataSetCache(((t_DataSetCache *) arg)->object.this$)); | |
} | |
static PyObject *t_DataSetCache_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, DataSetCache::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_DataSetCache_contains(t_DataSetCache *self, PyObject *arg) | |
{ | |
::java::lang::String a0((jobject) NULL); | |
jboolean result; | |
if (!parseArg(arg, "s", &a0)) | |
{ | |
OBJ_CALL(result = self->object.contains(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "contains", arg); | |
return NULL; | |
} | |
static PyObject *t_DataSetCache_get(t_DataSetCache *self, PyObject *arg) | |
{ | |
::java::lang::String a0((jobject) NULL); | |
::org::nd4j::linalg::dataset::DataSet result((jobject) NULL); | |
if (!parseArg(arg, "s", &a0)) | |
{ | |
OBJ_CALL(result = self->object.get(a0)); | |
return ::org::nd4j::linalg::dataset::t_DataSet::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "get", arg); | |
return NULL; | |
} | |
static PyObject *t_DataSetCache_isComplete(t_DataSetCache *self, PyObject *arg) | |
{ | |
::java::lang::String a0((jobject) NULL); | |
jboolean result; | |
if (!parseArg(arg, "s", &a0)) | |
{ | |
OBJ_CALL(result = self->object.isComplete(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "isComplete", arg); | |
return NULL; | |
} | |
static PyObject *t_DataSetCache_put(t_DataSetCache *self, PyObject *args) | |
{ | |
::java::lang::String a0((jobject) NULL); | |
::org::nd4j::linalg::dataset::DataSet a1((jobject) NULL); | |
if (!parseArgs(args, "sk", ::org::nd4j::linalg::dataset::DataSet::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(self->object.put(a0, a1)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "put", args); | |
return NULL; | |
} | |
static PyObject *t_DataSetCache_setComplete(t_DataSetCache *self, PyObject *args) | |
{ | |
::java::lang::String a0((jobject) NULL); | |
jboolean a1; | |
if (!parseArgs(args, "sZ", &a0, &a1)) | |
{ | |
OBJ_CALL(self->object.setComplete(a0, a1)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setComplete", args); | |
return NULL; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/transforms/SoftMaxDerivative.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
::java::lang::Class *SoftMaxDerivative::class$ = NULL; | |
jmethodID *SoftMaxDerivative::mids$ = NULL; | |
bool SoftMaxDerivative::live$ = false; | |
jclass SoftMaxDerivative::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/transforms/SoftMaxDerivative"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_4237560b] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_init$_321bc445] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_exec_1efc2008] = env->getMethodID(cls, "exec", "([I)V"); | |
mids$[mid_isExecSpecial_54c6a16a] = env->getMethodID(cls, "isExecSpecial", "()Z"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
SoftMaxDerivative::SoftMaxDerivative() : ::org::nd4j::linalg::api::ops::impl::transforms::SoftMax(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
SoftMaxDerivative::SoftMaxDerivative(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::api::ops::impl::transforms::SoftMax(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
SoftMaxDerivative::SoftMaxDerivative(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::impl::transforms::SoftMax(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
SoftMaxDerivative::SoftMaxDerivative(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2) : ::org::nd4j::linalg::api::ops::impl::transforms::SoftMax(env->newObject(initializeClass, &mids$, mid_init$_4237560b, a0.this$, a1.this$, a2)) {} | |
SoftMaxDerivative::SoftMaxDerivative(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) : ::org::nd4j::linalg::api::ops::impl::transforms::SoftMax(env->newObject(initializeClass, &mids$, mid_init$_321bc445, a0.this$, a1.this$, a2.this$, a3)) {} | |
void SoftMaxDerivative::exec(const JArray< jint > & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_1efc2008], a0.this$); | |
} | |
jboolean SoftMaxDerivative::isExecSpecial() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isExecSpecial_54c6a16a]); | |
} | |
::java::lang::String SoftMaxDerivative::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jfloat SoftMaxDerivative::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble SoftMaxDerivative::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jdouble SoftMaxDerivative::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
jfloat SoftMaxDerivative::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op SoftMaxDerivative::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
jint SoftMaxDerivative::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
static PyObject *t_SoftMaxDerivative_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_SoftMaxDerivative_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_SoftMaxDerivative_init_(t_SoftMaxDerivative *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_SoftMaxDerivative_exec(t_SoftMaxDerivative *self, PyObject *args); | |
static PyObject *t_SoftMaxDerivative_isExecSpecial(t_SoftMaxDerivative *self, PyObject *args); | |
static PyObject *t_SoftMaxDerivative_name(t_SoftMaxDerivative *self, PyObject *args); | |
static PyObject *t_SoftMaxDerivative_op(t_SoftMaxDerivative *self, PyObject *args); | |
static PyObject *t_SoftMaxDerivative_opForDimension(t_SoftMaxDerivative *self, PyObject *args); | |
static PyObject *t_SoftMaxDerivative_opNum(t_SoftMaxDerivative *self, PyObject *args); | |
static PyObject *t_SoftMaxDerivative_get__execSpecial(t_SoftMaxDerivative *self, void *data); | |
static PyGetSetDef t_SoftMaxDerivative__fields_[] = { | |
DECLARE_GET_FIELD(t_SoftMaxDerivative, execSpecial), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_SoftMaxDerivative__methods_[] = { | |
DECLARE_METHOD(t_SoftMaxDerivative, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_SoftMaxDerivative, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_SoftMaxDerivative, exec, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMaxDerivative, isExecSpecial, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMaxDerivative, name, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMaxDerivative, op, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMaxDerivative, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMaxDerivative, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(SoftMaxDerivative, t_SoftMaxDerivative, ::org::nd4j::linalg::api::ops::impl::transforms::SoftMax, SoftMaxDerivative, t_SoftMaxDerivative_init_, 0, 0, t_SoftMaxDerivative__fields_, 0, 0); | |
void t_SoftMaxDerivative::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(SoftMaxDerivative), module, "SoftMaxDerivative", 0); | |
} | |
void t_SoftMaxDerivative::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(SoftMaxDerivative).tp_dict, "class_", make_descriptor(SoftMaxDerivative::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(SoftMaxDerivative).tp_dict, "wrapfn_", make_descriptor(t_SoftMaxDerivative::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(SoftMaxDerivative).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_SoftMaxDerivative_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, SoftMaxDerivative::initializeClass, 1))) | |
return NULL; | |
return t_SoftMaxDerivative::wrap_Object(SoftMaxDerivative(((t_SoftMaxDerivative *) arg)->object.this$)); | |
} | |
static PyObject *t_SoftMaxDerivative_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, SoftMaxDerivative::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_SoftMaxDerivative_init_(t_SoftMaxDerivative *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
SoftMaxDerivative object((jobject) NULL); | |
INT_CALL(object = SoftMaxDerivative()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
SoftMaxDerivative object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = SoftMaxDerivative(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
SoftMaxDerivative object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = SoftMaxDerivative(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
SoftMaxDerivative object((jobject) NULL); | |
if (!parseArgs(args, "kkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = SoftMaxDerivative(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
SoftMaxDerivative object((jobject) NULL); | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = SoftMaxDerivative(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_SoftMaxDerivative_exec(t_SoftMaxDerivative *self, PyObject *args) | |
{ | |
JArray< jint > a0((jobject) NULL); | |
if (!parseArgs(args, "[I", &a0)) | |
{ | |
OBJ_CALL(self->object.exec(a0)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(SoftMaxDerivative), (PyObject *) self, "exec", args, 2); | |
} | |
static PyObject *t_SoftMaxDerivative_isExecSpecial(t_SoftMaxDerivative *self, PyObject *args) | |
{ | |
jboolean result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.isExecSpecial()); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(SoftMaxDerivative), (PyObject *) self, "isExecSpecial", args, 2); | |
} | |
static PyObject *t_SoftMaxDerivative_name(t_SoftMaxDerivative *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(SoftMaxDerivative), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_SoftMaxDerivative_op(t_SoftMaxDerivative *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(SoftMaxDerivative), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_SoftMaxDerivative_opForDimension(t_SoftMaxDerivative *self, PyObject *args) | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(SoftMaxDerivative), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_SoftMaxDerivative_opNum(t_SoftMaxDerivative *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(SoftMaxDerivative), (PyObject *) self, "opNum", args, 2); | |
} | |
static PyObject *t_SoftMaxDerivative_get__execSpecial(t_SoftMaxDerivative *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isExecSpecial()); | |
Py_RETURN_BOOL(value); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/scalar/comparison/ScalarLessThanOrEqual.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/Number.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace scalar { | |
namespace comparison { | |
::java::lang::Class *ScalarLessThanOrEqual::class$ = NULL; | |
jmethodID *ScalarLessThanOrEqual::mids$ = NULL; | |
bool ScalarLessThanOrEqual::live$ = false; | |
jclass ScalarLessThanOrEqual::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/scalar/comparison/ScalarLessThanOrEqual"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_6f98608a] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Ljava/lang/Number;)V"); | |
mids$[mid_init$_c952a13f] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;JLjava/lang/Number;)V"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
ScalarLessThanOrEqual::ScalarLessThanOrEqual() : ::org::nd4j::linalg::api::ops::BaseScalarOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
ScalarLessThanOrEqual::ScalarLessThanOrEqual(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::java::lang::Number & a1) : ::org::nd4j::linalg::api::ops::BaseScalarOp(env->newObject(initializeClass, &mids$, mid_init$_6f98608a, a0.this$, a1.this$)) {} | |
ScalarLessThanOrEqual::ScalarLessThanOrEqual(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3, const ::java::lang::Number & a4) : ::org::nd4j::linalg::api::ops::BaseScalarOp(env->newObject(initializeClass, &mids$, mid_init$_c952a13f, a0.this$, a1.this$, a2.this$, a3, a4.this$)) {} | |
::java::lang::String ScalarLessThanOrEqual::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jfloat ScalarLessThanOrEqual::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble ScalarLessThanOrEqual::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jdouble ScalarLessThanOrEqual::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
jfloat ScalarLessThanOrEqual::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op ScalarLessThanOrEqual::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
::org::nd4j::linalg::api::ops::Op ScalarLessThanOrEqual::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
jint ScalarLessThanOrEqual::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace scalar { | |
namespace comparison { | |
static PyObject *t_ScalarLessThanOrEqual_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_ScalarLessThanOrEqual_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_ScalarLessThanOrEqual_init_(t_ScalarLessThanOrEqual *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_ScalarLessThanOrEqual_name(t_ScalarLessThanOrEqual *self, PyObject *args); | |
static PyObject *t_ScalarLessThanOrEqual_op(t_ScalarLessThanOrEqual *self, PyObject *args); | |
static PyObject *t_ScalarLessThanOrEqual_opForDimension(t_ScalarLessThanOrEqual *self, PyObject *args); | |
static PyObject *t_ScalarLessThanOrEqual_opNum(t_ScalarLessThanOrEqual *self, PyObject *args); | |
static PyMethodDef t_ScalarLessThanOrEqual__methods_[] = { | |
DECLARE_METHOD(t_ScalarLessThanOrEqual, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ScalarLessThanOrEqual, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ScalarLessThanOrEqual, name, METH_VARARGS), | |
DECLARE_METHOD(t_ScalarLessThanOrEqual, op, METH_VARARGS), | |
DECLARE_METHOD(t_ScalarLessThanOrEqual, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_ScalarLessThanOrEqual, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(ScalarLessThanOrEqual, t_ScalarLessThanOrEqual, ::org::nd4j::linalg::api::ops::BaseScalarOp, ScalarLessThanOrEqual, t_ScalarLessThanOrEqual_init_, 0, 0, 0, 0, 0); | |
void t_ScalarLessThanOrEqual::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(ScalarLessThanOrEqual), module, "ScalarLessThanOrEqual", 0); | |
} | |
void t_ScalarLessThanOrEqual::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(ScalarLessThanOrEqual).tp_dict, "class_", make_descriptor(ScalarLessThanOrEqual::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(ScalarLessThanOrEqual).tp_dict, "wrapfn_", make_descriptor(t_ScalarLessThanOrEqual::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(ScalarLessThanOrEqual).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_ScalarLessThanOrEqual_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, ScalarLessThanOrEqual::initializeClass, 1))) | |
return NULL; | |
return t_ScalarLessThanOrEqual::wrap_Object(ScalarLessThanOrEqual(((t_ScalarLessThanOrEqual *) arg)->object.this$)); | |
} | |
static PyObject *t_ScalarLessThanOrEqual_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, ScalarLessThanOrEqual::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_ScalarLessThanOrEqual_init_(t_ScalarLessThanOrEqual *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
ScalarLessThanOrEqual object((jobject) NULL); | |
INT_CALL(object = ScalarLessThanOrEqual()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::java::lang::Number a1((jobject) NULL); | |
ScalarLessThanOrEqual object((jobject) NULL); | |
if (!parseArgs(args, "kO", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &::java::lang::PY_TYPE(Number), &a0, &a1)) | |
{ | |
INT_CALL(object = ScalarLessThanOrEqual(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 5: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
::java::lang::Number a4((jobject) NULL); | |
ScalarLessThanOrEqual object((jobject) NULL); | |
if (!parseArgs(args, "kkkJO", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &::java::lang::PY_TYPE(Number), &a0, &a1, &a2, &a3, &a4)) | |
{ | |
INT_CALL(object = ScalarLessThanOrEqual(a0, a1, a2, a3, a4)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_ScalarLessThanOrEqual_name(t_ScalarLessThanOrEqual *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(ScalarLessThanOrEqual), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_ScalarLessThanOrEqual_op(t_ScalarLessThanOrEqual *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(ScalarLessThanOrEqual), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_ScalarLessThanOrEqual_opForDimension(t_ScalarLessThanOrEqual *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(ScalarLessThanOrEqual), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_ScalarLessThanOrEqual_opNum(t_ScalarLessThanOrEqual *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(ScalarLessThanOrEqual), (PyObject *) self, "opNum", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/serializer/MinMaxSerializerStrategy.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/serializer/NormalizerType.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/NormalizerMinMaxScaler.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/serializer/NormalizerSerializerStrategy.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace preprocessor { | |
namespace serializer { | |
::java::lang::Class *MinMaxSerializerStrategy::class$ = NULL; | |
jmethodID *MinMaxSerializerStrategy::mids$ = NULL; | |
bool MinMaxSerializerStrategy::live$ = false; | |
jclass MinMaxSerializerStrategy::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/dataset/api/preprocessor/serializer/MinMaxSerializerStrategy"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_getSupportedType_a1ac016e] = env->getMethodID(cls, "getSupportedType", "()Lorg/nd4j/linalg/dataset/api/preprocessor/serializer/NormalizerType;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
MinMaxSerializerStrategy::MinMaxSerializerStrategy() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
::org::nd4j::linalg::dataset::api::preprocessor::serializer::NormalizerType MinMaxSerializerStrategy::getSupportedType() const | |
{ | |
return ::org::nd4j::linalg::dataset::api::preprocessor::serializer::NormalizerType(env->callObjectMethod(this$, mids$[mid_getSupportedType_a1ac016e])); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace preprocessor { | |
namespace serializer { | |
static PyObject *t_MinMaxSerializerStrategy_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_MinMaxSerializerStrategy_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_MinMaxSerializerStrategy_init_(t_MinMaxSerializerStrategy *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_MinMaxSerializerStrategy_getSupportedType(t_MinMaxSerializerStrategy *self); | |
static PyObject *t_MinMaxSerializerStrategy_get__supportedType(t_MinMaxSerializerStrategy *self, void *data); | |
static PyGetSetDef t_MinMaxSerializerStrategy__fields_[] = { | |
DECLARE_GET_FIELD(t_MinMaxSerializerStrategy, supportedType), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_MinMaxSerializerStrategy__methods_[] = { | |
DECLARE_METHOD(t_MinMaxSerializerStrategy, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_MinMaxSerializerStrategy, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_MinMaxSerializerStrategy, getSupportedType, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(MinMaxSerializerStrategy, t_MinMaxSerializerStrategy, ::java::lang::Object, MinMaxSerializerStrategy, t_MinMaxSerializerStrategy_init_, 0, 0, t_MinMaxSerializerStrategy__fields_, 0, 0); | |
void t_MinMaxSerializerStrategy::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(MinMaxSerializerStrategy), module, "MinMaxSerializerStrategy", 0); | |
} | |
void t_MinMaxSerializerStrategy::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(MinMaxSerializerStrategy).tp_dict, "class_", make_descriptor(MinMaxSerializerStrategy::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(MinMaxSerializerStrategy).tp_dict, "wrapfn_", make_descriptor(t_MinMaxSerializerStrategy::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(MinMaxSerializerStrategy).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_MinMaxSerializerStrategy_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, MinMaxSerializerStrategy::initializeClass, 1))) | |
return NULL; | |
return t_MinMaxSerializerStrategy::wrap_Object(MinMaxSerializerStrategy(((t_MinMaxSerializerStrategy *) arg)->object.this$)); | |
} | |
static PyObject *t_MinMaxSerializerStrategy_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, MinMaxSerializerStrategy::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_MinMaxSerializerStrategy_init_(t_MinMaxSerializerStrategy *self, PyObject *args, PyObject *kwds) | |
{ | |
MinMaxSerializerStrategy object((jobject) NULL); | |
INT_CALL(object = MinMaxSerializerStrategy()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_MinMaxSerializerStrategy_getSupportedType(t_MinMaxSerializerStrategy *self) | |
{ | |
::org::nd4j::linalg::dataset::api::preprocessor::serializer::NormalizerType result((jobject) NULL); | |
OBJ_CALL(result = self->object.getSupportedType()); | |
return ::org::nd4j::linalg::dataset::api::preprocessor::serializer::t_NormalizerType::wrap_Object(result); | |
} | |
static PyObject *t_MinMaxSerializerStrategy_get__supportedType(t_MinMaxSerializerStrategy *self, void *data) | |
{ | |
::org::nd4j::linalg::dataset::api::preprocessor::serializer::NormalizerType value((jobject) NULL); | |
OBJ_CALL(value = self->object.getSupportedType()); | |
return ::org::nd4j::linalg::dataset::api::preprocessor::serializer::t_NormalizerType::wrap_Object(value); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/compression/impl/Float16.h" | |
#include "org/nd4j/linalg/compression/CompressionType.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace compression { | |
namespace impl { | |
::java::lang::Class *Float16::class$ = NULL; | |
jmethodID *Float16::mids$ = NULL; | |
bool Float16::live$ = false; | |
jclass Float16::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/compression/impl/Float16"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_getCompressionType_720905ec] = env->getMethodID(cls, "getCompressionType", "()Lorg/nd4j/linalg/compression/CompressionType;"); | |
mids$[mid_getDescriptor_14c7b5c5] = env->getMethodID(cls, "getDescriptor", "()Ljava/lang/String;"); | |
mids$[mid_compressPointer_53d68b83] = env->getMethodID(cls, "compressPointer", "(Lorg/nd4j/linalg/api/buffer/DataBuffer$TypeEx;Lorg/bytedeco/javacpp/Pointer;II)Lorg/nd4j/linalg/compression/CompressedDataBuffer;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Float16::Float16() : ::org::nd4j::compression::impl::AbstractCompressor(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
::org::nd4j::linalg::compression::CompressionType Float16::getCompressionType() const | |
{ | |
return ::org::nd4j::linalg::compression::CompressionType(env->callObjectMethod(this$, mids$[mid_getCompressionType_720905ec])); | |
} | |
::java::lang::String Float16::getDescriptor() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_getDescriptor_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace compression { | |
namespace impl { | |
static PyObject *t_Float16_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Float16_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Float16_init_(t_Float16 *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Float16_getCompressionType(t_Float16 *self, PyObject *args); | |
static PyObject *t_Float16_getDescriptor(t_Float16 *self, PyObject *args); | |
static PyObject *t_Float16_get__compressionType(t_Float16 *self, void *data); | |
static PyObject *t_Float16_get__descriptor(t_Float16 *self, void *data); | |
static PyGetSetDef t_Float16__fields_[] = { | |
DECLARE_GET_FIELD(t_Float16, compressionType), | |
DECLARE_GET_FIELD(t_Float16, descriptor), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Float16__methods_[] = { | |
DECLARE_METHOD(t_Float16, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Float16, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Float16, getCompressionType, METH_VARARGS), | |
DECLARE_METHOD(t_Float16, getDescriptor, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Float16, t_Float16, ::org::nd4j::compression::impl::AbstractCompressor, Float16, t_Float16_init_, 0, 0, t_Float16__fields_, 0, 0); | |
void t_Float16::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Float16), module, "Float16", 0); | |
} | |
void t_Float16::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Float16).tp_dict, "class_", make_descriptor(Float16::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Float16).tp_dict, "wrapfn_", make_descriptor(t_Float16::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Float16).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Float16_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Float16::initializeClass, 1))) | |
return NULL; | |
return t_Float16::wrap_Object(Float16(((t_Float16 *) arg)->object.this$)); | |
} | |
static PyObject *t_Float16_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Float16::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Float16_init_(t_Float16 *self, PyObject *args, PyObject *kwds) | |
{ | |
Float16 object((jobject) NULL); | |
INT_CALL(object = Float16()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_Float16_getCompressionType(t_Float16 *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::compression::CompressionType result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getCompressionType()); | |
return ::org::nd4j::linalg::compression::t_CompressionType::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(Float16), (PyObject *) self, "getCompressionType", args, 2); | |
} | |
static PyObject *t_Float16_getDescriptor(t_Float16 *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getDescriptor()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Float16), (PyObject *) self, "getDescriptor", args, 2); | |
} | |
static PyObject *t_Float16_get__compressionType(t_Float16 *self, void *data) | |
{ | |
::org::nd4j::linalg::compression::CompressionType value((jobject) NULL); | |
OBJ_CALL(value = self->object.getCompressionType()); | |
return ::org::nd4j::linalg::compression::t_CompressionType::wrap_Object(value); | |
} | |
static PyObject *t_Float16_get__descriptor(t_Float16 *self, void *data) | |
{ | |
::java::lang::String value((jobject) NULL); | |
OBJ_CALL(value = self->object.getDescriptor()); | |
return j2p(value); | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/learning/AdaDelta$AdaDeltaAggregator.h" | |
#include "org/nd4j/linalg/learning/GradientUpdater.h" | |
#include "org/nd4j/linalg/learning/GradientUpdaterAggregator.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
::java::lang::Class *AdaDelta$AdaDeltaAggregator::class$ = NULL; | |
jmethodID *AdaDelta$AdaDeltaAggregator::mids$ = NULL; | |
bool AdaDelta$AdaDeltaAggregator::live$ = false; | |
jclass AdaDelta$AdaDeltaAggregator::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/learning/AdaDelta$AdaDeltaAggregator"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_aggregate_eeea4eab] = env->getMethodID(cls, "aggregate", "(Lorg/nd4j/linalg/learning/GradientUpdater;)V"); | |
mids$[mid_combine_37615f37] = env->getMethodID(cls, "combine", "(Lorg/nd4j/linalg/learning/GradientUpdaterAggregator;)Lorg/nd4j/linalg/learning/GradientUpdaterAggregator;"); | |
mids$[mid_getUpdater_a54e28ba] = env->getMethodID(cls, "getUpdater", "()Lorg/nd4j/linalg/learning/GradientUpdater;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
AdaDelta$AdaDeltaAggregator::AdaDelta$AdaDeltaAggregator() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
void AdaDelta$AdaDeltaAggregator::aggregate(const ::org::nd4j::linalg::learning::GradientUpdater & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_aggregate_eeea4eab], a0.this$); | |
} | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator AdaDelta$AdaDeltaAggregator::combine(const ::org::nd4j::linalg::learning::GradientUpdaterAggregator & a0) const | |
{ | |
return ::org::nd4j::linalg::learning::GradientUpdaterAggregator(env->callObjectMethod(this$, mids$[mid_combine_37615f37], a0.this$)); | |
} | |
::org::nd4j::linalg::learning::GradientUpdater AdaDelta$AdaDeltaAggregator::getUpdater() const | |
{ | |
return ::org::nd4j::linalg::learning::GradientUpdater(env->callObjectMethod(this$, mids$[mid_getUpdater_a54e28ba])); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_AdaDelta$AdaDeltaAggregator_init_(t_AdaDelta$AdaDeltaAggregator *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_aggregate(t_AdaDelta$AdaDeltaAggregator *self, PyObject *arg); | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_combine(t_AdaDelta$AdaDeltaAggregator *self, PyObject *arg); | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_getUpdater(t_AdaDelta$AdaDeltaAggregator *self); | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_get__updater(t_AdaDelta$AdaDeltaAggregator *self, void *data); | |
static PyGetSetDef t_AdaDelta$AdaDeltaAggregator__fields_[] = { | |
DECLARE_GET_FIELD(t_AdaDelta$AdaDeltaAggregator, updater), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_AdaDelta$AdaDeltaAggregator__methods_[] = { | |
DECLARE_METHOD(t_AdaDelta$AdaDeltaAggregator, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_AdaDelta$AdaDeltaAggregator, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_AdaDelta$AdaDeltaAggregator, aggregate, METH_O), | |
DECLARE_METHOD(t_AdaDelta$AdaDeltaAggregator, combine, METH_O), | |
DECLARE_METHOD(t_AdaDelta$AdaDeltaAggregator, getUpdater, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(AdaDelta$AdaDeltaAggregator, t_AdaDelta$AdaDeltaAggregator, ::java::lang::Object, AdaDelta$AdaDeltaAggregator, t_AdaDelta$AdaDeltaAggregator_init_, 0, 0, t_AdaDelta$AdaDeltaAggregator__fields_, 0, 0); | |
void t_AdaDelta$AdaDeltaAggregator::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(AdaDelta$AdaDeltaAggregator), module, "AdaDelta$AdaDeltaAggregator", 0); | |
} | |
void t_AdaDelta$AdaDeltaAggregator::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(AdaDelta$AdaDeltaAggregator).tp_dict, "class_", make_descriptor(AdaDelta$AdaDeltaAggregator::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(AdaDelta$AdaDeltaAggregator).tp_dict, "wrapfn_", make_descriptor(t_AdaDelta$AdaDeltaAggregator::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(AdaDelta$AdaDeltaAggregator).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, AdaDelta$AdaDeltaAggregator::initializeClass, 1))) | |
return NULL; | |
return t_AdaDelta$AdaDeltaAggregator::wrap_Object(AdaDelta$AdaDeltaAggregator(((t_AdaDelta$AdaDeltaAggregator *) arg)->object.this$)); | |
} | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, AdaDelta$AdaDeltaAggregator::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_AdaDelta$AdaDeltaAggregator_init_(t_AdaDelta$AdaDeltaAggregator *self, PyObject *args, PyObject *kwds) | |
{ | |
AdaDelta$AdaDeltaAggregator object((jobject) NULL); | |
INT_CALL(object = AdaDelta$AdaDeltaAggregator()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_aggregate(t_AdaDelta$AdaDeltaAggregator *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::learning::GradientUpdater::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.aggregate(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "aggregate", arg); | |
return NULL; | |
} | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_combine(t_AdaDelta$AdaDeltaAggregator *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator a0((jobject) NULL); | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator result((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::learning::GradientUpdaterAggregator::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.combine(a0)); | |
return ::org::nd4j::linalg::learning::t_GradientUpdaterAggregator::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "combine", arg); | |
return NULL; | |
} | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_getUpdater(t_AdaDelta$AdaDeltaAggregator *self) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater result((jobject) NULL); | |
OBJ_CALL(result = self->object.getUpdater()); | |
return ::org::nd4j::linalg::learning::t_GradientUpdater::wrap_Object(result); | |
} | |
static PyObject *t_AdaDelta$AdaDeltaAggregator_get__updater(t_AdaDelta$AdaDeltaAggregator *self, void *data) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater value((jobject) NULL); | |
OBJ_CALL(value = self->object.getUpdater()); | |
return ::org::nd4j::linalg::learning::t_GradientUpdater::wrap_Object(value); | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/grid/FreeGridOp.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace grid { | |
::java::lang::Class *FreeGridOp::class$ = NULL; | |
jmethodID *FreeGridOp::mids$ = NULL; | |
bool FreeGridOp::live$ = false; | |
jclass FreeGridOp::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/grid/FreeGridOp"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_77ea0352] = env->getMethodID(cls, "<init>", "([Lorg/nd4j/linalg/api/ops/Op;)V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
FreeGridOp::FreeGridOp() : ::org::nd4j::linalg::api::ops::impl::grid::BaseGridOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
FreeGridOp::FreeGridOp(const JArray< ::org::nd4j::linalg::api::ops::Op > & a0) : ::org::nd4j::linalg::api::ops::impl::grid::BaseGridOp(env->newObject(initializeClass, &mids$, mid_init$_77ea0352, a0.this$)) {} | |
FreeGridOp::FreeGridOp(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::impl::grid::BaseGridOp(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
::java::lang::String FreeGridOp::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jint FreeGridOp::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace grid { | |
static PyObject *t_FreeGridOp_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_FreeGridOp_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_FreeGridOp_init_(t_FreeGridOp *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_FreeGridOp_name(t_FreeGridOp *self, PyObject *args); | |
static PyObject *t_FreeGridOp_opNum(t_FreeGridOp *self, PyObject *args); | |
static PyMethodDef t_FreeGridOp__methods_[] = { | |
DECLARE_METHOD(t_FreeGridOp, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_FreeGridOp, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_FreeGridOp, name, METH_VARARGS), | |
DECLARE_METHOD(t_FreeGridOp, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(FreeGridOp, t_FreeGridOp, ::org::nd4j::linalg::api::ops::impl::grid::BaseGridOp, FreeGridOp, t_FreeGridOp_init_, 0, 0, 0, 0, 0); | |
void t_FreeGridOp::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(FreeGridOp), module, "FreeGridOp", 0); | |
} | |
void t_FreeGridOp::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(FreeGridOp).tp_dict, "class_", make_descriptor(FreeGridOp::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(FreeGridOp).tp_dict, "wrapfn_", make_descriptor(t_FreeGridOp::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(FreeGridOp).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_FreeGridOp_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, FreeGridOp::initializeClass, 1))) | |
return NULL; | |
return t_FreeGridOp::wrap_Object(FreeGridOp(((t_FreeGridOp *) arg)->object.this$)); | |
} | |
static PyObject *t_FreeGridOp_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, FreeGridOp::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_FreeGridOp_init_(t_FreeGridOp *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
FreeGridOp object((jobject) NULL); | |
INT_CALL(object = FreeGridOp()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
JArray< ::org::nd4j::linalg::api::ops::Op > a0((jobject) NULL); | |
FreeGridOp object((jobject) NULL); | |
if (!parseArgs(args, "[k", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0)) | |
{ | |
INT_CALL(object = FreeGridOp(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
FreeGridOp object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = FreeGridOp(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_FreeGridOp_name(t_FreeGridOp *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(FreeGridOp), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_FreeGridOp_opNum(t_FreeGridOp *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(FreeGridOp), (PyObject *) self, "opNum", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/TadCollapseAccumulation.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/Object.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
::java::lang::Class *TadCollapseAccumulation::class$ = NULL; | |
jmethodID *TadCollapseAccumulation::mids$ = NULL; | |
bool TadCollapseAccumulation::live$ = false; | |
::java::lang::String *TadCollapseAccumulation::DEFAULT_NAME = NULL; | |
jclass TadCollapseAccumulation::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/TadCollapseAccumulation"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_21aaa252] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ops/Op;)V"); | |
mids$[mid_init$_602f48f0] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ops/Op;)V"); | |
mids$[mid_init$_ca076fb4] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ops/Op;[I)V"); | |
mids$[mid_init$_021d0096] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ops/Op;)V"); | |
mids$[mid_init$_2dd1043e] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ops/Op;[I[I)V"); | |
mids$[mid_init$_03c47137] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ops/Op;[I[IZ)V"); | |
mids$[mid_init$_b37479e7] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;JLorg/nd4j/linalg/api/ops/Op;)V"); | |
mids$[mid_init$_60547781] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;JLorg/nd4j/linalg/api/ops/Op;)V"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_exec_54c6a166] = env->getMethodID(cls, "exec", "()V"); | |
mids$[mid_exec_1efc2008] = env->getMethodID(cls, "exec", "([I)V"); | |
mids$[mid_getAccum_db7029d3] = env->getMethodID(cls, "getAccum", "()Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_getOriginalDimension_dab10e75] = env->getMethodID(cls, "getOriginalDimension", "()[I"); | |
mids$[mid_getSmallerDimension_dab10e75] = env->getMethodID(cls, "getSmallerDimension", "()[I"); | |
mids$[mid_getTadsForLargerDimension_54c6a179] = env->getMethodID(cls, "getTadsForLargerDimension", "()I"); | |
mids$[mid_getTadsForSmallerDimension_54c6a179] = env->getMethodID(cls, "getTadsForSmallerDimension", "()I"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_isPassThrough_54c6a16a] = env->getMethodID(cls, "isPassThrough", "()Z"); | |
mids$[mid_isPerformSmallerDimension_54c6a16a] = env->getMethodID(cls, "isPerformSmallerDimension", "()Z"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
mids$[mid_reductionIndexForLinear_eca84e7b] = env->getStaticMethodID(cls, "reductionIndexForLinear", "(IIIII)I"); | |
mids$[mid_reductionIndexForTad_d3236abb] = env->getStaticMethodID(cls, "reductionIndexForTad", "(III)I"); | |
mids$[mid_setAccum_21aaa252] = env->getMethodID(cls, "setAccum", "(Lorg/nd4j/linalg/api/ops/Op;)V"); | |
mids$[mid_setOriginalDimension_1efc2008] = env->getMethodID(cls, "setOriginalDimension", "([I)V"); | |
mids$[mid_setPerformSmallerDimension_bb0c767f] = env->getMethodID(cls, "setPerformSmallerDimension", "(Z)V"); | |
mids$[mid_setSmallerDimension_1efc2008] = env->getMethodID(cls, "setSmallerDimension", "([I)V"); | |
mids$[mid_setTadsForLargerDimension_39c7bd3c] = env->getMethodID(cls, "setTadsForLargerDimension", "(I)V"); | |
mids$[mid_setTadsForSmallerDimension_39c7bd3c] = env->getMethodID(cls, "setTadsForSmallerDimension", "(I)V"); | |
mids$[mid_tadIndex_d3236abb] = env->getStaticMethodID(cls, "tadIndex", "(III)I"); | |
mids$[mid_tadsPerReduceIndex_d8d154b9] = env->getStaticMethodID(cls, "tadsPerReduceIndex", "(II)I"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
mids$[mid_x_eef1d225] = env->getMethodID(cls, "x", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_y_eef1d225] = env->getMethodID(cls, "y", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_z_eef1d225] = env->getMethodID(cls, "z", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
cls = (jclass) class$->this$; | |
DEFAULT_NAME = new ::java::lang::String(env->getStaticObjectField(cls, "DEFAULT_NAME", "Ljava/lang/String;")); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
TadCollapseAccumulation::TadCollapseAccumulation() : ::org::nd4j::linalg::api::ops::BaseOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
TadCollapseAccumulation::TadCollapseAccumulation(const ::org::nd4j::linalg::api::ops::Op & a0) : ::org::nd4j::linalg::api::ops::BaseOp(env->newObject(initializeClass, &mids$, mid_init$_21aaa252, a0.this$)) {} | |
TadCollapseAccumulation::TadCollapseAccumulation(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ops::Op & a1) : ::org::nd4j::linalg::api::ops::BaseOp(env->newObject(initializeClass, &mids$, mid_init$_602f48f0, a0.this$, a1.this$)) {} | |
TadCollapseAccumulation::TadCollapseAccumulation(const ::org::nd4j::linalg::api::ops::Op & a0, const JArray< jint > & a1) : ::org::nd4j::linalg::api::ops::BaseOp(env->newObject(initializeClass, &mids$, mid_init$_ca076fb4, a0.this$, a1.this$)) {} | |
TadCollapseAccumulation::TadCollapseAccumulation(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ops::Op & a2) : ::org::nd4j::linalg::api::ops::BaseOp(env->newObject(initializeClass, &mids$, mid_init$_021d0096, a0.this$, a1.this$, a2.this$)) {} | |
TadCollapseAccumulation::TadCollapseAccumulation(const ::org::nd4j::linalg::api::ops::Op & a0, const JArray< jint > & a1, const JArray< jint > & a2) : ::org::nd4j::linalg::api::ops::BaseOp(env->newObject(initializeClass, &mids$, mid_init$_2dd1043e, a0.this$, a1.this$, a2.this$)) {} | |
TadCollapseAccumulation::TadCollapseAccumulation(const ::org::nd4j::linalg::api::ops::Op & a0, const JArray< jint > & a1, const JArray< jint > & a2, jboolean a3) : ::org::nd4j::linalg::api::ops::BaseOp(env->newObject(initializeClass, &mids$, mid_init$_03c47137, a0.this$, a1.this$, a2.this$, a3)) {} | |
TadCollapseAccumulation::TadCollapseAccumulation(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2, const ::org::nd4j::linalg::api::ops::Op & a3) : ::org::nd4j::linalg::api::ops::BaseOp(env->newObject(initializeClass, &mids$, mid_init$_b37479e7, a0.this$, a1.this$, a2, a3.this$)) {} | |
TadCollapseAccumulation::TadCollapseAccumulation(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3, const ::org::nd4j::linalg::api::ops::Op & a4) : ::org::nd4j::linalg::api::ops::BaseOp(env->newObject(initializeClass, &mids$, mid_init$_60547781, a0.this$, a1.this$, a2.this$, a3, a4.this$)) {} | |
jboolean TadCollapseAccumulation::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
void TadCollapseAccumulation::exec() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_54c6a166]); | |
} | |
void TadCollapseAccumulation::exec(const JArray< jint > & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_1efc2008], a0.this$); | |
} | |
::org::nd4j::linalg::api::ops::Op TadCollapseAccumulation::getAccum() const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_getAccum_db7029d3])); | |
} | |
JArray< jint > TadCollapseAccumulation::getOriginalDimension() const | |
{ | |
return JArray< jint >(env->callObjectMethod(this$, mids$[mid_getOriginalDimension_dab10e75])); | |
} | |
JArray< jint > TadCollapseAccumulation::getSmallerDimension() const | |
{ | |
return JArray< jint >(env->callObjectMethod(this$, mids$[mid_getSmallerDimension_dab10e75])); | |
} | |
jint TadCollapseAccumulation::getTadsForLargerDimension() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getTadsForLargerDimension_54c6a179]); | |
} | |
jint TadCollapseAccumulation::getTadsForSmallerDimension() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getTadsForSmallerDimension_54c6a179]); | |
} | |
jint TadCollapseAccumulation::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
jboolean TadCollapseAccumulation::isPassThrough() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isPassThrough_54c6a16a]); | |
} | |
jboolean TadCollapseAccumulation::isPerformSmallerDimension() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isPerformSmallerDimension_54c6a16a]); | |
} | |
::java::lang::String TadCollapseAccumulation::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jfloat TadCollapseAccumulation::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble TadCollapseAccumulation::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jfloat TadCollapseAccumulation::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
jdouble TadCollapseAccumulation::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op TadCollapseAccumulation::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
::org::nd4j::linalg::api::ops::Op TadCollapseAccumulation::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
jint TadCollapseAccumulation::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
jint TadCollapseAccumulation::reductionIndexForLinear(jint a0, jint a1, jint a2, jint a3, jint a4) | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return env->callStaticIntMethod(cls, mids$[mid_reductionIndexForLinear_eca84e7b], a0, a1, a2, a3, a4); | |
} | |
jint TadCollapseAccumulation::reductionIndexForTad(jint a0, jint a1, jint a2) | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return env->callStaticIntMethod(cls, mids$[mid_reductionIndexForTad_d3236abb], a0, a1, a2); | |
} | |
void TadCollapseAccumulation::setAccum(const ::org::nd4j::linalg::api::ops::Op & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setAccum_21aaa252], a0.this$); | |
} | |
void TadCollapseAccumulation::setOriginalDimension(const JArray< jint > & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setOriginalDimension_1efc2008], a0.this$); | |
} | |
void TadCollapseAccumulation::setPerformSmallerDimension(jboolean a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setPerformSmallerDimension_bb0c767f], a0); | |
} | |
void TadCollapseAccumulation::setSmallerDimension(const JArray< jint > & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setSmallerDimension_1efc2008], a0.this$); | |
} | |
void TadCollapseAccumulation::setTadsForLargerDimension(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setTadsForLargerDimension_39c7bd3c], a0); | |
} | |
void TadCollapseAccumulation::setTadsForSmallerDimension(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setTadsForSmallerDimension_39c7bd3c], a0); | |
} | |
jint TadCollapseAccumulation::tadIndex(jint a0, jint a1, jint a2) | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return env->callStaticIntMethod(cls, mids$[mid_tadIndex_d3236abb], a0, a1, a2); | |
} | |
jint TadCollapseAccumulation::tadsPerReduceIndex(jint a0, jint a1) | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return env->callStaticIntMethod(cls, mids$[mid_tadsPerReduceIndex_d8d154b9], a0, a1); | |
} | |
::java::lang::String TadCollapseAccumulation::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray TadCollapseAccumulation::x() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_x_eef1d225])); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray TadCollapseAccumulation::y() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_y_eef1d225])); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray TadCollapseAccumulation::z() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_z_eef1d225])); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
static PyObject *t_TadCollapseAccumulation_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_TadCollapseAccumulation_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_TadCollapseAccumulation_init_(t_TadCollapseAccumulation *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_TadCollapseAccumulation_equals(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_exec(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_getAccum(t_TadCollapseAccumulation *self); | |
static PyObject *t_TadCollapseAccumulation_getOriginalDimension(t_TadCollapseAccumulation *self); | |
static PyObject *t_TadCollapseAccumulation_getSmallerDimension(t_TadCollapseAccumulation *self); | |
static PyObject *t_TadCollapseAccumulation_getTadsForLargerDimension(t_TadCollapseAccumulation *self); | |
static PyObject *t_TadCollapseAccumulation_getTadsForSmallerDimension(t_TadCollapseAccumulation *self); | |
static PyObject *t_TadCollapseAccumulation_hashCode(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_isPassThrough(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_isPerformSmallerDimension(t_TadCollapseAccumulation *self); | |
static PyObject *t_TadCollapseAccumulation_name(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_op(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_opForDimension(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_opNum(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_reductionIndexForLinear(PyTypeObject *type, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_reductionIndexForTad(PyTypeObject *type, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_setAccum(t_TadCollapseAccumulation *self, PyObject *arg); | |
static PyObject *t_TadCollapseAccumulation_setOriginalDimension(t_TadCollapseAccumulation *self, PyObject *arg); | |
static PyObject *t_TadCollapseAccumulation_setPerformSmallerDimension(t_TadCollapseAccumulation *self, PyObject *arg); | |
static PyObject *t_TadCollapseAccumulation_setSmallerDimension(t_TadCollapseAccumulation *self, PyObject *arg); | |
static PyObject *t_TadCollapseAccumulation_setTadsForLargerDimension(t_TadCollapseAccumulation *self, PyObject *arg); | |
static PyObject *t_TadCollapseAccumulation_setTadsForSmallerDimension(t_TadCollapseAccumulation *self, PyObject *arg); | |
static PyObject *t_TadCollapseAccumulation_tadIndex(PyTypeObject *type, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_tadsPerReduceIndex(PyTypeObject *type, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_toString(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_x(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_y(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_z(t_TadCollapseAccumulation *self, PyObject *args); | |
static PyObject *t_TadCollapseAccumulation_get__accum(t_TadCollapseAccumulation *self, void *data); | |
static int t_TadCollapseAccumulation_set__accum(t_TadCollapseAccumulation *self, PyObject *arg, void *data); | |
static PyObject *t_TadCollapseAccumulation_get__originalDimension(t_TadCollapseAccumulation *self, void *data); | |
static int t_TadCollapseAccumulation_set__originalDimension(t_TadCollapseAccumulation *self, PyObject *arg, void *data); | |
static PyObject *t_TadCollapseAccumulation_get__passThrough(t_TadCollapseAccumulation *self, void *data); | |
static PyObject *t_TadCollapseAccumulation_get__performSmallerDimension(t_TadCollapseAccumulation *self, void *data); | |
static int t_TadCollapseAccumulation_set__performSmallerDimension(t_TadCollapseAccumulation *self, PyObject *arg, void *data); | |
static PyObject *t_TadCollapseAccumulation_get__smallerDimension(t_TadCollapseAccumulation *self, void *data); | |
static int t_TadCollapseAccumulation_set__smallerDimension(t_TadCollapseAccumulation *self, PyObject *arg, void *data); | |
static PyObject *t_TadCollapseAccumulation_get__tadsForLargerDimension(t_TadCollapseAccumulation *self, void *data); | |
static int t_TadCollapseAccumulation_set__tadsForLargerDimension(t_TadCollapseAccumulation *self, PyObject *arg, void *data); | |
static PyObject *t_TadCollapseAccumulation_get__tadsForSmallerDimension(t_TadCollapseAccumulation *self, void *data); | |
static int t_TadCollapseAccumulation_set__tadsForSmallerDimension(t_TadCollapseAccumulation *self, PyObject *arg, void *data); | |
static PyGetSetDef t_TadCollapseAccumulation__fields_[] = { | |
DECLARE_GETSET_FIELD(t_TadCollapseAccumulation, accum), | |
DECLARE_GETSET_FIELD(t_TadCollapseAccumulation, originalDimension), | |
DECLARE_GET_FIELD(t_TadCollapseAccumulation, passThrough), | |
DECLARE_GETSET_FIELD(t_TadCollapseAccumulation, performSmallerDimension), | |
DECLARE_GETSET_FIELD(t_TadCollapseAccumulation, smallerDimension), | |
DECLARE_GETSET_FIELD(t_TadCollapseAccumulation, tadsForLargerDimension), | |
DECLARE_GETSET_FIELD(t_TadCollapseAccumulation, tadsForSmallerDimension), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_TadCollapseAccumulation__methods_[] = { | |
DECLARE_METHOD(t_TadCollapseAccumulation, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, equals, METH_VARARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, exec, METH_VARARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, getAccum, METH_NOARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, getOriginalDimension, METH_NOARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, getSmallerDimension, METH_NOARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, getTadsForLargerDimension, METH_NOARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, getTadsForSmallerDimension, METH_NOARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, isPassThrough, METH_VARARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, isPerformSmallerDimension, METH_NOARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, name, METH_VARARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, op, METH_VARARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, opNum, METH_VARARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, reductionIndexForLinear, METH_VARARGS | METH_CLASS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, reductionIndexForTad, METH_VARARGS | METH_CLASS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, setAccum, METH_O), | |
DECLARE_METHOD(t_TadCollapseAccumulation, setOriginalDimension, METH_O), | |
DECLARE_METHOD(t_TadCollapseAccumulation, setPerformSmallerDimension, METH_O), | |
DECLARE_METHOD(t_TadCollapseAccumulation, setSmallerDimension, METH_O), | |
DECLARE_METHOD(t_TadCollapseAccumulation, setTadsForLargerDimension, METH_O), | |
DECLARE_METHOD(t_TadCollapseAccumulation, setTadsForSmallerDimension, METH_O), | |
DECLARE_METHOD(t_TadCollapseAccumulation, tadIndex, METH_VARARGS | METH_CLASS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, tadsPerReduceIndex, METH_VARARGS | METH_CLASS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, toString, METH_VARARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, x, METH_VARARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, y, METH_VARARGS), | |
DECLARE_METHOD(t_TadCollapseAccumulation, z, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(TadCollapseAccumulation, t_TadCollapseAccumulation, ::org::nd4j::linalg::api::ops::BaseOp, TadCollapseAccumulation, t_TadCollapseAccumulation_init_, 0, 0, t_TadCollapseAccumulation__fields_, 0, 0); | |
void t_TadCollapseAccumulation::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(TadCollapseAccumulation), module, "TadCollapseAccumulation", 0); | |
} | |
void t_TadCollapseAccumulation::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(TadCollapseAccumulation).tp_dict, "class_", make_descriptor(TadCollapseAccumulation::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(TadCollapseAccumulation).tp_dict, "wrapfn_", make_descriptor(t_TadCollapseAccumulation::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(TadCollapseAccumulation).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
env->getClass(TadCollapseAccumulation::initializeClass); | |
PyDict_SetItemString(PY_TYPE(TadCollapseAccumulation).tp_dict, "DEFAULT_NAME", make_descriptor(j2p(*TadCollapseAccumulation::DEFAULT_NAME))); | |
} | |
static PyObject *t_TadCollapseAccumulation_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, TadCollapseAccumulation::initializeClass, 1))) | |
return NULL; | |
return t_TadCollapseAccumulation::wrap_Object(TadCollapseAccumulation(((t_TadCollapseAccumulation *) arg)->object.this$)); | |
} | |
static PyObject *t_TadCollapseAccumulation_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, TadCollapseAccumulation::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_TadCollapseAccumulation_init_(t_TadCollapseAccumulation *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
TadCollapseAccumulation object((jobject) NULL); | |
INT_CALL(object = TadCollapseAccumulation()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
TadCollapseAccumulation object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0)) | |
{ | |
INT_CALL(object = TadCollapseAccumulation(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op a1((jobject) NULL); | |
TadCollapseAccumulation object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = TadCollapseAccumulation(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
JArray< jint > a1((jobject) NULL); | |
TadCollapseAccumulation object((jobject) NULL); | |
if (!parseArgs(args, "k[I", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = TadCollapseAccumulation(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op a2((jobject) NULL); | |
TadCollapseAccumulation object((jobject) NULL); | |
if (!parseArgs(args, "kkk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = TadCollapseAccumulation(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
JArray< jint > a1((jobject) NULL); | |
JArray< jint > a2((jobject) NULL); | |
TadCollapseAccumulation object((jobject) NULL); | |
if (!parseArgs(args, "k[I[I", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = TadCollapseAccumulation(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
JArray< jint > a1((jobject) NULL); | |
JArray< jint > a2((jobject) NULL); | |
jboolean a3; | |
TadCollapseAccumulation object((jobject) NULL); | |
if (!parseArgs(args, "k[I[IZ", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = TadCollapseAccumulation(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
::org::nd4j::linalg::api::ops::Op a3((jobject) NULL); | |
TadCollapseAccumulation object((jobject) NULL); | |
if (!parseArgs(args, "kkJk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = TadCollapseAccumulation(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 5: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
::org::nd4j::linalg::api::ops::Op a4((jobject) NULL); | |
TadCollapseAccumulation object((jobject) NULL); | |
if (!parseArgs(args, "kkkJk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0, &a1, &a2, &a3, &a4)) | |
{ | |
INT_CALL(object = TadCollapseAccumulation(a0, a1, a2, a3, a4)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_TadCollapseAccumulation_equals(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_exec(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
OBJ_CALL(self->object.exec()); | |
Py_RETURN_NONE; | |
} | |
break; | |
case 1: | |
{ | |
JArray< jint > a0((jobject) NULL); | |
if (!parseArgs(args, "[I", &a0)) | |
{ | |
OBJ_CALL(self->object.exec(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "exec", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_getAccum(t_TadCollapseAccumulation *self) | |
{ | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
OBJ_CALL(result = self->object.getAccum()); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
static PyObject *t_TadCollapseAccumulation_getOriginalDimension(t_TadCollapseAccumulation *self) | |
{ | |
JArray< jint > result((jobject) NULL); | |
OBJ_CALL(result = self->object.getOriginalDimension()); | |
return result.wrap(); | |
} | |
static PyObject *t_TadCollapseAccumulation_getSmallerDimension(t_TadCollapseAccumulation *self) | |
{ | |
JArray< jint > result((jobject) NULL); | |
OBJ_CALL(result = self->object.getSmallerDimension()); | |
return result.wrap(); | |
} | |
static PyObject *t_TadCollapseAccumulation_getTadsForLargerDimension(t_TadCollapseAccumulation *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.getTadsForLargerDimension()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_TadCollapseAccumulation_getTadsForSmallerDimension(t_TadCollapseAccumulation *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.getTadsForSmallerDimension()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_TadCollapseAccumulation_hashCode(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_isPassThrough(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
jboolean result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.isPassThrough()); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "isPassThrough", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_isPerformSmallerDimension(t_TadCollapseAccumulation *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.isPerformSmallerDimension()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_TadCollapseAccumulation_name(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_op(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_opForDimension(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_opNum(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "opNum", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_reductionIndexForLinear(PyTypeObject *type, PyObject *args) | |
{ | |
jint a0; | |
jint a1; | |
jint a2; | |
jint a3; | |
jint a4; | |
jint result; | |
if (!parseArgs(args, "IIIII", &a0, &a1, &a2, &a3, &a4)) | |
{ | |
OBJ_CALL(result = ::org::nd4j::linalg::api::ops::TadCollapseAccumulation::reductionIndexForLinear(a0, a1, a2, a3, a4)); | |
return PyInt_FromLong((long) result); | |
} | |
PyErr_SetArgsError(type, "reductionIndexForLinear", args); | |
return NULL; | |
} | |
static PyObject *t_TadCollapseAccumulation_reductionIndexForTad(PyTypeObject *type, PyObject *args) | |
{ | |
jint a0; | |
jint a1; | |
jint a2; | |
jint result; | |
if (!parseArgs(args, "III", &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(result = ::org::nd4j::linalg::api::ops::TadCollapseAccumulation::reductionIndexForTad(a0, a1, a2)); | |
return PyInt_FromLong((long) result); | |
} | |
PyErr_SetArgsError(type, "reductionIndexForTad", args); | |
return NULL; | |
} | |
static PyObject *t_TadCollapseAccumulation_setAccum(t_TadCollapseAccumulation *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.setAccum(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setAccum", arg); | |
return NULL; | |
} | |
static PyObject *t_TadCollapseAccumulation_setOriginalDimension(t_TadCollapseAccumulation *self, PyObject *arg) | |
{ | |
JArray< jint > a0((jobject) NULL); | |
if (!parseArg(arg, "[I", &a0)) | |
{ | |
OBJ_CALL(self->object.setOriginalDimension(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setOriginalDimension", arg); | |
return NULL; | |
} | |
static PyObject *t_TadCollapseAccumulation_setPerformSmallerDimension(t_TadCollapseAccumulation *self, PyObject *arg) | |
{ | |
jboolean a0; | |
if (!parseArg(arg, "Z", &a0)) | |
{ | |
OBJ_CALL(self->object.setPerformSmallerDimension(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setPerformSmallerDimension", arg); | |
return NULL; | |
} | |
static PyObject *t_TadCollapseAccumulation_setSmallerDimension(t_TadCollapseAccumulation *self, PyObject *arg) | |
{ | |
JArray< jint > a0((jobject) NULL); | |
if (!parseArg(arg, "[I", &a0)) | |
{ | |
OBJ_CALL(self->object.setSmallerDimension(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setSmallerDimension", arg); | |
return NULL; | |
} | |
static PyObject *t_TadCollapseAccumulation_setTadsForLargerDimension(t_TadCollapseAccumulation *self, PyObject *arg) | |
{ | |
jint a0; | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.setTadsForLargerDimension(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setTadsForLargerDimension", arg); | |
return NULL; | |
} | |
static PyObject *t_TadCollapseAccumulation_setTadsForSmallerDimension(t_TadCollapseAccumulation *self, PyObject *arg) | |
{ | |
jint a0; | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.setTadsForSmallerDimension(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setTadsForSmallerDimension", arg); | |
return NULL; | |
} | |
static PyObject *t_TadCollapseAccumulation_tadIndex(PyTypeObject *type, PyObject *args) | |
{ | |
jint a0; | |
jint a1; | |
jint a2; | |
jint result; | |
if (!parseArgs(args, "III", &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(result = ::org::nd4j::linalg::api::ops::TadCollapseAccumulation::tadIndex(a0, a1, a2)); | |
return PyInt_FromLong((long) result); | |
} | |
PyErr_SetArgsError(type, "tadIndex", args); | |
return NULL; | |
} | |
static PyObject *t_TadCollapseAccumulation_tadsPerReduceIndex(PyTypeObject *type, PyObject *args) | |
{ | |
jint a0; | |
jint a1; | |
jint result; | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = ::org::nd4j::linalg::api::ops::TadCollapseAccumulation::tadsPerReduceIndex(a0, a1)); | |
return PyInt_FromLong((long) result); | |
} | |
PyErr_SetArgsError(type, "tadsPerReduceIndex", args); | |
return NULL; | |
} | |
static PyObject *t_TadCollapseAccumulation_toString(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "toString", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_x(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.x()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "x", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_y(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.y()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "y", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_z(t_TadCollapseAccumulation *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.z()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(TadCollapseAccumulation), (PyObject *) self, "z", args, 2); | |
} | |
static PyObject *t_TadCollapseAccumulation_get__accum(t_TadCollapseAccumulation *self, void *data) | |
{ | |
::org::nd4j::linalg::api::ops::Op value((jobject) NULL); | |
OBJ_CALL(value = self->object.getAccum()); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(value); | |
} | |
static int t_TadCollapseAccumulation_set__accum(t_TadCollapseAccumulation *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::api::ops::Op value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ops::Op::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setAccum(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "accum", arg); | |
return -1; | |
} | |
static PyObject *t_TadCollapseAccumulation_get__originalDimension(t_TadCollapseAccumulation *self, void *data) | |
{ | |
JArray< jint > value((jobject) NULL); | |
OBJ_CALL(value = self->object.getOriginalDimension()); | |
return value.wrap(); | |
} | |
static int t_TadCollapseAccumulation_set__originalDimension(t_TadCollapseAccumulation *self, PyObject *arg, void *data) | |
{ | |
{ | |
JArray< jint > value((jobject) NULL); | |
if (!parseArg(arg, "[I", &value)) | |
{ | |
INT_CALL(self->object.setOriginalDimension(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "originalDimension", arg); | |
return -1; | |
} | |
static PyObject *t_TadCollapseAccumulation_get__passThrough(t_TadCollapseAccumulation *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isPassThrough()); | |
Py_RETURN_BOOL(value); | |
} | |
static PyObject *t_TadCollapseAccumulation_get__performSmallerDimension(t_TadCollapseAccumulation *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isPerformSmallerDimension()); | |
Py_RETURN_BOOL(value); | |
} | |
static int t_TadCollapseAccumulation_set__performSmallerDimension(t_TadCollapseAccumulation *self, PyObject *arg, void *data) | |
{ | |
{ | |
jboolean value; | |
if (!parseArg(arg, "Z", &value)) | |
{ | |
INT_CALL(self->object.setPerformSmallerDimension(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "performSmallerDimension", arg); | |
return -1; | |
} | |
static PyObject *t_TadCollapseAccumulation_get__smallerDimension(t_TadCollapseAccumulation *self, void *data) | |
{ | |
JArray< jint > value((jobject) NULL); | |
OBJ_CALL(value = self->object.getSmallerDimension()); | |
return value.wrap(); | |
} | |
static int t_TadCollapseAccumulation_set__smallerDimension(t_TadCollapseAccumulation *self, PyObject *arg, void *data) | |
{ | |
{ | |
JArray< jint > value((jobject) NULL); | |
if (!parseArg(arg, "[I", &value)) | |
{ | |
INT_CALL(self->object.setSmallerDimension(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "smallerDimension", arg); | |
return -1; | |
} | |
static PyObject *t_TadCollapseAccumulation_get__tadsForLargerDimension(t_TadCollapseAccumulation *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getTadsForLargerDimension()); | |
return PyInt_FromLong((long) value); | |
} | |
static int t_TadCollapseAccumulation_set__tadsForLargerDimension(t_TadCollapseAccumulation *self, PyObject *arg, void *data) | |
{ | |
{ | |
jint value; | |
if (!parseArg(arg, "I", &value)) | |
{ | |
INT_CALL(self->object.setTadsForLargerDimension(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "tadsForLargerDimension", arg); | |
return -1; | |
} | |
static PyObject *t_TadCollapseAccumulation_get__tadsForSmallerDimension(t_TadCollapseAccumulation *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getTadsForSmallerDimension()); | |
return PyInt_FromLong((long) value); | |
} | |
static int t_TadCollapseAccumulation_set__tadsForSmallerDimension(t_TadCollapseAccumulation *self, PyObject *arg, void *data) | |
{ | |
{ | |
jint value; | |
if (!parseArg(arg, "I", &value)) | |
{ | |
INT_CALL(self->object.setTadsForSmallerDimension(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "tadsForSmallerDimension", arg); | |
return -1; | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/rng/distribution/BaseDistribution.h" | |
#include "org/nd4j/linalg/api/rng/Random.h" | |
#include "org/nd4j/linalg/api/rng/distribution/Distribution.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace rng { | |
namespace distribution { | |
::java::lang::Class *BaseDistribution::class$ = NULL; | |
jmethodID *BaseDistribution::mids$ = NULL; | |
bool BaseDistribution::live$ = false; | |
jclass BaseDistribution::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/rng/distribution/BaseDistribution"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_425a9c45] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/rng/Random;)V"); | |
mids$[mid_inverseCumulativeProbability_5d1c7657] = env->getMethodID(cls, "inverseCumulativeProbability", "(D)D"); | |
mids$[mid_probability_5d1c7657] = env->getMethodID(cls, "probability", "(D)D"); | |
mids$[mid_probability_b1e2866a] = env->getMethodID(cls, "probability", "(DD)D"); | |
mids$[mid_reseedRandomGenerator_0ee6df2f] = env->getMethodID(cls, "reseedRandomGenerator", "(J)V"); | |
mids$[mid_sample_54c6a174] = env->getMethodID(cls, "sample", "()D"); | |
mids$[mid_sample_6398e52f] = env->getMethodID(cls, "sample", "([I)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_sample_b4292e9e] = env->getMethodID(cls, "sample", "(I)[D"); | |
mids$[mid_getSolverAbsoluteAccuracy_54c6a174] = env->getMethodID(cls, "getSolverAbsoluteAccuracy", "()D"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
BaseDistribution::BaseDistribution() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
BaseDistribution::BaseDistribution(const ::org::nd4j::linalg::api::rng::Random & a0) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_425a9c45, a0.this$)) {} | |
jdouble BaseDistribution::inverseCumulativeProbability(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_inverseCumulativeProbability_5d1c7657], a0); | |
} | |
jdouble BaseDistribution::probability(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_probability_5d1c7657], a0); | |
} | |
jdouble BaseDistribution::probability(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_probability_b1e2866a], a0, a1); | |
} | |
void BaseDistribution::reseedRandomGenerator(jlong a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_reseedRandomGenerator_0ee6df2f], a0); | |
} | |
jdouble BaseDistribution::sample() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_sample_54c6a174]); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray BaseDistribution::sample(const JArray< jint > & a0) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_sample_6398e52f], a0.this$)); | |
} | |
JArray< jdouble > BaseDistribution::sample(jint a0) const | |
{ | |
return JArray< jdouble >(env->callObjectMethod(this$, mids$[mid_sample_b4292e9e], a0)); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace rng { | |
namespace distribution { | |
static PyObject *t_BaseDistribution_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_BaseDistribution_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_BaseDistribution_init_(t_BaseDistribution *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_BaseDistribution_inverseCumulativeProbability(t_BaseDistribution *self, PyObject *arg); | |
static PyObject *t_BaseDistribution_probability(t_BaseDistribution *self, PyObject *args); | |
static PyObject *t_BaseDistribution_reseedRandomGenerator(t_BaseDistribution *self, PyObject *arg); | |
static PyObject *t_BaseDistribution_sample(t_BaseDistribution *self, PyObject *args); | |
static PyMethodDef t_BaseDistribution__methods_[] = { | |
DECLARE_METHOD(t_BaseDistribution, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_BaseDistribution, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_BaseDistribution, inverseCumulativeProbability, METH_O), | |
DECLARE_METHOD(t_BaseDistribution, probability, METH_VARARGS), | |
DECLARE_METHOD(t_BaseDistribution, reseedRandomGenerator, METH_O), | |
DECLARE_METHOD(t_BaseDistribution, sample, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(BaseDistribution, t_BaseDistribution, ::java::lang::Object, BaseDistribution, t_BaseDistribution_init_, 0, 0, 0, 0, 0); | |
void t_BaseDistribution::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(BaseDistribution), module, "BaseDistribution", 0); | |
} | |
void t_BaseDistribution::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(BaseDistribution).tp_dict, "class_", make_descriptor(BaseDistribution::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(BaseDistribution).tp_dict, "wrapfn_", make_descriptor(t_BaseDistribution::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(BaseDistribution).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_BaseDistribution_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, BaseDistribution::initializeClass, 1))) | |
return NULL; | |
return t_BaseDistribution::wrap_Object(BaseDistribution(((t_BaseDistribution *) arg)->object.this$)); | |
} | |
static PyObject *t_BaseDistribution_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, BaseDistribution::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_BaseDistribution_init_(t_BaseDistribution *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
BaseDistribution object((jobject) NULL); | |
INT_CALL(object = BaseDistribution()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::rng::Random a0((jobject) NULL); | |
BaseDistribution object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::rng::Random::initializeClass, &a0)) | |
{ | |
INT_CALL(object = BaseDistribution(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_BaseDistribution_inverseCumulativeProbability(t_BaseDistribution *self, PyObject *arg) | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArg(arg, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.inverseCumulativeProbability(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "inverseCumulativeProbability", arg); | |
return NULL; | |
} | |
static PyObject *t_BaseDistribution_probability(t_BaseDistribution *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.probability(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.probability(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "probability", args); | |
return NULL; | |
} | |
static PyObject *t_BaseDistribution_reseedRandomGenerator(t_BaseDistribution *self, PyObject *arg) | |
{ | |
jlong a0; | |
if (!parseArg(arg, "J", &a0)) | |
{ | |
OBJ_CALL(self->object.reseedRandomGenerator(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "reseedRandomGenerator", arg); | |
return NULL; | |
} | |
static PyObject *t_BaseDistribution_sample(t_BaseDistribution *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.sample()); | |
return PyFloat_FromDouble((double) result); | |
} | |
break; | |
case 1: | |
{ | |
JArray< jint > a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "[I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.sample(a0)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
JArray< jdouble > result((jobject) NULL); | |
if (!parseArgs(args, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.sample(a0)); | |
return result.wrap(); | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "sample", args); | |
return NULL; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/random/impl/DropOutInverted.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace random { | |
namespace impl { | |
::java::lang::Class *DropOutInverted::class$ = NULL; | |
jmethodID *DropOutInverted::mids$ = NULL; | |
bool DropOutInverted::live$ = false; | |
jclass DropOutInverted::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/random/impl/DropOutInverted"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_5f90e863] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;D)V"); | |
mids$[mid_init$_906ceca1] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;D)V"); | |
mids$[mid_init$_f5b862ae] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;DJ)V"); | |
mids$[mid_init_321bc445] = env->getMethodID(cls, "init", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
DropOutInverted::DropOutInverted() : ::org::nd4j::linalg::api::ops::random::BaseRandomOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
DropOutInverted::DropOutInverted(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, jdouble a1) : ::org::nd4j::linalg::api::ops::random::BaseRandomOp(env->newObject(initializeClass, &mids$, mid_init$_5f90e863, a0.this$, a1)) {} | |
DropOutInverted::DropOutInverted(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jdouble a2) : ::org::nd4j::linalg::api::ops::random::BaseRandomOp(env->newObject(initializeClass, &mids$, mid_init$_906ceca1, a0.this$, a1.this$, a2)) {} | |
DropOutInverted::DropOutInverted(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jdouble a2, jlong a3) : ::org::nd4j::linalg::api::ops::random::BaseRandomOp(env->newObject(initializeClass, &mids$, mid_init$_f5b862ae, a0.this$, a1.this$, a2, a3)) {} | |
void DropOutInverted::init(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_init_321bc445], a0.this$, a1.this$, a2.this$, a3); | |
} | |
::java::lang::String DropOutInverted::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jint DropOutInverted::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace random { | |
namespace impl { | |
static PyObject *t_DropOutInverted_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_DropOutInverted_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_DropOutInverted_init_(t_DropOutInverted *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_DropOutInverted_init(t_DropOutInverted *self, PyObject *args); | |
static PyObject *t_DropOutInverted_name(t_DropOutInverted *self, PyObject *args); | |
static PyObject *t_DropOutInverted_opNum(t_DropOutInverted *self, PyObject *args); | |
static PyMethodDef t_DropOutInverted__methods_[] = { | |
DECLARE_METHOD(t_DropOutInverted, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_DropOutInverted, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_DropOutInverted, init, METH_VARARGS), | |
DECLARE_METHOD(t_DropOutInverted, name, METH_VARARGS), | |
DECLARE_METHOD(t_DropOutInverted, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(DropOutInverted, t_DropOutInverted, ::org::nd4j::linalg::api::ops::random::BaseRandomOp, DropOutInverted, t_DropOutInverted_init_, 0, 0, 0, 0, 0); | |
void t_DropOutInverted::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(DropOutInverted), module, "DropOutInverted", 0); | |
} | |
void t_DropOutInverted::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(DropOutInverted).tp_dict, "class_", make_descriptor(DropOutInverted::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(DropOutInverted).tp_dict, "wrapfn_", make_descriptor(t_DropOutInverted::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(DropOutInverted).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_DropOutInverted_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, DropOutInverted::initializeClass, 1))) | |
return NULL; | |
return t_DropOutInverted::wrap_Object(DropOutInverted(((t_DropOutInverted *) arg)->object.this$)); | |
} | |
static PyObject *t_DropOutInverted_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, DropOutInverted::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_DropOutInverted_init_(t_DropOutInverted *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
DropOutInverted object((jobject) NULL); | |
INT_CALL(object = DropOutInverted()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
jdouble a1; | |
DropOutInverted object((jobject) NULL); | |
if (!parseArgs(args, "kD", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = DropOutInverted(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jdouble a2; | |
DropOutInverted object((jobject) NULL); | |
if (!parseArgs(args, "kkD", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = DropOutInverted(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jdouble a2; | |
jlong a3; | |
DropOutInverted object((jobject) NULL); | |
if (!parseArgs(args, "kkDJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = DropOutInverted(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_DropOutInverted_init(t_DropOutInverted *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
OBJ_CALL(self->object.init(a0, a1, a2, a3)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(DropOutInverted), (PyObject *) self, "init", args, 2); | |
} | |
static PyObject *t_DropOutInverted_name(t_DropOutInverted *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(DropOutInverted), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_DropOutInverted_opNum(t_DropOutInverted *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(DropOutInverted), (PyObject *) self, "opNum", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/shape/StridePermutation.h" | |
#include "java/lang/Comparable.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace shape { | |
::java::lang::Class *StridePermutation::class$ = NULL; | |
jmethodID *StridePermutation::mids$ = NULL; | |
bool StridePermutation::live$ = false; | |
jclass StridePermutation::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/shape/StridePermutation"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_d8d154a6] = env->getMethodID(cls, "<init>", "(II)V"); | |
mids$[mid_compareTo_b15c7d07] = env->getMethodID(cls, "compareTo", "(Lorg/nd4j/linalg/api/shape/StridePermutation;)I"); | |
mids$[mid_create_f3bf9eab] = env->getStaticMethodID(cls, "create", "([I)[Lorg/nd4j/linalg/api/shape/StridePermutation;"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_getPermutation_54c6a179] = env->getMethodID(cls, "getPermutation", "()I"); | |
mids$[mid_getStride_54c6a179] = env->getMethodID(cls, "getStride", "()I"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_setPermutation_39c7bd3c] = env->getMethodID(cls, "setPermutation", "(I)V"); | |
mids$[mid_setStride_39c7bd3c] = env->getMethodID(cls, "setStride", "(I)V"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
StridePermutation::StridePermutation() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
StridePermutation::StridePermutation(jint a0, jint a1) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_d8d154a6, a0, a1)) {} | |
jint StridePermutation::compareTo(const StridePermutation & a0) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_compareTo_b15c7d07], a0.this$); | |
} | |
JArray< StridePermutation > StridePermutation::create(const JArray< jint > & a0) | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return JArray< StridePermutation >(env->callStaticObjectMethod(cls, mids$[mid_create_f3bf9eab], a0.this$)); | |
} | |
jboolean StridePermutation::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
jint StridePermutation::getPermutation() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getPermutation_54c6a179]); | |
} | |
jint StridePermutation::getStride() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getStride_54c6a179]); | |
} | |
jint StridePermutation::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
void StridePermutation::setPermutation(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setPermutation_39c7bd3c], a0); | |
} | |
void StridePermutation::setStride(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setStride_39c7bd3c], a0); | |
} | |
::java::lang::String StridePermutation::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace shape { | |
static PyObject *t_StridePermutation_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_StridePermutation_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_StridePermutation_init_(t_StridePermutation *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_StridePermutation_compareTo(t_StridePermutation *self, PyObject *arg); | |
static PyObject *t_StridePermutation_create(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_StridePermutation_equals(t_StridePermutation *self, PyObject *args); | |
static PyObject *t_StridePermutation_getPermutation(t_StridePermutation *self); | |
static PyObject *t_StridePermutation_getStride(t_StridePermutation *self); | |
static PyObject *t_StridePermutation_hashCode(t_StridePermutation *self, PyObject *args); | |
static PyObject *t_StridePermutation_setPermutation(t_StridePermutation *self, PyObject *arg); | |
static PyObject *t_StridePermutation_setStride(t_StridePermutation *self, PyObject *arg); | |
static PyObject *t_StridePermutation_toString(t_StridePermutation *self, PyObject *args); | |
static PyObject *t_StridePermutation_get__permutation(t_StridePermutation *self, void *data); | |
static int t_StridePermutation_set__permutation(t_StridePermutation *self, PyObject *arg, void *data); | |
static PyObject *t_StridePermutation_get__stride(t_StridePermutation *self, void *data); | |
static int t_StridePermutation_set__stride(t_StridePermutation *self, PyObject *arg, void *data); | |
static PyGetSetDef t_StridePermutation__fields_[] = { | |
DECLARE_GETSET_FIELD(t_StridePermutation, permutation), | |
DECLARE_GETSET_FIELD(t_StridePermutation, stride), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_StridePermutation__methods_[] = { | |
DECLARE_METHOD(t_StridePermutation, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_StridePermutation, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_StridePermutation, compareTo, METH_O), | |
DECLARE_METHOD(t_StridePermutation, create, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_StridePermutation, equals, METH_VARARGS), | |
DECLARE_METHOD(t_StridePermutation, getPermutation, METH_NOARGS), | |
DECLARE_METHOD(t_StridePermutation, getStride, METH_NOARGS), | |
DECLARE_METHOD(t_StridePermutation, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_StridePermutation, setPermutation, METH_O), | |
DECLARE_METHOD(t_StridePermutation, setStride, METH_O), | |
DECLARE_METHOD(t_StridePermutation, toString, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(StridePermutation, t_StridePermutation, ::java::lang::Object, StridePermutation, t_StridePermutation_init_, 0, 0, t_StridePermutation__fields_, 0, 0); | |
void t_StridePermutation::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(StridePermutation), module, "StridePermutation", 0); | |
} | |
void t_StridePermutation::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(StridePermutation).tp_dict, "class_", make_descriptor(StridePermutation::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(StridePermutation).tp_dict, "wrapfn_", make_descriptor(t_StridePermutation::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(StridePermutation).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_StridePermutation_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, StridePermutation::initializeClass, 1))) | |
return NULL; | |
return t_StridePermutation::wrap_Object(StridePermutation(((t_StridePermutation *) arg)->object.this$)); | |
} | |
static PyObject *t_StridePermutation_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, StridePermutation::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_StridePermutation_init_(t_StridePermutation *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
StridePermutation object((jobject) NULL); | |
INT_CALL(object = StridePermutation()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 2: | |
{ | |
jint a0; | |
jint a1; | |
StridePermutation object((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
INT_CALL(object = StridePermutation(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_StridePermutation_compareTo(t_StridePermutation *self, PyObject *arg) | |
{ | |
StridePermutation a0((jobject) NULL); | |
jint result; | |
if (!parseArg(arg, "k", StridePermutation::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.compareTo(a0)); | |
return PyInt_FromLong((long) result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "compareTo", arg); | |
return NULL; | |
} | |
static PyObject *t_StridePermutation_create(PyTypeObject *type, PyObject *arg) | |
{ | |
JArray< jint > a0((jobject) NULL); | |
JArray< StridePermutation > result((jobject) NULL); | |
if (!parseArg(arg, "[I", &a0)) | |
{ | |
OBJ_CALL(result = ::org::nd4j::linalg::api::shape::StridePermutation::create(a0)); | |
return JArray<jobject>(result.this$).wrap(t_StridePermutation::wrap_jobject); | |
} | |
PyErr_SetArgsError(type, "create", arg); | |
return NULL; | |
} | |
static PyObject *t_StridePermutation_equals(t_StridePermutation *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(StridePermutation), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_StridePermutation_getPermutation(t_StridePermutation *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.getPermutation()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_StridePermutation_getStride(t_StridePermutation *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.getStride()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_StridePermutation_hashCode(t_StridePermutation *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(StridePermutation), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_StridePermutation_setPermutation(t_StridePermutation *self, PyObject *arg) | |
{ | |
jint a0; | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.setPermutation(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setPermutation", arg); | |
return NULL; | |
} | |
static PyObject *t_StridePermutation_setStride(t_StridePermutation *self, PyObject *arg) | |
{ | |
jint a0; | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.setStride(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setStride", arg); | |
return NULL; | |
} | |
static PyObject *t_StridePermutation_toString(t_StridePermutation *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(StridePermutation), (PyObject *) self, "toString", args, 2); | |
} | |
static PyObject *t_StridePermutation_get__permutation(t_StridePermutation *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getPermutation()); | |
return PyInt_FromLong((long) value); | |
} | |
static int t_StridePermutation_set__permutation(t_StridePermutation *self, PyObject *arg, void *data) | |
{ | |
{ | |
jint value; | |
if (!parseArg(arg, "I", &value)) | |
{ | |
INT_CALL(self->object.setPermutation(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "permutation", arg); | |
return -1; | |
} | |
static PyObject *t_StridePermutation_get__stride(t_StridePermutation *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getStride()); | |
return PyInt_FromLong((long) value); | |
} | |
static int t_StridePermutation_set__stride(t_StridePermutation *self, PyObject *arg, void *data) | |
{ | |
{ | |
jint value; | |
if (!parseArg(arg, "I", &value)) | |
{ | |
INT_CALL(self->object.setStride(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "stride", arg); | |
return -1; | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/activations/impl/ActivationELU.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/Object.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace activations { | |
namespace impl { | |
::java::lang::Class *ActivationELU::class$ = NULL; | |
jmethodID *ActivationELU::mids$ = NULL; | |
bool ActivationELU::live$ = false; | |
jdouble ActivationELU::DEFAULT_ALPHA = (jdouble) 0; | |
jclass ActivationELU::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/activations/impl/ActivationELU"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_5d1c7645] = env->getMethodID(cls, "<init>", "(D)V"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_getActivation_962df300] = env->getMethodID(cls, "getActivation", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Z)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_getAlpha_54c6a174] = env->getMethodID(cls, "getAlpha", "()D"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
cls = (jclass) class$->this$; | |
DEFAULT_ALPHA = env->getStaticDoubleField(cls, "DEFAULT_ALPHA"); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
ActivationELU::ActivationELU() : ::org::nd4j::linalg::activations::BaseActivationFunction(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
ActivationELU::ActivationELU(jdouble a0) : ::org::nd4j::linalg::activations::BaseActivationFunction(env->newObject(initializeClass, &mids$, mid_init$_5d1c7645, a0)) {} | |
jboolean ActivationELU::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray ActivationELU::getActivation(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, jboolean a1) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getActivation_962df300], a0.this$, a1)); | |
} | |
jdouble ActivationELU::getAlpha() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_getAlpha_54c6a174]); | |
} | |
jint ActivationELU::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
::java::lang::String ActivationELU::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace activations { | |
namespace impl { | |
static PyObject *t_ActivationELU_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_ActivationELU_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_ActivationELU_init_(t_ActivationELU *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_ActivationELU_equals(t_ActivationELU *self, PyObject *args); | |
static PyObject *t_ActivationELU_getActivation(t_ActivationELU *self, PyObject *args); | |
static PyObject *t_ActivationELU_getAlpha(t_ActivationELU *self); | |
static PyObject *t_ActivationELU_hashCode(t_ActivationELU *self, PyObject *args); | |
static PyObject *t_ActivationELU_toString(t_ActivationELU *self, PyObject *args); | |
static PyObject *t_ActivationELU_get__alpha(t_ActivationELU *self, void *data); | |
static PyGetSetDef t_ActivationELU__fields_[] = { | |
DECLARE_GET_FIELD(t_ActivationELU, alpha), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_ActivationELU__methods_[] = { | |
DECLARE_METHOD(t_ActivationELU, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ActivationELU, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ActivationELU, equals, METH_VARARGS), | |
DECLARE_METHOD(t_ActivationELU, getActivation, METH_VARARGS), | |
DECLARE_METHOD(t_ActivationELU, getAlpha, METH_NOARGS), | |
DECLARE_METHOD(t_ActivationELU, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_ActivationELU, toString, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(ActivationELU, t_ActivationELU, ::org::nd4j::linalg::activations::BaseActivationFunction, ActivationELU, t_ActivationELU_init_, 0, 0, t_ActivationELU__fields_, 0, 0); | |
void t_ActivationELU::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(ActivationELU), module, "ActivationELU", 0); | |
} | |
void t_ActivationELU::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(ActivationELU).tp_dict, "class_", make_descriptor(ActivationELU::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(ActivationELU).tp_dict, "wrapfn_", make_descriptor(t_ActivationELU::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(ActivationELU).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
env->getClass(ActivationELU::initializeClass); | |
PyDict_SetItemString(PY_TYPE(ActivationELU).tp_dict, "DEFAULT_ALPHA", make_descriptor(ActivationELU::DEFAULT_ALPHA)); | |
} | |
static PyObject *t_ActivationELU_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, ActivationELU::initializeClass, 1))) | |
return NULL; | |
return t_ActivationELU::wrap_Object(ActivationELU(((t_ActivationELU *) arg)->object.this$)); | |
} | |
static PyObject *t_ActivationELU_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, ActivationELU::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_ActivationELU_init_(t_ActivationELU *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
ActivationELU object((jobject) NULL); | |
INT_CALL(object = ActivationELU()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
jdouble a0; | |
ActivationELU object((jobject) NULL); | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
INT_CALL(object = ActivationELU(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_ActivationELU_equals(t_ActivationELU *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(ActivationELU), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_ActivationELU_getActivation(t_ActivationELU *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
jboolean a1; | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "kZ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.getActivation(a0, a1)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(ActivationELU), (PyObject *) self, "getActivation", args, 2); | |
} | |
static PyObject *t_ActivationELU_getAlpha(t_ActivationELU *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.getAlpha()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_ActivationELU_hashCode(t_ActivationELU *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(ActivationELU), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_ActivationELU_toString(t_ActivationELU *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(ActivationELU), (PyObject *) self, "toString", args, 2); | |
} | |
static PyObject *t_ActivationELU_get__alpha(t_ActivationELU *self, void *data) | |
{ | |
jdouble value; | |
OBJ_CALL(value = self->object.getAlpha()); | |
return PyFloat_FromDouble((double) value); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/complex/BaseComplexDouble.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Double.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace complex { | |
::java::lang::Class *BaseComplexDouble::class$ = NULL; | |
jmethodID *BaseComplexDouble::mids$ = NULL; | |
bool BaseComplexDouble::live$ = false; | |
jclass BaseComplexDouble::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/complex/BaseComplexDouble"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_5d1c7645] = env->getMethodID(cls, "<init>", "(D)V"); | |
mids$[mid_init$_b1e28678] = env->getMethodID(cls, "<init>", "(DD)V"); | |
mids$[mid_init$_55daa8ca] = env->getMethodID(cls, "<init>", "(Ljava/lang/Double;Ljava/lang/Double;)V"); | |
mids$[mid_absoluteValue_f1ecef1d] = env->getMethodID(cls, "absoluteValue", "()Ljava/lang/Double;"); | |
mids$[mid_complexArgument_f1ecef1d] = env->getMethodID(cls, "complexArgument", "()Ljava/lang/Double;"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_imaginaryComponent_f1ecef1d] = env->getMethodID(cls, "imaginaryComponent", "()Ljava/lang/Double;"); | |
mids$[mid_isImag_54c6a16a] = env->getMethodID(cls, "isImag", "()Z"); | |
mids$[mid_isReal_54c6a16a] = env->getMethodID(cls, "isReal", "()Z"); | |
mids$[mid_isZero_54c6a16a] = env->getMethodID(cls, "isZero", "()Z"); | |
mids$[mid_realComponent_f1ecef1d] = env->getMethodID(cls, "realComponent", "()Ljava/lang/Double;"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
BaseComplexDouble::BaseComplexDouble() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
BaseComplexDouble::BaseComplexDouble(jdouble a0) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_5d1c7645, a0)) {} | |
BaseComplexDouble::BaseComplexDouble(jdouble a0, jdouble a1) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_b1e28678, a0, a1)) {} | |
BaseComplexDouble::BaseComplexDouble(const ::java::lang::Double & a0, const ::java::lang::Double & a1) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_55daa8ca, a0.this$, a1.this$)) {} | |
::java::lang::Double BaseComplexDouble::absoluteValue() const | |
{ | |
return ::java::lang::Double(env->callObjectMethod(this$, mids$[mid_absoluteValue_f1ecef1d])); | |
} | |
::java::lang::Double BaseComplexDouble::complexArgument() const | |
{ | |
return ::java::lang::Double(env->callObjectMethod(this$, mids$[mid_complexArgument_f1ecef1d])); | |
} | |
jboolean BaseComplexDouble::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
jint BaseComplexDouble::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
::java::lang::Double BaseComplexDouble::imaginaryComponent() const | |
{ | |
return ::java::lang::Double(env->callObjectMethod(this$, mids$[mid_imaginaryComponent_f1ecef1d])); | |
} | |
jboolean BaseComplexDouble::isImag() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isImag_54c6a16a]); | |
} | |
jboolean BaseComplexDouble::isReal() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isReal_54c6a16a]); | |
} | |
jboolean BaseComplexDouble::isZero() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isZero_54c6a16a]); | |
} | |
::java::lang::Double BaseComplexDouble::realComponent() const | |
{ | |
return ::java::lang::Double(env->callObjectMethod(this$, mids$[mid_realComponent_f1ecef1d])); | |
} | |
::java::lang::String BaseComplexDouble::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace complex { | |
static PyObject *t_BaseComplexDouble_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_BaseComplexDouble_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_BaseComplexDouble_init_(t_BaseComplexDouble *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_BaseComplexDouble_absoluteValue(t_BaseComplexDouble *self); | |
static PyObject *t_BaseComplexDouble_complexArgument(t_BaseComplexDouble *self); | |
static PyObject *t_BaseComplexDouble_equals(t_BaseComplexDouble *self, PyObject *args); | |
static PyObject *t_BaseComplexDouble_hashCode(t_BaseComplexDouble *self, PyObject *args); | |
static PyObject *t_BaseComplexDouble_imaginaryComponent(t_BaseComplexDouble *self); | |
static PyObject *t_BaseComplexDouble_isImag(t_BaseComplexDouble *self); | |
static PyObject *t_BaseComplexDouble_isReal(t_BaseComplexDouble *self); | |
static PyObject *t_BaseComplexDouble_isZero(t_BaseComplexDouble *self); | |
static PyObject *t_BaseComplexDouble_realComponent(t_BaseComplexDouble *self); | |
static PyObject *t_BaseComplexDouble_toString(t_BaseComplexDouble *self, PyObject *args); | |
static PyObject *t_BaseComplexDouble_get__imag(t_BaseComplexDouble *self, void *data); | |
static PyObject *t_BaseComplexDouble_get__real(t_BaseComplexDouble *self, void *data); | |
static PyObject *t_BaseComplexDouble_get__zero(t_BaseComplexDouble *self, void *data); | |
static PyGetSetDef t_BaseComplexDouble__fields_[] = { | |
DECLARE_GET_FIELD(t_BaseComplexDouble, imag), | |
DECLARE_GET_FIELD(t_BaseComplexDouble, real), | |
DECLARE_GET_FIELD(t_BaseComplexDouble, zero), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_BaseComplexDouble__methods_[] = { | |
DECLARE_METHOD(t_BaseComplexDouble, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_BaseComplexDouble, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_BaseComplexDouble, absoluteValue, METH_NOARGS), | |
DECLARE_METHOD(t_BaseComplexDouble, complexArgument, METH_NOARGS), | |
DECLARE_METHOD(t_BaseComplexDouble, equals, METH_VARARGS), | |
DECLARE_METHOD(t_BaseComplexDouble, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_BaseComplexDouble, imaginaryComponent, METH_NOARGS), | |
DECLARE_METHOD(t_BaseComplexDouble, isImag, METH_NOARGS), | |
DECLARE_METHOD(t_BaseComplexDouble, isReal, METH_NOARGS), | |
DECLARE_METHOD(t_BaseComplexDouble, isZero, METH_NOARGS), | |
DECLARE_METHOD(t_BaseComplexDouble, realComponent, METH_NOARGS), | |
DECLARE_METHOD(t_BaseComplexDouble, toString, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(BaseComplexDouble, t_BaseComplexDouble, ::java::lang::Object, BaseComplexDouble, t_BaseComplexDouble_init_, 0, 0, t_BaseComplexDouble__fields_, 0, 0); | |
void t_BaseComplexDouble::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(BaseComplexDouble), module, "BaseComplexDouble", 0); | |
} | |
void t_BaseComplexDouble::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(BaseComplexDouble).tp_dict, "class_", make_descriptor(BaseComplexDouble::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(BaseComplexDouble).tp_dict, "wrapfn_", make_descriptor(t_BaseComplexDouble::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(BaseComplexDouble).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_BaseComplexDouble_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, BaseComplexDouble::initializeClass, 1))) | |
return NULL; | |
return t_BaseComplexDouble::wrap_Object(BaseComplexDouble(((t_BaseComplexDouble *) arg)->object.this$)); | |
} | |
static PyObject *t_BaseComplexDouble_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, BaseComplexDouble::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_BaseComplexDouble_init_(t_BaseComplexDouble *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
BaseComplexDouble object((jobject) NULL); | |
INT_CALL(object = BaseComplexDouble()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
jdouble a0; | |
BaseComplexDouble object((jobject) NULL); | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
INT_CALL(object = BaseComplexDouble(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
BaseComplexDouble object((jobject) NULL); | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
INT_CALL(object = BaseComplexDouble(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::java::lang::Double a0((jobject) NULL); | |
::java::lang::Double a1((jobject) NULL); | |
BaseComplexDouble object((jobject) NULL); | |
if (!parseArgs(args, "OO", &::java::lang::PY_TYPE(Double), &::java::lang::PY_TYPE(Double), &a0, &a1)) | |
{ | |
INT_CALL(object = BaseComplexDouble(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_BaseComplexDouble_absoluteValue(t_BaseComplexDouble *self) | |
{ | |
::java::lang::Double result((jobject) NULL); | |
OBJ_CALL(result = self->object.absoluteValue()); | |
return ::java::lang::t_Double::wrap_Object(result); | |
} | |
static PyObject *t_BaseComplexDouble_complexArgument(t_BaseComplexDouble *self) | |
{ | |
::java::lang::Double result((jobject) NULL); | |
OBJ_CALL(result = self->object.complexArgument()); | |
return ::java::lang::t_Double::wrap_Object(result); | |
} | |
static PyObject *t_BaseComplexDouble_equals(t_BaseComplexDouble *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(BaseComplexDouble), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_BaseComplexDouble_hashCode(t_BaseComplexDouble *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(BaseComplexDouble), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_BaseComplexDouble_imaginaryComponent(t_BaseComplexDouble *self) | |
{ | |
::java::lang::Double result((jobject) NULL); | |
OBJ_CALL(result = self->object.imaginaryComponent()); | |
return ::java::lang::t_Double::wrap_Object(result); | |
} | |
static PyObject *t_BaseComplexDouble_isImag(t_BaseComplexDouble *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.isImag()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_BaseComplexDouble_isReal(t_BaseComplexDouble *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.isReal()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_BaseComplexDouble_isZero(t_BaseComplexDouble *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.isZero()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_BaseComplexDouble_realComponent(t_BaseComplexDouble *self) | |
{ | |
::java::lang::Double result((jobject) NULL); | |
OBJ_CALL(result = self->object.realComponent()); | |
return ::java::lang::t_Double::wrap_Object(result); | |
} | |
static PyObject *t_BaseComplexDouble_toString(t_BaseComplexDouble *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(BaseComplexDouble), (PyObject *) self, "toString", args, 2); | |
} | |
static PyObject *t_BaseComplexDouble_get__imag(t_BaseComplexDouble *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isImag()); | |
Py_RETURN_BOOL(value); | |
} | |
static PyObject *t_BaseComplexDouble_get__real(t_BaseComplexDouble *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isReal()); | |
Py_RETURN_BOOL(value); | |
} | |
static PyObject *t_BaseComplexDouble_get__zero(t_BaseComplexDouble *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isZero()); | |
Py_RETURN_BOOL(value); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3$RawArrayIterationInformation3Builder.h" | |
#include "org/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace shape { | |
namespace loop { | |
namespace three { | |
::java::lang::Class *RawArrayIterationInformation3$RawArrayIterationInformation3Builder::class$ = NULL; | |
jmethodID *RawArrayIterationInformation3$RawArrayIterationInformation3Builder::mids$ = NULL; | |
bool RawArrayIterationInformation3$RawArrayIterationInformation3Builder::live$ = false; | |
jclass RawArrayIterationInformation3$RawArrayIterationInformation3Builder::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3$RawArrayIterationInformation3Builder"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_aOffset_05519215] = env->getMethodID(cls, "aOffset", "(I)Lorg/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3$RawArrayIterationInformation3Builder;"); | |
mids$[mid_aStrides_49896aa5] = env->getMethodID(cls, "aStrides", "([I)Lorg/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3$RawArrayIterationInformation3Builder;"); | |
mids$[mid_bOffset_05519215] = env->getMethodID(cls, "bOffset", "(I)Lorg/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3$RawArrayIterationInformation3Builder;"); | |
mids$[mid_bStrides_49896aa5] = env->getMethodID(cls, "bStrides", "([I)Lorg/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3$RawArrayIterationInformation3Builder;"); | |
mids$[mid_build_46f29084] = env->getMethodID(cls, "build", "()Lorg/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3;"); | |
mids$[mid_cOffset_05519215] = env->getMethodID(cls, "cOffset", "(I)Lorg/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3$RawArrayIterationInformation3Builder;"); | |
mids$[mid_cStrides_49896aa5] = env->getMethodID(cls, "cStrides", "([I)Lorg/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3$RawArrayIterationInformation3Builder;"); | |
mids$[mid_nDim_05519215] = env->getMethodID(cls, "nDim", "(I)Lorg/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3$RawArrayIterationInformation3Builder;"); | |
mids$[mid_shape_49896aa5] = env->getMethodID(cls, "shape", "([I)Lorg/nd4j/linalg/api/shape/loop/three/RawArrayIterationInformation3$RawArrayIterationInformation3Builder;"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder RawArrayIterationInformation3$RawArrayIterationInformation3Builder::aOffset(jint a0) const | |
{ | |
return RawArrayIterationInformation3$RawArrayIterationInformation3Builder(env->callObjectMethod(this$, mids$[mid_aOffset_05519215], a0)); | |
} | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder RawArrayIterationInformation3$RawArrayIterationInformation3Builder::aStrides(const JArray< jint > & a0) const | |
{ | |
return RawArrayIterationInformation3$RawArrayIterationInformation3Builder(env->callObjectMethod(this$, mids$[mid_aStrides_49896aa5], a0.this$)); | |
} | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder RawArrayIterationInformation3$RawArrayIterationInformation3Builder::bOffset(jint a0) const | |
{ | |
return RawArrayIterationInformation3$RawArrayIterationInformation3Builder(env->callObjectMethod(this$, mids$[mid_bOffset_05519215], a0)); | |
} | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder RawArrayIterationInformation3$RawArrayIterationInformation3Builder::bStrides(const JArray< jint > & a0) const | |
{ | |
return RawArrayIterationInformation3$RawArrayIterationInformation3Builder(env->callObjectMethod(this$, mids$[mid_bStrides_49896aa5], a0.this$)); | |
} | |
::org::nd4j::linalg::api::shape::loop::three::RawArrayIterationInformation3 RawArrayIterationInformation3$RawArrayIterationInformation3Builder::build() const | |
{ | |
return ::org::nd4j::linalg::api::shape::loop::three::RawArrayIterationInformation3(env->callObjectMethod(this$, mids$[mid_build_46f29084])); | |
} | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder RawArrayIterationInformation3$RawArrayIterationInformation3Builder::cOffset(jint a0) const | |
{ | |
return RawArrayIterationInformation3$RawArrayIterationInformation3Builder(env->callObjectMethod(this$, mids$[mid_cOffset_05519215], a0)); | |
} | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder RawArrayIterationInformation3$RawArrayIterationInformation3Builder::cStrides(const JArray< jint > & a0) const | |
{ | |
return RawArrayIterationInformation3$RawArrayIterationInformation3Builder(env->callObjectMethod(this$, mids$[mid_cStrides_49896aa5], a0.this$)); | |
} | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder RawArrayIterationInformation3$RawArrayIterationInformation3Builder::nDim(jint a0) const | |
{ | |
return RawArrayIterationInformation3$RawArrayIterationInformation3Builder(env->callObjectMethod(this$, mids$[mid_nDim_05519215], a0)); | |
} | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder RawArrayIterationInformation3$RawArrayIterationInformation3Builder::shape(const JArray< jint > & a0) const | |
{ | |
return RawArrayIterationInformation3$RawArrayIterationInformation3Builder(env->callObjectMethod(this$, mids$[mid_shape_49896aa5], a0.this$)); | |
} | |
::java::lang::String RawArrayIterationInformation3$RawArrayIterationInformation3Builder::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace shape { | |
namespace loop { | |
namespace three { | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_aOffset(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg); | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_aStrides(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg); | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_bOffset(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg); | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_bStrides(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg); | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_build(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self); | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_cOffset(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg); | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_cStrides(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg); | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_nDim(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg); | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_shape(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg); | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_toString(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *args); | |
static PyMethodDef t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder__methods_[] = { | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, aOffset, METH_O), | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, aStrides, METH_O), | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, bOffset, METH_O), | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, bStrides, METH_O), | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, build, METH_NOARGS), | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, cOffset, METH_O), | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, cStrides, METH_O), | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, nDim, METH_O), | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, shape, METH_O), | |
DECLARE_METHOD(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, toString, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(RawArrayIterationInformation3$RawArrayIterationInformation3Builder, t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder, ::java::lang::Object, RawArrayIterationInformation3$RawArrayIterationInformation3Builder, abstract_init, 0, 0, 0, 0, 0); | |
void t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(RawArrayIterationInformation3$RawArrayIterationInformation3Builder), module, "RawArrayIterationInformation3$RawArrayIterationInformation3Builder", 0); | |
} | |
void t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(RawArrayIterationInformation3$RawArrayIterationInformation3Builder).tp_dict, "class_", make_descriptor(RawArrayIterationInformation3$RawArrayIterationInformation3Builder::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(RawArrayIterationInformation3$RawArrayIterationInformation3Builder).tp_dict, "wrapfn_", make_descriptor(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(RawArrayIterationInformation3$RawArrayIterationInformation3Builder).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, RawArrayIterationInformation3$RawArrayIterationInformation3Builder::initializeClass, 1))) | |
return NULL; | |
return t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::wrap_Object(RawArrayIterationInformation3$RawArrayIterationInformation3Builder(((t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *) arg)->object.this$)); | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, RawArrayIterationInformation3$RawArrayIterationInformation3Builder::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_aOffset(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg) | |
{ | |
jint a0; | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder result((jobject) NULL); | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.aOffset(a0)); | |
return t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "aOffset", arg); | |
return NULL; | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_aStrides(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg) | |
{ | |
JArray< jint > a0((jobject) NULL); | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder result((jobject) NULL); | |
if (!parseArg(arg, "[I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.aStrides(a0)); | |
return t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "aStrides", arg); | |
return NULL; | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_bOffset(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg) | |
{ | |
jint a0; | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder result((jobject) NULL); | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.bOffset(a0)); | |
return t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "bOffset", arg); | |
return NULL; | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_bStrides(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg) | |
{ | |
JArray< jint > a0((jobject) NULL); | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder result((jobject) NULL); | |
if (!parseArg(arg, "[I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.bStrides(a0)); | |
return t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "bStrides", arg); | |
return NULL; | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_build(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self) | |
{ | |
::org::nd4j::linalg::api::shape::loop::three::RawArrayIterationInformation3 result((jobject) NULL); | |
OBJ_CALL(result = self->object.build()); | |
return ::org::nd4j::linalg::api::shape::loop::three::t_RawArrayIterationInformation3::wrap_Object(result); | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_cOffset(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg) | |
{ | |
jint a0; | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder result((jobject) NULL); | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.cOffset(a0)); | |
return t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "cOffset", arg); | |
return NULL; | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_cStrides(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg) | |
{ | |
JArray< jint > a0((jobject) NULL); | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder result((jobject) NULL); | |
if (!parseArg(arg, "[I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.cStrides(a0)); | |
return t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "cStrides", arg); | |
return NULL; | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_nDim(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg) | |
{ | |
jint a0; | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder result((jobject) NULL); | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.nDim(a0)); | |
return t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "nDim", arg); | |
return NULL; | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_shape(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *arg) | |
{ | |
JArray< jint > a0((jobject) NULL); | |
RawArrayIterationInformation3$RawArrayIterationInformation3Builder result((jobject) NULL); | |
if (!parseArg(arg, "[I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.shape(a0)); | |
return t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "shape", arg); | |
return NULL; | |
} | |
static PyObject *t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder_toString(t_RawArrayIterationInformation3$RawArrayIterationInformation3Builder *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(RawArrayIterationInformation3$RawArrayIterationInformation3Builder), (PyObject *) self, "toString", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/indexing/conditions/NotEqualsCondition.h" | |
#include "java/lang/Boolean.h" | |
#include "java/lang/Number.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace indexing { | |
namespace conditions { | |
::java::lang::Class *NotEqualsCondition::class$ = NULL; | |
jmethodID *NotEqualsCondition::mids$ = NULL; | |
bool NotEqualsCondition::live$ = false; | |
jclass NotEqualsCondition::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/indexing/conditions/NotEqualsCondition"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_948ebebc] = env->getMethodID(cls, "<init>", "(Ljava/lang/Number;)V"); | |
mids$[mid_apply_7a17c395] = env->getMethodID(cls, "apply", "(Ljava/lang/Number;)Ljava/lang/Boolean;"); | |
mids$[mid_condtionNum_54c6a179] = env->getMethodID(cls, "condtionNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
NotEqualsCondition::NotEqualsCondition(const ::java::lang::Number & a0) : ::org::nd4j::linalg::indexing::conditions::BaseCondition(env->newObject(initializeClass, &mids$, mid_init$_948ebebc, a0.this$)) {} | |
::java::lang::Boolean NotEqualsCondition::apply(const ::java::lang::Number & a0) const | |
{ | |
return ::java::lang::Boolean(env->callObjectMethod(this$, mids$[mid_apply_7a17c395], a0.this$)); | |
} | |
jint NotEqualsCondition::condtionNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_condtionNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace indexing { | |
namespace conditions { | |
static PyObject *t_NotEqualsCondition_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_NotEqualsCondition_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_NotEqualsCondition_init_(t_NotEqualsCondition *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_NotEqualsCondition_apply(t_NotEqualsCondition *self, PyObject *args); | |
static PyObject *t_NotEqualsCondition_condtionNum(t_NotEqualsCondition *self, PyObject *args); | |
static PyMethodDef t_NotEqualsCondition__methods_[] = { | |
DECLARE_METHOD(t_NotEqualsCondition, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_NotEqualsCondition, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_NotEqualsCondition, apply, METH_VARARGS), | |
DECLARE_METHOD(t_NotEqualsCondition, condtionNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(NotEqualsCondition, t_NotEqualsCondition, ::org::nd4j::linalg::indexing::conditions::BaseCondition, NotEqualsCondition, t_NotEqualsCondition_init_, 0, 0, 0, 0, 0); | |
void t_NotEqualsCondition::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(NotEqualsCondition), module, "NotEqualsCondition", 0); | |
} | |
void t_NotEqualsCondition::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(NotEqualsCondition).tp_dict, "class_", make_descriptor(NotEqualsCondition::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(NotEqualsCondition).tp_dict, "wrapfn_", make_descriptor(t_NotEqualsCondition::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(NotEqualsCondition).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_NotEqualsCondition_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, NotEqualsCondition::initializeClass, 1))) | |
return NULL; | |
return t_NotEqualsCondition::wrap_Object(NotEqualsCondition(((t_NotEqualsCondition *) arg)->object.this$)); | |
} | |
static PyObject *t_NotEqualsCondition_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, NotEqualsCondition::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_NotEqualsCondition_init_(t_NotEqualsCondition *self, PyObject *args, PyObject *kwds) | |
{ | |
::java::lang::Number a0((jobject) NULL); | |
NotEqualsCondition object((jobject) NULL); | |
if (!parseArgs(args, "O", &::java::lang::PY_TYPE(Number), &a0)) | |
{ | |
INT_CALL(object = NotEqualsCondition(a0)); | |
self->object = object; | |
} | |
else | |
{ | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_NotEqualsCondition_apply(t_NotEqualsCondition *self, PyObject *args) | |
{ | |
::java::lang::Number a0((jobject) NULL); | |
::java::lang::Boolean result((jobject) NULL); | |
if (!parseArgs(args, "O", &::java::lang::PY_TYPE(Number), &a0)) | |
{ | |
OBJ_CALL(result = self->object.apply(a0)); | |
return ::java::lang::t_Boolean::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(NotEqualsCondition), (PyObject *) self, "apply", args, 2); | |
} | |
static PyObject *t_NotEqualsCondition_condtionNum(t_NotEqualsCondition *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.condtionNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(NotEqualsCondition), (PyObject *) self, "condtionNum", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/transforms/SoftMax.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "org/nd4j/linalg/api/ops/TransformOp.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
::java::lang::Class *SoftMax::class$ = NULL; | |
jmethodID *SoftMax::mids$ = NULL; | |
bool SoftMax::live$ = false; | |
jclass SoftMax::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/transforms/SoftMax"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_fa4e6ed8] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_4237560b] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_init$_321bc445] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_derivative_5ebdfbac] = env->getMethodID(cls, "derivative", "()Lorg/nd4j/linalg/api/ops/TransformOp;"); | |
mids$[mid_exec_54c6a166] = env->getMethodID(cls, "exec", "()V"); | |
mids$[mid_exec_1efc2008] = env->getMethodID(cls, "exec", "([I)V"); | |
mids$[mid_init_321bc445] = env->getMethodID(cls, "init", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_isExecSpecial_54c6a16a] = env->getMethodID(cls, "isExecSpecial", "()Z"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
SoftMax::SoftMax() : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
SoftMax::SoftMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
SoftMax::SoftMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
SoftMax::SoftMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_fa4e6ed8, a0.this$, a1.this$, a2.this$)) {} | |
SoftMax::SoftMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_4237560b, a0.this$, a1.this$, a2)) {} | |
SoftMax::SoftMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_321bc445, a0.this$, a1.this$, a2.this$, a3)) {} | |
::org::nd4j::linalg::api::ops::TransformOp SoftMax::derivative() const | |
{ | |
return ::org::nd4j::linalg::api::ops::TransformOp(env->callObjectMethod(this$, mids$[mid_derivative_5ebdfbac])); | |
} | |
void SoftMax::exec() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_54c6a166]); | |
} | |
void SoftMax::exec(const JArray< jint > & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_1efc2008], a0.this$); | |
} | |
void SoftMax::init(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_init_321bc445], a0.this$, a1.this$, a2.this$, a3); | |
} | |
jboolean SoftMax::isExecSpecial() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isExecSpecial_54c6a16a]); | |
} | |
::java::lang::String SoftMax::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jfloat SoftMax::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble SoftMax::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jdouble SoftMax::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
jfloat SoftMax::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op SoftMax::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ops::Op SoftMax::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
jint SoftMax::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
static PyObject *t_SoftMax_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_SoftMax_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_SoftMax_init_(t_SoftMax *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_SoftMax_derivative(t_SoftMax *self, PyObject *args); | |
static PyObject *t_SoftMax_exec(t_SoftMax *self, PyObject *args); | |
static PyObject *t_SoftMax_init(t_SoftMax *self, PyObject *args); | |
static PyObject *t_SoftMax_isExecSpecial(t_SoftMax *self, PyObject *args); | |
static PyObject *t_SoftMax_name(t_SoftMax *self, PyObject *args); | |
static PyObject *t_SoftMax_op(t_SoftMax *self, PyObject *args); | |
static PyObject *t_SoftMax_opForDimension(t_SoftMax *self, PyObject *args); | |
static PyObject *t_SoftMax_opNum(t_SoftMax *self, PyObject *args); | |
static PyObject *t_SoftMax_get__execSpecial(t_SoftMax *self, void *data); | |
static PyGetSetDef t_SoftMax__fields_[] = { | |
DECLARE_GET_FIELD(t_SoftMax, execSpecial), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_SoftMax__methods_[] = { | |
DECLARE_METHOD(t_SoftMax, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_SoftMax, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_SoftMax, derivative, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMax, exec, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMax, init, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMax, isExecSpecial, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMax, name, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMax, op, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMax, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_SoftMax, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(SoftMax, t_SoftMax, ::org::nd4j::linalg::api::ops::BaseTransformOp, SoftMax, t_SoftMax_init_, 0, 0, t_SoftMax__fields_, 0, 0); | |
void t_SoftMax::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(SoftMax), module, "SoftMax", 0); | |
} | |
void t_SoftMax::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(SoftMax).tp_dict, "class_", make_descriptor(SoftMax::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(SoftMax).tp_dict, "wrapfn_", make_descriptor(t_SoftMax::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(SoftMax).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_SoftMax_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, SoftMax::initializeClass, 1))) | |
return NULL; | |
return t_SoftMax::wrap_Object(SoftMax(((t_SoftMax *) arg)->object.this$)); | |
} | |
static PyObject *t_SoftMax_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, SoftMax::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_SoftMax_init_(t_SoftMax *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
SoftMax object((jobject) NULL); | |
INT_CALL(object = SoftMax()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
SoftMax object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = SoftMax(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
SoftMax object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = SoftMax(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
SoftMax object((jobject) NULL); | |
if (!parseArgs(args, "kkk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = SoftMax(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
SoftMax object((jobject) NULL); | |
if (!parseArgs(args, "kkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = SoftMax(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
SoftMax object((jobject) NULL); | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = SoftMax(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_SoftMax_derivative(t_SoftMax *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ops::TransformOp result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.derivative()); | |
return ::org::nd4j::linalg::api::ops::t_TransformOp::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(SoftMax), (PyObject *) self, "derivative", args, 2); | |
} | |
static PyObject *t_SoftMax_exec(t_SoftMax *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
OBJ_CALL(self->object.exec()); | |
Py_RETURN_NONE; | |
} | |
break; | |
case 1: | |
{ | |
JArray< jint > a0((jobject) NULL); | |
if (!parseArgs(args, "[I", &a0)) | |
{ | |
OBJ_CALL(self->object.exec(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(SoftMax), (PyObject *) self, "exec", args, 2); | |
} | |
static PyObject *t_SoftMax_init(t_SoftMax *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
OBJ_CALL(self->object.init(a0, a1, a2, a3)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(SoftMax), (PyObject *) self, "init", args, 2); | |
} | |
static PyObject *t_SoftMax_isExecSpecial(t_SoftMax *self, PyObject *args) | |
{ | |
jboolean result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.isExecSpecial()); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(SoftMax), (PyObject *) self, "isExecSpecial", args, 2); | |
} | |
static PyObject *t_SoftMax_name(t_SoftMax *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(SoftMax), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_SoftMax_op(t_SoftMax *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(SoftMax), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_SoftMax_opForDimension(t_SoftMax *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(SoftMax), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_SoftMax_opNum(t_SoftMax *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(SoftMax), (PyObject *) self, "opNum", args, 2); | |
} | |
static PyObject *t_SoftMax_get__execSpecial(t_SoftMax *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isExecSpecial()); | |
Py_RETURN_BOOL(value); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/compression/impl/Gzip.h" | |
#include "org/nd4j/linalg/compression/CompressionType.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace compression { | |
namespace impl { | |
::java::lang::Class *Gzip::class$ = NULL; | |
jmethodID *Gzip::mids$ = NULL; | |
bool Gzip::live$ = false; | |
jclass Gzip::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/compression/impl/Gzip"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_getCompressionType_720905ec] = env->getMethodID(cls, "getCompressionType", "()Lorg/nd4j/linalg/compression/CompressionType;"); | |
mids$[mid_getDescriptor_14c7b5c5] = env->getMethodID(cls, "getDescriptor", "()Ljava/lang/String;"); | |
mids$[mid_compressPointer_53d68b83] = env->getMethodID(cls, "compressPointer", "(Lorg/nd4j/linalg/api/buffer/DataBuffer$TypeEx;Lorg/bytedeco/javacpp/Pointer;II)Lorg/nd4j/linalg/compression/CompressedDataBuffer;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Gzip::Gzip() : ::org::nd4j::compression::impl::AbstractCompressor(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
::org::nd4j::linalg::compression::CompressionType Gzip::getCompressionType() const | |
{ | |
return ::org::nd4j::linalg::compression::CompressionType(env->callObjectMethod(this$, mids$[mid_getCompressionType_720905ec])); | |
} | |
::java::lang::String Gzip::getDescriptor() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_getDescriptor_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace compression { | |
namespace impl { | |
static PyObject *t_Gzip_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Gzip_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Gzip_init_(t_Gzip *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Gzip_getCompressionType(t_Gzip *self, PyObject *args); | |
static PyObject *t_Gzip_getDescriptor(t_Gzip *self, PyObject *args); | |
static PyObject *t_Gzip_get__compressionType(t_Gzip *self, void *data); | |
static PyObject *t_Gzip_get__descriptor(t_Gzip *self, void *data); | |
static PyGetSetDef t_Gzip__fields_[] = { | |
DECLARE_GET_FIELD(t_Gzip, compressionType), | |
DECLARE_GET_FIELD(t_Gzip, descriptor), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Gzip__methods_[] = { | |
DECLARE_METHOD(t_Gzip, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Gzip, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Gzip, getCompressionType, METH_VARARGS), | |
DECLARE_METHOD(t_Gzip, getDescriptor, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Gzip, t_Gzip, ::org::nd4j::compression::impl::AbstractCompressor, Gzip, t_Gzip_init_, 0, 0, t_Gzip__fields_, 0, 0); | |
void t_Gzip::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Gzip), module, "Gzip", 0); | |
} | |
void t_Gzip::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Gzip).tp_dict, "class_", make_descriptor(Gzip::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Gzip).tp_dict, "wrapfn_", make_descriptor(t_Gzip::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Gzip).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Gzip_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Gzip::initializeClass, 1))) | |
return NULL; | |
return t_Gzip::wrap_Object(Gzip(((t_Gzip *) arg)->object.this$)); | |
} | |
static PyObject *t_Gzip_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Gzip::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Gzip_init_(t_Gzip *self, PyObject *args, PyObject *kwds) | |
{ | |
Gzip object((jobject) NULL); | |
INT_CALL(object = Gzip()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_Gzip_getCompressionType(t_Gzip *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::compression::CompressionType result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getCompressionType()); | |
return ::org::nd4j::linalg::compression::t_CompressionType::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(Gzip), (PyObject *) self, "getCompressionType", args, 2); | |
} | |
static PyObject *t_Gzip_getDescriptor(t_Gzip *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getDescriptor()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Gzip), (PyObject *) self, "getDescriptor", args, 2); | |
} | |
static PyObject *t_Gzip_get__compressionType(t_Gzip *self, void *data) | |
{ | |
::org::nd4j::linalg::compression::CompressionType value((jobject) NULL); | |
OBJ_CALL(value = self->object.getCompressionType()); | |
return ::org::nd4j::linalg::compression::t_CompressionType::wrap_Object(value); | |
} | |
static PyObject *t_Gzip_get__descriptor(t_Gzip *self, void *data) | |
{ | |
::java::lang::String value((jobject) NULL); | |
OBJ_CALL(value = self->object.getDescriptor()); | |
return j2p(value); | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/MultiNormalizerStandardize.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/stats/DistributionStats.h" | |
#include "org/nd4j/linalg/dataset/api/preprocessor/serializer/NormalizerType.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/Object.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace preprocessor { | |
::java::lang::Class *MultiNormalizerStandardize::class$ = NULL; | |
jmethodID *MultiNormalizerStandardize::mids$ = NULL; | |
bool MultiNormalizerStandardize::live$ = false; | |
jclass MultiNormalizerStandardize::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/dataset/api/preprocessor/MultiNormalizerStandardize"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_getFeatureMean_ac1018e7] = env->getMethodID(cls, "getFeatureMean", "(I)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_getFeatureStd_ac1018e7] = env->getMethodID(cls, "getFeatureStd", "(I)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_getLabelMean_ac1018e7] = env->getMethodID(cls, "getLabelMean", "(I)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_getLabelStd_ac1018e7] = env->getMethodID(cls, "getLabelStd", "(I)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_getType_a1ac016e] = env->getMethodID(cls, "getType", "()Lorg/nd4j/linalg/dataset/api/preprocessor/serializer/NormalizerType;"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
mids$[mid_newBuilder_0db41fcd] = env->getMethodID(cls, "newBuilder", "()Lorg/nd4j/linalg/dataset/api/preprocessor/stats/NormalizerStats$Builder;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
MultiNormalizerStandardize::MultiNormalizerStandardize() : ::org::nd4j::linalg::dataset::api::preprocessor::AbstractMultiDataSetNormalizer(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
jboolean MultiNormalizerStandardize::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray MultiNormalizerStandardize::getFeatureMean(jint a0) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getFeatureMean_ac1018e7], a0)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray MultiNormalizerStandardize::getFeatureStd(jint a0) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getFeatureStd_ac1018e7], a0)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray MultiNormalizerStandardize::getLabelMean(jint a0) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getLabelMean_ac1018e7], a0)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray MultiNormalizerStandardize::getLabelStd(jint a0) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getLabelStd_ac1018e7], a0)); | |
} | |
::org::nd4j::linalg::dataset::api::preprocessor::serializer::NormalizerType MultiNormalizerStandardize::getType() const | |
{ | |
return ::org::nd4j::linalg::dataset::api::preprocessor::serializer::NormalizerType(env->callObjectMethod(this$, mids$[mid_getType_a1ac016e])); | |
} | |
jint MultiNormalizerStandardize::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace preprocessor { | |
static PyObject *t_MultiNormalizerStandardize_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_MultiNormalizerStandardize_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_MultiNormalizerStandardize_of_(t_MultiNormalizerStandardize *self, PyObject *args); | |
static int t_MultiNormalizerStandardize_init_(t_MultiNormalizerStandardize *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_MultiNormalizerStandardize_equals(t_MultiNormalizerStandardize *self, PyObject *args); | |
static PyObject *t_MultiNormalizerStandardize_getFeatureMean(t_MultiNormalizerStandardize *self, PyObject *arg); | |
static PyObject *t_MultiNormalizerStandardize_getFeatureStd(t_MultiNormalizerStandardize *self, PyObject *arg); | |
static PyObject *t_MultiNormalizerStandardize_getLabelMean(t_MultiNormalizerStandardize *self, PyObject *arg); | |
static PyObject *t_MultiNormalizerStandardize_getLabelStd(t_MultiNormalizerStandardize *self, PyObject *arg); | |
static PyObject *t_MultiNormalizerStandardize_getType(t_MultiNormalizerStandardize *self, PyObject *args); | |
static PyObject *t_MultiNormalizerStandardize_hashCode(t_MultiNormalizerStandardize *self, PyObject *args); | |
static PyObject *t_MultiNormalizerStandardize_get__type(t_MultiNormalizerStandardize *self, void *data); | |
static PyObject *t_MultiNormalizerStandardize_get__parameters_(t_MultiNormalizerStandardize *self, void *data); | |
static PyGetSetDef t_MultiNormalizerStandardize__fields_[] = { | |
DECLARE_GET_FIELD(t_MultiNormalizerStandardize, type), | |
DECLARE_GET_FIELD(t_MultiNormalizerStandardize, parameters_), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_MultiNormalizerStandardize__methods_[] = { | |
DECLARE_METHOD(t_MultiNormalizerStandardize, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_MultiNormalizerStandardize, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_MultiNormalizerStandardize, of_, METH_VARARGS), | |
DECLARE_METHOD(t_MultiNormalizerStandardize, equals, METH_VARARGS), | |
DECLARE_METHOD(t_MultiNormalizerStandardize, getFeatureMean, METH_O), | |
DECLARE_METHOD(t_MultiNormalizerStandardize, getFeatureStd, METH_O), | |
DECLARE_METHOD(t_MultiNormalizerStandardize, getLabelMean, METH_O), | |
DECLARE_METHOD(t_MultiNormalizerStandardize, getLabelStd, METH_O), | |
DECLARE_METHOD(t_MultiNormalizerStandardize, getType, METH_VARARGS), | |
DECLARE_METHOD(t_MultiNormalizerStandardize, hashCode, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(MultiNormalizerStandardize, t_MultiNormalizerStandardize, ::org::nd4j::linalg::dataset::api::preprocessor::AbstractMultiDataSetNormalizer, MultiNormalizerStandardize, t_MultiNormalizerStandardize_init_, 0, 0, t_MultiNormalizerStandardize__fields_, 0, 0); | |
PyObject *t_MultiNormalizerStandardize::wrap_Object(const MultiNormalizerStandardize& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_MultiNormalizerStandardize::wrap_Object(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_MultiNormalizerStandardize *self = (t_MultiNormalizerStandardize *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
PyObject *t_MultiNormalizerStandardize::wrap_jobject(const jobject& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_MultiNormalizerStandardize::wrap_jobject(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_MultiNormalizerStandardize *self = (t_MultiNormalizerStandardize *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
void t_MultiNormalizerStandardize::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(MultiNormalizerStandardize), module, "MultiNormalizerStandardize", 0); | |
} | |
void t_MultiNormalizerStandardize::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(MultiNormalizerStandardize).tp_dict, "class_", make_descriptor(MultiNormalizerStandardize::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(MultiNormalizerStandardize).tp_dict, "wrapfn_", make_descriptor(t_MultiNormalizerStandardize::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(MultiNormalizerStandardize).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_MultiNormalizerStandardize_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, MultiNormalizerStandardize::initializeClass, 1))) | |
return NULL; | |
return t_MultiNormalizerStandardize::wrap_Object(MultiNormalizerStandardize(((t_MultiNormalizerStandardize *) arg)->object.this$)); | |
} | |
static PyObject *t_MultiNormalizerStandardize_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, MultiNormalizerStandardize::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_MultiNormalizerStandardize_of_(t_MultiNormalizerStandardize *self, PyObject *args) | |
{ | |
if (!parseArg(args, "T", 1, &(self->parameters))) | |
Py_RETURN_SELF; | |
return PyErr_SetArgsError((PyObject *) self, "of_", args); | |
} | |
static int t_MultiNormalizerStandardize_init_(t_MultiNormalizerStandardize *self, PyObject *args, PyObject *kwds) | |
{ | |
MultiNormalizerStandardize object((jobject) NULL); | |
INT_CALL(object = MultiNormalizerStandardize()); | |
self->object = object; | |
self->parameters[0] = &::org::nd4j::linalg::dataset::api::preprocessor::stats::PY_TYPE(DistributionStats); | |
return 0; | |
} | |
static PyObject *t_MultiNormalizerStandardize_equals(t_MultiNormalizerStandardize *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(MultiNormalizerStandardize), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_MultiNormalizerStandardize_getFeatureMean(t_MultiNormalizerStandardize *self, PyObject *arg) | |
{ | |
jint a0; | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.getFeatureMean(a0)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "getFeatureMean", arg); | |
return NULL; | |
} | |
static PyObject *t_MultiNormalizerStandardize_getFeatureStd(t_MultiNormalizerStandardize *self, PyObject *arg) | |
{ | |
jint a0; | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.getFeatureStd(a0)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "getFeatureStd", arg); | |
return NULL; | |
} | |
static PyObject *t_MultiNormalizerStandardize_getLabelMean(t_MultiNormalizerStandardize *self, PyObject *arg) | |
{ | |
jint a0; | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.getLabelMean(a0)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "getLabelMean", arg); | |
return NULL; | |
} | |
static PyObject *t_MultiNormalizerStandardize_getLabelStd(t_MultiNormalizerStandardize *self, PyObject *arg) | |
{ | |
jint a0; | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.getLabelStd(a0)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "getLabelStd", arg); | |
return NULL; | |
} | |
static PyObject *t_MultiNormalizerStandardize_getType(t_MultiNormalizerStandardize *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::dataset::api::preprocessor::serializer::NormalizerType result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getType()); | |
return ::org::nd4j::linalg::dataset::api::preprocessor::serializer::t_NormalizerType::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(MultiNormalizerStandardize), (PyObject *) self, "getType", args, 2); | |
} | |
static PyObject *t_MultiNormalizerStandardize_hashCode(t_MultiNormalizerStandardize *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(MultiNormalizerStandardize), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_MultiNormalizerStandardize_get__parameters_(t_MultiNormalizerStandardize *self, void *data) | |
{ | |
return typeParameters(self->parameters, sizeof(self->parameters)); | |
} | |
static PyObject *t_MultiNormalizerStandardize_get__type(t_MultiNormalizerStandardize *self, void *data) | |
{ | |
::org::nd4j::linalg::dataset::api::preprocessor::serializer::NormalizerType value((jobject) NULL); | |
OBJ_CALL(value = self->object.getType()); | |
return ::org::nd4j::linalg::dataset::api::preprocessor::serializer::t_NormalizerType::wrap_Object(value); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/indexing/conditions/Or.h" | |
#include "org/nd4j/linalg/indexing/conditions/Condition.h" | |
#include "java/lang/Number.h" | |
#include "java/lang/Boolean.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace indexing { | |
namespace conditions { | |
::java::lang::Class *Or::class$ = NULL; | |
jmethodID *Or::mids$ = NULL; | |
bool Or::live$ = false; | |
jclass Or::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/indexing/conditions/Or"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_5534f529] = env->getMethodID(cls, "<init>", "([Lorg/nd4j/linalg/indexing/conditions/Condition;)V"); | |
mids$[mid_apply_7a17c395] = env->getMethodID(cls, "apply", "(Ljava/lang/Number;)Ljava/lang/Boolean;"); | |
mids$[mid_condtionNum_54c6a179] = env->getMethodID(cls, "condtionNum", "()I"); | |
mids$[mid_getValue_54c6a174] = env->getMethodID(cls, "getValue", "()D"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Or::Or(const JArray< ::org::nd4j::linalg::indexing::conditions::Condition > & a0) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_5534f529, a0.this$)) {} | |
::java::lang::Boolean Or::apply(const ::java::lang::Number & a0) const | |
{ | |
return ::java::lang::Boolean(env->callObjectMethod(this$, mids$[mid_apply_7a17c395], a0.this$)); | |
} | |
jint Or::condtionNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_condtionNum_54c6a179]); | |
} | |
jdouble Or::getValue() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_getValue_54c6a174]); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace indexing { | |
namespace conditions { | |
static PyObject *t_Or_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Or_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Or_init_(t_Or *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Or_apply(t_Or *self, PyObject *arg); | |
static PyObject *t_Or_condtionNum(t_Or *self); | |
static PyObject *t_Or_getValue(t_Or *self); | |
static PyObject *t_Or_get__value(t_Or *self, void *data); | |
static PyGetSetDef t_Or__fields_[] = { | |
DECLARE_GET_FIELD(t_Or, value), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Or__methods_[] = { | |
DECLARE_METHOD(t_Or, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Or, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Or, apply, METH_O), | |
DECLARE_METHOD(t_Or, condtionNum, METH_NOARGS), | |
DECLARE_METHOD(t_Or, getValue, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Or, t_Or, ::java::lang::Object, Or, t_Or_init_, 0, 0, t_Or__fields_, 0, 0); | |
void t_Or::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Or), module, "Or", 0); | |
} | |
void t_Or::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Or).tp_dict, "class_", make_descriptor(Or::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Or).tp_dict, "wrapfn_", make_descriptor(t_Or::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Or).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Or_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Or::initializeClass, 1))) | |
return NULL; | |
return t_Or::wrap_Object(Or(((t_Or *) arg)->object.this$)); | |
} | |
static PyObject *t_Or_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Or::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Or_init_(t_Or *self, PyObject *args, PyObject *kwds) | |
{ | |
JArray< ::org::nd4j::linalg::indexing::conditions::Condition > a0((jobject) NULL); | |
Or object((jobject) NULL); | |
if (!parseArgs(args, "[k", ::org::nd4j::linalg::indexing::conditions::Condition::initializeClass, &a0)) | |
{ | |
INT_CALL(object = Or(a0)); | |
self->object = object; | |
} | |
else | |
{ | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_Or_apply(t_Or *self, PyObject *arg) | |
{ | |
::java::lang::Number a0((jobject) NULL); | |
::java::lang::Boolean result((jobject) NULL); | |
if (!parseArg(arg, "O", &::java::lang::PY_TYPE(Number), &a0)) | |
{ | |
OBJ_CALL(result = self->object.apply(a0)); | |
return ::java::lang::t_Boolean::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "apply", arg); | |
return NULL; | |
} | |
static PyObject *t_Or_condtionNum(t_Or *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.condtionNum()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_Or_getValue(t_Or *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.getValue()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_Or_get__value(t_Or *self, void *data) | |
{ | |
jdouble value; | |
OBJ_CALL(value = self->object.getValue()); | |
return PyFloat_FromDouble((double) value); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/shape/loop/four/LoopFunction4.h" | |
#include "org/nd4j/linalg/api/shape/loop/four/RawArrayIterationInformation4.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace shape { | |
namespace loop { | |
namespace four { | |
::java::lang::Class *LoopFunction4::class$ = NULL; | |
jmethodID *LoopFunction4::mids$ = NULL; | |
bool LoopFunction4::live$ = false; | |
jclass LoopFunction4::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/shape/loop/four/LoopFunction4"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace shape { | |
namespace loop { | |
namespace four { | |
static PyObject *t_LoopFunction4_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_LoopFunction4_instance_(PyTypeObject *type, PyObject *arg); | |
static PyMethodDef t_LoopFunction4__methods_[] = { | |
DECLARE_METHOD(t_LoopFunction4, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_LoopFunction4, instance_, METH_O | METH_CLASS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(LoopFunction4, t_LoopFunction4, ::java::lang::Object, LoopFunction4, abstract_init, 0, 0, 0, 0, 0); | |
void t_LoopFunction4::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(LoopFunction4), module, "LoopFunction4", 0); | |
} | |
void t_LoopFunction4::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(LoopFunction4).tp_dict, "class_", make_descriptor(LoopFunction4::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(LoopFunction4).tp_dict, "wrapfn_", make_descriptor(t_LoopFunction4::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(LoopFunction4).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_LoopFunction4_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, LoopFunction4::initializeClass, 1))) | |
return NULL; | |
return t_LoopFunction4::wrap_Object(LoopFunction4(((t_LoopFunction4 *) arg)->object.this$)); | |
} | |
static PyObject *t_LoopFunction4_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, LoopFunction4::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/shade/jackson/databind/JsonSerializer.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace shade { | |
namespace jackson { | |
namespace databind { | |
::java::lang::Class *JsonSerializer::class$ = NULL; | |
jmethodID *JsonSerializer::mids$ = NULL; | |
bool JsonSerializer::live$ = false; | |
jclass JsonSerializer::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/shade/jackson/databind/JsonSerializer"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_getDelegatee_7cc744be] = env->getMethodID(cls, "getDelegatee", "()Lorg/nd4j/shade/jackson/databind/JsonSerializer;"); | |
mids$[mid_handledType_44a5f2c9] = env->getMethodID(cls, "handledType", "()Ljava/lang/Class;"); | |
mids$[mid_isEmpty_290588e2] = env->getMethodID(cls, "isEmpty", "(Ljava/lang/Object;)Z"); | |
mids$[mid_isUnwrappingSerializer_54c6a16a] = env->getMethodID(cls, "isUnwrappingSerializer", "()Z"); | |
mids$[mid_replaceDelegatee_6415f291] = env->getMethodID(cls, "replaceDelegatee", "(Lorg/nd4j/shade/jackson/databind/JsonSerializer;)Lorg/nd4j/shade/jackson/databind/JsonSerializer;"); | |
mids$[mid_usesObjectId_54c6a16a] = env->getMethodID(cls, "usesObjectId", "()Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
JsonSerializer::JsonSerializer() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
JsonSerializer JsonSerializer::getDelegatee() const | |
{ | |
return JsonSerializer(env->callObjectMethod(this$, mids$[mid_getDelegatee_7cc744be])); | |
} | |
::java::lang::Class JsonSerializer::handledType() const | |
{ | |
return ::java::lang::Class(env->callObjectMethod(this$, mids$[mid_handledType_44a5f2c9])); | |
} | |
jboolean JsonSerializer::isEmpty(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isEmpty_290588e2], a0.this$); | |
} | |
jboolean JsonSerializer::isUnwrappingSerializer() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isUnwrappingSerializer_54c6a16a]); | |
} | |
JsonSerializer JsonSerializer::replaceDelegatee(const JsonSerializer & a0) const | |
{ | |
return JsonSerializer(env->callObjectMethod(this$, mids$[mid_replaceDelegatee_6415f291], a0.this$)); | |
} | |
jboolean JsonSerializer::usesObjectId() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_usesObjectId_54c6a16a]); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace shade { | |
namespace jackson { | |
namespace databind { | |
static PyObject *t_JsonSerializer_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_JsonSerializer_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_JsonSerializer_of_(t_JsonSerializer *self, PyObject *args); | |
static int t_JsonSerializer_init_(t_JsonSerializer *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_JsonSerializer_getDelegatee(t_JsonSerializer *self); | |
static PyObject *t_JsonSerializer_handledType(t_JsonSerializer *self); | |
static PyObject *t_JsonSerializer_isEmpty(t_JsonSerializer *self, PyObject *arg); | |
static PyObject *t_JsonSerializer_isUnwrappingSerializer(t_JsonSerializer *self); | |
static PyObject *t_JsonSerializer_replaceDelegatee(t_JsonSerializer *self, PyObject *arg); | |
static PyObject *t_JsonSerializer_usesObjectId(t_JsonSerializer *self); | |
static PyObject *t_JsonSerializer_get__delegatee(t_JsonSerializer *self, void *data); | |
static PyObject *t_JsonSerializer_get__unwrappingSerializer(t_JsonSerializer *self, void *data); | |
static PyObject *t_JsonSerializer_get__parameters_(t_JsonSerializer *self, void *data); | |
static PyGetSetDef t_JsonSerializer__fields_[] = { | |
DECLARE_GET_FIELD(t_JsonSerializer, delegatee), | |
DECLARE_GET_FIELD(t_JsonSerializer, unwrappingSerializer), | |
DECLARE_GET_FIELD(t_JsonSerializer, parameters_), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_JsonSerializer__methods_[] = { | |
DECLARE_METHOD(t_JsonSerializer, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_JsonSerializer, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_JsonSerializer, of_, METH_VARARGS), | |
DECLARE_METHOD(t_JsonSerializer, getDelegatee, METH_NOARGS), | |
DECLARE_METHOD(t_JsonSerializer, handledType, METH_NOARGS), | |
DECLARE_METHOD(t_JsonSerializer, isEmpty, METH_O), | |
DECLARE_METHOD(t_JsonSerializer, isUnwrappingSerializer, METH_NOARGS), | |
DECLARE_METHOD(t_JsonSerializer, replaceDelegatee, METH_O), | |
DECLARE_METHOD(t_JsonSerializer, usesObjectId, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(JsonSerializer, t_JsonSerializer, ::java::lang::Object, JsonSerializer, t_JsonSerializer_init_, 0, 0, t_JsonSerializer__fields_, 0, 0); | |
PyObject *t_JsonSerializer::wrap_Object(const JsonSerializer& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_JsonSerializer::wrap_Object(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_JsonSerializer *self = (t_JsonSerializer *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
PyObject *t_JsonSerializer::wrap_jobject(const jobject& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_JsonSerializer::wrap_jobject(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_JsonSerializer *self = (t_JsonSerializer *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
void t_JsonSerializer::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(JsonSerializer), module, "JsonSerializer", 0); | |
} | |
void t_JsonSerializer::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(JsonSerializer).tp_dict, "class_", make_descriptor(JsonSerializer::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(JsonSerializer).tp_dict, "wrapfn_", make_descriptor(t_JsonSerializer::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(JsonSerializer).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_JsonSerializer_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, JsonSerializer::initializeClass, 1))) | |
return NULL; | |
return t_JsonSerializer::wrap_Object(JsonSerializer(((t_JsonSerializer *) arg)->object.this$)); | |
} | |
static PyObject *t_JsonSerializer_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, JsonSerializer::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_JsonSerializer_of_(t_JsonSerializer *self, PyObject *args) | |
{ | |
if (!parseArg(args, "T", 1, &(self->parameters))) | |
Py_RETURN_SELF; | |
return PyErr_SetArgsError((PyObject *) self, "of_", args); | |
} | |
static int t_JsonSerializer_init_(t_JsonSerializer *self, PyObject *args, PyObject *kwds) | |
{ | |
JsonSerializer object((jobject) NULL); | |
INT_CALL(object = JsonSerializer()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_JsonSerializer_getDelegatee(t_JsonSerializer *self) | |
{ | |
JsonSerializer result((jobject) NULL); | |
OBJ_CALL(result = self->object.getDelegatee()); | |
return t_JsonSerializer::wrap_Object(result); | |
} | |
static PyObject *t_JsonSerializer_handledType(t_JsonSerializer *self) | |
{ | |
::java::lang::Class result((jobject) NULL); | |
OBJ_CALL(result = self->object.handledType()); | |
return ::java::lang::t_Class::wrap_Object(result, self->parameters[0]); | |
} | |
static PyObject *t_JsonSerializer_isEmpty(t_JsonSerializer *self, PyObject *arg) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArg(arg, "O", self->parameters[0], &a0)) | |
{ | |
OBJ_CALL(result = self->object.isEmpty(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "isEmpty", arg); | |
return NULL; | |
} | |
static PyObject *t_JsonSerializer_isUnwrappingSerializer(t_JsonSerializer *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.isUnwrappingSerializer()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_JsonSerializer_replaceDelegatee(t_JsonSerializer *self, PyObject *arg) | |
{ | |
JsonSerializer a0((jobject) NULL); | |
PyTypeObject **p0; | |
JsonSerializer result((jobject) NULL); | |
if (!parseArg(arg, "K", JsonSerializer::initializeClass, &a0, &p0, t_JsonSerializer::parameters_)) | |
{ | |
OBJ_CALL(result = self->object.replaceDelegatee(a0)); | |
return t_JsonSerializer::wrap_Object(result, self->parameters[0]); | |
} | |
PyErr_SetArgsError((PyObject *) self, "replaceDelegatee", arg); | |
return NULL; | |
} | |
static PyObject *t_JsonSerializer_usesObjectId(t_JsonSerializer *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.usesObjectId()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_JsonSerializer_get__parameters_(t_JsonSerializer *self, void *data) | |
{ | |
return typeParameters(self->parameters, sizeof(self->parameters)); | |
} | |
static PyObject *t_JsonSerializer_get__delegatee(t_JsonSerializer *self, void *data) | |
{ | |
JsonSerializer value((jobject) NULL); | |
OBJ_CALL(value = self->object.getDelegatee()); | |
return t_JsonSerializer::wrap_Object(value); | |
} | |
static PyObject *t_JsonSerializer_get__unwrappingSerializer(t_JsonSerializer *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isUnwrappingSerializer()); | |
Py_RETURN_BOOL(value); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/cpu/nativecpu/complex/ComplexFloat.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace cpu { | |
namespace nativecpu { | |
namespace complex { | |
::java::lang::Class *ComplexFloat::class$ = NULL; | |
jmethodID *ComplexFloat::mids$ = NULL; | |
bool ComplexFloat::live$ = false; | |
ComplexFloat *ComplexFloat::NEG = NULL; | |
ComplexFloat *ComplexFloat::UNIT = NULL; | |
ComplexFloat *ComplexFloat::ZERO = NULL; | |
jclass ComplexFloat::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/cpu/nativecpu/complex/ComplexFloat"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_06298cab] = env->getMethodID(cls, "<init>", "(F)V"); | |
mids$[mid_init$_f1b0c004] = env->getMethodID(cls, "<init>", "(FF)V"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
cls = (jclass) class$->this$; | |
NEG = new ComplexFloat(env->getStaticObjectField(cls, "NEG", "Lorg/nd4j/linalg/cpu/nativecpu/complex/ComplexFloat;")); | |
UNIT = new ComplexFloat(env->getStaticObjectField(cls, "UNIT", "Lorg/nd4j/linalg/cpu/nativecpu/complex/ComplexFloat;")); | |
ZERO = new ComplexFloat(env->getStaticObjectField(cls, "ZERO", "Lorg/nd4j/linalg/cpu/nativecpu/complex/ComplexFloat;")); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
ComplexFloat::ComplexFloat(jfloat a0) : ::org::nd4j::linalg::api::complex::BaseComplexFloat(env->newObject(initializeClass, &mids$, mid_init$_06298cab, a0)) {} | |
ComplexFloat::ComplexFloat(jfloat a0, jfloat a1) : ::org::nd4j::linalg::api::complex::BaseComplexFloat(env->newObject(initializeClass, &mids$, mid_init$_f1b0c004, a0, a1)) {} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace cpu { | |
namespace nativecpu { | |
namespace complex { | |
static PyObject *t_ComplexFloat_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_ComplexFloat_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_ComplexFloat_init_(t_ComplexFloat *self, PyObject *args, PyObject *kwds); | |
static PyMethodDef t_ComplexFloat__methods_[] = { | |
DECLARE_METHOD(t_ComplexFloat, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ComplexFloat, instance_, METH_O | METH_CLASS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(ComplexFloat, t_ComplexFloat, ::org::nd4j::linalg::api::complex::BaseComplexFloat, ComplexFloat, t_ComplexFloat_init_, 0, 0, 0, 0, 0); | |
void t_ComplexFloat::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(ComplexFloat), module, "ComplexFloat", 0); | |
} | |
void t_ComplexFloat::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(ComplexFloat).tp_dict, "class_", make_descriptor(ComplexFloat::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(ComplexFloat).tp_dict, "wrapfn_", make_descriptor(t_ComplexFloat::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(ComplexFloat).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
env->getClass(ComplexFloat::initializeClass); | |
PyDict_SetItemString(PY_TYPE(ComplexFloat).tp_dict, "NEG", make_descriptor(t_ComplexFloat::wrap_Object(*ComplexFloat::NEG))); | |
PyDict_SetItemString(PY_TYPE(ComplexFloat).tp_dict, "UNIT", make_descriptor(t_ComplexFloat::wrap_Object(*ComplexFloat::UNIT))); | |
PyDict_SetItemString(PY_TYPE(ComplexFloat).tp_dict, "ZERO", make_descriptor(t_ComplexFloat::wrap_Object(*ComplexFloat::ZERO))); | |
} | |
static PyObject *t_ComplexFloat_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, ComplexFloat::initializeClass, 1))) | |
return NULL; | |
return t_ComplexFloat::wrap_Object(ComplexFloat(((t_ComplexFloat *) arg)->object.this$)); | |
} | |
static PyObject *t_ComplexFloat_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, ComplexFloat::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_ComplexFloat_init_(t_ComplexFloat *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
ComplexFloat object((jobject) NULL); | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
INT_CALL(object = ComplexFloat(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
jfloat a0; | |
jfloat a1; | |
ComplexFloat object((jobject) NULL); | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
INT_CALL(object = ComplexFloat(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/aggregates/impl/AggregateSkipGram.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace aggregates { | |
namespace impl { | |
::java::lang::Class *AggregateSkipGram::class$ = NULL; | |
jmethodID *AggregateSkipGram::mids$ = NULL; | |
bool AggregateSkipGram::live$ = false; | |
jclass AggregateSkipGram::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/aggregates/impl/AggregateSkipGram"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_bd6e2c87] = env->getMethodID(cls, "<init>", "(II[I[IIDI)V"); | |
mids$[mid_init$_ca2a4a86] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;I[I[IIIIDJI)V"); | |
mids$[mid_init$_26268dc0] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;I[I[IIIIDJILorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_getSharedMemorySize_54c6a179] = env->getMethodID(cls, "getSharedMemorySize", "()I"); | |
mids$[mid_getThreadsPerInstance_54c6a179] = env->getMethodID(cls, "getThreadsPerInstance", "()I"); | |
mids$[mid_maxArguments_54c6a179] = env->getMethodID(cls, "maxArguments", "()I"); | |
mids$[mid_maxIndexArguments_54c6a179] = env->getMethodID(cls, "maxIndexArguments", "()I"); | |
mids$[mid_maxIntArraySize_54c6a179] = env->getMethodID(cls, "maxIntArraySize", "()I"); | |
mids$[mid_maxIntArrays_54c6a179] = env->getMethodID(cls, "maxIntArrays", "()I"); | |
mids$[mid_maxRealArguments_54c6a179] = env->getMethodID(cls, "maxRealArguments", "()I"); | |
mids$[mid_maxShapes_54c6a179] = env->getMethodID(cls, "maxShapes", "()I"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
AggregateSkipGram::AggregateSkipGram(jint a0, jint a1, const JArray< jint > & a2, const JArray< jint > & a3, jint a4, jdouble a5, jint a6) : ::org::nd4j::linalg::api::ops::aggregates::BaseAggregate(env->newObject(initializeClass, &mids$, mid_init$_bd6e2c87, a0, a1, a2.this$, a3.this$, a4, a5, a6)) {} | |
AggregateSkipGram::AggregateSkipGram(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, const ::org::nd4j::linalg::api::ndarray::INDArray & a3, const ::org::nd4j::linalg::api::ndarray::INDArray & a4, jint a5, const JArray< jint > & a6, const JArray< jint > & a7, jint a8, jint a9, jint a10, jdouble a11, jlong a12, jint a13) : ::org::nd4j::linalg::api::ops::aggregates::BaseAggregate(env->newObject(initializeClass, &mids$, mid_init$_ca2a4a86, a0.this$, a1.this$, a2.this$, a3.this$, a4.this$, a5, a6.this$, a7.this$, a8, a9, a10, a11, a12, a13)) {} | |
AggregateSkipGram::AggregateSkipGram(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, const ::org::nd4j::linalg::api::ndarray::INDArray & a3, const ::org::nd4j::linalg::api::ndarray::INDArray & a4, jint a5, const JArray< jint > & a6, const JArray< jint > & a7, jint a8, jint a9, jint a10, jdouble a11, jlong a12, jint a13, const ::org::nd4j::linalg::api::ndarray::INDArray & a14) : ::org::nd4j::linalg::api::ops::aggregates::BaseAggregate(env->newObject(initializeClass, &mids$, mid_init$_26268dc0, a0.this$, a1.this$, a2.this$, a3.this$, a4.this$, a5, a6.this$, a7.this$, a8, a9, a10, a11, a12, a13, a14.this$)) {} | |
jint AggregateSkipGram::getSharedMemorySize() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getSharedMemorySize_54c6a179]); | |
} | |
jint AggregateSkipGram::getThreadsPerInstance() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getThreadsPerInstance_54c6a179]); | |
} | |
jint AggregateSkipGram::maxArguments() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxArguments_54c6a179]); | |
} | |
jint AggregateSkipGram::maxIndexArguments() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxIndexArguments_54c6a179]); | |
} | |
jint AggregateSkipGram::maxIntArraySize() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxIntArraySize_54c6a179]); | |
} | |
jint AggregateSkipGram::maxIntArrays() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxIntArrays_54c6a179]); | |
} | |
jint AggregateSkipGram::maxRealArguments() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxRealArguments_54c6a179]); | |
} | |
jint AggregateSkipGram::maxShapes() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxShapes_54c6a179]); | |
} | |
::java::lang::String AggregateSkipGram::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jint AggregateSkipGram::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace aggregates { | |
namespace impl { | |
static PyObject *t_AggregateSkipGram_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_AggregateSkipGram_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_AggregateSkipGram_init_(t_AggregateSkipGram *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_AggregateSkipGram_getSharedMemorySize(t_AggregateSkipGram *self, PyObject *args); | |
static PyObject *t_AggregateSkipGram_getThreadsPerInstance(t_AggregateSkipGram *self, PyObject *args); | |
static PyObject *t_AggregateSkipGram_maxArguments(t_AggregateSkipGram *self, PyObject *args); | |
static PyObject *t_AggregateSkipGram_maxIndexArguments(t_AggregateSkipGram *self, PyObject *args); | |
static PyObject *t_AggregateSkipGram_maxIntArraySize(t_AggregateSkipGram *self, PyObject *args); | |
static PyObject *t_AggregateSkipGram_maxIntArrays(t_AggregateSkipGram *self, PyObject *args); | |
static PyObject *t_AggregateSkipGram_maxRealArguments(t_AggregateSkipGram *self, PyObject *args); | |
static PyObject *t_AggregateSkipGram_maxShapes(t_AggregateSkipGram *self, PyObject *args); | |
static PyObject *t_AggregateSkipGram_name(t_AggregateSkipGram *self, PyObject *args); | |
static PyObject *t_AggregateSkipGram_opNum(t_AggregateSkipGram *self, PyObject *args); | |
static PyObject *t_AggregateSkipGram_get__sharedMemorySize(t_AggregateSkipGram *self, void *data); | |
static PyObject *t_AggregateSkipGram_get__threadsPerInstance(t_AggregateSkipGram *self, void *data); | |
static PyGetSetDef t_AggregateSkipGram__fields_[] = { | |
DECLARE_GET_FIELD(t_AggregateSkipGram, sharedMemorySize), | |
DECLARE_GET_FIELD(t_AggregateSkipGram, threadsPerInstance), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_AggregateSkipGram__methods_[] = { | |
DECLARE_METHOD(t_AggregateSkipGram, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_AggregateSkipGram, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_AggregateSkipGram, getSharedMemorySize, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateSkipGram, getThreadsPerInstance, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateSkipGram, maxArguments, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateSkipGram, maxIndexArguments, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateSkipGram, maxIntArraySize, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateSkipGram, maxIntArrays, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateSkipGram, maxRealArguments, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateSkipGram, maxShapes, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateSkipGram, name, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateSkipGram, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(AggregateSkipGram, t_AggregateSkipGram, ::org::nd4j::linalg::api::ops::aggregates::BaseAggregate, AggregateSkipGram, t_AggregateSkipGram_init_, 0, 0, t_AggregateSkipGram__fields_, 0, 0); | |
void t_AggregateSkipGram::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(AggregateSkipGram), module, "AggregateSkipGram", 0); | |
} | |
void t_AggregateSkipGram::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(AggregateSkipGram).tp_dict, "class_", make_descriptor(AggregateSkipGram::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(AggregateSkipGram).tp_dict, "wrapfn_", make_descriptor(t_AggregateSkipGram::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(AggregateSkipGram).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_AggregateSkipGram_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, AggregateSkipGram::initializeClass, 1))) | |
return NULL; | |
return t_AggregateSkipGram::wrap_Object(AggregateSkipGram(((t_AggregateSkipGram *) arg)->object.this$)); | |
} | |
static PyObject *t_AggregateSkipGram_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, AggregateSkipGram::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_AggregateSkipGram_init_(t_AggregateSkipGram *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 7: | |
{ | |
jint a0; | |
jint a1; | |
JArray< jint > a2((jobject) NULL); | |
JArray< jint > a3((jobject) NULL); | |
jint a4; | |
jdouble a5; | |
jint a6; | |
AggregateSkipGram object((jobject) NULL); | |
if (!parseArgs(args, "II[I[IIDI", &a0, &a1, &a2, &a3, &a4, &a5, &a6)) | |
{ | |
INT_CALL(object = AggregateSkipGram(a0, a1, a2, a3, a4, a5, a6)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 14: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a3((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a4((jobject) NULL); | |
jint a5; | |
JArray< jint > a6((jobject) NULL); | |
JArray< jint > a7((jobject) NULL); | |
jint a8; | |
jint a9; | |
jint a10; | |
jdouble a11; | |
jlong a12; | |
jint a13; | |
AggregateSkipGram object((jobject) NULL); | |
if (!parseArgs(args, "kkkkkI[I[IIIIDJI", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9, &a10, &a11, &a12, &a13)) | |
{ | |
INT_CALL(object = AggregateSkipGram(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 15: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a3((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a4((jobject) NULL); | |
jint a5; | |
JArray< jint > a6((jobject) NULL); | |
JArray< jint > a7((jobject) NULL); | |
jint a8; | |
jint a9; | |
jint a10; | |
jdouble a11; | |
jlong a12; | |
jint a13; | |
::org::nd4j::linalg::api::ndarray::INDArray a14((jobject) NULL); | |
AggregateSkipGram object((jobject) NULL); | |
if (!parseArgs(args, "kkkkkI[I[IIIIDJIk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9, &a10, &a11, &a12, &a13, &a14)) | |
{ | |
INT_CALL(object = AggregateSkipGram(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_AggregateSkipGram_getSharedMemorySize(t_AggregateSkipGram *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getSharedMemorySize()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateSkipGram), (PyObject *) self, "getSharedMemorySize", args, 2); | |
} | |
static PyObject *t_AggregateSkipGram_getThreadsPerInstance(t_AggregateSkipGram *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getThreadsPerInstance()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateSkipGram), (PyObject *) self, "getThreadsPerInstance", args, 2); | |
} | |
static PyObject *t_AggregateSkipGram_maxArguments(t_AggregateSkipGram *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxArguments()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateSkipGram), (PyObject *) self, "maxArguments", args, 2); | |
} | |
static PyObject *t_AggregateSkipGram_maxIndexArguments(t_AggregateSkipGram *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxIndexArguments()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateSkipGram), (PyObject *) self, "maxIndexArguments", args, 2); | |
} | |
static PyObject *t_AggregateSkipGram_maxIntArraySize(t_AggregateSkipGram *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxIntArraySize()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateSkipGram), (PyObject *) self, "maxIntArraySize", args, 2); | |
} | |
static PyObject *t_AggregateSkipGram_maxIntArrays(t_AggregateSkipGram *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxIntArrays()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateSkipGram), (PyObject *) self, "maxIntArrays", args, 2); | |
} | |
static PyObject *t_AggregateSkipGram_maxRealArguments(t_AggregateSkipGram *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxRealArguments()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateSkipGram), (PyObject *) self, "maxRealArguments", args, 2); | |
} | |
static PyObject *t_AggregateSkipGram_maxShapes(t_AggregateSkipGram *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxShapes()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateSkipGram), (PyObject *) self, "maxShapes", args, 2); | |
} | |
static PyObject *t_AggregateSkipGram_name(t_AggregateSkipGram *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(AggregateSkipGram), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_AggregateSkipGram_opNum(t_AggregateSkipGram *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateSkipGram), (PyObject *) self, "opNum", args, 2); | |
} | |
static PyObject *t_AggregateSkipGram_get__sharedMemorySize(t_AggregateSkipGram *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getSharedMemorySize()); | |
return PyInt_FromLong((long) value); | |
} | |
static PyObject *t_AggregateSkipGram_get__threadsPerInstance(t_AggregateSkipGram *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getThreadsPerInstance()); | |
return PyInt_FromLong((long) value); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/accum/NormMax.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace accum { | |
::java::lang::Class *NormMax::class$ = NULL; | |
jmethodID *NormMax::mids$ = NULL; | |
bool NormMax::live$ = false; | |
jclass NormMax::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/accum/NormMax"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_4237560b] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_init$_321bc445] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_noOp_eef1d225] = env->getMethodID(cls, "noOp", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
mids$[mid_update_f1b0c014] = env->getMethodID(cls, "update", "(FF)F"); | |
mids$[mid_update_b1e2866a] = env->getMethodID(cls, "update", "(DD)D"); | |
mids$[mid_update_5348eb3d] = env->getMethodID(cls, "update", "(FFF)F"); | |
mids$[mid_update_c5d3f3bd] = env->getMethodID(cls, "update", "(DDD)D"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
NormMax::NormMax() : ::org::nd4j::linalg::api::ops::BaseAccumulation(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
NormMax::NormMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::api::ops::BaseAccumulation(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
NormMax::NormMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::BaseAccumulation(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
NormMax::NormMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2) : ::org::nd4j::linalg::api::ops::BaseAccumulation(env->newObject(initializeClass, &mids$, mid_init$_4237560b, a0.this$, a1.this$, a2)) {} | |
NormMax::NormMax(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) : ::org::nd4j::linalg::api::ops::BaseAccumulation(env->newObject(initializeClass, &mids$, mid_init$_321bc445, a0.this$, a1.this$, a2.this$, a3)) {} | |
::java::lang::String NormMax::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray NormMax::noOp() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_noOp_eef1d225])); | |
} | |
::org::nd4j::linalg::api::ops::Op NormMax::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ops::Op NormMax::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
jint NormMax::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
jfloat NormMax::update(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_update_f1b0c014], a0, a1); | |
} | |
jdouble NormMax::update(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_update_b1e2866a], a0, a1); | |
} | |
jfloat NormMax::update(jfloat a0, jfloat a1, jfloat a2) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_update_5348eb3d], a0, a1, a2); | |
} | |
jdouble NormMax::update(jdouble a0, jdouble a1, jdouble a2) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_update_c5d3f3bd], a0, a1, a2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace accum { | |
static PyObject *t_NormMax_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_NormMax_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_NormMax_init_(t_NormMax *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_NormMax_name(t_NormMax *self, PyObject *args); | |
static PyObject *t_NormMax_noOp(t_NormMax *self, PyObject *args); | |
static PyObject *t_NormMax_opForDimension(t_NormMax *self, PyObject *args); | |
static PyObject *t_NormMax_opNum(t_NormMax *self, PyObject *args); | |
static PyObject *t_NormMax_update(t_NormMax *self, PyObject *args); | |
static PyMethodDef t_NormMax__methods_[] = { | |
DECLARE_METHOD(t_NormMax, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_NormMax, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_NormMax, name, METH_VARARGS), | |
DECLARE_METHOD(t_NormMax, noOp, METH_VARARGS), | |
DECLARE_METHOD(t_NormMax, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_NormMax, opNum, METH_VARARGS), | |
DECLARE_METHOD(t_NormMax, update, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(NormMax, t_NormMax, ::org::nd4j::linalg::api::ops::BaseAccumulation, NormMax, t_NormMax_init_, 0, 0, 0, 0, 0); | |
void t_NormMax::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(NormMax), module, "NormMax", 0); | |
} | |
void t_NormMax::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(NormMax).tp_dict, "class_", make_descriptor(NormMax::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(NormMax).tp_dict, "wrapfn_", make_descriptor(t_NormMax::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(NormMax).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_NormMax_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, NormMax::initializeClass, 1))) | |
return NULL; | |
return t_NormMax::wrap_Object(NormMax(((t_NormMax *) arg)->object.this$)); | |
} | |
static PyObject *t_NormMax_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, NormMax::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_NormMax_init_(t_NormMax *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
NormMax object((jobject) NULL); | |
INT_CALL(object = NormMax()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
NormMax object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = NormMax(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
NormMax object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = NormMax(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
NormMax object((jobject) NULL); | |
if (!parseArgs(args, "kkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = NormMax(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
NormMax object((jobject) NULL); | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = NormMax(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_NormMax_name(t_NormMax *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(NormMax), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_NormMax_noOp(t_NormMax *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.noOp()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(NormMax), (PyObject *) self, "noOp", args, 2); | |
} | |
static PyObject *t_NormMax_opForDimension(t_NormMax *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(NormMax), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_NormMax_opNum(t_NormMax *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(NormMax), (PyObject *) self, "opNum", args, 2); | |
} | |
static PyObject *t_NormMax_update(t_NormMax *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.update(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.update(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 3: | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat a2; | |
jfloat result; | |
if (!parseArgs(args, "FFF", &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(result = self->object.update(a0, a1, a2)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble a2; | |
jdouble result; | |
if (!parseArgs(args, "DDD", &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(result = self->object.update(a0, a1, a2)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(NormMax), (PyObject *) self, "update", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/learning/Nesterovs$NesterovsAggregator.h" | |
#include "org/nd4j/linalg/learning/GradientUpdater.h" | |
#include "org/nd4j/linalg/learning/GradientUpdaterAggregator.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
::java::lang::Class *Nesterovs$NesterovsAggregator::class$ = NULL; | |
jmethodID *Nesterovs$NesterovsAggregator::mids$ = NULL; | |
bool Nesterovs$NesterovsAggregator::live$ = false; | |
jclass Nesterovs$NesterovsAggregator::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/learning/Nesterovs$NesterovsAggregator"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_aggregate_eeea4eab] = env->getMethodID(cls, "aggregate", "(Lorg/nd4j/linalg/learning/GradientUpdater;)V"); | |
mids$[mid_combine_37615f37] = env->getMethodID(cls, "combine", "(Lorg/nd4j/linalg/learning/GradientUpdaterAggregator;)Lorg/nd4j/linalg/learning/GradientUpdaterAggregator;"); | |
mids$[mid_getUpdater_a54e28ba] = env->getMethodID(cls, "getUpdater", "()Lorg/nd4j/linalg/learning/GradientUpdater;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Nesterovs$NesterovsAggregator::Nesterovs$NesterovsAggregator() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
void Nesterovs$NesterovsAggregator::aggregate(const ::org::nd4j::linalg::learning::GradientUpdater & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_aggregate_eeea4eab], a0.this$); | |
} | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator Nesterovs$NesterovsAggregator::combine(const ::org::nd4j::linalg::learning::GradientUpdaterAggregator & a0) const | |
{ | |
return ::org::nd4j::linalg::learning::GradientUpdaterAggregator(env->callObjectMethod(this$, mids$[mid_combine_37615f37], a0.this$)); | |
} | |
::org::nd4j::linalg::learning::GradientUpdater Nesterovs$NesterovsAggregator::getUpdater() const | |
{ | |
return ::org::nd4j::linalg::learning::GradientUpdater(env->callObjectMethod(this$, mids$[mid_getUpdater_a54e28ba])); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
static PyObject *t_Nesterovs$NesterovsAggregator_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Nesterovs$NesterovsAggregator_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Nesterovs$NesterovsAggregator_init_(t_Nesterovs$NesterovsAggregator *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Nesterovs$NesterovsAggregator_aggregate(t_Nesterovs$NesterovsAggregator *self, PyObject *arg); | |
static PyObject *t_Nesterovs$NesterovsAggregator_combine(t_Nesterovs$NesterovsAggregator *self, PyObject *arg); | |
static PyObject *t_Nesterovs$NesterovsAggregator_getUpdater(t_Nesterovs$NesterovsAggregator *self); | |
static PyObject *t_Nesterovs$NesterovsAggregator_get__updater(t_Nesterovs$NesterovsAggregator *self, void *data); | |
static PyGetSetDef t_Nesterovs$NesterovsAggregator__fields_[] = { | |
DECLARE_GET_FIELD(t_Nesterovs$NesterovsAggregator, updater), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Nesterovs$NesterovsAggregator__methods_[] = { | |
DECLARE_METHOD(t_Nesterovs$NesterovsAggregator, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Nesterovs$NesterovsAggregator, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Nesterovs$NesterovsAggregator, aggregate, METH_O), | |
DECLARE_METHOD(t_Nesterovs$NesterovsAggregator, combine, METH_O), | |
DECLARE_METHOD(t_Nesterovs$NesterovsAggregator, getUpdater, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Nesterovs$NesterovsAggregator, t_Nesterovs$NesterovsAggregator, ::java::lang::Object, Nesterovs$NesterovsAggregator, t_Nesterovs$NesterovsAggregator_init_, 0, 0, t_Nesterovs$NesterovsAggregator__fields_, 0, 0); | |
void t_Nesterovs$NesterovsAggregator::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Nesterovs$NesterovsAggregator), module, "Nesterovs$NesterovsAggregator", 0); | |
} | |
void t_Nesterovs$NesterovsAggregator::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Nesterovs$NesterovsAggregator).tp_dict, "class_", make_descriptor(Nesterovs$NesterovsAggregator::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Nesterovs$NesterovsAggregator).tp_dict, "wrapfn_", make_descriptor(t_Nesterovs$NesterovsAggregator::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Nesterovs$NesterovsAggregator).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Nesterovs$NesterovsAggregator_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Nesterovs$NesterovsAggregator::initializeClass, 1))) | |
return NULL; | |
return t_Nesterovs$NesterovsAggregator::wrap_Object(Nesterovs$NesterovsAggregator(((t_Nesterovs$NesterovsAggregator *) arg)->object.this$)); | |
} | |
static PyObject *t_Nesterovs$NesterovsAggregator_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Nesterovs$NesterovsAggregator::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Nesterovs$NesterovsAggregator_init_(t_Nesterovs$NesterovsAggregator *self, PyObject *args, PyObject *kwds) | |
{ | |
Nesterovs$NesterovsAggregator object((jobject) NULL); | |
INT_CALL(object = Nesterovs$NesterovsAggregator()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_Nesterovs$NesterovsAggregator_aggregate(t_Nesterovs$NesterovsAggregator *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::learning::GradientUpdater::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.aggregate(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "aggregate", arg); | |
return NULL; | |
} | |
static PyObject *t_Nesterovs$NesterovsAggregator_combine(t_Nesterovs$NesterovsAggregator *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator a0((jobject) NULL); | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator result((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::learning::GradientUpdaterAggregator::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.combine(a0)); | |
return ::org::nd4j::linalg::learning::t_GradientUpdaterAggregator::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "combine", arg); | |
return NULL; | |
} | |
static PyObject *t_Nesterovs$NesterovsAggregator_getUpdater(t_Nesterovs$NesterovsAggregator *self) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater result((jobject) NULL); | |
OBJ_CALL(result = self->object.getUpdater()); | |
return ::org::nd4j::linalg::learning::t_GradientUpdater::wrap_Object(result); | |
} | |
static PyObject *t_Nesterovs$NesterovsAggregator_get__updater(t_Nesterovs$NesterovsAggregator *self, void *data) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater value((jobject) NULL); | |
OBJ_CALL(value = self->object.getUpdater()); | |
return ::org::nd4j::linalg::learning::t_GradientUpdater::wrap_Object(value); | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/learning/Nesterovs.h" | |
#include "java/lang/Class.h" | |
#include "org/nd4j/linalg/learning/GradientUpdater.h" | |
#include "java/lang/String.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "org/nd4j/linalg/learning/GradientUpdaterAggregator.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
::java::lang::Class *Nesterovs::class$ = NULL; | |
jmethodID *Nesterovs::mids$ = NULL; | |
bool Nesterovs::live$ = false; | |
jdouble Nesterovs::DEFAULT_NESTEROV_MOMENTUM = (jdouble) 0; | |
jclass Nesterovs::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/learning/Nesterovs"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_5d1c7645] = env->getMethodID(cls, "<init>", "(D)V"); | |
mids$[mid_init$_b1e28678] = env->getMethodID(cls, "<init>", "(DD)V"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_getAggregator_a551ed12] = env->getMethodID(cls, "getAggregator", "(Z)Lorg/nd4j/linalg/learning/GradientUpdaterAggregator;"); | |
mids$[mid_getGradient_93011639] = env->getMethodID(cls, "getGradient", "(Lorg/nd4j/linalg/api/ndarray/INDArray;I)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_getLearningRate_54c6a174] = env->getMethodID(cls, "getLearningRate", "()D"); | |
mids$[mid_getMomentum_54c6a174] = env->getMethodID(cls, "getMomentum", "()D"); | |
mids$[mid_getV_eef1d225] = env->getMethodID(cls, "getV", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_setLearningRate_5d1c7645] = env->getMethodID(cls, "setLearningRate", "(D)V"); | |
mids$[mid_setMomentum_5d1c7645] = env->getMethodID(cls, "setMomentum", "(D)V"); | |
mids$[mid_setStateViewArray_324af5e3] = env->getMethodID(cls, "setStateViewArray", "(Lorg/nd4j/linalg/api/ndarray/INDArray;[ICZ)V"); | |
mids$[mid_setV_97661d74] = env->getMethodID(cls, "setV", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_stateSizeForInputSize_39c7bd23] = env->getMethodID(cls, "stateSizeForInputSize", "(I)I"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
mids$[mid_update_c0f5dada] = env->getMethodID(cls, "update", "([Ljava/lang/Object;)V"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
cls = (jclass) class$->this$; | |
DEFAULT_NESTEROV_MOMENTUM = env->getStaticDoubleField(cls, "DEFAULT_NESTEROV_MOMENTUM"); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Nesterovs::Nesterovs() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
Nesterovs::Nesterovs(jdouble a0) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_5d1c7645, a0)) {} | |
Nesterovs::Nesterovs(jdouble a0, jdouble a1) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_b1e28678, a0, a1)) {} | |
jboolean Nesterovs::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator Nesterovs::getAggregator(jboolean a0) const | |
{ | |
return ::org::nd4j::linalg::learning::GradientUpdaterAggregator(env->callObjectMethod(this$, mids$[mid_getAggregator_a551ed12], a0)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray Nesterovs::getGradient(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getGradient_93011639], a0.this$, a1)); | |
} | |
jdouble Nesterovs::getLearningRate() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_getLearningRate_54c6a174]); | |
} | |
jdouble Nesterovs::getMomentum() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_getMomentum_54c6a174]); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray Nesterovs::getV() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getV_eef1d225])); | |
} | |
jint Nesterovs::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
void Nesterovs::setLearningRate(jdouble a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setLearningRate_5d1c7645], a0); | |
} | |
void Nesterovs::setMomentum(jdouble a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setMomentum_5d1c7645], a0); | |
} | |
void Nesterovs::setStateViewArray(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const JArray< jint > & a1, jchar a2, jboolean a3) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setStateViewArray_324af5e3], a0.this$, a1.this$, a2, a3); | |
} | |
void Nesterovs::setV(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setV_97661d74], a0.this$); | |
} | |
jint Nesterovs::stateSizeForInputSize(jint a0) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_stateSizeForInputSize_39c7bd23], a0); | |
} | |
::java::lang::String Nesterovs::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
void Nesterovs::update(const JArray< ::java::lang::Object > & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_update_c0f5dada], a0.this$); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
#include "org/nd4j/linalg/learning/Nesterovs$NesterovsAggregator.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
static PyObject *t_Nesterovs_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Nesterovs_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Nesterovs_init_(t_Nesterovs *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Nesterovs_equals(t_Nesterovs *self, PyObject *args); | |
static PyObject *t_Nesterovs_getAggregator(t_Nesterovs *self, PyObject *arg); | |
static PyObject *t_Nesterovs_getGradient(t_Nesterovs *self, PyObject *args); | |
static PyObject *t_Nesterovs_getLearningRate(t_Nesterovs *self); | |
static PyObject *t_Nesterovs_getMomentum(t_Nesterovs *self); | |
static PyObject *t_Nesterovs_getV(t_Nesterovs *self); | |
static PyObject *t_Nesterovs_hashCode(t_Nesterovs *self, PyObject *args); | |
static PyObject *t_Nesterovs_setLearningRate(t_Nesterovs *self, PyObject *arg); | |
static PyObject *t_Nesterovs_setMomentum(t_Nesterovs *self, PyObject *arg); | |
static PyObject *t_Nesterovs_setStateViewArray(t_Nesterovs *self, PyObject *args); | |
static PyObject *t_Nesterovs_setV(t_Nesterovs *self, PyObject *arg); | |
static PyObject *t_Nesterovs_stateSizeForInputSize(t_Nesterovs *self, PyObject *arg); | |
static PyObject *t_Nesterovs_toString(t_Nesterovs *self, PyObject *args); | |
static PyObject *t_Nesterovs_update(t_Nesterovs *self, PyObject *arg); | |
static PyObject *t_Nesterovs_get__learningRate(t_Nesterovs *self, void *data); | |
static int t_Nesterovs_set__learningRate(t_Nesterovs *self, PyObject *arg, void *data); | |
static PyObject *t_Nesterovs_get__momentum(t_Nesterovs *self, void *data); | |
static int t_Nesterovs_set__momentum(t_Nesterovs *self, PyObject *arg, void *data); | |
static PyObject *t_Nesterovs_get__v(t_Nesterovs *self, void *data); | |
static int t_Nesterovs_set__v(t_Nesterovs *self, PyObject *arg, void *data); | |
static PyGetSetDef t_Nesterovs__fields_[] = { | |
DECLARE_GETSET_FIELD(t_Nesterovs, learningRate), | |
DECLARE_GETSET_FIELD(t_Nesterovs, momentum), | |
DECLARE_GETSET_FIELD(t_Nesterovs, v), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Nesterovs__methods_[] = { | |
DECLARE_METHOD(t_Nesterovs, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Nesterovs, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Nesterovs, equals, METH_VARARGS), | |
DECLARE_METHOD(t_Nesterovs, getAggregator, METH_O), | |
DECLARE_METHOD(t_Nesterovs, getGradient, METH_VARARGS), | |
DECLARE_METHOD(t_Nesterovs, getLearningRate, METH_NOARGS), | |
DECLARE_METHOD(t_Nesterovs, getMomentum, METH_NOARGS), | |
DECLARE_METHOD(t_Nesterovs, getV, METH_NOARGS), | |
DECLARE_METHOD(t_Nesterovs, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_Nesterovs, setLearningRate, METH_O), | |
DECLARE_METHOD(t_Nesterovs, setMomentum, METH_O), | |
DECLARE_METHOD(t_Nesterovs, setStateViewArray, METH_VARARGS), | |
DECLARE_METHOD(t_Nesterovs, setV, METH_O), | |
DECLARE_METHOD(t_Nesterovs, stateSizeForInputSize, METH_O), | |
DECLARE_METHOD(t_Nesterovs, toString, METH_VARARGS), | |
DECLARE_METHOD(t_Nesterovs, update, METH_O), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Nesterovs, t_Nesterovs, ::java::lang::Object, Nesterovs, t_Nesterovs_init_, 0, 0, t_Nesterovs__fields_, 0, 0); | |
void t_Nesterovs::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Nesterovs), module, "Nesterovs", 0); | |
PyDict_SetItemString(PY_TYPE(Nesterovs).tp_dict, "NesterovsAggregator", make_descriptor(&PY_TYPE(Nesterovs$NesterovsAggregator))); | |
} | |
void t_Nesterovs::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Nesterovs).tp_dict, "class_", make_descriptor(Nesterovs::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Nesterovs).tp_dict, "wrapfn_", make_descriptor(t_Nesterovs::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Nesterovs).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
env->getClass(Nesterovs::initializeClass); | |
PyDict_SetItemString(PY_TYPE(Nesterovs).tp_dict, "DEFAULT_NESTEROV_MOMENTUM", make_descriptor(Nesterovs::DEFAULT_NESTEROV_MOMENTUM)); | |
} | |
static PyObject *t_Nesterovs_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Nesterovs::initializeClass, 1))) | |
return NULL; | |
return t_Nesterovs::wrap_Object(Nesterovs(((t_Nesterovs *) arg)->object.this$)); | |
} | |
static PyObject *t_Nesterovs_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Nesterovs::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Nesterovs_init_(t_Nesterovs *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
Nesterovs object((jobject) NULL); | |
INT_CALL(object = Nesterovs()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
jdouble a0; | |
Nesterovs object((jobject) NULL); | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
INT_CALL(object = Nesterovs(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
Nesterovs object((jobject) NULL); | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
INT_CALL(object = Nesterovs(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_Nesterovs_equals(t_Nesterovs *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(Nesterovs), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_Nesterovs_getAggregator(t_Nesterovs *self, PyObject *arg) | |
{ | |
jboolean a0; | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator result((jobject) NULL); | |
if (!parseArg(arg, "Z", &a0)) | |
{ | |
OBJ_CALL(result = self->object.getAggregator(a0)); | |
return ::org::nd4j::linalg::learning::t_GradientUpdaterAggregator::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "getAggregator", arg); | |
return NULL; | |
} | |
static PyObject *t_Nesterovs_getGradient(t_Nesterovs *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
jint a1; | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "kI", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.getGradient(a0, a1)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "getGradient", args); | |
return NULL; | |
} | |
static PyObject *t_Nesterovs_getLearningRate(t_Nesterovs *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.getLearningRate()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_Nesterovs_getMomentum(t_Nesterovs *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.getMomentum()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_Nesterovs_getV(t_Nesterovs *self) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
OBJ_CALL(result = self->object.getV()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
static PyObject *t_Nesterovs_hashCode(t_Nesterovs *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nesterovs), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_Nesterovs_setLearningRate(t_Nesterovs *self, PyObject *arg) | |
{ | |
jdouble a0; | |
if (!parseArg(arg, "D", &a0)) | |
{ | |
OBJ_CALL(self->object.setLearningRate(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setLearningRate", arg); | |
return NULL; | |
} | |
static PyObject *t_Nesterovs_setMomentum(t_Nesterovs *self, PyObject *arg) | |
{ | |
jdouble a0; | |
if (!parseArg(arg, "D", &a0)) | |
{ | |
OBJ_CALL(self->object.setMomentum(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setMomentum", arg); | |
return NULL; | |
} | |
static PyObject *t_Nesterovs_setStateViewArray(t_Nesterovs *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
JArray< jint > a1((jobject) NULL); | |
jchar a2; | |
jboolean a3; | |
if (!parseArgs(args, "k[ICZ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
OBJ_CALL(self->object.setStateViewArray(a0, a1, a2, a3)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setStateViewArray", args); | |
return NULL; | |
} | |
static PyObject *t_Nesterovs_setV(t_Nesterovs *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.setV(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setV", arg); | |
return NULL; | |
} | |
static PyObject *t_Nesterovs_stateSizeForInputSize(t_Nesterovs *self, PyObject *arg) | |
{ | |
jint a0; | |
jint result; | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.stateSizeForInputSize(a0)); | |
return PyInt_FromLong((long) result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "stateSizeForInputSize", arg); | |
return NULL; | |
} | |
static PyObject *t_Nesterovs_toString(t_Nesterovs *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Nesterovs), (PyObject *) self, "toString", args, 2); | |
} | |
static PyObject *t_Nesterovs_update(t_Nesterovs *self, PyObject *arg) | |
{ | |
JArray< ::java::lang::Object > a0((jobject) NULL); | |
if (!parseArg(arg, "[o", &a0)) | |
{ | |
OBJ_CALL(self->object.update(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "update", arg); | |
return NULL; | |
} | |
static PyObject *t_Nesterovs_get__learningRate(t_Nesterovs *self, void *data) | |
{ | |
jdouble value; | |
OBJ_CALL(value = self->object.getLearningRate()); | |
return PyFloat_FromDouble((double) value); | |
} | |
static int t_Nesterovs_set__learningRate(t_Nesterovs *self, PyObject *arg, void *data) | |
{ | |
{ | |
jdouble value; | |
if (!parseArg(arg, "D", &value)) | |
{ | |
INT_CALL(self->object.setLearningRate(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "learningRate", arg); | |
return -1; | |
} | |
static PyObject *t_Nesterovs_get__momentum(t_Nesterovs *self, void *data) | |
{ | |
jdouble value; | |
OBJ_CALL(value = self->object.getMomentum()); | |
return PyFloat_FromDouble((double) value); | |
} | |
static int t_Nesterovs_set__momentum(t_Nesterovs *self, PyObject *arg, void *data) | |
{ | |
{ | |
jdouble value; | |
if (!parseArg(arg, "D", &value)) | |
{ | |
INT_CALL(self->object.setMomentum(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "momentum", arg); | |
return -1; | |
} | |
static PyObject *t_Nesterovs_get__v(t_Nesterovs *self, void *data) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
OBJ_CALL(value = self->object.getV()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(value); | |
} | |
static int t_Nesterovs_set__v(t_Nesterovs *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setV(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "v", arg); | |
return -1; | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ndarray/ShapeInfoProvider.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ndarray { | |
::java::lang::Class *ShapeInfoProvider::class$ = NULL; | |
jmethodID *ShapeInfoProvider::mids$ = NULL; | |
bool ShapeInfoProvider::live$ = false; | |
jclass ShapeInfoProvider::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ndarray/ShapeInfoProvider"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_purgeCache_54c6a166] = env->getMethodID(cls, "purgeCache", "()V"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
void ShapeInfoProvider::purgeCache() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_purgeCache_54c6a166]); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ndarray { | |
static PyObject *t_ShapeInfoProvider_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_ShapeInfoProvider_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_ShapeInfoProvider_purgeCache(t_ShapeInfoProvider *self); | |
static PyMethodDef t_ShapeInfoProvider__methods_[] = { | |
DECLARE_METHOD(t_ShapeInfoProvider, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ShapeInfoProvider, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ShapeInfoProvider, purgeCache, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(ShapeInfoProvider, t_ShapeInfoProvider, ::java::lang::Object, ShapeInfoProvider, abstract_init, 0, 0, 0, 0, 0); | |
void t_ShapeInfoProvider::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(ShapeInfoProvider), module, "ShapeInfoProvider", 0); | |
} | |
void t_ShapeInfoProvider::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(ShapeInfoProvider).tp_dict, "class_", make_descriptor(ShapeInfoProvider::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(ShapeInfoProvider).tp_dict, "wrapfn_", make_descriptor(t_ShapeInfoProvider::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(ShapeInfoProvider).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_ShapeInfoProvider_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, ShapeInfoProvider::initializeClass, 1))) | |
return NULL; | |
return t_ShapeInfoProvider::wrap_Object(ShapeInfoProvider(((t_ShapeInfoProvider *) arg)->object.this$)); | |
} | |
static PyObject *t_ShapeInfoProvider_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, ShapeInfoProvider::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_ShapeInfoProvider_purgeCache(t_ShapeInfoProvider *self) | |
{ | |
OBJ_CALL(self->object.purgeCache()); | |
Py_RETURN_NONE; | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/rng/distribution/factory/DefaultDistributionFactory.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "org/nd4j/linalg/api/rng/distribution/factory/DistributionFactory.h" | |
#include "org/nd4j/linalg/api/rng/distribution/Distribution.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace rng { | |
namespace distribution { | |
namespace factory { | |
::java::lang::Class *DefaultDistributionFactory::class$ = NULL; | |
jmethodID *DefaultDistributionFactory::mids$ = NULL; | |
bool DefaultDistributionFactory::live$ = false; | |
jclass DefaultDistributionFactory::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/rng/distribution/factory/DefaultDistributionFactory"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_createBinomial_a8650080] = env->getMethodID(cls, "createBinomial", "(ID)Lorg/nd4j/linalg/api/rng/distribution/Distribution;"); | |
mids$[mid_createBinomial_462a5ef5] = env->getMethodID(cls, "createBinomial", "(ILorg/nd4j/linalg/api/ndarray/INDArray;)Lorg/nd4j/linalg/api/rng/distribution/Distribution;"); | |
mids$[mid_createNormal_f28af38c] = env->getMethodID(cls, "createNormal", "(Lorg/nd4j/linalg/api/ndarray/INDArray;D)Lorg/nd4j/linalg/api/rng/distribution/Distribution;"); | |
mids$[mid_createNormal_6f57d53b] = env->getMethodID(cls, "createNormal", "(DD)Lorg/nd4j/linalg/api/rng/distribution/Distribution;"); | |
mids$[mid_createUniform_6f57d53b] = env->getMethodID(cls, "createUniform", "(DD)Lorg/nd4j/linalg/api/rng/distribution/Distribution;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
DefaultDistributionFactory::DefaultDistributionFactory() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
::org::nd4j::linalg::api::rng::distribution::Distribution DefaultDistributionFactory::createBinomial(jint a0, jdouble a1) const | |
{ | |
return ::org::nd4j::linalg::api::rng::distribution::Distribution(env->callObjectMethod(this$, mids$[mid_createBinomial_a8650080], a0, a1)); | |
} | |
::org::nd4j::linalg::api::rng::distribution::Distribution DefaultDistributionFactory::createBinomial(jint a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) const | |
{ | |
return ::org::nd4j::linalg::api::rng::distribution::Distribution(env->callObjectMethod(this$, mids$[mid_createBinomial_462a5ef5], a0, a1.this$)); | |
} | |
::org::nd4j::linalg::api::rng::distribution::Distribution DefaultDistributionFactory::createNormal(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, jdouble a1) const | |
{ | |
return ::org::nd4j::linalg::api::rng::distribution::Distribution(env->callObjectMethod(this$, mids$[mid_createNormal_f28af38c], a0.this$, a1)); | |
} | |
::org::nd4j::linalg::api::rng::distribution::Distribution DefaultDistributionFactory::createNormal(jdouble a0, jdouble a1) const | |
{ | |
return ::org::nd4j::linalg::api::rng::distribution::Distribution(env->callObjectMethod(this$, mids$[mid_createNormal_6f57d53b], a0, a1)); | |
} | |
::org::nd4j::linalg::api::rng::distribution::Distribution DefaultDistributionFactory::createUniform(jdouble a0, jdouble a1) const | |
{ | |
return ::org::nd4j::linalg::api::rng::distribution::Distribution(env->callObjectMethod(this$, mids$[mid_createUniform_6f57d53b], a0, a1)); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace rng { | |
namespace distribution { | |
namespace factory { | |
static PyObject *t_DefaultDistributionFactory_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_DefaultDistributionFactory_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_DefaultDistributionFactory_init_(t_DefaultDistributionFactory *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_DefaultDistributionFactory_createBinomial(t_DefaultDistributionFactory *self, PyObject *args); | |
static PyObject *t_DefaultDistributionFactory_createNormal(t_DefaultDistributionFactory *self, PyObject *args); | |
static PyObject *t_DefaultDistributionFactory_createUniform(t_DefaultDistributionFactory *self, PyObject *args); | |
static PyMethodDef t_DefaultDistributionFactory__methods_[] = { | |
DECLARE_METHOD(t_DefaultDistributionFactory, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_DefaultDistributionFactory, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_DefaultDistributionFactory, createBinomial, METH_VARARGS), | |
DECLARE_METHOD(t_DefaultDistributionFactory, createNormal, METH_VARARGS), | |
DECLARE_METHOD(t_DefaultDistributionFactory, createUniform, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(DefaultDistributionFactory, t_DefaultDistributionFactory, ::java::lang::Object, DefaultDistributionFactory, t_DefaultDistributionFactory_init_, 0, 0, 0, 0, 0); | |
void t_DefaultDistributionFactory::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(DefaultDistributionFactory), module, "DefaultDistributionFactory", 0); | |
} | |
void t_DefaultDistributionFactory::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(DefaultDistributionFactory).tp_dict, "class_", make_descriptor(DefaultDistributionFactory::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(DefaultDistributionFactory).tp_dict, "wrapfn_", make_descriptor(t_DefaultDistributionFactory::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(DefaultDistributionFactory).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_DefaultDistributionFactory_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, DefaultDistributionFactory::initializeClass, 1))) | |
return NULL; | |
return t_DefaultDistributionFactory::wrap_Object(DefaultDistributionFactory(((t_DefaultDistributionFactory *) arg)->object.this$)); | |
} | |
static PyObject *t_DefaultDistributionFactory_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, DefaultDistributionFactory::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_DefaultDistributionFactory_init_(t_DefaultDistributionFactory *self, PyObject *args, PyObject *kwds) | |
{ | |
DefaultDistributionFactory object((jobject) NULL); | |
INT_CALL(object = DefaultDistributionFactory()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_DefaultDistributionFactory_createBinomial(t_DefaultDistributionFactory *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
jdouble a1; | |
::org::nd4j::linalg::api::rng::distribution::Distribution result((jobject) NULL); | |
if (!parseArgs(args, "ID", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.createBinomial(a0, a1)); | |
return ::org::nd4j::linalg::api::rng::distribution::t_Distribution::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::rng::distribution::Distribution result((jobject) NULL); | |
if (!parseArgs(args, "Ik", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.createBinomial(a0, a1)); | |
return ::org::nd4j::linalg::api::rng::distribution::t_Distribution::wrap_Object(result); | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "createBinomial", args); | |
return NULL; | |
} | |
static PyObject *t_DefaultDistributionFactory_createNormal(t_DefaultDistributionFactory *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
jdouble a1; | |
::org::nd4j::linalg::api::rng::distribution::Distribution result((jobject) NULL); | |
if (!parseArgs(args, "kD", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.createNormal(a0, a1)); | |
return ::org::nd4j::linalg::api::rng::distribution::t_Distribution::wrap_Object(result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble a1; | |
::org::nd4j::linalg::api::rng::distribution::Distribution result((jobject) NULL); | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.createNormal(a0, a1)); | |
return ::org::nd4j::linalg::api::rng::distribution::t_Distribution::wrap_Object(result); | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "createNormal", args); | |
return NULL; | |
} | |
static PyObject *t_DefaultDistributionFactory_createUniform(t_DefaultDistributionFactory *self, PyObject *args) | |
{ | |
jdouble a0; | |
jdouble a1; | |
::org::nd4j::linalg::api::rng::distribution::Distribution result((jobject) NULL); | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.createUniform(a0, a1)); | |
return ::org::nd4j::linalg::api::rng::distribution::t_Distribution::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "createUniform", args); | |
return NULL; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "java/io/PrintWriter.h" | |
#include "java/lang/Class.h" | |
#include "java/lang/CharSequence.h" | |
#include "java/lang/Object.h" | |
#include "java/lang/String.h" | |
#include "JArray.h" | |
namespace java { | |
namespace io { | |
::java::lang::Class *PrintWriter::class$ = NULL; | |
jmethodID *PrintWriter::mids$ = NULL; | |
bool PrintWriter::live$ = false; | |
jclass PrintWriter::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("java/io/PrintWriter"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_5fdc3f48] = env->getMethodID(cls, "<init>", "(Ljava/lang/String;)V"); | |
mids$[mid_init$_5bcd5850] = env->getMethodID(cls, "<init>", "(Ljava/io/Writer;)V"); | |
mids$[mid_init$_4a264742] = env->getMethodID(cls, "<init>", "(Ljava/lang/String;Ljava/lang/String;)V"); | |
mids$[mid_init$_53203e9d] = env->getMethodID(cls, "<init>", "(Ljava/io/Writer;Z)V"); | |
mids$[mid_append_6cdbddb5] = env->getMethodID(cls, "append", "(C)Ljava/io/PrintWriter;"); | |
mids$[mid_append_4ea4b69d] = env->getMethodID(cls, "append", "(Ljava/lang/CharSequence;)Ljava/io/PrintWriter;"); | |
mids$[mid_append_19a20159] = env->getMethodID(cls, "append", "(Ljava/lang/CharSequence;II)Ljava/io/PrintWriter;"); | |
mids$[mid_checkError_54c6a16a] = env->getMethodID(cls, "checkError", "()Z"); | |
mids$[mid_close_54c6a166] = env->getMethodID(cls, "close", "()V"); | |
mids$[mid_flush_54c6a166] = env->getMethodID(cls, "flush", "()V"); | |
mids$[mid_format_d515d1d7] = env->getMethodID(cls, "format", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintWriter;"); | |
mids$[mid_print_290588ee] = env->getMethodID(cls, "print", "(Ljava/lang/Object;)V"); | |
mids$[mid_print_5d1c7645] = env->getMethodID(cls, "print", "(D)V"); | |
mids$[mid_print_87fd545a] = env->getMethodID(cls, "print", "(C)V"); | |
mids$[mid_print_700e23d6] = env->getMethodID(cls, "print", "([C)V"); | |
mids$[mid_print_bb0c767f] = env->getMethodID(cls, "print", "(Z)V"); | |
mids$[mid_print_39c7bd3c] = env->getMethodID(cls, "print", "(I)V"); | |
mids$[mid_print_5fdc3f48] = env->getMethodID(cls, "print", "(Ljava/lang/String;)V"); | |
mids$[mid_print_06298cab] = env->getMethodID(cls, "print", "(F)V"); | |
mids$[mid_print_0ee6df2f] = env->getMethodID(cls, "print", "(J)V"); | |
mids$[mid_printf_d515d1d7] = env->getMethodID(cls, "printf", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintWriter;"); | |
mids$[mid_println_54c6a166] = env->getMethodID(cls, "println", "()V"); | |
mids$[mid_println_5fdc3f48] = env->getMethodID(cls, "println", "(Ljava/lang/String;)V"); | |
mids$[mid_println_0ee6df2f] = env->getMethodID(cls, "println", "(J)V"); | |
mids$[mid_println_bb0c767f] = env->getMethodID(cls, "println", "(Z)V"); | |
mids$[mid_println_06298cab] = env->getMethodID(cls, "println", "(F)V"); | |
mids$[mid_println_5d1c7645] = env->getMethodID(cls, "println", "(D)V"); | |
mids$[mid_println_39c7bd3c] = env->getMethodID(cls, "println", "(I)V"); | |
mids$[mid_println_700e23d6] = env->getMethodID(cls, "println", "([C)V"); | |
mids$[mid_println_290588ee] = env->getMethodID(cls, "println", "(Ljava/lang/Object;)V"); | |
mids$[mid_println_87fd545a] = env->getMethodID(cls, "println", "(C)V"); | |
mids$[mid_write_5fdc3f48] = env->getMethodID(cls, "write", "(Ljava/lang/String;)V"); | |
mids$[mid_write_700e23d6] = env->getMethodID(cls, "write", "([C)V"); | |
mids$[mid_write_39c7bd3c] = env->getMethodID(cls, "write", "(I)V"); | |
mids$[mid_write_6f0bb356] = env->getMethodID(cls, "write", "([CII)V"); | |
mids$[mid_write_555f322c] = env->getMethodID(cls, "write", "(Ljava/lang/String;II)V"); | |
mids$[mid_clearError_54c6a166] = env->getMethodID(cls, "clearError", "()V"); | |
mids$[mid_setError_54c6a166] = env->getMethodID(cls, "setError", "()V"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
PrintWriter::PrintWriter(const ::java::lang::String & a0) : ::java::io::Writer(env->newObject(initializeClass, &mids$, mid_init$_5fdc3f48, a0.this$)) {} | |
PrintWriter::PrintWriter(const ::java::io::Writer & a0) : ::java::io::Writer(env->newObject(initializeClass, &mids$, mid_init$_5bcd5850, a0.this$)) {} | |
PrintWriter::PrintWriter(const ::java::lang::String & a0, const ::java::lang::String & a1) : ::java::io::Writer(env->newObject(initializeClass, &mids$, mid_init$_4a264742, a0.this$, a1.this$)) {} | |
PrintWriter::PrintWriter(const ::java::io::Writer & a0, jboolean a1) : ::java::io::Writer(env->newObject(initializeClass, &mids$, mid_init$_53203e9d, a0.this$, a1)) {} | |
PrintWriter PrintWriter::append(jchar a0) const | |
{ | |
return PrintWriter(env->callObjectMethod(this$, mids$[mid_append_6cdbddb5], a0)); | |
} | |
PrintWriter PrintWriter::append(const ::java::lang::CharSequence & a0) const | |
{ | |
return PrintWriter(env->callObjectMethod(this$, mids$[mid_append_4ea4b69d], a0.this$)); | |
} | |
PrintWriter PrintWriter::append(const ::java::lang::CharSequence & a0, jint a1, jint a2) const | |
{ | |
return PrintWriter(env->callObjectMethod(this$, mids$[mid_append_19a20159], a0.this$, a1, a2)); | |
} | |
jboolean PrintWriter::checkError() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_checkError_54c6a16a]); | |
} | |
void PrintWriter::close() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_close_54c6a166]); | |
} | |
void PrintWriter::flush() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_flush_54c6a166]); | |
} | |
PrintWriter PrintWriter::format(const ::java::lang::String & a0, const JArray< ::java::lang::Object > & a1) const | |
{ | |
return PrintWriter(env->callObjectMethod(this$, mids$[mid_format_d515d1d7], a0.this$, a1.this$)); | |
} | |
void PrintWriter::print(const ::java::lang::Object & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_print_290588ee], a0.this$); | |
} | |
void PrintWriter::print(jdouble a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_print_5d1c7645], a0); | |
} | |
void PrintWriter::print(jchar a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_print_87fd545a], a0); | |
} | |
void PrintWriter::print(const JArray< jchar > & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_print_700e23d6], a0.this$); | |
} | |
void PrintWriter::print(jboolean a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_print_bb0c767f], a0); | |
} | |
void PrintWriter::print(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_print_39c7bd3c], a0); | |
} | |
void PrintWriter::print(const ::java::lang::String & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_print_5fdc3f48], a0.this$); | |
} | |
void PrintWriter::print(jfloat a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_print_06298cab], a0); | |
} | |
void PrintWriter::print(jlong a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_print_0ee6df2f], a0); | |
} | |
PrintWriter PrintWriter::printf(const ::java::lang::String & a0, const JArray< ::java::lang::Object > & a1) const | |
{ | |
return PrintWriter(env->callObjectMethod(this$, mids$[mid_printf_d515d1d7], a0.this$, a1.this$)); | |
} | |
void PrintWriter::println() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_println_54c6a166]); | |
} | |
void PrintWriter::println(const ::java::lang::String & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_println_5fdc3f48], a0.this$); | |
} | |
void PrintWriter::println(jlong a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_println_0ee6df2f], a0); | |
} | |
void PrintWriter::println(jboolean a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_println_bb0c767f], a0); | |
} | |
void PrintWriter::println(jfloat a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_println_06298cab], a0); | |
} | |
void PrintWriter::println(jdouble a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_println_5d1c7645], a0); | |
} | |
void PrintWriter::println(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_println_39c7bd3c], a0); | |
} | |
void PrintWriter::println(const JArray< jchar > & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_println_700e23d6], a0.this$); | |
} | |
void PrintWriter::println(const ::java::lang::Object & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_println_290588ee], a0.this$); | |
} | |
void PrintWriter::println(jchar a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_println_87fd545a], a0); | |
} | |
void PrintWriter::write(const ::java::lang::String & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_write_5fdc3f48], a0.this$); | |
} | |
void PrintWriter::write(const JArray< jchar > & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_write_700e23d6], a0.this$); | |
} | |
void PrintWriter::write(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_write_39c7bd3c], a0); | |
} | |
void PrintWriter::write(const JArray< jchar > & a0, jint a1, jint a2) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_write_6f0bb356], a0.this$, a1, a2); | |
} | |
void PrintWriter::write(const ::java::lang::String & a0, jint a1, jint a2) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_write_555f322c], a0.this$, a1, a2); | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace java { | |
namespace io { | |
static PyObject *t_PrintWriter_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_PrintWriter_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_PrintWriter_init_(t_PrintWriter *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_PrintWriter_append(t_PrintWriter *self, PyObject *args); | |
static PyObject *t_PrintWriter_checkError(t_PrintWriter *self); | |
static PyObject *t_PrintWriter_close(t_PrintWriter *self, PyObject *args); | |
static PyObject *t_PrintWriter_flush(t_PrintWriter *self, PyObject *args); | |
static PyObject *t_PrintWriter_format(t_PrintWriter *self, PyObject *args); | |
static PyObject *t_PrintWriter_print(t_PrintWriter *self, PyObject *args); | |
static PyObject *t_PrintWriter_printf(t_PrintWriter *self, PyObject *args); | |
static PyObject *t_PrintWriter_println(t_PrintWriter *self, PyObject *args); | |
static PyObject *t_PrintWriter_write(t_PrintWriter *self, PyObject *args); | |
static PyMethodDef t_PrintWriter__methods_[] = { | |
DECLARE_METHOD(t_PrintWriter, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_PrintWriter, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_PrintWriter, append, METH_VARARGS), | |
DECLARE_METHOD(t_PrintWriter, checkError, METH_NOARGS), | |
DECLARE_METHOD(t_PrintWriter, close, METH_VARARGS), | |
DECLARE_METHOD(t_PrintWriter, flush, METH_VARARGS), | |
DECLARE_METHOD(t_PrintWriter, format, METH_VARARGS), | |
DECLARE_METHOD(t_PrintWriter, print, METH_VARARGS), | |
DECLARE_METHOD(t_PrintWriter, printf, METH_VARARGS), | |
DECLARE_METHOD(t_PrintWriter, println, METH_VARARGS), | |
DECLARE_METHOD(t_PrintWriter, write, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(PrintWriter, t_PrintWriter, ::java::io::Writer, PrintWriter, t_PrintWriter_init_, 0, 0, 0, 0, 0); | |
void t_PrintWriter::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(PrintWriter), module, "PrintWriter", 0); | |
} | |
void t_PrintWriter::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(PrintWriter).tp_dict, "class_", make_descriptor(PrintWriter::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(PrintWriter).tp_dict, "wrapfn_", make_descriptor(t_PrintWriter::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(PrintWriter).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_PrintWriter_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, PrintWriter::initializeClass, 1))) | |
return NULL; | |
return t_PrintWriter::wrap_Object(PrintWriter(((t_PrintWriter *) arg)->object.this$)); | |
} | |
static PyObject *t_PrintWriter_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, PrintWriter::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_PrintWriter_init_(t_PrintWriter *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
::java::lang::String a0((jobject) NULL); | |
PrintWriter object((jobject) NULL); | |
if (!parseArgs(args, "s", &a0)) | |
{ | |
INT_CALL(object = PrintWriter(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::java::io::Writer a0((jobject) NULL); | |
PrintWriter object((jobject) NULL); | |
if (!parseArgs(args, "k", ::java::io::Writer::initializeClass, &a0)) | |
{ | |
INT_CALL(object = PrintWriter(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::java::lang::String a0((jobject) NULL); | |
::java::lang::String a1((jobject) NULL); | |
PrintWriter object((jobject) NULL); | |
if (!parseArgs(args, "ss", &a0, &a1)) | |
{ | |
INT_CALL(object = PrintWriter(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::java::io::Writer a0((jobject) NULL); | |
jboolean a1; | |
PrintWriter object((jobject) NULL); | |
if (!parseArgs(args, "kZ", ::java::io::Writer::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = PrintWriter(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_PrintWriter_append(t_PrintWriter *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jchar a0; | |
PrintWriter result((jobject) NULL); | |
if (!parseArgs(args, "C", &a0)) | |
{ | |
OBJ_CALL(result = self->object.append(a0)); | |
return t_PrintWriter::wrap_Object(result); | |
} | |
} | |
{ | |
::java::lang::CharSequence a0((jobject) NULL); | |
PrintWriter result((jobject) NULL); | |
if (!parseArgs(args, "O", &::java::lang::PY_TYPE(CharSequence), &a0)) | |
{ | |
OBJ_CALL(result = self->object.append(a0)); | |
return t_PrintWriter::wrap_Object(result); | |
} | |
} | |
break; | |
case 3: | |
{ | |
::java::lang::CharSequence a0((jobject) NULL); | |
jint a1; | |
jint a2; | |
PrintWriter result((jobject) NULL); | |
if (!parseArgs(args, "OII", &::java::lang::PY_TYPE(CharSequence), &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(result = self->object.append(a0, a1, a2)); | |
return t_PrintWriter::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(PrintWriter), (PyObject *) self, "append", args, 2); | |
} | |
static PyObject *t_PrintWriter_checkError(t_PrintWriter *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.checkError()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_PrintWriter_close(t_PrintWriter *self, PyObject *args) | |
{ | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(self->object.close()); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(PrintWriter), (PyObject *) self, "close", args, 2); | |
} | |
static PyObject *t_PrintWriter_flush(t_PrintWriter *self, PyObject *args) | |
{ | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(self->object.flush()); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(PrintWriter), (PyObject *) self, "flush", args, 2); | |
} | |
static PyObject *t_PrintWriter_format(t_PrintWriter *self, PyObject *args) | |
{ | |
::java::lang::String a0((jobject) NULL); | |
JArray< ::java::lang::Object > a1((jobject) NULL); | |
PrintWriter result((jobject) NULL); | |
if (!parseArgs(args, "s[o", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.format(a0, a1)); | |
return t_PrintWriter::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "format", args); | |
return NULL; | |
} | |
static PyObject *t_PrintWriter_print(t_PrintWriter *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(self->object.print(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jdouble a0; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(self->object.print(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jchar a0; | |
if (!parseArgs(args, "C", &a0)) | |
{ | |
OBJ_CALL(self->object.print(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
JArray< jchar > a0((jobject) NULL); | |
if (!parseArgs(args, "[C", &a0)) | |
{ | |
OBJ_CALL(self->object.print(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jboolean a0; | |
if (!parseArgs(args, "Z", &a0)) | |
{ | |
OBJ_CALL(self->object.print(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jint a0; | |
if (!parseArgs(args, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.print(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
::java::lang::String a0((jobject) NULL); | |
if (!parseArgs(args, "s", &a0)) | |
{ | |
OBJ_CALL(self->object.print(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jfloat a0; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(self->object.print(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jlong a0; | |
if (!parseArgs(args, "J", &a0)) | |
{ | |
OBJ_CALL(self->object.print(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "print", args); | |
return NULL; | |
} | |
static PyObject *t_PrintWriter_printf(t_PrintWriter *self, PyObject *args) | |
{ | |
::java::lang::String a0((jobject) NULL); | |
JArray< ::java::lang::Object > a1((jobject) NULL); | |
PrintWriter result((jobject) NULL); | |
if (!parseArgs(args, "s[o", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.printf(a0, a1)); | |
return t_PrintWriter::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "printf", args); | |
return NULL; | |
} | |
static PyObject *t_PrintWriter_println(t_PrintWriter *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
OBJ_CALL(self->object.println()); | |
Py_RETURN_NONE; | |
} | |
break; | |
case 1: | |
{ | |
::java::lang::String a0((jobject) NULL); | |
if (!parseArgs(args, "s", &a0)) | |
{ | |
OBJ_CALL(self->object.println(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jlong a0; | |
if (!parseArgs(args, "J", &a0)) | |
{ | |
OBJ_CALL(self->object.println(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jboolean a0; | |
if (!parseArgs(args, "Z", &a0)) | |
{ | |
OBJ_CALL(self->object.println(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jfloat a0; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(self->object.println(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jdouble a0; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(self->object.println(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jint a0; | |
if (!parseArgs(args, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.println(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
JArray< jchar > a0((jobject) NULL); | |
if (!parseArgs(args, "[C", &a0)) | |
{ | |
OBJ_CALL(self->object.println(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(self->object.println(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jchar a0; | |
if (!parseArgs(args, "C", &a0)) | |
{ | |
OBJ_CALL(self->object.println(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "println", args); | |
return NULL; | |
} | |
static PyObject *t_PrintWriter_write(t_PrintWriter *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
::java::lang::String a0((jobject) NULL); | |
if (!parseArgs(args, "s", &a0)) | |
{ | |
OBJ_CALL(self->object.write(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
JArray< jchar > a0((jobject) NULL); | |
if (!parseArgs(args, "[C", &a0)) | |
{ | |
OBJ_CALL(self->object.write(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
jint a0; | |
if (!parseArgs(args, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.write(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
break; | |
case 3: | |
{ | |
JArray< jchar > a0((jobject) NULL); | |
jint a1; | |
jint a2; | |
if (!parseArgs(args, "[CII", &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(self->object.write(a0, a1, a2)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
::java::lang::String a0((jobject) NULL); | |
jint a1; | |
jint a2; | |
if (!parseArgs(args, "sII", &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(self->object.write(a0, a1, a2)); | |
Py_RETURN_NONE; | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(PrintWriter), (PyObject *) self, "write", args, 2); | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/blas/Blas$Vendor.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace blas { | |
::java::lang::Class *Blas$Vendor::class$ = NULL; | |
jmethodID *Blas$Vendor::mids$ = NULL; | |
bool Blas$Vendor::live$ = false; | |
Blas$Vendor *Blas$Vendor::CUBLAS = NULL; | |
Blas$Vendor *Blas$Vendor::MKL = NULL; | |
Blas$Vendor *Blas$Vendor::OPENBLAS = NULL; | |
Blas$Vendor *Blas$Vendor::UNKNOWN = NULL; | |
jclass Blas$Vendor::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/blas/Blas$Vendor"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_valueOf_125c20e4] = env->getStaticMethodID(cls, "valueOf", "(Ljava/lang/String;)Lorg/nd4j/linalg/api/blas/Blas$Vendor;"); | |
mids$[mid_values_c660d62a] = env->getStaticMethodID(cls, "values", "()[Lorg/nd4j/linalg/api/blas/Blas$Vendor;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
cls = (jclass) class$->this$; | |
CUBLAS = new Blas$Vendor(env->getStaticObjectField(cls, "CUBLAS", "Lorg/nd4j/linalg/api/blas/Blas$Vendor;")); | |
MKL = new Blas$Vendor(env->getStaticObjectField(cls, "MKL", "Lorg/nd4j/linalg/api/blas/Blas$Vendor;")); | |
OPENBLAS = new Blas$Vendor(env->getStaticObjectField(cls, "OPENBLAS", "Lorg/nd4j/linalg/api/blas/Blas$Vendor;")); | |
UNKNOWN = new Blas$Vendor(env->getStaticObjectField(cls, "UNKNOWN", "Lorg/nd4j/linalg/api/blas/Blas$Vendor;")); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Blas$Vendor Blas$Vendor::valueOf(const ::java::lang::String & a0) | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return Blas$Vendor(env->callStaticObjectMethod(cls, mids$[mid_valueOf_125c20e4], a0.this$)); | |
} | |
JArray< Blas$Vendor > Blas$Vendor::values() | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return JArray< Blas$Vendor >(env->callStaticObjectMethod(cls, mids$[mid_values_c660d62a])); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace blas { | |
static PyObject *t_Blas$Vendor_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Blas$Vendor_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Blas$Vendor_of_(t_Blas$Vendor *self, PyObject *args); | |
static PyObject *t_Blas$Vendor_valueOf(PyTypeObject *type, PyObject *args); | |
static PyObject *t_Blas$Vendor_values(PyTypeObject *type); | |
static PyObject *t_Blas$Vendor_get__parameters_(t_Blas$Vendor *self, void *data); | |
static PyGetSetDef t_Blas$Vendor__fields_[] = { | |
DECLARE_GET_FIELD(t_Blas$Vendor, parameters_), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Blas$Vendor__methods_[] = { | |
DECLARE_METHOD(t_Blas$Vendor, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Blas$Vendor, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Blas$Vendor, of_, METH_VARARGS), | |
DECLARE_METHOD(t_Blas$Vendor, valueOf, METH_VARARGS | METH_CLASS), | |
DECLARE_METHOD(t_Blas$Vendor, values, METH_NOARGS | METH_CLASS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Blas$Vendor, t_Blas$Vendor, ::java::lang::Enum, Blas$Vendor, abstract_init, 0, 0, t_Blas$Vendor__fields_, 0, 0); | |
PyObject *t_Blas$Vendor::wrap_Object(const Blas$Vendor& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_Blas$Vendor::wrap_Object(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_Blas$Vendor *self = (t_Blas$Vendor *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
PyObject *t_Blas$Vendor::wrap_jobject(const jobject& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_Blas$Vendor::wrap_jobject(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_Blas$Vendor *self = (t_Blas$Vendor *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
void t_Blas$Vendor::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Blas$Vendor), module, "Blas$Vendor", 0); | |
} | |
void t_Blas$Vendor::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Blas$Vendor).tp_dict, "class_", make_descriptor(Blas$Vendor::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Blas$Vendor).tp_dict, "wrapfn_", make_descriptor(t_Blas$Vendor::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Blas$Vendor).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
env->getClass(Blas$Vendor::initializeClass); | |
PyDict_SetItemString(PY_TYPE(Blas$Vendor).tp_dict, "CUBLAS", make_descriptor(t_Blas$Vendor::wrap_Object(*Blas$Vendor::CUBLAS))); | |
PyDict_SetItemString(PY_TYPE(Blas$Vendor).tp_dict, "MKL", make_descriptor(t_Blas$Vendor::wrap_Object(*Blas$Vendor::MKL))); | |
PyDict_SetItemString(PY_TYPE(Blas$Vendor).tp_dict, "OPENBLAS", make_descriptor(t_Blas$Vendor::wrap_Object(*Blas$Vendor::OPENBLAS))); | |
PyDict_SetItemString(PY_TYPE(Blas$Vendor).tp_dict, "UNKNOWN", make_descriptor(t_Blas$Vendor::wrap_Object(*Blas$Vendor::UNKNOWN))); | |
} | |
static PyObject *t_Blas$Vendor_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Blas$Vendor::initializeClass, 1))) | |
return NULL; | |
return t_Blas$Vendor::wrap_Object(Blas$Vendor(((t_Blas$Vendor *) arg)->object.this$)); | |
} | |
static PyObject *t_Blas$Vendor_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Blas$Vendor::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_Blas$Vendor_of_(t_Blas$Vendor *self, PyObject *args) | |
{ | |
if (!parseArg(args, "T", 1, &(self->parameters))) | |
Py_RETURN_SELF; | |
return PyErr_SetArgsError((PyObject *) self, "of_", args); | |
} | |
static PyObject *t_Blas$Vendor_valueOf(PyTypeObject *type, PyObject *args) | |
{ | |
::java::lang::String a0((jobject) NULL); | |
Blas$Vendor result((jobject) NULL); | |
if (!parseArgs(args, "s", &a0)) | |
{ | |
OBJ_CALL(result = ::org::nd4j::linalg::api::blas::Blas$Vendor::valueOf(a0)); | |
return t_Blas$Vendor::wrap_Object(result); | |
} | |
return callSuper(type, "valueOf", args, 2); | |
} | |
static PyObject *t_Blas$Vendor_values(PyTypeObject *type) | |
{ | |
JArray< Blas$Vendor > result((jobject) NULL); | |
OBJ_CALL(result = ::org::nd4j::linalg::api::blas::Blas$Vendor::values()); | |
return JArray<jobject>(result.this$).wrap(t_Blas$Vendor::wrap_jobject); | |
} | |
static PyObject *t_Blas$Vendor_get__parameters_(t_Blas$Vendor *self, void *data) | |
{ | |
return typeParameters(self->parameters, sizeof(self->parameters)); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/executioner/OpExecutioner$ExecutionMode.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace executioner { | |
::java::lang::Class *OpExecutioner$ExecutionMode::class$ = NULL; | |
jmethodID *OpExecutioner$ExecutionMode::mids$ = NULL; | |
bool OpExecutioner$ExecutionMode::live$ = false; | |
OpExecutioner$ExecutionMode *OpExecutioner$ExecutionMode::JAVA = NULL; | |
OpExecutioner$ExecutionMode *OpExecutioner$ExecutionMode::NATIVE = NULL; | |
jclass OpExecutioner$ExecutionMode::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/executioner/OpExecutioner$ExecutionMode"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_valueOf_5f690f16] = env->getStaticMethodID(cls, "valueOf", "(Ljava/lang/String;)Lorg/nd4j/linalg/api/ops/executioner/OpExecutioner$ExecutionMode;"); | |
mids$[mid_values_43abb09c] = env->getStaticMethodID(cls, "values", "()[Lorg/nd4j/linalg/api/ops/executioner/OpExecutioner$ExecutionMode;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
cls = (jclass) class$->this$; | |
JAVA = new OpExecutioner$ExecutionMode(env->getStaticObjectField(cls, "JAVA", "Lorg/nd4j/linalg/api/ops/executioner/OpExecutioner$ExecutionMode;")); | |
NATIVE = new OpExecutioner$ExecutionMode(env->getStaticObjectField(cls, "NATIVE", "Lorg/nd4j/linalg/api/ops/executioner/OpExecutioner$ExecutionMode;")); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
OpExecutioner$ExecutionMode OpExecutioner$ExecutionMode::valueOf(const ::java::lang::String & a0) | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return OpExecutioner$ExecutionMode(env->callStaticObjectMethod(cls, mids$[mid_valueOf_5f690f16], a0.this$)); | |
} | |
JArray< OpExecutioner$ExecutionMode > OpExecutioner$ExecutionMode::values() | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return JArray< OpExecutioner$ExecutionMode >(env->callStaticObjectMethod(cls, mids$[mid_values_43abb09c])); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace executioner { | |
static PyObject *t_OpExecutioner$ExecutionMode_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_OpExecutioner$ExecutionMode_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_OpExecutioner$ExecutionMode_of_(t_OpExecutioner$ExecutionMode *self, PyObject *args); | |
static PyObject *t_OpExecutioner$ExecutionMode_valueOf(PyTypeObject *type, PyObject *args); | |
static PyObject *t_OpExecutioner$ExecutionMode_values(PyTypeObject *type); | |
static PyObject *t_OpExecutioner$ExecutionMode_get__parameters_(t_OpExecutioner$ExecutionMode *self, void *data); | |
static PyGetSetDef t_OpExecutioner$ExecutionMode__fields_[] = { | |
DECLARE_GET_FIELD(t_OpExecutioner$ExecutionMode, parameters_), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_OpExecutioner$ExecutionMode__methods_[] = { | |
DECLARE_METHOD(t_OpExecutioner$ExecutionMode, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_OpExecutioner$ExecutionMode, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_OpExecutioner$ExecutionMode, of_, METH_VARARGS), | |
DECLARE_METHOD(t_OpExecutioner$ExecutionMode, valueOf, METH_VARARGS | METH_CLASS), | |
DECLARE_METHOD(t_OpExecutioner$ExecutionMode, values, METH_NOARGS | METH_CLASS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(OpExecutioner$ExecutionMode, t_OpExecutioner$ExecutionMode, ::java::lang::Enum, OpExecutioner$ExecutionMode, abstract_init, 0, 0, t_OpExecutioner$ExecutionMode__fields_, 0, 0); | |
PyObject *t_OpExecutioner$ExecutionMode::wrap_Object(const OpExecutioner$ExecutionMode& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_OpExecutioner$ExecutionMode::wrap_Object(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_OpExecutioner$ExecutionMode *self = (t_OpExecutioner$ExecutionMode *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
PyObject *t_OpExecutioner$ExecutionMode::wrap_jobject(const jobject& object, PyTypeObject *p0) | |
{ | |
PyObject *obj = t_OpExecutioner$ExecutionMode::wrap_jobject(object); | |
if (obj != NULL && obj != Py_None) | |
{ | |
t_OpExecutioner$ExecutionMode *self = (t_OpExecutioner$ExecutionMode *) obj; | |
self->parameters[0] = p0; | |
} | |
return obj; | |
} | |
void t_OpExecutioner$ExecutionMode::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(OpExecutioner$ExecutionMode), module, "OpExecutioner$ExecutionMode", 0); | |
} | |
void t_OpExecutioner$ExecutionMode::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(OpExecutioner$ExecutionMode).tp_dict, "class_", make_descriptor(OpExecutioner$ExecutionMode::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(OpExecutioner$ExecutionMode).tp_dict, "wrapfn_", make_descriptor(t_OpExecutioner$ExecutionMode::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(OpExecutioner$ExecutionMode).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
env->getClass(OpExecutioner$ExecutionMode::initializeClass); | |
PyDict_SetItemString(PY_TYPE(OpExecutioner$ExecutionMode).tp_dict, "JAVA", make_descriptor(t_OpExecutioner$ExecutionMode::wrap_Object(*OpExecutioner$ExecutionMode::JAVA))); | |
PyDict_SetItemString(PY_TYPE(OpExecutioner$ExecutionMode).tp_dict, "NATIVE", make_descriptor(t_OpExecutioner$ExecutionMode::wrap_Object(*OpExecutioner$ExecutionMode::NATIVE))); | |
} | |
static PyObject *t_OpExecutioner$ExecutionMode_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, OpExecutioner$ExecutionMode::initializeClass, 1))) | |
return NULL; | |
return t_OpExecutioner$ExecutionMode::wrap_Object(OpExecutioner$ExecutionMode(((t_OpExecutioner$ExecutionMode *) arg)->object.this$)); | |
} | |
static PyObject *t_OpExecutioner$ExecutionMode_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, OpExecutioner$ExecutionMode::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_OpExecutioner$ExecutionMode_of_(t_OpExecutioner$ExecutionMode *self, PyObject *args) | |
{ | |
if (!parseArg(args, "T", 1, &(self->parameters))) | |
Py_RETURN_SELF; | |
return PyErr_SetArgsError((PyObject *) self, "of_", args); | |
} | |
static PyObject *t_OpExecutioner$ExecutionMode_valueOf(PyTypeObject *type, PyObject *args) | |
{ | |
::java::lang::String a0((jobject) NULL); | |
OpExecutioner$ExecutionMode result((jobject) NULL); | |
if (!parseArgs(args, "s", &a0)) | |
{ | |
OBJ_CALL(result = ::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ExecutionMode::valueOf(a0)); | |
return t_OpExecutioner$ExecutionMode::wrap_Object(result); | |
} | |
return callSuper(type, "valueOf", args, 2); | |
} | |
static PyObject *t_OpExecutioner$ExecutionMode_values(PyTypeObject *type) | |
{ | |
JArray< OpExecutioner$ExecutionMode > result((jobject) NULL); | |
OBJ_CALL(result = ::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ExecutionMode::values()); | |
return JArray<jobject>(result.this$).wrap(t_OpExecutioner$ExecutionMode::wrap_jobject); | |
} | |
static PyObject *t_OpExecutioner$ExecutionMode_get__parameters_(t_OpExecutioner$ExecutionMode *self, void *data) | |
{ | |
return typeParameters(self->parameters, sizeof(self->parameters)); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/indexing/functions/Zero.h" | |
#include "java/lang/Number.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace indexing { | |
namespace functions { | |
::java::lang::Class *Zero::class$ = NULL; | |
jmethodID *Zero::mids$ = NULL; | |
bool Zero::live$ = false; | |
jclass Zero::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/indexing/functions/Zero"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_apply_05907dc7] = env->getMethodID(cls, "apply", "(Ljava/lang/Number;)Ljava/lang/Number;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Zero::Zero() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
::java::lang::Number Zero::apply(const ::java::lang::Number & a0) const | |
{ | |
return ::java::lang::Number(env->callObjectMethod(this$, mids$[mid_apply_05907dc7], a0.this$)); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace indexing { | |
namespace functions { | |
static PyObject *t_Zero_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Zero_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Zero_init_(t_Zero *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Zero_apply(t_Zero *self, PyObject *arg); | |
static PyMethodDef t_Zero__methods_[] = { | |
DECLARE_METHOD(t_Zero, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Zero, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Zero, apply, METH_O), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Zero, t_Zero, ::java::lang::Object, Zero, t_Zero_init_, 0, 0, 0, 0, 0); | |
void t_Zero::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Zero), module, "Zero", 0); | |
} | |
void t_Zero::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Zero).tp_dict, "class_", make_descriptor(Zero::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Zero).tp_dict, "wrapfn_", make_descriptor(t_Zero::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Zero).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Zero_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Zero::initializeClass, 1))) | |
return NULL; | |
return t_Zero::wrap_Object(Zero(((t_Zero *) arg)->object.this$)); | |
} | |
static PyObject *t_Zero_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Zero::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Zero_init_(t_Zero *self, PyObject *args, PyObject *kwds) | |
{ | |
Zero object((jobject) NULL); | |
INT_CALL(object = Zero()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_Zero_apply(t_Zero *self, PyObject *arg) | |
{ | |
::java::lang::Number a0((jobject) NULL); | |
::java::lang::Number result((jobject) NULL); | |
if (!parseArg(arg, "O", &::java::lang::PY_TYPE(Number), &a0)) | |
{ | |
OBJ_CALL(result = self->object.apply(a0)); | |
return ::java::lang::t_Number::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "apply", arg); | |
return NULL; | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/learning/GradientUpdaterAggregator.h" | |
#include "org/nd4j/linalg/learning/GradientUpdater.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
::java::lang::Class *GradientUpdaterAggregator::class$ = NULL; | |
jmethodID *GradientUpdaterAggregator::mids$ = NULL; | |
bool GradientUpdaterAggregator::live$ = false; | |
jclass GradientUpdaterAggregator::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/learning/GradientUpdaterAggregator"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_aggregate_eeea4eab] = env->getMethodID(cls, "aggregate", "(Lorg/nd4j/linalg/learning/GradientUpdater;)V"); | |
mids$[mid_combine_37615f37] = env->getMethodID(cls, "combine", "(Lorg/nd4j/linalg/learning/GradientUpdaterAggregator;)Lorg/nd4j/linalg/learning/GradientUpdaterAggregator;"); | |
mids$[mid_getUpdater_a54e28ba] = env->getMethodID(cls, "getUpdater", "()Lorg/nd4j/linalg/learning/GradientUpdater;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
void GradientUpdaterAggregator::aggregate(const ::org::nd4j::linalg::learning::GradientUpdater & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_aggregate_eeea4eab], a0.this$); | |
} | |
GradientUpdaterAggregator GradientUpdaterAggregator::combine(const GradientUpdaterAggregator & a0) const | |
{ | |
return GradientUpdaterAggregator(env->callObjectMethod(this$, mids$[mid_combine_37615f37], a0.this$)); | |
} | |
::org::nd4j::linalg::learning::GradientUpdater GradientUpdaterAggregator::getUpdater() const | |
{ | |
return ::org::nd4j::linalg::learning::GradientUpdater(env->callObjectMethod(this$, mids$[mid_getUpdater_a54e28ba])); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
static PyObject *t_GradientUpdaterAggregator_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_GradientUpdaterAggregator_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_GradientUpdaterAggregator_aggregate(t_GradientUpdaterAggregator *self, PyObject *arg); | |
static PyObject *t_GradientUpdaterAggregator_combine(t_GradientUpdaterAggregator *self, PyObject *arg); | |
static PyObject *t_GradientUpdaterAggregator_getUpdater(t_GradientUpdaterAggregator *self); | |
static PyObject *t_GradientUpdaterAggregator_get__updater(t_GradientUpdaterAggregator *self, void *data); | |
static PyGetSetDef t_GradientUpdaterAggregator__fields_[] = { | |
DECLARE_GET_FIELD(t_GradientUpdaterAggregator, updater), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_GradientUpdaterAggregator__methods_[] = { | |
DECLARE_METHOD(t_GradientUpdaterAggregator, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_GradientUpdaterAggregator, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_GradientUpdaterAggregator, aggregate, METH_O), | |
DECLARE_METHOD(t_GradientUpdaterAggregator, combine, METH_O), | |
DECLARE_METHOD(t_GradientUpdaterAggregator, getUpdater, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(GradientUpdaterAggregator, t_GradientUpdaterAggregator, ::java::lang::Object, GradientUpdaterAggregator, abstract_init, 0, 0, t_GradientUpdaterAggregator__fields_, 0, 0); | |
void t_GradientUpdaterAggregator::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(GradientUpdaterAggregator), module, "GradientUpdaterAggregator", 0); | |
} | |
void t_GradientUpdaterAggregator::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(GradientUpdaterAggregator).tp_dict, "class_", make_descriptor(GradientUpdaterAggregator::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(GradientUpdaterAggregator).tp_dict, "wrapfn_", make_descriptor(t_GradientUpdaterAggregator::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(GradientUpdaterAggregator).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_GradientUpdaterAggregator_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, GradientUpdaterAggregator::initializeClass, 1))) | |
return NULL; | |
return t_GradientUpdaterAggregator::wrap_Object(GradientUpdaterAggregator(((t_GradientUpdaterAggregator *) arg)->object.this$)); | |
} | |
static PyObject *t_GradientUpdaterAggregator_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, GradientUpdaterAggregator::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_GradientUpdaterAggregator_aggregate(t_GradientUpdaterAggregator *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::learning::GradientUpdater::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.aggregate(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "aggregate", arg); | |
return NULL; | |
} | |
static PyObject *t_GradientUpdaterAggregator_combine(t_GradientUpdaterAggregator *self, PyObject *arg) | |
{ | |
GradientUpdaterAggregator a0((jobject) NULL); | |
GradientUpdaterAggregator result((jobject) NULL); | |
if (!parseArg(arg, "k", GradientUpdaterAggregator::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.combine(a0)); | |
return t_GradientUpdaterAggregator::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "combine", arg); | |
return NULL; | |
} | |
static PyObject *t_GradientUpdaterAggregator_getUpdater(t_GradientUpdaterAggregator *self) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater result((jobject) NULL); | |
OBJ_CALL(result = self->object.getUpdater()); | |
return ::org::nd4j::linalg::learning::t_GradientUpdater::wrap_Object(result); | |
} | |
static PyObject *t_GradientUpdaterAggregator_get__updater(t_GradientUpdaterAggregator *self, void *data) | |
{ | |
::org::nd4j::linalg::learning::GradientUpdater value((jobject) NULL); | |
OBJ_CALL(value = self->object.getUpdater()); | |
return ::org::nd4j::linalg::learning::t_GradientUpdater::wrap_Object(value); | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/learning/Sgd.h" | |
#include "java/lang/Class.h" | |
#include "org/nd4j/linalg/learning/GradientUpdater.h" | |
#include "java/lang/String.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "org/nd4j/linalg/learning/GradientUpdaterAggregator.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
::java::lang::Class *Sgd::class$ = NULL; | |
jmethodID *Sgd::mids$ = NULL; | |
bool Sgd::live$ = false; | |
jclass Sgd::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/learning/Sgd"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_5d1c7645] = env->getMethodID(cls, "<init>", "(D)V"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_getAggregator_a551ed12] = env->getMethodID(cls, "getAggregator", "(Z)Lorg/nd4j/linalg/learning/GradientUpdaterAggregator;"); | |
mids$[mid_getGradient_93011639] = env->getMethodID(cls, "getGradient", "(Lorg/nd4j/linalg/api/ndarray/INDArray;I)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_getLearningRate_54c6a174] = env->getMethodID(cls, "getLearningRate", "()D"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_setLearningRate_5d1c7645] = env->getMethodID(cls, "setLearningRate", "(D)V"); | |
mids$[mid_setStateViewArray_324af5e3] = env->getMethodID(cls, "setStateViewArray", "(Lorg/nd4j/linalg/api/ndarray/INDArray;[ICZ)V"); | |
mids$[mid_stateSizeForInputSize_39c7bd23] = env->getMethodID(cls, "stateSizeForInputSize", "(I)I"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
mids$[mid_update_c0f5dada] = env->getMethodID(cls, "update", "([Ljava/lang/Object;)V"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Sgd::Sgd() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
Sgd::Sgd(jdouble a0) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_5d1c7645, a0)) {} | |
jboolean Sgd::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator Sgd::getAggregator(jboolean a0) const | |
{ | |
return ::org::nd4j::linalg::learning::GradientUpdaterAggregator(env->callObjectMethod(this$, mids$[mid_getAggregator_a551ed12], a0)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray Sgd::getGradient(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getGradient_93011639], a0.this$, a1)); | |
} | |
jdouble Sgd::getLearningRate() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_getLearningRate_54c6a174]); | |
} | |
jint Sgd::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
void Sgd::setLearningRate(jdouble a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setLearningRate_5d1c7645], a0); | |
} | |
void Sgd::setStateViewArray(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const JArray< jint > & a1, jchar a2, jboolean a3) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setStateViewArray_324af5e3], a0.this$, a1.this$, a2, a3); | |
} | |
jint Sgd::stateSizeForInputSize(jint a0) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_stateSizeForInputSize_39c7bd23], a0); | |
} | |
::java::lang::String Sgd::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
void Sgd::update(const JArray< ::java::lang::Object > & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_update_c0f5dada], a0.this$); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
#include "org/nd4j/linalg/learning/Sgd$SgdAggregator.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace learning { | |
static PyObject *t_Sgd_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Sgd_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Sgd_init_(t_Sgd *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Sgd_equals(t_Sgd *self, PyObject *args); | |
static PyObject *t_Sgd_getAggregator(t_Sgd *self, PyObject *arg); | |
static PyObject *t_Sgd_getGradient(t_Sgd *self, PyObject *args); | |
static PyObject *t_Sgd_getLearningRate(t_Sgd *self); | |
static PyObject *t_Sgd_hashCode(t_Sgd *self, PyObject *args); | |
static PyObject *t_Sgd_setLearningRate(t_Sgd *self, PyObject *arg); | |
static PyObject *t_Sgd_setStateViewArray(t_Sgd *self, PyObject *args); | |
static PyObject *t_Sgd_stateSizeForInputSize(t_Sgd *self, PyObject *arg); | |
static PyObject *t_Sgd_toString(t_Sgd *self, PyObject *args); | |
static PyObject *t_Sgd_update(t_Sgd *self, PyObject *arg); | |
static PyObject *t_Sgd_get__learningRate(t_Sgd *self, void *data); | |
static int t_Sgd_set__learningRate(t_Sgd *self, PyObject *arg, void *data); | |
static PyGetSetDef t_Sgd__fields_[] = { | |
DECLARE_GETSET_FIELD(t_Sgd, learningRate), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Sgd__methods_[] = { | |
DECLARE_METHOD(t_Sgd, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Sgd, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Sgd, equals, METH_VARARGS), | |
DECLARE_METHOD(t_Sgd, getAggregator, METH_O), | |
DECLARE_METHOD(t_Sgd, getGradient, METH_VARARGS), | |
DECLARE_METHOD(t_Sgd, getLearningRate, METH_NOARGS), | |
DECLARE_METHOD(t_Sgd, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_Sgd, setLearningRate, METH_O), | |
DECLARE_METHOD(t_Sgd, setStateViewArray, METH_VARARGS), | |
DECLARE_METHOD(t_Sgd, stateSizeForInputSize, METH_O), | |
DECLARE_METHOD(t_Sgd, toString, METH_VARARGS), | |
DECLARE_METHOD(t_Sgd, update, METH_O), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Sgd, t_Sgd, ::java::lang::Object, Sgd, t_Sgd_init_, 0, 0, t_Sgd__fields_, 0, 0); | |
void t_Sgd::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Sgd), module, "Sgd", 0); | |
PyDict_SetItemString(PY_TYPE(Sgd).tp_dict, "SgdAggregator", make_descriptor(&PY_TYPE(Sgd$SgdAggregator))); | |
} | |
void t_Sgd::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Sgd).tp_dict, "class_", make_descriptor(Sgd::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Sgd).tp_dict, "wrapfn_", make_descriptor(t_Sgd::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Sgd).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Sgd_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Sgd::initializeClass, 1))) | |
return NULL; | |
return t_Sgd::wrap_Object(Sgd(((t_Sgd *) arg)->object.this$)); | |
} | |
static PyObject *t_Sgd_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Sgd::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Sgd_init_(t_Sgd *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
Sgd object((jobject) NULL); | |
INT_CALL(object = Sgd()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
jdouble a0; | |
Sgd object((jobject) NULL); | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
INT_CALL(object = Sgd(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_Sgd_equals(t_Sgd *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(Sgd), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_Sgd_getAggregator(t_Sgd *self, PyObject *arg) | |
{ | |
jboolean a0; | |
::org::nd4j::linalg::learning::GradientUpdaterAggregator result((jobject) NULL); | |
if (!parseArg(arg, "Z", &a0)) | |
{ | |
OBJ_CALL(result = self->object.getAggregator(a0)); | |
return ::org::nd4j::linalg::learning::t_GradientUpdaterAggregator::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "getAggregator", arg); | |
return NULL; | |
} | |
static PyObject *t_Sgd_getGradient(t_Sgd *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
jint a1; | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "kI", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.getGradient(a0, a1)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "getGradient", args); | |
return NULL; | |
} | |
static PyObject *t_Sgd_getLearningRate(t_Sgd *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.getLearningRate()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_Sgd_hashCode(t_Sgd *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Sgd), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_Sgd_setLearningRate(t_Sgd *self, PyObject *arg) | |
{ | |
jdouble a0; | |
if (!parseArg(arg, "D", &a0)) | |
{ | |
OBJ_CALL(self->object.setLearningRate(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setLearningRate", arg); | |
return NULL; | |
} | |
static PyObject *t_Sgd_setStateViewArray(t_Sgd *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
JArray< jint > a1((jobject) NULL); | |
jchar a2; | |
jboolean a3; | |
if (!parseArgs(args, "k[ICZ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
OBJ_CALL(self->object.setStateViewArray(a0, a1, a2, a3)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setStateViewArray", args); | |
return NULL; | |
} | |
static PyObject *t_Sgd_stateSizeForInputSize(t_Sgd *self, PyObject *arg) | |
{ | |
jint a0; | |
jint result; | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.stateSizeForInputSize(a0)); | |
return PyInt_FromLong((long) result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "stateSizeForInputSize", arg); | |
return NULL; | |
} | |
static PyObject *t_Sgd_toString(t_Sgd *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Sgd), (PyObject *) self, "toString", args, 2); | |
} | |
static PyObject *t_Sgd_update(t_Sgd *self, PyObject *arg) | |
{ | |
JArray< ::java::lang::Object > a0((jobject) NULL); | |
if (!parseArg(arg, "[o", &a0)) | |
{ | |
OBJ_CALL(self->object.update(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "update", arg); | |
return NULL; | |
} | |
static PyObject *t_Sgd_get__learningRate(t_Sgd *self, void *data) | |
{ | |
jdouble value; | |
OBJ_CALL(value = self->object.getLearningRate()); | |
return PyFloat_FromDouble((double) value); | |
} | |
static int t_Sgd_set__learningRate(t_Sgd *self, PyObject *arg, void *data) | |
{ | |
{ | |
jdouble value; | |
if (!parseArg(arg, "D", &value)) | |
{ | |
INT_CALL(self->object.setLearningRate(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "learningRate", arg); | |
return -1; | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/lossfunctions/LossCalculation.h" | |
#include "org/nd4j/linalg/lossfunctions/LossFunctions$LossFunction.h" | |
#include "java/lang/Class.h" | |
#include "org/nd4j/linalg/lossfunctions/LossCalculation$LossCalculationBuilder.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace lossfunctions { | |
::java::lang::Class *LossCalculation::class$ = NULL; | |
jmethodID *LossCalculation::mids$ = NULL; | |
bool LossCalculation::live$ = false; | |
jclass LossCalculation::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/lossfunctions/LossCalculation"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_builder_c02b30d0] = env->getStaticMethodID(cls, "builder", "()Lorg/nd4j/linalg/lossfunctions/LossCalculation$LossCalculationBuilder;"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_getActivationFn_14c7b5c5] = env->getMethodID(cls, "getActivationFn", "()Ljava/lang/String;"); | |
mids$[mid_getL1_54c6a174] = env->getMethodID(cls, "getL1", "()D"); | |
mids$[mid_getL2_54c6a174] = env->getMethodID(cls, "getL2", "()D"); | |
mids$[mid_getLabels_eef1d225] = env->getMethodID(cls, "getLabels", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_getLossFunction_571a2208] = env->getMethodID(cls, "getLossFunction", "()Lorg/nd4j/linalg/lossfunctions/LossFunctions$LossFunction;"); | |
mids$[mid_getMask_eef1d225] = env->getMethodID(cls, "getMask", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_getMiniBatchSize_54c6a179] = env->getMethodID(cls, "getMiniBatchSize", "()I"); | |
mids$[mid_getPreOut_eef1d225] = env->getMethodID(cls, "getPreOut", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_getZ_eef1d225] = env->getMethodID(cls, "getZ", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_isMiniBatch_54c6a16a] = env->getMethodID(cls, "isMiniBatch", "()Z"); | |
mids$[mid_isUseRegularization_54c6a16a] = env->getMethodID(cls, "isUseRegularization", "()Z"); | |
mids$[mid_score_54c6a174] = env->getMethodID(cls, "score", "()D"); | |
mids$[mid_scoreExamples_eef1d225] = env->getMethodID(cls, "scoreExamples", "()Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_setActivationFn_5fdc3f48] = env->getMethodID(cls, "setActivationFn", "(Ljava/lang/String;)V"); | |
mids$[mid_setL1_5d1c7645] = env->getMethodID(cls, "setL1", "(D)V"); | |
mids$[mid_setL2_5d1c7645] = env->getMethodID(cls, "setL2", "(D)V"); | |
mids$[mid_setLabels_97661d74] = env->getMethodID(cls, "setLabels", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_setLossFunction_f882ab79] = env->getMethodID(cls, "setLossFunction", "(Lorg/nd4j/linalg/lossfunctions/LossFunctions$LossFunction;)V"); | |
mids$[mid_setMask_97661d74] = env->getMethodID(cls, "setMask", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_setMiniBatch_bb0c767f] = env->getMethodID(cls, "setMiniBatch", "(Z)V"); | |
mids$[mid_setMiniBatchSize_39c7bd3c] = env->getMethodID(cls, "setMiniBatchSize", "(I)V"); | |
mids$[mid_setPreOut_97661d74] = env->getMethodID(cls, "setPreOut", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_setUseRegularization_bb0c767f] = env->getMethodID(cls, "setUseRegularization", "(Z)V"); | |
mids$[mid_setZ_97661d74] = env->getMethodID(cls, "setZ", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
::org::nd4j::linalg::lossfunctions::LossCalculation$LossCalculationBuilder LossCalculation::builder() | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return ::org::nd4j::linalg::lossfunctions::LossCalculation$LossCalculationBuilder(env->callStaticObjectMethod(cls, mids$[mid_builder_c02b30d0])); | |
} | |
jboolean LossCalculation::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
::java::lang::String LossCalculation::getActivationFn() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_getActivationFn_14c7b5c5])); | |
} | |
jdouble LossCalculation::getL1() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_getL1_54c6a174]); | |
} | |
jdouble LossCalculation::getL2() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_getL2_54c6a174]); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray LossCalculation::getLabels() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getLabels_eef1d225])); | |
} | |
::org::nd4j::linalg::lossfunctions::LossFunctions$LossFunction LossCalculation::getLossFunction() const | |
{ | |
return ::org::nd4j::linalg::lossfunctions::LossFunctions$LossFunction(env->callObjectMethod(this$, mids$[mid_getLossFunction_571a2208])); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray LossCalculation::getMask() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getMask_eef1d225])); | |
} | |
jint LossCalculation::getMiniBatchSize() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getMiniBatchSize_54c6a179]); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray LossCalculation::getPreOut() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getPreOut_eef1d225])); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray LossCalculation::getZ() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getZ_eef1d225])); | |
} | |
jint LossCalculation::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
jboolean LossCalculation::isMiniBatch() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isMiniBatch_54c6a16a]); | |
} | |
jboolean LossCalculation::isUseRegularization() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isUseRegularization_54c6a16a]); | |
} | |
jdouble LossCalculation::score() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_score_54c6a174]); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray LossCalculation::scoreExamples() const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_scoreExamples_eef1d225])); | |
} | |
void LossCalculation::setActivationFn(const ::java::lang::String & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setActivationFn_5fdc3f48], a0.this$); | |
} | |
void LossCalculation::setL1(jdouble a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setL1_5d1c7645], a0); | |
} | |
void LossCalculation::setL2(jdouble a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setL2_5d1c7645], a0); | |
} | |
void LossCalculation::setLabels(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setLabels_97661d74], a0.this$); | |
} | |
void LossCalculation::setLossFunction(const ::org::nd4j::linalg::lossfunctions::LossFunctions$LossFunction & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setLossFunction_f882ab79], a0.this$); | |
} | |
void LossCalculation::setMask(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setMask_97661d74], a0.this$); | |
} | |
void LossCalculation::setMiniBatch(jboolean a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setMiniBatch_bb0c767f], a0); | |
} | |
void LossCalculation::setMiniBatchSize(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setMiniBatchSize_39c7bd3c], a0); | |
} | |
void LossCalculation::setPreOut(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setPreOut_97661d74], a0.this$); | |
} | |
void LossCalculation::setUseRegularization(jboolean a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setUseRegularization_bb0c767f], a0); | |
} | |
void LossCalculation::setZ(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setZ_97661d74], a0.this$); | |
} | |
::java::lang::String LossCalculation::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace lossfunctions { | |
static PyObject *t_LossCalculation_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_LossCalculation_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_LossCalculation_builder(PyTypeObject *type); | |
static PyObject *t_LossCalculation_equals(t_LossCalculation *self, PyObject *args); | |
static PyObject *t_LossCalculation_getActivationFn(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_getL1(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_getL2(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_getLabels(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_getLossFunction(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_getMask(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_getMiniBatchSize(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_getPreOut(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_getZ(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_hashCode(t_LossCalculation *self, PyObject *args); | |
static PyObject *t_LossCalculation_isMiniBatch(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_isUseRegularization(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_score(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_scoreExamples(t_LossCalculation *self); | |
static PyObject *t_LossCalculation_setActivationFn(t_LossCalculation *self, PyObject *arg); | |
static PyObject *t_LossCalculation_setL1(t_LossCalculation *self, PyObject *arg); | |
static PyObject *t_LossCalculation_setL2(t_LossCalculation *self, PyObject *arg); | |
static PyObject *t_LossCalculation_setLabels(t_LossCalculation *self, PyObject *arg); | |
static PyObject *t_LossCalculation_setLossFunction(t_LossCalculation *self, PyObject *arg); | |
static PyObject *t_LossCalculation_setMask(t_LossCalculation *self, PyObject *arg); | |
static PyObject *t_LossCalculation_setMiniBatch(t_LossCalculation *self, PyObject *arg); | |
static PyObject *t_LossCalculation_setMiniBatchSize(t_LossCalculation *self, PyObject *arg); | |
static PyObject *t_LossCalculation_setPreOut(t_LossCalculation *self, PyObject *arg); | |
static PyObject *t_LossCalculation_setUseRegularization(t_LossCalculation *self, PyObject *arg); | |
static PyObject *t_LossCalculation_setZ(t_LossCalculation *self, PyObject *arg); | |
static PyObject *t_LossCalculation_toString(t_LossCalculation *self, PyObject *args); | |
static PyObject *t_LossCalculation_get__activationFn(t_LossCalculation *self, void *data); | |
static int t_LossCalculation_set__activationFn(t_LossCalculation *self, PyObject *arg, void *data); | |
static PyObject *t_LossCalculation_get__l1(t_LossCalculation *self, void *data); | |
static int t_LossCalculation_set__l1(t_LossCalculation *self, PyObject *arg, void *data); | |
static PyObject *t_LossCalculation_get__l2(t_LossCalculation *self, void *data); | |
static int t_LossCalculation_set__l2(t_LossCalculation *self, PyObject *arg, void *data); | |
static PyObject *t_LossCalculation_get__labels(t_LossCalculation *self, void *data); | |
static int t_LossCalculation_set__labels(t_LossCalculation *self, PyObject *arg, void *data); | |
static PyObject *t_LossCalculation_get__lossFunction(t_LossCalculation *self, void *data); | |
static int t_LossCalculation_set__lossFunction(t_LossCalculation *self, PyObject *arg, void *data); | |
static PyObject *t_LossCalculation_get__mask(t_LossCalculation *self, void *data); | |
static int t_LossCalculation_set__mask(t_LossCalculation *self, PyObject *arg, void *data); | |
static PyObject *t_LossCalculation_get__miniBatch(t_LossCalculation *self, void *data); | |
static int t_LossCalculation_set__miniBatch(t_LossCalculation *self, PyObject *arg, void *data); | |
static PyObject *t_LossCalculation_get__miniBatchSize(t_LossCalculation *self, void *data); | |
static int t_LossCalculation_set__miniBatchSize(t_LossCalculation *self, PyObject *arg, void *data); | |
static PyObject *t_LossCalculation_get__preOut(t_LossCalculation *self, void *data); | |
static int t_LossCalculation_set__preOut(t_LossCalculation *self, PyObject *arg, void *data); | |
static PyObject *t_LossCalculation_get__useRegularization(t_LossCalculation *self, void *data); | |
static int t_LossCalculation_set__useRegularization(t_LossCalculation *self, PyObject *arg, void *data); | |
static PyObject *t_LossCalculation_get__z(t_LossCalculation *self, void *data); | |
static int t_LossCalculation_set__z(t_LossCalculation *self, PyObject *arg, void *data); | |
static PyGetSetDef t_LossCalculation__fields_[] = { | |
DECLARE_GETSET_FIELD(t_LossCalculation, activationFn), | |
DECLARE_GETSET_FIELD(t_LossCalculation, l1), | |
DECLARE_GETSET_FIELD(t_LossCalculation, l2), | |
DECLARE_GETSET_FIELD(t_LossCalculation, labels), | |
DECLARE_GETSET_FIELD(t_LossCalculation, lossFunction), | |
DECLARE_GETSET_FIELD(t_LossCalculation, mask), | |
DECLARE_GETSET_FIELD(t_LossCalculation, miniBatch), | |
DECLARE_GETSET_FIELD(t_LossCalculation, miniBatchSize), | |
DECLARE_GETSET_FIELD(t_LossCalculation, preOut), | |
DECLARE_GETSET_FIELD(t_LossCalculation, useRegularization), | |
DECLARE_GETSET_FIELD(t_LossCalculation, z), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_LossCalculation__methods_[] = { | |
DECLARE_METHOD(t_LossCalculation, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_LossCalculation, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_LossCalculation, builder, METH_NOARGS | METH_CLASS), | |
DECLARE_METHOD(t_LossCalculation, equals, METH_VARARGS), | |
DECLARE_METHOD(t_LossCalculation, getActivationFn, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, getL1, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, getL2, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, getLabels, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, getLossFunction, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, getMask, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, getMiniBatchSize, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, getPreOut, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, getZ, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_LossCalculation, isMiniBatch, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, isUseRegularization, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, score, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, scoreExamples, METH_NOARGS), | |
DECLARE_METHOD(t_LossCalculation, setActivationFn, METH_O), | |
DECLARE_METHOD(t_LossCalculation, setL1, METH_O), | |
DECLARE_METHOD(t_LossCalculation, setL2, METH_O), | |
DECLARE_METHOD(t_LossCalculation, setLabels, METH_O), | |
DECLARE_METHOD(t_LossCalculation, setLossFunction, METH_O), | |
DECLARE_METHOD(t_LossCalculation, setMask, METH_O), | |
DECLARE_METHOD(t_LossCalculation, setMiniBatch, METH_O), | |
DECLARE_METHOD(t_LossCalculation, setMiniBatchSize, METH_O), | |
DECLARE_METHOD(t_LossCalculation, setPreOut, METH_O), | |
DECLARE_METHOD(t_LossCalculation, setUseRegularization, METH_O), | |
DECLARE_METHOD(t_LossCalculation, setZ, METH_O), | |
DECLARE_METHOD(t_LossCalculation, toString, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(LossCalculation, t_LossCalculation, ::java::lang::Object, LossCalculation, abstract_init, 0, 0, t_LossCalculation__fields_, 0, 0); | |
void t_LossCalculation::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(LossCalculation), module, "LossCalculation", 0); | |
PyDict_SetItemString(PY_TYPE(LossCalculation).tp_dict, "LossCalculationBuilder", make_descriptor(&PY_TYPE(LossCalculation$LossCalculationBuilder))); | |
} | |
void t_LossCalculation::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(LossCalculation).tp_dict, "class_", make_descriptor(LossCalculation::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(LossCalculation).tp_dict, "wrapfn_", make_descriptor(t_LossCalculation::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(LossCalculation).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_LossCalculation_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, LossCalculation::initializeClass, 1))) | |
return NULL; | |
return t_LossCalculation::wrap_Object(LossCalculation(((t_LossCalculation *) arg)->object.this$)); | |
} | |
static PyObject *t_LossCalculation_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, LossCalculation::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_LossCalculation_builder(PyTypeObject *type) | |
{ | |
::org::nd4j::linalg::lossfunctions::LossCalculation$LossCalculationBuilder result((jobject) NULL); | |
OBJ_CALL(result = ::org::nd4j::linalg::lossfunctions::LossCalculation::builder()); | |
return ::org::nd4j::linalg::lossfunctions::t_LossCalculation$LossCalculationBuilder::wrap_Object(result); | |
} | |
static PyObject *t_LossCalculation_equals(t_LossCalculation *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(LossCalculation), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_LossCalculation_getActivationFn(t_LossCalculation *self) | |
{ | |
::java::lang::String result((jobject) NULL); | |
OBJ_CALL(result = self->object.getActivationFn()); | |
return j2p(result); | |
} | |
static PyObject *t_LossCalculation_getL1(t_LossCalculation *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.getL1()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_LossCalculation_getL2(t_LossCalculation *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.getL2()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_LossCalculation_getLabels(t_LossCalculation *self) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
OBJ_CALL(result = self->object.getLabels()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
static PyObject *t_LossCalculation_getLossFunction(t_LossCalculation *self) | |
{ | |
::org::nd4j::linalg::lossfunctions::LossFunctions$LossFunction result((jobject) NULL); | |
OBJ_CALL(result = self->object.getLossFunction()); | |
return ::org::nd4j::linalg::lossfunctions::t_LossFunctions$LossFunction::wrap_Object(result); | |
} | |
static PyObject *t_LossCalculation_getMask(t_LossCalculation *self) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
OBJ_CALL(result = self->object.getMask()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
static PyObject *t_LossCalculation_getMiniBatchSize(t_LossCalculation *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.getMiniBatchSize()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_LossCalculation_getPreOut(t_LossCalculation *self) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
OBJ_CALL(result = self->object.getPreOut()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
static PyObject *t_LossCalculation_getZ(t_LossCalculation *self) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
OBJ_CALL(result = self->object.getZ()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
static PyObject *t_LossCalculation_hashCode(t_LossCalculation *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(LossCalculation), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_LossCalculation_isMiniBatch(t_LossCalculation *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.isMiniBatch()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_LossCalculation_isUseRegularization(t_LossCalculation *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.isUseRegularization()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_LossCalculation_score(t_LossCalculation *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.score()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_LossCalculation_scoreExamples(t_LossCalculation *self) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
OBJ_CALL(result = self->object.scoreExamples()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
static PyObject *t_LossCalculation_setActivationFn(t_LossCalculation *self, PyObject *arg) | |
{ | |
::java::lang::String a0((jobject) NULL); | |
if (!parseArg(arg, "s", &a0)) | |
{ | |
OBJ_CALL(self->object.setActivationFn(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setActivationFn", arg); | |
return NULL; | |
} | |
static PyObject *t_LossCalculation_setL1(t_LossCalculation *self, PyObject *arg) | |
{ | |
jdouble a0; | |
if (!parseArg(arg, "D", &a0)) | |
{ | |
OBJ_CALL(self->object.setL1(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setL1", arg); | |
return NULL; | |
} | |
static PyObject *t_LossCalculation_setL2(t_LossCalculation *self, PyObject *arg) | |
{ | |
jdouble a0; | |
if (!parseArg(arg, "D", &a0)) | |
{ | |
OBJ_CALL(self->object.setL2(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setL2", arg); | |
return NULL; | |
} | |
static PyObject *t_LossCalculation_setLabels(t_LossCalculation *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.setLabels(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setLabels", arg); | |
return NULL; | |
} | |
static PyObject *t_LossCalculation_setLossFunction(t_LossCalculation *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::lossfunctions::LossFunctions$LossFunction a0((jobject) NULL); | |
PyTypeObject **p0; | |
if (!parseArg(arg, "K", ::org::nd4j::linalg::lossfunctions::LossFunctions$LossFunction::initializeClass, &a0, &p0, ::org::nd4j::linalg::lossfunctions::t_LossFunctions$LossFunction::parameters_)) | |
{ | |
OBJ_CALL(self->object.setLossFunction(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setLossFunction", arg); | |
return NULL; | |
} | |
static PyObject *t_LossCalculation_setMask(t_LossCalculation *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.setMask(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setMask", arg); | |
return NULL; | |
} | |
static PyObject *t_LossCalculation_setMiniBatch(t_LossCalculation *self, PyObject *arg) | |
{ | |
jboolean a0; | |
if (!parseArg(arg, "Z", &a0)) | |
{ | |
OBJ_CALL(self->object.setMiniBatch(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setMiniBatch", arg); | |
return NULL; | |
} | |
static PyObject *t_LossCalculation_setMiniBatchSize(t_LossCalculation *self, PyObject *arg) | |
{ | |
jint a0; | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.setMiniBatchSize(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setMiniBatchSize", arg); | |
return NULL; | |
} | |
static PyObject *t_LossCalculation_setPreOut(t_LossCalculation *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.setPreOut(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setPreOut", arg); | |
return NULL; | |
} | |
static PyObject *t_LossCalculation_setUseRegularization(t_LossCalculation *self, PyObject *arg) | |
{ | |
jboolean a0; | |
if (!parseArg(arg, "Z", &a0)) | |
{ | |
OBJ_CALL(self->object.setUseRegularization(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setUseRegularization", arg); | |
return NULL; | |
} | |
static PyObject *t_LossCalculation_setZ(t_LossCalculation *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.setZ(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setZ", arg); | |
return NULL; | |
} | |
static PyObject *t_LossCalculation_toString(t_LossCalculation *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(LossCalculation), (PyObject *) self, "toString", args, 2); | |
} | |
static PyObject *t_LossCalculation_get__activationFn(t_LossCalculation *self, void *data) | |
{ | |
::java::lang::String value((jobject) NULL); | |
OBJ_CALL(value = self->object.getActivationFn()); | |
return j2p(value); | |
} | |
static int t_LossCalculation_set__activationFn(t_LossCalculation *self, PyObject *arg, void *data) | |
{ | |
{ | |
::java::lang::String value((jobject) NULL); | |
if (!parseArg(arg, "s", &value)) | |
{ | |
INT_CALL(self->object.setActivationFn(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "activationFn", arg); | |
return -1; | |
} | |
static PyObject *t_LossCalculation_get__l1(t_LossCalculation *self, void *data) | |
{ | |
jdouble value; | |
OBJ_CALL(value = self->object.getL1()); | |
return PyFloat_FromDouble((double) value); | |
} | |
static int t_LossCalculation_set__l1(t_LossCalculation *self, PyObject *arg, void *data) | |
{ | |
{ | |
jdouble value; | |
if (!parseArg(arg, "D", &value)) | |
{ | |
INT_CALL(self->object.setL1(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "l1", arg); | |
return -1; | |
} | |
static PyObject *t_LossCalculation_get__l2(t_LossCalculation *self, void *data) | |
{ | |
jdouble value; | |
OBJ_CALL(value = self->object.getL2()); | |
return PyFloat_FromDouble((double) value); | |
} | |
static int t_LossCalculation_set__l2(t_LossCalculation *self, PyObject *arg, void *data) | |
{ | |
{ | |
jdouble value; | |
if (!parseArg(arg, "D", &value)) | |
{ | |
INT_CALL(self->object.setL2(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "l2", arg); | |
return -1; | |
} | |
static PyObject *t_LossCalculation_get__labels(t_LossCalculation *self, void *data) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
OBJ_CALL(value = self->object.getLabels()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(value); | |
} | |
static int t_LossCalculation_set__labels(t_LossCalculation *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setLabels(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "labels", arg); | |
return -1; | |
} | |
static PyObject *t_LossCalculation_get__lossFunction(t_LossCalculation *self, void *data) | |
{ | |
::org::nd4j::linalg::lossfunctions::LossFunctions$LossFunction value((jobject) NULL); | |
OBJ_CALL(value = self->object.getLossFunction()); | |
return ::org::nd4j::linalg::lossfunctions::t_LossFunctions$LossFunction::wrap_Object(value); | |
} | |
static int t_LossCalculation_set__lossFunction(t_LossCalculation *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::lossfunctions::LossFunctions$LossFunction value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::lossfunctions::LossFunctions$LossFunction::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setLossFunction(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "lossFunction", arg); | |
return -1; | |
} | |
static PyObject *t_LossCalculation_get__mask(t_LossCalculation *self, void *data) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
OBJ_CALL(value = self->object.getMask()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(value); | |
} | |
static int t_LossCalculation_set__mask(t_LossCalculation *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setMask(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "mask", arg); | |
return -1; | |
} | |
static PyObject *t_LossCalculation_get__miniBatch(t_LossCalculation *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isMiniBatch()); | |
Py_RETURN_BOOL(value); | |
} | |
static int t_LossCalculation_set__miniBatch(t_LossCalculation *self, PyObject *arg, void *data) | |
{ | |
{ | |
jboolean value; | |
if (!parseArg(arg, "Z", &value)) | |
{ | |
INT_CALL(self->object.setMiniBatch(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "miniBatch", arg); | |
return -1; | |
} | |
static PyObject *t_LossCalculation_get__miniBatchSize(t_LossCalculation *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getMiniBatchSize()); | |
return PyInt_FromLong((long) value); | |
} | |
static int t_LossCalculation_set__miniBatchSize(t_LossCalculation *self, PyObject *arg, void *data) | |
{ | |
{ | |
jint value; | |
if (!parseArg(arg, "I", &value)) | |
{ | |
INT_CALL(self->object.setMiniBatchSize(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "miniBatchSize", arg); | |
return -1; | |
} | |
static PyObject *t_LossCalculation_get__preOut(t_LossCalculation *self, void *data) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
OBJ_CALL(value = self->object.getPreOut()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(value); | |
} | |
static int t_LossCalculation_set__preOut(t_LossCalculation *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setPreOut(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "preOut", arg); | |
return -1; | |
} | |
static PyObject *t_LossCalculation_get__useRegularization(t_LossCalculation *self, void *data) | |
{ | |
jboolean value; | |
OBJ_CALL(value = self->object.isUseRegularization()); | |
Py_RETURN_BOOL(value); | |
} | |
static int t_LossCalculation_set__useRegularization(t_LossCalculation *self, PyObject *arg, void *data) | |
{ | |
{ | |
jboolean value; | |
if (!parseArg(arg, "Z", &value)) | |
{ | |
INT_CALL(self->object.setUseRegularization(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "useRegularization", arg); | |
return -1; | |
} | |
static PyObject *t_LossCalculation_get__z(t_LossCalculation *self, void *data) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
OBJ_CALL(value = self->object.getZ()); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(value); | |
} | |
static int t_LossCalculation_set__z(t_LossCalculation *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setZ(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "z", arg); | |
return -1; | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/transforms/ELU.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "org/nd4j/linalg/api/ops/TransformOp.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
::java::lang::Class *ELU::class$ = NULL; | |
jmethodID *ELU::mids$ = NULL; | |
bool ELU::live$ = false; | |
jclass ELU::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/transforms/ELU"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_4237560b] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_init$_fa4e6ed8] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_321bc445] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_derivative_5ebdfbac] = env->getMethodID(cls, "derivative", "()Lorg/nd4j/linalg/api/ops/TransformOp;"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
ELU::ELU() : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
ELU::ELU(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
ELU::ELU(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
ELU::ELU(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_4237560b, a0.this$, a1.this$, a2)) {} | |
ELU::ELU(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_fa4e6ed8, a0.this$, a1.this$, a2.this$)) {} | |
ELU::ELU(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_321bc445, a0.this$, a1.this$, a2.this$, a3)) {} | |
::org::nd4j::linalg::api::ops::TransformOp ELU::derivative() const | |
{ | |
return ::org::nd4j::linalg::api::ops::TransformOp(env->callObjectMethod(this$, mids$[mid_derivative_5ebdfbac])); | |
} | |
::java::lang::String ELU::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jfloat ELU::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble ELU::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jdouble ELU::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
jfloat ELU::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op ELU::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ops::Op ELU::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
jint ELU::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
static PyObject *t_ELU_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_ELU_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_ELU_init_(t_ELU *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_ELU_derivative(t_ELU *self, PyObject *args); | |
static PyObject *t_ELU_name(t_ELU *self, PyObject *args); | |
static PyObject *t_ELU_op(t_ELU *self, PyObject *args); | |
static PyObject *t_ELU_opForDimension(t_ELU *self, PyObject *args); | |
static PyObject *t_ELU_opNum(t_ELU *self, PyObject *args); | |
static PyMethodDef t_ELU__methods_[] = { | |
DECLARE_METHOD(t_ELU, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ELU, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ELU, derivative, METH_VARARGS), | |
DECLARE_METHOD(t_ELU, name, METH_VARARGS), | |
DECLARE_METHOD(t_ELU, op, METH_VARARGS), | |
DECLARE_METHOD(t_ELU, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_ELU, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(ELU, t_ELU, ::org::nd4j::linalg::api::ops::BaseTransformOp, ELU, t_ELU_init_, 0, 0, 0, 0, 0); | |
void t_ELU::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(ELU), module, "ELU", 0); | |
} | |
void t_ELU::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(ELU).tp_dict, "class_", make_descriptor(ELU::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(ELU).tp_dict, "wrapfn_", make_descriptor(t_ELU::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(ELU).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_ELU_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, ELU::initializeClass, 1))) | |
return NULL; | |
return t_ELU::wrap_Object(ELU(((t_ELU *) arg)->object.this$)); | |
} | |
static PyObject *t_ELU_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, ELU::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_ELU_init_(t_ELU *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
ELU object((jobject) NULL); | |
INT_CALL(object = ELU()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
ELU object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = ELU(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
ELU object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = ELU(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
ELU object((jobject) NULL); | |
if (!parseArgs(args, "kkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = ELU(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
ELU object((jobject) NULL); | |
if (!parseArgs(args, "kkk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = ELU(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
ELU object((jobject) NULL); | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = ELU(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_ELU_derivative(t_ELU *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ops::TransformOp result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.derivative()); | |
return ::org::nd4j::linalg::api::ops::t_TransformOp::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(ELU), (PyObject *) self, "derivative", args, 2); | |
} | |
static PyObject *t_ELU_name(t_ELU *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(ELU), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_ELU_op(t_ELU *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(ELU), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_ELU_opForDimension(t_ELU *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(ELU), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_ELU_opNum(t_ELU *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(ELU), (PyObject *) self, "opNum", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/rng/distribution/factory/DistributionFactory.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "org/nd4j/linalg/api/rng/distribution/Distribution.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace rng { | |
namespace distribution { | |
namespace factory { | |
::java::lang::Class *DistributionFactory::class$ = NULL; | |
jmethodID *DistributionFactory::mids$ = NULL; | |
bool DistributionFactory::live$ = false; | |
jclass DistributionFactory::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/rng/distribution/factory/DistributionFactory"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_createBinomial_a8650080] = env->getMethodID(cls, "createBinomial", "(ID)Lorg/nd4j/linalg/api/rng/distribution/Distribution;"); | |
mids$[mid_createBinomial_462a5ef5] = env->getMethodID(cls, "createBinomial", "(ILorg/nd4j/linalg/api/ndarray/INDArray;)Lorg/nd4j/linalg/api/rng/distribution/Distribution;"); | |
mids$[mid_createNormal_f28af38c] = env->getMethodID(cls, "createNormal", "(Lorg/nd4j/linalg/api/ndarray/INDArray;D)Lorg/nd4j/linalg/api/rng/distribution/Distribution;"); | |
mids$[mid_createNormal_6f57d53b] = env->getMethodID(cls, "createNormal", "(DD)Lorg/nd4j/linalg/api/rng/distribution/Distribution;"); | |
mids$[mid_createUniform_6f57d53b] = env->getMethodID(cls, "createUniform", "(DD)Lorg/nd4j/linalg/api/rng/distribution/Distribution;"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
::org::nd4j::linalg::api::rng::distribution::Distribution DistributionFactory::createBinomial(jint a0, jdouble a1) const | |
{ | |
return ::org::nd4j::linalg::api::rng::distribution::Distribution(env->callObjectMethod(this$, mids$[mid_createBinomial_a8650080], a0, a1)); | |
} | |
::org::nd4j::linalg::api::rng::distribution::Distribution DistributionFactory::createBinomial(jint a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) const | |
{ | |
return ::org::nd4j::linalg::api::rng::distribution::Distribution(env->callObjectMethod(this$, mids$[mid_createBinomial_462a5ef5], a0, a1.this$)); | |
} | |
::org::nd4j::linalg::api::rng::distribution::Distribution DistributionFactory::createNormal(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, jdouble a1) const | |
{ | |
return ::org::nd4j::linalg::api::rng::distribution::Distribution(env->callObjectMethod(this$, mids$[mid_createNormal_f28af38c], a0.this$, a1)); | |
} | |
::org::nd4j::linalg::api::rng::distribution::Distribution DistributionFactory::createNormal(jdouble a0, jdouble a1) const | |
{ | |
return ::org::nd4j::linalg::api::rng::distribution::Distribution(env->callObjectMethod(this$, mids$[mid_createNormal_6f57d53b], a0, a1)); | |
} | |
::org::nd4j::linalg::api::rng::distribution::Distribution DistributionFactory::createUniform(jdouble a0, jdouble a1) const | |
{ | |
return ::org::nd4j::linalg::api::rng::distribution::Distribution(env->callObjectMethod(this$, mids$[mid_createUniform_6f57d53b], a0, a1)); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace rng { | |
namespace distribution { | |
namespace factory { | |
static PyObject *t_DistributionFactory_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_DistributionFactory_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_DistributionFactory_createBinomial(t_DistributionFactory *self, PyObject *args); | |
static PyObject *t_DistributionFactory_createNormal(t_DistributionFactory *self, PyObject *args); | |
static PyObject *t_DistributionFactory_createUniform(t_DistributionFactory *self, PyObject *args); | |
static PyMethodDef t_DistributionFactory__methods_[] = { | |
DECLARE_METHOD(t_DistributionFactory, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_DistributionFactory, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_DistributionFactory, createBinomial, METH_VARARGS), | |
DECLARE_METHOD(t_DistributionFactory, createNormal, METH_VARARGS), | |
DECLARE_METHOD(t_DistributionFactory, createUniform, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(DistributionFactory, t_DistributionFactory, ::java::lang::Object, DistributionFactory, abstract_init, 0, 0, 0, 0, 0); | |
void t_DistributionFactory::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(DistributionFactory), module, "DistributionFactory", 0); | |
} | |
void t_DistributionFactory::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(DistributionFactory).tp_dict, "class_", make_descriptor(DistributionFactory::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(DistributionFactory).tp_dict, "wrapfn_", make_descriptor(t_DistributionFactory::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(DistributionFactory).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_DistributionFactory_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, DistributionFactory::initializeClass, 1))) | |
return NULL; | |
return t_DistributionFactory::wrap_Object(DistributionFactory(((t_DistributionFactory *) arg)->object.this$)); | |
} | |
static PyObject *t_DistributionFactory_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, DistributionFactory::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_DistributionFactory_createBinomial(t_DistributionFactory *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
jdouble a1; | |
::org::nd4j::linalg::api::rng::distribution::Distribution result((jobject) NULL); | |
if (!parseArgs(args, "ID", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.createBinomial(a0, a1)); | |
return ::org::nd4j::linalg::api::rng::distribution::t_Distribution::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::rng::distribution::Distribution result((jobject) NULL); | |
if (!parseArgs(args, "Ik", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.createBinomial(a0, a1)); | |
return ::org::nd4j::linalg::api::rng::distribution::t_Distribution::wrap_Object(result); | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "createBinomial", args); | |
return NULL; | |
} | |
static PyObject *t_DistributionFactory_createNormal(t_DistributionFactory *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
jdouble a1; | |
::org::nd4j::linalg::api::rng::distribution::Distribution result((jobject) NULL); | |
if (!parseArgs(args, "kD", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.createNormal(a0, a1)); | |
return ::org::nd4j::linalg::api::rng::distribution::t_Distribution::wrap_Object(result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble a1; | |
::org::nd4j::linalg::api::rng::distribution::Distribution result((jobject) NULL); | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.createNormal(a0, a1)); | |
return ::org::nd4j::linalg::api::rng::distribution::t_Distribution::wrap_Object(result); | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "createNormal", args); | |
return NULL; | |
} | |
static PyObject *t_DistributionFactory_createUniform(t_DistributionFactory *self, PyObject *args) | |
{ | |
jdouble a0; | |
jdouble a1; | |
::org::nd4j::linalg::api::rng::distribution::Distribution result((jobject) NULL); | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.createUniform(a0, a1)); | |
return ::org::nd4j::linalg::api::rng::distribution::t_Distribution::wrap_Object(result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "createUniform", args); | |
return NULL; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/dataset/api/iterator/TestDataSetIterator.h" | |
#include "org/nd4j/linalg/dataset/api/DataSetPreProcessor.h" | |
#include "org/nd4j/linalg/dataset/DataSet.h" | |
#include "org/nd4j/linalg/dataset/api/iterator/DataSetIterator.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace iterator { | |
::java::lang::Class *TestDataSetIterator::class$ = NULL; | |
jmethodID *TestDataSetIterator::mids$ = NULL; | |
bool TestDataSetIterator::live$ = false; | |
jclass TestDataSetIterator::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/dataset/api/iterator/TestDataSetIterator"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_68960c49] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/dataset/DataSet;)V"); | |
mids$[mid_init$_67540ee5] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/dataset/DataSet;I)V"); | |
mids$[mid_asyncSupported_54c6a16a] = env->getMethodID(cls, "asyncSupported", "()Z"); | |
mids$[mid_batch_54c6a179] = env->getMethodID(cls, "batch", "()I"); | |
mids$[mid_cursor_54c6a179] = env->getMethodID(cls, "cursor", "()I"); | |
mids$[mid_getPreProcessor_13e7da94] = env->getMethodID(cls, "getPreProcessor", "()Lorg/nd4j/linalg/dataset/api/DataSetPreProcessor;"); | |
mids$[mid_hasNext_54c6a16a] = env->getMethodID(cls, "hasNext", "()Z"); | |
mids$[mid_inputColumns_54c6a179] = env->getMethodID(cls, "inputColumns", "()I"); | |
mids$[mid_next_5102ff44] = env->getMethodID(cls, "next", "()Lorg/nd4j/linalg/dataset/DataSet;"); | |
mids$[mid_next_09f600b2] = env->getMethodID(cls, "next", "(I)Lorg/nd4j/linalg/dataset/DataSet;"); | |
mids$[mid_numExamples_54c6a179] = env->getMethodID(cls, "numExamples", "()I"); | |
mids$[mid_remove_54c6a166] = env->getMethodID(cls, "remove", "()V"); | |
mids$[mid_reset_54c6a166] = env->getMethodID(cls, "reset", "()V"); | |
mids$[mid_resetSupported_54c6a16a] = env->getMethodID(cls, "resetSupported", "()Z"); | |
mids$[mid_setPreProcessor_974ef3b1] = env->getMethodID(cls, "setPreProcessor", "(Lorg/nd4j/linalg/dataset/api/DataSetPreProcessor;)V"); | |
mids$[mid_totalExamples_54c6a179] = env->getMethodID(cls, "totalExamples", "()I"); | |
mids$[mid_totalOutcomes_54c6a179] = env->getMethodID(cls, "totalOutcomes", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
TestDataSetIterator::TestDataSetIterator(const ::org::nd4j::linalg::dataset::DataSet & a0) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_68960c49, a0.this$)) {} | |
TestDataSetIterator::TestDataSetIterator(const ::org::nd4j::linalg::dataset::DataSet & a0, jint a1) : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_67540ee5, a0.this$, a1)) {} | |
jboolean TestDataSetIterator::asyncSupported() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_asyncSupported_54c6a16a]); | |
} | |
jint TestDataSetIterator::batch() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_batch_54c6a179]); | |
} | |
jint TestDataSetIterator::cursor() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_cursor_54c6a179]); | |
} | |
::org::nd4j::linalg::dataset::api::DataSetPreProcessor TestDataSetIterator::getPreProcessor() const | |
{ | |
return ::org::nd4j::linalg::dataset::api::DataSetPreProcessor(env->callObjectMethod(this$, mids$[mid_getPreProcessor_13e7da94])); | |
} | |
jboolean TestDataSetIterator::hasNext() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_hasNext_54c6a16a]); | |
} | |
jint TestDataSetIterator::inputColumns() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_inputColumns_54c6a179]); | |
} | |
::org::nd4j::linalg::dataset::DataSet TestDataSetIterator::next() const | |
{ | |
return ::org::nd4j::linalg::dataset::DataSet(env->callObjectMethod(this$, mids$[mid_next_5102ff44])); | |
} | |
::org::nd4j::linalg::dataset::DataSet TestDataSetIterator::next(jint a0) const | |
{ | |
return ::org::nd4j::linalg::dataset::DataSet(env->callObjectMethod(this$, mids$[mid_next_09f600b2], a0)); | |
} | |
jint TestDataSetIterator::numExamples() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_numExamples_54c6a179]); | |
} | |
void TestDataSetIterator::remove() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_remove_54c6a166]); | |
} | |
void TestDataSetIterator::reset() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_reset_54c6a166]); | |
} | |
jboolean TestDataSetIterator::resetSupported() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_resetSupported_54c6a16a]); | |
} | |
void TestDataSetIterator::setPreProcessor(const ::org::nd4j::linalg::dataset::api::DataSetPreProcessor & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setPreProcessor_974ef3b1], a0.this$); | |
} | |
jint TestDataSetIterator::totalExamples() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_totalExamples_54c6a179]); | |
} | |
jint TestDataSetIterator::totalOutcomes() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_totalOutcomes_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace dataset { | |
namespace api { | |
namespace iterator { | |
static PyObject *t_TestDataSetIterator_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_TestDataSetIterator_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_TestDataSetIterator_init_(t_TestDataSetIterator *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_TestDataSetIterator_asyncSupported(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_batch(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_cursor(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_getPreProcessor(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_hasNext(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_inputColumns(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_next(t_TestDataSetIterator *self, PyObject *args); | |
static PyObject *t_TestDataSetIterator_numExamples(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_remove(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_reset(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_resetSupported(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_setPreProcessor(t_TestDataSetIterator *self, PyObject *arg); | |
static PyObject *t_TestDataSetIterator_totalExamples(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_totalOutcomes(t_TestDataSetIterator *self); | |
static PyObject *t_TestDataSetIterator_get__preProcessor(t_TestDataSetIterator *self, void *data); | |
static int t_TestDataSetIterator_set__preProcessor(t_TestDataSetIterator *self, PyObject *arg, void *data); | |
static PyGetSetDef t_TestDataSetIterator__fields_[] = { | |
DECLARE_GETSET_FIELD(t_TestDataSetIterator, preProcessor), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_TestDataSetIterator__methods_[] = { | |
DECLARE_METHOD(t_TestDataSetIterator, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_TestDataSetIterator, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_TestDataSetIterator, asyncSupported, METH_NOARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, batch, METH_NOARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, cursor, METH_NOARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, getPreProcessor, METH_NOARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, hasNext, METH_NOARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, inputColumns, METH_NOARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, next, METH_VARARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, numExamples, METH_NOARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, remove, METH_NOARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, reset, METH_NOARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, resetSupported, METH_NOARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, setPreProcessor, METH_O), | |
DECLARE_METHOD(t_TestDataSetIterator, totalExamples, METH_NOARGS), | |
DECLARE_METHOD(t_TestDataSetIterator, totalOutcomes, METH_NOARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(TestDataSetIterator, t_TestDataSetIterator, ::java::lang::Object, TestDataSetIterator, t_TestDataSetIterator_init_, PyObject_SelfIter, ((PyObject *(*)(::java::util::t_Iterator *)) get_iterator_next< ::java::util::t_Iterator,::org::nd4j::linalg::dataset::t_DataSet >), t_TestDataSetIterator__fields_, 0, 0); | |
void t_TestDataSetIterator::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(TestDataSetIterator), module, "TestDataSetIterator", 0); | |
} | |
void t_TestDataSetIterator::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(TestDataSetIterator).tp_dict, "class_", make_descriptor(TestDataSetIterator::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(TestDataSetIterator).tp_dict, "wrapfn_", make_descriptor(t_TestDataSetIterator::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(TestDataSetIterator).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_TestDataSetIterator_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, TestDataSetIterator::initializeClass, 1))) | |
return NULL; | |
return t_TestDataSetIterator::wrap_Object(TestDataSetIterator(((t_TestDataSetIterator *) arg)->object.this$)); | |
} | |
static PyObject *t_TestDataSetIterator_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, TestDataSetIterator::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_TestDataSetIterator_init_(t_TestDataSetIterator *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
::org::nd4j::linalg::dataset::DataSet a0((jobject) NULL); | |
TestDataSetIterator object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::dataset::DataSet::initializeClass, &a0)) | |
{ | |
INT_CALL(object = TestDataSetIterator(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::dataset::DataSet a0((jobject) NULL); | |
jint a1; | |
TestDataSetIterator object((jobject) NULL); | |
if (!parseArgs(args, "kI", ::org::nd4j::linalg::dataset::DataSet::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = TestDataSetIterator(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_TestDataSetIterator_asyncSupported(t_TestDataSetIterator *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.asyncSupported()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_TestDataSetIterator_batch(t_TestDataSetIterator *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.batch()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_TestDataSetIterator_cursor(t_TestDataSetIterator *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.cursor()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_TestDataSetIterator_getPreProcessor(t_TestDataSetIterator *self) | |
{ | |
::org::nd4j::linalg::dataset::api::DataSetPreProcessor result((jobject) NULL); | |
OBJ_CALL(result = self->object.getPreProcessor()); | |
return ::org::nd4j::linalg::dataset::api::t_DataSetPreProcessor::wrap_Object(result); | |
} | |
static PyObject *t_TestDataSetIterator_hasNext(t_TestDataSetIterator *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.hasNext()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_TestDataSetIterator_inputColumns(t_TestDataSetIterator *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.inputColumns()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_TestDataSetIterator_next(t_TestDataSetIterator *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
::org::nd4j::linalg::dataset::DataSet result((jobject) NULL); | |
OBJ_CALL(result = self->object.next()); | |
return ::org::nd4j::linalg::dataset::t_DataSet::wrap_Object(result); | |
} | |
break; | |
case 1: | |
{ | |
jint a0; | |
::org::nd4j::linalg::dataset::DataSet result((jobject) NULL); | |
if (!parseArgs(args, "I", &a0)) | |
{ | |
OBJ_CALL(result = self->object.next(a0)); | |
return ::org::nd4j::linalg::dataset::t_DataSet::wrap_Object(result); | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "next", args); | |
return NULL; | |
} | |
static PyObject *t_TestDataSetIterator_numExamples(t_TestDataSetIterator *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.numExamples()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_TestDataSetIterator_remove(t_TestDataSetIterator *self) | |
{ | |
OBJ_CALL(self->object.remove()); | |
Py_RETURN_NONE; | |
} | |
static PyObject *t_TestDataSetIterator_reset(t_TestDataSetIterator *self) | |
{ | |
OBJ_CALL(self->object.reset()); | |
Py_RETURN_NONE; | |
} | |
static PyObject *t_TestDataSetIterator_resetSupported(t_TestDataSetIterator *self) | |
{ | |
jboolean result; | |
OBJ_CALL(result = self->object.resetSupported()); | |
Py_RETURN_BOOL(result); | |
} | |
static PyObject *t_TestDataSetIterator_setPreProcessor(t_TestDataSetIterator *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::dataset::api::DataSetPreProcessor a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::dataset::api::DataSetPreProcessor::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.setPreProcessor(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setPreProcessor", arg); | |
return NULL; | |
} | |
static PyObject *t_TestDataSetIterator_totalExamples(t_TestDataSetIterator *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.totalExamples()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_TestDataSetIterator_totalOutcomes(t_TestDataSetIterator *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.totalOutcomes()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_TestDataSetIterator_get__preProcessor(t_TestDataSetIterator *self, void *data) | |
{ | |
::org::nd4j::linalg::dataset::api::DataSetPreProcessor value((jobject) NULL); | |
OBJ_CALL(value = self->object.getPreProcessor()); | |
return ::org::nd4j::linalg::dataset::api::t_DataSetPreProcessor::wrap_Object(value); | |
} | |
static int t_TestDataSetIterator_set__preProcessor(t_TestDataSetIterator *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::dataset::api::DataSetPreProcessor value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::dataset::api::DataSetPreProcessor::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setPreProcessor(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "preProcessor", arg); | |
return -1; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/scalar/ScalarSubtraction.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/Number.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace scalar { | |
::java::lang::Class *ScalarSubtraction::class$ = NULL; | |
jmethodID *ScalarSubtraction::mids$ = NULL; | |
bool ScalarSubtraction::live$ = false; | |
jclass ScalarSubtraction::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/scalar/ScalarSubtraction"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_6f98608a] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Ljava/lang/Number;)V"); | |
mids$[mid_init$_c952a13f] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;JLjava/lang/Number;)V"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
ScalarSubtraction::ScalarSubtraction() : ::org::nd4j::linalg::api::ops::BaseScalarOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
ScalarSubtraction::ScalarSubtraction(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::api::ops::BaseScalarOp(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
ScalarSubtraction::ScalarSubtraction(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::java::lang::Number & a1) : ::org::nd4j::linalg::api::ops::BaseScalarOp(env->newObject(initializeClass, &mids$, mid_init$_6f98608a, a0.this$, a1.this$)) {} | |
ScalarSubtraction::ScalarSubtraction(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3, const ::java::lang::Number & a4) : ::org::nd4j::linalg::api::ops::BaseScalarOp(env->newObject(initializeClass, &mids$, mid_init$_c952a13f, a0.this$, a1.this$, a2.this$, a3, a4.this$)) {} | |
::java::lang::String ScalarSubtraction::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jfloat ScalarSubtraction::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble ScalarSubtraction::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jdouble ScalarSubtraction::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
jfloat ScalarSubtraction::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op ScalarSubtraction::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
::org::nd4j::linalg::api::ops::Op ScalarSubtraction::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
jint ScalarSubtraction::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace scalar { | |
static PyObject *t_ScalarSubtraction_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_ScalarSubtraction_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_ScalarSubtraction_init_(t_ScalarSubtraction *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_ScalarSubtraction_name(t_ScalarSubtraction *self, PyObject *args); | |
static PyObject *t_ScalarSubtraction_op(t_ScalarSubtraction *self, PyObject *args); | |
static PyObject *t_ScalarSubtraction_opForDimension(t_ScalarSubtraction *self, PyObject *args); | |
static PyObject *t_ScalarSubtraction_opNum(t_ScalarSubtraction *self, PyObject *args); | |
static PyMethodDef t_ScalarSubtraction__methods_[] = { | |
DECLARE_METHOD(t_ScalarSubtraction, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ScalarSubtraction, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ScalarSubtraction, name, METH_VARARGS), | |
DECLARE_METHOD(t_ScalarSubtraction, op, METH_VARARGS), | |
DECLARE_METHOD(t_ScalarSubtraction, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_ScalarSubtraction, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(ScalarSubtraction, t_ScalarSubtraction, ::org::nd4j::linalg::api::ops::BaseScalarOp, ScalarSubtraction, t_ScalarSubtraction_init_, 0, 0, 0, 0, 0); | |
void t_ScalarSubtraction::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(ScalarSubtraction), module, "ScalarSubtraction", 0); | |
} | |
void t_ScalarSubtraction::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(ScalarSubtraction).tp_dict, "class_", make_descriptor(ScalarSubtraction::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(ScalarSubtraction).tp_dict, "wrapfn_", make_descriptor(t_ScalarSubtraction::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(ScalarSubtraction).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_ScalarSubtraction_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, ScalarSubtraction::initializeClass, 1))) | |
return NULL; | |
return t_ScalarSubtraction::wrap_Object(ScalarSubtraction(((t_ScalarSubtraction *) arg)->object.this$)); | |
} | |
static PyObject *t_ScalarSubtraction_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, ScalarSubtraction::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_ScalarSubtraction_init_(t_ScalarSubtraction *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
ScalarSubtraction object((jobject) NULL); | |
INT_CALL(object = ScalarSubtraction()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
ScalarSubtraction object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = ScalarSubtraction(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::java::lang::Number a1((jobject) NULL); | |
ScalarSubtraction object((jobject) NULL); | |
if (!parseArgs(args, "kO", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &::java::lang::PY_TYPE(Number), &a0, &a1)) | |
{ | |
INT_CALL(object = ScalarSubtraction(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 5: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
::java::lang::Number a4((jobject) NULL); | |
ScalarSubtraction object((jobject) NULL); | |
if (!parseArgs(args, "kkkJO", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &::java::lang::PY_TYPE(Number), &a0, &a1, &a2, &a3, &a4)) | |
{ | |
INT_CALL(object = ScalarSubtraction(a0, a1, a2, a3, a4)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_ScalarSubtraction_name(t_ScalarSubtraction *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(ScalarSubtraction), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_ScalarSubtraction_op(t_ScalarSubtraction *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(ScalarSubtraction), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_ScalarSubtraction_opForDimension(t_ScalarSubtraction *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(ScalarSubtraction), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_ScalarSubtraction_opNum(t_ScalarSubtraction *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(ScalarSubtraction), (PyObject *) self, "opNum", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/activations/impl/ActivationLReLU.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/Object.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace activations { | |
namespace impl { | |
::java::lang::Class *ActivationLReLU::class$ = NULL; | |
jmethodID *ActivationLReLU::mids$ = NULL; | |
bool ActivationLReLU::live$ = false; | |
jdouble ActivationLReLU::DEFAULT_ALPHA = (jdouble) 0; | |
jclass ActivationLReLU::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/activations/impl/ActivationLReLU"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_5d1c7645] = env->getMethodID(cls, "<init>", "(D)V"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_getActivation_962df300] = env->getMethodID(cls, "getActivation", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Z)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_getAlpha_54c6a174] = env->getMethodID(cls, "getAlpha", "()D"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
cls = (jclass) class$->this$; | |
DEFAULT_ALPHA = env->getStaticDoubleField(cls, "DEFAULT_ALPHA"); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
ActivationLReLU::ActivationLReLU() : ::org::nd4j::linalg::activations::BaseActivationFunction(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
ActivationLReLU::ActivationLReLU(jdouble a0) : ::org::nd4j::linalg::activations::BaseActivationFunction(env->newObject(initializeClass, &mids$, mid_init$_5d1c7645, a0)) {} | |
jboolean ActivationLReLU::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray ActivationLReLU::getActivation(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, jboolean a1) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_getActivation_962df300], a0.this$, a1)); | |
} | |
jdouble ActivationLReLU::getAlpha() const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_getAlpha_54c6a174]); | |
} | |
jint ActivationLReLU::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
::java::lang::String ActivationLReLU::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace activations { | |
namespace impl { | |
static PyObject *t_ActivationLReLU_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_ActivationLReLU_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_ActivationLReLU_init_(t_ActivationLReLU *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_ActivationLReLU_equals(t_ActivationLReLU *self, PyObject *args); | |
static PyObject *t_ActivationLReLU_getActivation(t_ActivationLReLU *self, PyObject *args); | |
static PyObject *t_ActivationLReLU_getAlpha(t_ActivationLReLU *self); | |
static PyObject *t_ActivationLReLU_hashCode(t_ActivationLReLU *self, PyObject *args); | |
static PyObject *t_ActivationLReLU_toString(t_ActivationLReLU *self, PyObject *args); | |
static PyObject *t_ActivationLReLU_get__alpha(t_ActivationLReLU *self, void *data); | |
static PyGetSetDef t_ActivationLReLU__fields_[] = { | |
DECLARE_GET_FIELD(t_ActivationLReLU, alpha), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_ActivationLReLU__methods_[] = { | |
DECLARE_METHOD(t_ActivationLReLU, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ActivationLReLU, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_ActivationLReLU, equals, METH_VARARGS), | |
DECLARE_METHOD(t_ActivationLReLU, getActivation, METH_VARARGS), | |
DECLARE_METHOD(t_ActivationLReLU, getAlpha, METH_NOARGS), | |
DECLARE_METHOD(t_ActivationLReLU, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_ActivationLReLU, toString, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(ActivationLReLU, t_ActivationLReLU, ::org::nd4j::linalg::activations::BaseActivationFunction, ActivationLReLU, t_ActivationLReLU_init_, 0, 0, t_ActivationLReLU__fields_, 0, 0); | |
void t_ActivationLReLU::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(ActivationLReLU), module, "ActivationLReLU", 0); | |
} | |
void t_ActivationLReLU::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(ActivationLReLU).tp_dict, "class_", make_descriptor(ActivationLReLU::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(ActivationLReLU).tp_dict, "wrapfn_", make_descriptor(t_ActivationLReLU::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(ActivationLReLU).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
env->getClass(ActivationLReLU::initializeClass); | |
PyDict_SetItemString(PY_TYPE(ActivationLReLU).tp_dict, "DEFAULT_ALPHA", make_descriptor(ActivationLReLU::DEFAULT_ALPHA)); | |
} | |
static PyObject *t_ActivationLReLU_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, ActivationLReLU::initializeClass, 1))) | |
return NULL; | |
return t_ActivationLReLU::wrap_Object(ActivationLReLU(((t_ActivationLReLU *) arg)->object.this$)); | |
} | |
static PyObject *t_ActivationLReLU_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, ActivationLReLU::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_ActivationLReLU_init_(t_ActivationLReLU *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
ActivationLReLU object((jobject) NULL); | |
INT_CALL(object = ActivationLReLU()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
jdouble a0; | |
ActivationLReLU object((jobject) NULL); | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
INT_CALL(object = ActivationLReLU(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_ActivationLReLU_equals(t_ActivationLReLU *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(ActivationLReLU), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_ActivationLReLU_getActivation(t_ActivationLReLU *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
jboolean a1; | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "kZ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.getActivation(a0, a1)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(ActivationLReLU), (PyObject *) self, "getActivation", args, 2); | |
} | |
static PyObject *t_ActivationLReLU_getAlpha(t_ActivationLReLU *self) | |
{ | |
jdouble result; | |
OBJ_CALL(result = self->object.getAlpha()); | |
return PyFloat_FromDouble((double) result); | |
} | |
static PyObject *t_ActivationLReLU_hashCode(t_ActivationLReLU *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(ActivationLReLU), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_ActivationLReLU_toString(t_ActivationLReLU *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(ActivationLReLU), (PyObject *) self, "toString", args, 2); | |
} | |
static PyObject *t_ActivationLReLU_get__alpha(t_ActivationLReLU *self, void *data) | |
{ | |
jdouble value; | |
OBJ_CALL(value = self->object.getAlpha()); | |
return PyFloat_FromDouble((double) value); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/heartbeat/Heartbeat.h" | |
#include "org/nd4j/linalg/heartbeat/reports/Task.h" | |
#include "org/nd4j/linalg/heartbeat/reports/Environment.h" | |
#include "org/nd4j/linalg/heartbeat/reports/Event.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace heartbeat { | |
::java::lang::Class *Heartbeat::class$ = NULL; | |
jmethodID *Heartbeat::mids$ = NULL; | |
bool Heartbeat::live$ = false; | |
jclass Heartbeat::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/heartbeat/Heartbeat"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_derivedId_0ee6df2f] = env->getMethodID(cls, "derivedId", "(J)V"); | |
mids$[mid_disableHeartbeat_54c6a166] = env->getMethodID(cls, "disableHeartbeat", "()V"); | |
mids$[mid_getInstance_ed83a1cc] = env->getStaticMethodID(cls, "getInstance", "()Lorg/nd4j/linalg/heartbeat/Heartbeat;"); | |
mids$[mid_reportEvent_a2e18414] = env->getMethodID(cls, "reportEvent", "(Lorg/nd4j/linalg/heartbeat/reports/Event;Lorg/nd4j/linalg/heartbeat/reports/Environment;Lorg/nd4j/linalg/heartbeat/reports/Task;)V"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
void Heartbeat::derivedId(jlong a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_derivedId_0ee6df2f], a0); | |
} | |
void Heartbeat::disableHeartbeat() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_disableHeartbeat_54c6a166]); | |
} | |
Heartbeat Heartbeat::getInstance() | |
{ | |
jclass cls = env->getClass(initializeClass); | |
return Heartbeat(env->callStaticObjectMethod(cls, mids$[mid_getInstance_ed83a1cc])); | |
} | |
void Heartbeat::reportEvent(const ::org::nd4j::linalg::heartbeat::reports::Event & a0, const ::org::nd4j::linalg::heartbeat::reports::Environment & a1, const ::org::nd4j::linalg::heartbeat::reports::Task & a2) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_reportEvent_a2e18414], a0.this$, a1.this$, a2.this$); | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace heartbeat { | |
static PyObject *t_Heartbeat_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Heartbeat_instance_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Heartbeat_derivedId(t_Heartbeat *self, PyObject *arg); | |
static PyObject *t_Heartbeat_disableHeartbeat(t_Heartbeat *self); | |
static PyObject *t_Heartbeat_getInstance(PyTypeObject *type); | |
static PyObject *t_Heartbeat_reportEvent(t_Heartbeat *self, PyObject *args); | |
static PyObject *t_Heartbeat_get__instance(t_Heartbeat *self, void *data); | |
static PyGetSetDef t_Heartbeat__fields_[] = { | |
DECLARE_GET_FIELD(t_Heartbeat, instance), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Heartbeat__methods_[] = { | |
DECLARE_METHOD(t_Heartbeat, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Heartbeat, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Heartbeat, derivedId, METH_O), | |
DECLARE_METHOD(t_Heartbeat, disableHeartbeat, METH_NOARGS), | |
DECLARE_METHOD(t_Heartbeat, getInstance, METH_NOARGS | METH_CLASS), | |
DECLARE_METHOD(t_Heartbeat, reportEvent, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Heartbeat, t_Heartbeat, ::java::lang::Object, Heartbeat, abstract_init, 0, 0, t_Heartbeat__fields_, 0, 0); | |
void t_Heartbeat::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Heartbeat), module, "Heartbeat", 0); | |
} | |
void t_Heartbeat::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Heartbeat).tp_dict, "class_", make_descriptor(Heartbeat::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Heartbeat).tp_dict, "wrapfn_", make_descriptor(t_Heartbeat::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Heartbeat).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Heartbeat_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Heartbeat::initializeClass, 1))) | |
return NULL; | |
return t_Heartbeat::wrap_Object(Heartbeat(((t_Heartbeat *) arg)->object.this$)); | |
} | |
static PyObject *t_Heartbeat_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Heartbeat::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static PyObject *t_Heartbeat_derivedId(t_Heartbeat *self, PyObject *arg) | |
{ | |
jlong a0; | |
if (!parseArg(arg, "J", &a0)) | |
{ | |
OBJ_CALL(self->object.derivedId(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "derivedId", arg); | |
return NULL; | |
} | |
static PyObject *t_Heartbeat_disableHeartbeat(t_Heartbeat *self) | |
{ | |
OBJ_CALL(self->object.disableHeartbeat()); | |
Py_RETURN_NONE; | |
} | |
static PyObject *t_Heartbeat_getInstance(PyTypeObject *type) | |
{ | |
Heartbeat result((jobject) NULL); | |
OBJ_CALL(result = ::org::nd4j::linalg::heartbeat::Heartbeat::getInstance()); | |
return t_Heartbeat::wrap_Object(result); | |
} | |
static PyObject *t_Heartbeat_reportEvent(t_Heartbeat *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::heartbeat::reports::Event a0((jobject) NULL); | |
PyTypeObject **p0; | |
::org::nd4j::linalg::heartbeat::reports::Environment a1((jobject) NULL); | |
::org::nd4j::linalg::heartbeat::reports::Task a2((jobject) NULL); | |
if (!parseArgs(args, "Kkk", ::org::nd4j::linalg::heartbeat::reports::Event::initializeClass, ::org::nd4j::linalg::heartbeat::reports::Environment::initializeClass, ::org::nd4j::linalg::heartbeat::reports::Task::initializeClass, &a0, &p0, ::org::nd4j::linalg::heartbeat::reports::t_Event::parameters_, &a1, &a2)) | |
{ | |
OBJ_CALL(self->object.reportEvent(a0, a1, a2)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "reportEvent", args); | |
return NULL; | |
} | |
static PyObject *t_Heartbeat_get__instance(t_Heartbeat *self, void *data) | |
{ | |
Heartbeat value((jobject) NULL); | |
OBJ_CALL(value = self->object.getInstance()); | |
return t_Heartbeat::wrap_Object(value); | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/impl/transforms/comparison/Min.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
namespace comparison { | |
::java::lang::Class *Min::class$ = NULL; | |
jmethodID *Min::mids$ = NULL; | |
bool Min::live$ = false; | |
jclass Min::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/impl/transforms/comparison/Min"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_97661d74] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_697a3eba] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;)V"); | |
mids$[mid_init$_4237560b] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_init$_321bc445] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;J)V"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_op_06298cbb] = env->getMethodID(cls, "op", "(F)F"); | |
mids$[mid_op_5d1c7657] = env->getMethodID(cls, "op", "(D)D"); | |
mids$[mid_op_b1e2866a] = env->getMethodID(cls, "op", "(DD)D"); | |
mids$[mid_op_f1b0c014] = env->getMethodID(cls, "op", "(FF)F"); | |
mids$[mid_opForDimension_be4c3043] = env->getMethodID(cls, "opForDimension", "(II)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opForDimension_1d88763b] = env->getMethodID(cls, "opForDimension", "(I[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Min::Min() : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
Min::Min(const ::org::nd4j::linalg::api::ndarray::INDArray & a0) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_97661d74, a0.this$)) {} | |
Min::Min(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_697a3eba, a0.this$, a1.this$)) {} | |
Min::Min(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jlong a2) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_4237560b, a0.this$, a1.this$, a2)) {} | |
Min::Min(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, const ::org::nd4j::linalg::api::ndarray::INDArray & a2, jlong a3) : ::org::nd4j::linalg::api::ops::BaseTransformOp(env->newObject(initializeClass, &mids$, mid_init$_321bc445, a0.this$, a1.this$, a2.this$, a3)) {} | |
::java::lang::String Min::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jfloat Min::op(jfloat a0) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_06298cbb], a0); | |
} | |
jdouble Min::op(jdouble a0) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_5d1c7657], a0); | |
} | |
jdouble Min::op(jdouble a0, jdouble a1) const | |
{ | |
return env->callDoubleMethod(this$, mids$[mid_op_b1e2866a], a0, a1); | |
} | |
jfloat Min::op(jfloat a0, jfloat a1) const | |
{ | |
return env->callFloatMethod(this$, mids$[mid_op_f1b0c014], a0, a1); | |
} | |
::org::nd4j::linalg::api::ops::Op Min::opForDimension(jint a0, jint a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_be4c3043], a0, a1)); | |
} | |
::org::nd4j::linalg::api::ops::Op Min::opForDimension(jint a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_opForDimension_1d88763b], a0, a1.this$)); | |
} | |
jint Min::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace impl { | |
namespace transforms { | |
namespace comparison { | |
static PyObject *t_Min_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Min_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Min_init_(t_Min *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Min_name(t_Min *self, PyObject *args); | |
static PyObject *t_Min_op(t_Min *self, PyObject *args); | |
static PyObject *t_Min_opForDimension(t_Min *self, PyObject *args); | |
static PyObject *t_Min_opNum(t_Min *self, PyObject *args); | |
static PyMethodDef t_Min__methods_[] = { | |
DECLARE_METHOD(t_Min, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Min, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Min, name, METH_VARARGS), | |
DECLARE_METHOD(t_Min, op, METH_VARARGS), | |
DECLARE_METHOD(t_Min, opForDimension, METH_VARARGS), | |
DECLARE_METHOD(t_Min, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Min, t_Min, ::org::nd4j::linalg::api::ops::BaseTransformOp, Min, t_Min_init_, 0, 0, 0, 0, 0); | |
void t_Min::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Min), module, "Min", 0); | |
} | |
void t_Min::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Min).tp_dict, "class_", make_descriptor(Min::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Min).tp_dict, "wrapfn_", make_descriptor(t_Min::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Min).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Min_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Min::initializeClass, 1))) | |
return NULL; | |
return t_Min::wrap_Object(Min(((t_Min *) arg)->object.this$)); | |
} | |
static PyObject *t_Min_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Min::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Min_init_(t_Min *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
Min object((jobject) NULL); | |
INT_CALL(object = Min()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
Min object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0)) | |
{ | |
INT_CALL(object = Min(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
Min object((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1)) | |
{ | |
INT_CALL(object = Min(a0, a1)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jlong a2; | |
Min object((jobject) NULL); | |
if (!parseArgs(args, "kkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = Min(a0, a1, a2)); | |
self->object = object; | |
break; | |
} | |
} | |
goto err; | |
case 4: | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a2((jobject) NULL); | |
jlong a3; | |
Min object((jobject) NULL); | |
if (!parseArgs(args, "kkkJ", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2, &a3)) | |
{ | |
INT_CALL(object = Min(a0, a1, a2, a3)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_Min_name(t_Min *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Min), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_Min_op(t_Min *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
jfloat a0; | |
jfloat result; | |
if (!parseArgs(args, "F", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jdouble a0; | |
jdouble result; | |
if (!parseArgs(args, "D", &a0)) | |
{ | |
OBJ_CALL(result = self->object.op(a0)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
jdouble a0; | |
jdouble a1; | |
jdouble result; | |
if (!parseArgs(args, "DD", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
{ | |
jfloat a0; | |
jfloat a1; | |
jfloat result; | |
if (!parseArgs(args, "FF", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.op(a0, a1)); | |
return PyFloat_FromDouble((double) result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Min), (PyObject *) self, "op", args, 2); | |
} | |
static PyObject *t_Min_opForDimension(t_Min *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 2: | |
{ | |
jint a0; | |
jint a1; | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "II", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
jint a0; | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "I[I", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.opForDimension(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
} | |
return callSuper(&PY_TYPE(Min), (PyObject *) self, "opForDimension", args, 2); | |
} | |
static PyObject *t_Min_opNum(t_Min *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Min), (PyObject *) self, "opNum", args, 2); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/heartbeat/reports/Task.h" | |
#include "org/nd4j/linalg/heartbeat/reports/Task$NetworkType.h" | |
#include "org/nd4j/linalg/heartbeat/reports/Task$ArchitectureType.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace heartbeat { | |
namespace reports { | |
::java::lang::Class *Task::class$ = NULL; | |
jmethodID *Task::mids$ = NULL; | |
bool Task::live$ = false; | |
jclass Task::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/heartbeat/reports/Task"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_equals_290588e2] = env->getMethodID(cls, "equals", "(Ljava/lang/Object;)Z"); | |
mids$[mid_getArchitectureType_1f74e584] = env->getMethodID(cls, "getArchitectureType", "()Lorg/nd4j/linalg/heartbeat/reports/Task$ArchitectureType;"); | |
mids$[mid_getNetworkType_8b74fd3a] = env->getMethodID(cls, "getNetworkType", "()Lorg/nd4j/linalg/heartbeat/reports/Task$NetworkType;"); | |
mids$[mid_getNumFeatures_54c6a179] = env->getMethodID(cls, "getNumFeatures", "()I"); | |
mids$[mid_getNumLabels_54c6a179] = env->getMethodID(cls, "getNumLabels", "()I"); | |
mids$[mid_getNumSamples_54c6a179] = env->getMethodID(cls, "getNumSamples", "()I"); | |
mids$[mid_hashCode_54c6a179] = env->getMethodID(cls, "hashCode", "()I"); | |
mids$[mid_setArchitectureType_e2022d71] = env->getMethodID(cls, "setArchitectureType", "(Lorg/nd4j/linalg/heartbeat/reports/Task$ArchitectureType;)V"); | |
mids$[mid_setNetworkType_900a5373] = env->getMethodID(cls, "setNetworkType", "(Lorg/nd4j/linalg/heartbeat/reports/Task$NetworkType;)V"); | |
mids$[mid_setNumFeatures_39c7bd3c] = env->getMethodID(cls, "setNumFeatures", "(I)V"); | |
mids$[mid_setNumLabels_39c7bd3c] = env->getMethodID(cls, "setNumLabels", "(I)V"); | |
mids$[mid_setNumSamples_39c7bd3c] = env->getMethodID(cls, "setNumSamples", "(I)V"); | |
mids$[mid_toCompactString_14c7b5c5] = env->getMethodID(cls, "toCompactString", "()Ljava/lang/String;"); | |
mids$[mid_toString_14c7b5c5] = env->getMethodID(cls, "toString", "()Ljava/lang/String;"); | |
mids$[mid_canEqual_290588e2] = env->getMethodID(cls, "canEqual", "(Ljava/lang/Object;)Z"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Task::Task() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
jboolean Task::equals(const ::java::lang::Object & a0) const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_equals_290588e2], a0.this$); | |
} | |
::org::nd4j::linalg::heartbeat::reports::Task$ArchitectureType Task::getArchitectureType() const | |
{ | |
return ::org::nd4j::linalg::heartbeat::reports::Task$ArchitectureType(env->callObjectMethod(this$, mids$[mid_getArchitectureType_1f74e584])); | |
} | |
::org::nd4j::linalg::heartbeat::reports::Task$NetworkType Task::getNetworkType() const | |
{ | |
return ::org::nd4j::linalg::heartbeat::reports::Task$NetworkType(env->callObjectMethod(this$, mids$[mid_getNetworkType_8b74fd3a])); | |
} | |
jint Task::getNumFeatures() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getNumFeatures_54c6a179]); | |
} | |
jint Task::getNumLabels() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getNumLabels_54c6a179]); | |
} | |
jint Task::getNumSamples() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getNumSamples_54c6a179]); | |
} | |
jint Task::hashCode() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_hashCode_54c6a179]); | |
} | |
void Task::setArchitectureType(const ::org::nd4j::linalg::heartbeat::reports::Task$ArchitectureType & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setArchitectureType_e2022d71], a0.this$); | |
} | |
void Task::setNetworkType(const ::org::nd4j::linalg::heartbeat::reports::Task$NetworkType & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setNetworkType_900a5373], a0.this$); | |
} | |
void Task::setNumFeatures(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setNumFeatures_39c7bd3c], a0); | |
} | |
void Task::setNumLabels(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setNumLabels_39c7bd3c], a0); | |
} | |
void Task::setNumSamples(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setNumSamples_39c7bd3c], a0); | |
} | |
::java::lang::String Task::toCompactString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toCompactString_14c7b5c5])); | |
} | |
::java::lang::String Task::toString() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_toString_14c7b5c5])); | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace heartbeat { | |
namespace reports { | |
static PyObject *t_Task_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Task_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Task_init_(t_Task *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Task_equals(t_Task *self, PyObject *args); | |
static PyObject *t_Task_getArchitectureType(t_Task *self); | |
static PyObject *t_Task_getNetworkType(t_Task *self); | |
static PyObject *t_Task_getNumFeatures(t_Task *self); | |
static PyObject *t_Task_getNumLabels(t_Task *self); | |
static PyObject *t_Task_getNumSamples(t_Task *self); | |
static PyObject *t_Task_hashCode(t_Task *self, PyObject *args); | |
static PyObject *t_Task_setArchitectureType(t_Task *self, PyObject *arg); | |
static PyObject *t_Task_setNetworkType(t_Task *self, PyObject *arg); | |
static PyObject *t_Task_setNumFeatures(t_Task *self, PyObject *arg); | |
static PyObject *t_Task_setNumLabels(t_Task *self, PyObject *arg); | |
static PyObject *t_Task_setNumSamples(t_Task *self, PyObject *arg); | |
static PyObject *t_Task_toCompactString(t_Task *self); | |
static PyObject *t_Task_toString(t_Task *self, PyObject *args); | |
static PyObject *t_Task_get__architectureType(t_Task *self, void *data); | |
static int t_Task_set__architectureType(t_Task *self, PyObject *arg, void *data); | |
static PyObject *t_Task_get__networkType(t_Task *self, void *data); | |
static int t_Task_set__networkType(t_Task *self, PyObject *arg, void *data); | |
static PyObject *t_Task_get__numFeatures(t_Task *self, void *data); | |
static int t_Task_set__numFeatures(t_Task *self, PyObject *arg, void *data); | |
static PyObject *t_Task_get__numLabels(t_Task *self, void *data); | |
static int t_Task_set__numLabels(t_Task *self, PyObject *arg, void *data); | |
static PyObject *t_Task_get__numSamples(t_Task *self, void *data); | |
static int t_Task_set__numSamples(t_Task *self, PyObject *arg, void *data); | |
static PyGetSetDef t_Task__fields_[] = { | |
DECLARE_GETSET_FIELD(t_Task, architectureType), | |
DECLARE_GETSET_FIELD(t_Task, networkType), | |
DECLARE_GETSET_FIELD(t_Task, numFeatures), | |
DECLARE_GETSET_FIELD(t_Task, numLabels), | |
DECLARE_GETSET_FIELD(t_Task, numSamples), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Task__methods_[] = { | |
DECLARE_METHOD(t_Task, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Task, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Task, equals, METH_VARARGS), | |
DECLARE_METHOD(t_Task, getArchitectureType, METH_NOARGS), | |
DECLARE_METHOD(t_Task, getNetworkType, METH_NOARGS), | |
DECLARE_METHOD(t_Task, getNumFeatures, METH_NOARGS), | |
DECLARE_METHOD(t_Task, getNumLabels, METH_NOARGS), | |
DECLARE_METHOD(t_Task, getNumSamples, METH_NOARGS), | |
DECLARE_METHOD(t_Task, hashCode, METH_VARARGS), | |
DECLARE_METHOD(t_Task, setArchitectureType, METH_O), | |
DECLARE_METHOD(t_Task, setNetworkType, METH_O), | |
DECLARE_METHOD(t_Task, setNumFeatures, METH_O), | |
DECLARE_METHOD(t_Task, setNumLabels, METH_O), | |
DECLARE_METHOD(t_Task, setNumSamples, METH_O), | |
DECLARE_METHOD(t_Task, toCompactString, METH_NOARGS), | |
DECLARE_METHOD(t_Task, toString, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Task, t_Task, ::java::lang::Object, Task, t_Task_init_, 0, 0, t_Task__fields_, 0, 0); | |
void t_Task::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Task), module, "Task", 0); | |
PyDict_SetItemString(PY_TYPE(Task).tp_dict, "ArchitectureType", make_descriptor(&PY_TYPE(Task$ArchitectureType))); | |
PyDict_SetItemString(PY_TYPE(Task).tp_dict, "NetworkType", make_descriptor(&PY_TYPE(Task$NetworkType))); | |
} | |
void t_Task::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Task).tp_dict, "class_", make_descriptor(Task::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Task).tp_dict, "wrapfn_", make_descriptor(t_Task::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Task).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Task_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Task::initializeClass, 1))) | |
return NULL; | |
return t_Task::wrap_Object(Task(((t_Task *) arg)->object.this$)); | |
} | |
static PyObject *t_Task_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Task::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Task_init_(t_Task *self, PyObject *args, PyObject *kwds) | |
{ | |
Task object((jobject) NULL); | |
INT_CALL(object = Task()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_Task_equals(t_Task *self, PyObject *args) | |
{ | |
::java::lang::Object a0((jobject) NULL); | |
jboolean result; | |
if (!parseArgs(args, "o", &a0)) | |
{ | |
OBJ_CALL(result = self->object.equals(a0)); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(Task), (PyObject *) self, "equals", args, 2); | |
} | |
static PyObject *t_Task_getArchitectureType(t_Task *self) | |
{ | |
::org::nd4j::linalg::heartbeat::reports::Task$ArchitectureType result((jobject) NULL); | |
OBJ_CALL(result = self->object.getArchitectureType()); | |
return ::org::nd4j::linalg::heartbeat::reports::t_Task$ArchitectureType::wrap_Object(result); | |
} | |
static PyObject *t_Task_getNetworkType(t_Task *self) | |
{ | |
::org::nd4j::linalg::heartbeat::reports::Task$NetworkType result((jobject) NULL); | |
OBJ_CALL(result = self->object.getNetworkType()); | |
return ::org::nd4j::linalg::heartbeat::reports::t_Task$NetworkType::wrap_Object(result); | |
} | |
static PyObject *t_Task_getNumFeatures(t_Task *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.getNumFeatures()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_Task_getNumLabels(t_Task *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.getNumLabels()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_Task_getNumSamples(t_Task *self) | |
{ | |
jint result; | |
OBJ_CALL(result = self->object.getNumSamples()); | |
return PyInt_FromLong((long) result); | |
} | |
static PyObject *t_Task_hashCode(t_Task *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.hashCode()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Task), (PyObject *) self, "hashCode", args, 2); | |
} | |
static PyObject *t_Task_setArchitectureType(t_Task *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::heartbeat::reports::Task$ArchitectureType a0((jobject) NULL); | |
PyTypeObject **p0; | |
if (!parseArg(arg, "K", ::org::nd4j::linalg::heartbeat::reports::Task$ArchitectureType::initializeClass, &a0, &p0, ::org::nd4j::linalg::heartbeat::reports::t_Task$ArchitectureType::parameters_)) | |
{ | |
OBJ_CALL(self->object.setArchitectureType(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setArchitectureType", arg); | |
return NULL; | |
} | |
static PyObject *t_Task_setNetworkType(t_Task *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::heartbeat::reports::Task$NetworkType a0((jobject) NULL); | |
PyTypeObject **p0; | |
if (!parseArg(arg, "K", ::org::nd4j::linalg::heartbeat::reports::Task$NetworkType::initializeClass, &a0, &p0, ::org::nd4j::linalg::heartbeat::reports::t_Task$NetworkType::parameters_)) | |
{ | |
OBJ_CALL(self->object.setNetworkType(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setNetworkType", arg); | |
return NULL; | |
} | |
static PyObject *t_Task_setNumFeatures(t_Task *self, PyObject *arg) | |
{ | |
jint a0; | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.setNumFeatures(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setNumFeatures", arg); | |
return NULL; | |
} | |
static PyObject *t_Task_setNumLabels(t_Task *self, PyObject *arg) | |
{ | |
jint a0; | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.setNumLabels(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setNumLabels", arg); | |
return NULL; | |
} | |
static PyObject *t_Task_setNumSamples(t_Task *self, PyObject *arg) | |
{ | |
jint a0; | |
if (!parseArg(arg, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.setNumSamples(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setNumSamples", arg); | |
return NULL; | |
} | |
static PyObject *t_Task_toCompactString(t_Task *self) | |
{ | |
::java::lang::String result((jobject) NULL); | |
OBJ_CALL(result = self->object.toCompactString()); | |
return j2p(result); | |
} | |
static PyObject *t_Task_toString(t_Task *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.toString()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Task), (PyObject *) self, "toString", args, 2); | |
} | |
static PyObject *t_Task_get__architectureType(t_Task *self, void *data) | |
{ | |
::org::nd4j::linalg::heartbeat::reports::Task$ArchitectureType value((jobject) NULL); | |
OBJ_CALL(value = self->object.getArchitectureType()); | |
return ::org::nd4j::linalg::heartbeat::reports::t_Task$ArchitectureType::wrap_Object(value); | |
} | |
static int t_Task_set__architectureType(t_Task *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::heartbeat::reports::Task$ArchitectureType value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::heartbeat::reports::Task$ArchitectureType::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setArchitectureType(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "architectureType", arg); | |
return -1; | |
} | |
static PyObject *t_Task_get__networkType(t_Task *self, void *data) | |
{ | |
::org::nd4j::linalg::heartbeat::reports::Task$NetworkType value((jobject) NULL); | |
OBJ_CALL(value = self->object.getNetworkType()); | |
return ::org::nd4j::linalg::heartbeat::reports::t_Task$NetworkType::wrap_Object(value); | |
} | |
static int t_Task_set__networkType(t_Task *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::heartbeat::reports::Task$NetworkType value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::heartbeat::reports::Task$NetworkType::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setNetworkType(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "networkType", arg); | |
return -1; | |
} | |
static PyObject *t_Task_get__numFeatures(t_Task *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getNumFeatures()); | |
return PyInt_FromLong((long) value); | |
} | |
static int t_Task_set__numFeatures(t_Task *self, PyObject *arg, void *data) | |
{ | |
{ | |
jint value; | |
if (!parseArg(arg, "I", &value)) | |
{ | |
INT_CALL(self->object.setNumFeatures(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "numFeatures", arg); | |
return -1; | |
} | |
static PyObject *t_Task_get__numLabels(t_Task *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getNumLabels()); | |
return PyInt_FromLong((long) value); | |
} | |
static int t_Task_set__numLabels(t_Task *self, PyObject *arg, void *data) | |
{ | |
{ | |
jint value; | |
if (!parseArg(arg, "I", &value)) | |
{ | |
INT_CALL(self->object.setNumLabels(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "numLabels", arg); | |
return -1; | |
} | |
static PyObject *t_Task_get__numSamples(t_Task *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getNumSamples()); | |
return PyInt_FromLong((long) value); | |
} | |
static int t_Task_set__numSamples(t_Task *self, PyObject *arg, void *data) | |
{ | |
{ | |
jint value; | |
if (!parseArg(arg, "I", &value)) | |
{ | |
INT_CALL(self->object.setNumSamples(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "numSamples", arg); | |
return -1; | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/executioner/DefaultOpExecutioner.h" | |
#include "org/nd4j/linalg/api/ops/Op.h" | |
#include "org/nd4j/linalg/api/ops/ScalarOp.h" | |
#include "org/nd4j/linalg/cache/TADManager.h" | |
#include "java/lang/Class.h" | |
#include "org/nd4j/linalg/api/ops/MetaOp.h" | |
#include "org/nd4j/linalg/api/ops/executioner/OpExecutioner.h" | |
#include "org/nd4j/linalg/api/ops/GridOp.h" | |
#include "org/nd4j/linalg/api/rng/Random.h" | |
#include "org/nd4j/linalg/api/ops/RandomOp.h" | |
#include "org/nd4j/linalg/api/ops/aggregates/Aggregate.h" | |
#include "org/nd4j/linalg/api/ops/impl/accum/Variance.h" | |
#include "org/nd4j/linalg/api/ops/Accumulation.h" | |
#include "org/nd4j/linalg/api/ops/TransformOp.h" | |
#include "org/nd4j/linalg/api/ops/aggregates/Batch.h" | |
#include "org/nd4j/linalg/api/ops/executioner/OpExecutioner$ProfilingMode.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "org/nd4j/linalg/api/ops/executioner/OpExecutioner$ExecutionMode.h" | |
#include "org/nd4j/linalg/api/ops/BroadcastOp.h" | |
#include "org/nd4j/linalg/api/ops/IndexAccumulation.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace executioner { | |
::java::lang::Class *DefaultOpExecutioner::class$ = NULL; | |
jmethodID *DefaultOpExecutioner::mids$ = NULL; | |
bool DefaultOpExecutioner::live$ = false; | |
jclass DefaultOpExecutioner::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/executioner/DefaultOpExecutioner"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_exec_64fe694f] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/Op;)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_exec_f37a8916] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/RandomOp;)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_exec_3805a034] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/aggregates/Batch;)V"); | |
mids$[mid_exec_3efeb0db] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/aggregates/Aggregate;)V"); | |
mids$[mid_exec_0f83ee5e] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/GridOp;)V"); | |
mids$[mid_exec_ccee11cf] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/MetaOp;)V"); | |
mids$[mid_exec_b4ba1ae1] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/Op;[I)Lorg/nd4j/linalg/api/ops/Op;"); | |
mids$[mid_exec_733ffd1b] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/BroadcastOp;[I)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_exec_0593eb89] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/Accumulation;[I)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_exec_d8011623] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/RandomOp;Lorg/nd4j/linalg/api/rng/Random;)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_exec_9d964e58] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/IndexAccumulation;[I)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_exec_4c1aee48] = env->getMethodID(cls, "exec", "(Lorg/nd4j/linalg/api/ops/impl/accum/Variance;Z[I)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_execAndReturn_2f5a4aa7] = env->getMethodID(cls, "execAndReturn", "(Lorg/nd4j/linalg/api/ops/Accumulation;)Lorg/nd4j/linalg/api/ops/Accumulation;"); | |
mids$[mid_execAndReturn_84da1f2b] = env->getMethodID(cls, "execAndReturn", "(Lorg/nd4j/linalg/api/ops/ScalarOp;)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_execAndReturn_143e0017] = env->getMethodID(cls, "execAndReturn", "(Lorg/nd4j/linalg/api/ops/IndexAccumulation;)Lorg/nd4j/linalg/api/ops/IndexAccumulation;"); | |
mids$[mid_execAndReturn_83b67b81] = env->getMethodID(cls, "execAndReturn", "(Lorg/nd4j/linalg/api/ops/Op;)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_execAndReturn_5487e6b5] = env->getMethodID(cls, "execAndReturn", "(Lorg/nd4j/linalg/api/ops/BroadcastOp;)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_execAndReturn_ab0b64a4] = env->getMethodID(cls, "execAndReturn", "(Lorg/nd4j/linalg/api/ops/TransformOp;)Lorg/nd4j/linalg/api/ndarray/INDArray;"); | |
mids$[mid_execAndReturn_b7f12da6] = env->getMethodID(cls, "execAndReturn", "(Lorg/nd4j/linalg/api/ops/impl/accum/Variance;Z)Lorg/nd4j/linalg/api/ops/Accumulation;"); | |
mids$[mid_executionMode_5f87efe8] = env->getMethodID(cls, "executionMode", "()Lorg/nd4j/linalg/api/ops/executioner/OpExecutioner$ExecutionMode;"); | |
mids$[mid_getProfilingMode_8e78f68c] = env->getMethodID(cls, "getProfilingMode", "()Lorg/nd4j/linalg/api/ops/executioner/OpExecutioner$ProfilingMode;"); | |
mids$[mid_getTADManager_7545d5dd] = env->getMethodID(cls, "getTADManager", "()Lorg/nd4j/linalg/cache/TADManager;"); | |
mids$[mid_iterateOverAllColumns_21aaa252] = env->getMethodID(cls, "iterateOverAllColumns", "(Lorg/nd4j/linalg/api/ops/Op;)V"); | |
mids$[mid_iterateOverAllRows_21aaa252] = env->getMethodID(cls, "iterateOverAllRows", "(Lorg/nd4j/linalg/api/ops/Op;)V"); | |
mids$[mid_printEnvironmentInformation_54c6a166] = env->getMethodID(cls, "printEnvironmentInformation", "()V"); | |
mids$[mid_profilingHookIn_21aaa24e] = env->getMethodID(cls, "profilingHookIn", "(Lorg/nd4j/linalg/api/ops/Op;)J"); | |
mids$[mid_profilingHookOut_7fa23733] = env->getMethodID(cls, "profilingHookOut", "(Lorg/nd4j/linalg/api/ops/Op;J)V"); | |
mids$[mid_setExecutionMode_ae404571] = env->getMethodID(cls, "setExecutionMode", "(Lorg/nd4j/linalg/api/ops/executioner/OpExecutioner$ExecutionMode;)V"); | |
mids$[mid_setProfilingMode_9733c239] = env->getMethodID(cls, "setProfilingMode", "(Lorg/nd4j/linalg/api/ops/executioner/OpExecutioner$ProfilingMode;)V"); | |
mids$[mid_checkForCompression_21aaa252] = env->getMethodID(cls, "checkForCompression", "(Lorg/nd4j/linalg/api/ops/Op;)V"); | |
mids$[mid_interceptIntDataType_21aaa252] = env->getMethodID(cls, "interceptIntDataType", "(Lorg/nd4j/linalg/api/ops/Op;)V"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
DefaultOpExecutioner::DefaultOpExecutioner() : ::java::lang::Object(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
::org::nd4j::linalg::api::ops::Op DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::Op & a0) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_exec_64fe694f], a0.this$)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::RandomOp & a0) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_exec_f37a8916], a0.this$)); | |
} | |
void DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::aggregates::Batch & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_3805a034], a0.this$); | |
} | |
void DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::aggregates::Aggregate & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_3efeb0db], a0.this$); | |
} | |
void DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::GridOp & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_0f83ee5e], a0.this$); | |
} | |
void DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::MetaOp & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_exec_ccee11cf], a0.this$); | |
} | |
::org::nd4j::linalg::api::ops::Op DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::Op & a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Op(env->callObjectMethod(this$, mids$[mid_exec_b4ba1ae1], a0.this$, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::BroadcastOp & a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_exec_733ffd1b], a0.this$, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::Accumulation & a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_exec_0593eb89], a0.this$, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::RandomOp & a0, const ::org::nd4j::linalg::api::rng::Random & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_exec_d8011623], a0.this$, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::IndexAccumulation & a0, const JArray< jint > & a1) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_exec_9d964e58], a0.this$, a1.this$)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray DefaultOpExecutioner::exec(const ::org::nd4j::linalg::api::ops::impl::accum::Variance & a0, jboolean a1, const JArray< jint > & a2) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_exec_4c1aee48], a0.this$, a1, a2.this$)); | |
} | |
::org::nd4j::linalg::api::ops::Accumulation DefaultOpExecutioner::execAndReturn(const ::org::nd4j::linalg::api::ops::Accumulation & a0) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Accumulation(env->callObjectMethod(this$, mids$[mid_execAndReturn_2f5a4aa7], a0.this$)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray DefaultOpExecutioner::execAndReturn(const ::org::nd4j::linalg::api::ops::ScalarOp & a0) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_execAndReturn_84da1f2b], a0.this$)); | |
} | |
::org::nd4j::linalg::api::ops::IndexAccumulation DefaultOpExecutioner::execAndReturn(const ::org::nd4j::linalg::api::ops::IndexAccumulation & a0) const | |
{ | |
return ::org::nd4j::linalg::api::ops::IndexAccumulation(env->callObjectMethod(this$, mids$[mid_execAndReturn_143e0017], a0.this$)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray DefaultOpExecutioner::execAndReturn(const ::org::nd4j::linalg::api::ops::Op & a0) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_execAndReturn_83b67b81], a0.this$)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray DefaultOpExecutioner::execAndReturn(const ::org::nd4j::linalg::api::ops::BroadcastOp & a0) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_execAndReturn_5487e6b5], a0.this$)); | |
} | |
::org::nd4j::linalg::api::ndarray::INDArray DefaultOpExecutioner::execAndReturn(const ::org::nd4j::linalg::api::ops::TransformOp & a0) const | |
{ | |
return ::org::nd4j::linalg::api::ndarray::INDArray(env->callObjectMethod(this$, mids$[mid_execAndReturn_ab0b64a4], a0.this$)); | |
} | |
::org::nd4j::linalg::api::ops::Accumulation DefaultOpExecutioner::execAndReturn(const ::org::nd4j::linalg::api::ops::impl::accum::Variance & a0, jboolean a1) const | |
{ | |
return ::org::nd4j::linalg::api::ops::Accumulation(env->callObjectMethod(this$, mids$[mid_execAndReturn_b7f12da6], a0.this$, a1)); | |
} | |
::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ExecutionMode DefaultOpExecutioner::executionMode() const | |
{ | |
return ::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ExecutionMode(env->callObjectMethod(this$, mids$[mid_executionMode_5f87efe8])); | |
} | |
::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ProfilingMode DefaultOpExecutioner::getProfilingMode() const | |
{ | |
return ::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ProfilingMode(env->callObjectMethod(this$, mids$[mid_getProfilingMode_8e78f68c])); | |
} | |
::org::nd4j::linalg::cache::TADManager DefaultOpExecutioner::getTADManager() const | |
{ | |
return ::org::nd4j::linalg::cache::TADManager(env->callObjectMethod(this$, mids$[mid_getTADManager_7545d5dd])); | |
} | |
void DefaultOpExecutioner::iterateOverAllColumns(const ::org::nd4j::linalg::api::ops::Op & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_iterateOverAllColumns_21aaa252], a0.this$); | |
} | |
void DefaultOpExecutioner::iterateOverAllRows(const ::org::nd4j::linalg::api::ops::Op & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_iterateOverAllRows_21aaa252], a0.this$); | |
} | |
void DefaultOpExecutioner::printEnvironmentInformation() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_printEnvironmentInformation_54c6a166]); | |
} | |
jlong DefaultOpExecutioner::profilingHookIn(const ::org::nd4j::linalg::api::ops::Op & a0) const | |
{ | |
return env->callLongMethod(this$, mids$[mid_profilingHookIn_21aaa24e], a0.this$); | |
} | |
void DefaultOpExecutioner::profilingHookOut(const ::org::nd4j::linalg::api::ops::Op & a0, jlong a1) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_profilingHookOut_7fa23733], a0.this$, a1); | |
} | |
void DefaultOpExecutioner::setExecutionMode(const ::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ExecutionMode & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setExecutionMode_ae404571], a0.this$); | |
} | |
void DefaultOpExecutioner::setProfilingMode(const ::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ProfilingMode & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setProfilingMode_9733c239], a0.this$); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace executioner { | |
static PyObject *t_DefaultOpExecutioner_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_DefaultOpExecutioner_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_DefaultOpExecutioner_init_(t_DefaultOpExecutioner *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_DefaultOpExecutioner_exec(t_DefaultOpExecutioner *self, PyObject *args); | |
static PyObject *t_DefaultOpExecutioner_execAndReturn(t_DefaultOpExecutioner *self, PyObject *args); | |
static PyObject *t_DefaultOpExecutioner_executionMode(t_DefaultOpExecutioner *self); | |
static PyObject *t_DefaultOpExecutioner_getProfilingMode(t_DefaultOpExecutioner *self); | |
static PyObject *t_DefaultOpExecutioner_getTADManager(t_DefaultOpExecutioner *self); | |
static PyObject *t_DefaultOpExecutioner_iterateOverAllColumns(t_DefaultOpExecutioner *self, PyObject *arg); | |
static PyObject *t_DefaultOpExecutioner_iterateOverAllRows(t_DefaultOpExecutioner *self, PyObject *arg); | |
static PyObject *t_DefaultOpExecutioner_printEnvironmentInformation(t_DefaultOpExecutioner *self); | |
static PyObject *t_DefaultOpExecutioner_profilingHookIn(t_DefaultOpExecutioner *self, PyObject *arg); | |
static PyObject *t_DefaultOpExecutioner_profilingHookOut(t_DefaultOpExecutioner *self, PyObject *args); | |
static PyObject *t_DefaultOpExecutioner_setExecutionMode(t_DefaultOpExecutioner *self, PyObject *arg); | |
static PyObject *t_DefaultOpExecutioner_setProfilingMode(t_DefaultOpExecutioner *self, PyObject *arg); | |
static PyObject *t_DefaultOpExecutioner_get__profilingMode(t_DefaultOpExecutioner *self, void *data); | |
static int t_DefaultOpExecutioner_set__profilingMode(t_DefaultOpExecutioner *self, PyObject *arg, void *data); | |
static PyObject *t_DefaultOpExecutioner_get__tADManager(t_DefaultOpExecutioner *self, void *data); | |
static PyGetSetDef t_DefaultOpExecutioner__fields_[] = { | |
DECLARE_GETSET_FIELD(t_DefaultOpExecutioner, profilingMode), | |
DECLARE_GET_FIELD(t_DefaultOpExecutioner, tADManager), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_DefaultOpExecutioner__methods_[] = { | |
DECLARE_METHOD(t_DefaultOpExecutioner, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_DefaultOpExecutioner, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_DefaultOpExecutioner, exec, METH_VARARGS), | |
DECLARE_METHOD(t_DefaultOpExecutioner, execAndReturn, METH_VARARGS), | |
DECLARE_METHOD(t_DefaultOpExecutioner, executionMode, METH_NOARGS), | |
DECLARE_METHOD(t_DefaultOpExecutioner, getProfilingMode, METH_NOARGS), | |
DECLARE_METHOD(t_DefaultOpExecutioner, getTADManager, METH_NOARGS), | |
DECLARE_METHOD(t_DefaultOpExecutioner, iterateOverAllColumns, METH_O), | |
DECLARE_METHOD(t_DefaultOpExecutioner, iterateOverAllRows, METH_O), | |
DECLARE_METHOD(t_DefaultOpExecutioner, printEnvironmentInformation, METH_NOARGS), | |
DECLARE_METHOD(t_DefaultOpExecutioner, profilingHookIn, METH_O), | |
DECLARE_METHOD(t_DefaultOpExecutioner, profilingHookOut, METH_VARARGS), | |
DECLARE_METHOD(t_DefaultOpExecutioner, setExecutionMode, METH_O), | |
DECLARE_METHOD(t_DefaultOpExecutioner, setProfilingMode, METH_O), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(DefaultOpExecutioner, t_DefaultOpExecutioner, ::java::lang::Object, DefaultOpExecutioner, t_DefaultOpExecutioner_init_, 0, 0, t_DefaultOpExecutioner__fields_, 0, 0); | |
void t_DefaultOpExecutioner::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(DefaultOpExecutioner), module, "DefaultOpExecutioner", 0); | |
} | |
void t_DefaultOpExecutioner::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(DefaultOpExecutioner).tp_dict, "class_", make_descriptor(DefaultOpExecutioner::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(DefaultOpExecutioner).tp_dict, "wrapfn_", make_descriptor(t_DefaultOpExecutioner::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(DefaultOpExecutioner).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_DefaultOpExecutioner_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, DefaultOpExecutioner::initializeClass, 1))) | |
return NULL; | |
return t_DefaultOpExecutioner::wrap_Object(DefaultOpExecutioner(((t_DefaultOpExecutioner *) arg)->object.this$)); | |
} | |
static PyObject *t_DefaultOpExecutioner_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, DefaultOpExecutioner::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_DefaultOpExecutioner_init_(t_DefaultOpExecutioner *self, PyObject *args, PyObject *kwds) | |
{ | |
DefaultOpExecutioner object((jobject) NULL); | |
INT_CALL(object = DefaultOpExecutioner()); | |
self->object = object; | |
return 0; | |
} | |
static PyObject *t_DefaultOpExecutioner_exec(t_DefaultOpExecutioner *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.exec(a0)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::RandomOp a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::RandomOp::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.exec(a0)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::aggregates::Batch a0((jobject) NULL); | |
PyTypeObject **p0; | |
if (!parseArgs(args, "K", ::org::nd4j::linalg::api::ops::aggregates::Batch::initializeClass, &a0, &p0, ::org::nd4j::linalg::api::ops::aggregates::t_Batch::parameters_)) | |
{ | |
OBJ_CALL(self->object.exec(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::aggregates::Aggregate a0((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::aggregates::Aggregate::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.exec(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::GridOp a0((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::GridOp::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.exec(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::MetaOp a0((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::MetaOp::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.exec(a0)); | |
Py_RETURN_NONE; | |
} | |
} | |
break; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Op result((jobject) NULL); | |
if (!parseArgs(args, "k[I", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.exec(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Op::wrap_Object(result); | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::BroadcastOp a0((jobject) NULL); | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "k[I", ::org::nd4j::linalg::api::ops::BroadcastOp::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.exec(a0, a1)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::Accumulation a0((jobject) NULL); | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "k[I", ::org::nd4j::linalg::api::ops::Accumulation::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.exec(a0, a1)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::RandomOp a0((jobject) NULL); | |
::org::nd4j::linalg::api::rng::Random a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "kk", ::org::nd4j::linalg::api::ops::RandomOp::initializeClass, ::org::nd4j::linalg::api::rng::Random::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.exec(a0, a1)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::IndexAccumulation a0((jobject) NULL); | |
JArray< jint > a1((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "k[I", ::org::nd4j::linalg::api::ops::IndexAccumulation::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.exec(a0, a1)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
} | |
break; | |
case 3: | |
{ | |
::org::nd4j::linalg::api::ops::impl::accum::Variance a0((jobject) NULL); | |
jboolean a1; | |
JArray< jint > a2((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "kZ[I", ::org::nd4j::linalg::api::ops::impl::accum::Variance::initializeClass, &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(result = self->object.exec(a0, a1, a2)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "exec", args); | |
return NULL; | |
} | |
static PyObject *t_DefaultOpExecutioner_execAndReturn(t_DefaultOpExecutioner *self, PyObject *args) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 1: | |
{ | |
::org::nd4j::linalg::api::ops::Accumulation a0((jobject) NULL); | |
::org::nd4j::linalg::api::ops::Accumulation result((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::Accumulation::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.execAndReturn(a0)); | |
return ::org::nd4j::linalg::api::ops::t_Accumulation::wrap_Object(result); | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::ScalarOp a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::ScalarOp::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.execAndReturn(a0)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::IndexAccumulation a0((jobject) NULL); | |
::org::nd4j::linalg::api::ops::IndexAccumulation result((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::IndexAccumulation::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.execAndReturn(a0)); | |
return ::org::nd4j::linalg::api::ops::t_IndexAccumulation::wrap_Object(result); | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.execAndReturn(a0)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::BroadcastOp a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::BroadcastOp::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.execAndReturn(a0)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
} | |
{ | |
::org::nd4j::linalg::api::ops::TransformOp a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray result((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::nd4j::linalg::api::ops::TransformOp::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.execAndReturn(a0)); | |
return ::org::nd4j::linalg::api::ndarray::t_INDArray::wrap_Object(result); | |
} | |
} | |
break; | |
case 2: | |
{ | |
::org::nd4j::linalg::api::ops::impl::accum::Variance a0((jobject) NULL); | |
jboolean a1; | |
::org::nd4j::linalg::api::ops::Accumulation result((jobject) NULL); | |
if (!parseArgs(args, "kZ", ::org::nd4j::linalg::api::ops::impl::accum::Variance::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.execAndReturn(a0, a1)); | |
return ::org::nd4j::linalg::api::ops::t_Accumulation::wrap_Object(result); | |
} | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "execAndReturn", args); | |
return NULL; | |
} | |
static PyObject *t_DefaultOpExecutioner_executionMode(t_DefaultOpExecutioner *self) | |
{ | |
::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ExecutionMode result((jobject) NULL); | |
OBJ_CALL(result = self->object.executionMode()); | |
return ::org::nd4j::linalg::api::ops::executioner::t_OpExecutioner$ExecutionMode::wrap_Object(result); | |
} | |
static PyObject *t_DefaultOpExecutioner_getProfilingMode(t_DefaultOpExecutioner *self) | |
{ | |
::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ProfilingMode result((jobject) NULL); | |
OBJ_CALL(result = self->object.getProfilingMode()); | |
return ::org::nd4j::linalg::api::ops::executioner::t_OpExecutioner$ProfilingMode::wrap_Object(result); | |
} | |
static PyObject *t_DefaultOpExecutioner_getTADManager(t_DefaultOpExecutioner *self) | |
{ | |
::org::nd4j::linalg::cache::TADManager result((jobject) NULL); | |
OBJ_CALL(result = self->object.getTADManager()); | |
return ::org::nd4j::linalg::cache::t_TADManager::wrap_Object(result); | |
} | |
static PyObject *t_DefaultOpExecutioner_iterateOverAllColumns(t_DefaultOpExecutioner *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.iterateOverAllColumns(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "iterateOverAllColumns", arg); | |
return NULL; | |
} | |
static PyObject *t_DefaultOpExecutioner_iterateOverAllRows(t_DefaultOpExecutioner *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.iterateOverAllRows(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "iterateOverAllRows", arg); | |
return NULL; | |
} | |
static PyObject *t_DefaultOpExecutioner_printEnvironmentInformation(t_DefaultOpExecutioner *self) | |
{ | |
OBJ_CALL(self->object.printEnvironmentInformation()); | |
Py_RETURN_NONE; | |
} | |
static PyObject *t_DefaultOpExecutioner_profilingHookIn(t_DefaultOpExecutioner *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
jlong result; | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.profilingHookIn(a0)); | |
return PyLong_FromLongLong((PY_LONG_LONG) result); | |
} | |
PyErr_SetArgsError((PyObject *) self, "profilingHookIn", arg); | |
return NULL; | |
} | |
static PyObject *t_DefaultOpExecutioner_profilingHookOut(t_DefaultOpExecutioner *self, PyObject *args) | |
{ | |
::org::nd4j::linalg::api::ops::Op a0((jobject) NULL); | |
jlong a1; | |
if (!parseArgs(args, "kJ", ::org::nd4j::linalg::api::ops::Op::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(self->object.profilingHookOut(a0, a1)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "profilingHookOut", args); | |
return NULL; | |
} | |
static PyObject *t_DefaultOpExecutioner_setExecutionMode(t_DefaultOpExecutioner *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ExecutionMode a0((jobject) NULL); | |
PyTypeObject **p0; | |
if (!parseArg(arg, "K", ::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ExecutionMode::initializeClass, &a0, &p0, ::org::nd4j::linalg::api::ops::executioner::t_OpExecutioner$ExecutionMode::parameters_)) | |
{ | |
OBJ_CALL(self->object.setExecutionMode(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setExecutionMode", arg); | |
return NULL; | |
} | |
static PyObject *t_DefaultOpExecutioner_setProfilingMode(t_DefaultOpExecutioner *self, PyObject *arg) | |
{ | |
::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ProfilingMode a0((jobject) NULL); | |
PyTypeObject **p0; | |
if (!parseArg(arg, "K", ::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ProfilingMode::initializeClass, &a0, &p0, ::org::nd4j::linalg::api::ops::executioner::t_OpExecutioner$ProfilingMode::parameters_)) | |
{ | |
OBJ_CALL(self->object.setProfilingMode(a0)); | |
Py_RETURN_NONE; | |
} | |
PyErr_SetArgsError((PyObject *) self, "setProfilingMode", arg); | |
return NULL; | |
} | |
static PyObject *t_DefaultOpExecutioner_get__profilingMode(t_DefaultOpExecutioner *self, void *data) | |
{ | |
::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ProfilingMode value((jobject) NULL); | |
OBJ_CALL(value = self->object.getProfilingMode()); | |
return ::org::nd4j::linalg::api::ops::executioner::t_OpExecutioner$ProfilingMode::wrap_Object(value); | |
} | |
static int t_DefaultOpExecutioner_set__profilingMode(t_DefaultOpExecutioner *self, PyObject *arg, void *data) | |
{ | |
{ | |
::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ProfilingMode value((jobject) NULL); | |
if (!parseArg(arg, "k", ::org::nd4j::linalg::api::ops::executioner::OpExecutioner$ProfilingMode::initializeClass, &value)) | |
{ | |
INT_CALL(self->object.setProfilingMode(value)); | |
return 0; | |
} | |
} | |
PyErr_SetArgsError((PyObject *) self, "profilingMode", arg); | |
return -1; | |
} | |
static PyObject *t_DefaultOpExecutioner_get__tADManager(t_DefaultOpExecutioner *self, void *data) | |
{ | |
::org::nd4j::linalg::cache::TADManager value((jobject) NULL); | |
OBJ_CALL(value = self->object.getTADManager()); | |
return ::org::nd4j::linalg::cache::t_TADManager::wrap_Object(value); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/linalg/api/ops/aggregates/impl/AggregateAxpy.h" | |
#include "org/nd4j/linalg/api/ndarray/INDArray.h" | |
#include "java/lang/String.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace aggregates { | |
namespace impl { | |
::java::lang::Class *AggregateAxpy::class$ = NULL; | |
jmethodID *AggregateAxpy::mids$ = NULL; | |
bool AggregateAxpy::live$ = false; | |
jclass AggregateAxpy::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/linalg/api/ops/aggregates/impl/AggregateAxpy"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_906ceca1] = env->getMethodID(cls, "<init>", "(Lorg/nd4j/linalg/api/ndarray/INDArray;Lorg/nd4j/linalg/api/ndarray/INDArray;D)V"); | |
mids$[mid_getSharedMemorySize_54c6a179] = env->getMethodID(cls, "getSharedMemorySize", "()I"); | |
mids$[mid_getThreadsPerInstance_54c6a179] = env->getMethodID(cls, "getThreadsPerInstance", "()I"); | |
mids$[mid_maxArguments_54c6a179] = env->getMethodID(cls, "maxArguments", "()I"); | |
mids$[mid_maxIndexArguments_54c6a179] = env->getMethodID(cls, "maxIndexArguments", "()I"); | |
mids$[mid_maxIntArraySize_54c6a179] = env->getMethodID(cls, "maxIntArraySize", "()I"); | |
mids$[mid_maxIntArrays_54c6a179] = env->getMethodID(cls, "maxIntArrays", "()I"); | |
mids$[mid_maxRealArguments_54c6a179] = env->getMethodID(cls, "maxRealArguments", "()I"); | |
mids$[mid_maxShapes_54c6a179] = env->getMethodID(cls, "maxShapes", "()I"); | |
mids$[mid_name_14c7b5c5] = env->getMethodID(cls, "name", "()Ljava/lang/String;"); | |
mids$[mid_opNum_54c6a179] = env->getMethodID(cls, "opNum", "()I"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
AggregateAxpy::AggregateAxpy(const ::org::nd4j::linalg::api::ndarray::INDArray & a0, const ::org::nd4j::linalg::api::ndarray::INDArray & a1, jdouble a2) : ::org::nd4j::linalg::api::ops::aggregates::BaseAggregate(env->newObject(initializeClass, &mids$, mid_init$_906ceca1, a0.this$, a1.this$, a2)) {} | |
jint AggregateAxpy::getSharedMemorySize() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getSharedMemorySize_54c6a179]); | |
} | |
jint AggregateAxpy::getThreadsPerInstance() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getThreadsPerInstance_54c6a179]); | |
} | |
jint AggregateAxpy::maxArguments() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxArguments_54c6a179]); | |
} | |
jint AggregateAxpy::maxIndexArguments() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxIndexArguments_54c6a179]); | |
} | |
jint AggregateAxpy::maxIntArraySize() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxIntArraySize_54c6a179]); | |
} | |
jint AggregateAxpy::maxIntArrays() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxIntArrays_54c6a179]); | |
} | |
jint AggregateAxpy::maxRealArguments() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxRealArguments_54c6a179]); | |
} | |
jint AggregateAxpy::maxShapes() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_maxShapes_54c6a179]); | |
} | |
::java::lang::String AggregateAxpy::name() const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_name_14c7b5c5])); | |
} | |
jint AggregateAxpy::opNum() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_opNum_54c6a179]); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace linalg { | |
namespace api { | |
namespace ops { | |
namespace aggregates { | |
namespace impl { | |
static PyObject *t_AggregateAxpy_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_AggregateAxpy_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_AggregateAxpy_init_(t_AggregateAxpy *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_AggregateAxpy_getSharedMemorySize(t_AggregateAxpy *self, PyObject *args); | |
static PyObject *t_AggregateAxpy_getThreadsPerInstance(t_AggregateAxpy *self, PyObject *args); | |
static PyObject *t_AggregateAxpy_maxArguments(t_AggregateAxpy *self, PyObject *args); | |
static PyObject *t_AggregateAxpy_maxIndexArguments(t_AggregateAxpy *self, PyObject *args); | |
static PyObject *t_AggregateAxpy_maxIntArraySize(t_AggregateAxpy *self, PyObject *args); | |
static PyObject *t_AggregateAxpy_maxIntArrays(t_AggregateAxpy *self, PyObject *args); | |
static PyObject *t_AggregateAxpy_maxRealArguments(t_AggregateAxpy *self, PyObject *args); | |
static PyObject *t_AggregateAxpy_maxShapes(t_AggregateAxpy *self, PyObject *args); | |
static PyObject *t_AggregateAxpy_name(t_AggregateAxpy *self, PyObject *args); | |
static PyObject *t_AggregateAxpy_opNum(t_AggregateAxpy *self, PyObject *args); | |
static PyObject *t_AggregateAxpy_get__sharedMemorySize(t_AggregateAxpy *self, void *data); | |
static PyObject *t_AggregateAxpy_get__threadsPerInstance(t_AggregateAxpy *self, void *data); | |
static PyGetSetDef t_AggregateAxpy__fields_[] = { | |
DECLARE_GET_FIELD(t_AggregateAxpy, sharedMemorySize), | |
DECLARE_GET_FIELD(t_AggregateAxpy, threadsPerInstance), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_AggregateAxpy__methods_[] = { | |
DECLARE_METHOD(t_AggregateAxpy, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_AggregateAxpy, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_AggregateAxpy, getSharedMemorySize, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateAxpy, getThreadsPerInstance, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateAxpy, maxArguments, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateAxpy, maxIndexArguments, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateAxpy, maxIntArraySize, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateAxpy, maxIntArrays, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateAxpy, maxRealArguments, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateAxpy, maxShapes, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateAxpy, name, METH_VARARGS), | |
DECLARE_METHOD(t_AggregateAxpy, opNum, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(AggregateAxpy, t_AggregateAxpy, ::org::nd4j::linalg::api::ops::aggregates::BaseAggregate, AggregateAxpy, t_AggregateAxpy_init_, 0, 0, t_AggregateAxpy__fields_, 0, 0); | |
void t_AggregateAxpy::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(AggregateAxpy), module, "AggregateAxpy", 0); | |
} | |
void t_AggregateAxpy::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(AggregateAxpy).tp_dict, "class_", make_descriptor(AggregateAxpy::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(AggregateAxpy).tp_dict, "wrapfn_", make_descriptor(t_AggregateAxpy::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(AggregateAxpy).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_AggregateAxpy_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, AggregateAxpy::initializeClass, 1))) | |
return NULL; | |
return t_AggregateAxpy::wrap_Object(AggregateAxpy(((t_AggregateAxpy *) arg)->object.this$)); | |
} | |
static PyObject *t_AggregateAxpy_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, AggregateAxpy::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_AggregateAxpy_init_(t_AggregateAxpy *self, PyObject *args, PyObject *kwds) | |
{ | |
::org::nd4j::linalg::api::ndarray::INDArray a0((jobject) NULL); | |
::org::nd4j::linalg::api::ndarray::INDArray a1((jobject) NULL); | |
jdouble a2; | |
AggregateAxpy object((jobject) NULL); | |
if (!parseArgs(args, "kkD", ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, ::org::nd4j::linalg::api::ndarray::INDArray::initializeClass, &a0, &a1, &a2)) | |
{ | |
INT_CALL(object = AggregateAxpy(a0, a1, a2)); | |
self->object = object; | |
} | |
else | |
{ | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_AggregateAxpy_getSharedMemorySize(t_AggregateAxpy *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getSharedMemorySize()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateAxpy), (PyObject *) self, "getSharedMemorySize", args, 2); | |
} | |
static PyObject *t_AggregateAxpy_getThreadsPerInstance(t_AggregateAxpy *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getThreadsPerInstance()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateAxpy), (PyObject *) self, "getThreadsPerInstance", args, 2); | |
} | |
static PyObject *t_AggregateAxpy_maxArguments(t_AggregateAxpy *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxArguments()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateAxpy), (PyObject *) self, "maxArguments", args, 2); | |
} | |
static PyObject *t_AggregateAxpy_maxIndexArguments(t_AggregateAxpy *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxIndexArguments()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateAxpy), (PyObject *) self, "maxIndexArguments", args, 2); | |
} | |
static PyObject *t_AggregateAxpy_maxIntArraySize(t_AggregateAxpy *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxIntArraySize()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateAxpy), (PyObject *) self, "maxIntArraySize", args, 2); | |
} | |
static PyObject *t_AggregateAxpy_maxIntArrays(t_AggregateAxpy *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxIntArrays()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateAxpy), (PyObject *) self, "maxIntArrays", args, 2); | |
} | |
static PyObject *t_AggregateAxpy_maxRealArguments(t_AggregateAxpy *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxRealArguments()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateAxpy), (PyObject *) self, "maxRealArguments", args, 2); | |
} | |
static PyObject *t_AggregateAxpy_maxShapes(t_AggregateAxpy *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.maxShapes()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateAxpy), (PyObject *) self, "maxShapes", args, 2); | |
} | |
static PyObject *t_AggregateAxpy_name(t_AggregateAxpy *self, PyObject *args) | |
{ | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.name()); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(AggregateAxpy), (PyObject *) self, "name", args, 2); | |
} | |
static PyObject *t_AggregateAxpy_opNum(t_AggregateAxpy *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.opNum()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(AggregateAxpy), (PyObject *) self, "opNum", args, 2); | |
} | |
static PyObject *t_AggregateAxpy_get__sharedMemorySize(t_AggregateAxpy *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getSharedMemorySize()); | |
return PyInt_FromLong((long) value); | |
} | |
static PyObject *t_AggregateAxpy_get__threadsPerInstance(t_AggregateAxpy *self, void *data) | |
{ | |
jint value; | |
OBJ_CALL(value = self->object.getThreadsPerInstance()); | |
return PyInt_FromLong((long) value); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
#include <jni.h> | |
#include "JCCEnv.h" | |
#include "org/nd4j/nativeblas/Nd4jCpu$NativeOps.h" | |
#include "java/lang/String.h" | |
#include "org/bytedeco/javacpp/Pointer.h" | |
#include "java/lang/Class.h" | |
#include "JArray.h" | |
namespace org { | |
namespace nd4j { | |
namespace nativeblas { | |
::java::lang::Class *Nd4jCpu$NativeOps::class$ = NULL; | |
jmethodID *Nd4jCpu$NativeOps::mids$ = NULL; | |
bool Nd4jCpu$NativeOps::live$ = false; | |
jclass Nd4jCpu$NativeOps::initializeClass(bool getOnly) | |
{ | |
if (getOnly) | |
return (jclass) (live$ ? class$->this$ : NULL); | |
if (class$ == NULL) | |
{ | |
jclass cls = (jclass) env->findClass("org/nd4j/nativeblas/Nd4jCpu$NativeOps"); | |
mids$ = new jmethodID[max_mid]; | |
mids$[mid_init$_54c6a166] = env->getMethodID(cls, "<init>", "()V"); | |
mids$[mid_init$_0ee6df2f] = env->getMethodID(cls, "<init>", "(J)V"); | |
mids$[mid_init$_5cd25cf7] = env->getMethodID(cls, "<init>", "(Lorg/bytedeco/javacpp/Pointer;)V"); | |
mids$[mid_checkP2P_54c6a166] = env->getMethodID(cls, "checkP2P", "()V"); | |
mids$[mid_createContext_3523d642] = env->getMethodID(cls, "createContext", "()Lorg/bytedeco/javacpp/Pointer;"); | |
mids$[mid_createEvent_3523d642] = env->getMethodID(cls, "createEvent", "()Lorg/bytedeco/javacpp/Pointer;"); | |
mids$[mid_createStream_3523d642] = env->getMethodID(cls, "createStream", "()Lorg/bytedeco/javacpp/Pointer;"); | |
mids$[mid_destroyEvent_5cd25ce8] = env->getMethodID(cls, "destroyEvent", "(Lorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_destroyRandom_5cd25cf7] = env->getMethodID(cls, "destroyRandom", "(Lorg/bytedeco/javacpp/Pointer;)V"); | |
mids$[mid_enableDebugMode_bb0c767f] = env->getMethodID(cls, "enableDebugMode", "(Z)V"); | |
mids$[mid_enableP2P_bb0c767f] = env->getMethodID(cls, "enableP2P", "(Z)V"); | |
mids$[mid_enableVerboseMode_bb0c767f] = env->getMethodID(cls, "enableVerboseMode", "(Z)V"); | |
mids$[mid_eventSynchronize_5cd25ce8] = env->getMethodID(cls, "eventSynchronize", "(Lorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_freeDevice_793bf7b9] = env->getMethodID(cls, "freeDevice", "(Lorg/bytedeco/javacpp/Pointer;Lorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_freeHost_5cd25ce8] = env->getMethodID(cls, "freeHost", "(Lorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_getAvailableDevices_54c6a179] = env->getMethodID(cls, "getAvailableDevices", "()I"); | |
mids$[mid_getConstantSpace_3523d642] = env->getMethodID(cls, "getConstantSpace", "()Lorg/bytedeco/javacpp/Pointer;"); | |
mids$[mid_getDevice_54c6a179] = env->getMethodID(cls, "getDevice", "()I"); | |
mids$[mid_getDeviceFreeMemory_5cd25ceb] = env->getMethodID(cls, "getDeviceFreeMemory", "(Lorg/bytedeco/javacpp/Pointer;)J"); | |
mids$[mid_getDeviceMajor_5cd25ce8] = env->getMethodID(cls, "getDeviceMajor", "(Lorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_getDeviceMinor_5cd25ce8] = env->getMethodID(cls, "getDeviceMinor", "(Lorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_getDeviceName_51bda6ca] = env->getMethodID(cls, "getDeviceName", "(Lorg/bytedeco/javacpp/Pointer;)Ljava/lang/String;"); | |
mids$[mid_getDeviceTotalMemory_5cd25ceb] = env->getMethodID(cls, "getDeviceTotalMemory", "(Lorg/bytedeco/javacpp/Pointer;)J"); | |
mids$[mid_initializeDevicesAndFunctions_54c6a166] = env->getMethodID(cls, "initializeDevicesAndFunctions", "()V"); | |
mids$[mid_isExperimentalEnabled_54c6a16a] = env->getMethodID(cls, "isExperimentalEnabled", "()Z"); | |
mids$[mid_isP2PAvailable_54c6a16a] = env->getMethodID(cls, "isP2PAvailable", "()Z"); | |
mids$[mid_mallocDevice_b3f9efa4] = env->getMethodID(cls, "mallocDevice", "(JLorg/bytedeco/javacpp/Pointer;I)Lorg/bytedeco/javacpp/Pointer;"); | |
mids$[mid_mallocHost_7311b9ed] = env->getMethodID(cls, "mallocHost", "(JI)Lorg/bytedeco/javacpp/Pointer;"); | |
mids$[mid_memcpy_75acd561] = env->getMethodID(cls, "memcpy", "(Lorg/bytedeco/javacpp/Pointer;Lorg/bytedeco/javacpp/Pointer;JILorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_memcpyAsync_75acd561] = env->getMethodID(cls, "memcpyAsync", "(Lorg/bytedeco/javacpp/Pointer;Lorg/bytedeco/javacpp/Pointer;JILorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_memcpyConstantAsync_5f9065cd] = env->getMethodID(cls, "memcpyConstantAsync", "(JLorg/bytedeco/javacpp/Pointer;JILorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_memset_6b0386b8] = env->getMethodID(cls, "memset", "(Lorg/bytedeco/javacpp/Pointer;IJILorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_memsetAsync_6b0386b8] = env->getMethodID(cls, "memsetAsync", "(Lorg/bytedeco/javacpp/Pointer;IJILorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_ompGetMaxThreads_54c6a179] = env->getMethodID(cls, "ompGetMaxThreads", "()I"); | |
mids$[mid_ompGetNumThreads_54c6a179] = env->getMethodID(cls, "ompGetNumThreads", "()I"); | |
mids$[mid_position_aed9a341] = env->getMethodID(cls, "position", "(J)Lorg/nd4j/nativeblas/Nd4jCpu$NativeOps;"); | |
mids$[mid_registerEvent_793bf7b9] = env->getMethodID(cls, "registerEvent", "(Lorg/bytedeco/javacpp/Pointer;Lorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_setDevice_5cd25ce8] = env->getMethodID(cls, "setDevice", "(Lorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_setElementThreshold_39c7bd3c] = env->getMethodID(cls, "setElementThreshold", "(I)V"); | |
mids$[mid_setGridLimit_39c7bd3c] = env->getMethodID(cls, "setGridLimit", "(I)V"); | |
mids$[mid_setOmpMinThreads_39c7bd3c] = env->getMethodID(cls, "setOmpMinThreads", "(I)V"); | |
mids$[mid_setOmpNumThreads_39c7bd3c] = env->getMethodID(cls, "setOmpNumThreads", "(I)V"); | |
mids$[mid_setTADThreshold_39c7bd3c] = env->getMethodID(cls, "setTADThreshold", "(I)V"); | |
mids$[mid_streamSynchronize_5cd25ce8] = env->getMethodID(cls, "streamSynchronize", "(Lorg/bytedeco/javacpp/Pointer;)I"); | |
mids$[mid_tadOnlyShapeInfo_38d55c44] = env->getMethodID(cls, "tadOnlyShapeInfo", "([I[II[I[I)V"); | |
class$ = (::java::lang::Class *) new JObject(cls); | |
live$ = true; | |
} | |
return (jclass) class$->this$; | |
} | |
Nd4jCpu$NativeOps::Nd4jCpu$NativeOps() : ::org::nd4j::nativeblas::NativeOps(env->newObject(initializeClass, &mids$, mid_init$_54c6a166)) {} | |
Nd4jCpu$NativeOps::Nd4jCpu$NativeOps(jlong a0) : ::org::nd4j::nativeblas::NativeOps(env->newObject(initializeClass, &mids$, mid_init$_0ee6df2f, a0)) {} | |
Nd4jCpu$NativeOps::Nd4jCpu$NativeOps(const ::org::bytedeco::javacpp::Pointer & a0) : ::org::nd4j::nativeblas::NativeOps(env->newObject(initializeClass, &mids$, mid_init$_5cd25cf7, a0.this$)) {} | |
void Nd4jCpu$NativeOps::checkP2P() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_checkP2P_54c6a166]); | |
} | |
::org::bytedeco::javacpp::Pointer Nd4jCpu$NativeOps::createContext() const | |
{ | |
return ::org::bytedeco::javacpp::Pointer(env->callObjectMethod(this$, mids$[mid_createContext_3523d642])); | |
} | |
::org::bytedeco::javacpp::Pointer Nd4jCpu$NativeOps::createEvent() const | |
{ | |
return ::org::bytedeco::javacpp::Pointer(env->callObjectMethod(this$, mids$[mid_createEvent_3523d642])); | |
} | |
::org::bytedeco::javacpp::Pointer Nd4jCpu$NativeOps::createStream() const | |
{ | |
return ::org::bytedeco::javacpp::Pointer(env->callObjectMethod(this$, mids$[mid_createStream_3523d642])); | |
} | |
jint Nd4jCpu$NativeOps::destroyEvent(const ::org::bytedeco::javacpp::Pointer & a0) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_destroyEvent_5cd25ce8], a0.this$); | |
} | |
void Nd4jCpu$NativeOps::destroyRandom(const ::org::bytedeco::javacpp::Pointer & a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_destroyRandom_5cd25cf7], a0.this$); | |
} | |
void Nd4jCpu$NativeOps::enableDebugMode(jboolean a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_enableDebugMode_bb0c767f], a0); | |
} | |
void Nd4jCpu$NativeOps::enableP2P(jboolean a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_enableP2P_bb0c767f], a0); | |
} | |
void Nd4jCpu$NativeOps::enableVerboseMode(jboolean a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_enableVerboseMode_bb0c767f], a0); | |
} | |
jint Nd4jCpu$NativeOps::eventSynchronize(const ::org::bytedeco::javacpp::Pointer & a0) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_eventSynchronize_5cd25ce8], a0.this$); | |
} | |
jint Nd4jCpu$NativeOps::freeDevice(const ::org::bytedeco::javacpp::Pointer & a0, const ::org::bytedeco::javacpp::Pointer & a1) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_freeDevice_793bf7b9], a0.this$, a1.this$); | |
} | |
jint Nd4jCpu$NativeOps::freeHost(const ::org::bytedeco::javacpp::Pointer & a0) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_freeHost_5cd25ce8], a0.this$); | |
} | |
jint Nd4jCpu$NativeOps::getAvailableDevices() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getAvailableDevices_54c6a179]); | |
} | |
::org::bytedeco::javacpp::Pointer Nd4jCpu$NativeOps::getConstantSpace() const | |
{ | |
return ::org::bytedeco::javacpp::Pointer(env->callObjectMethod(this$, mids$[mid_getConstantSpace_3523d642])); | |
} | |
jint Nd4jCpu$NativeOps::getDevice() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getDevice_54c6a179]); | |
} | |
jlong Nd4jCpu$NativeOps::getDeviceFreeMemory(const ::org::bytedeco::javacpp::Pointer & a0) const | |
{ | |
return env->callLongMethod(this$, mids$[mid_getDeviceFreeMemory_5cd25ceb], a0.this$); | |
} | |
jint Nd4jCpu$NativeOps::getDeviceMajor(const ::org::bytedeco::javacpp::Pointer & a0) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getDeviceMajor_5cd25ce8], a0.this$); | |
} | |
jint Nd4jCpu$NativeOps::getDeviceMinor(const ::org::bytedeco::javacpp::Pointer & a0) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_getDeviceMinor_5cd25ce8], a0.this$); | |
} | |
::java::lang::String Nd4jCpu$NativeOps::getDeviceName(const ::org::bytedeco::javacpp::Pointer & a0) const | |
{ | |
return ::java::lang::String(env->callObjectMethod(this$, mids$[mid_getDeviceName_51bda6ca], a0.this$)); | |
} | |
jlong Nd4jCpu$NativeOps::getDeviceTotalMemory(const ::org::bytedeco::javacpp::Pointer & a0) const | |
{ | |
return env->callLongMethod(this$, mids$[mid_getDeviceTotalMemory_5cd25ceb], a0.this$); | |
} | |
void Nd4jCpu$NativeOps::initializeDevicesAndFunctions() const | |
{ | |
env->callVoidMethod(this$, mids$[mid_initializeDevicesAndFunctions_54c6a166]); | |
} | |
jboolean Nd4jCpu$NativeOps::isExperimentalEnabled() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isExperimentalEnabled_54c6a16a]); | |
} | |
jboolean Nd4jCpu$NativeOps::isP2PAvailable() const | |
{ | |
return env->callBooleanMethod(this$, mids$[mid_isP2PAvailable_54c6a16a]); | |
} | |
::org::bytedeco::javacpp::Pointer Nd4jCpu$NativeOps::mallocDevice(jlong a0, const ::org::bytedeco::javacpp::Pointer & a1, jint a2) const | |
{ | |
return ::org::bytedeco::javacpp::Pointer(env->callObjectMethod(this$, mids$[mid_mallocDevice_b3f9efa4], a0, a1.this$, a2)); | |
} | |
::org::bytedeco::javacpp::Pointer Nd4jCpu$NativeOps::mallocHost(jlong a0, jint a1) const | |
{ | |
return ::org::bytedeco::javacpp::Pointer(env->callObjectMethod(this$, mids$[mid_mallocHost_7311b9ed], a0, a1)); | |
} | |
jint Nd4jCpu$NativeOps::memcpy(const ::org::bytedeco::javacpp::Pointer & a0, const ::org::bytedeco::javacpp::Pointer & a1, jlong a2, jint a3, const ::org::bytedeco::javacpp::Pointer & a4) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_memcpy_75acd561], a0.this$, a1.this$, a2, a3, a4.this$); | |
} | |
jint Nd4jCpu$NativeOps::memcpyAsync(const ::org::bytedeco::javacpp::Pointer & a0, const ::org::bytedeco::javacpp::Pointer & a1, jlong a2, jint a3, const ::org::bytedeco::javacpp::Pointer & a4) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_memcpyAsync_75acd561], a0.this$, a1.this$, a2, a3, a4.this$); | |
} | |
jint Nd4jCpu$NativeOps::memcpyConstantAsync(jlong a0, const ::org::bytedeco::javacpp::Pointer & a1, jlong a2, jint a3, const ::org::bytedeco::javacpp::Pointer & a4) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_memcpyConstantAsync_5f9065cd], a0, a1.this$, a2, a3, a4.this$); | |
} | |
jint Nd4jCpu$NativeOps::memset(const ::org::bytedeco::javacpp::Pointer & a0, jint a1, jlong a2, jint a3, const ::org::bytedeco::javacpp::Pointer & a4) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_memset_6b0386b8], a0.this$, a1, a2, a3, a4.this$); | |
} | |
jint Nd4jCpu$NativeOps::memsetAsync(const ::org::bytedeco::javacpp::Pointer & a0, jint a1, jlong a2, jint a3, const ::org::bytedeco::javacpp::Pointer & a4) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_memsetAsync_6b0386b8], a0.this$, a1, a2, a3, a4.this$); | |
} | |
jint Nd4jCpu$NativeOps::ompGetMaxThreads() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_ompGetMaxThreads_54c6a179]); | |
} | |
jint Nd4jCpu$NativeOps::ompGetNumThreads() const | |
{ | |
return env->callIntMethod(this$, mids$[mid_ompGetNumThreads_54c6a179]); | |
} | |
Nd4jCpu$NativeOps Nd4jCpu$NativeOps::position(jlong a0) const | |
{ | |
return Nd4jCpu$NativeOps(env->callObjectMethod(this$, mids$[mid_position_aed9a341], a0)); | |
} | |
jint Nd4jCpu$NativeOps::registerEvent(const ::org::bytedeco::javacpp::Pointer & a0, const ::org::bytedeco::javacpp::Pointer & a1) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_registerEvent_793bf7b9], a0.this$, a1.this$); | |
} | |
jint Nd4jCpu$NativeOps::setDevice(const ::org::bytedeco::javacpp::Pointer & a0) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_setDevice_5cd25ce8], a0.this$); | |
} | |
void Nd4jCpu$NativeOps::setElementThreshold(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setElementThreshold_39c7bd3c], a0); | |
} | |
void Nd4jCpu$NativeOps::setGridLimit(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setGridLimit_39c7bd3c], a0); | |
} | |
void Nd4jCpu$NativeOps::setOmpMinThreads(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setOmpMinThreads_39c7bd3c], a0); | |
} | |
void Nd4jCpu$NativeOps::setOmpNumThreads(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setOmpNumThreads_39c7bd3c], a0); | |
} | |
void Nd4jCpu$NativeOps::setTADThreshold(jint a0) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_setTADThreshold_39c7bd3c], a0); | |
} | |
jint Nd4jCpu$NativeOps::streamSynchronize(const ::org::bytedeco::javacpp::Pointer & a0) const | |
{ | |
return env->callIntMethod(this$, mids$[mid_streamSynchronize_5cd25ce8], a0.this$); | |
} | |
void Nd4jCpu$NativeOps::tadOnlyShapeInfo(const JArray< jint > & a0, const JArray< jint > & a1, jint a2, const JArray< jint > & a3, const JArray< jint > & a4) const | |
{ | |
env->callVoidMethod(this$, mids$[mid_tadOnlyShapeInfo_38d55c44], a0.this$, a1.this$, a2, a3.this$, a4.this$); | |
} | |
} | |
} | |
} | |
#include "structmember.h" | |
#include "functions.h" | |
#include "macros.h" | |
namespace org { | |
namespace nd4j { | |
namespace nativeblas { | |
static PyObject *t_Nd4jCpu$NativeOps_cast_(PyTypeObject *type, PyObject *arg); | |
static PyObject *t_Nd4jCpu$NativeOps_instance_(PyTypeObject *type, PyObject *arg); | |
static int t_Nd4jCpu$NativeOps_init_(t_Nd4jCpu$NativeOps *self, PyObject *args, PyObject *kwds); | |
static PyObject *t_Nd4jCpu$NativeOps_checkP2P(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_createContext(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_createEvent(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_createStream(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_destroyEvent(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_destroyRandom(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_enableDebugMode(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_enableP2P(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_enableVerboseMode(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_eventSynchronize(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_freeDevice(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_freeHost(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_getAvailableDevices(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_getConstantSpace(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_getDevice(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_getDeviceFreeMemory(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_getDeviceMajor(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_getDeviceMinor(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_getDeviceName(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_getDeviceTotalMemory(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_initializeDevicesAndFunctions(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_isExperimentalEnabled(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_isP2PAvailable(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_mallocDevice(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_mallocHost(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_memcpy(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_memcpyAsync(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_memcpyConstantAsync(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_memset(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_memsetAsync(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_ompGetMaxThreads(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_ompGetNumThreads(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_position(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_registerEvent(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_setDevice(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_setElementThreshold(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_setGridLimit(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_setOmpMinThreads(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_setOmpNumThreads(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_setTADThreshold(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_streamSynchronize(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_tadOnlyShapeInfo(t_Nd4jCpu$NativeOps *self, PyObject *args); | |
static PyObject *t_Nd4jCpu$NativeOps_get__availableDevices(t_Nd4jCpu$NativeOps *self, void *data); | |
static PyObject *t_Nd4jCpu$NativeOps_get__constantSpace(t_Nd4jCpu$NativeOps *self, void *data); | |
static PyObject *t_Nd4jCpu$NativeOps_get__device(t_Nd4jCpu$NativeOps *self, void *data); | |
static int t_Nd4jCpu$NativeOps_set__device(t_Nd4jCpu$NativeOps *self, PyObject *arg, void *data); | |
static int t_Nd4jCpu$NativeOps_set__elementThreshold(t_Nd4jCpu$NativeOps *self, PyObject *arg, void *data); | |
static PyObject *t_Nd4jCpu$NativeOps_get__experimentalEnabled(t_Nd4jCpu$NativeOps *self, void *data); | |
static int t_Nd4jCpu$NativeOps_set__gridLimit(t_Nd4jCpu$NativeOps *self, PyObject *arg, void *data); | |
static int t_Nd4jCpu$NativeOps_set__ompMinThreads(t_Nd4jCpu$NativeOps *self, PyObject *arg, void *data); | |
static int t_Nd4jCpu$NativeOps_set__ompNumThreads(t_Nd4jCpu$NativeOps *self, PyObject *arg, void *data); | |
static PyObject *t_Nd4jCpu$NativeOps_get__p2PAvailable(t_Nd4jCpu$NativeOps *self, void *data); | |
static int t_Nd4jCpu$NativeOps_set__tADThreshold(t_Nd4jCpu$NativeOps *self, PyObject *arg, void *data); | |
static PyGetSetDef t_Nd4jCpu$NativeOps__fields_[] = { | |
DECLARE_GET_FIELD(t_Nd4jCpu$NativeOps, availableDevices), | |
DECLARE_GET_FIELD(t_Nd4jCpu$NativeOps, constantSpace), | |
DECLARE_GETSET_FIELD(t_Nd4jCpu$NativeOps, device), | |
DECLARE_SET_FIELD(t_Nd4jCpu$NativeOps, elementThreshold), | |
DECLARE_GET_FIELD(t_Nd4jCpu$NativeOps, experimentalEnabled), | |
DECLARE_SET_FIELD(t_Nd4jCpu$NativeOps, gridLimit), | |
DECLARE_SET_FIELD(t_Nd4jCpu$NativeOps, ompMinThreads), | |
DECLARE_SET_FIELD(t_Nd4jCpu$NativeOps, ompNumThreads), | |
DECLARE_GET_FIELD(t_Nd4jCpu$NativeOps, p2PAvailable), | |
DECLARE_SET_FIELD(t_Nd4jCpu$NativeOps, tADThreshold), | |
{ NULL, NULL, NULL, NULL, NULL } | |
}; | |
static PyMethodDef t_Nd4jCpu$NativeOps__methods_[] = { | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, cast_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, instance_, METH_O | METH_CLASS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, checkP2P, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, createContext, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, createEvent, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, createStream, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, destroyEvent, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, destroyRandom, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, enableDebugMode, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, enableP2P, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, enableVerboseMode, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, eventSynchronize, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, freeDevice, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, freeHost, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, getAvailableDevices, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, getConstantSpace, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, getDevice, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, getDeviceFreeMemory, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, getDeviceMajor, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, getDeviceMinor, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, getDeviceName, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, getDeviceTotalMemory, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, initializeDevicesAndFunctions, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, isExperimentalEnabled, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, isP2PAvailable, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, mallocDevice, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, mallocHost, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, memcpy, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, memcpyAsync, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, memcpyConstantAsync, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, memset, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, memsetAsync, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, ompGetMaxThreads, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, ompGetNumThreads, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, position, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, registerEvent, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, setDevice, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, setElementThreshold, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, setGridLimit, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, setOmpMinThreads, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, setOmpNumThreads, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, setTADThreshold, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, streamSynchronize, METH_VARARGS), | |
DECLARE_METHOD(t_Nd4jCpu$NativeOps, tadOnlyShapeInfo, METH_VARARGS), | |
{ NULL, NULL, 0, NULL } | |
}; | |
DECLARE_TYPE(Nd4jCpu$NativeOps, t_Nd4jCpu$NativeOps, ::org::nd4j::nativeblas::NativeOps, Nd4jCpu$NativeOps, t_Nd4jCpu$NativeOps_init_, 0, 0, t_Nd4jCpu$NativeOps__fields_, 0, 0); | |
void t_Nd4jCpu$NativeOps::install(PyObject *module) | |
{ | |
installType(&PY_TYPE(Nd4jCpu$NativeOps), module, "Nd4jCpu$NativeOps", 0); | |
} | |
void t_Nd4jCpu$NativeOps::initialize(PyObject *module) | |
{ | |
PyDict_SetItemString(PY_TYPE(Nd4jCpu$NativeOps).tp_dict, "class_", make_descriptor(Nd4jCpu$NativeOps::initializeClass, 1)); | |
PyDict_SetItemString(PY_TYPE(Nd4jCpu$NativeOps).tp_dict, "wrapfn_", make_descriptor(t_Nd4jCpu$NativeOps::wrap_jobject)); | |
PyDict_SetItemString(PY_TYPE(Nd4jCpu$NativeOps).tp_dict, "boxfn_", make_descriptor(boxObject)); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_cast_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!(arg = castCheck(arg, Nd4jCpu$NativeOps::initializeClass, 1))) | |
return NULL; | |
return t_Nd4jCpu$NativeOps::wrap_Object(Nd4jCpu$NativeOps(((t_Nd4jCpu$NativeOps *) arg)->object.this$)); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_instance_(PyTypeObject *type, PyObject *arg) | |
{ | |
if (!castCheck(arg, Nd4jCpu$NativeOps::initializeClass, 0)) | |
Py_RETURN_FALSE; | |
Py_RETURN_TRUE; | |
} | |
static int t_Nd4jCpu$NativeOps_init_(t_Nd4jCpu$NativeOps *self, PyObject *args, PyObject *kwds) | |
{ | |
switch (PyTuple_GET_SIZE(args)) { | |
case 0: | |
{ | |
Nd4jCpu$NativeOps object((jobject) NULL); | |
INT_CALL(object = Nd4jCpu$NativeOps()); | |
self->object = object; | |
break; | |
} | |
goto err; | |
case 1: | |
{ | |
jlong a0; | |
Nd4jCpu$NativeOps object((jobject) NULL); | |
if (!parseArgs(args, "J", &a0)) | |
{ | |
INT_CALL(object = Nd4jCpu$NativeOps(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
Nd4jCpu$NativeOps object((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0)) | |
{ | |
INT_CALL(object = Nd4jCpu$NativeOps(a0)); | |
self->object = object; | |
break; | |
} | |
} | |
default: | |
err: | |
PyErr_SetArgsError((PyObject *) self, "__init__", args); | |
return -1; | |
} | |
return 0; | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_checkP2P(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(self->object.checkP2P()); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "checkP2P", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_createContext(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.createContext()); | |
return ::org::bytedeco::javacpp::t_Pointer::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "createContext", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_createEvent(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.createEvent()); | |
return ::org::bytedeco::javacpp::t_Pointer::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "createEvent", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_createStream(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.createStream()); | |
return ::org::bytedeco::javacpp::t_Pointer::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "createStream", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_destroyEvent(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "k", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.destroyEvent(a0)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "destroyEvent", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_destroyRandom(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0)) | |
{ | |
OBJ_CALL(self->object.destroyRandom(a0)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "destroyRandom", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_enableDebugMode(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jboolean a0; | |
if (!parseArgs(args, "Z", &a0)) | |
{ | |
OBJ_CALL(self->object.enableDebugMode(a0)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "enableDebugMode", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_enableP2P(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jboolean a0; | |
if (!parseArgs(args, "Z", &a0)) | |
{ | |
OBJ_CALL(self->object.enableP2P(a0)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "enableP2P", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_enableVerboseMode(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jboolean a0; | |
if (!parseArgs(args, "Z", &a0)) | |
{ | |
OBJ_CALL(self->object.enableVerboseMode(a0)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "enableVerboseMode", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_eventSynchronize(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "k", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.eventSynchronize(a0)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "eventSynchronize", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_freeDevice(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
::org::bytedeco::javacpp::Pointer a1((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "kk", ::org::bytedeco::javacpp::Pointer::initializeClass, ::org::bytedeco::javacpp::Pointer::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.freeDevice(a0, a1)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "freeDevice", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_freeHost(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "k", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.freeHost(a0)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "freeHost", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_getAvailableDevices(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getAvailableDevices()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "getAvailableDevices", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_getConstantSpace(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer result((jobject) NULL); | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getConstantSpace()); | |
return ::org::bytedeco::javacpp::t_Pointer::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "getConstantSpace", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_getDevice(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.getDevice()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "getDevice", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_getDeviceFreeMemory(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
jlong result; | |
if (!parseArgs(args, "k", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.getDeviceFreeMemory(a0)); | |
return PyLong_FromLongLong((PY_LONG_LONG) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "getDeviceFreeMemory", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_getDeviceMajor(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "k", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.getDeviceMajor(a0)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "getDeviceMajor", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_getDeviceMinor(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "k", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.getDeviceMinor(a0)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "getDeviceMinor", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_getDeviceName(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
::java::lang::String result((jobject) NULL); | |
if (!parseArgs(args, "k", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.getDeviceName(a0)); | |
return j2p(result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "getDeviceName", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_getDeviceTotalMemory(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
jlong result; | |
if (!parseArgs(args, "k", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.getDeviceTotalMemory(a0)); | |
return PyLong_FromLongLong((PY_LONG_LONG) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "getDeviceTotalMemory", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_initializeDevicesAndFunctions(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(self->object.initializeDevicesAndFunctions()); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "initializeDevicesAndFunctions", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_isExperimentalEnabled(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jboolean result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.isExperimentalEnabled()); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "isExperimentalEnabled", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_isP2PAvailable(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jboolean result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.isP2PAvailable()); | |
Py_RETURN_BOOL(result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "isP2PAvailable", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_mallocDevice(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jlong a0; | |
::org::bytedeco::javacpp::Pointer a1((jobject) NULL); | |
jint a2; | |
::org::bytedeco::javacpp::Pointer result((jobject) NULL); | |
if (!parseArgs(args, "JkI", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0, &a1, &a2)) | |
{ | |
OBJ_CALL(result = self->object.mallocDevice(a0, a1, a2)); | |
return ::org::bytedeco::javacpp::t_Pointer::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "mallocDevice", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_mallocHost(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jlong a0; | |
jint a1; | |
::org::bytedeco::javacpp::Pointer result((jobject) NULL); | |
if (!parseArgs(args, "JI", &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.mallocHost(a0, a1)); | |
return ::org::bytedeco::javacpp::t_Pointer::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "mallocHost", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_memcpy(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
::org::bytedeco::javacpp::Pointer a1((jobject) NULL); | |
jlong a2; | |
jint a3; | |
::org::bytedeco::javacpp::Pointer a4((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "kkJIk", ::org::bytedeco::javacpp::Pointer::initializeClass, ::org::bytedeco::javacpp::Pointer::initializeClass, ::org::bytedeco::javacpp::Pointer::initializeClass, &a0, &a1, &a2, &a3, &a4)) | |
{ | |
OBJ_CALL(result = self->object.memcpy(a0, a1, a2, a3, a4)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "memcpy", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_memcpyAsync(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
::org::bytedeco::javacpp::Pointer a1((jobject) NULL); | |
jlong a2; | |
jint a3; | |
::org::bytedeco::javacpp::Pointer a4((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "kkJIk", ::org::bytedeco::javacpp::Pointer::initializeClass, ::org::bytedeco::javacpp::Pointer::initializeClass, ::org::bytedeco::javacpp::Pointer::initializeClass, &a0, &a1, &a2, &a3, &a4)) | |
{ | |
OBJ_CALL(result = self->object.memcpyAsync(a0, a1, a2, a3, a4)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "memcpyAsync", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_memcpyConstantAsync(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jlong a0; | |
::org::bytedeco::javacpp::Pointer a1((jobject) NULL); | |
jlong a2; | |
jint a3; | |
::org::bytedeco::javacpp::Pointer a4((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "JkJIk", ::org::bytedeco::javacpp::Pointer::initializeClass, ::org::bytedeco::javacpp::Pointer::initializeClass, &a0, &a1, &a2, &a3, &a4)) | |
{ | |
OBJ_CALL(result = self->object.memcpyConstantAsync(a0, a1, a2, a3, a4)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "memcpyConstantAsync", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_memset(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
jint a1; | |
jlong a2; | |
jint a3; | |
::org::bytedeco::javacpp::Pointer a4((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "kIJIk", ::org::bytedeco::javacpp::Pointer::initializeClass, ::org::bytedeco::javacpp::Pointer::initializeClass, &a0, &a1, &a2, &a3, &a4)) | |
{ | |
OBJ_CALL(result = self->object.memset(a0, a1, a2, a3, a4)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "memset", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_memsetAsync(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
jint a1; | |
jlong a2; | |
jint a3; | |
::org::bytedeco::javacpp::Pointer a4((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "kIJIk", ::org::bytedeco::javacpp::Pointer::initializeClass, ::org::bytedeco::javacpp::Pointer::initializeClass, &a0, &a1, &a2, &a3, &a4)) | |
{ | |
OBJ_CALL(result = self->object.memsetAsync(a0, a1, a2, a3, a4)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "memsetAsync", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_ompGetMaxThreads(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.ompGetMaxThreads()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "ompGetMaxThreads", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_ompGetNumThreads(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jint result; | |
if (!parseArgs(args, "")) | |
{ | |
OBJ_CALL(result = self->object.ompGetNumThreads()); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "ompGetNumThreads", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_position(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jlong a0; | |
Nd4jCpu$NativeOps result((jobject) NULL); | |
if (!parseArgs(args, "J", &a0)) | |
{ | |
OBJ_CALL(result = self->object.position(a0)); | |
return t_Nd4jCpu$NativeOps::wrap_Object(result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "position", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_registerEvent(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
::org::bytedeco::javacpp::Pointer a1((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "kk", ::org::bytedeco::javacpp::Pointer::initializeClass, ::org::bytedeco::javacpp::Pointer::initializeClass, &a0, &a1)) | |
{ | |
OBJ_CALL(result = self->object.registerEvent(a0, a1)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "registerEvent", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_setDevice(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
::org::bytedeco::javacpp::Pointer a0((jobject) NULL); | |
jint result; | |
if (!parseArgs(args, "k", ::org::bytedeco::javacpp::Pointer::initializeClass, &a0)) | |
{ | |
OBJ_CALL(result = self->object.setDevice(a0)); | |
return PyInt_FromLong((long) result); | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "setDevice", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_setElementThreshold(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jint a0; | |
if (!parseArgs(args, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.setElementThreshold(a0)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "setElementThreshold", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_setGridLimit(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jint a0; | |
if (!parseArgs(args, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.setGridLimit(a0)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "setGridLimit", args, 2); | |
} | |
static PyObject *t_Nd4jCpu$NativeOps_setOmpMinThreads(t_Nd4jCpu$NativeOps *self, PyObject *args) | |
{ | |
jint a0; | |
if (!parseArgs(args, "I", &a0)) | |
{ | |
OBJ_CALL(self->object.setOmpMinThreads(a0)); | |
Py_RETURN_NONE; | |
} | |
return callSuper(&PY_TYPE(Nd4jCpu$NativeOps), (PyObject *) self, "set |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment