Adding a new type, as linked above, is a matter of creating extra options in the various places where PDL types live: conversion functions in Perl-land, type-specifiers for various PDL functions in Perl-land, type-qualifiers in PP function signatures, etc. Until about 2.035, it took extra manual stuff to hook up further types, including the (it turned out unnecessary) manually-hardcoded casting between various C types (it turned out the C standard and compiler can handle that all 100% fine).
With the changes there, those manual activities became minimal, which made it easy(ish) to add further C types like C99 complex numbers, the rest of the integer types, and long doubles. However, and this is quite important, PP only provides text-expansion of provided Code (etc) chunks into parts of switch statements inside the various functions that make up the API of a PDL operation. The expanded text still needs to compile as C.
This would mean that to support big ints, or MPFR, something would need to turn atomic C operations on C atomic-type (as I am calling them here) numbers (+,-,*,/,etc) into the appropriate version for those non-atomic types. That would involve parsing the actual C and making substitutions. This is not impossible, and using e.g. Pegex would make it manageable, but it would be significant work. On the plus side, it might facilitate moving to using e.g. OpenCL. See https://github.com/PDLPorters/pdl/issues/349 for more and/or to contribute!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.