The OpenD Programming Language

SimdSet

Set implementation that is well suited for small sets and simple items.

Uses SSE instructions to compare multiple elements simultaneously, but has linear time complexity.

Note: Only works on x86_64. Does NOT add GC ranges. Do not store pointers in this container unless they are also stored somewhere else.

Constructors

this
this()

No default construction if an allocator must be provided.

this
this(Allocator allocator)

Use the given allocator for allocations.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Postblit

A postblit is present on this object, but not explicitly documented in the source.

Members

Aliases

insertAnywhere
alias insertAnywhere = insert
put
alias put = insert

Inserts the given item into the set.

Functions

contains
bool contains(T item)
insert
bool insert(T item)

Inserts the given item into the set.

length
size_t length()
opBinaryRight
bool opBinaryRight(T item)
opOpAssign
bool opOpAssign(T item)

Inserts the given item into the set.

opSlice
auto opSlice()

Slice operator

remove
bool remove(T item)

Removes the given item from the set.

Parameters

T

the element type

Allocator

the allocator to use. Defaults to Mallocator.

Meta