Repository navigation
v2.0.0
Version 2.0 is a major rework of this library - please read the 'Changes' section carefully before you update and refer to the updated readme file for further information
Known Issues
- The internal descending bit copy function is unoptimized, affecting Heap allocated list type
Insert,InsertRangeandInsertRangeWithBeginEnd NativeBitArray/ListFindStringis unoptimizedNativeArray/List<ANY_INTEGER_TYPE>extension methodsCopyFromandInsertRangewithNativeBitIntArray/List<T>as the source are unoptimizedNativeBitIntArray/List<T>methodsCopyFromandInsertRangewithNativeArray/List<ANY_INTEGER_TYPE>or anotherNativeBitIntArray/List<T>as the source are unoptimizedNativeBitIntArray/List<T>SortwithTbeing aBitIntwith more than 14 bits is unoptimized
Changes
API-BREAKING:
Two major changes have been made.
-
NativeBitNumberArray<TCollection, TElement>has been renamed toNativeBitIntArray, always returnslongvalues and requireslongs as value parameters and now only has one generic type parameter, constrained to the newly addedBitIntinterface, allowing for anywhere between 1 to 63 bits per integer. Please refer to this libraries' updated readme for more information -
Non-heap-allocated containers like
bit8have had their member methods changed to return a new instance if it would mutate data. -
Bumped "MaxMath" to version 2.9.9
-
Bumped "Burst" to version 1.8.26
-
This library now depends on SIMD-Algorithms
-
Bumped "Unity.Collections" dependency to version 1.2.4 and thus removed the dependency on "Unity.Jobs"
Additions
- The newly added
BitIntinterface is now the fundamental primitive of this library, enabling anywhere from 1 (Bit) to(U)Int63bit integers - Added value type bit arrays
bit24bit40bit48bit56 - Added
BitField8,BitField16,BitField24,BitField32,BitField40,BitField48,BitField56andBitField64with each of them having anywhere between 2 and [bits - 1] generic type parameters constrained toBitInt, allowing to use custom bit fields likeBitField32<UInt23, Int8, Bit> - Added type conversions for fixed-size
BitIntfields (example:Int2x4) between all other fixed-sizeBitIntfields, as well as allUnity.MathematicsandMaxMathvectors - Added arithmetic, bitwise and comparison operators for fixed-size
BitIntfields - Added
(U)Int24,(U)Int40,(U)Int48, and(U)Int56conversion operators betweenUnity.MathematicsandMaxMathvectors and scalars - Added static methods to
(U)Int24,(U)Int40,(U)Int48, and(U)Int56that allow casting to wider types while performing fewer-, yet out-of-bounds memory loads, controlled bySIMDAlgorithms.MemoryAccess - Added
NativeBitList - Added
NativeBitIntList - Added
NativeBitIntArray/ListmethodsCopyFrom,AddRange(List only),InstertRange(List only) takingUnity.Collections.NativeArray/List/Slice<[ANY_INTEGER_TYPE]>as the source - Added BitCollections.NativeContainer property
SizeInBytes - Added BitCollections.NativeContainer algorithms
Sum(with optionalSystem.TypeCoderesult range),SetReplicate,IndexOf(with optional SIMD-AlgorithmsComparison),Contains(with optional SIMD-AlgorithmsComparison),Count(with optional SIMD-AlgorithmsComparison),CountBits,Sort,ArraysEqual, all exceptSortwith overloads selecting a start index and the number of values to consider - Added BitCollections.NativeContainer
StoreVector<T>andLoadVector<T>, loading/storing anyBitCollections,Unity.MathematicsandMaxMathvector - Added
Unity.Collections.NativeListextension methodInsert - Added
Unity.Collections.NativeArray/List/Slice<bool>extension methodsCopyFrom,AddRange(List only),InstertRange(List only) takingNativeBitArray/Listas the source - Added
Unity.Collections.NativeArray/List/Slice<bool>extension methodsLoadVector<T>andStoreVector<T> - Added
Unity.Collections.NativeArray/List/Slice<[ANY_INTEGER_TYPE]>extension methodsCopyFrom,AddRange(List only),InstertRange(List only) takingNativeBitIntArray/Listas the source - Added
Unity.Collections.NativeArray/List/Slice<[ANY_INTEGER_TYPE]>extension methodsLoadVector<T>andStoreVector<T> - Implemented the entire
Unity.CollectionsAPI forNativeBitArray/ListandNativeBitIntArray/List