DPC++ Runtime
Runtime libraries for oneAPI DPC++
stream.hpp File Reference
#include <sycl/access/access.hpp>
#include <sycl/accessor.hpp>
#include <sycl/aliases.hpp>
#include <sycl/atomic.hpp>
#include <sycl/builtins.hpp>
#include <sycl/detail/array.hpp>
#include <sycl/detail/cg.hpp>
#include <sycl/detail/defines.hpp>
#include <sycl/detail/defines_elementary.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/detail/item_base.hpp>
#include <sycl/detail/owner_less_base.hpp>
#include <sycl/ext/oneapi/bfloat16.hpp>
#include <sycl/group.hpp>
#include <sycl/h_item.hpp>
#include <sycl/half_type.hpp>
#include <sycl/handler.hpp>
#include <sycl/item.hpp>
#include <sycl/nd_item.hpp>
#include <sycl/nd_range.hpp>
#include <sycl/property_list.hpp>
#include <sycl/range.hpp>
#include <sycl/sub_group.hpp>
#include <sycl/types.hpp>
#include <cstddef>
#include <memory>
#include <stdint.h>
#include <type_traits>
#include <variant>
Include dependency graph for stream.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sycl::_V1::detail::IsSwizzleOp< typename >
 
struct  sycl::_V1::detail::IsSwizzleOp< sycl::detail::SwizzleOp< VecT, OperationLeftT, OperationRightT, OperationCurrentT, Indexes... > >
 
class  sycl::_V1::__precision_manipulator__
 
class  sycl::_V1::__width_manipulator__
 
struct  std::hash< sycl::stream >
 

Namespaces

 sycl
 
 sycl::_V1
 
 sycl::_V1::detail
 
 std
 

Typedefs

using sycl::_V1::detail::FmtFlags = unsigned int
 
template<class F , class T = void>
using sycl::_V1::detail::EnableIfFP = typename std::enable_if_t< detail::check_type_in_v< F, float, double, half, ext::oneapi::bfloat16 >, T >
 
using sycl::_V1::detail::GlobalBufAccessorT = accessor< char, 1, sycl::access::mode::read_write, sycl::access::target::device >
 
using sycl::_V1::detail::GlobalBufPtrType = typename detail::DecoratedType< char, GlobalBufAS >::type *
 
using sycl::_V1::detail::GlobalOffsetAccessorT = accessor< unsigned, 1, sycl::access::mode::atomic, sycl::access::target::device >
 
using sycl::_V1::detail::GlobalOffsetPtrType = typename detail::DecoratedType< unsigned, GlobalBufAS >::type *
 
template<typename T >
using sycl::_V1::detail::EnableIfSwizzleVec = typename std::enable_if_t< IsSwizzleOp< T >::value, typename IsSwizzleOp< T >::Type >
 

Enumerations

enum class  sycl::_V1::stream_manipulator {
  sycl::_V1::dec = 0 , sycl::_V1::hex = 1 , sycl::_V1::oct = 2 , sycl::_V1::noshowbase = 3 ,
  sycl::_V1::showbase = 4 , sycl::_V1::noshowpos = 5 , sycl::_V1::showpos = 6 , sycl::_V1::endl = 7 ,
  sycl::_V1::flush = 8 , sycl::_V1::fixed = 9 , sycl::_V1::scientific = 10 , sycl::_V1::hexfloat = 11 ,
  sycl::_V1::defaultfloat = 12
}
 

Functions

unsigned sycl::_V1::detail::GetFlushBufOffset (const GlobalBufAccessorT &GlobalFlushBuf, unsigned WIOffset)
 
void sycl::_V1::detail::SetFlushBufOffset (GlobalBufAccessorT &GlobalFlushBuf, unsigned WIOffset, unsigned Offset)
 
void sycl::_V1::detail::write (GlobalBufAccessorT &GlobalFlushBuf, size_t FlushBufferSize, unsigned WIOffset, const char *Str, unsigned Len, unsigned Padding=0)
 
void sycl::_V1::detail::reverseBuf (char *Buf, unsigned Len)
 
