www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - vxl

reply sclytrack pi.be writes:
Lapack
------

On netlib you have the numerical library written in fortran 77, latest version
is lapack3. There is a C version automatically created with f2c called clapack.

Lapack3e
--------

lapack3e fortran 90 version of the lapack library modified for being thread
safe. I'm still unable to compile it with gfortran (fortran 95 compiler).
Apparently some people have compiled it succesfully with g95 (fortran 95
compiler). I still had problems. g95 (GPL like gdc), gfortran (part of gcc)

Other
-----

There are other versions for parallell computing, but that's another chaotic
mess.

vxl
---

vxl currently uses an f2c version of linpack (lapack is newer). It has been
suggested that in the future they might upgrade to lapack3e. 

I think the fastest way to a numerical library for D is to manually "translate"
the vxl/vnl library.

vxl.sourceforge.net


On another note, I still have a question about D. D does range check on arrays
data[x] = 2;
Is it possible to compile this without the range checking. Or do I have
to revert to int * data to avoid those?
May 17 2006
parent reply Tom S <h3r3tic remove.mat.uni.torun.pl> writes:
sclytrack pi.be wrote:
 On another note, I still have a question about D. D does range check on arrays
 data[x] = 2;
 Is it possible to compile this without the range checking. Or do I have
 to revert to int * data to avoid those?
Just compile with -release :) -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d-pu s+: a-->----- C+++$>++++ UL P+ L+ E--- W++ N++ o? K? w++ !O !M V? PS- PE- Y PGP t 5 X? R tv-- b DI- D+ G e>+++ h>++ !r !y ------END GEEK CODE BLOCK------ Tomasz Stachowiak /+ a.k.a. h3r3tic +/
May 17 2006
parent BCS <BCS pathlink.com> writes:
Tom S wrote:
 sclytrack pi.be wrote:
 
 On another note, I still have a question about D. D does range check 
 on arrays
 data[x] = 2;
 Is it possible to compile this without the range checking. Or do I have
 to revert to int * data to avoid those?
Just compile with -release :)
Mixing and matching range checks might be useful. Some sort of per op suppression would be enough. Here is an example where this would be useful. It changes a node in an array based tree and updates subtree sums. Most of the array accesses are safe but hard to automatically prove (probably wont be optimized). struct node { int v; int sum; } int fn(node[] arr, int i, int v) { int sum; // range check this (exception on error desired) arr[i].v = v; sum = v; if(i<<1 < arr.length) // don't check this (I already did) sum += arr[i<<1].v; if((i<<1)|0x01 < arr.length) // don't check this (I already did) sum += arr[(i<<1)|0x01].v; // don't check this (i hasn't changed) arr[i].sum = sum; i>>=1; // don't check anything else, i is always valid while(i>0) { sum = arr[i].v; if(i<<1 < arr.length) sum += arr[i<<1].v; if((i<<1)|0x01 < arr.length) sum += arr[(i<<1)|0x01].v; arr[i].sum = sum; i>>=1; } return arr[1].sum; }
May 17 2006