A Discrete-Event Network Simulator
API
Classes | Namespaces | Macros | Typedefs | Functions
int64x64-128.h File Reference

Declaration of the ns3::int64x64_t type using a native int128_t type. More...

#include "ns3/core-config.h"
#include <stdint.h>
#include <cmath>

Go to the source code of this file.

Classes

class  ns3::int64x64_t
 High precision numerical type, implementing Q64.64 fixed precision. More...
 

Namespaces

 ns3
 Every class exported by the ns3 library is enclosed in the ns3 namespace.
 

Macros

#define HP_MAX_64   (std::pow (2.0L, 64))
 Floating point value of HP_MASK_LO + 1. More...
 
#define INT64X64_128_H
 

Typedefs

typedef __int128_t int128_t
 
typedef __uint128_t uint128_t
 

Functions

int64x64_t ns3::operator! (const int64x64_t &lhs)
 Logical not operator. More...
 
int64x64_t & ns3::operator*= (int64x64_t &lhs, const int64x64_t &rhs)
 Compound multiplication operator. More...
 
int64x64_t ns3::operator+ (const int64x64_t &lhs)
 Unary plus operator. More...
 
int64x64_t & ns3::operator+= (int64x64_t &lhs, const int64x64_t &rhs)
 Compound addition operator. More...
 
int64x64_t ns3::operator- (const int64x64_t &lhs)
 Unary negation operator (change sign operator). More...
 
int64x64_t & ns3::operator-= (int64x64_t &lhs, const int64x64_t &rhs)
 Compound subtraction operator. More...
 
int64x64_t & ns3::operator/= (int64x64_t &lhs, const int64x64_t &rhs)
 Compound division operator. More...
 
bool ns3::operator< (const int64x64_t &lhs, const int64x64_t &rhs)
 Less than operator. More...
 
bool ns3::operator== (const int64x64_t &lhs, const int64x64_t &rhs)
 Equality operator. More...
 
bool ns3::operator> (const int64x64_t &lhs, const int64x64_t &rhs)
 Greater operator. More...
 

Detailed Description

Declaration of the ns3::int64x64_t type using a native int128_t type.

Definition in file int64x64-128.h.

Macro Definition Documentation

◆ HP_MAX_64

#define HP_MAX_64   (std::pow (2.0L, 64))

Floating point value of HP_MASK_LO + 1.

We really want:

static const long double HP_MAX_64 = std:pow (2.0L, 64);

but we can't call functions in const definitions.

We could make this a static and initialize in int64x64-128.cc or int64x64.cc, but this requires handling static initialization order when most of the implementation is inline. Instead, we resort to this define.

Definition at line 66 of file int64x64-128.h.

Referenced by ns3::int64x64::test::Int64x64HiLoTestCase::DoRun(), ns3::int64x64_t::GetDouble(), and ns3::int64x64_t::int64x64_t().

◆ INT64X64_128_H

#define INT64X64_128_H

Definition at line 23 of file int64x64-128.h.

Typedef Documentation

◆ int128_t

typedef __int128_t int128_t

Definition at line 30 of file int64x64-128.h.

◆ uint128_t

typedef __uint128_t uint128_t

Definition at line 29 of file int64x64-128.h.