@@ -36,7 +36,7 @@ cpdef get_version():
36
36
return __get_version()
37
37
38
38
39
- def get_version_string ():
39
+ cpdef get_version_string():
40
40
"""
41
41
Returns the Intel MKL version in a character string.
42
42
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-get-version-string
@@ -45,55 +45,55 @@ def get_version_string():
45
45
46
46
47
47
# Threading
48
- def set_num_threads (num_threads ):
48
+ cpdef set_num_threads(num_threads):
49
49
"""
50
50
Specifies the number of OpenMP* threads to use.
51
51
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-set-num-threads
52
52
"""
53
53
return __set_num_threads(num_threads)
54
54
55
55
56
- def domain_set_num_threads (num_threads , domain = ' all' ):
56
+ cpdef domain_set_num_threads(num_threads, domain = ' all' ):
57
57
"""
58
58
Specifies the number of OpenMP* threads for a particular function domain.
59
59
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-domain-set-num-threads
60
60
"""
61
61
return __domain_set_num_threads(num_threads, domain)
62
62
63
63
64
- def set_num_threads_local (num_threads ):
64
+ cpdef set_num_threads_local(num_threads):
65
65
"""
66
66
Specifies the number of OpenMP* threads for all Intel MKL functions on the current execution thread.
67
67
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-set-num-threads-local
68
68
"""
69
69
return __set_num_threads_local(num_threads)
70
70
71
71
72
- def set_dynamic (enable ):
72
+ cpdef set_dynamic(enable):
73
73
"""
74
74
Enables Intel MKL to dynamically change the number of OpenMP* threads.
75
75
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-set-dynamic
76
76
"""
77
77
return __set_dynamic(enable)
78
78
79
79
80
- def get_max_threads ():
80
+ cpdef get_max_threads():
81
81
"""
82
82
Gets the number of OpenMP* threads targeted for parallelism.
83
83
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-get-max-threads
84
84
"""
85
85
return __get_max_threads()
86
86
87
87
88
- def domain_get_max_threads (domain = ' all' ):
88
+ cpdef domain_get_max_threads(domain = ' all' ):
89
89
"""
90
90
Gets the number of OpenMP* threads targeted for parallelism for a particular function domain.
91
91
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-domain-get-max-threads
92
92
"""
93
93
return __domain_get_max_threads(domain)
94
94
95
95
96
- def get_dynamic ():
96
+ cpdef get_dynamic():
97
97
"""
98
98
Determines whether Intel MKL is enabled to dynamically change the number of OpenMP* threads.
99
99
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-get-dynamic
@@ -102,7 +102,7 @@ def get_dynamic():
102
102
103
103
104
104
# Timing
105
- def second ():
105
+ cpdef second():
106
106
"""
107
107
Returns elapsed time in seconds.
108
108
Use to estimate real time between two calls to this function.
@@ -111,7 +111,7 @@ def second():
111
111
return __second()
112
112
113
113
114
- def dsecnd ():
114
+ cpdef dsecnd():
115
115
"""
116
116
Returns elapsed time in seconds.
117
117
Use to estimate real time between two calls to this function.
@@ -120,31 +120,31 @@ def dsecnd():
120
120
return __dsecnd()
121
121
122
122
123
- def get_cpu_clocks ():
123
+ cpdef get_cpu_clocks():
124
124
"""
125
125
Returns elapsed CPU clocks.
126
126
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-get-cpu-clocks
127
127
"""
128
128
return __get_cpu_clocks()
129
129
130
130
131
- def get_cpu_frequency ():
131
+ cpdef get_cpu_frequency():
132
132
"""
133
133
Returns the current CPU frequency value in GHz.
134
134
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-get-cpu-frequency
135
135
"""
136
136
return __get_cpu_frequency()
137
137
138
138
139
- def get_max_cpu_frequency ():
139
+ cpdef get_max_cpu_frequency():
140
140
"""
141
141
Returns the maximum CPU frequency value in GHz.
142
142
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-get-max-cpu-frequency
143
143
"""
144
144
return __get_max_cpu_frequency()
145
145
146
146
147
- def get_clocks_frequency ():
147
+ cpdef get_clocks_frequency():
148
148
"""
149
149
Returns the frequency value in GHz based on constant-rate Time Stamp Counter.
150
150
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-get-clocks-frequency
@@ -153,47 +153,47 @@ def get_clocks_frequency():
153
153
154
154
155
155
# Memory Management. See the Intel MKL Developer Guide for more memory usage information.
156
- def free_buffers ():
156
+ cpdef free_buffers():
157
157
"""
158
158
Frees unused memory allocated by the Intel MKL Memory Allocator.
159
159
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-free-buffers
160
160
"""
161
161
__free_buffers()
162
162
163
163
164
- def thread_free_buffers ():
164
+ cpdef thread_free_buffers():
165
165
"""
166
166
Frees unused memory allocated by the Intel MKL Memory Allocator in the current thread.
167
167
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-thread-free-buffers
168
168
"""
169
169
__thread_free_buffers()
170
170
171
171
172
- def disable_fast_mm ():
172
+ cpdef disable_fast_mm():
173
173
"""
174
174
Turns off the Intel MKL Memory Allocator for Intel MKL functions to directly use the system malloc/free functions.
175
175
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-disable-fast-mm
176
176
"""
177
177
return __disable_fast_mm()
178
178
179
179
180
- def mem_stat ():
180
+ cpdef mem_stat():
181
181
"""
182
182
Reports the status of the Intel MKL Memory Allocator.
183
183
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-mem-stat
184
184
"""
185
185
return __mem_stat()
186
186
187
187
188
- def peak_mem_usage (mem_const ):
188
+ cpdef peak_mem_usage(mem_const):
189
189
"""
190
190
Reports the peak memory allocated by the Intel MKL Memory Allocator.
191
191
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-peak-mem-usage
192
192
"""
193
193
return __peak_mem_usage(mem_const)
194
194
195
195
196
- def set_memory_limit (limit ):
196
+ cpdef set_memory_limit(limit):
197
197
"""
198
198
On Linux, sets the limit of memory that Intel MKL can allocate for a specified type of memory.
199
199
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-set-memory-limit
@@ -202,23 +202,23 @@ def set_memory_limit(limit):
202
202
203
203
204
204
# Conditional Numerical Reproducibility
205
- def cbwr_set (branch = None ):
205
+ cpdef cbwr_set(branch = None ):
206
206
"""
207
207
Configures the CNR mode of Intel MKL.
208
208
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-cbwr-set
209
209
"""
210
210
return __cbwr_set(branch)
211
211
212
212
213
- def cbwr_get (cnr_const = None ):
213
+ cpdef cbwr_get(cnr_const = None ):
214
214
"""
215
215
Returns the current CNR settings.
216
216
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-cbwr-get
217
217
"""
218
218
return __cbwr_get(cnr_const)
219
219
220
220
221
- def cbwr_get_auto_branch ():
221
+ cpdef cbwr_get_auto_branch():
222
222
"""
223
223
Automatically detects the CNR code branch for your platform.
224
224
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-cbwr-get-auto-branch
@@ -227,39 +227,39 @@ def cbwr_get_auto_branch():
227
227
228
228
229
229
# Miscellaneous
230
- def enable_instructions (isa = None ):
230
+ cpdef enable_instructions(isa = None ):
231
231
"""
232
232
Enables dispatching for new Intel architectures or restricts the set of Intel instruction sets available for dispatching.
233
233
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-enable-instructions
234
234
"""
235
235
return __enable_instructions(isa)
236
236
237
237
238
- def set_env_mode ():
238
+ cpdef set_env_mode():
239
239
"""
240
240
Sets up the mode that ignores environment settings specific to Intel MKL. See mkl_set_env_mode(1).
241
241
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-set-env-mode
242
242
"""
243
243
return __set_env_mode()
244
244
245
245
246
- def get_env_mode ():
246
+ cpdef get_env_mode():
247
247
"""
248
248
Query the current environment mode. See mkl_set_env_mode(0).
249
249
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-set-env-mode
250
250
"""
251
251
return __get_env_mode()
252
252
253
253
254
- def verbose (enable ):
254
+ cpdef verbose(enable):
255
255
"""
256
256
Enables or disables Intel MKL Verbose mode.
257
257
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-verbose
258
258
"""
259
259
return __verbose(enable)
260
260
261
261
262
- def set_mpi (vendor , custom_library_name ):
262
+ cpdef set_mpi(vendor, custom_library_name):
263
263
"""
264
264
Sets the implementation of the message-passing interface to be used by Intel MKL.
265
265
https://software.intel.com/en-us/mkl-developer-reference-c-mkl-set-mpi
@@ -268,39 +268,39 @@ def set_mpi(vendor, custom_library_name):
268
268
269
269
270
270
# VM Service Functions
271
- def vml_set_mode (accuracy , ftzdaz , errmode ):
271
+ cpdef vml_set_mode(accuracy, ftzdaz, errmode):
272
272
"""
273
273
Sets a new mode for VM functions according to the mode parameter and stores the previous VM mode to oldmode.
274
274
https://software.intel.com/en-us/mkl-developer-reference-c-vmlsetmode
275
275
"""
276
276
return __vml_set_mode(accuracy, ftzdaz, errmode)
277
277
278
278
279
- def vml_get_mode ():
279
+ cpdef vml_get_mode():
280
280
"""
281
281
Gets the VM mode.
282
282
https://software.intel.com/en-us/mkl-developer-reference-c-vmlgetmode
283
283
"""
284
284
return __vml_get_mode()
285
285
286
286
287
- def vml_set_err_status (status ):
287
+ cpdef vml_set_err_status(status):
288
288
"""
289
289
Sets the new VM Error Status according to err and stores the previous VM Error Status to olderr.
290
290
https://software.intel.com/en-us/mkl-developer-reference-c-vmlseterrstatus
291
291
"""
292
292
return __vml_set_err_status(status)
293
293
294
294
295
- def vml_get_err_status ():
295
+ cpdef vml_get_err_status():
296
296
"""
297
297
Gets the VM Error Status.
298
298
https://software.intel.com/en-us/mkl-developer-reference-c-vmlgeterrstatus
299
299
"""
300
300
return __vml_get_err_status()
301
301
302
302
303
- def vml_clear_err_status ():
303
+ cpdef vml_clear_err_status():
304
304
"""
305
305
Sets the VM Error Status to VML_STATUS_OK and stores the previous VM Error Status to olderr.
306
306
https://software.intel.com/en-us/mkl-developer-reference-c-vmlclearerrstatus
0 commit comments