alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
alpaka::onHost::logger Namespace Reference

Namespaces

namespace  concepts
namespace  trait

Classes

struct  Device
struct  Event
struct  Kernel
struct  Memory
struct  Queue

Functions

void info (concepts::Level auto logLvl, auto const &callable, std::source_location const &location=std::source_location::current())
 Write a meta data message to the output.
constexpr bool operator!= (concepts::Level auto lhs, concepts::Level auto rhs)
constexpr auto operator+ (concepts::Level auto lhs, concepts::Level auto rhs)
constexpr bool operator== (concepts::Level auto lhs, concepts::Level auto rhs)
auto scope (concepts::Level auto logLvl, std::source_location const &location=std::source_location::current())
 Log the entry and exit of a scope.

Variables

constexpr auto device = Device{}
constexpr auto event = Event{}
template<typename T_LogLvl>
constexpr bool isLogLvl_v = trait::IsLogLvl<T_LogLvl>::value
constexpr auto kernel = Kernel{}
constexpr auto memory = Memory{}
constexpr auto queue = Queue{}

Function Documentation

◆ info()

void alpaka::onHost::logger::info ( concepts::Level auto logLvl,
auto const & callable,
std::source_location const & location = std::source_location::current() )
inline

Write a meta data message to the output.

Attention
It is suggested to use the logger macro ALPAKA_LOG_INFO to speedup the compile time. For cases where logging is disabled the compiler does not need to register the C++ function signature.
Parameters
logLvllog level or a sum of log levels
callablecallable without arguments which provides a string which should be written to the output

Definition at line 61 of file logger.hpp.

◆ operator!=()

bool alpaka::onHost::logger::operator!= ( concepts::Level auto lhs,
concepts::Level auto rhs )
constexpr

Definition at line 59 of file lvl.hpp.

◆ operator+()

auto alpaka::onHost::logger::operator+ ( concepts::Level auto lhs,
concepts::Level auto rhs )
constexpr

Definition at line 64 of file lvl.hpp.

◆ operator==()

bool alpaka::onHost::logger::operator== ( concepts::Level auto lhs,
concepts::Level auto rhs )
constexpr

Definition at line 54 of file lvl.hpp.

◆ scope()

auto alpaka::onHost::logger::scope ( concepts::Level auto logLvl,
std::source_location const & location = std::source_location::current() )
inline

Log the entry and exit of a scope.

Attention
It is suggested to use the logger macro ALPAKA_LOG_FUNCTION to speedup the compile time. For cases where logging is disabled the compiler does not need to register the C++ function signature.

The time spend within the scope is added to the output as additional information, in milliseconds.

Parameters
logLvllog level or a sum of log levels

Definition at line 24 of file logger.hpp.

Variable Documentation

◆ device

auto alpaka::onHost::logger::device = Device{}
constexpr

Definition at line 82 of file lvl.hpp.

◆ event

auto alpaka::onHost::logger::event = Event{}
constexpr

Definition at line 97 of file lvl.hpp.

◆ isLogLvl_v

template<typename T_LogLvl>
bool alpaka::onHost::logger::isLogLvl_v = trait::IsLogLvl<T_LogLvl>::value
constexpr

Definition at line 44 of file lvl.hpp.

◆ kernel

auto alpaka::onHost::logger::kernel = Kernel{}
constexpr

Definition at line 142 of file lvl.hpp.

◆ memory

auto alpaka::onHost::logger::memory = Memory{}
constexpr

Definition at line 112 of file lvl.hpp.

◆ queue

auto alpaka::onHost::logger::queue = Queue{}
constexpr

Definition at line 127 of file lvl.hpp.