88 lines
1.9 KiB
C++
88 lines
1.9 KiB
C++
//
|
|
// php-armadillo/php_arma.cc
|
|
//
|
|
// @Author CismonX
|
|
//
|
|
|
|
#include "php_arma.hh"
|
|
#include "constants.hh"
|
|
#include "complex.hh"
|
|
#include "subview.hh"
|
|
#include "base.hh"
|
|
#include "dense.hh"
|
|
#include "matrix.hh"
|
|
#include "dense_matrix.hh"
|
|
#include "resizable.hh"
|
|
#include "resizable_matrix.hh"
|
|
#include "non_resizable.hh"
|
|
#include "non_resizable_matrix.hh"
|
|
#include "dense_resizable_matrix.hh"
|
|
#include "dense_non_resizable_matrix.hh"
|
|
#include "mapval.hh"
|
|
#include "functions.hh"
|
|
#include "mat.hh"
|
|
#include "subview_mat.hh"
|
|
|
|
#ifdef PHP_ARMA_OPERATORS
|
|
#include "operators.hh"
|
|
#endif // PHP_ARMA_OPERATORS
|
|
|
|
#include <ext/standard/info.h>
|
|
|
|
namespace php_arma
|
|
{
|
|
int module_init(INIT_FUNC_ARGS)
|
|
{
|
|
constants_init();
|
|
complex_init();
|
|
subview_init();
|
|
base_init();
|
|
mapval_init();
|
|
dense_init();
|
|
matrix_init();
|
|
dense_matrix_init();
|
|
resizable_init();
|
|
resizable_matrix_init();
|
|
non_resizable_init();
|
|
non_resizable_matrix_init();
|
|
dense_resizable_matrix_init();
|
|
dense_non_resizable_matrix_init();
|
|
mat_init();
|
|
subview_mat_init();
|
|
|
|
#ifdef PHP_ARMA_OPERATORS
|
|
operators_init();
|
|
#endif // PHP_ARMA_OPERATORS
|
|
|
|
arma::arma_rng::set_seed_random();
|
|
return SUCCESS;
|
|
}
|
|
|
|
void module_info(ZEND_MODULE_INFO_FUNC_ARGS)
|
|
{
|
|
php_info_print_table_start();
|
|
php_info_print_table_header(2, "armadillo support", "enabled");
|
|
php_info_print_table_end();
|
|
}
|
|
|
|
zend_module_entry module_entry = {
|
|
STANDARD_MODULE_HEADER,
|
|
"arma",
|
|
functions,
|
|
module_init,
|
|
nullptr,
|
|
nullptr,
|
|
nullptr,
|
|
module_info,
|
|
PHP_ARMA_VERSION,
|
|
STANDARD_MODULE_PROPERTIES
|
|
};
|
|
}
|
|
|
|
#ifdef COMPILE_DL_ARMA
|
|
extern "C" ZEND_DLEXPORT zend_module_entry *get_module()
|
|
{
|
|
return &php_arma::module_entry;
|
|
}
|
|
#endif // COMPILE_DL_ARMA
|