template<typename T >
std::make_unsigned_t< T > sycl::_V1::detail::getAbsVal (const T Val, const int Base)
 
char sycl::_V1::detail::digitToChar (const int Digit)
 
template<typename T >
std::enable_if_t< std::is_integral_v< T >, unsigned > sycl::_V1::detail::integralToBase (T Val, int Base, char *Digits)
 
template<typename T >
std::enable_if_t< std::is_integral_v< T >, unsigned > sycl::_V1::detail::ScalarToStr (const T &Val, char *Buf, unsigned Flags, int, int Precision=-1)
 
unsigned sycl::_V1::detail::append (char *Dst, const char *Src)
 
unsigned sycl::_V1::detail::F2I32 (float Val)
 
unsigned long long sycl::_V1::detail::D2I64 (double Val)
 
template<typename T >
detail::enable_if_t< std::is_same< T, float >::value||std::is_same< T, double >::value, bool > sycl::_V1::detail::isFastMathInf (T Val)
 
template<typename T >
detail::enable_if_t< std::is_same< T, float >::value||std::is_same< T, double >::value, bool > sycl::_V1::detail::isFastMathNan (T Val)
 
template<typename T >
detail::enable_if_t< std::is_same< T, float >::value||std::is_same< T, double >::value, bool > sycl::_V1::detail::isFastMathSignBit (T Val)
 
template<typename T >
detail::enable_if_t< std::is_same< T, float >::value||std::is_same< T, double >::value, unsigned > sycl::_V1::detail::checkForInfNan (char *Buf, T Val)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, half >, unsigned > sycl::_V1::detail::checkForInfNan (char *Buf, T Val)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, ext::oneapi::bfloat16 >, unsigned > sycl::_V1::detail::checkForInfNan (char *Buf, T Val)
 
template<typename T >
EnableIfFP< T, unsigned > sycl::_V1::detail::floatingPointToDecStr (T AbsVal, char *Digits, int Precision, bool IsSci)
 
template<typename T >
EnableIfFP< T, unsigned > sycl::_V1::detail::ScalarToStr (const T &Val, char *Buf, unsigned Flags, int, int Precision=-1)
 
template<typename T >
std::enable_if_t< std::is_integral_v< T > > sycl::_V1::detail::writeIntegral (GlobalBufAccessorT &GlobalFlushBuf, size_t FlushBufferSize, unsigned WIOffset, unsigned Flags, int Width, const T &Val)
 
template<typename T >
EnableIfFP< T > sycl::_V1::detail::writeFloatingPoint (GlobalBufAccessorT &GlobalFlushBuf, size_t FlushBufferSize, unsigned WIOffset, unsigned Flags, int Width, int Precision, const T &Val)
 
bool sycl::_V1::detail::updateOffset (GlobalOffsetAccessorT &GlobalOffset, GlobalBufAccessorT &GlobalBuf, unsigned Size, unsigned &Cur)
 
void sycl::_V1::detail::flushBuffer (GlobalOffsetAccessorT &GlobalOffset, GlobalBufAccessorT &GlobalBuf, GlobalBufAccessorT &GlobalFlushBuf, unsigned WIOffset)
 
template<typename T , int VecLength>
std::enable_if_t<(VecLength==1), unsigned > sycl::_V1::detail::VecToStr (const vec< T, VecLength > &Vec, char *VecStr, unsigned Flags, int Width, int Precision)
 
template<typename T , int VecLength>
std::enable_if_t<(VecLength==2||VecLength==4||VecLength==8||VecLength==16), unsigned > sycl::_V1::detail::VecToStr (const vec< T, VecLength > &Vec, char *VecStr, unsigned Flags, int Width, int Precision)
 
template<typename T , int VecLength>
std::enable_if_t<(VecLength==3), unsigned > sycl::_V1::detail::VecToStr (const vec< T, VecLength > &Vec, char *VecStr, unsigned Flags, int Width, int Precision)
 
template<typename T , int VecLength>
void sycl::_V1::detail::writeVec (GlobalBufAccessorT &GlobalFlushBuf, size_t FlushBufferSize, unsigned WIOffset, unsigned Flags, int Width, int Precision, const vec< T, VecLength > &Vec)
 
