Aesi Multiprecision
C++ class library of long integer arithmetic for GPU parallelization
Loading...
Searching...
No Matches
Aeu.h File Reference

Long precision unsigned integer with arithmetic operations. More...

Go to the source code of this file.

Classes

class  Aeu< bitness >
 Long precision unsigned integer. More...
 

Typedefs

using Aeu128 = Aeu<128>
 Number with precision 128-bit.
 
using Aeu256 = Aeu<256>
 Number with precision 128-bit.
 
using Aeu512 = Aeu<512>
 Number with precision 512-bit.
 
using Aeu768 = Aeu<768>
 Number with precision 768-bit.
 
using Aeu1024 = Aeu<1024>
 Number with precision 1024-bit.
 
using Aeu1536 = Aeu<1536>
 Number with precision 1536-bit.
 
using Aeu2048 = Aeu<2048>
 Number with precision 2048-bit.
 
using Aeu3072 = Aeu<3072>
 Number with precision 3072-bit.
 
using Aeu4096 = Aeu<4096>
 Number with precision 4096-bit.
 
using Aeu6144 = Aeu<6144>
 Number with precision 6144-bit.
 
using Aeu8192 = Aeu<8192>
 Number with precision 8192-bit.
 

Functions

template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator+ (Integral number, const Aeu< bitness > &value) noexcept
 Integral conversion addition operator.
 
template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator- (Integral number, const Aeu< bitness > &value) noexcept
 Integral conversion subtraction operator.
 
template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator* (Integral number, const Aeu< bitness > &value) noexcept
 Integral conversion multiplication operator.
 
template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator/ (Integral number, const Aeu< bitness > &value) noexcept
 Integral conversion division operator.
 
template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator% (Integral number, const Aeu< bitness > &value) noexcept
 Integral conversion modulo operator.
 
template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator^ (Integral number, const Aeu< bitness > &value) noexcept
 Integral conversion bitwise XOR operator.
 
template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator& (Integral number, const Aeu< bitness > &value) noexcept
 Integral conversion bitwise AND operator.
 
template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator| (Integral number, const Aeu< bitness > &value) noexcept
 Integral conversion bitwise OR operator.
 

Detailed Description

Long precision unsigned integer with arithmetic operations.

Copyright 2021-2023, Alexander V. Lvov All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ operator+()

template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator+ ( Integral number,
const Aeu< bitness > & value )
constexprnoexcept

Integral conversion addition operator.

Parameters
numberIntegral
valueAeu
Returns
Aeu

◆ operator-()

template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator- ( Integral number,
const Aeu< bitness > & value )
constexprnoexcept

Integral conversion subtraction operator.

Parameters
numberIntegral
valueAeu
Returns
Aeu

◆ operator*()

template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator* ( Integral number,
const Aeu< bitness > & value )
constexprnoexcept

Integral conversion multiplication operator.

Parameters
numberIntegral
valueAeu
Returns
Aeu

◆ operator/()

template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator/ ( Integral number,
const Aeu< bitness > & value )
constexprnoexcept

Integral conversion division operator.

Parameters
numberIntegral
valueAeu
Returns
Aeu

◆ operator%()

template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator% ( Integral number,
const Aeu< bitness > & value )
constexprnoexcept

Integral conversion modulo operator.

Parameters
numberIntegral
valueAeu
Returns
Aeu

◆ operator^()

template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator^ ( Integral number,
const Aeu< bitness > & value )
constexprnoexcept

Integral conversion bitwise XOR operator.

Parameters
numberIntegral
valueAeu
Returns
Aeu

◆ operator&()

template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator& ( Integral number,
const Aeu< bitness > & value )
constexprnoexcept

Integral conversion bitwise AND operator.

Parameters
numberIntegral
valueAeu
Returns
Aeu

◆ operator|()

template<std::size_t bitness, typename Integral >
requires (std::is_integral_v<Integral>)
gpu constexpr auto operator| ( Integral number,
const Aeu< bitness > & value )
constexprnoexcept

Integral conversion bitwise OR operator.

Parameters
numberIntegral
valueAeu
Returns
Aeu