#ifndef CK_INTEGRAL_CONSTANT_HPP #define CK_INTEGRAL_CONSTANT_HPP namespace ck { template struct integral_constant { static constexpr T value = v; typedef T value_type; typedef integral_constant type; // using injected-class-name __host__ __device__ constexpr operator value_type() const noexcept { return value; } __host__ __device__ constexpr value_type operator()() const noexcept { return value; } // since c++14 }; template __host__ __device__ constexpr auto operator+(integral_constant, integral_constant) { return integral_constant{}; } template __host__ __device__ constexpr auto operator*(integral_constant, integral_constant) { return integral_constant{}; } template using Number = integral_constant; template struct is_same : public integral_constant { }; template struct is_same : public integral_constant { }; } // namespace ck #endif