diff options
author | Matthew Bentham <Matthew.Bentham@arm.com> | 2023-05-31 13:18:33 +0000 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2023-06-26 12:44:15 +0000 |
commit | 7d9a78ebfb3553b95421a0da5e2686a3923748db (patch) | |
tree | 666915383e31a9da81f2605f7023c0e85e8226b3 /src/cpu/CpuTypes.h | |
parent | a2bb80ea7111509c24caad8629533089decef430 (diff) | |
download | ComputeLibrary-7d9a78ebfb3553b95421a0da5e2686a3923748db.tar.gz |
Remove dependency on fp16 definitions from some core include files
This significantly improves the compilation times for parts of the core library that just need
a definition of float16_t rather than access to all of the fp16 intrinsics.
Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com>
Change-Id: I5da1c6b0df0dd87d1d17948cd2e9b7375874f455
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/529385
Tested-by: bsgcomp <bsgcomp@arm.com>
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9781
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/cpu/CpuTypes.h')
-rw-r--r-- | src/cpu/CpuTypes.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/cpu/CpuTypes.h b/src/cpu/CpuTypes.h new file mode 100644 index 0000000000..0f7b9b6552 --- /dev/null +++ b/src/cpu/CpuTypes.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2023 Arm Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#ifndef ARM_COMPUTE_CPUTYPES +#define ARM_COMPUTE_CPUTYPES + +namespace arm_compute +{ +/* Type definitions compatible with arm_neon.h and arm_sve.h */ +#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC +typedef __fp16 float16_t; +#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC +typedef float float32_t; +} + +#endif /* ARM_COMPUTE_CPUTYPES */ |