Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
net.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#if defined(_WIN32)
4
#include <winsock2.h>
5
#define ntohll(x) __builtin_bswap64(x)
6
#define htonll(x) __builtin_bswap64(x)
7
#elif defined(__linux__) || defined(__wasm__)
8
#include <arpa/inet.h>
9
#include <endian.h>
10
#define ntohll be64toh
11
#define htonll htobe64
12
#endif
13
14
inline
bool
is_little_endian
()
15
{
16
constexpr
int
num = 42;
17
// NOLINTNEXTLINE Nope. nope nope nope nope nope.
18
return
(*(
char
*)&num == 42);
19
}
is_little_endian
bool is_little_endian()
Definition
net.hpp:14
src
barretenberg
common
net.hpp
Generated by
1.9.8