Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Migrate some code to the proper home

  • Loading branch information...
commit a26406211f03edc2436b7738264bff708a54be70 1 parent 224c122
Duke Leto authored

Showing 2 changed files with 39 additions and 37 deletions. Show diff stats Hide diff stats

  1. +2 37 src/LAPACK/Double.winxed
  2. +37 0 t/winxed/double.t
39 src/LAPACK/Double.winxed
@@ -4,13 +4,9 @@ const int PRINT_DEBUG_STUFF = 0;
4 4
5 5 function dgetrf_exec(var A,int ipiv)
6 6 {
7   - var pla = loadlib("linalg_group");
8 7 var lapack = loadlib('liblapack.so');
9   - if (lapack == null || !lapack)
10   - die("Cannot find liblapack. Search for the correct paths");
11   - say("In Winxed Main!\n");
12   - say("Matrix A:");
13   - say(A);
  8 + if (lapack == null || !lapack)
  9 + die("Cannot find liblapack. Search for the correct paths");
14 10
15 11 int m,n,lda,ipiv_size,info;
16 12 m=A.rows;
@@ -85,34 +81,3 @@ function debug(var matrix, string msg, var args [slurpy])
85 81 }
86 82
87 83 }
88   -
89   -/*
90   -
91   -function main[main](var args)
92   -{
93   -
94   - var pla = loadlib("linalg_group");
95   - var a = new 'NumMatrix2D';
96   - a.initialize_from_args(3, 3,
97   - 11.0, 2.0, 3.0,
98   - 4.0, 5.0, 6.0,
99   - 7.0, 1.0, 2.0);
100   - using dgetrf_func.ipiv_size;
101   - int ipiv_size_v;
102   - ipiv_size_v=ipiv_size(a);
103   - say(ipiv_size_v);
104   - int ipiv[ipiv_size_v];
105   - int i;
106   - for(i=0;i<ipiv_size_v;i++)
107   - ipiv[i]=0;
108   - say("printing ipiv:\n",ipiv);
109   - using dgetrf_func.dgetrf_exec;
110   - int info;
111   - info=dgetrf_exec(a,ipiv);
112   - say("printing A");
113   - say(a);
114   - say();
115   - say(ipiv);
116   -}
117   -
118   -*/
37 t/winxed/double.t
... ... @@ -0,0 +1,37 @@
  1 +$load "rosella/test.pbc";
  2 +$load "../../src/LAPACK/Double.pbc";
  3 +
  4 +class Test_double {
  5 +
  6 + function dgetrf_test(){
  7 + var pla = loadlib("linalg_group");
  8 + var a = new 'NumMatrix2D';
  9 + a.initialize_from_args(3, 3,
  10 + 11.0, 2.0, 3.0,
  11 + 4.0, 5.0, 6.0,
  12 + 7.0, 1.0, 2.0);
  13 + using dgetrf_func.ipiv_size;
  14 + int ipiv_size_v;
  15 + ipiv_size_v=ipiv_size(a);
  16 + say(ipiv_size_v);
  17 + int ipiv[ipiv_size_v];
  18 + int i;
  19 + for(i=0;i<ipiv_size_v;i++)
  20 + ipiv[i]=0;
  21 + say("printing ipiv:\n",ipiv);
  22 + using dgetrf_func.dgetrf_exec;
  23 + int info;
  24 + info=dgetrf_exec(a,ipiv);
  25 + say("printing A");
  26 + say(a);
  27 + self.assert.equal(info,0);
  28 + self.assert.not_equal(a.rows,0);
  29 + self.assert.not_equal(a.cols,0);
  30 +
  31 + }
  32 +}
  33 +
  34 +function main[main](var args) {
  35 + using Rosella.Test.test;
  36 + test(class Test_double);
  37 +}

0 comments on commit a264062

Please sign in to comment.
Something went wrong with that request. Please try again.