mirror of
https://github.com/OpenMathLib/OpenBLAS
synced 2026-05-31 00:45:48 +08:00
Add WebAssembly/Emscripten as a dedicated architecute and target
This commit is contained in:
18
getarch.c
18
getarch.c
@@ -1232,6 +1232,20 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#else
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_WASM128_GENERIC
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "WASM"
|
||||
#define SUBARCHITECTURE "WASM128_GENERIC"
|
||||
#define SUBDIRNAME "wasm"
|
||||
#define ARCHCONFIG "-DWASM128_GENERIC " \
|
||||
"-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
|
||||
"-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
|
||||
"-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
|
||||
#define LIBNAME "wasm128"
|
||||
#define CORENAME "WASM128_GENERIC"
|
||||
#else
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_CORTEXA15
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "ARM"
|
||||
@@ -1949,6 +1963,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define OPENBLAS_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifdef __wasm__
|
||||
#define OPENBLAS_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifndef OPENBLAS_SUPPORTED
|
||||
#error "This arch/CPU is not supported by OpenBLAS."
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user