pike.git / src / modules / Math / math_module.c

version» Context lines:

pike.git/src/modules/Math/math_module.c:67:    if (sub[i].pd && sub[i].pd[0])    free_program(sub[i].pd[0]);       exit_math_matrix();    exit_math_imatrix();    exit_math_fmatrix();    exit_math_smatrix();    exit_math_transforms();   }    +  + #ifdef HAS_MPI + void matrix_op_create(INT32 args); + void imatrix_op_create(INT32 args); + void lmatrix_op_create(INT32 args); + void fmatrix_op_create(INT32 args); + void smatrix_op_create(INT32 args); + #endif +    PIKE_MODULE_INIT   {    int i;    for (i=0; i<(int)(sizeof(sub)/sizeof(sub[0])); i++)    {    struct program *p;       start_new_program();    sub[i].func();    p=end_program();    add_program_constant(sub[i].name,p,0);    if (sub[i].pd) sub[i].pd[0]=p;    else free_program(p);    }       add_float_constant("pi",3.14159265358979323846 ,0);    add_float_constant("e", 2.7182818284590452354 ,0);    add_float_constant("inf", MAKE_INF(), 0);    add_float_constant("nan", MAKE_NAN(), 0); -  +  //ADD_FUNCTION("op_create", fmatrixOp_create_, tFunc(tFunction tInt tInt, tObj), 0); + #ifdef HAS_MPI +  add_function_constant("Matrix_op_create", matrix_op_create, "function(function,int,int,int:object)", 0); +  add_function_constant("IMatrix_op_create", imatrix_op_create, "function(function,int,int,int:object)", 0); +  add_function_constant("LMatrix_op_create", lmatrix_op_create, "function(function,int,int,int:object)", 0); +  add_function_constant("FMatrix_op_create", fmatrix_op_create, "function(function,int,int,int:object)", 0); +  add_function_constant("SMatrix_op_create", smatrix_op_create, "function(function,int,int,int:object)", 0); + #endif   }