Skip to content

Remove remaining anonymous namespaces from headers #2135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dpctl/memory/_opaque_smart_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <exception>
#include <iostream>

namespace
namespace detail
{

class USMDeleter
Expand All @@ -65,11 +65,11 @@ class USMDeleter
::sycl::context _context;
};

} // end of anonymous namespace
} // namespace detail

void *OpaqueSmartPtr_Make(void *usm_ptr, const sycl::queue &q)
{
USMDeleter _deleter(q);
detail::USMDeleter _deleter(q);
auto sptr = new std::shared_ptr<void>(usm_ptr, std::move(_deleter));

return reinterpret_cast<void *>(sptr);
Expand Down
16 changes: 8 additions & 8 deletions dpctl/tensor/libtensor/source/sorting/rich_comparisons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace tensor
namespace py_internal
{

namespace
namespace detail
{
template <typename fpT> struct ExtendedRealFPLess
{
Expand Down Expand Up @@ -103,30 +103,30 @@ inline constexpr bool is_fp_v =
(std::is_same_v<T, sycl::half> || std::is_same_v<T, float> ||
std::is_same_v<T, double>);

} // end of anonymous namespace
} // end of namespace detail

template <typename argTy> struct AscendingSorter
{
using type = std::conditional_t<is_fp_v<argTy>,
ExtendedRealFPLess<argTy>,
using type = std::conditional_t<detail::is_fp_v<argTy>,
detail::ExtendedRealFPLess<argTy>,
std::less<argTy>>;
};

template <typename T> struct AscendingSorter<std::complex<T>>
{
using type = ExtendedComplexFPLess<std::complex<T>>;
using type = detail::ExtendedComplexFPLess<std::complex<T>>;
};

template <typename argTy> struct DescendingSorter
{
using type = std::conditional_t<is_fp_v<argTy>,
ExtendedRealFPGreater<argTy>,
using type = std::conditional_t<detail::is_fp_v<argTy>,
detail::ExtendedRealFPGreater<argTy>,
std::greater<argTy>>;
};

template <typename T> struct DescendingSorter<std::complex<T>>
{
using type = ExtendedComplexFPGreater<std::complex<T>>;
using type = detail::ExtendedComplexFPGreater<std::complex<T>>;
};

} // end of namespace py_internal
Expand Down