summaryrefslogtreecommitdiff
path: root/packages/base/hmatrix.cabal
blob: 0cfbd889760877b3d3c0501e73f9db6741982133 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
Name:               hmatrix
Version:            0.17.0.2
License:            BSD3
License-file:       LICENSE
Author:             Alberto Ruiz
Maintainer:         Alberto Ruiz
Stability:          provisional
Homepage:           https://github.com/albertoruiz/hmatrix
Synopsis:           Numeric Linear Algebra
Description:        Linear systems, matrix decompositions, and other numerical computations based on BLAS and LAPACK.
                    .
                    Standard interface: "Numeric.LinearAlgebra".
                    .
                    Safer interface with statically checked dimensions: "Numeric.LinearAlgebra.Static".
                    .
                    Code examples: <http://dis.um.es/~alberto/hmatrix/hmatrix.html>

Category:           Math
tested-with:        GHC==7.10

cabal-version:      >=1.8

build-type:         Simple

extra-source-files: THANKS.md CHANGELOG

extra-source-files: src/Internal/C/lapack-aux.h

flag openblas
    description:    Link with OpenBLAS (https://github.com/xianyi/OpenBLAS) optimized libraries.
    default:        False
    manual: True

library

    Build-Depends:      base >= 4.8 && < 5,
                        binary,
                        array,
                        deepseq,
                        random,
                        split,
                        bytestring,
                        storable-complex,
                        vector >= 0.8

    hs-source-dirs:     src

    exposed-modules:    Numeric.LinearAlgebra
                        Numeric.LinearAlgebra.Devel
                        Numeric.LinearAlgebra.Data
                        Numeric.LinearAlgebra.HMatrix
                        Numeric.LinearAlgebra.Static

    other-modules:      Internal.Vector
                        Internal.Devel
                        Internal.Vectorized
                        Internal.Matrix
                        Internal.Foreign
                        Internal.ST
                        Internal.IO
                        Internal.Element
                        Internal.Conversion
                        Internal.LAPACK
                        Internal.Numeric
                        Internal.Algorithms
                        Internal.Random
                        Internal.Container
                        Internal.Sparse
                        Internal.Convolution
                        Internal.Chain
                        Numeric.Vector
                        Internal.CG
                        Numeric.Matrix
                        Internal.Util
                        Internal.Modular
                        Internal.Static

    C-sources:          src/Internal/C/lapack-aux.c
                        src/Internal/C/vector-aux.c


    extensions:         ForeignFunctionInterface,
                        CPP

    ghc-options:        -Wall
                        -fno-warn-missing-signatures
                        -fno-warn-orphans
                        -fprof-auto

    cc-options:         -O4 -Wall

    if arch(x86_64)
        cc-options:     -msse2
    if arch(i386)
        cc-options:     -msse2

    cpp-options:        -DBINARY

    if os(OSX)
        if flag(openblas)
            extra-lib-dirs:     /opt/local/lib/openblas/lib
            extra-libraries:    openblas
        else
            extra-libraries:    blas lapack

        extra-lib-dirs: /opt/local/lib/
        include-dirs: /opt/local/include/
        extra-lib-dirs: /usr/local/lib/
        include-dirs: /usr/local/include/
        if arch(i386)
            cc-options: -arch i386
        frameworks: Accelerate

    if os(freebsd)
        if flag(openblas)
            extra-lib-dirs:     /usr/local/lib/openblas/lib
            extra-libraries:    openblas
        else
            extra-libraries:    blas lapack

       extra-lib-dirs: /usr/local/lib
       include-dirs: /usr/local/include
       extra-libraries: gfortran

    if os(windows)
        if flag(openblas)
            extra-libraries:    libopenblas, libgcc_s_seh-1, libgfortran-3, libquadmath-0
        else
            extra-libraries:    blas lapack

    if os(linux)
        if flag(openblas)
            extra-lib-dirs:     /usr/lib/openblas/lib
            extra-libraries:    openblas
        else
            extra-libraries:    blas lapack

        if arch(x86_64)
            cc-options: -fPIC


source-repository head
    type:     git
    location: https://github.com/albertoruiz/hmatrix