1#!/bin/sh 2# Copyright 2020 Google LLC 3# 4# This source code is licensed under the BSD-style license found in the 5# LICENSE file in the root directory of this source tree. 6 7#################################### Scalar ################################### 8### Generic C micro-kernels 9tools/xngen src/f32-clamp/scalar.c.in -D BATCH_TILE=1 -D WASM=0 -o src/f32-clamp/gen/scalar-x1.c 10tools/xngen src/f32-clamp/scalar.c.in -D BATCH_TILE=2 -D WASM=0 -o src/f32-clamp/gen/scalar-x2.c 11tools/xngen src/f32-clamp/scalar.c.in -D BATCH_TILE=4 -D WASM=0 -o src/f32-clamp/gen/scalar-x4.c 12 13### WAsm-specific micro-kernels 14tools/xngen src/f32-clamp/scalar.c.in -D BATCH_TILE=1 -D WASM=1 -o src/f32-clamp/gen/wasm-x1.c 15tools/xngen src/f32-clamp/scalar.c.in -D BATCH_TILE=2 -D WASM=1 -o src/f32-clamp/gen/wasm-x2.c 16tools/xngen src/f32-clamp/scalar.c.in -D BATCH_TILE=4 -D WASM=1 -o src/f32-clamp/gen/wasm-x4.c 17 18################################## WAsm SIMD ################################## 19tools/xngen src/f32-clamp/wasmsimd.c.in -D BATCH_TILE=4 -D X86=0 -o src/f32-clamp/gen/wasmsimd-arm-x4.c 20tools/xngen src/f32-clamp/wasmsimd.c.in -D BATCH_TILE=8 -D X86=0 -o src/f32-clamp/gen/wasmsimd-arm-x8.c 21 22tools/xngen src/f32-clamp/wasmsimd.c.in -D BATCH_TILE=4 -D X86=1 -o src/f32-clamp/gen/wasmsimd-x86-x4.c 23tools/xngen src/f32-clamp/wasmsimd.c.in -D BATCH_TILE=8 -D X86=1 -o src/f32-clamp/gen/wasmsimd-x86-x8.c 24 25################################### ARM NEON ################################## 26tools/xngen src/f32-clamp/neon.c.in -D BATCH_TILE=4 -o src/f32-clamp/gen/neon-x4.c 27tools/xngen src/f32-clamp/neon.c.in -D BATCH_TILE=8 -o src/f32-clamp/gen/neon-x8.c 28 29################################# x86 128-bit ################################# 30tools/xngen src/f32-clamp/sse.c.in -D BATCH_TILE=4 -o src/f32-clamp/gen/sse-x4.c 31tools/xngen src/f32-clamp/sse.c.in -D BATCH_TILE=8 -o src/f32-clamp/gen/sse-x8.c 32 33################################# x86 256-bit ################################# 34tools/xngen src/f32-clamp/avx.c.in -D BATCH_TILE=8 -o src/f32-clamp/gen/avx-x8.c 35tools/xngen src/f32-clamp/avx.c.in -D BATCH_TILE=16 -o src/f32-clamp/gen/avx-x16.c 36 37################################# x86 512-bit ################################# 38tools/xngen src/f32-clamp/avx512f.c.in -D BATCH_TILE=16 -o src/f32-clamp/gen/avx512f-x16.c 39tools/xngen src/f32-clamp/avx512f.c.in -D BATCH_TILE=32 -o src/f32-clamp/gen/avx512f-x32.c 40 41################################## Unit tests ################################# 42tools/generate-clamp-test.py --spec test/f32-clamp.yaml --output test/f32-clamp.cc 43