1 package Math::GSL::CBLAS::Test;
2 use base q{Test::Class};
3 use Test::More tests => 5;
4 use Math::GSL::Test qw/:all/;
5 use Math::GSL::CBLAS qw/:all/;
6 use Math::GSL qw/:all/;
7 use Math::GSL::Errno qw/:all/;
11 BEGIN{ gsl_set_error_handler_off() }
13 sub make_fixture : Test(setup) {
16 sub teardown : Test(teardown) {
19 sub TEST_CBLAS : Tests {
20 local $TODO = "need to figure out how to reture more that just first element";
22 my $A = [ 0.11, 0.12, 0.13,
34 # C = [ 367.76 368.12 ]
36 my @stuff = cblas_sgemm ($CblasRowMajor,
37 $CblasNoTrans, $CblasNoTrans, 2, 2, 3,
38 1.0, $A, $lda, $B, $ldb, 0.0, $ldc);
39 #warn Dumper [ @stuff ];
40 ok(is_similar_relative( \@stuff, [ 367.76, 368.12 , 674.06, 674.72 ], '.01' ),'cblas_sgemm');
43 sub CBLAS_IDAMAX : Tests {
49 $k = cblas_idamax($N, $X, $incX);
53 sub CBLAS_ISAMAX : Tests {
58 my $k = cblas_isamax($N, $X, $incX);
62 sub CBLAS_SASUM : Tests {
67 my $f = cblas_sasum($N, $X, $incX);
72 sub CBLAS_DASUM : Tests {
77 my $f = cblas_dasum($N, $X, $incX);
81 Test::Class->runtests;