Skip to content

Commit 35bad49

Browse files
Added __version__ into __init__
Removed unused struct Added default state into vml set and get functions
1 parent 581217f commit 35bad49

File tree

3 files changed

+11
-27
lines changed

3 files changed

+11
-27
lines changed

mkl-service/__init__.py

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@
2525

2626

2727
from ._py_mkl_service import *
28+
29+
30+
__version__ = '1.0.0'

mkl-service/_mkl_service.pxd

100644100755
Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -664,27 +664,6 @@ cdef inline __set_mpi(vendor, custom_library_name):
664664

665665

666666
# VM Service Functions
667-
__mkl_vml_mode = {
668-
'accuracy': {
669-
'ha': VML_HA,
670-
'la': VML_LA,
671-
'ep': VML_EP,
672-
},
673-
'ftzdaz': {
674-
'on': VML_FTZDAZ_ON,
675-
'off': VML_FTZDAZ_OFF,
676-
},
677-
'errmode': {
678-
'ignore': VML_ERRMODE_IGNORE,
679-
'errno': VML_ERRMODE_ERRNO,
680-
'stderr': VML_ERRMODE_STDERR,
681-
'except': VML_ERRMODE_EXCEPT,
682-
'callback': VML_ERRMODE_CALLBACK,
683-
'default': VML_ERRMODE_DEFAULT,
684-
},
685-
}
686-
687-
688667
cdef inline __vml_set_mode(accuracy, ftzdaz, errmode):
689668
"""
690669
Sets a new mode for VM functions according to the mode parameter and stores the previous VM mode to oldmode.
@@ -719,6 +698,7 @@ cdef inline __vml_set_mode(accuracy, ftzdaz, errmode):
719698
'ftzdaz': {
720699
VML_FTZDAZ_ON: 'on',
721700
VML_FTZDAZ_OFF: 'off',
701+
0: 'default',
722702
},
723703
'errmode': {
724704
VML_ERRMODE_IGNORE: 'ignore',
@@ -758,6 +738,7 @@ cdef inline __vml_get_mode():
758738
'ftzdaz': {
759739
VML_FTZDAZ_ON: 'on',
760740
VML_FTZDAZ_OFF: 'off',
741+
0: 'default',
761742
},
762743
'errmode': {
763744
VML_ERRMODE_IGNORE: 'ignore',
@@ -873,3 +854,5 @@ cdef inline __vml_clear_err_status():
873854

874855
status = __mkl_int_to_str(mkl_status, __variables['output'])
875856
return status
857+
858+
cpdef test()

setup.py

100644100755
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,12 @@
2626

2727

2828
from __future__ import division, print_function, absolute_import
29+
import re
2930

3031

31-
MAJOR = 1
32-
MINOR = 0
33-
MICRO = 0
34-
ISRELEASED = False
32+
with open('mkl-service/__init__.py', 'rt', encoding='utf8') as file:
33+
VERSION = re.search(r'__version__ = \'(.*?)\'', file.read()).group(1)
3534

36-
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
3735

3836
CLASSIFIERS = """\
3937
Development Status :: 5 - Production/Stable
@@ -83,7 +81,7 @@ def setup_package():
8381
maintainer_email="[email protected]",
8482
description="MKL Support Functions",
8583
long_description="""
86-
Intel® Math Kernel Library (Intel® MKL) support functions are
84+
Intel Math Kernel Library (Intel MKL) support functions are
8785
subdivided into the following groups according to their purpose:
8886
Version Information
8987
Threading Control

0 commit comments

Comments
 (0)