-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
35 lines (31 loc) · 1.19 KB
/
Copy pathsetup.py
File metadata and controls
35 lines (31 loc) · 1.19 KB
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
import os
from distutils.core import setup, Extension
import numpy as np
exts = []
customcpu_backend = Extension('indigo.backends._customcpu',
sources = ['indigo/backends/_customcpu.c'],
include_dirs=[np.get_include()],
extra_compile_args = ['-std=c11', '-fopenmp', '-m64', '-O3', '-Wno-unknown-pragmas'],
extra_link_args=['-fopenmp', '-mavx'],
)
exts.append(customcpu_backend)
if os.path.exists( 'indigo/backends/libgpu.a' ):
customgpu_backend = Extension('indigo.backends._customgpu',
sources = ['indigo/backends/_customgpu.c'],
include_dirs=[np.get_include()],
extra_compile_args = ['-std=c11'],
extra_link_args=['indigo/backends/libgpu.a', '-L/usr/local/cuda/lib64', '-lcudart', '-lcublas', '-lstdc++'],
)
exts.append(customgpu_backend)
setup(
name = 'indigo',
description = 'Fast linear operators for image reconstruction.',
packages = ['indigo', 'indigo.backends'],
version = '1.0.5',
author = 'Michael Driscoll',
author_email = 'mbdriscoll@gmail.com',
license = 'BSD',
url = 'https://mbdriscoll.github.io/indigo/',
download_url = 'https://github.com/mbdriscoll/indigo/archive/master.zip',
ext_modules = exts,
)