A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ct__bitset__cxx17_8hpp_source.html below:

NCBI C++ ToolKit: include/util/impl/ct_bitset_cxx17.hpp Source File

1 #ifndef __CT_BITSET_CXX17_HPP_INCLUDED__ 2 #define __CT_BITSET_CXX17_HPP_INCLUDED__ 45  template

<

class

_Ty,

size_t

_Size,

class

u_type>

50  static

constexpr

size_t width

= 8 *

sizeof

(_Ty);

51  static

constexpr

size_t max_width

= 8 *

sizeof

(_Ty) * _Size;

53  static

constexpr

bool IsYes

(

char

c) {

return

c ==

'1'

; }

54  static

constexpr

bool IsYes

(

bool

c) {

return

c; }

56  template

<

typename

_Other>

59  size_t

_Pos =

static_cast<size_t>

(_v);

68  template

<

typename

_Container>

72  for

(

auto value

: args) {

77  template

<

typename

_Iterator>

81  for

(

auto

it = begin; it != end; ++it) {

83  auto offset

= std::distance(begin, it);

102  template

<

typename

T>

110  for

(

auto

it = _from; it<= _to; ++it)

129

constexpr

uint64_t

m1 = 0x5555555555555555;

130

constexpr

uint64_t

m2 = 0x3333333333333333;

131

constexpr

uint64_t

m4 = 0x0f0f0f0f0f0f0f0f;

135

constexpr

uint64_t

h01 = 0x0101010101010101;

138

x = (x & m2) + ((x >> 2) & m2);

139

x = (x + (x >> 4)) & m4;

140  return int

((x * h01) >> 56);

160  auto

only_low_bits = x ^ (x - 1);

166  template

<

size_t

_MaxBits,

class

T>

174  static

constexpr

size_t _Bits

= _MaxBits;

182  template

<

size_t

,

typename

>

189  template

<

typename

...TArgs>

202  return const_bitset

(traits::from_string(std::to_array( _init)));

215  static

constexpr

size_t capacity

() {

return

_Bits; }

219  for

(

auto value

: _Array)

227  for

(

auto value

: _Array)

237  return

_Subscript(

static_cast<size_t>

(_Pos));

254  for

(

size_t i

=0;

i

<_Array.size();

i

++)

255

_Array[

i

] |= _Other.

_Array

[

i

];

261  for

(

size_t i

=0;

i

<_Array.size();

i

++)

262

_Array[

i

] &= (~_Other.

_Array

[

i

]);

266  template

<

size_t

_MaxBits2>

270

constexpr

size_t

new_N =

std::max

(_MaxBits, _MaxBits2);

273  typename

new_type::_Array_t

arr

{};

274  for

(

size_t i

=0;

i

<

arr

.size();

i

++) {

275  auto l

=

i

< _Array.size() ? _Array[

i

] : 0;

279  return

new_type{

arr

};

282  template

<

size_t

_MaxBits2>

286

constexpr

size_t

new_N =

std::max

(_MaxBits, _MaxBits2);

289  typename

new_type::_Array_t

arr

{};

290  for

(

size_t i

=0;

i

<

arr

.size();

i

++) {

291  auto l

=

i

< _Array.size() ? _Array[

i

] : 0;

295  return

new_type{

arr

};

300  size_t

_Pos =

static_cast<size_t>

(_v);

303  auto

&

val

= _Array[_Pos / _Bitsperword];

305  bool

previous = (

val

&

mask

) != 0;

313  size_t

_Pos =

static_cast<size_t>

(_v);

316  auto

&

val

= _Array[_Pos / _Bitsperword];

318  bool

previous = (

val

&

mask

) != 0;

327  size_t

_Pos =

static_cast<size_t>

(_v);

330  auto

&

val

= _Array[_Pos / _Bitsperword];

332  bool

previous = (

val

&

mask

) != 0;

341  return

_Subscript(

static_cast<size_t>

(_Pos));

359  return

m_bitset == o.m_bitset && m_index == o.m_index;

363  return

m_bitset != o.m_bitset || m_index != o.m_index;

367  if

(m_index < _Bits) {

374

const_iterator _this(*

this

);

380  return static_cast<T>

(m_index);

384  return static_cast<T>

(m_index);

392  _Ty

current = m_current;

394  if

(current &

_Ty

(1)) {

395

m_current = current >> 1;

400  size_t

index = m_index;

401  if

constexpr (_Words > 1) {

403  size_t offset

= (index / _Bitsperword) + 1;

404  while

(

offset

<_Words && (current = m_bitset->_Array[

offset

]) == 0)

407

index =

offset

*_Bitsperword - 1;

416

m_index = index +

delta

;

418

current =

delta

== _Bitsperword ? 0 : current >>

delta

;

426

m_current = current >> 1;

428  if

(current &

_Ty

(1)) {

443  #ifdef __cpp_concepts 444

static_assert(std::input_iterator<const_iterator>);

449

constexpr const_iterator

cbegin

()

const

noexcept {

return

const_iterator(

this

, std::true_type{}); }

450

constexpr const_iterator

cend

()

const

noexcept {

return

const_iterator(

this

, std::false_type{}); }

451

constexpr const_iterator

begin

()

const

noexcept {

return

cbegin(); }

452

constexpr const_iterator

end

()

const

noexcept {

return

cend(); }

454  template

<

class

_Ty,

class

_Alloc>

455  operator

std::vector<_Ty, _Alloc>()

const 457

std::vector<_Ty, _Alloc> vec;

458

vec.reserve(

size

());

459

vec.assign(begin(), end());

468

constexpr

bool x_test

(

size_t

_Pos)

const 470  return

_Pos<_Bits ? _Subscript(_Pos) :

false

;

475  return

((_Array[_Pos / _Bitsperword]

476

& ((

_Ty

)1 << _Pos % _Bitsperword)) != 0);

480  throw

std::out_of_range(

"invalid const_bitset<_Bits, T> position"

);

487 #if __cpp_inline_variables >= 201606L 492 template

<

auto

arg0,

auto

...args>

494  static_cast<size_t>

(

std::max

({arg0, args...})) + 1,

495

std::decay_t<decltype(arg0)>>

ncbi::TMaskedQueryRegions mask

constexpr const_iterator()=default

constexpr const_iterator operator++(int)

constexpr bool operator==(const const_iterator &o) const

std::forward_iterator_tag iterator_category

constexpr T operator->() const

constexpr void x_find_next_bit()

constexpr bool operator!=(const const_iterator &o) const

constexpr const_iterator(const const_bitset *_this, std::false_type)

const ParseFlags & reference

const ParseFlags * pointer

constexpr T operator*() const

std::ptrdiff_t difference_type

constexpr const_iterator(const const_bitset *_this, std::true_type)

constexpr const_iterator & operator++()

constexpr const_bitset()=default

static constexpr auto from_string(char const (&_init)[N])

static constexpr size_t capacity()

constexpr bool ct_set(T _v)

constexpr bool ct_test(T _Pos) const

constexpr bool _Subscript(size_t _Pos) const

constexpr bool empty() const

constexpr const_iterator begin() const noexcept

static constexpr size_t _Words

constexpr const_bitset(const std::array< bool, N > &_init)

constexpr bool test(T _Pos) const

std::array< _Ty, _Words > _Array_t

static constexpr const_bitset set_range(T _from, T _to)

constexpr const_bitset(const _Array_t &args)

constexpr const_iterator cbegin() const noexcept

constexpr const_iterator cend() const noexcept

typename real_underlying_type< ParseFlags >::type u_type

static constexpr size_t _Bits

constexpr const_bitset(T _first, TArgs &&... _extra)

constexpr bool x_test(size_t _Pos) const

constexpr const_iterator end() const noexcept

constexpr size_t size() const

constexpr const_bitset(std::initializer_list< T > _init)

constexpr const_bitset(const std::array< T, N > &_init)

static constexpr size_t _Bitsperword

static vector< string > arr

CVect2< T > operator-(const CVect2< T > &v)

unsigned int

A callback function used to compare two keys in a database.

CNcbiMatrix< T > & operator+=(CNcbiMatrix< T > &, const CNcbiMatrix< U > &)

global addition: matrix += matrix

CNcbiMatrix< T > & operator-=(CNcbiMatrix< T > &, const CNcbiMatrix< U > &)

global subtraction: matrix -= matrix

auto operator+(std::ptrdiff_t off, const indexed_iterator< TArgs... > &other)

constexpr int popcount64c(uint64_t x)

constexpr real_underlying_type_t< Enum > to_real_underlying(Enum e) noexcept

constexpr size_t find_first_bit(uint64_t x)

constexpr int popcount64d(uint64_t x)

const struct ncbi::grid::netcache::search::fields::SIZE size

const GenericPointer< typename T::ValueType > T2 value

std::istream & in(std::istream &in_, double &x_)

Int4 delta(size_t dimension_, const Int4 *score_)

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

static constexpr bool IsYes(bool c)

static constexpr size_t width

static constexpr array_t from_string(const std::array< char, N > &in)

static constexpr void ct_set(array_t &arr, _Other _v)

static constexpr array_t from_range(T from, T to)

static constexpr bool IsYes(char c)

std::array< _Ty, _Size > array_t

static constexpr array_t set_bits(const _Container &args)

static constexpr size_t max_width

static constexpr array_t set_bits(_Iterator begin, _Iterator end)

static constexpr array_t from_bool(const std::array< bool, N > &in)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4