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/subview_mat.hh
2019-07-08 00:57:25 +08:00

57 lines
1.1 KiB
C++

//
// php-armadillo/subview_mat.hh
//
// @Author CismonX
//
#ifndef PHP_ARMA_SUBVIEW_MAT_HH
#define PHP_ARMA_SUBVIEW_MAT_HH
#include "php_arma.hh"
#include "complex.hh"
namespace arma
{
template <typename T>
class subview;
}
namespace php_arma
{
template <typename T>
struct mat;
template <typename T>
struct subview_mat
{
using native_t = arma::subview<T>;
using orig_t = mat<T>;
using subview_t = subview_mat<T>;
using with_int_elem_t = subview_mat<zend_long>;
friend void subview_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 void ce_init(zend_class_entry*);
};
void subview_mat_init();
constexpr const char subview_mat_php_name[] = "SvMat";
inline zend_class_entry *subview_mat_ce;
}
#endif // !PHP_ARMA_SUBVIEW_MAT_HH