77 lines
2.2 KiB
C++
77 lines
2.2 KiB
C++
//
|
|
// php-armadillo/constants.hh
|
|
//
|
|
// @Author CismonX
|
|
//
|
|
|
|
#ifndef PHP_ARMA_CONSTANTS_HH
|
|
#define PHP_ARMA_CONSTANTS_HH
|
|
|
|
#include "php_arma.hh"
|
|
|
|
namespace php_arma
|
|
{
|
|
struct fill
|
|
{
|
|
static constexpr auto none = 0;
|
|
static constexpr auto zeros = 1;
|
|
static constexpr auto ones = 2;
|
|
static constexpr auto eye = 3;
|
|
static constexpr auto randu = 4;
|
|
static constexpr auto randn = 5;
|
|
};
|
|
|
|
struct file_type
|
|
{
|
|
static constexpr auto auto_detect = 0;
|
|
static constexpr auto arma_binary = 1;
|
|
static constexpr auto arma_ascii = 2;
|
|
static constexpr auto raw_binary = 3;
|
|
static constexpr auto raw_ascii = 4;
|
|
static constexpr auto csv_ascii = 5;
|
|
static constexpr auto coord_ascii = 6;
|
|
static constexpr auto pgm_binary = 7;
|
|
static constexpr auto hdf5_binary = 8;
|
|
};
|
|
|
|
struct sort_direction
|
|
{
|
|
static constexpr auto ascend = 0;
|
|
static constexpr auto descend = 1;
|
|
static constexpr auto strict_ascend = 2;
|
|
static constexpr auto strict_descend = 3;
|
|
};
|
|
|
|
struct hdf5_opts
|
|
{
|
|
static constexpr auto trans = 1u << 0;
|
|
static constexpr auto append = 1u << 1;
|
|
static constexpr auto replace = 1u << 2;
|
|
};
|
|
|
|
struct features
|
|
{
|
|
#ifdef PHP_ARMA_OPERATORS
|
|
static constexpr auto operators = true;
|
|
#else
|
|
static constexpr auto operators = false;
|
|
#endif // PHP_ARMA_OPERATORS
|
|
};
|
|
|
|
void constants_init();
|
|
|
|
constexpr const char fill_php_name[] = "Fill";
|
|
constexpr const char file_type_php_name[] = "FileType";
|
|
constexpr const char sort_direction_php_name[] = "SortDirection";
|
|
constexpr const char hdf5_opts_php_name[] = "HDF5Opts";
|
|
constexpr const char features_php_name[] = "Features";
|
|
|
|
inline zend_class_entry *fill_ce;
|
|
inline zend_class_entry *file_type_ce;
|
|
inline zend_class_entry *sort_direction_ce;
|
|
inline zend_class_entry *hdf5_opts_ce;
|
|
inline zend_class_entry *features_ce;
|
|
}
|
|
|
|
#endif //!PHP_ARMA_CONSTANTS_HH
|