2020-04-24 23:36:52 +00:00
{ stdenv , fetchFromGitHub , autoreconfHook , givaro , pkgconfig , blas , lapack
, gmpxx
} :
assert ( ! blas . isILP64 ) && ( ! lapack . isILP64 ) ;
stdenv . mkDerivation rec {
pname = " f f l a s - f f p a c k " ;
version = " 2 . 4 . 3 " ;
src = fetchFromGitHub {
owner = " l i n b o x - t e a m " ;
repo = pname ;
rev = version ;
sha256 = " 1 y n b j d 7 2 q r w p 0 b 4 k p n 0 p 5 d 7 g d d p v j 8 d l b 5 f w d x a j r 5 p v k v i 3 i f 7 4 " ;
} ;
checkInputs = [
gmpxx
] ;
enableParallelBuilding = true ;
nativeBuildInputs = [
autoreconfHook
pkgconfig
] ++ stdenv . lib . optionals doCheck checkInputs ;
buildInputs = [ givaro blas lapack ] ;
configureFlags = [
" - - w i t h - b l a s - l i b s = - l c b l a s "
" - - w i t h - l a p a c k - l i b s = - l l a p a c k e "
2020-09-25 04:45:31 +00:00
] ++ stdenv . lib . optionals stdenv . isx86_64 [
2020-04-24 23:36:52 +00:00
# disable SIMD instructions (which are enabled *when available* by default)
# for now we need to be careful to disable *all* relevant versions of an instruction set explicitly (https://github.com/linbox-team/fflas-ffpack/issues/284)
2020-09-25 04:45:31 +00:00
" - - ${ if stdenv . hostPlatform . sse3Support then " e n a b l e " else " d i s a b l e " } - s s e 3 "
" - - ${ if stdenv . hostPlatform . ssse3Support then " e n a b l e " else " d i s a b l e " } - s s s e 3 "
" - - ${ if stdenv . hostPlatform . sse4_1Support then " e n a b l e " else " d i s a b l e " } - s s e 4 1 "
" - - ${ if stdenv . hostPlatform . sse4_2Support then " e n a b l e " else " d i s a b l e " } - s s e 4 2 "
" - - ${ if stdenv . hostPlatform . avxSupport then " e n a b l e " else " d i s a b l e " } - a v x "
" - - ${ if stdenv . hostPlatform . avx2Support then " e n a b l e " else " d i s a b l e " } - a v x 2 "
" - - ${ if stdenv . hostPlatform . avx512Support then " e n a b l e " else " d i s a b l e " } - a v x 5 1 2 f "
" - - ${ if stdenv . hostPlatform . avx512Support then " e n a b l e " else " d i s a b l e " } - a v x 5 1 2 d q "
" - - ${ if stdenv . hostPlatform . avx512Support then " e n a b l e " else " d i s a b l e " } - a v x 5 1 2 v l "
" - - ${ if stdenv . hostPlatform . fmaSupport then " e n a b l e " else " d i s a b l e " } - f m a "
" - - ${ if stdenv . hostPlatform . fma4Support then " e n a b l e " else " d i s a b l e " } - f m a 4 "
] ;
2020-04-24 23:36:52 +00:00
doCheck = true ;
meta = with stdenv . lib ; {
inherit version ;
description = '' F i n i t e F i e l d L i n e a r A l g e b r a S u b r o u t i n e s '' ;
license = licenses . lgpl21Plus ;
maintainers = with maintainers ; [ raskin timokau ] ;
platforms = platforms . unix ;
homepage = " h t t p s : / / l i n b o x - t e a m . g i t h u b . i o / f f l a s - f f p a c k / " ;
} ;
}