template<int ArrayLength>
unsigned sycl::_V1::detail::ArrayToStr (char *Buf, const array< ArrayLength > &Arr)
 
template<int ArrayLength>
void sycl::_V1::detail::writeArray (GlobalBufAccessorT &GlobalFlushBuf, size_t FlushBufferSize, unsigned WIOffset, const array< ArrayLength > &Arr)
 
template<int Dimensions>
void sycl::_V1::detail::writeItem (GlobalBufAccessorT &GlobalFlushBuf, size_t FlushBufferSize, unsigned WIOffset, const item< Dimensions > &Item)
 
template<int Dimensions>
void sycl::_V1::detail::writeNDRange (GlobalBufAccessorT &GlobalFlushBuf, size_t FlushBufferSize, unsigned WIOffset, const nd_range< Dimensions > &ND_Range)
 
template<int Dimensions>
void sycl::_V1::detail::writeNDItem (GlobalBufAccessorT &GlobalFlushBuf, size_t FlushBufferSize, unsigned WIOffset, const nd_item< Dimensions > &ND_Item)
 
template<int Dimensions>
void sycl::_V1::detail::writeGroup (GlobalBufAccessorT &GlobalFlushBuf, size_t FlushBufferSize, unsigned WIOffset, const group< Dimensions > &Group)
 
template<int Dimensions>
unsigned sycl::_V1::detail::ItemToStr (char *Buf, const item< Dimensions, false > &Item)
 
template<int Dimensions>
void sycl::_V1::detail::writeHItem (GlobalBufAccessorT &GlobalFlushBuf, size_t FlushBufferSize, unsigned WIOffset, const h_item< Dimensions > &HItem)
 
__precision_manipulator__ sycl::_V1::setprecision (int Precision)
 
__width_manipulator__ sycl::_V1::setw (int Width)
 
template<typename T >
class __SYCL_SPECIAL_CLASS __SYCL_TYPE(stream) stream std::enable_if_t< std::is_same_v< T, std::byte >, const stream & > sycl::_V1::operator<< (const stream &, const T &)
 A buffered output stream that allows outputting the values of built-in, vector and SYCL types to the console. More...
 
const stream & sycl::_V1::operator<< (const stream &Out, const char C)
 
const stream & sycl::_V1::operator<< (const stream &Out, const char *Str)
 
const stream & sycl::_V1::operator<< (const stream &Out, const bool &RHS)
 
template<typename ValueType >
std::enable_if_t< std::is_integral_v< ValueType >, const stream & > sycl::_V1::operator<< (const stream &Out, const ValueType &RHS)
 
const stream & sycl::_V1::operator<< (const stream &Out, const float &RHS)
 
const stream & sycl::_V1::operator<< (const stream &Out, const double &RHS)
 
const stream & sycl::_V1::operator<< (const stream &Out, const half &RHS)
 
const stream & sycl::_V1::operator<< (const stream &Out, const ext::oneapi::bfloat16 &RHS)
 
template<typename ElementType , access::address_space Space, access::decorated IsDecorated>
const stream & sycl::_V1::operator<< (const stream &Out, const multi_ptr< ElementType, Space, IsDecorated > &RHS)
 
template<typename T >
const stream & sycl::_V1::operator<< (const stream &Out, const T *RHS)
 
const stream & sycl::_V1::operator<< (const stream &Out, const __precision_manipulator__ &RHS)
 
const stream & sycl::_V1::operator<< (const stream &Out, const __width_manipulator__ &RHS)
 
const stream & sycl::_V1::operator<< (const stream &Out, const stream_manipulator RHS)
 
template<typename T , int VectorLength>
const stream & sycl::_V1::operator<< (const stream &Out, const vec< T, VectorLength > &RHS)
 
template<int Dimensions>
const stream & sycl::_V1::operator<< (const stream &Out, const id< Dimensions > &RHS)
 
template<int Dimensions>
const stream & sycl::_V1::operator<< (const stream &Out, const range< Dimensions > &RHS)
 
