HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cl_half.h File Reference
#include <CL/cl_platform.h>
#include <stdint.h>
+ Include dependency graph for cl_half.h:

Go to the source code of this file.

Macros

#define CL_HALF_EXP_MASK   0x7C00
 
#define CL_HALF_MAX_FINITE_MAG   0x7BFF
 

Enumerations

enum  cl_half_rounding_mode { CL_HALF_RTE, CL_HALF_RTZ, CL_HALF_RTP, CL_HALF_RTN }
 

Macro Definition Documentation

#define CL_HALF_EXP_MASK   0x7C00

Definition at line 54 of file cl_half.h.

#define CL_HALF_MAX_FINITE_MAG   0x7BFF

Definition at line 55 of file cl_half.h.

Enumeration Type Documentation

This is a header-only utility library that provides OpenCL host code with routines for converting to/from cl_half values.

Example usage:

#include <CL/cl_half.h> ... cl_half h = cl_half_from_float(0.5f, CL_HALF_RTE); cl_float f = cl_half_to_float(h); Rounding mode used when converting to cl_half.

Enumerator
CL_HALF_RTE 
CL_HALF_RTZ 
CL_HALF_RTP 
CL_HALF_RTN 

Definition at line 44 of file cl_half.h.