Skip to content

Commit

Permalink
Add start for t/bigmem.t tests
Browse files Browse the repository at this point in the history
Subtests to come.  Contribution for others welcome.
  • Loading branch information
devel-chm committed Sep 17, 2015
1 parent 1001556 commit 6f4e728
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions t/bigmem.t
@@ -0,0 +1,63 @@
#!/usr/bin/perl
#
# Created on: Thu 17 Sep 2015 09:21:15 AM
# Last saved: Thu 17 Sep 2015 02:35:49 PM
#
# This is a start at tests to verify PDL operation with pdls having
# large numbers of elements (more than than 32bits binary)
#
use Test::More tests => 1;

use PDL;
$PDL::BIGPDL = 1; # should this be the defaults for 64bit index support?

# Tests for PDL::Core
#
# NOTE: pdl and PDL->new can't really be tested since the corresponding
# perl data may be 10-100x bigger than the end pdl element sizes.
#
# A lot of these PDL::Core tests simply check that these routines don't
# break for large pdls as a sanity check. Ideally, more thorough tests
# could be done but code inspection/review might be more efficient.
#
# nelem
# dims
# shape

my $bigbyte = ones( byte, 5*1024*1024*1024+17 );
ok( $bigbyte->shape->sclr == $bigbyte->nelem, "shape handles indx dims > 4GiB");

# ndims
# getndims
# dim
# getdim
# get_dataref
# upd_data
# doflow
# flows
# copy
# unwind
# make_physical
# dummy
# clump
# thread_define
# thread
# diagonal
# thread[123I]
# sever
# info
# mslice
# inplace, is_inplace, set_inplace, new_or_inplace
# new_from_specification
# zeros
# ones
# reshape
# squeeze
# flat
# convert
# byte|short|ushort|long|indx|longlong|float|double
# set, at, sclr
# cat, dog
# set_autopthread_targ, get_autopthread_targ, get_autopthread_actual, set_autopthread_size, get_autopthread_size

done_testing(); # tests done

0 comments on commit 6f4e728

Please sign in to comment.