Main > Programming > Libraries >

PDL::Internals 2.4.3

PDL::Internals 2.4.3

Sponsored Links

PDL::Internals 2.4.3 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 2.1 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 839
Date added: 2007-07-07
Publisher: Tuomas J. Lukka

PDL::Internals 2.4.3 description

PDL::Internals is a Perl module that contains a description of some aspects of the current internals.

Intro

This document explains various aspects of the current implementation of PDL. If you just want to use PDL for something, you definitely do not need to read this. Even if you want to interface your C routines to PDL or create new PDL::PP functions, you do not need to read this man page (though it may be informative). This document is primarily intended for people interested in debugging or changing the internals of PDL. To read this, a good understanding of the C language and programming and data structures in general is required, as well as some Perl understanding. If you read through this document and understand all of it and are able to point what any part of this document refers to in the PDL core sources and additionally struggle to understand PDL::PP, you will be awarded the title "PDL Guru" (of course, the current version of this document is so incomplete that this is next to impossible from just these notes).

Warning: If it seems that this document has gotten out of date, please inform the PDL porters email list (pdl-porters@jach.hawaii.edu). This may well happen.

Piddles

The pdl data object is generally an opaque scalar reference into a pdl structure in memory. Alternatively, it may be a hash reference with the PDL field containing the scalar reference (this makes overloading piddles easy, see PDL::Objects). You can easily find out at the Perl level which type of piddle you are dealing with. The example code below demonstrates how to do it:

# check if this a piddle
die "not a piddle" unless UNIVERSAL::isa($pdl, PDL);
# is it a scalar ref or a hash ref?
if (UNIVERSAL::isa($pdl, "HASH")) {
die "not a valid PDL" unless exists $pdl->{PDL} &&
UNIVERSAL::isa($pdl->{PDL},PDL);
print "This is a hash reference,",
" the PDL field contains the scalar refn";
} else {
print "This is a scalar ref that points to address $$pdl in memoryn";
}

The scalar reference points to the numeric address of a C structure of type pdl which is defined in pdl.h. The mapping between the object at the Perl level and the C structure containing the actual data and structural that makes up a piddle is done by the PDL typemap. The functions used in the PDL typemap are defined pretty much at the top of the file pdlcore.h. So what does the structure look like:

struct pdl {
unsigned long magicno; /* Always stores PDL_MAGICNO as a sanity check */
/* This is first so most pointer accesses to wrong type are caught */
int state; /* Whats in this pdl */

pdl_trans *trans; /* Opaque pointer to internals of transformation from
parent */

pdl_vaffine *vafftrans;

void* sv; /* (optional) pointer back to original sv.
ALWAYS check for non-null before use.
We cannot inc refcnt on this one or wed
never get destroyed */

void *datasv; /* Pointer to SV containing data. Refcnt inced */
void *data; /* Null: no data alloced for this one */
int nvals; /* How many values allocated */
int datatype;
PDL_Long *dims; /* Array of data dimensions */
PDL_Long *dimincs; /* Array of data default increments */
short ndims; /* Number of data dimensions */

unsigned char *threadids; /* Starting index of the thread index set n */
unsigned char nthreadids;

pdl *progenitor; /* Im in a mutated family. make_physical_now must
copy me to the new generation. */
pdl *future_me; /* Im the "then" pdl and this is my "now" (or more modern
version, anyway */

pdl_children children;

short living_for; /* perl side not referenced; delete me when */

PDL_Long def_dims[PDL_NDIMS]; /* Preallocated space for efficiency */
PDL_Long def_dimincs[PDL_NDIMS]; /* Preallocated space for efficiency */
unsigned char def_threadids[PDL_NTHREADIDS];

struct pdl_magic *magic;

void *hdrsv; /* "header", settable from outside */
};

This is quite a structure for just storing some data in - what is going on?

PDL::Internals 2.4.3 Screenshot

Advertisements

PDL::Internals 2.4.3 Keywords

Bookmark PDL::Internals 2.4.3

Hyperlink code:
Link for forum:

PDL::Internals 2.4.3 Copyright

WareSeeker periodically updates pricing and software information of PDL::Internals 2.4.3 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of PDL::Internals 2.4.3 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
PDL::Indexing Perl module contains a tutorial on how to index piddles. Free Download
PDL::Transform is a Perl module that coordinate transforms, image warping, and N-D functions. Free Download
PDL::Tips is a Perl module with small tidbits of useful arcana. Free Download
PDL::IO::FITS Perl module offers a simple FITS support for PDL. Free Download
PDL::NiceSlice Perl module contains a nicer slicing syntax for PDL. Free Download
PDL::Impatient is a PDL for the impatient. Free Download
PDL::Slices is a Perl module used for indexing, slicing, and dicing. Free Download
PDL::API is a Perl module for making piddles from Perl and C/XS code. Free Download