diff options
author | Matias Elo <matias.elo@nokia.com> | 2021-01-20 16:06:48 -0600 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2021-01-26 09:48:50 +0200 |
commit | d07a44c6ed222746d661f3c6b91d3c7f3b5f799b (patch) | |
tree | 430a70ec268a2de373f0a0e3fb57cd48fa7ed050 /platform/linux-generic/arch/default/odp/api | |
parent | 963e485687025effa3a7619d1fae5d0817c3e6fe (diff) |
linux-gen: hash: prepare for arch specific implementations
Refactor build system to enable adding architecture specific hash function
implementations.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'platform/linux-generic/arch/default/odp/api')
-rw-r--r-- | platform/linux-generic/arch/default/odp/api/abi/hash_crc32.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/platform/linux-generic/arch/default/odp/api/abi/hash_crc32.h b/platform/linux-generic/arch/default/odp/api/abi/hash_crc32.h new file mode 100644 index 000000000..8759ed948 --- /dev/null +++ b/platform/linux-generic/arch/default/odp/api/abi/hash_crc32.h @@ -0,0 +1,37 @@ +/* Copyright (c) 2021, Nokia + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_API_ABI_HASH_CRC32_H_ +#define ODP_API_ABI_HASH_CRC32_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> + +uint32_t _odp_hash_crc32_generic(const void *data, uint32_t data_len, + uint32_t init_val); +uint32_t _odp_hash_crc32c_generic(const void *data, uint32_t data_len, + uint32_t init_val); + +static inline uint32_t _odp_hash_crc32(const void *data, uint32_t data_len, + uint32_t init_val) +{ + return _odp_hash_crc32_generic(data, data_len, init_val); +} + +static inline uint32_t _odp_hash_crc32c(const void *data, uint32_t data_len, + uint32_t init_val) +{ + return _odp_hash_crc32c_generic(data, data_len, init_val); +} + +#ifdef __cplusplus +} +#endif + +#endif |