math.hpp File Reference

math.hpp File Reference#

Composable Kernel: math.hpp File Reference
math.hpp File Reference
#include "ck/ck.hpp"
#include "integral_constant.hpp"
#include "number.hpp"
#include "type.hpp"
#include "enable_if.hpp"

Go to the source code of this file.

Classes

struct  ck::math::scales< T, s >
struct  ck::math::plus< T >
struct  ck::math::minus< T >
struct  ck::math::multiplies
struct  ck::math::maximize< T >
struct  ck::math::minimize< T >
struct  ck::math::integer_divide_ceiler< T >
struct  ck::math::equal< T >
struct  ck::math::less< T >

Namespaces

namespace  ck
namespace  ck::math

Functions

template<typename X, typename Y>
__host__ __device__ constexpr auto ck::math::integer_divide_floor (X x, Y y)
template<typename X, typename Y>
__host__ __device__ constexpr auto ck::math::integer_divide_ceil (X x, Y y)
template<typename X, typename Y>
__host__ __device__ constexpr auto ck::math::integer_least_multiple (X x, Y y)
template<typename T>
__host__ __device__ constexpr T ck::math::max (T x)
template<typename T>
__host__ __device__ constexpr T ck::math::max (T x, T y)
template<index_t X>
__host__ __device__ constexpr index_t ck::math::max (Number< X >, index_t y)
template<index_t Y>
__host__ __device__ constexpr index_t ck::math::max (index_t x, Number< Y >)
template<typename X, typename... Ys>
__host__ __device__ constexpr auto ck::math::max (X x, Ys... ys)
template<typename T>
__host__ __device__ constexpr T ck::math::min (T x)
template<typename T>
__host__ __device__ constexpr T ck::math::min (T x, T y)
template<index_t X>
__host__ __device__ constexpr index_t ck::math::min (Number< X >, index_t y)
template<index_t Y>
__host__ __device__ constexpr index_t ck::math::min (index_t x, Number< Y >)
template<typename X, typename... Ys>
__host__ __device__ constexpr auto ck::math::min (X x, Ys... ys)
template<typename T>
__host__ __device__ constexpr T ck::math::clamp (const T &x, const T &lowerbound, const T &upperbound)
__host__ __device__ constexpr index_t ck::math::gcd (index_t x, index_t y)
template<index_t X, index_t Y>
__host__ __device__ constexpr auto ck::math::gcd (Number< X >, Number< Y >)
template<typename X, typename... Ys, typename enable_if< sizeof...(Ys) > = 2, bool, ::type = false>
__host__ __device__ constexpr auto ck::math::gcd (X x, Ys... ys)
template<typename X, typename Y>
__host__ __device__ constexpr auto ck::math::lcm (X x, Y y)
template<typename X, typename... Ys, typename enable_if< sizeof...(Ys) > = 2, bool, ::type = false>
__host__ __device__ constexpr auto ck::math::lcm (X x, Ys... ys)
template<index_t X>
__host__ __device__ constexpr auto ck::math::next_power_of_two ()
template<index_t X>
__host__ __device__ constexpr auto ck::math::next_power_of_two (Number< X > x)