Function BitsetBase

Summary

#include <include/EASTL/bitset.h>

(1) BitsetBase()

(2) BitsetBase(uint32_t value)

Function overload

Synopsis

#include <include/EASTL/bitset.h>

BitsetBase()

Description

BitsetBase

We tried two forms of array access here: for(word_type *pWord(mWord), *pWordEnd(mWord + NW); pWord < pWordEnd; ++pWord) *pWord = ... and for(size_t i = 0; i < NW; i++) mWord[i] = ...

For our tests (~NW < 16), the latter (using []) access resulted in faster code.

Source

Lines 683-687 in include/EASTL/bitset.h. Line 110 in include/EASTL/bitset.h.

template <size_t NW, typename WordType>
inline BitsetBase<NW, WordType>::BitsetBase()
{
    reset();
}

Synopsis

#include <include/EASTL/bitset.h>

BitsetBase(uint32_t value)

Description

No description yet.

Source

Lines 690-698 in include/EASTL/bitset.h. Line 111 in include/EASTL/bitset.h.

template <size_t NW, typename WordType>
inline BitsetBase<NW, WordType>::BitsetBase(uint32_t value)
{
    // This implementation assumes that sizeof(value) <= sizeof(word_type).
    //EASTL_CT_ASSERT(sizeof(value) <= sizeof(word_type)); Disabled because we now have support for uint8_t and uint16_t word types. It would be nice to have a runtime assert that tested this.
    reset();
    mWord[0] = static_cast<word_type>(value);
}





Add Discussion as Guest

Log in