Skip to content

File extent.h

FileList > muda > tools > extent.h

Go to the source code of this file

  • #include <cuda.h>
  • #include <muda/muda_def.h>
  • #include <cinttypes>

Namespaces

Type Name
namespace muda

Classes

Type Name
class Extent2D
class Extent3D
class Offset2D
class Offset3D

Macros

Type Name
define MUDA_DEFINE_ARITHMATIC_OPERATOR (op)
define MUDA_DEFINE_COMPARISON_OPERATOR (op)

Macro Definition Documentation

define MUDA_DEFINE_ARITHMATIC_OPERATOR

#define MUDA_DEFINE_ARITHMATIC_OPERATOR (
    op
) MUDA_INLINE MUDA_GENERIC Extent2D operator op(const Extent2D& lhs,               \
                                                  const Extent2D& rhs) MUDA_NOEXCEPT \
    {                                                                                \
        return Extent2D{lhs.height() op rhs.height(), lhs.width() op rhs.width()};   \
    }                                                                                \
    MUDA_INLINE MUDA_GENERIC Extent3D operator op(const Extent3D& lhs,               \
                                                  const Extent3D& rhs) MUDA_NOEXCEPT \
    {                                                                                \
        return Extent3D{lhs.depth() op  rhs.depth(),                                 \
                        lhs.height() op rhs.height(),                                \
                        lhs.width() op  rhs.width()};                                 \
    }                                                                                \
    MUDA_INLINE MUDA_GENERIC Offset2D operator op(const Offset2D& lhs,               \
                                                  const Offset2D& rhs) MUDA_NOEXCEPT \
    {                                                                                \
        return Offset2D{lhs.offset_in_height() op rhs.offset_in_height(),            \
                        lhs.offset_in_width() op  rhs.offset_in_width()};             \
    }                                                                                \
    MUDA_INLINE MUDA_GENERIC Offset3D operator op(const Offset3D& lhs,               \
                                                  const Offset3D& rhs) MUDA_NOEXCEPT \
    {                                                                                \
        return Offset3D{lhs.offset_in_depth() op  rhs.offset_in_depth(),             \
                        lhs.offset_in_height() op rhs.offset_in_height(),            \
                        lhs.offset_in_width() op  rhs.offset_in_width()};             \
    }

define MUDA_DEFINE_COMPARISON_OPERATOR

#define MUDA_DEFINE_COMPARISON_OPERATOR (
    op
) MUDA_INLINE MUDA_GENERIC bool operator op(const Extent2D& lhs, const Extent2D& rhs) MUDA_NOEXCEPT \
    {                                                                                                 \
        return (lhs.height() op rhs.height()) && (lhs.width() op rhs.width());                        \
    }                                                                                                 \
    MUDA_INLINE MUDA_GENERIC bool operator op(const Extent3D& lhs, const Extent3D& rhs) MUDA_NOEXCEPT \
    {                                                                                                 \
        return (lhs.depth() op rhs.depth()) && (lhs.height() op rhs.height())                         \
               && (lhs.width() op rhs.width());                                                       \
    }


The documentation for this class was generated from the following file src/muda/tools/extent.h