mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
changing {} style to match majority of previous style
This commit is contained in:
parent
da6cdf014b
commit
961d929f4d
320 changed files with 5502 additions and 10485 deletions
|
@ -39,18 +39,15 @@
|
|||
#ifndef CBOR_NO_HALF_FLOAT_TYPE
|
||||
# ifdef __F16C__
|
||||
# include <immintrin.h>
|
||||
static inline unsigned short encode_half(double val)
|
||||
{
|
||||
static inline unsigned short encode_half(double val) {
|
||||
return _cvtss_sh((float)val, 3);
|
||||
}
|
||||
static inline double decode_half(unsigned short half)
|
||||
{
|
||||
static inline double decode_half(unsigned short half) {
|
||||
return _cvtsh_ss(half);
|
||||
}
|
||||
# else
|
||||
/* software implementation of float-to-fp16 conversions */
|
||||
static inline unsigned short encode_half(double val)
|
||||
{
|
||||
static inline unsigned short encode_half(double val) {
|
||||
uint64_t v;
|
||||
int sign, exp, mant;
|
||||
memcpy(&v, &val, sizeof(v));
|
||||
|
@ -83,8 +80,7 @@ static inline unsigned short encode_half(double val)
|
|||
}
|
||||
|
||||
/* this function was copied & adapted from RFC 7049 Appendix D */
|
||||
static inline double decode_half(unsigned short half)
|
||||
{
|
||||
static inline double decode_half(unsigned short half) {
|
||||
int exp = (half >> 10) & 0x1f;
|
||||
int mant = half & 0x3ff;
|
||||
double val;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue