tiny.simd
Overview · API · Code relationships · Verification · Audit
Overview
Portable SIMD vector types and hardware-accelerated numeric kernels. Target dispatch selects architecture-specific vector extensions at compile time or falls back to scalar loops.
Operations declare distinct memory requirements: aligned load routines require natural lane alignment, while in-place kernels may permit or restrict buffer overlap. Callers must verify alignment and aliasing preconditions required by each specific kernel contract.
Definitions
Actions
Public operations.
exppowatanexp2log10log1plog2coserfhypotsintanacosacoshasinasinhatan2atanhcbrtcoshexpm1logGammasinhtanhtgammacbrtNormalsinCosshiftRightroundingShiftRightshiftLeftroundingShrshlshraverageRoundshiftLeftSameshiftRightSamemaskedShiftLeftOrmaskedShrOrroundingShiftRightSamemaskedShiftLeftmaskedShiftRightmaskedShiftRightOrmaskedShlmaskedShlOrmaskedShrmodeArrayCountingSortEntrycountingSortcountingSortArraymedianAbsoluteDeviationmedianAbsoluteDeviationArraymodemodeOfSortedmedianmedianArrayminRangerotateRightrotateLeftrotateLeftSamerotateRightSamerolrormultiRotateRightgetExponentgetBiasedExponentsqrtapproximateReciprocalapproximateReciprocalSqrtroundceilfloormaskedApproximateReciprocalmaskedSqrtOrtruncbitXorxor@"and"bitAnd@"or"bitOrbitNotnotallBits0allBitsZeroallBits1allBitsOneandNotandXormaskedOrOrxorAndNotmaskedXormaskedXorOraesRoundaesRoundInvaesLastRoundaesLastRoundInvaesInvMixColumnsaesKeyGenAssistclMulLowerclMulUpperBitSet4096BitSetAtomicBitSetmaskedGatherIndexOrgatherIndexgatherOffsetscatterIndexNscatterOffsetgatherIndexNgatherIndexNOrfastTwoSumsddAddddDivtwoProductstwoSumsddMul1ddMul2reduceCascadedSumsupdateCascadedSumsassimilateCascadedSumstwoSumScalarmulComplexmulComplexConjmulComplexAddmulComplexConjAddcomplexConjmaskedMulComplexConjmaskedMulComplexConjAddmaskedMulComplexOrleadingZeroCounthighestSetBitIndextrailingZeroCountmaskedLeadingZeroCountpopulationCountcopySigncopySignToAbssignBitbroadcastSignBitloadNfirstNTFromDreduceSumstoreNBinsTypedBinsallTrueblocksNextWithSkipAutoTunefindFirstTrue: Returns the lowest true lane, or -1 when no lane is true.lowerHalfper4LaneBlockShufflecompressifThenElseupperHalfloadNOrmaskNotmaxpow2reduceMaxreduceMinslideDownLanesslideUpLanesHalfanyTruecountTrueisAlignedTomaxLanesminMFromDMakeNarrowTargetFunctionTwiceVFromDallEqual: Returns whether every lane ofinputequalsvalue, asstd.mem.allEqualdoes.bitCastbitwiseIfThenElsedupEvendupOddeqexpandfindLastTrue: Returns the highest true lane, or -1 when no lane is true, by a maximum reduction over the selected lane indices.isFloat3264isUnsignedloadloadUloadInterleaved4ltmaskOrmaskedLoadOrmaskedReduceMaxmaskedReduceMinmaskedReduceSummaskedSetOrmaxBlocksmaxBytesmulFixedPoint15negoddEvenrandomNormalizedFloatreverseslideMaskDownLanesslideMaskUpLanesstorestoreUstoreInterleaved4zeroFloatFromSizePhastVectorPairRebindRepartitionSignedFromSizeTFromVUnsignedFromSizeabsDiffbitsFromMaskblendedStorebroadcastLanecallWithSpincanLookup16canLookup32canLookup8combineShiftRightBytescompressIsPartitioncreate2create3create4demoteMaskTodisableTargetsdiv128HighBydup128MaskFromMaskBitsdup128VecFromValuesextractLaneflushCachelineflushStreamgeget2get3get4getLanelanegtinfinsertIntoUpperinsertLaneisIntegerLaneisNegativelaneCountlelemireModloadDup128loadFenceloadInterleaved2loadInterleaved3loadMaskBitslowerHalfOfMaskmaskAndmaskFalsemaskFromBitsmaskFromVecmirrornanneorderedDemote2MasksTopauseprefetchpromoteMaskTorearrangeToOddPlusEvenrebindMaskreverseBitsreverseBlocksreverseLaneBytessafeCopyNsafeFillNsameSizeselectsetset3set4setMasksetSupportedTargetsForTestshuffle01slideDownLanesOrslideUpLanesOrstoreInterleaved2storeInterleaved3storeMaskBitsupperHalfOfMaskvecFromMaskwakeAllblockUntilDifferentdetectSpinimageVectorSizemaskXorphastPositionFromHashAndSeedpoolWaitNamerearrangeBFloatToOddPlusEvenset2setThreadAffinityspinNameaddPoolCallerbuildCuckoocuckooLocalScratchLencuckooOptimizedScratchLencuckooScratchLencuckooSlotsLendataCachesgetThreadAffinityhaveThreadingSupportinitProcessorTopologymakeIndexRangenanoSleeppoolCallerNametotalLogicalProcessorsvqPartialSortvqSelectvqSortvqSortHaveFloat16vqSortHaveFloat64interleaveUpperbroadcastBlockextractBlockinsertBlockinterleaveLowerinterleaveOddoddEvenBlocksswapAdjacentBlockszipLowerzipUpperbroadcastcombineShiftRightLanesinterleaveEveninterleaveEvenBlocksinterleaveLowerBlocksinterleaveOddBlocksinterleaveUpperBlocksshiftLeftBytesshiftLeftLanesshiftRightBytesshiftRightLanesshuffle0123shuffle0321shuffle1032shuffle2103shuffle2301computeDivisorParamsDivisorParamsScalarDivisorDivisorParamsSDivisorParamsUintDivintDivFloordivideArrayByScalarfloorDivideArrayByScalardivideByScalarfloorDivideByScalarcombineconcatLowerUpperconcatUpperLowerconcatEvenconcatLowerLowerconcatOddconcatUpperUpperinterleaveWholeLowerinterleaveWholeUppercombineMaskszeroExtendVectortableLookupLanesbitShufflelookup16tableLookupBytestwoTablesLookupLanesindicesFromVeclookup32lookup8setTableIndicestableLookupBytesOr0reverse2reverse4reverse8resizeBitCastzeroExtendResizeBitCastallFalsecountIfcountValuefindfindIfimageBytesPerRowForisAlignedBlockDFromDcopyfindKnownFirstTrueifThenZeroElsereplacesetBeforeFirstRepartitionToNarrowclampcompressNotfastAtanfillfindKnownLastTrueifThenElseZeroisFloatlogmaxOfLanesminOfLanesreplaceIfsetOnlyFirstsumOfLanestransformtransform1transform2MaskVeccompressBitsexclusiveNeitherfastAtan2fastAtanPositivefastExpfastExp2fastLog10fastLog10PositiveNormalfastLog1pfastLog1pPositiveNormalfastLog2fastLog2PositiveNormalfastPowfastTanfastTanhforeachifVecThenElseisDescriptorAlignedmaskAndNotmaskedEqmaskedGemaskedGtmaskedLemaskedLtmaskedNemaskedScatterIndexmaskedSetmaxNumberminNumberorAndscatterIndexselectTargetFunctionslide1Downslide1UpslideDownBlocksslideUpBlocksstreammaskedApproximateReciprocalSqrtmaskedGatherIndexmaskedLoadmaskedMulFixedPoint15maskedOrmaskedSqrtor3slideMask1DownslideMask1UptestBitxor3pinThreadToLogicalProcessormulAddmuladdmulSubdivnegMulSubsaturatedAddsaturatedSubsubmodabsmulAddSubmulSubAddaddSubmaskedMulAddOrmaskedNegMulSubmaskedSaturatedAddmaskedSaturatedSubpairwiseAddpairwiseAdd128pairwiseSubpairwiseSub128max128max128UppermaxMagnitudemin128min128UpperminMagnitudesaturatedAbssaturatedNegFixedTagCappedTagScalableTagScalableTagPow2CappedTagPow2RepartitionToWideMakeSignedMakeUnsignedMakeWideRebindToUnsignedFull128Full16Full32Full64MakeFloatRebindToFloatisLaneisSignedisSpecialFloatCappedTagIfFixedDFromVsumsOf2sumsOf4sumsOf8sumsOf8AbsDiffsumsOfAdjQuadAbsDiffsumsOfShuffledQuadAbsDiffdetectTargetsdispatchedTargetsupportedAndGeneratedTargetssupportedTargetstargetNametruncateStoreAlignedAllocationAlignedArrayAlignedLayoutAlignedVectorAlignedViewiotaImageImage3isSortedBysetAtOrBeforeFirstsetAtOrAfterFirstcompressBlocksNotfastLogfastLogPositiveNormalslide1DownOrslide1UpOrstreamCacheLineimageBytesPerRowisNaNeq128eq128UpperisEitherNaNisFiniteisInflt128lt128UppermaskedIsNaNne128ne128UpperVectorXoshirofillRandomCachedXoshirounrollunroll2UnrollerUnitUnrollerUnit2DfastExp2NormalfastExpMinusOrZerofastExpNormalfastPowNormalPack32Pack64Pack8Pack16ifNegativeThenElseifNegativeThenNegOrUndefIfZerozeroIfNegativeifNegativeThenElseZeroifNegativeThenZeroElsecompressStorecompressBlendedStorecompressBitsStoreloadExpandBFloat16TagnegMulAddRebindToSignedgeneratehaveFloat16isSortedvectorBytesRepartitionToWideX2haveFloat64haveInteger64maskedAbsmaskedAbsOrmaskedAddmaskedAddOrmaskedDivmaskedDivOrmaskedMaxmaskedMaxOrmaskedMinOrmaskedModOrmaskedMulmaskedMulAddmaskedMulOrmaskedMulSubmaskedMulSubOrmaskedNegMulSubOrmaskedSatAddOrmaskedSatSubOrmaskedSubmaskedSubOrCappedTagIfFixedPow2CuckooFamilybuildPhastphastScratchLenphastSeedsLenMaskedMoremurMaskedTriple32MaskedWeakTwoMulhashArrayhashArrayInPlacefillRandomDistinctbf16FromF32f32FromBF16mulEvenAddmulOddAddcopyIfRepartitionToWideX3maskedNegMulAddmaskedNegMulAddOrpackBitsFrameunpackBitsFrameDefaultCachedXoshiropackBitsunpackBitsdemoteTopromoteToconvertToorderedDemote2TodemoteToNearestIntnearestIntorderedRoundingShiftRightAndDemote2ToorderedShiftRightAndDemote2ToorderedTruncate2ToreorderDemote2ToreorderRoundingShiftRightAndDemote2ToreorderShiftRightAndDemote2ToroundingShiftRightAndDemoteToshiftRightAndDemoteTotruncateToceilIntfloorIntpromoteInRangeTou8FromU32convertInRangeTodemoteInRangeTomaskedConvertTopromoteEvenTopromoteInRangeEvenTopromoteInRangeLowerTopromoteInRangeOddTopromoteInRangeUpperTopromoteLowerTopromoteOddTopromoteUpperTomaxValueminValueorder: Orders two spans of integer lanes lexicographically, asstd.mem.orderorders slices.equalmismatch: Returns the index of the first lane where two equal-length spans differ, or their length when every lane agrees.allUniqueuniquemulByPow2reorderWidenMulAccumulatewidenMulPairwiseAddmulHighsumOfMulQuadAccumulatewidenMulAccumulatemulByFloorPow2mulEvenmulOddmulRoundsatWidenMulAccumFixedPointsatWidenMulPairwiseAccumulatesatWidenMulPairwiseAddwriteLaneArraywriteLaneValuewriteVectorwriteTypeNameperBlock2x2MatMulbfloatWidenMulPairwiseAddreorderBFloatWidenMulAccumulatebf16FromF64dotF32BFloat16AssumedotBFloat16AssumedotProductAssumedotProductdotBFloat16dotF32BFloat16buildCuckoo2x2phastPositionPairFromHashesAndSeedscuckoo2x2EntriesLencuckoo2x2ScratchLenmaskedBFloatWidenMulPairwiseAddmaskedWidenMulPairwiseAddmatVecmatVecAddmatVecBFloat16matVecBFloat16AddmatVecBFloatF32matVecBFloatF32AddbuildShardMulmakeCuckoo2x2shardMulScratchLenmakeShardMul
Types and contracts
Public types and contracts.
BitSet64Cuckoo2x2ConfigShuffledIotaSplitMix64TargetBlockPackingTypeCostDistributionCuckoo2x2BuildErrorDefaultBitSet4096DiagnosticWindowDivisorDivisor64DotAssumptionsImage3FImageErrorImageFImageGeometryErrorMoremurPhastConfigPoolWorkerMappingRobustErrorShardMulBuildErrorShardMulDataTargetMaskTriple32WeakTwoMulWrapRowMirrorWrapRowUnchangedWrapUnchangedCuckooBuildAlgoCuckooBuildErrorCuckooBuildPlanCuckooBuildStatsCuckooBuilderCuckooConfigCuckooConfigErrorCuckooLocalBuildPlanCuckooLocalSearchCuckooOptimizedBuildPlanCuckooOptimizerCuckooTableCuckooTableErrorDefaultCuckooIndexRangeIndexRangePartitionK32V32K64V64LogicalProcessorSetPhastErrorPhastPlacementPhastSeedsPoolCallerPoolCallerStatsPoolStatsPoolWaitModePoolWaitTypeProcessorCacheProcessorTopologySortAscendingSortDescendingSortDirectionSpinMonitorXSpinPauseSpinResultSpinTypeSpinUMonitorVQSortErrorWaitWordXoshiroAesCtrEnginePoolConfigCuckoo2x2DataStatsWrapMirrorPhastDataTargetRuntimeRngStreamThreadPoolRectPhastBuildPlanBFloat16Cuckoo2x2PlanCuckoo2x2ShardMulShardMulPlanPhast
Namespaces
Public namespaces.
mathshiftrobustrotatefloatinglogicalcryptobitsetindexedprecisioncompleximagecountsignstatsautotuneparitycuckoophastsortthreadtopologyblockintdivlanestableswizzletuplecastarithmetictagreducetargetmemoryalignedconstructcomparerandomunrollerfastmathbitpackconditionalslidecompactcachehashbfloatconvertalgomultiplyprintcuckoo2x2matmulshardmuldotmatvec
Values and defaults
Public values and defaults.
alignmentgenerated_targetsmax_robust_array_scratch_bytesmaximum_vector_bytesstatic_targetstream_multipletarget_catalogupstream_revision@"undefined"all_pool_clustersmax_logical_processorsmax_pool_clustersmax_pool_threadsmax_pool_workersundefinedVector
Code relationships
Direct static dependencies extracted from parsed source by semantic graph analysis.
Uses: tiny.accy, tiny.bench, tiny.hypothesis, tiny.sys, tiny.tldr
Used by: tiny.accy, tiny.choir, tiny.http, tiny.sdfii, tiny.smg, tiny.smt, tiny.tldr, tiny.zen
Verification
No verification records are cataloged for this module in this build.
Audit
| Evidence | Value |
|---|---|
| Source | lib/simd/src/root.zig |
| Definitions | 5 of 861 documented |
| Members | 0 of 0 documented |
| Public names | 870 API, 2306 indexed |
| Version | 26.7.0 |
| Revision | daab053ee433 |
| Unresolved targets | 21 |