-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconvert.h
More file actions
27 lines (22 loc) · 934 Bytes
/
convert.h
File metadata and controls
27 lines (22 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef __CONVERT_H__
#define __CONVERT_H__
#include "iFloat.h"
/** @file convert.h
* @brief Defines interface of convert.c functions (do not modify)
* @details This file defines the interface to a C file convert.c that
* converts between <code>float</code> and <code>iFloat_t</code> types.
* Thus, you do not need to declare <b>ANY</b> <code>float</code> variables
* anywhere in your code. Note that the test driver <code>testFloat.c</code>
* does not use any <code>float</code> variables.
*/
/** Convert a string to a <code>iFloat_t</code>
* @param str the string to convert
* @return an iFloat_t containing the bfloat16 floating point value
*/
iFloat_t toiFloat (const char* str);
/** Convert a <code>iFloat_t</code> to a <code>float</code>
* @param x the iFloat_t containing bits for a bfloat16 floating point value
* @return the value as a <code>float</code>
*/
float fromiFloat (iFloat_t x);
#endif