XeTLA v0.3.6
IntelĀ® Xe Templates for Linear Algebra - API Definition Document
 
Loading...
Searching...
No Matches
Explicit conversion APIs

Defines explicit conversions (with and without saturation), truncation etc. More...

Collaboration diagram for Explicit conversion APIs:

Functions

template<typename T_dst , typename T_src , int N>
__XETLA_API std::enable_if_t<!(is_internal_type< T_dst >::value) &&!(is_internal_type< T_src >::value), xetla_vector< T_dst, N > > gpu::xetla::xetla_cvt (xetla_vector< T_src, N > src)
 xetla explicit data conversion for standard data types(integer,float,half)
 
template<typename T_dst , typename T_src , int N>
__XETLA_API std::enable_if_t< std::is_same< T_dst, fp16 >::value &&std::is_same< T_src, int32_t >::value, xetla_vector< T_dst, N > > gpu::xetla::xetla_cvt (xetla_vector< T_src, N > src, float scaling_value)
 xetpp explicit data conversion with scaling, int32->fp16.
 

Detailed Description

Defines explicit conversions (with and without saturation), truncation etc.

between XeTLA vector types.

Function Documentation

◆ xetla_cvt() [1/2]

template<typename T_dst , typename T_src , int N>
__XETLA_API std::enable_if_t<!(is_internal_type< T_dst >::value) &&!(is_internal_type< T_src >::value), xetla_vector< T_dst, N > > gpu::xetla::xetla_cvt ( xetla_vector< T_src, N >  src)

xetla explicit data conversion for standard data types(integer,float,half)

Template Parameters
T_dstis the destination data type.
T_srcis the source data type.
Nis the element number in xetla_vector.

◆ xetla_cvt() [2/2]

template<typename T_dst , typename T_src , int N>
__XETLA_API std::enable_if_t< std::is_same< T_dst, fp16 >::value &&std::is_same< T_src, int32_t >::value, xetla_vector< T_dst, N > > gpu::xetla::xetla_cvt ( xetla_vector< T_src, N >  src,
float  scaling_value 
)

xetpp explicit data conversion with scaling, int32->fp16.

Template Parameters
T_dstis the half data type.
T_srcis the int32 data type.
Nis the element number in xetla_vector.