Mojo module
intrinsics
Defines intrinsics.
You can import these APIs from the sys
package. For example:
from sys import PrefetchLocality
from sys import PrefetchLocality
Aliases
-
block_dim = {}
: -
block_idx = {}
: -
global_idx = {}
: -
grid_dim = {}
: -
thread_idx = {}
:
Structs
-
PrefetchCache
: Prefetch cache type. -
PrefetchLocality
: The prefetch locality. -
PrefetchOptions
: Collection of configuration parameters for a prefetch intrinsic call. -
PrefetchRW
: Prefetch read or write.
Functions
-
assume
: Signals to the optimizer that the condition is always true. This allows the optimizer to optimize the code. -
ballot
: Returns a bitfield(Int32 or Int64) containing the result of its Bool argument in all active lanes, and zero in all inactive lanes. For example, ballot(True) returns EXEC mask. -
compressed_store
: Compresses the lanes ofvalue
, skippingmask
lanes, and stores ataddr
. -
expect
: Provides information about expected (the most probable) value ofval
, which can be used by optimizers. -
gather
: Reads scalar values from a SIMD vector, and gathers them into one vector. -
implicitarg_ptr
: Get a pointer to AMD's implicit arguments table. -
lane_id
: Returns the lane ID of the current thread. -
likely
: Provides information that the most probable value ofval
is going to beTrue
. This information can be used by optimizers. -
llvm_intrinsic
: Calls an LLVM intrinsic with the nameintrin
and return typetype
. -
masked_load
: Loads data from memory and return it, replacing masked lanes with values from the passthrough vector. -
masked_store
: Stores a value at a memory location, skipping masked lanes. -
prefetch
: Prefetches an instruction or data into cache before it is used. -
readfirstlane
: Get the lowest acitve lane of the input operand. -
scatter
: Takes scalar values from a SIMD vector andscatters
them into a vector of pointers. -
sendmsg
: Send a message to fixed function hardware. Refer to the specific ISA manual for the ops and messages. -
strided_load
: Loads values from addr according to a specific stride. -
strided_store
: Loads values from addr according to a specific stride. -
unlikely
: Provides information that the most probable value ofval
is going to beFalse
. This information can be used by optimizers.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!