alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
Assert.hpp File Reference
#include "alpaka/core/common.hpp"
#include "alpaka/core/config.hpp"
#include <cassert>
#include <type_traits>

Go to the source code of this file.

Classes

struct  alpaka::core::detail::AssertGreaterThan< TLhs, TRhs >
struct  alpaka::core::detail::AssertValueUnsigned< TArg >

Namespaces

namespace  alpaka
 main alpaka namespace.
namespace  alpaka::core
namespace  alpaka::core::detail

Macros

#define ALPAKA_ASSERT(...)
 The assert can be explicit disabled by defining NDEBUG.
#define ALPAKA_ASSERT_ACC(...)
 ALPAKA_ASSERT_ACC is an assert-like macro.
#define ALPAKA_ASSERT_ACC_IMPL(...)
 ALPAKA_ASSERT_ACC_IMPL is an assert-like macro. It can be disabled setting the ALPAKA_DISABLE_ASSERT_ACC preprocessor symbol or the NDEBUG preprocessor symbol.
#define ALPAKA_NOOP(...)
 Macro which expands to a noop. Macro enforces an semicolon after the call.

Functions

template<typename TLhs, typename TRhs>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC constexpr auto alpaka::core::assertGreaterThan (TRhs const &rhs) -> void
 This function asserts that the integral value TLhs is greater than TRhs.
template<typename TArg>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC constexpr auto alpaka::core::assertValueUnsigned (TArg const &arg) -> void
 This method checks integral values if they are greater or equal zero. The implementation prevents warnings for checking this for unsigned types.

Macro Definition Documentation

◆ ALPAKA_ASSERT

#define ALPAKA_ASSERT ( ...)
Value:
assert(__VA_ARGS__)

The assert can be explicit disabled by defining NDEBUG.

Definition at line 14 of file Assert.hpp.

◆ ALPAKA_ASSERT_ACC

#define ALPAKA_ASSERT_ACC ( ...)
Value:
ALPAKA_ASSERT(__VA_ARGS__)
#define ALPAKA_ASSERT(...)
The assert can be explicit disabled by defining NDEBUG.
Definition Assert.hpp:14

ALPAKA_ASSERT_ACC is an assert-like macro.

In device code for a GPU or SYCL backend it can be disabled setting the ALPAKA_DISABLE_ASSERT_ACC preprocessor symbol or the NDEBUG preprocessor symbol. In device code for a native C++ CPU backend and in host code, it is equivalent to ALPAKA_ASSERT, and can be disabled setting the NDEBUG preprocessor symbol.

Definition at line 53 of file Assert.hpp.

◆ ALPAKA_ASSERT_ACC_IMPL

#define ALPAKA_ASSERT_ACC_IMPL ( ...)
Value:
ALPAKA_ASSERT(__VA_ARGS__)

ALPAKA_ASSERT_ACC_IMPL is an assert-like macro. It can be disabled setting the ALPAKA_DISABLE_ASSERT_ACC preprocessor symbol or the NDEBUG preprocessor symbol.

Definition at line 26 of file Assert.hpp.

◆ ALPAKA_NOOP

#define ALPAKA_NOOP ( ...)
Value:
do \
{ \
} while(false)

Macro which expands to a noop. Macro enforces an semicolon after the call.

Definition at line 18 of file Assert.hpp.