diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-21 11:11:23 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-21 11:11:23 +0100 |
| commit | 185335e8efcac46e96e25e5a50e0d4b93152f983 (patch) | |
| tree | 8b5f824d4913aa7a3d3e70df0aaa6c0980b81122 /include/ocl/basic_hash.hpp | |
| parent | 646d97f28c2891d634e3066535524fa28e297045 (diff) | |
feat: New release of `OCL.Core`, standalone module.v3.0
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/ocl/basic_hash.hpp')
| -rw-r--r-- | include/ocl/basic_hash.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/ocl/basic_hash.hpp b/include/ocl/basic_hash.hpp new file mode 100644 index 0000000..6a39df2 --- /dev/null +++ b/include/ocl/basic_hash.hpp @@ -0,0 +1,23 @@ +#ifndef __OCL_CORE_BASIC_HASH +#define __OCL_CORE_BASIC_HASH + +#include <ocl/detail/config.hpp> + +/// @brief OCL equivalence namespace. +namespace ocl +{ + template <class T> + struct basic_hash final + { + using result_type = typename T::result_type; + using type = T; + + // AMLALE: If it throws, we can't compute the hash correctly. + constexpr result_type hash() noexcept + { + return type{}.hash(); + } + }; +} + +#endif
\ No newline at end of file |
