Coverage for starry/_core/ops/limbdark/base_op.py : 92%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# -*- coding: utf-8 -*-
2from theano import gof
3import sys
4import pkg_resources
5from ....starry_version import __version__
7__all__ = ["LimbDarkBaseOp"]
10class LimbDarkBaseOp(gof.COp):
12 __props__ = ()
13 func_file = None
14 func_name = None
16 def __init__(self):
17 super(LimbDarkBaseOp, self).__init__(self.func_file, self.func_name)
19 def c_code_cache_version(self):
20 if "dev" in __version__:
21 return ()
22 return tuple(map(int, __version__.split(".")))
24 def c_headers(self, compiler):
25 return [
26 "theano_helpers.h",
27 "ellip.h",
28 "limbdark.h",
29 "utils.h",
30 "vector",
31 ]
33 def c_header_dirs(self, compiler):
34 dirs = [
35 pkg_resources.resource_filename("starry", "_core/ops/lib/include")
36 ]
37 dirs += [
38 pkg_resources.resource_filename(
39 "starry", "_core/ops/lib/vendor/eigen_3.3.5"
40 )
41 ]
42 return dirs
44 def c_compile_args(self, compiler):
45 opts = ["-std=c++11", "-O2", "-DNDEBUG"]
46 if sys.platform == "darwin":
47 opts += ["-stdlib=libc++", "-mmacosx-version-min=10.7"]
48 return opts