Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::HugeIntCastData< T, OP, INTERMEDIATE_T > Struct Template Reference
Collaboration diagram for duckdb::HugeIntCastData< T, OP, INTERMEDIATE_T >:

Public Types

using ResultType = T
using IntermediateType = INTERMEDIATE_T
using Operation = OP

Public Member Functions

bool Flush ()
bool FlushDecimal ()

Public Attributes

ResultType result
IntermediateType intermediate
uint8_t digits
ResultType decimal
uint16_t decimal_total_digits
ResultType decimal_intermediate
uint16_t decimal_intermediate_digits

Member Function Documentation

◆ Flush()

template<typename T, typename OP, typename INTERMEDIATE_T>
bool duckdb::HugeIntCastData< T, OP, INTERMEDIATE_T >::Flush ( )
inline
90456 {
90457 if (digits == 0 && intermediate == 0) {
90458 return true;
90459 }
90460 if (result.lower != 0 || result.upper != 0) {
90461 if (digits > 38) {
90462 return false;
90463 }
90464 if (!OP::TryMultiply(result, OP::POWERS_OF_TEN[digits], result)) {
90465 return false;
90466 }
90467 }
90468 if (!OP::TryAddInPlace(result, ResultType(intermediate))) {
90469 return false;
90470 }
90471 digits = 0;
90472 intermediate = 0;
90473 return true;
90474 }
Definition duckdb.cpp:90443

◆ FlushDecimal()

template<typename T, typename OP, typename INTERMEDIATE_T>
bool duckdb::HugeIntCastData< T, OP, INTERMEDIATE_T >::FlushDecimal ( )
inline
90476 {
90477 if (decimal_intermediate_digits == 0 && decimal_intermediate == 0) {
90478 return true;
90479 }
90480 if (decimal.lower != 0 || decimal.upper != 0) {
90481 if (decimal_intermediate_digits > 38) {
90482 return false;
90483 }
90484 if (!OP::TryMultiply(decimal, OP::POWERS_OF_TEN[decimal_intermediate_digits], decimal)) {
90485 return false;
90486 }
90487 }
90488 if (!OP::TryAddInPlace(decimal, ResultType(decimal_intermediate))) {
90489 return false;
90490 }
90491 decimal_total_digits += decimal_intermediate_digits;
90492 decimal_intermediate_digits = 0;
90493 decimal_intermediate = 0;
90494 return true;
90495 }

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