[simd.mask.conv]

# 29 Numerics library [[numerics]](./#numerics)

## 29.10 Data-parallel types [[simd]](simd#mask.conv)

### 29.10.9 Class template basic_mask [[simd.mask.class]](simd.mask.class#simd.mask.conv)

#### 29.10.9.5 basic_mask conversions [simd.mask.conv]

[ð](#lib:operator_basic_vec,basic_mask)

`template<class U, class A>
  constexpr explicit(sizeof(U) != Bytes) operator basic_vec<U, A>() const noexcept;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20291)

*Constraints*: *simd-size-v*<U, A> == *simd-size-v*<T, Abi>[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20295)

*Returns*: A data-parallel object where the ith element is initialized tostatic_cast<U>(operator[](i))[.](#2.sentence-1)

[ð](#lib:to_bitset,basic_mask)

`constexpr bitset<size()> to_bitset() const noexcept;
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20307)

*Returns*: A bitset<size()> object where the ith element is initialized tooperator[](i) for all i in the range [0, size())[.](#3.sentence-1)

[ð](#lib:to_ullong,basic_mask)

`constexpr unsigned long long to_ullong() const;
`

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20319)

Let N be the width of unsigned long long[.](#4.sentence-1)

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20322)

*Preconditions*: 

- [(5.1)](#5.1)

size() <= N is true, or

- [(5.2)](#5.2)

for all i in the range [N, size()), operator[](i) returns false[.](#5.sentence-1)

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20329)

*Returns*: The integral value corresponding to the bits in *this[.](#6.sentence-1)

[7](#7)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20333)

*Throws*: Nothing[.](#7.sentence-1)
