FastRaw(3pm)
π FastRaw π
okay bestie, sit down, hydrate, because we're about to talk about FastRaw β that's the short name, and the full government name is PDL::CCS::IO::FastRaw. It lives in the User Contributed Perl Documentation corner of the manual, and it is literally the PDL::IO::FastRaw wrappers for PDL::CCS::Nd. That's it. That's the whole vibe. π¦
β¨ NAME β¨
PDL::CCS::IO::FastRaw β PDL::IO::FastRaw wrappers for PDL::CCS::Nd. no cap, that's the name. π
πΈ SYNOPSIS πΈ
use PDL;
use PDL::CCS::Nd;
use PDL::CCS::IO::FastRaw;
$ccs = PDL::CCS::Nd->newFromWhich($which,$nzvals);
ccs_writefraw($ccs,$fname); # write a pair of raw files
$ccs2 = ccs_readfraw($fname); # read a pair of raw files
$ccs3 = ccs_mapfraw($fname,{ReadOnly=>1}); # mmap a pair of files, don't read yet
look at her go. write a pair, read a pair, mmap a pair. iconic behavior. π
π I/O Utilities π
π§ ccs_writefraw
she writes a pair of raw binary files using PDL::IO::FastRaw::writefraw(). queen stuff. β¨
ccs_writefraw($ccs,$fname)
ccs_writefraw($ccs,$fname,\%opts)
Options in %opts:
Header => $Header, ##-- default="$fname.hdr"
ixFile => $ixFile, ##-- default="$fname.ix"
ixHeader => $ixHeader, ##-- default="$ixFile.hdr"
nzFile => $nzFile, ##-- default="$fname.nz"
nzHeader => $nzHeader, ##-- default="$nzFile.hdr"
every one of those defaults is right there in the comments, bestie, don't @ me. π
π¦ ccs_readfraw
she reads a pair of raw binary files using PDL::IO::FastRaw::readfraw(). the reverse of the above, lowkey elegant. π«Ά
$ccs = ccs_readfraw($fname)
$ccs = ccs_readfraw($fname,\%opts)
Options in %opts:
Header => $Header, ##-- default="$fname.hdr"
ixFile => $ixFile, ##-- default="$fname.ix"
ixHeader => $ixHeader, ##-- default="$ixFile.hdr"
nzFile => $nzFile, ##-- default="$fname.nz"
nzHeader => $nzHeader, ##-- default="$nzFile.hdr"
sorted => $bool, ##-- is data on disk already sorted? (default=1)
so sorted is asking is the data on disk already sorted? and yes bestie, the default is 1. πΈ
π ccs_mapfraw
she reads a pair of raw binary files using PDL::IO::FastRaw::readfraw(). mmap energy. β¨
$ccs = ccs_mapfraw($fname)
$ccs = ccs_mapfraw($fname,\%opts)
Global options in %opts:
Header => $Header, ##-- default="$fname.hdr"
ReadOnly => $bool, ##-- read-only mode?
Dims => \@dims, ##-- logical dimensions (~ \@pdims)
Datatype => $type, ##-- CCS::Nd datatype
Creat => $bool, ##-- create file(s)?
Trunc => $bool, ##-- truncate file(s)?
CCS::Nd options in %opts:
flags => $flags, ##-- CCS::Nd flags
nnz => $nnz, ##-- CCS::Nd nnz
pdims => \@pdims, ##-- CCS::Nd physical dimensions
vdims => \@vdims, ##-- CCS::Nd virtual dimensions
sorted => $bool, ##-- is data on disk sorted? (default=1)
Component options in %opts, for ${c} in qw(ix nz):
"${c}${opt}" => $cValue, ##-- override global option ${opt}
"${c}File" => $cFile, ##-- default="$fname.${c}"
"${c}Header" => $cHeader, ##-- default="$cFile.hdr"
so yeah, for each component c in qw(ix nz) you can override the global option ${opt}, and the file/header defaults follow the same pattern as always. the way that it's consistent... obsessed. π
π ACKNOWLEDGEMENTS π
- Perl by Larry Wall.
- PDL by Karl Glazebrook, Tuomas J. Lukka, Christian Soeller, and others.
giving credit where credit is due, as she should. π«Ά
π AUTHOR π
Bryan Jurish <moocow@cpan.org>
π Copyright Policy π
Copyright (C) 2015-2024, Bryan Jurish. All rights reserved.
This package is free software, and entirely without warranty. You may redistribute it and/or modify it under the same terms as Perl itself.
fr fr: "entirely without warranty" is not a drill, bestie. that's the actual legal vibe. π
π₯ SEE ALSO π₯
perl, PDL, PDL::CCS::Nd, PDL::CCS::IO::FITS, PDL::CCS::IO::MatrixMarket, PDL::CCS::IO::LDAC, ...
that's the whole page, bestie. this doc is shipped with perl v5.40.0 and dated 2025-01-04, and it's giving main character energy from start to finish. go forth and mmap responsibly. πβ¨ππ¦πΈπ
π¦ where this page comes from
- debian trixie: libpdl-ccs-perl 1.24.1-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpdl-ccs-perl 1.24.1-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms