nl:: Weave:: Platform
Summary
Functions |
|
---|---|
BitsToByteLength(uint32_t aBits)
|
constexpr uint32_t
Converts value length in bits to length in bytes.
|
Divide(int64_t inDividend, int64_t inDivisor)
|
int64_t
Performs signed 64-bit divided by 64-bit operation and returns the quotient.
|
DivideBy1000(uint64_t inDividend)
|
uint32_t
Divide a 64-bit unsigned dividend by 1000 producing a 32-bit value.
|
RoundDown(uint32_t a, uint32_t b)
|
constexpr uint32_t
Performs rounding towards 0.
|
RoundUp(uint32_t a, uint32_t b)
|
constexpr uint32_t
Performs rounding away from 0.
|
Namespaces |
|
---|---|
nl:: |
|
nl:: |
This namespace includes all interfaces within Weave for the Weave Security Monitor memory manager. |
Functions
BitsToByteLength
constexpr uint32_t BitsToByteLength( uint32_t aBits )
Converts value length in bits to length in bytes.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
Length in bytes.
|
Divide
int64_t Divide( int64_t inDividend, int64_t inDivisor )
Performs signed 64-bit divided by 64-bit operation and returns the quotient.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
The quotient of inDividend divided by inDivisor
|
DivideBy1000
uint32_t DivideBy1000( uint64_t inDividend )
Divide a 64-bit unsigned dividend by 1000 producing a 32-bit value.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
the 32-bit quotient.
|
RoundDown
constexpr uint32_t RoundDown( uint32_t a, uint32_t b )
Performs rounding towards 0.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
Value rounded down to the nearest multiple of rounding granularity.
|
RoundUp
constexpr uint32_t RoundUp( uint32_t a, uint32_t b )
Performs rounding away from 0.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
Value rounded up to the nearest multiple of rounding granularity.
|