$darkmode
A high-performance general-purpose compute library
half.h
Go to the documentation of this file.
1 /*******************************************************
2  * Copyright (c) 2019, ArrayFire
3  * All rights reserved.
4  *
5  * This file is distributed under 3-clause BSD license.
6  * The complete license agreement can be obtained at:
7  * http://arrayfire.com/licenses/BSD-3-Clause
8  ********************************************************/
9 
10 #pragma once
11 
12 typedef struct {
13  union {
14  unsigned short data_ : 16;
15  struct {
16  unsigned short fraction : 10;
17  unsigned short exponent : 5;
18  unsigned short sign : 1;
19  };
20  };
21 } af_half;
22 
23 #ifdef __cplusplus
24 namespace af {
25 #endif
26 typedef af_half half;
27 #ifdef __cplusplus
28 }
29 #endif
unsigned short exponent
Definition: half.h:17
Definition: algorithm.h:14
unsigned short fraction
Definition: half.h:16
Definition: half.h:12
unsigned short sign
Definition: half.h:18
unsigned short data_
Definition: half.h:14
af_half half
Definition: half.h:26