forked from pydata/numexpr
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnumexpr_config.hpp
More file actions
47 lines (39 loc) · 1.15 KB
/
numexpr_config.hpp
File metadata and controls
47 lines (39 loc) · 1.15 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
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef NUMEXPR_CONFIG_HPP
#define NUMEXPR_CONFIG_HPP
// x86 platform works with unaligned reads and writes
// MW: I have seen exceptions to this when the compiler chooses to use aligned SSE
#if (defined(NPY_CPU_X86) || defined(NPY_CPU_AMD64))
# define USE_UNALIGNED_ACCESS 1
#endif
// #ifdef SCIPY_MKL_H
// #define USE_VML
// #endif
#ifdef USE_VML
/* The values below have been tuned for a Skylake processor (E3-1245 v5 @ 3.50GHz) */
#define BLOCK_SIZE1 1024
#else
/* The values below have been tuned for a Skylake processor (E3-1245 v5 @ 3.50GHz) */
#define BLOCK_SIZE1 1024
#endif
// The default threadpool size. It's prefer that the user set this via an
// environment variable, "NUMEXPR_MAX_THREADS"
#define DEFAULT_MAX_THREADS 64
#if defined(_WIN32)
#include "win32/pthread.h"
#include <process.h>
#define getpid _getpid
#else
#include <pthread.h>
#include "unistd.h"
#endif
#ifdef USE_VML
#include "mkl_vml.h"
#include "mkl_service.h"
#endif
#ifdef _WIN32
#ifndef __MINGW32__
#include "missing_posix_functions.hpp"
#endif
#include "msvc_function_stubs.hpp"
#endif
#endif // NUMEXPR_CONFIG_HPP