template<int Dimensions>
const stream & sycl::_V1::operator<< (const stream &Out, const item< Dimensions > &RHS)
 
template<int Dimensions>
const stream & sycl::_V1::operator<< (const stream &Out, const nd_range< Dimensions > &RHS)
 
template<int Dimensions>
const stream & sycl::_V1::operator<< (const stream &Out, const nd_item< Dimensions > &RHS)
 
template<int Dimensions>
const stream & sycl::_V1::operator<< (const stream &Out, const group< Dimensions > &RHS)
 
template<int Dimensions>
const stream & sycl::_V1::operator<< (const stream &Out, const h_item< Dimensions > &RHS)
 
template<typename T , typename RT = detail::EnableIfSwizzleVec<T>>
const stream & sycl::_V1::operator<< (const stream &Out, const T &RHS)
 

Variables

static constexpr FmtFlags sycl::_V1::detail::Dec = 0x0001
 
static constexpr FmtFlags sycl::_V1::detail::Hex = 0x0002
 
static constexpr FmtFlags sycl::_V1::detail::Oct = 0x0004
 
static constexpr FmtFlags sycl::_V1::detail::ShowBase = 0x0008
 
static constexpr FmtFlags sycl::_V1::detail::ShowPos = 0x0010
 
static constexpr FmtFlags sycl::_V1::detail::Fixed = 0x0020
 
static constexpr FmtFlags sycl::_V1::detail::Scientific = 0x0040
 
static constexpr FmtFlags sycl::_V1::detail::BaseField = Dec | Hex | Oct
 
static constexpr FmtFlags sycl::_V1::detail::FloatField = Scientific | Fixed
 
constexpr size_t sycl::_V1::detail::MAX_FLOATING_POINT_DIGITS = 24
 
constexpr size_t sycl::_V1::detail::MAX_INTEGRAL_DIGITS = 23
 
constexpr const char * sycl::_V1::detail::VEC_ELEMENT_DELIMITER = ", "
 
constexpr char sycl::_V1::detail::VEC_OPEN_BRACE = '{'
 
constexpr char sycl::_V1::detail::VEC_CLOSE_BRACE = '}'
 
constexpr size_t sycl::_V1::detail::MAX_DIMENSIONS = 3
 
constexpr size_t sycl::_V1::detail::MAX_ARRAY_SIZE
 
constexpr unsigned sycl::_V1::detail::FLUSH_BUF_OFFSET_SIZE = 2
 
constexpr static access::address_space sycl::_V1::detail::GlobalBufAS
 
constexpr static int sycl::_V1::detail::GlobalBufDim = 1
 
constexpr static access::address_space sycl::_V1::detail::GlobalOffsetAS
 
constexpr static int sycl::_V1::detail::GlobalOffsetDim = 1
 
constexpr size_t sycl::_V1::detail::MAX_ITEM_SIZE = 2 * MAX_ARRAY_SIZE + 20
 
constexpr stream_manipulator sycl::_V1::dec = stream_manipulator::dec
 
constexpr stream_manipulator sycl::_V1::hex = stream_manipulator::hex
 
constexpr stream_manipulator sycl::_V1::oct = stream_manipulator::oct
 
constexpr stream_manipulator sycl::_V1::noshowbase = stream_manipulator::noshowbase
 
constexpr stream_manipulator sycl::_V1::showbase = stream_manipulator::showbase
 
constexpr stream_manipulator sycl::_V1::noshowpos = stream_manipulator::noshowpos
 
constexpr stream_manipulator sycl::_V1::showpos = stream_manipulator::showpos
 
constexpr stream_manipulator sycl::_V1::endl = stream_manipulator::endl
 
constexpr stream_manipulator sycl::_V1::flush = stream_manipulator::flush
 
constexpr stream_manipulator sycl::_V1::fixed = stream_manipulator::fixed
 
constexpr stream_manipulator sycl::_V1::scientific = stream_manipulator::scientific
 
constexpr stream_manipulator sycl::_V1::hexfloat = stream_manipulator::hexfloat
 
constexpr stream_manipulator sycl::_V1::defaultfloat = stream_manipulator::defaultfloat