Skip to content
Snippets Groups Projects
Commit 5f93063f authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

EnumDict.h: Small fixes.

parent 76676049
No related branches found
No related tags found
1 merge request!1686EnumDict.h: Small fixes.
Pipeline #27582 passed
......@@ -7,13 +7,14 @@
#include <boost/algorithm/string/predicate.hpp>
#include <algorithm>
#include <iostream>
#include <iosfwd>
#include <optional>
#include <stdexcept>
#include <string_view>
#include <vector>
#include <fmt/format.h>
#include <xpu/defines.h>
namespace cbm::algo
{
......@@ -57,6 +58,7 @@ namespace cbm::algo
}
} // namespace cbm::algo
#if XPU_IS_CPU
/**
* @brief Convert enums to strings and back.
*
......@@ -87,7 +89,10 @@ namespace cbm::algo
template<> \
struct cbm::algo::detail::EnumHasDict<type> : std::true_type { \
}
#else // XPU_IS_CPU
// Disable macro in GPU code, causes some issues with nvcc
#define CBM_ENUM_DICT(type, ...)
#endif // XPU_IS_CPU
// Stream operators for enums
// Placed in global namespace to be found by ADL e.g. for std::ostream_iterator
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment