BepuUtilities
A transformation composed of a linear transformation and a translation.
Translation in the affine transform.
Linear transform in the affine transform.
Gets the identity affine transform.
Constructs a new affine transform.
Translation to use in the transform.
Constructs a new affine tranform.
Orientation to use as the linear transform.
Translation to use in the transform.
Constructs a new affine transform.
Scaling to apply in the linear transform.
Orientation to apply in the linear transform.
Translation to apply.
Constructs a new affine transform.
The linear transform component.
Translation component of the transform.
Transforms a vector by an affine transform.
Position to transform.
Transform to apply.
Transformed position.
Inverts an affine transform.
Transform to invert.
Inverse of the transform.
Inverts a rigid transform.
Transform to invert.
Inverse of the transform.
Multiplies a transform by another transform.
First transform.
Second transform.
Combined transform.
Provides XNA-like axis-aligned bounding box functionality.
Location with the lowest X, Y, and Z coordinates in the axis-aligned bounding box.
Location with the highest X, Y, and Z coordinates in the axis-aligned bounding box.
Constructs a bounding box from the specified minimum and maximum.
Location with the lowest X, Y, and Z coordinates contained by the axis-aligned bounding box.
Location with the highest X, Y, and Z coordinates contained by the axis-aligned bounding box.
Determines if a bounding box intersects another bounding box.
First bounding box to test.
Second bounding box to test.
Whether the bounding boxes intersected.
Determines if a bounding box intersects another bounding box.
First bounding box to test.
Second bounding box to test.
Whether the bounding boxes intersected.
Computes the volume of the bounding box.
Bounding box to measure.
Volume of the bounding box.
Computes a bounding box which contains two other bounding boxes.
Minimum of the first bounding box to merge.
Maximum of the first bounding box to merge.
Minimum of the second bounding box to merge.
Maximum of the second bounding box to merge.
Minimum of the merged bounding box.
Maximum of the merged bounding box.
Computes a bounding box which contains two other bounding boxes.
First bounding box to contain.
Second bounding box to contain.
Bounding box to contain both input boxes.
Determines if a bounding box intersects a bounding sphere.
Sphere to test for intersection.
Whether the bounding shapes intersect.
Creates the smallest possible bounding box that contains a list of points.
Points to enclose with a bounding box.
Bounding box which contains the list of points.
Creates a bounding box from a bounding sphere.
Bounding sphere to be used to create the bounding box.
Bounding box created from the bounding sphere.
Creates a string representation of the bounding box.
String representation of the bounding box.
Provides XNA-like bounding sphere functionality.
Location of the center of the sphere.
Radius of the sphere.
Constructs a new bounding sphere.
Location of the center of the sphere.
Radius of the sphere.
Some helpers for indexing into vector bundles.
.Count.]]>
The JIT recognizes that this value is constant!
> VectorShift divides x by Vector.Count.]]>
The JIT recognizes that this value is constant!
Enumerable wrapper of an array interval.
Type of the array elements.
Creates a enumerable that spans an interval in an array.
Array to iterate over.
Inclusive beginning of the iteration interval.
Exclusive end of the iteration interval.
Creates a enumerable that starts at the first index of the array.
Array to iterate over.
Exclusive end of the iteration interval.
Creates a enumerable over the entire array.
Array to iterate over.
Enumerates over a given array region.
Type of the array to iterate over.
Defines a type capable of comparing two objects passed by reference.
Type of the objects to compare.
Defines a type capable of performing the hashing and equality comparisons necessary for hash based collections.
Type of the elements to be hashed and compared.
Collection of unique indices supporting add, remove, and contains operations.
Since we only ever need to support add, remove and contains checks, and because the indices are guaranteed unique,
we can just use packed bitfields. Each bit represents one index's containment state.
This can grow up to the number of (indexCount / 8) bytes in the worst case, but that is much, much smaller than using a dictionary or set.
16384 bodies would only take 2KB. Even if you have 1000 batches all at that size, it's a pretty unconcerning amount of storage.
(And to be clear, 1000 batches is a crazy pathological number. Most simulations will have less than 20 batches.)
Gets whether the batch could hold the specified indices.
List of indices to check for in the batch.
True if none of the indices are present in the set, false otherwise.
Disposes the internal buffer.
The instance can be reused after a Dispose if EnsureCapacity or Resize is called.
That's a little meaningless given that the instance is a value type, but hey, you don't have to new another one, that's something.
Defines a type able to match an element.
Type of the object to match.
Sorts a set of keys and their associated values using radix sort.
Only one invocation of the sort can be running at a time on a given instance of the sorter.
Type of the values to sort.
Type of the span that holds the keys to sort.
Type of the span that holds the values to sort.
Span containing the keys to sort.
Span containing the values to sort.
Scratch array to write temporary results into.
Scratch array to write temporary results into.
Start location of the sort.
Number of elements, including the start index, to sort.
Value equal to or greater than the value of any key within the sorted key set. Tighter bounds can allow faster execution.
Pool to pull temporary buffers from.
Span containing the sorted keys. Will be either the input keys span or scratchKeys span depending on the keysUpperBound.
Span containing the sorted values. Will be either the input values span or scratchValues span depending on the keysUpperBound.
Only the region defined by the startIndex and count is modified; the remainder of the span (whether it be the input span or the scratch span) is unmodified.
Provides optimized equality testing, comparison, and hashing for primitive types.
Type to compare and hash.
Contains basic helpers for hashing.
Redistributes a hash. Useful for converting unique but contiguous hashes into a semirandom distribution.
Hash to redistribute.
Hashed hash.
Container supporting constant time adds and removes of key-value pairs while preserving fast iteration times.
Offers very direct access to information at the cost of safety.
Be very careful when using this type. It has sacrificed a lot upon the altar of performance; a few notable issues include:
it is a value type and copying it around will break things without extreme care,
it cannot be validly default-constructed,
it exposes internal structures to user modification,
it rarely checks input for errors,
the enumerator doesn't check for mid-enumeration modification,
it allows unsafe addition that can break if the user doesn't manage the capacity,
it works on top of an abstracted memory blob which might internally be a pointer that could be rugpulled,
it does not (and is incapable of) checking that provided memory gets returned to the same pool that it came from.
Note that the implementation is extremely simple. It uses single-step linear probing under the assumption of very low collision rates.
A generous table capacity is recommended; this trades some memory for simplicity and runtime performance.
Type of key held by the container.
Type of value held by the container.
Type of the equality tester and hash calculator used.
Gets the number of elements in the dictionary.
Mask for use in performing fast modulo operations for hashes. Requires that the table span is a power of 2.
Desired size of the table relative to the size of the key/value spans in terms of a power of 2. Table capacity target will be elementCapacityTarget * 2^TablePowerOffset.
Backing memory of the dictionary's table. Values are distributed according to the EqualityComparer's hash function.
Slots containing 0 are unused and point to nothing. Slots containing higher values are equal to one plus the index of an element in the Span.
Backing memory containing the keys of the dictionary.
Indices from 0 to Count-1 hold actual data. All other data is undefined.
Backing memory containing the values of the dictionary.
Indices from 0 to Count-1 hold actual data. All other data is undefined.
Equality comparer used to compare and hash keys.
Gets or sets a key-value pair at the given index in the list representation.
Index to grab a pair from.
Pair at the given index in the dictionary.
Creates a new dictionary.
Span to use as backing memory of the dictionary keys.
Span to use as backing memory of the dictionary values.
Span to use as backing memory of the table. Must be zeroed.
Comparer to use for the dictionary.
Target size of the table relative to the number of stored elements.
Creates a new dictionary with a default constructed comparer.
Span to use as backing memory of the dictionary keys.
Span to use as backing memory of the dictionary values.
Span to use as backing memory of the table. Must be zeroed.
Comparer to use for the dictionary.
Target size of the table relative to the number of stored elements.
Creates a new dictionary.
Initial target size of the key and value spans. The size of the initial buffer will be at least as large as the initialCapacity.
Target capacity relative to the initial capacity in terms of a power of 2. The size of the initial table buffer will be at least 2^tableSizePower times larger than the initial capacity.
Comparer to use in the dictionary.
Pool used for spans.
Creates a new dictionary with a default constructed comparer.
Initial target size of the key and value spans. The size of the initial buffer will be at least as large as the initialCapacity.
Target capacity relative to the initial capacity in terms of a power of 2. The size of the initial table buffer will be at least 2^tableSizePower times larger than the initial capacity.
Comparer to use in the dictionary.
Pool used for spans.
Creates a new dictionary with a default constructed comparer.
Initial target size of the key and value spans. The size of the initial buffer will be at least as large as the initialCapacity.
Comparer to use in the dictionary.
Pool used for spans.
Swaps out the dictionary's backing memory span for a new span.
If the new span is smaller, the dictionary's count is truncated and the extra elements are dropped.
The old span is not cleared or returned to any pool; if it needs to be pooled or cleared, the user must handle it.
New span to use for keys.
New span to use for values.
New span to use for the table. Must be zeroed.
Previous span used for keys.
Previous span used for values.
Previous span used for the table.
Resizes the dictionary's backing array for the given size.
If the new span is smaller, the dictionary's count is truncated and the extra elements are dropped.
Minimum size of the new object memory block. Actual size may be larger.
Pool used for spans.
Returns the resources associated with the dictionary to pools.
Pool used for key spans.
Pool used for value spans.
Pool used for table spans.
Type of the pool used for key spans.
Type of the pool used for value spans.
Type of the pool used for table spans.
Ensures that the dictionary has enough room to hold the specified number of elements.
Pool used for spans.
Number of elements to hold.
Shrinks the internal buffers to the smallest acceptable size and releases the old buffers to the pools.
Pool used for spans.
Gets the index of the element in the table.
Element to look up.
Index of the element in the redirect table, or if it is not present, the index of where it would be added.
The index of the element in the element arrays, if it exists; -1 otherwise.
True if the element is present in the dictionary, false if it is not.
Gets the index of the key in the dictionary values list if it exists.
Key to get the index of.
The index of the key if the key exists in the dictionary, -1 otherwise.
Gets the index of the key in the dictionary values list if it exists.
Key to get the index of.
The index of the key if the key exists in the dictionary, -1 otherwise.
Checks if a given key already belongs to the dictionary.
Key to test for.
True if the key already belongs to the dictionary, false otherwise.
Checks if a given key already belongs to the dictionary.
Key to test for.
True if the key already belongs to the dictionary, false otherwise.
Tries to retrieve the value associated with a key if it exists.
Key to look up.
Value associated with the specified key.
True if a value was found, false otherwise.
Tries to retrieve the value associated with a key if it exists.
Key to look up.
Value associated with the specified key.
True if a value was found, false otherwise.
Attempts to find the index of the given key. If it is present, outputs the index and returns true. If it is not present, it allocates a slot for it, outputs the index of that new slot, and returns false.
If a new slot is allocated, the value stored in the slot is undefined.
Key to find or allocate a slot for.
Index of the found or allocated slot.
True if the key was already present in the dictionary, false otherwise.
Attempts to find the index of the given key. If it is present, outputs the index and returns true. If it is not present, it allocates a slot for it, outputs the index of that new slot, and returns false.
If a new slot is allocated, the value stored in the slot is undefined.
Key to find or allocate a slot for.
Index of the found or allocated slot.
True if the key was already present in the dictionary, false otherwise.
Attempts to find the index of the given key. If it is present, outputs the index and returns true. If it is not present, it allocates a slot for it, outputs the index of that new slot, and returns false.
If a new slot is allocated, the value stored in the slot is undefined.
Key to find or allocate a slot for.
Pool used to resize the container if necessary to allocate.
Index of the found or allocated slot.
True if the key was already present in the dictionary, false otherwise.
Attempts to find the index of the given key. If it is present, outputs the index and returns true. If it is not present, it allocates a slot for it, outputs the index of that new slot, and returns false.
If a new slot is allocated, the value stored in the slot is undefined.
Key to find or allocate a slot for.
Pool used to resize the container if necessary to allocate.
Index of the found or allocated slot.
True if the key was already present in the dictionary, false otherwise.
Adds a pair to the dictionary. If a version of the key (same hash code, 'equal' by comparer) is already present,
the existing pair is replaced by the given version.
Key of the pair to add.
Value of the pair to add.
True if the pair was added to the dictionary, false if the key was already present and its pair was replaced.
Adds a pair to the dictionary. If a version of the key (same hash code, 'equal' by comparer) is already present,
the existing pair is replaced by the given version.
Key of the pair to add.
Value of the pair to add.
True if the pair was added to the dictionary, false if the key was already present and its pair was replaced.
Adds a pair to the dictionary if it is not already present.
Key of the pair to add.
Value of the pair to add.
True if the pair was added to the dictionary, false if the key was already present.
Adds a pair to the dictionary if it is not already present.
Key of the pair to add.
Value of the pair to add.
True if the pair was added to the dictionary, false if the key was already present.
Adds a pair to the dictionary. If a version of the key (same hash code, 'equal' by comparer) is already present,
the existing pair is replaced by the given version.
Key of the pair to add.
Value of the pair to add.
Pool used for spans.
True if the pair was added to the dictionary, false if the key was already present and its pair was replaced.
Adds a pair to the dictionary. If a version of the key (same hash code, 'equal' by comparer) is already present,
the existing pair is replaced by the given version.
Key of the pair to add.
Value of the pair to add.
Pool used for spans.
True if the pair was added to the dictionary, false if the key was already present and its pair was replaced.
Adds a pair to the dictionary if it is not already present.
Key of the pair to add.
Value of the pair to add.
Pool used for spans.
Type of the pool used for spans.
True if the pair was added to the dictionary, false if the key was already present.
Adds a pair to the dictionary if it is not already present.
Key of the pair to add.
Value of the pair to add.
Pool to pull resources from and to return resources to.
Type of the pool to use.
True if the pair was added to the dictionary, false if the key was already present.
Removes an element from the dictionary according to its table and element index. Can only be used if the table and element index are valid.
Index of the table entry associated with the existing element to remove.
Index of the existing element to remove in the contiguous key/value arrays.
Removes a pair associated with a key from the dictionary if belongs to the dictionary.
Does not preserve the order of elements in the dictionary.
Key of the pair to remove.
True if the key was found and removed, false otherwise.
Removes a pair associated with a key from the dictionary if belongs to the dictionary.
Does not preserve the order of elements in the dictionary.
Key of the pair to remove.
True if the key was found and removed, false otherwise.
Removes all elements from the dictionary.
Removes all elements from the dictionary without modifying the contents of the keys or values arrays.
Gets the keys and values wrapped in spans.
Keys from the dictionary.
Values from the dictionary.
Container supporting list-like behaviors built on top of unmanaged buffers.
Be very careful when using this type. It has sacrificed a lot upon the altar of performance; a few notable issues include:
it is a value type and copying it around will break things without extreme care,
it cannot be validly default-constructed,
it exposes internal structures to user modification,
it rarely checks input for errors,
the enumerator doesn't check for mid-enumeration modification,
it allows unsafe addition that can break if the user doesn't manage the capacity,
it works on top of an abstracted memory blob which might internally be a pointer that could be rugpulled,
it does not (and is incapable of) checking that provided memory gets returned to the same pool that it came from.
Type of the elements in the list.
Backing memory containing the elements of the list.
Indices from 0 to Count-1 hold actual data. All other data is undefined.
Number of elements in the list.
Gets a reference to the element at the given index in the list.
Index to grab an element from.
Element at the given index in the list.
Gets a pointer to the element at the given index in the list.
Index to grab an element pointer from.
Pointer to the element at the given index in the list.
Creates a new list.
Span to use as backing memory to begin with.
Creates a new list.
Pool to pull a span from.
The minimum size of the region to be pulled from the pool. Actual span may be larger.
Swaps out the list's backing memory span for a new span.
If the new span is smaller, the list's count is truncated and the extra elements are dropped.
The old span is not cleared or returned to any pool; if it needs to be pooled or cleared, the user must handle it.
New span to use.
Previous span used for elements.
Resizes the list's backing array for the given size.
Any elements that do not fit in the resized span are dropped and the count is truncated.
Minimum number of elements required in the new backing array. Actual capacity of the created span may exceed this size.
Pool to pull a new span from and return the old span to.
Returns the resources associated with the list to pools. Any managed references still contained within the list are cleared (and some unmanaged resources may also be cleared).
Pool used for element spans.
Ensures that the list has enough room to hold the specified number of elements. Can be used to initialize a list.
Number of elements to hold.
Pool used to obtain a new span if needed.
Compacts the internal buffer to the minimum size required for the number of elements in the list.
Adds the elements of a buffer to the QuickList without checking capacity.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Adds the elements of a buffer to the QuickList.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Pool used to obtain a new span if needed.
Adds the elements of a buffer to the QuickList without checking capacity.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Adds the elements of a buffer to the QuickList.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Pool used to obtain a new span if needed.
Adds the elements of a span to the QuickList without checking capacity.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Adds the elements of a span to the QuickList.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Pool used to obtain a new span if needed.
Adds the elements of a span to the QuickList without checking capacity.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Adds the elements of a span to the QuickList.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Pool used to obtain a new span if needed.
Adds the elements of a span to the QuickList without checking capacity.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Adds the elements of a span to the QuickList.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Pool used to obtain a new span if needed.
Adds the elements of a span to the QuickList without checking capacity.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Adds the elements of a span to the QuickList.
Span of elements to add.
Start index of the added range.
Number of elements in the added range.
Pool used to obtain a new span if needed.
Appends space on the end of the list without checking capacity and returns a reference to it.
Reference to the allocated space.
Appends space on the end of the list without checking capacity and returns a reference to the beginning of it.
Number of elements to allocate space for.
Reference to the beginning of the allocated space.
Appends space on the end of the list and returns a reference to it.
Reference to the allocated space.
Pool used to obtain a new span if needed.
Appends space on the end of the list and returns a reference to the beginning of it.
Reference to the beginning of the allocated space.
Number of elements to allocate space for.
Pool used to obtain a new span if needed.
Adds the element to the list without checking the count against the capacity.
Item to add.
Adds the element to the list.
Item to add.
Pool used to obtain a new span if needed.
Gets the index of the element in the list using the default comparer, if present.
Element to find.
Index of the element in the list if present, -1 otherwise.
Gets the index of the element in the list using the default comparer, if present.
Element to find.
Index of the element in the list if present, -1 otherwise.
Gets the index of the first element in the list which matches a predicate, if any.
Predicate to match.
Index of the first matching element in the list if present, -1 otherwise.
Removes an element from the list. Preserves the order of elements.
Element to remove from the list.
True if the element was present and was removed, false otherwise.
Removes an element from the list. Preserves the order of elements.
Element to remove from the list.
True if the element was present and was removed, false otherwise.
Removes the first element that matches a predicate from the list. Preserves the order of elements.
Predicate to test elements with.
True if an element matched and was removed, false otherwise.
Removes an element from the list. Does not preserve the order of elements.
Element to remove from the list.
True if the element was present and was removed, false otherwise.
Removes an element from the list. Comparisons use the default comparer for the type. Does not preserve the order of elements.
Element to remove from the list.
True if the element was present and was removed, false otherwise.
Removes the first element from the list that matches a predicate, moving from low to high indices. Does not preserve the order of elements.
Predicate to test elements with.
True if an element matched and was removed, false otherwise.
Removes an element from the list at the given index. Preserves the order of elements.
Index of the element to remove from the list.
Removes an element from the list at the given index. Does not preserve the order of elements.
Index of the element to remove from the list.
Removes and outputs the last element in the list. Assumes positive count. User is responsible for guaranteeing correctness.
Last element of the list.
Removes and outputs the last element in the list if it exists.
Last element of the list.
True if the element existed and was removed, false otherwise.
Determines whether the contains a specific value.
true if is found in the ; otherwise, false.
The object to locate in the .
Determines whether the collection contains a specific value.
True if is found in the collection; otherwise, false.
The object to locate in the collection.
Determines whether the collection contains an element that matches a predicate.
True if an element matching the predicate exists, otherwise false.
The predicate to test against elements in the list.
Clears the list by setting the count to zero and explicitly setting all relevant indices in the backing array to default values.
Container supporting double ended queue behaviors built on top of pooled arrays.
Be very careful when using this type. It has sacrificed a lot upon the altar of performance; a few notable issues include:
it is a value type and copying it around will break things without extreme care,
it cannot be validly default-constructed,
it exposes internal structures to user modification,
it rarely checks input for errors,
the enumerator doesn't check for mid-enumeration modification,
it allows unsafe addition that can break if the user doesn't manage the capacity,
it works on top of an abstracted memory blob which might internally be a pointer that could be rugpulled,
it does not (and is incapable of) checking that provided memory gets returned to the same pool that it came from.
Type of the elements in the queue.
Number of elements in the queue.
Index of the first element in the queue.
Index of the last element in the queue.
Mask based on the current span length used to do fast modulo operations; requires that the span has a power of 2 length.
Gets the backing memory containing the elements of the queue.
Indices from FirstIndex to LastIndex inclusive hold actual data. All other data is undefined.
Watch out for wrap around; LastIndex can be less than FirstIndex even when count > 0!
Gets the backing array index for the logical queue index.
Index in the logical queue.
The index in in the backing array corresponding to the given logical queue index.
Gets an element at the given index in the queue.
0 gets the element at the FirstIndex. Count-1 would get the element at LastIndex.
Index to grab an element from.
Element at the given index in the queue.
Creates a new queue.
Span to use as backing memory to begin with.
Creates a new queue.
Pool to pull a span from.
The minimum size of the region to be pulled from the pool. Actual span may be larger.
Swaps out the queue's backing memory span for a new span.
If the new span is smaller, the queue's count is truncated and the extra elements are dropped.
The old span is not cleared or returned to any pool; if it needs to be pooled or cleared, the user must handle it.
New span to use.
Previous span used for elements.
Resizes the queue's backing array for the given size.
Any elements that do not fit in the resized span are dropped and the count is truncated.
Minimum number of elements required in the new backing array. Actual capacity of the created span may exceed this size.
Pool to pull a new span from and return the old span to.
Returns the resources associated with the queue to pools. Any managed references still contained within the queue are cleared (and some unmanaged resources may also be cleared).
Pool used for element spans.
Ensures that the queue has enough room to hold the specified number of elements.
Number of elements to hold.
Pool to pull a new span from and return the old span to.
Compacts the internal buffer to the minimum size required for the number of elements in the queue.
Pool to pull from if necessary.
Enqueues the element to the end of the queue, incrementing the last index.
Item to enqueue.
Enqueues the element to the start of the queue, decrementing the first index.
Item to enqueue.
Enqueues the element to the end of the queue, incrementing the last index.
Item to enqueue.
Enqueues the element to the start of the queue, decrementing the first index.
Item to enqueue.
Dequeues an element from the start of the queue, incrementing the first index.
Element removed from the queue.
Dequeues an element from the end of the queue, decrementing the last index.
Element removed from the queue.
Attempts to dequeue an element from the start of the queue, incrementing the first index.
Element removed from the queue, if any.
True if an element was available to remove, false otherwise.
Attempts to dequeue an element from the end of the queue, decrementing the last index.
Element removed from the queue, if any.
True if an element was available to remove, false otherwise.
Removes the element at the given index, preserving the order of the queue.
Index in the queue to remove. The index is in terms of the conceptual queue, not the backing array.
Clears the queue by setting the count to zero and explicitly setting all relevant indices in the backing array to default values.
Clears the queue without changing any of the values in the backing array. Be careful about using this if the queue contains reference types.
Container supporting constant time adds and removes while preserving fast iteration times.
Offers very direct access to information at the cost of safety.
Be very careful when using this type. It has sacrificed a lot upon the altar of performance; a few notable issues include:
it is a value type and copying it around will break things without extreme care,
it cannot be validly default-constructed,
it exposes internal structures to user modification,
it rarely checks input for errors,
the enumerator doesn't check for mid-enumeration modification,
it allows unsafe addition that can break if the user doesn't manage the capacity,
it works on top of an abstracted memory blob which might internally be a pointer that could be rugpulled,
it does not (and is incapable of) checking that provided memory gets returned to the same pool that it came from.
Note that the implementation is extremely simple. It uses single-step linear probing under the assumption of very low collision rates.
A generous table capacity is recommended; this trades some memory for simplicity and runtime performance.
Type of element held by the container.
Type of the equality tester and hash calculator used.
Gets the number of elements in the set.
Mask for use in performing fast modulo operations for hashes. Requires that the table span is a power of 2.
Desired size of the table relative to the size of the key/value spans in terms of a power of 2. Table capacity target will be elementCapacityTarget * 2^TablePowerOffset.
Backing memory of the set's table. Values are distributed according to the EqualityComparer's hash function.
Slots containing 0 are unused and point to nothing. Slots containing higher values are equal to one plus the index of an element in the Span.
Backing memory containing the elements of the set.
Indices from 0 to Count-1 hold actual data. All other data is undefined.
Equality comparer used to compare and hash elements.
Gets or sets an element at the given index in the list representation of the set.
Index to grab an element from.
Element at the given index in the set.
Creates a new set.
Span to use as backing memory of the set elements.
Span to use as backing memory of the table. Must be zeroed out.
Comparer to use for the set.
Target size of the table relative to the number of stored elements.
Creates a new set using a default constructed equality comparer.
Span to use as backing memory of the set elements.
Span to use as backing memory of the table. Must be zeroed.
Target size of the table relative to the number of stored elements.
Creates a new set.
Pool to pull spans from.
Initial target size of the key and value spans. The size of the initial buffer will be at least as large as the initialCapacity.
Target capacity relative to the initial capacity in terms of a power of 2. The size of the initial table buffer will be at least 2^tableSizePower times larger than the initial capacity.
Comparer to use in the set.
Creates a new set with a default constructed comparer.
Pool to pull spans from.
Initial target size of the key and value spans. The size of the initial buffer will be at least as large as the initialCapacity.
Target capacity relative to the initial capacity in terms of a power of 2. The size of the initial table buffer will be at least 2^tableSizePower times larger than the initial capacity.
Creates a new set with a default constructed comparer.
Pool to pull spans from.
Initial target size of the key and value spans. The size of the initial buffer will be at least as large as the initialCapacity.
Swaps out the set's backing memory span for a new span.
If the new span is smaller, the set's count is truncated and the extra elements are dropped.
The old span is not cleared or returned to any pool; if it needs to be pooled or cleared, the user must handle it.
New span to use for elements.
New span to use for the table. Must be zeroed.
Previous span used for elements.
Previous span used for the table.
Resizes the set's backing array for the given size.
If the new span is smaller, the set's count is truncated and the extra elements are dropped.
Minimum size of the new object memory block. Actual size may be larger.
Pool to take spans from.
Returns the resources associated with the set to pools. Any managed references still contained within the set are cleared (and some unmanaged resources may also be cleared).
Pool used for element spans.
Ensures that the set has enough room to hold the specified number of elements.
Pool used for spans.
Number of elements to hold.
Shrinks the internal buffers to the smallest acceptable size and releases the old buffers to the pools.
Element to add.
Pool used for spans.
Gets the index of the element in the table.
Element to look up.
Index of the element in the redirect table, or if it is not present, the index of where it would be added.
The index of the element in the elements array, if it exists; -1 otherwise.
True if the element is present in the set, false if it is not.
Gets the index of the element in the set if it exists.
Element to get the index of.
The index of the element if the element exists in the set, -1 otherwise.
Gets the index of the element in the set if it exists.
Element to get the index of.
The index of the element if the element exists in the set, -1 otherwise.
Checks if a given element already belongs to the set.
Element to test for.
True if the element already belongs to the set, false otherwise.
Checks if a given element already belongs to the set.
Element to test for.
True if the element already belongs to the set, false otherwise.
Adds an element to the set. If a version of the element (same hash code, 'equal' by comparer) is already present,
it is replaced by the given version.
Does not resize in the event that the capacity is exceeded.
Element to add.
True if the element was added to the set, false if the element was already present and was instead replaced.
Adds an element to the set. If a version of the element (same hash code, 'equal' by comparer) is already present,
it is replaced by the given version.
Does not resize in the event that the capacity is exceeded.
Element to add.
True if the element was added to the set, false if the element was already present and was instead replaced.
Adds an element to the set if it is not already present.
Does not resize in the event that the capacity is exceeded.
Element to add.
True if the element was added to the set, false if the element was already present.
Adds an element to the set if it is not already present.
Does not resize in the event that the capacity is exceeded.
Element to add.
True if the element was added to the set, false if the element was already present.
Adds an element to the set. If a version of the element (same hash code, 'equal' by comparer) is already present,
it is replaced by the given version.
Element to add.
Pool used for spans.
True if the element was added to the set, false if the element was already present and was instead replaced.
Adds an element to the set if it is not already present.
Element to add.
Pool used for spans.
True if the element was added to the set, false if the element was already present.
Adds an element to the set. If a version of the element (same hash code, 'equal' by comparer) is already present,
it is replaced by the given version.
Element to add.
Pool used for spans.
True if the element was added to the set, false if the element was already present and was instead replaced.
Adds an element to the set if it is not already present.
Element to add.
Pool used for spans.
True if the element was added to the set, false if the element was already present.
Removes an element from the dictionary according to its table and element index. Can only be used if the table and element index are valid.
Index of the table entry associated with the existing element to remove.
Index of the existing element to remove in the contiguous element array.
Removes an element from the set if belongs to the set.
Does not preserve the order of elements in the set.
Element to remove.
True if the element was found and removed, false otherwise.
Removes an element from the set if belongs to the set.
Does not preserve the order of elements in the set.
Element to remove.
True if the element was found and removed, false otherwise.
Removes all elements from the set.
Removes all elements from the set without modifying the contents of the elements array.
Provides equality comparison and hashing for referenced types.
Type to compare for equality and hash.
IEqualityComparerRef wrapper around an EqualityComparer.
Type of the objects to compare and hash.
Creates a default comparer for the given type.
Predicate to test against other items using the default comparer for this type.
IPredicate wrapper around an EqualityComparer and an object to compare against.
Type of the objects to compare.
Creates a default comparer for the given type.
Item to compare against other items.
Predicate to test against other items using the default comparer for this type.
The current containment state of two objects.
The objects are separate.
One object fully contains the other.
The objects are intersecting, but neither object fully contains the other.
Gets a reference to an element from a vector without using pointers, bypassing direct vector access for codegen reasons. This performs no bounds testing!
Copies from one bundle lane to another. The bundle must be a contiguous block of Vector types.
Type of the copied bundles.
Source bundle of the data to copy.
Index of the lane within the source bundle.
Target bundle of the data to copy.
Index of the lane within the target bundle.
For performance critical operations, a specialized implementation should be used. This uses a loop with stride equal to a Vector that isn't yet unrolled.
Clears a bundle lane using the default value of the specified type. The bundle must be a contiguous block of Vector types, all sharing the same type,
and the first vector must start at the address pointed to by the bundle reference.
Type containing one or more Vectors.
Type of the vectors to clear.
Target bundle to clear a lane in.
Index of the lane within the target bundle to clear.
For performance critical operations, a specialized implementation should be used. This uses a loop with stride equal to a Vector.
Gets a reference to a shifted bundle container such that the first slot of each bundle covers the given inner index of the original bundle reference.
Type of the bundle container.
Bundle container whose reference acts as the base for the shifted reference.
Index within the bundle to access with the shifted reference.
Shifted bundle container reference covering the inner index of the original bundle reference.
Gets a reference to the first element in the vector reference.
Type of value held by the vector.
Vector to pull the first slot value from.
Reference to the value in the given vector's first slot.
Defines a loop body function able to handle the equivalent of a foreach's body. Takes a ref parameter for efficiency when dealing with large value types.
Type to enumerate over.
Defines a loop body function able to handle the equivalent of a foreach's body.
Type to enumerate over.
Defines a loop body function able to handle the equivalent of a foreach's body that supports breaking the loop early.
Type to enumerate over.
Executes one execution of the loop body.
Visited element.
True if the loop should continue, false otherwise.
Defines a loop body function able to handle the equivalent of a foreach's body that supports breaking the loop early.
Takes a ref parameter for efficiency when dealing with large value types.
Type to enumerate over.
Executes one execution of the loop body.
Visited element.
True if the loop should continue, false otherwise.
Provides simple 2d cell hashing.
A set of 3 integers, useful for spatial hashing.
Provides multithreading dispatch primitives, a thread count, and per thread resource pools for the simulation to use.
Note that the simulation does not require a true load balancing forloop implementation. All that's needed is a way to jumpstart some threads.
All systems which use multithreading tend to have some form of domain specific load balancing that a general purpose thread pool or parallel for loop implementation
couldn't match. The simulation also tends to keep the number of dispatches as low as it can. Combined, these two things reduce the importance of a
very highly optimized dispatcher.
This is important when a user wants to share some other thread pool, but doesn't have the time to guarantee extremely high performance and high quality
load balancing. Instead of worrying about that, they can just wrap whatever implementation they happen to have and it'll probably work fine.
Gets the number of workers available in the thread dispatcher.
Note that some systems (like the solver) expect the ThreadCount to be backed by truly independent threads capable of progression even when one is blocked.
If the ThreadCount doesn't represent independent threads, deadlocks will occur.
Dispatches all the available workers.
Delegate to be invoked on for every worker.
Gets the memory pool associated with a given worker index. It is guaranteed that no other workers will share the same pool for the duration of the worker's execution.
All usages of the memory pool within the simulation are guaranteed to return thread pool memory before the function returns. In other words,
thread memory pools are used for strictly ephemeral memory, and it will never be held by the simulation outside the scope of a function that
takes the IThreadDispatcher as input.
Index of the worker to grab the pool for.
The memory pool for the specified worker index.
Contains conditional extensions to check for bad values in various structures.
Checks a single float for validity.
Value to validate.
True if the value is invalid, false if it is valid.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Checks the value to see if it is a NaN or infinite. If it is, an exception is thrown.
This is only run when the CHECKMATH symbol is defined.
Contains helper math methods.
Approximate value of Pi.
Approximate value of Pi multiplied by two.
Approximate value of Pi divided by two.
Approximate value of Pi divided by four.
Clamps a value between a minimum and maximum value.
Value to clamp.
Minimum value. If the value is less than this, the minimum is returned instead.
Maximum value. If the value is more than this, the maximum is returned instead.
Clamped value.
Returns the higher value of the two parameters.
First value.
Second value.
Higher value of the two parameters.
Returns the lower value of the two parameters.
First value.
Second value.
Lower value of the two parameters.
Clamps a value between a minimum and maximum value.
Value to clamp.
Minimum value. If the value is less than this, the minimum is returned instead.
Maximum value. If the value is more than this, the maximum is returned instead.
Clamped value.
Returns the higher value of the two parameters.
First value.
Second value.
Higher value of the two parameters.
Returns the lower value of the two parameters.
First value.
Second value.
Lower value of the two parameters.
Clamps a value between a minimum and maximum value.
Value to clamp.
Minimum value. If the value is less than this, the minimum is returned instead.
Maximum value. If the value is more than this, the maximum is returned instead.
Clamped value.
Returns the higher value of the two parameters.
First value.
Second value.
Higher value of the two parameters.
Returns the lower value of the two parameters.
First value.
Second value.
Lower value of the two parameters.
Converts degrees to radians.
Degrees to convert.
Radians equivalent to the input degrees.
Converts radians to degrees.
Radians to convert.
Degrees equivalent to the input radians.
Returns -1 if the value is negative and 1 otherwise.
Value to compute the sign of.
-1 if the input is negative, and 1 otherwise.
Computes an approximation of cosine. Maximum error a little above 3e-6.
Value to take the cosine of.
Approximate cosine of the input value.
Computes an approximation of sine. Maximum error a little above 3e-6.
Value to take the sine of.
Approximate sine of the input value.
Computes an approximation of cosine. Maximum error a little above 3e-6.
Values to take the cosine of.
Approximate cosine of the input values.
Computes an approximation of sine. Maximum error a little above 3e-6.
Value to take the sine of.
Approximate sine of the input value.
Computes an approximation of arccos. Maximum error less than 6.8e-5.
Input value to the arccos function.
Result of the arccos function.
Gets the change in angle from a to b as a signed value from -pi to pi.
Source angle.
Target angle.
Difference between a and b, expressed as a value from -pi to pi.
Provides SIMD-aware 4x4 matrix math.
All functions assume row vectors.
Row 1 of the matrix.
Row 2 of the matrix.
Row 3 of the matrix.
Row 4 of the matrix.
Transforms a vector with a transposed matrix.
Row vector to transform.
Matrix whose transpose will be applied to the vector.
Transformed vector.
Transforms a vector with a matrix.
Row vector to transform.
Matrix to apply to the vector.
Transformed vector.
Transforms a vector with a matrix. Implicitly uses 1 as the fourth component of the input vector.
Row vector to transform.
Matrix to apply to the vector.
Transformed vector.
Multiplies a matrix by another matrix.
First matrix.
Second matrix.
Result of the matrix multiplication.
Concatenates two matrices.
First input matrix.
Second input matrix.
Concatenated transformation of the form m1 * m2.
Creates a right-handed perspective matrix.
Vertical field of view of the perspective in radians.
Width of the viewport over the height of the viewport.
Near clip plane of the perspective.
Far clip plane of the perspective.
Resulting perspective matrix.
Creates a left-handed perspective matrix.
Vertical field of view of the perspective in radians.
Width of the viewport over the height of the viewport.
Near clip plane of the perspective.
Far clip plane of the perspective.
Resulting perspective matrix.
Creates a right-handed perspective matrix.
Vertical field of view of the perspective in radians.
Horizontal field of view of the perspective in radians.
Near clip plane of the perspective.
Far clip plane of the perspective.
Resulting perspective matrix.
Creates a right-handed perspective matrix.
Vertical field of view of the perspective in radians.
Horizontal field of view of the perspective in radians.
Near clip plane of the perspective.
Far clip plane of the perspective.
Resulting perspective matrix.
Creates a right-handed perspective matrix.
Vertical field of view of the perspective in radians.
Width of the viewport over the height of the viewport.
Near clip plane of the perspective.
Far clip plane of the perspective.
Resulting perspective matrix.
Creates a right handed orthographic projection.
Leftmost coordinate of the projected area.
Rightmost coordinate of the projected area.
Bottom coordinate of the projected area.
Top coordinate of the projected area.
Near plane of the projection.
Far plane of the projection.
The resulting orthographic projection matrix.
Inverts the matrix.
Matrix to invert.
Inverted version of the matrix.
Inverts the matrix.
Matrix to invert.
Inverted version of the matrix.
Creates a view matrix pointing from a position to a target with the given up vector.
Position of the camera.
Target of the camera.
Up vector of the camera.
Look at matrix.
Creates a view matrix pointing from a position to a target with the given up vector.
Position of the camera.
Target of the camera.
Up vector of the camera.
Look at matrix.
Creates a view matrix pointing in a direction with a given up vector.
Position of the camera.
Forward direction of the camera.
Up vector of the camera.
Look at matrix.
Creates a view matrix pointing looking in a direction with a given up vector.
Position of the camera.
Forward direction of the camera.
Up vector of the camera.
Look at matrix.
Creates a rigid world matrix from a rotation and position.
Rotation of the transform.
Position of the transform.
4x4 matrix representing the combined transform.
Creates a rigid world matrix from a rotation and position.
Rotation of the transform.
Position of the transform.
4x4 matrix representing the combined transform.
Creates a 4x4 matrix from a 3x3 matrix. All extra columns and rows filled with 0 except the W.W, which is set to 1.
Smaller matrix to base the larger matrix on.
Larger matrix that has the smaller matrix as a submatrix.
Creates a 4x4 matrix from a 3x3 matrix. All extra columns and rows filled with 0 except the W.W, which is set to 1.
Smaller matrix to base the larger matrix on.
Larger matrix that has the smaller matrix as a submatrix.
First row of the matrix.
Second row of the matrix.
Multiplies a matrix by another matrix, where the second matrix is sampled as if it were transposed: result = a * transpose(b).
First matrix in the pair.
Matrix to be sampled as if it were transposed when multiplied with the first matrix.
Result of the multiplication a * transpose(b).
Multiplies every component in the matrix by the given scalar value.
Matrix to scale.
Scaling value to apply to the matrix's components.
Resulting matrix with scaled components.
Adds the components of one matrix to another.
First matrix to add.
Second matrix to add.
Sum of the two given matrices.
Subtracts the components of one matrix from another.
Matrix to be subtracted from..
Matrix to subtract from the other.
Result of the subtraction.
Inverts the given matix.
Matrix to be inverted.
Inverted matrix.
First row of the matrix.
Second row of the matrix.
Multiplies a matrix by another matrix, where the first matrix is sampled as if it were transposed: result = transpose(a) * b.
Matrix to be sampled as if it were transposed when multiplied with the second matrix.
Second matrix in the pair.
Result of the multiplication transpose(a) * b.
Multiplies a matrix by another matrix, where the second matrix is sampled as if it were transposed: result = a * transpose(b).
First matrix in the pair.
Matrix to be sampled as if it were transposed when multiplied with the first matrix.
Result of the multiplication a * transpose(b).
Multiplies every component in the matrix by the given scalar value.
Matrix to scale.
Scaling value to apply to the matrix's components.
Resulting matrix with scaled components.
3 row, 3 column matrix.
Gets the 3x3 identity matrix.
Adds the components of two matrices together.
First matrix to add.
Second matrix to add.
Sum of the two input matrices.
Scales the components of a matrix by a scalar.
Matrix to scale.
Scale to apply to the matrix's components.
Scaled matrix.
Subtracts the components of one matrix from another.
Matrix to be subtracted from.
Matrix to subtract from a.
Difference of the two input matrices.
Computes the transposed matrix of a matrix.
Matrix to transpose.
Transposed matrix.
Calculates the determinant of the matrix.
The matrix's determinant.
Inverts the given matix.
Matrix to be inverted.
Inverted matrix.
Inverts the given matix.
Matrix to be inverted.
Inverted matrix.
Transforms the vector by the matrix.
Vector3 to transform.
Matrix to use as the transformation.
Product of the transformation.
Transforms the vector by the matrix's transpose.
Vector3 to transform.
Matrix to use as the transformation transpose.
Product of the transformation.
Multiplies the two matrices.
First matrix to multiply.
Second matrix to multiply.
Product of the multiplication.
Multiplies the two matrices, where a is treated as transposed: result = transpose(a) * b
First matrix to multiply that will be transposed.
Second matrix to multiply.
Product of the multiplication.
Creates a 3x3 matrix representing the given scale along its local axes.
Scale to represent.
Matrix representing a scale.
Creates a matrix representing a rotation derived from an axis and angle.
Axis of the rotation.
Angle of the rotation.
Resulting rotation matrix.
Creates a matrix representing a rotation derived from an axis and angle.
Axis of the rotation.
Angle of the rotation.
Resulting rotation matrix.
Creates a matrix such that a x v = a * result.
Vector to build the skew symmetric matrix from.
Skew symmetric matrix representing the cross product.
Concatenates two matrices.
First input matrix.
Second input matrix.
Concatenated transformation of the form m1 * m2.
First row of the matrix.
Second row of the matrix.
Third row of the matrix.
Multiplies a matrix by another matrix, where the first matrix is sampled as if it were transposed: result = transpose(a) * b.
Matrix to be sampled as if it were transposed when multiplied with the second matrix.
Second matrix in the pair.
Result of the multiplication transpose(a) * b.
Multiplies a matrix by another matrix, where the second matrix is sampled as if it were transposed: result = a * transpose(b).
First matrix in the pair.
Matrix to be sampled as if it were transposed when multiplied with the first matrix.
Result of the multiplication a * transpose(b).
Negates the components of a matrix.
Matrix to negate.
Negated result matrix.
Multiplies every component in the matrix by the given scalar value.
Matrix to scale.
Scaling value to apply to the matrix's components.
Resulting matrix with scaled components.
Pulls one lane out of the wide representation.
Source of the lane.
Non-SIMD type to store the lane in.
Pulls one lane out of the wide representation.
Source of the lane.
Index of the lane within the wide representation to read.
Non-SIMD type to store the lane in.
Represents a chunk of abstract memory supporting allocations and deallocations.
Never moves any memory.
Uses an extremely simple ring buffer that makes no attempt to skip groups of allocations. Not particularly efficient.
Gets or sets the capacity of the allocator.
Index in allocations that we should start at during the next allocation attempt.
Creates a new allocator.
Size of the memory handled by the allocator in elements.
Estimated number of allocations to allocate room for in the internal structures.
Pool to pull internal resources from.
Checks if the id is currently allocated.
Id to check for.
True if the id is present in the allocations set, false otherwise.
Gets the allocation region associated with the given allocation id if it is present.
Allocation id to look up the allocation for.
Allocation associated with the id, if present.
True if the allocationId was present in the allocator, false otherwise.
Checks if a block of memory can fit into the current state of the allocator.
Size of the memory to test.
Ids of allocations to treat as nonexistent for the purposes of the test.
True if the size could fit, false if out of memory or if memory was too fragmented to find a spot.
Checks if a block of memory can fit into the current state of the allocator.
Size of the memory to test.
True if the size could fit, false if out of memory or if memory was too fragmented to find a spot.
Attempts to allocate a range of memory.
Unique id of the memory to allocate.
Size of the memory to allocate.
Starting index of the allocated memory, if successful.
True if the allocation succeeded, false if out of memory or if memory was too fragmented to find a spot.
Removes the memory associated with the id from the pool.
Id to remove.
True of the id was found, false otherwise.
Gets the size of the largest contiguous area and the total free space in the allocator.
Not very efficient; runs in linear time for the number of allocations.
Largest contiguous region in the allocator. The allocator can hold an allocation up to this size.
Total free space in the allocator.
Finds the first allocation with empty space before it and pulls it forward to close the gap. Assumes the ability to perform synchronous reallocation.
Id of the allocation to be moved, if any.
Size of the moved allocation.
Old starting location of the allocation.
New starting location of the allocation.
True if a compaction was performed, false otherwise.
Attempts to resize a given allocation to a new size. If the new size is smaller, the start index remains unchanged.
Id of the allocation to resize.
New desired size of the allocation.
Old start location of the allocation.
New start location of the allocation.
True if the resize was successful. False if there was insufficient room for the larger allocation.
Span over an unmanaged memory region.
Type of the memory exposed by the span.
Implementation specific identifier of the raw buffer set by its source. If taken from a BufferPool, Id represents the index in the power pool from which it was taken.
Gets a reference to the element at the given index.
Index of the element to grab a reference of.
Reference to the element at the given index.
Gets a pointer to the element at the given index.
Index of the element to retrieve a pointer for.
Pointer to the element at the given index.
Creates a view of a subset of the buffer's memory.
Index at which to start the sliced buffer.
Number of elements to include in the sliced buffer.
Buffer spanning the specified subset of the original buffer.
Creates a view of a subset of the buffer's memory, starting from the first index.
Number of elements to include in the sliced buffer.
Buffer spanning the specified subset of the original buffer.
Creates a view of a subset of the buffer's memory.
Index at which to start the sliced buffer.
Number of elements to include in the sliced buffer.
Buffer spanning the specified subset of the original buffer.
Creates a view of a subset of the buffer's memory, starting from the first index.
Number of elements to include in the sliced buffer.
Buffer spanning the specified subset of the original buffer.
Gets the length of the buffer in typed elements.
Gets whether the buffer references non-null memory.
Zeroes out the buffer's memory.
Start location in the buffer.
Number of elements to clear beyond the start index.
Copies buffer data into another buffer.
Start index in the source buffer.
Target buffer to copy into.
Start index in the target buffer.
Number of elements to copy from the source buffer into the target buffer.
Copies buffer data into another buffer.
Start index in the source buffer.
Target buffer to copy into.
Start index in the target buffer.
Number of elements to copy from the source buffer into the target buffer.
Copies span data into this buffer.
Source span to copy from.
Start index in the source buffer.
Start index in the target buffer.
Number of elements to copy from the source buffer into the target buffer.
Copies span data into this buffer.
Source span to copy from.
Start index in the source buffer.
Start index in the target buffer.
Number of elements to copy from the source buffer into the target buffer.
Gets the index of an element in the buffer using the type's default comparer.
Element to look for in the buffer.
Start index at which to begin the search.
Number of elements to scan beyond the start index.
Index of the element in the buffer if found, -1 otherwise.
Gets the index of an element in the buffer using the type's default comparer.
Element to look for in the buffer.
Start index at which to begin the search.
Number of elements to scan beyond the start index.
Index of the element in the buffer if found, -1 otherwise.
Gets the index of the first element that matches a provided predicate.
Predicate to test each element with.
Start index at which to begin the search.
Number of elements to scan beyond the start index.
Index of the first matching element in the buffer if any, -1 otherwise.
Creates an untyped buffer containing the same data as the Buffer.
Untyped buffer containing the same data as the source buffer.
Unmanaged memory pool that creates pinned blocks of memory for use in spans.
This currently works by allocating large managed arrays and pinning them under the assumption that they'll end up in the large object heap.
Unpins and drops the reference to the underlying array.
Pool of slots available to this power level.
Creates a new buffer pool.
Minimum size of individual block allocations. Must be a power of 2.
Pools with single allocations larger than the minimum will use the minimum value necessary to hold one element.
Buffers will be suballocated from blocks.
Use a value larger than the large object heap cutoff (85000 bytes as of this writing in the microsoft runtime)
to avoid interfering with generational garbage collection.
Number of suballocations to preallocate reference space for.
This does not preallocate actual blocks, just the space to hold references that are waiting in the pool.
Ensures that the pool associated with a given power has at least a certain amount of capacity, measured in bytes.
Minimum number of bytes to require for the power pool.
Power associated with the pool to check.
Gets the capacity allocated for a power.
Power to check.
Allocated capacity for the given power.
Takes a buffer large enough to contain a number of bytes. Capacity may be larger than requested.
Desired minimum capacity of the buffer in bytes.
Buffer that can hold the bytes.
Takes a buffer of the requested size from the pool.
Desired capacity of the buffer in bytes.
Buffer of the requested size.
Takes a buffer large enough to contain a number of elements of a given type. Capacity may be larger than requested.
Type of the elements in the buffer.
Desired minimum capacity of the buffer in typed elements.
Buffer large enough to contain the requested number of elements.
Takes a typed buffer of the requested size from the pool.
Type of the instances in the buffer.
Desired capacity of the buffer in typed elements.
Typed buffer of the requested size.
Takes a buffer large enough to contain a number of bytes given by a power, where the number of bytes is 2^power.
Number of bytes that should fit within the buffer as an exponent, where the number of bytes is 2^power.
Buffer that can hold the bytes.
Returns a buffer to the pool by id.
Buffer to return to the pool.
Typed buffer pools zero out the passed-in buffer by convention.
This costs very little and avoids a wide variety of bugs (either directly or by forcing fast failure). For consistency, BufferPool.Return does the same thing.
This "Unsafe" overload should be used only in cases where there's a reason to bypass the clear; the naming is intended to dissuade casual use.
Returns a buffer to the pool.
Buffer to return to the pool.
Returns a buffer to the pool.
Buffer to return to the pool.
Resizes a buffer to the smallest size available in the pool which contains the target size. Copies a subset of elements into the new buffer.
Final buffer size is at least as large as the target size and may be larger.
Buffer reference to resize.
Number of bytes to resize the buffer for.
Number of bytes to copy into the new buffer from the old buffer.
Resizes a buffer to the target size. Copies a subset of elements into the new buffer.
Buffer reference to resize.
Number of bytes to resize the buffer for.
Number of bytes to copy into the new buffer from the old buffer.
Resizes a typed buffer to the smallest size available in the pool which contains the target size. Copies a subset of elements into the new buffer.
Final buffer size is at least as large as the target size and may be larger.
Type of the buffer to resize.
Buffer reference to resize.
Number of elements to resize the buffer for.
Number of elements to copy into the new buffer from the old buffer.
Resizes a buffer to the target size. Copies a subset of elements into the new buffer.
Type of the buffer to resize.
Buffer reference to resize.
Number of elements to resize the buffer for.
Number of elements to copy into the new buffer from the old buffer.
Gets or sets whether the BufferPool's backing resources are pinned. If no blocks are allocated internally, this returns true.
Setting this to false invalidates all outstanding pointers, and any attempt to take or return buffers while unpinned will fail (though not necessarily immediately).
The only valid operations while unpinned are setting Pinned to true and clearing the pool.
Unpins and drops reference to all memory. Any outstanding buffers will be invalidated silently.
Manages a pool of identifier values. Grabbing an id from the pool picks a number that has been picked and returned before,
or if none of those are available, the minimum value greater than any existing id.
Gets the highest value which any index claimed thus far could possibly have.
This is not necessarily the current highest claimed index; this value may represent an earlier claim that has already been released.
-1 if nothing has ever been claimed.
Gets the number of previously returned ids waiting in the pool.
Gets whether the id pool has backing resources allocated to it and is ready to use.
Returns an id to the pool without checking if a resize is required on the available id stack.
Id to return.
Resets the IdPool.
Ensures that the underlying id queue can hold at least a certain number of ids.
Number of elements to preallocate space for in the available ids queue.
Pool to pull resized spans from.
Shrinks the available ids queue to the smallest size that can fit the given count and the current available id count.
Number of elements to guarantee space for in the available ids queue.
Resizes the underlying buffer to the smallest size required to hold the given count and the current available id count.
Number of elements to guarantee space for in the available ids queue.
Returns underlying memory to the pool.
The IdPool can be reused only if EnsureCapacity or Resize is called.
Defines a type that is capable of pooling blocks of unmanaged memory.
Takes a buffer large enough to contain a number of elements of a given type. Capacity may be larger than requested.
Type of the elements in the buffer.
Desired minimum capacity of the buffer in typed elements.
Buffer large enough to contain the requested number of elements.
Takes a typed buffer of the requested size from the pool.
Type of the instances in the buffer.
Desired capacity of the buffer in typed elements.
Typed buffer of the requested size.
Returns a buffer to the pool.
Type of the buffer's elements.
Buffer to return to the pool.
Gets the capacity of a buffer that would be returned by the pool if a given element count was requested from TakeAtLeast.
Type of the elements being requested.
Number of elements to request.
Capacity of a buffer that would be returned if the given element count was requested.
Manages a pool of identifier values. Grabbing an id from the pool picks a number that has been picked and returned before,
or if none of those are available, the minimum value greater than any existing id.
This contrasts with the IdPool which operates on unmanaged memory. This version only exists to support use cases where the unmanaged version can't be used-
for example, in the BufferPool. While the implementation can be shared, doing so involves creating enough supporting infrastructure that it's simpler to have a managed-only version.
Gets the highest value which any index claimed thus far could possibly have.
This is not necessarily the current highest claimed index; this value may represent an earlier claim that has already been released.
-1 if nothing has ever been claimed.
Gets the number of previously returned ids waiting in the pool.
Gets the capacity of the id pool for returned ids.
public int Capacity => availableIds.Length;
Returns an id to the pool without checking if a resize is required on the available id stack.
Id to return.
Resets the IdPool.
Ensures that the underlying id queue can hold at least a certain number of ids.
Number of elements to preallocate space for in the available ids queue.
Shrinks the available ids queue to the smallest size that can fit the given count and the current available id count.
Number of elements to guarantee space for in the available ids queue.
Resizes the underlying buffer to the smallest size required to hold the given count and the current available id count.
Number of elements to guarantee space for in the available ids queue.
Manages a cache of a type of resource.
Type of object to pool.
Gets the number of existing elements in the pool. This number of elements can be requested without creating any new ones.
Does not do any locking. Should not be used while elements may still be getting added to or removed from the pool.
Gets or sets the function used to create new objects when the pool has no existing objects available.
Gets or sets the function used to initialize objects taken from the pool. Runs even if the object was just created by the Creator delegate.
Gets or sets the action applied to an element when it is returned to the pool.
Clears all elements from the pool.
Takes an element from the pool. If the pool is empty, a new resource is created and returned.
Element from the pool.
Returns the specified item to the pool. If a cleaner delegate is set, the item is cleaned.
Item to give back to the pool.
Raw byte buffer with some helpers for interoperating with typed spans.
Implementation specific identifier of the raw buffer set by its source. If taken from a BufferPool, Id represents the packed power and internal power pool index from which it was taken.
Interprets the bytes at the memory location as a given type.
Type to interpret the memory as.
Memory location to interpret.
Reference to the memory as a given type.
Takes a region of the raw buffer as a typed buffer.
Type to interpret the region as.
Start of the region in terms of the type's size.
Number of elements in the region in terms of the type.
A typed buffer.
Creates a typed region from the raw buffer with the largest capacity that can fit within the allocated bytes.
Type of the buffer.
Typed buffer of maximum extent within the current raw buffer.
The highest size span exponent. The largest span is 2^MaximumSpanSizePower. This avoids overflow.
Computes the largest integer N such that 2^N is less than or equal to i.
Integer to compute the power of.
Lowest integer N such that 2^N is less than or equal to i.
Computes the lowest integer N such that 2^N >= i.
Integer to compute the power of.
Lowest integer N such that 2^N >= i.
Tests if a generic parameter is primitive. Fast path; specialized compilation.
Type to check for primitiveness.
True if the type is one of the primitive types, false otherwise.
Copies data from one buffer to another.
Type of element being copied.
Source buffer to pull elements from.
Index in the buffer to start pulling elements from.
Target buffer to set values.
Index in the buffer to start putting elements into.
Number of elements to copy.
Copies data from a buffer to a span.
Type of element being copied.
Source buffer to pull elements from.
Index in the buffer to start pulling elements from.
Target span to set values.
Index in the span to start putting elements into.
Number of elements to copy.
Copies data from a span to a buffer.
Type of element being copied.
Source span to pull elements from.
Index in the span to start pulling elements from.
Target buffer to set values into.
Index in the buffer to start putting elements into.
Number of elements to copy.
Copies data from a span to a buffer.
Type of element being copied.
Source span to pull elements from.
Index in the span to start pulling elements from.
Target buffer to set values into.
Index in the buffer to start putting elements into.
Number of elements to copy.
Provides additional functionality and some lower overhead function variants for Quaternions.
Adds two quaternions together.
First quaternion to add.
Second quaternion to add.
Sum of the addition.
Scales a quaternion.
Quaternion to multiply.
Amount to multiply each component of the quaternion by.
Scaled quaternion.
Concatenates the transforms of two quaternions together such that the resulting quaternion, applied as an orientation to a vector v, is equivalent to
transformed = (v * a) * b.
Assumes that neither input parameter overlaps the output parameter.
First quaternion to concatenate.
Second quaternion to concatenate.
Product of the concatenation.
Concatenates the transforms of two quaternions together such that the resulting quaternion, applied as an orientation to a vector v, is equivalent to
transformed = (v * a) * b.
First quaternion to concatenate.
Second quaternion to concatenate.
Product of the concatenation.
Concatenates the transforms of two quaternions together such that the resulting quaternion, applied as an orientation to a vector v, is equivalent to
transformed = (v * a) * b.
First quaternion to multiply.
Second quaternion to multiply.
Product of the multiplication.
Quaternion representing the identity transform.
Constructs a quaternion from a rotation matrix.
Rotation matrix to create the quaternion from.
Quaternion based on the rotation matrix.
Creates a quaternion from a rotation matrix.
Rotation matrix used to create a new quaternion.
Quaternion representing the same rotation as the matrix.
Constructs a quaternion from a rotation matrix.
Rotation matrix to create the quaternion from.
Quaternion based on the rotation matrix.
Constructs a quaternion from a rotation matrix.
Rotation matrix to create the quaternion from.
Quaternion based on the rotation matrix.
Ensures the quaternion has unit length.
Quaternion to normalize.
Computes the squared length of the quaternion.
Squared length of the quaternion.
Computes the length of the quaternion.
Length of the quaternion.
Blends two quaternions together to get an intermediate state.
Starting point of the interpolation.
Ending point of the interpolation.
Amount of the end point to use.
Interpolated intermediate quaternion.
Blends two quaternions together to get an intermediate state.
Starting point of the interpolation.
Ending point of the interpolation.
Amount of the end point to use.
Interpolated intermediate quaternion.
Computes the conjugate of the quaternion.
Quaternion to conjugate.
Conjugated quaternion.
Computes the conjugate of the quaternion.
Quaternion to conjugate.
Conjugated quaternion.
Computes the inverse of the quaternion.
Quaternion to invert.
Result of the inversion.
Computes the inverse of the quaternion.
Quaternion to invert.
Result of the inversion.
Negates the components of a quaternion.
Quaternion to negate.
Negated result.
Negates the components of a quaternion.
Quaternion to negate.
Negated result.
Transforms the vector using a quaternion, assuming that the output does not alias with the input.
Vector to transform.
Rotation to apply to the vector.
Transformed vector.
Transforms the vector using a quaternion.
Vector to transform.
Rotation to apply to the vector.
Transformed vector.
Transforms the vector using a quaternion.
Vector to transform.
Rotation to apply to the vector.
Transformed vector.
Transforms the unit X direction using a quaternion.
Rotation to apply to the vector.
Transformed vector.
Transforms the unit Y vector using a quaternion.
Rotation to apply to the vector.
Transformed vector.
Transforms the unit Z vector using a quaternion.
Rotation to apply to the vector.
Transformed vector.
Creates a quaternion from an axis and angle.
Axis of rotation.
Angle to rotate around the axis.
Quaternion representing the axis and angle rotation.
Creates a quaternion from an axis and angle.
Axis of rotation.
Angle to rotate around the axis.
Quaternion representing the axis and angle rotation.
Constructs a quaternion from yaw, pitch, and roll.
Yaw of the rotation.
Pitch of the rotation.
Roll of the rotation.
Quaternion representing the yaw, pitch, and roll.
Constructs a quaternion from yaw, pitch, and roll.
Yaw of the rotation.
Pitch of the rotation.
Roll of the rotation.
Quaternion representing the yaw, pitch, and roll.
Computes the angle change represented by a normalized quaternion.
Quaternion to be converted.
Angle around the axis represented by the quaternion.
Computes the axis angle representation of a normalized quaternion.
Quaternion to be converted.
Axis represented by the quaternion.
Angle around the axis represented by the quaternion.
Computes the quaternion rotation between two normalized vectors.
First unit-length vector.
Second unit-length vector.
Quaternion representing the rotation from v1 to v2.
Computes the rotation from the start orientation to the end orientation such that end = Quaternion.Concatenate(start, relative).
Assumes that neither input parameter overlaps with the output parameter.
Starting orientation.
Ending orientation.
Relative rotation from the start to the end orientation.
Transforms the rotation into the local space of the target basis such that rotation = Quaternion.Concatenate(localRotation, targetBasis)
Assumes that neither input parameter overlaps with the output parameter.
Rotation in the original frame of reference.
Basis in the original frame of reference to transform the rotation into.
Rotation in the local space of the target basis.
Takes a slot from the source quaternion and broadcasts it into all slots of the target quaternion.
Quaternion to pull values from.
Slot in the source vectors to pull values from.
Target quaternion to be filled with the selected data.
Constructs a quaternion from a rotation matrix.
Rotation matrix to create the quaternion from.
Quaternion based on the rotation matrix.
Adds the components of two quaternions together.
First quaternion to add.
Second quaternion to add.
Sum of the two input quaternions.
Computes the quaternion rotation between two normalized vectors.
First unit-length vector.
Second unit-length vector.
Quaternion representing the rotation from v1 to v2.
Gets an axis and angle representation of the rotation stored in a quaternion. Angle is approximated.
Quaternion to extract an axis-angle representation from.
Axis of rotation extracted from the quaternion.
Approximated angle of rotation extracted from the quaternion.
Transforms the vector using a quaternion. Assumes that the memory backing the input and output do not overlap.
Vector to transform.
Rotation to apply to the vector.
Transformed vector.
Transforms the vector using a quaternion.
Vector to transform.
Rotation to apply to the vector.
Transformed vector.
Transforms the unit X direction using a quaternion.
Rotation to apply to the vector.
Transformed vector.
Transforms the unit Y vector using a quaternion.
Rotation to apply to the vector.
Transformed vector.
Transforms the unit Z vector using a quaternion.
Rotation to apply to the vector.
Transformed vector.
Transforms the unit X and unit Y direction using a quaternion.
Rotation to apply to the vectors.
Transformed unit X vector.
Transformed unit Y vector.
Transforms the unit X and unit Z direction using a quaternion.
Rotation to apply to the vectors.
Transformed unit X vector.
Transformed unit Z vector.
Concatenates the transforms of two quaternions together such that the resulting quaternion, applied as an orientation to a vector v, is equivalent to
transformed = (v * a) * b. Assumes that the memory backing the input and output do not overlap.
First quaternion to concatenate.
Second quaternion to concatenate.
Product of the concatenation.
Concatenates the transforms of two quaternions together such that the resulting quaternion, applied as an orientation to a vector v, is equivalent to
transformed = (v * a) * b.
First quaternion to concatenate.
Second quaternion to concatenate.
Product of the concatenation.
Computes the conjugate of the quaternion.
Quaternion to conjugate.
Conjugated quaternion.
Gathers values from the first slot of a wide quaternion and puts them into a narrow representation.
Wide quaternion to copy values from.
Narrow quaternion to place values into.
Gathers values from a quaternion and places them into the first indices of the target wide quaternion.
Quaternion to copy values from.
Wide quaternion to place values into.
Stores the lower left triangle (including diagonal) of a 2x2 matrix.
Computes m * scale * mT.
Matrix to sandwich the scale with.
Scale to be sandwiched.
Result of m * scale * mT.
This is a peculiar operation, but it's useful for computing linear effective mass contributions in 2DOF constraints.
Computes result = transpose(transpose(a) * b), assuming b is symmetric.
Matrix to be transposed and multiplied.
Symmetric matrix to multiply.
Result of transpose(transpose(a) * b).
Computes a * transpose(b), assuming a = b * M for some symmetric matrix M. This is conceptually the second half of Triangular3x3Wide.MatrixSandwich.
First matrix to multiply. Must be of the form a = b * M for some symmetric matrix M.
Matrix to be transaposed and multiplied with a..
Symmetric result of a * transpose(b), assuming a = b * M.
Lower left triangle (including diagonal) of a symmetric 3x3 matrix.
First row, first column of the matrix.
Second row, first column of the matrix.
Second row, second column of the matrix.
Third row, first column of the matrix.
Third row, second column of the matrix.
Third row, third column of the matrix.
Computes rT * m * r for a symmetric matrix m and a rotation matrix R.
Rotation matrix to use as the sandwich bread.
Succulent interior symmetric matrix.
Result of v * m * transpose(v) for a symmetric matrix m.
Computes the determinant of a symmetric matrix.
Matrix to intepret as symmetric.
Determinant of the matrix interpreted as symmetric.
Inverts the given matix.
Matrix to be inverted.
Inverted matrix.
Adds the components of two matrices together.
First matrix to add.
Second matrix to add.
Matrix with components equal to the components of the two input matrices added together.
Subtracts the components of b from a.
Matrix to be subtracted from.
Matrix to subtract from the first matrix..
Matrix with subtracted components.
Adds the components of two matrices together.
First matrix to add.
Second matrix to add.
Matrix with components equal to the components of the two input matrices added together.
Subtracts the components of one matrix from another.
Matrix to be subtracted from.
Matrix to subtract from the first matrix.
Matrix with components equal to the difference of the two input matrices.
Multiplies every component in the matrix by the given scale.
Matrix to be scaled.
Scale to apply to every component of the original matrix.
Scaled result.
Multiplies the two matrices as if they were symmetric.
First matrix to multiply.
Second matrix to multiply.
Product of the multiplication.
Multiplies the two matrices.
First matrix to multiply.
Second matrix to multiply.
Product of the multiplication.
Transforms a vector by a symmetric matrix.
Vector to transform.
Matrix to interpret as symmetric transform.
Result of transforming the vector by the given symmetric matrix.
Stores the lower left triangle (including diagonal) of a 3x3 matrix. Useful for symmetric matrices (and sometimes antisymmetric matrices).
First row, first column of the matrix.
Second row, first column of the matrix.
Second row, second column of the matrix.
Third row, first column of the matrix.
Third row, second column of the matrix.
Third row, third column of the matrix.
Inverts the matrix as if it is a symmetric matrix where M32 == M23, M13 == M31, and M21 == M12.
Symmetric matrix to invert.
Inverse of the symmetric matrix.
Adds the components of two symmetric matrices together.
First matrix to add.
Second matrix to add.
Sum of the two input matrices.
Subtracts one symmetric matrix's components from another.
Matrix to be subtracted from.
Matrix to subtract from the first matrix.
Result of a - b.
Computes skewSymmetric(v) * m * transpose(skewSymmetric(v)) for a symmetric matrix m. Assumes that the input and output matrices do not overlap.
Symmetric matrix.
Vector to create the skew symmetric matrix from to act as the sandwich bread.
Result of skewSymmetric(v) * m * transpose(skewSymmetric(v)).
This operation might have a formal name that isn't skew sandwich. But that's okay, its real name is skew sandwich.
Computes v * m * transpose(v) for a symmetric matrix m. Assumes that the input and output do not overlap.
Vector acting as the sandwich bread.
Succulent interior symmetric matrix.
Result of v * m * transpose(v) for a symmetric matrix m.
Since I called the other one a skew sandwich, I really don't have a choice in the naming convention anymore.
Computes rT * m * r for a symmetric matrix m and a rotation matrix R.
Rotation matrix to use as the sandwich bread.
Succulent interior symmetric matrix.
Result of v * m * transpose(v) for a symmetric matrix m.
Computes result = a * b, assuming that b represents a symmetric 3x3 matrix. Assumes that input parameters and output result do not overlap.
First matrix of the pair to multiply.
Matrix to be reinterpreted as symmetric for the multiply.
Result of multiplying a * b.
Computes result = a * b, assuming that b represents a symmetric 3x3 matrix. Assumes that input parameters and output result do not overlap.
First matrix of the pair to multiply.
Matrix to be reinterpreted as symmetric for the multiply.
Result of multiplying a * b.
Computes result = a * b, assuming that a represents a symmetric 3x3 matrix. Assumes that input parameters and output result do not overlap.
Matrix to be reinterpreted as symmetric for the multiply.
Second matrix of the pair to multiply.
Result of multiplying a * b.
Computes result = a * transpose(b).
Matrix to multiply with the transposed matrix.
Matrix to transpose and concatenate with the first matrix.
Result of a * transpose(b).
Computes result = transpose(a * transpose(b)).
Matrix to multiply with the transposed matrix.
Matrix to transpose and concatenate with the first matrix.
Result of transpose(a * transpose(b)).
Computes m * t * mT for a symmetric matrix t and a matrix m.
Matrix to use as the sandwich bread.
Succulent interior symmetric matrix.
Result of m * t * mT for a symmetric matrix t.
Computes result = a * b, where a = transpose(b) * M for some symmetric matrix M.
Some matrix equal to transpose(b) * M for some symmetric matrix M.
Matrix used to sandwich the original matrix M.
Complete result of transpose(b) * M * b.
Computes result = tranpose(a) * b, where a = transpose(transpose(b) * M) for some symmetric matrix M. In other words, we're just treating matrix a as a 3x2 matrix.
Some matrix equal to transpose(b) * M for some symmetric matrix M.
Matrix used to sandwich the original matrix M.
Complete result of transpose(b) * M * b.
Computes result = a * transpose(b), where a = b * M for some symmetric matrix M.
Some matrix equal to b * M for some symmetric matrix M.
Matrix used to sandwich the original matrix M, to be transposed.
Complete result of b * M * transpose(b).
Computes result = transpose(a) * b, where b = M * a for some symmetric matrix M.
Matrix used to sandwich the original matrix M.
Some matrix equal to M * a for some symmetric matrix M.
Complete result of transpose(a) * M * a.
Returns a reference to the upper left 3x3 block of the matrix.
Matrix to pull a block from.
Reference to the requested block.
Returns a reference to the upper right 3x1 (or lower left 1x3) block of the matrix.
Matrix to pull a block from.
Reference to the requested block.
Scales each component of m by the given scale.
Matrix to scale.
Scale to apply to the components of m.
Result of scaling each component of m by scale.
Computes result = v * m.
Vector to transform.
Matrix to transform with.
Result of the transform.
Upper left 3x3 block of the matrix.
Lower left 2x3 block of the matrix.
Lower right 2x2 block of the matrix.
Scales each component of m by the given scale.
Matrix to scale.
Scale to apply to the components of m.
Result of scaling each component of m by scale.
Computes result = v * m, where v and result are 1x5 vectors which are split into two subvectors.
First half of the a vector.
Second half of the a vector.
Matrix to transform with.
First half of the result.
Second half of the result.
Scales each component of m by the given scale.
Matrix to scale.
Scale to apply to the components of m.
Result of scaling each component of m by scale.
Computes result = v * m, where v and result are 1x6 vectors which are split into two 1x3 values.
First half of the a vector.
Second half of the a vector.
Matrix to transform with.
First half of the result.
Second half of the result.
Pulls one lane out of the wide representation.
Source of the lane.
Non-SIMD type to store the lane in.
Pulls one lane out of the wide representation.
Source of the lane.
Index of the lane within the wide representation to read.
Non-SIMD type to store the lane in.
Gathers values from a vector and places them into the first indices of the target vector.
Vector to copy values from.
Wide vectorto place values into.
Writes a value into a slot of the target bundle.
Source of the value to write.
Index of the slot to write into.
Bundle to write the value into.
Finds the result of adding a scalar to every component of a vector.
Vector to add to.
Scalar to add to every component of the vector.
Vector with components equal to the input vector added to the input scalar.
Finds the result of subtracting a scalar from every component of a vector.
Vector to subtract from.
Scalar to subtract from every component of the vector.
Vector with components equal the input scalar subtracted from the input vector.
Finds the result of subtracting the components of a vector from a scalar.
Vector to subtract from the scalar.
Scalar to subtract from.
Vector with components equal the input vector subtracted from the input scalar.
Computes the per-component minimum between a scalar value and the components of a vector.
Scalar to compare to each vector component.
Vector whose components will be compared.
Vector with components matching the smaller of the scalar value and the input vector.
Computes the per-component minimum of two vectors.
First vector whose components will be compared.
Second vector whose components will be compared.
Vector with components matching the smaller of the two input vectors.
Computes the per-component maximum between a scalar value and the components of a vector.
Scalar to compare to each vector component.
Vector whose components will be compared.
Vector with components matching the larger of the scalar value and the input vector.
Computes the per-component maximum of two vectors.
First vector whose components will be compared.
Second vector whose components will be compared.
Vector with components matching the larger of the two input vectors.
Multiplies the components of one vector with another.
First vector to multiply.
Second vector to multiply.
Result of the multiplication.
Pulls one lane out of the wide representation.
Source of the lane.
Index of the lane within the wide representation to read.
Non-SIMD type to store the lane in.
Pulls one lane out of the wide representation.
Source of the lane.
Non-SIMD type to store the lane in.
Gathers values from a vector and places them into the first indices of the target vector.
Vector to copy values from.
Wide vectorto place values into.
Writes a value into a slot of the target bundle.
Source of the value to write.
Index of the slot to write into.
Bundle to write the value into.
Expands each scalar value to every slot of the bundle.
Source value to write to every bundle slot.
Bundle containing the source's components in every slot.
Takes a slot from the source vector and broadcasts it into all slots of the target vector.
Vector to pull values from.
Slot in the source vectors to pull values from.
Target vector to be filled with the selected data.
Takes a slot from the source vector and places it into a slot of the target.
Vector to pull values from.
Slot in the source vectors to pull values from.
Target vector whose slot will be filled with the selected data.
Slot in the target vectors to write values into.
Computes the per-component minimum of two vectors.
First vector whose components will be compared.
Second vector whose components will be compared.
Vector with components matching the smaller of the two input vectors.
Computes the per-component maximum of two vectors.
First vector whose components will be compared.
Second vector whose components will be compared.
Vector with components matching the larger of the two input vectors.
Pulls one lane out of the wide representation.
Source of the lane.
Index of the lane within the wide representation to read.
Non-SIMD type to store the lane in.
Pulls one lane out of the wide representation.
Source of the lane.
Non-SIMD type to store the lane in.
Gathers values from a vector and places them into the first indices of the target vector.
Vector to copy values from.
Wide vectorto place values into.