// // 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" #include "diagonal.hh" #ifdef PHP_ARMA_OPERATORS #include "operators.hh" #endif // PHP_ARMA_OPERATORS #include 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(); diagonal_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_row(2, "php-armadillo version", PHP_ARMA_VERSION); php_info_print_table_row(2, "Armadillo version", arma::arma_version::as_string().c_str()); php_info_print_table_row(1, ""); php_info_print_table_row(2, "Operator overloading", features::operators ? "enabled" : "disabled"); php_info_print_table_row(2, "HDF5 file format support", features::hdf5 ? "true" : "false"); php_info_print_table_row(2, "Stream resource support", features::stream_res ? "true" : "false"); 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