Advanced Multi-Physics (AMP)
On-Line Documentation
Public Member Functions | Protected Attributes | Friends | List of all members
AMP::extended::int64N< N > Class Template Reference

#include <extended_int.h>

Public Member Functions

constexpr void compliment ()
 Convert to the 2's compliment of the number (equivalent to multiplying by -1)
 
std::string decimal () const
 Get the hexadecimal number as a char array.
 
constexpr std::array< char, 16 *N+3 > hex (bool fixedWidth=true) const
 Get the hexadecimal number as a char array.
 
constexpr int64N ()
 Empty constructor.
 
constexpr int64N (const char *)
 Create from string.
 
constexpr int64N (const int64N &)=default
 Copy constructor.
 
template<uint8_t N2>
constexpr int64N (const int64N< N2 > &)
 Create from int128.
 
constexpr int64N (int rhs)
 Create from int.
 
constexpr int64N (int64_t)
 Create from int64.
 
constexpr int64N (int64N &&)=default
 Move constructor.
 
constexpr int64N (uint64_t)
 Create from int64.
 
double log10 () const
 Calculate the log base 2.
 
double log2 () const
 Calculate the log base 2.
 
constexpr operator bool () const
 Conversion to bool.
 
constexpr operator double () const
 Conversion to double.
 
constexpr operator float () const
 Conversion to float.
 
constexpr operator int () const
 Conversion to int.
 
constexpr operator int64_t () const
 Conversion to int64.
 
constexpr operator long double () const
 Conversion to long double.
 
 operator std::string () const
 Get the string value as a hexadecimal number.
 
constexpr int64N operator! () const
 Overload arimetic operators.
 
constexpr bool operator!= (const int64N &) const
 
constexpr bool operator!= (int) const
 
constexpr int64Noperator*= (const int64N &)
 
constexpr int64Noperator+= (const int64_t)
 
constexpr int64Noperator+= (const int64N &)
 
constexpr int64Noperator+= (const uint64_t)
 
constexpr int64Noperator-= (const int64N &)
 
constexpr int64Noperator/= (const int64N &)
 
constexpr bool operator< (const int64N &) const
 
constexpr bool operator< (int) const
 
constexpr int64Noperator<<= (unsigned)
 Bitshift operators.
 
constexpr bool operator<= (const int64N &) const
 
constexpr bool operator<= (int) const
 
constexpr int64N< N > & operator= (const int64N< N > &)=default
 Assignment operator.
 
constexpr int64N< N > & operator= (int64N< N > &&)=default
 Move operator.
 
constexpr bool operator== (const int64N &) const
 Overload comparison operators.
 
constexpr bool operator== (int) const
 
constexpr bool operator> (const int64N &) const
 
constexpr bool operator> (int) const
 
constexpr bool operator>= (const int64N &) const
 
constexpr bool operator>= (int) const
 
constexpr int64Noperator>>= (unsigned)
 
constexpr int sign () const
 Get the sign of the number.
 

Protected Attributes

uint64_t data [N]
 

Friends

template<uint8_t N2>
class int64N
 

Detailed Description

template<uint8_t N>
class AMP::extended::int64N< N >

This class provides an arbitrary precision integer

Definition at line 22 of file extended_int.h.

Constructor & Destructor Documentation

◆ int64N() [1/8]

template<uint8_t N>
constexpr AMP::extended::int64N< N >::int64N ( )
constexpr

Empty constructor.

◆ int64N() [2/8]

template<uint8_t N>
constexpr AMP::extended::int64N< N >::int64N ( const int64N< N > &  )
constexprdefault

Copy constructor.

◆ int64N() [3/8]

template<uint8_t N>
constexpr AMP::extended::int64N< N >::int64N ( int64N< N > &&  )
constexprdefault

Move constructor.

◆ int64N() [4/8]

template<uint8_t N>
constexpr AMP::extended::int64N< N >::int64N ( int  rhs)
explicitconstexpr

Create from int.

◆ int64N() [5/8]

template<uint8_t N>
constexpr AMP::extended::int64N< N >::int64N ( int64_t  )
explicitconstexpr

Create from int64.

◆ int64N() [6/8]

template<uint8_t N>
constexpr AMP::extended::int64N< N >::int64N ( uint64_t  )
explicitconstexpr

Create from int64.

◆ int64N() [7/8]

template<uint8_t N>
template<uint8_t N2>
constexpr AMP::extended::int64N< N >::int64N ( const int64N< N2 > &  )
explicitconstexpr

Create from int128.

Create from int64N<N>

◆ int64N() [8/8]

template<uint8_t N>
constexpr AMP::extended::int64N< N >::int64N ( const char *  )
explicitconstexpr

Create from string.

Member Function Documentation

◆ compliment()

template<uint8_t N>
constexpr void AMP::extended::int64N< N >::compliment ( )
constexpr

Convert to the 2's compliment of the number (equivalent to multiplying by -1)

◆ decimal()

template<uint8_t N>
std::string AMP::extended::int64N< N >::decimal ( ) const

Get the hexadecimal number as a char array.

◆ hex()

template<uint8_t N>
constexpr std::array< char, 16 *N+3 > AMP::extended::int64N< N >::hex ( bool  fixedWidth = true) const
constexpr

