Drop use of weak symbols to select the type conversion
functions. Select NEON implementation only on Aarch64
builds. Enable windows build.

Fixes: 3c54f91ad8c9 ("mldev: disable build on Windows")

Signed-off-by: Srikanth Yalavarthi <syalavar...@marvell.com>
---
 lib/mldev/meson.build          |  9 ++-------
 lib/mldev/mldev_utils_scalar.c | 24 ++++++++++++------------
 2 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/lib/mldev/meson.build b/lib/mldev/meson.build
index 51ba809465..c9db42257b 100644
--- a/lib/mldev/meson.build
+++ b/lib/mldev/meson.build
@@ -1,21 +1,16 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright (c) 2022 Marvell.
 
-if is_windows
-    build = false
-    reason = 'not supported on Windows'
-    subdir_done()
-endif
-
 sources = files(
         'rte_mldev_pmd.c',
         'rte_mldev.c',
         'mldev_utils.c',
-        'mldev_utils_scalar.c',
 )
 
 if dpdk_conf.has('RTE_ARCH_ARM64')
     sources += files('mldev_utils_neon.c')
+else
+    sources += files('mldev_utils_scalar.c')
 endif
 
 headers = files(
diff --git a/lib/mldev/mldev_utils_scalar.c b/lib/mldev/mldev_utils_scalar.c
index 40320ed3ef..322b009f5d 100644
--- a/lib/mldev/mldev_utils_scalar.c
+++ b/lib/mldev/mldev_utils_scalar.c
@@ -84,7 +84,7 @@ union float32 {
        uint32_t u;
 };
 
-__rte_weak int
+int
 rte_ml_io_float32_to_int8(float scale, uint64_t nb_elements, void *input, void 
*output)
 {
        float *input_buffer;
@@ -116,7 +116,7 @@ rte_ml_io_float32_to_int8(float scale, uint64_t 
nb_elements, void *input, void *
        return 0;
 }
 
-__rte_weak int
+int
 rte_ml_io_int8_to_float32(float scale, uint64_t nb_elements, void *input, void 
*output)
 {
        int8_t *input_buffer;
@@ -139,7 +139,7 @@ rte_ml_io_int8_to_float32(float scale, uint64_t 
nb_elements, void *input, void *
        return 0;
 }
 
-__rte_weak int
+int
 rte_ml_io_float32_to_uint8(float scale, uint64_t nb_elements, void *input, 
void *output)
 {
        float *input_buffer;
@@ -171,7 +171,7 @@ rte_ml_io_float32_to_uint8(float scale, uint64_t 
nb_elements, void *input, void
        return 0;
 }
 
-__rte_weak int
+int
 rte_ml_io_uint8_to_float32(float scale, uint64_t nb_elements, void *input, 
void *output)
 {
        uint8_t *input_buffer;
@@ -194,7 +194,7 @@ rte_ml_io_uint8_to_float32(float scale, uint64_t 
nb_elements, void *input, void
        return 0;
 }
 
-__rte_weak int
+int
 rte_ml_io_float32_to_int16(float scale, uint64_t nb_elements, void *input, 
void *output)
 {
        float *input_buffer;
@@ -226,7 +226,7 @@ rte_ml_io_float32_to_int16(float scale, uint64_t 
nb_elements, void *input, void
        return 0;
 }
 
-__rte_weak int
+int
 rte_ml_io_int16_to_float32(float scale, uint64_t nb_elements, void *input, 
void *output)
 {
        int16_t *input_buffer;
@@ -249,7 +249,7 @@ rte_ml_io_int16_to_float32(float scale, uint64_t 
nb_elements, void *input, void
        return 0;
 }
 
-__rte_weak int
+int
 rte_ml_io_float32_to_uint16(float scale, uint64_t nb_elements, void *input, 
void *output)
 {
        float *input_buffer;
@@ -281,7 +281,7 @@ rte_ml_io_float32_to_uint16(float scale, uint64_t 
nb_elements, void *input, void
        return 0;
 }
 
-__rte_weak int
+int
 rte_ml_io_uint16_to_float32(float scale, uint64_t nb_elements, void *input, 
void *output)
 {
        uint16_t *input_buffer;
@@ -429,7 +429,7 @@ __float32_to_float16_scalar_rtn(float x)
        return u16;
 }
 
-__rte_weak int
+int
 rte_ml_io_float32_to_float16(uint64_t nb_elements, void *input, void *output)
 {
        float *input_buffer;
@@ -513,7 +513,7 @@ __float16_to_float32_scalar_rtx(uint16_t f16)
        return f32.f;
 }
 
-__rte_weak int
+int
 rte_ml_io_float16_to_float32(uint64_t nb_elements, void *input, void *output)
 {
        uint16_t *input_buffer;
@@ -614,7 +614,7 @@ __float32_to_bfloat16_scalar_rtn(float x)
        return u16;
 }
 
-__rte_weak int
+int
 rte_ml_io_float32_to_bfloat16(uint64_t nb_elements, void *input, void *output)
 {
        float *input_buffer;
@@ -696,7 +696,7 @@ __bfloat16_to_float32_scalar_rtx(uint16_t f16)
        return f32.f;
 }
 
-__rte_weak int
+int
 rte_ml_io_bfloat16_to_float32(uint64_t nb_elements, void *input, void *output)
 {
        uint16_t *input_buffer;
-- 
2.17.1

Reply via email to