// Copyright 2021 Google LLC // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. #include #include #include #include #include void xnn_math_f32_roundd__wasmsimd_native( size_t n, const float* input, float* output) { assert(n % (4 * sizeof(float)) == 0); for (; n != 0; n -= 4 * sizeof(float)) { const v128_t vx = wasm_v128_load(input); input += 4; const v128_t vy = wasm_f32x4_floor(vx); wasm_v128_store(output, vy); output += 4; } }