|
numpy 2.0.0
|
#include "Python.h"#include "numpy/arrayobject.h"#include "numpy/ufuncobject.h"#include "numpy/npy_3kcompat.h"#include "npy_config.h"Defines | |
| #define | INIT_OUTER_LOOP_1 |
| #define | INIT_OUTER_LOOP_2 |
| #define | INIT_OUTER_LOOP_3 |
| #define | INIT_OUTER_LOOP_4 |
| #define | BEGIN_OUTER_LOOP_3 for (N_ = 0; N_ < dN; N_++, args[0] += s0, args[1] += s1, args[2] += s2) { |
| #define | BEGIN_OUTER_LOOP_4 for (N_ = 0; N_ < dN; N_++, args[0] += s0, args[1] += s1, args[2] += s2, args[3] += s3) { |
| #define | END_OUTER_LOOP } |
| #define | RETVAL |
Typedefs | |
| typedef npy_intp | intp |
Functions | |
| static void TYPE | _inner1d (char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func)) |
| static void TYPE | _innerwt (char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func)) |
| static void TYPE | _matrix_multiply (char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func)) |
| static void | addUfuncs (PyObject *dictionary) |
| static PyObject * | UMath_Tests_test_signature (PyObject *NPY_UNUSED(dummy), PyObject *args) |
| PyMODINIT_FUNC | initumath_tests (void) |
Variables | |
| char * | inner1d_signature = "(i),(i)->()" |
| char * | innerwt_signature = "(i),(i),(i)->()" |
| char * | matrix_multiply_signature = "(m,n),(n,p)->(m,p)" |
| static PyUFuncGenericFunction | inner1d_functions [] = { LONG_inner1d, DOUBLE_inner1d } |
| static void * | inner1d_data [] = { (void *)NULL, (void *)NULL } |
| static char | inner1d_signatures [] = { PyArray_LONG, PyArray_LONG, PyArray_LONG, PyArray_DOUBLE, PyArray_DOUBLE, PyArray_DOUBLE } |
| static PyUFuncGenericFunction | innerwt_functions [] = { LONG_innerwt, DOUBLE_innerwt } |
| static void * | innerwt_data [] = { (void *)NULL, (void *)NULL } |
| static char | innerwt_signatures [] = { PyArray_LONG, PyArray_LONG, PyArray_LONG, PyArray_LONG, PyArray_DOUBLE, PyArray_DOUBLE, PyArray_DOUBLE, PyArray_DOUBLE } |
| static PyUFuncGenericFunction | matrix_multiply_functions [] = { LONG_matrix_multiply, FLOAT_matrix_multiply, DOUBLE_matrix_multiply } |
| static void * | matrix_multiply_data [] = { (void *)NULL, (void *)NULL, (void *)NULL } |
| static char | matrix_multiply_signatures [] = { PyArray_LONG, PyArray_LONG, PyArray_LONG, PyArray_FLOAT, PyArray_FLOAT, PyArray_FLOAT, PyArray_DOUBLE, PyArray_DOUBLE, PyArray_DOUBLE } |
| static PyMethodDef | UMath_TestsMethods [] |
| #define BEGIN_OUTER_LOOP_3 for (N_ = 0; N_ < dN; N_++, args[0] += s0, args[1] += s1, args[2] += s2) { |
| #define BEGIN_OUTER_LOOP_4 for (N_ = 0; N_ < dN; N_++, args[0] += s0, args[1] += s1, args[2] += s2, args[3] += s3) { |
| #define END_OUTER_LOOP } |
| #define INIT_OUTER_LOOP_2 |
INIT_OUTER_LOOP_1 \ intp s1 = *steps++;
| #define INIT_OUTER_LOOP_3 |
INIT_OUTER_LOOP_2 \ intp s2 = *steps++;
| #define INIT_OUTER_LOOP_4 |
INIT_OUTER_LOOP_3 \ intp s3 = *steps++;
| #define RETVAL |
Referenced by UMath_Tests_test_signature().
| static void TYPE _inner1d | ( | char ** | args, |
| intp * | dimensions, | ||
| intp * | steps, | ||
| void * | NPY_UNUSEDfunc | ||
| ) | [static] |
| static void TYPE _innerwt | ( | char ** | args, |
| intp * | dimensions, | ||
| intp * | steps, | ||
| void * | NPY_UNUSEDfunc | ||
| ) | [static] |
| static void TYPE _matrix_multiply | ( | char ** | args, |
| intp * | dimensions, | ||
| intp * | steps, | ||
| void * | NPY_UNUSEDfunc | ||
| ) | [static] |
| static void addUfuncs | ( | PyObject * | dictionary | ) | [static] |
Referenced by UMath_Tests_test_signature().
| PyMODINIT_FUNC initumath_tests | ( | void | ) |
| static PyObject* UMath_Tests_test_signature | ( | PyObject * | NPY_UNUSEDdummy, |
| PyObject * | args | ||
| ) | [static] |
void* inner1d_data[] = { (void *)NULL, (void *)NULL } [static] |
PyUFuncGenericFunction inner1d_functions[] = { LONG_inner1d, DOUBLE_inner1d } [static] |
</blockquote>
<blockquote>
r'''inner on the last dimension and broadcast on the rest n" " "(i),(i)->()" n''',
<blockquote class="last"> TD('ld'), ),</blockquote>
</blockquote>
| char* inner1d_signature = "(i),(i)->()" |
char inner1d_signatures[] = { PyArray_LONG, PyArray_LONG, PyArray_LONG, PyArray_DOUBLE, PyArray_DOUBLE, PyArray_DOUBLE } [static] |
void* innerwt_data[] = { (void *)NULL, (void *)NULL } [static] |
PyUFuncGenericFunction innerwt_functions[] = { LONG_innerwt, DOUBLE_innerwt } [static] |
| char* innerwt_signature = "(i),(i),(i)->()" |
char innerwt_signatures[] = { PyArray_LONG, PyArray_LONG, PyArray_LONG, PyArray_LONG, PyArray_DOUBLE, PyArray_DOUBLE, PyArray_DOUBLE, PyArray_DOUBLE } [static] |
void* matrix_multiply_data[] = { (void *)NULL, (void *)NULL, (void *)NULL } [static] |
PyUFuncGenericFunction matrix_multiply_functions[] = { LONG_matrix_multiply, FLOAT_matrix_multiply, DOUBLE_matrix_multiply } [static] |
| char* matrix_multiply_signature = "(m,n),(n,p)->(m,p)" |
char matrix_multiply_signatures[] = { PyArray_LONG, PyArray_LONG, PyArray_LONG, PyArray_FLOAT, PyArray_FLOAT, PyArray_FLOAT, PyArray_DOUBLE, PyArray_DOUBLE, PyArray_DOUBLE } [static] |
PyMethodDef UMath_TestsMethods[] [static] |
{
{"test_signature", UMath_Tests_test_signature, METH_VARARGS,
"Test signature parsing of ufunc. \n"
"Arguments: nin nout signature \n"
"If fails, it returns NULL. Otherwise it will returns 0 for scalar ufunc "
"and 1 for generalized ufunc. \n",
},
{NULL, NULL, 0, NULL}
}