cuda::experimental::hierarchy_query_result

Defined in include/cuda/experimental/__hierarchy/dimensions.cuh

template<typename T, size_t... Extents>
struct hierarchy_query_result : public dimensions<T, Extents...>

Type representing a result of a multi-dimensional hierarchy query.

Returned from extents and index queries.

Snippet

#include <cudax/hierarchy_dimensions.cuh>

template <typename Dimensions>
__global__ void kernel(Dimensions dims)
{
    auto ext = dims.extents();

    // Can be accessed like cuda::std::extents or like dim3
    assert(ext.extent(0) == expected);
    assert(ext.x == expected);

    // Can be converted to dim3
    dim3 dimensions = ext;
}

Template Parameters
  • T – Type of the result for each dimension

  • Extents – Extents of the result

Public Types

using Dims = dimensions<T, Extents...>

Public Functions

inline constexpr hierarchy_query_result()
inline explicit constexpr hierarchy_query_result(const Dims &dims)
inline constexpr operator dim3() const

Public Members

const T x
const T y
const T z