Get the hexadecimal number as a char array.

Referenced by AMP::extended::int64N< N >::operator std::string().

◆ log10()

template<uint8_t N>
double AMP::extended::int64N< N >::log10 ( ) const
inline

Calculate the log base 2.

Definition at line 124 of file extended_int.h.

References AMP::extended::int64N< N >::log2().

◆ log2()

template<uint8_t N>
double AMP::extended::int64N< N >::log2 ( ) const

Calculate the log base 2.

Referenced by AMP::extended::int64N< N >::log10().

◆ operator bool()

template<uint8_t N>
constexpr AMP::extended::int64N< N >::operator bool ( ) const
constexpr

Conversion to bool.

◆ operator double()

template<uint8_t N>
constexpr AMP::extended::int64N< N >::operator double ( ) const
constexpr

Conversion to double.

◆ operator float()

template<uint8_t N>
constexpr AMP::extended::int64N< N >::operator float ( ) const
constexpr

Conversion to float.

◆ operator int()

template<uint8_t N>
constexpr AMP::extended::int64N< N >::operator int ( ) const
constexpr

Conversion to int.

◆ operator int64_t()

template<uint8_t N>
constexpr AMP::extended::int64N< N >::operator int64_t ( ) const
constexpr

Conversion to int64.

◆ operator long double()

template<uint8_t N>
constexpr AMP::extended::int64N< N >::operator long double ( ) const
constexpr

Conversion to long double.

◆ operator std::string()

template<uint8_t N>
AMP::extended::int64N< N >::operator std::string ( ) const
inline

Get the string value as a hexadecimal number.

Definition at line 89 of file extended_int.h.

References AMP::extended::int64N< N >::hex().

◆ operator!()

template<uint8_t N>
constexpr int64N AMP::extended::int64N< N >::operator! ( ) const
constexpr

Overload arimetic operators.

◆ operator!=() [1/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator!= ( const int64N< N > &  ) const
constexpr

◆ operator!=() [2/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator!= ( int  ) const
constexpr

◆ operator*=()

template<uint8_t N>
constexpr int64N & AMP::extended::int64N< N >::operator*= ( const int64N< N > &  )
constexpr

◆ operator+=() [1/3]

template<uint8_t N>
constexpr int64N & AMP::extended::int64N< N >::operator+= ( const int64_t  )
constexpr

◆ operator+=() [2/3]

template<uint8_t N>
constexpr int64N & AMP::extended::int64N< N >::operator+= ( const int64N< N > &  )
constexpr

◆ operator+=() [3/3]

template<uint8_t N>
constexpr int64N & AMP::extended::int64N< N >::operator+= ( const uint64_t  )
constexpr

◆ operator-=()

template<uint8_t N>
constexpr int64N & AMP::extended::int64N< N >::operator-= ( const int64N< N > &  )
constexpr

◆ operator/=()

template<uint8_t N>
constexpr int64N & AMP::extended::int64N< N >::operator/= ( const int64N< N > &  )
constexpr

◆ operator<() [1/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator< ( const int64N< N > &  ) const
constexpr

◆ operator<() [2/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator< ( int  ) const
constexpr

◆ operator<<=()

template<uint8_t N>
constexpr int64N & AMP::extended::int64N< N >::operator<<= ( unsigned  )
constexpr

Bitshift operators.

◆ operator<=() [1/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator<= ( const int64N< N > &  ) const
constexpr

◆ operator<=() [2/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator<= ( int  ) const
constexpr

◆ operator=() [1/2]

template<uint8_t N>
constexpr int64N< N > & AMP::extended::int64N< N >::operator= ( const int64N< N > &  )
constexprdefault

Assignment operator.

◆ operator=() [2/2]

template<uint8_t N>
constexpr int64N< N > & AMP::extended::int64N< N >::operator= ( int64N< N > &&  )
constexprdefault

Move operator.

◆ operator==() [1/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator== ( const int64N< N > &  ) const
constexpr

Overload comparison operators.

◆ operator==() [2/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator== ( int  ) const
constexpr

◆ operator>() [1/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator> ( const int64N< N > &  ) const
constexpr

◆ operator>() [2/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator> ( int  ) const
constexpr

◆ operator>=() [1/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator>= ( const int64N< N > &  ) const
constexpr

◆ operator>=() [2/2]

template<uint8_t N>
constexpr bool AMP::extended::int64N< N >::operator>= ( int  ) const
constexpr

◆ operator>>=()

template<uint8_t N>
constexpr int64N & AMP::extended::int64N< N >::operator>>= ( unsigned  )
constexpr

◆ sign()

template<uint8_t N>
constexpr int AMP::extended::int64N< N >::sign ( ) const
constexpr

Get the sign of the number.

Friends And Related Symbol Documentation

◆ int64N

template<uint8_t N>
template<uint8_t N2>
friend class int64N
friend

Definition at line 134 of file extended_int.h.

Member Data Documentation

◆ data

template<uint8_t N>
uint64_t AMP::extended::int64N< N >::data[N]
protected

Definition at line 131 of file extended_int.h.


The documentation for this class was generated from the following file:



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:42.
Comments on this page