half.h (2022-02-24 14:07:56 -0500, (build 8c2561559))
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
12typedef 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
24namespace af {
25#endif
26typedef af_half half;
27#ifdef __cplusplus
28}
29#endif
Definition: algorithm.h:15
af_half half
Definition: half.h:26
Definition: half.h:12
unsigned short data_
Definition: half.h:14
unsigned short fraction
Definition: half.h:16
unsigned short sign
Definition: half.h:18
unsigned short exponent
Definition: half.h:17