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
af::half
af_half half
Definition: half.h:26
af
Definition: algorithm.h:14
af::sign
AFAPI array sign(const array &in)
C++ Interface for getting the sign of input.
af_half
Definition: half.h:12