PDLA-Core
view release on metacpan or search on metacpan
Basic/Core/Core.xs view on Meta::CPAN
list_c(x)
pdl *x
PREINIT:
PDLA_Indx *inds;
PDLA_Indx *incs;
PDLA_Indx offs;
void *data;
int ind;
int stop = 0;
SV *sv;
PPCODE:
pdl_make_physvaffine( x );
inds = pdl_malloc(sizeof(PDLA_Indx) * x->ndims); /* GCC -> on stack :( */
data = PDLA_REPRP(x);
incs = (PDLA_VAFFOK(x) ? x->vafftrans->incs : x->dimincs);
offs = PDLA_REPROFFS(x);
EXTEND(sp,x->nvals);
for(ind=0; ind < x->ndims; ind++) inds[ind] = 0;
while(!stop) {
PDLA_Anyval pdl_val = { -1, 0 };
Basic/Core/Core.xs view on Meta::CPAN
CODE:
pdl_add_threading_magic(it,-1,-1);
MODULE = PDLA::Core PACKAGE = PDLA
SV *
initialize(class)
SV *class
PREINIT:
HV *bless_stash;
PPCODE:
if (SvROK(class)) { /* a reference to a class */
bless_stash = SvSTASH(SvRV(class));
} else { /* a class name */
bless_stash = gv_stashsv(class, 0);
}
ST(0) = sv_newmortal();
SetSV_PDLA(ST(0),pdl_null()); /* set a null PDLA to this SV * */
ST(0) = sv_bless(ST(0), bless_stash); /* bless appropriately */
XSRETURN(1);
Basic/Gen/PP.pm view on Meta::CPAN
$name(...)
PREINIT:
char *objname = "PDLA"; /* XXX maybe that class should actually depend on the value set
by pp_bless ? (CS) */
HV *bless_stash = 0;
SV *parent = 0;
int nreturn;
$svdecls
$pars
PPCODE:
{
PDLA_COMMENT("Check if you can get a package name for this input value. ")
PDLA_COMMENT("It can be either a PDLA (SVt_PVMG) or a hash which is a ")
PDLA_COMMENT("derived PDLA subclass (SVt_PVHV) ")
if (SvROK(ST(0)) && ((SvTYPE(SvRV(ST(0))) == SVt_PVMG) || (SvTYPE(SvRV(ST(0))) == SVt_PVHV))) {
parent = ST(0);
if (sv_isobject(parent)){
bless_stash = SvSTASH(SvRV(ST(0)));
( run in 0.994 second using v1.01-cache-2.11-cpan-5511b514fd6 )