summaryrefslogtreecommitdiffhomepage
path: root/include/ocl
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-28 21:50:29 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-28 21:50:29 +0100
commit3df7cc4d199c263d5d9a606ddc211f4935d23e4c (patch)
treee84cd2c06239280f4864149d1799ae745fad042a /include/ocl
parenta185f437f42bd0215f212d11a0e23575945ea448 (diff)
feat: API: argument fixes for `throw_*` family of free functions.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/ocl')
-rw-r--r--include/ocl/allocator_op.hpp4
-rw-r--r--include/ocl/basic_hash.hpp2
-rw-r--r--include/ocl/detail/config.hpp4
-rw-r--r--include/ocl/equiv.hpp2
-rw-r--r--include/ocl/io.hpp2
-rw-r--r--include/ocl/option.hpp4
-rw-r--r--include/ocl/print.hpp4
-rw-r--r--include/ocl/smart_ptr.hpp2
-rw-r--r--include/ocl/tracked_ptr.hpp2
9 files changed, 15 insertions, 11 deletions
diff --git a/include/ocl/allocator_op.hpp b/include/ocl/allocator_op.hpp
index c4eea41..954a358 100644
--- a/include/ocl/allocator_op.hpp
+++ b/include/ocl/allocator_op.hpp
@@ -11,13 +11,15 @@
namespace ocl
{
-
+
/// @note these are guidelines on allocating a resource
template <typename type>
struct global_new_op final
{
using pointer_type = type*;
using const_pointer_type = const type*;
+ using pointer = type*;
+ using const_pointer = const type*;
auto alloc() -> pointer_type
{
diff --git a/include/ocl/basic_hash.hpp b/include/ocl/basic_hash.hpp
index 6edfe0b..852e67d 100644
--- a/include/ocl/basic_hash.hpp
+++ b/include/ocl/basic_hash.hpp
@@ -39,7 +39,7 @@ namespace ocl
return false;
}
};
-
+
} // namespace ocl
#endif
diff --git a/include/ocl/detail/config.hpp b/include/ocl/detail/config.hpp
index 9afbc22..9df8597 100644
--- a/include/ocl/detail/config.hpp
+++ b/include/ocl/detail/config.hpp
@@ -58,10 +58,12 @@ namespace ocl
namespace detail
{
- inline void throw_runtime_error(const boost::string_view& loc = BOOST_CURRENT_LOCATION.to_string())
+
+ inline void throw_runtime_error(const boost::source_location& loc = BOOST_CURRENT_LOCATION)
{
throw std::runtime_error(loc.to_string());
}
+
} // namespace detail
} // namespace ocl
diff --git a/include/ocl/equiv.hpp b/include/ocl/equiv.hpp
index a06d6b0..892fe5c 100644
--- a/include/ocl/equiv.hpp
+++ b/include/ocl/equiv.hpp
@@ -45,7 +45,7 @@ namespace ocl
{
static constexpr auto value = true;
};
-
+
} // namespace ocl
#endif
diff --git a/include/ocl/io.hpp b/include/ocl/io.hpp
index 7057e5f..f5cf2b5 100644
--- a/include/ocl/io.hpp
+++ b/include/ocl/io.hpp
@@ -33,7 +33,7 @@ namespace ocl::io
inline void_stream void_cout;
inline void_stream void_cin;
-
+
} // namespace ocl::io
#endif
diff --git a/include/ocl/option.hpp b/include/ocl/option.hpp
index 04618e9..e137302 100644
--- a/include/ocl/option.hpp
+++ b/include/ocl/option.hpp
@@ -24,7 +24,7 @@ namespace ocl
{
using option_error = std::runtime_error;
- inline void throw_option_invalid_type_error(const boost::string_view& loc = BOOST_CURRENT_LOCATION.to_string())
+ inline void throw_option_invalid_type_error(const boost::source_location& loc = BOOST_CURRENT_LOCATION)
{
throw option_error(loc.to_string());
}
@@ -148,7 +148,7 @@ namespace ocl
{
return return_type::invalid;
}
-
+
} // namespace ocl
#endif /* ifndef __OCL_CORE_OPTION */
diff --git a/include/ocl/print.hpp b/include/ocl/print.hpp
index fd1a0ea..374a151 100644
--- a/include/ocl/print.hpp
+++ b/include/ocl/print.hpp
@@ -44,7 +44,7 @@ namespace ocl::io
using io_error = std::runtime_error;
- inline void throw_option_invalid_type_error(const boost::string_view& loc = BOOST_CURRENT_LOCATION.to_string())
+ inline void throw_option_invalid_type_error(const boost::source_location& loc = BOOST_CURRENT_LOCATION)
{
throw io_error(loc.to_string());
}
@@ -76,7 +76,7 @@ namespace ocl::io
print(fmt...);
lf();
}
-
+
} // namespace ocl::io
#endif // ifndef __OCL_CORE_PRINT
diff --git a/include/ocl/smart_ptr.hpp b/include/ocl/smart_ptr.hpp
index 92c63fe..23400e2 100644
--- a/include/ocl/smart_ptr.hpp
+++ b/include/ocl/smart_ptr.hpp
@@ -26,7 +26,7 @@ namespace ocl
{
return shared_ptr<Type>{object, boost::null_deleter{}};
}
-
+
} // namespace ocl
#endif // ifndef __OCL_SMART_PTR
diff --git a/include/ocl/tracked_ptr.hpp b/include/ocl/tracked_ptr.hpp
index 30f0913..4c1ab8f 100644
--- a/include/ocl/tracked_ptr.hpp
+++ b/include/ocl/tracked_ptr.hpp
@@ -231,7 +231,7 @@ namespace ocl
detail::throw_tracked_error();
}
}
-
+
} // namespace ocl
#endif // ifndef __OCL_TRACKED_PTR