This repository has been archived on 2020-06-07. You can view files and clone it, but cannot push or open issues or pull requests.
php-armadillo/src/mat.hh

56 lines
982 B
C++

//
// php-armadillo/mat.hh
//
// @Author CismonX
//
#ifndef PHP_ARMA_MAT_HH
#define PHP_ARMA_MAT_HH
#include "php_arma.hh"
#include "complex.hh"
// Forward declarations.
namespace arma
{
template <typename T>
class Mat;
}
namespace php_arma
{
template <typename T>
struct mat
{
using native_t = arma::Mat<T>;
friend void mat_init();
template <typename... Ts>
zend_always_inline
static zend_object *create(Ts&&... args)
{
return object_create_ctor<native_t>(ce, &handlers, args...);
}
PHP_ARMA_CE_HANDLRES_DECLARE();
private:
PHP_ARMA_COMMON_DECLARE();
static PHP_FUNCTION(init);
static PHP_FUNCTION(fromString);
static PHP_FUNCTION(fromArray);
static void ce_init(zend_class_entry*);
};
void mat_init();
constexpr const char mat_php_name[] = "Base";
inline zend_class_entry *mat_ce;
}
#endif // !PHP_ARMA_MAT_HH