Commit eed724f3 authored by Astha Rai's avatar Astha Rai
Browse files

fixing some conflicts in utility files, another round of header guards

parent afff4356
...@@ -1075,23 +1075,6 @@ using uint8x64_t = typename vector_type<uint8_t, 64>::type; ...@@ -1075,23 +1075,6 @@ using uint8x64_t = typename vector_type<uint8_t, 64>::type;
template <typename T> template <typename T>
struct NumericLimits; struct NumericLimits;
template <typename T>
struct NumericLimits
{
__host__ __device__ static constexpr T Min() { return std::numeric_limits<T>::min(); }
__host__ __device__ static constexpr T Max() { return std::numeric_limits<T>::max(); }
__host__ __device__ static constexpr T Lowest() { return std::numeric_limits<T>::lowest(); }
__host__ __device__ static constexpr T QuietNaN()
{
return std::numeric_limits<T>::quiet_NaN();
}
__host__ __device__ static constexpr T Infinity() { return std::numeric_limits<T>::infinity(); }
};
template <> template <>
struct NumericLimits<int32_t> struct NumericLimits<int32_t>
{ {
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
#include "functional4.hpp" #include "functional4.hpp"
#include "tuple.hpp" #include "tuple.hpp"
#ifndef CK_CODE_GEN_RTC
#include "is_detected.hpp" #include "is_detected.hpp"
#endif
namespace ck { namespace ck {
...@@ -157,13 +159,17 @@ __host__ __device__ constexpr auto TupleReduce(F&& f, const Tuple<Ts...>& tuple) ...@@ -157,13 +159,17 @@ __host__ __device__ constexpr auto TupleReduce(F&& f, const Tuple<Ts...>& tuple)
} }
} }
#ifndef CK_CODE_GEN_RTC
template <typename T> template <typename T>
using is_tuple = decltype(std::declval<T&>().IsTuple()); using is_tuple = decltype(std::declval<T&>().IsTuple());
#endif
template <typename... Ts> template <typename... Ts>
__host__ __device__ constexpr auto IsNestedTuple(const Tuple<Ts...>&) __host__ __device__ constexpr auto IsNestedTuple(const Tuple<Ts...>&)
{ {
#ifndef CK_CODE_GEN_RTC
return (is_detected<is_tuple, Ts>::value || ...); return (is_detected<is_tuple, Ts>::value || ...);
#endif
} }
template <index_t depth = 0, typename T> template <index_t depth = 0, typename T>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment