nn::math::GetBits Function

Syntax

template <typename T>
T GetBits(
     bit64 v,
     int pos,
     int len
);

Template Arguments

Name Description
T Return value type.

Arguments

Name Description
in v Value to operate on.
in pos Position from which to start extracting, relative to the lowest bit.
in len Range to extract.

Return Values

Returns the extracted bit string.

Description

Gets a bit string.

Extracts the number of bits given by len, starting from the bit given by pos ([pos+len-1,pos]) from the low-order bits of v. The bit position in v given by pos is taken as the 0th bit.

Revision History

2012/04/13
Initial version.

CONFIDENTIAL