diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-24 12:41:59 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-24 12:41:59 +0100 |
| commit | e476868bdc27ef0e36fc2485606634e7cf2ee00d (patch) | |
| tree | 462942c7e71c4c27cff6c32240f10a1726960a87 /include | |
| parent | 39a1ddf997daf1e4879b2e0cb2bd30ad6db2204c (diff) | |
feat: new alias for `allocator_op.hpp` pool types.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/ocl/allocator_op.hpp | 6 | ||||
| -rw-r--r-- | include/ocl/basic_hash.hpp | 4 | ||||
| -rw-r--r-- | include/ocl/detail/config.hpp | 16 | ||||
| -rw-r--r-- | include/ocl/option.hpp | 2 | ||||
| -rw-r--r-- | include/ocl/print.hpp | 4 |
5 files changed, 17 insertions, 15 deletions
diff --git a/include/ocl/allocator_op.hpp b/include/ocl/allocator_op.hpp index 86bfa56..f40001f 100644 --- a/include/ocl/allocator_op.hpp +++ b/include/ocl/allocator_op.hpp @@ -17,7 +17,8 @@ namespace ocl template <typename type> struct global_new_op final { - using pointer_type = type*; + using pointer_type = type*; + using const_pointer_type = const type*; auto alloc() -> pointer_type { @@ -41,6 +42,7 @@ namespace ocl struct global_array_delete_op final { using pointer_type = type*; + using const_pointer_type = const type*; auto operator()(pointer_type t) -> void { @@ -48,7 +50,7 @@ namespace ocl } }; - /// \brief Allocator operations structure. Takes care of memory mgmt within a pool. + /// \brief Allocator operations structure. Takes care of memory mgmt within a pool. template <typename ret_type, typename allocator_new, typename allocator_delete> class allocator_op { diff --git a/include/ocl/basic_hash.hpp b/include/ocl/basic_hash.hpp index 3704bff..a6978fc 100644 --- a/include/ocl/basic_hash.hpp +++ b/include/ocl/basic_hash.hpp @@ -12,7 +12,7 @@ /// @brief OCL equivalence namespace. namespace ocl { - /// \brief Hash helper. + /// \brief Hash helper. template <class T> struct basic_hash { @@ -26,7 +26,7 @@ namespace ocl } }; - /// \brief For all boolean types, return false as they are not hashable + /// \brief For all boolean types, return false as they are not hashable template <> struct basic_hash<bool> { diff --git a/include/ocl/detail/config.hpp b/include/ocl/detail/config.hpp index 8ddb7e9..16a74ac 100644 --- a/include/ocl/detail/config.hpp +++ b/include/ocl/detail/config.hpp @@ -55,13 +55,13 @@ namespace ocl { - namespace detail - { - inline void throw_runtime_error(const boost::string_view& loc = BOOST_CURRENT_LOCATION.to_string()) - { - throw std::runtime_error(loc.to_string()); - } - } -} + namespace detail + { + inline void throw_runtime_error(const boost::string_view& loc = BOOST_CURRENT_LOCATION.to_string()) + { + throw std::runtime_error(loc.to_string()); + } + } // namespace detail +} // namespace ocl #endif diff --git a/include/ocl/option.hpp b/include/ocl/option.hpp index 93e01c7..7f66579 100644 --- a/include/ocl/option.hpp +++ b/include/ocl/option.hpp @@ -53,7 +53,7 @@ namespace ocl if (ret_ == return_type::err) { io::println(input ? input : "option::error"); - detail::throw_option_invalid_type_error(); + detail::throw_option_invalid_type_error(); } return *this; diff --git a/include/ocl/print.hpp b/include/ocl/print.hpp index 70b79dd..98c4d6b 100644 --- a/include/ocl/print.hpp +++ b/include/ocl/print.hpp @@ -43,13 +43,13 @@ namespace ocl::io { inline bool is_stdio_sync = true; - using io_error = std::runtime_error; + using io_error = std::runtime_error; inline void throw_option_invalid_type_error(const boost::string_view& loc = BOOST_CURRENT_LOCATION.to_string()) { throw io_error(loc.to_string()); } - } + } // namespace detail inline void enable_stdio_sync(const bool& enable) noexcept { |
