pub struct TensorExpand<T: CubePrimitive> { /* private fields */ }Implementations§
Source§impl<T: CubePrimitive> TensorExpand<T>
impl<T: CubePrimitive> TensorExpand<T>
Sourcepub fn __expand_stride_method(
&self,
scope: &Scope,
dim: <usize as CubeType>::ExpandType,
) -> <usize as CubeType>::ExpandType
pub fn __expand_stride_method( &self, scope: &Scope, dim: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType
Obtain the stride of input at dimension dim
Sourcepub fn __expand_shape_method(
&self,
scope: &Scope,
dim: <usize as CubeType>::ExpandType,
) -> <usize as CubeType>::ExpandType
pub fn __expand_shape_method( &self, scope: &Scope, dim: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType
Obtain the shape of input at dimension dim
Sourcepub fn __expand_coordinate_method(
&self,
scope: &Scope,
index: <usize as CubeType>::ExpandType,
dim: <usize as CubeType>::ExpandType,
) -> <usize as CubeType>::ExpandType
pub fn __expand_coordinate_method( &self, scope: &Scope, index: <usize as CubeType>::ExpandType, dim: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType
Obtain the coordinate corresponding to the given index of the tensor at dimension dim.
A coordinate is a list of indices corresponding to the multi-dimensional position of an element in the tensor.
The dim element in a coordinate is the position along the dim dimension of the tensor.
Sourcepub fn __expand_len_method(
&self,
scope: &Scope,
) -> <usize as CubeType>::ExpandType
pub fn __expand_len_method( &self, scope: &Scope, ) -> <usize as CubeType>::ExpandType
The number of vectorized elements in the tensor.
§Warning
The length will be affected by the vectorization factor. To obtain the number of elements, you should multiply the length by the vectorization factor.
Sourcepub fn __expand_buffer_len_method(
&self,
scope: &Scope,
) -> <usize as CubeType>::ExpandType
pub fn __expand_buffer_len_method( &self, scope: &Scope, ) -> <usize as CubeType>::ExpandType
The length of the buffer representing the tensor in terms of vectorized elements.
§Warning
The buffer length will be affected by the vectorization factor. To obtain the number of elements, you should multiply the length by the vectorization factor.
Sourcepub fn __expand_rank_method(
&self,
scope: &Scope,
) -> <usize as CubeType>::ExpandType
pub fn __expand_rank_method( &self, scope: &Scope, ) -> <usize as CubeType>::ExpandType
Returns the rank of the tensor.
Sourcepub fn __expand_stride(
scope: &Scope,
this: &Self,
dim: <usize as CubeType>::ExpandType,
) -> <usize as CubeType>::ExpandType
pub fn __expand_stride( scope: &Scope, this: &Self, dim: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType
Obtain the stride of input at dimension dim
Sourcepub fn __expand_shape(
scope: &Scope,
this: &Self,
dim: <usize as CubeType>::ExpandType,
) -> <usize as CubeType>::ExpandType
pub fn __expand_shape( scope: &Scope, this: &Self, dim: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType
Obtain the shape of input at dimension dim
Sourcepub fn __expand_coordinate(
scope: &Scope,
this: &Self,
index: <usize as CubeType>::ExpandType,
dim: <usize as CubeType>::ExpandType,
) -> <usize as CubeType>::ExpandType
pub fn __expand_coordinate( scope: &Scope, this: &Self, index: <usize as CubeType>::ExpandType, dim: <usize as CubeType>::ExpandType, ) -> <usize as CubeType>::ExpandType
Obtain the coordinate corresponding to the given index of the tensor at dimension dim.
A coordinate is a list of indices corresponding to the multi-dimensional position of an element in the tensor.
The dim element in a coordinate is the position along the dim dimension of the tensor.
Sourcepub fn __expand_len(
scope: &Scope,
this: &Self,
) -> <usize as CubeType>::ExpandType
pub fn __expand_len( scope: &Scope, this: &Self, ) -> <usize as CubeType>::ExpandType
The number of vectorized elements in the tensor.
§Warning
The length will be affected by the vectorization factor. To obtain the number of elements, you should multiply the length by the vectorization factor.
Sourcepub fn __expand_buffer_len(
scope: &Scope,
this: &Self,
) -> <usize as CubeType>::ExpandType
pub fn __expand_buffer_len( scope: &Scope, this: &Self, ) -> <usize as CubeType>::ExpandType
The length of the buffer representing the tensor in terms of vectorized elements.
§Warning
The buffer length will be affected by the vectorization factor. To obtain the number of elements, you should multiply the length by the vectorization factor.
Sourcepub fn __expand_rank(
scope: &Scope,
this: &Self,
) -> <usize as CubeType>::ExpandType
pub fn __expand_rank( scope: &Scope, this: &Self, ) -> <usize as CubeType>::ExpandType
Returns the rank of the tensor.
Source§impl<T: CubePrimitive> TensorExpand<T>
impl<T: CubePrimitive> TensorExpand<T>
Sourcepub fn __expand_from_parts(
meta: TensorMetaExpand,
buffer: NativeExpand<[T]>,
) -> Self
pub fn __expand_from_parts( meta: TensorMetaExpand, buffer: NativeExpand<[T]>, ) -> Self
Expand only because [T] can’t be passed to a function
Source§impl<T: CubePrimitive> TensorExpand<T>
impl<T: CubePrimitive> TensorExpand<T>
pub fn __expand_as_slice_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, ) -> &'infer <[T] as CubeType>::ExpandType ⓘ
pub fn __expand_as_mut_slice_method<'infer, 'scope>( &'infer mut self, scope: &'scope Scope, ) -> &'infer mut <[T] as CubeType>::ExpandType ⓘ
pub fn __expand_as_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer Self, ) -> &'infer <[T] as CubeType>::ExpandType ⓘ
pub fn __expand_as_mut_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer mut Self, ) -> &'infer mut <[T] as CubeType>::ExpandType ⓘ
Methods from Deref<Target = SliceExpand<T>>§
pub fn __expand_tma_load_1d_method<C1: CubePrimitive, C2: CubePrimitive<Scalar = C1::Scalar>>( &self, scope: &Scope, source: &NativeExpand<TensorMap<C1, Tiled>>, destination: &mut SliceExpand<C2>, x: NativeExpand<i32>, )
pub fn __expand_tma_load_2d_method<C1: CubePrimitive, C2: CubePrimitive<Scalar = C1::Scalar>>( &self, scope: &Scope, source: &NativeExpand<TensorMap<C1, Tiled>>, destination: &mut SliceExpand<C2>, y: NativeExpand<i32>, x: NativeExpand<i32>, )
pub fn __expand_tma_load_3d_method<C1: CubePrimitive, C2: CubePrimitive<Scalar = C1::Scalar>>( &self, scope: &Scope, source: &NativeExpand<TensorMap<C1, Tiled>>, destination: &mut SliceExpand<C2>, z: NativeExpand<i32>, y: NativeExpand<i32>, x: NativeExpand<i32>, )
pub fn __expand_tma_load_4d_method<C1: CubePrimitive, C2: CubePrimitive<Scalar = C1::Scalar>>( &self, scope: &Scope, source: &NativeExpand<TensorMap<C1, Tiled>>, destination: &mut SliceExpand<C2>, w: NativeExpand<i32>, z: NativeExpand<i32>, y: NativeExpand<i32>, x: NativeExpand<i32>, )
pub fn __expand_tma_load_5d_method<C1: CubePrimitive, C2: CubePrimitive<Scalar = C1::Scalar>>( &self, scope: &Scope, source: &NativeExpand<TensorMap<C1, Tiled>>, destination: &mut SliceExpand<C2>, v: NativeExpand<i32>, w: NativeExpand<i32>, z: NativeExpand<i32>, y: NativeExpand<i32>, x: NativeExpand<i32>, )
pub fn __expand_tma_load_im2col_3d_method<C1: CubePrimitive, C2: CubePrimitive<Scalar = C1::Scalar>>( &self, scope: &Scope, source: &NativeExpand<TensorMap<C1, Im2col>>, destination: &mut SliceExpand<C2>, n: NativeExpand<i32>, w: NativeExpand<i32>, c: NativeExpand<i32>, w_offset: NativeExpand<u16>, )
pub fn __expand_tma_load_im2col_4d_method<C1: CubePrimitive, C2: CubePrimitive<Scalar = C1::Scalar>>( &self, scope: &Scope, source: &NativeExpand<TensorMap<C1, Im2col>>, destination: &mut SliceExpand<C2>, n: NativeExpand<i32>, h: NativeExpand<i32>, w: NativeExpand<i32>, c: NativeExpand<i32>, h_offset: NativeExpand<u16>, w_offset: NativeExpand<u16>, )
pub fn __expand_tma_load_im2col_5d_method<C1: CubePrimitive, C2: CubePrimitive<Scalar = C1::Scalar>>( &self, scope: &Scope, source: &NativeExpand<TensorMap<C1, Im2col>>, destination: &mut SliceExpand<C2>, n: NativeExpand<i32>, d: NativeExpand<i32>, h: NativeExpand<i32>, w: NativeExpand<i32>, c: NativeExpand<i32>, d_offset: NativeExpand<u16>, h_offset: NativeExpand<u16>, w_offset: NativeExpand<u16>, )
Sourcepub fn __expand_init_manual_method(
&self,
scope: &Scope,
arrival_count: <u32 as CubeType>::ExpandType,
)
pub fn __expand_init_manual_method( &self, scope: &Scope, arrival_count: <u32 as CubeType>::ExpandType, )
Initializes a barrier with a given arrival_count. This is the number of
times arrive or one of its variants needs to be called before the barrier advances.
If all units in the cube arrive on the barrier, use CUBE_DIM as the arrival count. For
other purposes, only a subset may need to arrive.
§Note
No synchronization or election is performed, this is raw initialization. For shared barriers
ensure only one unit performs the initialization, and synchronize the cube afterwards. There
may also be additional synchronization requirements for bulk copy operations, like
sync_async_proxy_shared().
Sourcepub fn __expand_memcpy_async_method<C: CubePrimitive>(
&self,
scope: &Scope,
source: &<[C] as CubeType>::ExpandType,
destination: &mut <[C] as CubeType>::ExpandType,
)
pub fn __expand_memcpy_async_method<C: CubePrimitive>( &self, scope: &Scope, source: &<[C] as CubeType>::ExpandType, destination: &mut <[C] as CubeType>::ExpandType, )
Copy the source slice to destination
§Safety
This will try to copy the whole source slice, so make sure source length <= destination length
Sourcepub fn __expand_memcpy_async_cooperative_method<C: CubePrimitive>(
&self,
scope: &Scope,
source: &<[C] as CubeType>::ExpandType,
destination: &mut <[C] as CubeType>::ExpandType,
)
pub fn __expand_memcpy_async_cooperative_method<C: CubePrimitive>( &self, scope: &Scope, source: &<[C] as CubeType>::ExpandType, destination: &mut <[C] as CubeType>::ExpandType, )
Copy the source slice to destination
§Safety
This will try to copy the whole source slice, so make sure source length <= destination length
Sourcepub fn __expand_memcpy_async_tx_method<C: CubePrimitive>(
&self,
scope: &Scope,
source: &<[C] as CubeType>::ExpandType,
destination: &mut <[C] as CubeType>::ExpandType,
)
pub fn __expand_memcpy_async_tx_method<C: CubePrimitive>( &self, scope: &Scope, source: &<[C] as CubeType>::ExpandType, destination: &mut <[C] as CubeType>::ExpandType, )
Copy the source slice to destination. Uses transaction count like TMA, so use with
expect_tx or arrive_and_expect_tx.
§Safety
This will try to copy the whole source slice, so make sure source length <= destination length
Sourcepub fn __expand_arrive_method(
&self,
scope: &Scope,
) -> <BarrierToken as CubeType>::ExpandType
pub fn __expand_arrive_method( &self, scope: &Scope, ) -> <BarrierToken as CubeType>::ExpandType
Arrive at the barrier, decrementing arrival count
Sourcepub fn __expand_arrive_and_expect_tx_method(
&self,
scope: &Scope,
arrival_count: <u32 as CubeType>::ExpandType,
transaction_count: <u32 as CubeType>::ExpandType,
) -> <BarrierToken as CubeType>::ExpandType
pub fn __expand_arrive_and_expect_tx_method( &self, scope: &Scope, arrival_count: <u32 as CubeType>::ExpandType, transaction_count: <u32 as CubeType>::ExpandType, ) -> <BarrierToken as CubeType>::ExpandType
Arrive at the barrier, decrementing arrival count. Additionally increments expected count.
Sourcepub fn __expand_expect_tx_method(
&self,
scope: &Scope,
expected_count: <u32 as CubeType>::ExpandType,
)
pub fn __expand_expect_tx_method( &self, scope: &Scope, expected_count: <u32 as CubeType>::ExpandType, )
Increments the expected count of the barrier.
Sourcepub fn __expand_arrive_and_wait_method(&self, scope: &Scope)
pub fn __expand_arrive_and_wait_method(&self, scope: &Scope)
Wait until all data is loaded
Sourcepub fn __expand_wait_method(
&self,
scope: &Scope,
token: <BarrierToken as CubeType>::ExpandType,
)
pub fn __expand_wait_method( &self, scope: &Scope, token: <BarrierToken as CubeType>::ExpandType, )
Wait at the barrier until all arrivals are done
Sourcepub fn __expand_wait_parity_method(
&self,
scope: &Scope,
phase: <u32 as CubeType>::ExpandType,
)
pub fn __expand_wait_parity_method( &self, scope: &Scope, phase: <u32 as CubeType>::ExpandType, )
Wait at the barrier until the phase is completed. Doesn’t require a token, but needs phase
to be managed manually.
Sourcepub fn __expand_commit_copy_async_method(&self, scope: &Scope)
pub fn __expand_commit_copy_async_method(&self, scope: &Scope)
Makes all previous copy_async operations visible on the barrier.
Should be called once after all copies have been dispatched, before reading from the shared
memory.
Does not count as an arrive in terms of the barrier arrival count. So arrive or
arrive_and_wait should still be called afterwards.
Sourcepub fn __expand_len_method(&self, scope: &Scope) -> usize
pub fn __expand_len_method(&self, scope: &Scope) -> usize
Obtain the array length
pub fn __expand_len_method( &self, scope: &Scope, ) -> <usize as CubeType>::ExpandType
pub fn __expand_inner_ref_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, ) -> &'infer <T as CubeType>::ExpandType
pub fn __expand_inner_mut_method<'infer, 'scope>( &'infer mut self, scope: &'scope Scope, ) -> &'infer mut <T as CubeType>::ExpandType
Sourcepub fn __expand_free_method(&self, scope: &Scope)
pub fn __expand_free_method(&self, scope: &Scope)
Frees the shared memory for reuse, if possible on the target runtime.
§Safety
Must be used in uniform control flow Must not have any dangling references to this shared memory
pub fn __extract_list(&self, scope: &Scope) -> Value
pub fn __extract_offset(&self, scope: &Scope) -> NativeExpand<usize>
pub fn __extract_length(&self, scope: &Scope) -> NativeExpand<usize>
pub fn __expand_with_vector_size_method<'infer, N2: Size>( &'infer self, scope: &Scope, ) -> &'infer SliceExpand<Vector<E, N2>>
pub fn __expand_with_vector_size_mut_method<'infer, N2: Size>( &'infer mut self, scope: &Scope, ) -> &'infer mut SliceExpand<Vector<E, N2>>
pub fn __expand_as_vectorized_method( &self, _: &Scope, ) -> &SliceExpand<Vector<E::Scalar, E::Size>>
pub fn __expand_as_vectorized_mut_method( &mut self, _: &Scope, ) -> &mut SliceExpand<Vector<E::Scalar, E::Size>>
pub fn __expand_downcast_method<T: CubePrimitive>( &self, scope: &Scope, ) -> &SliceExpand<T>
pub fn __expand_downcast_mut_method<T: CubePrimitive>( &mut self, scope: &Scope, ) -> &mut SliceExpand<T>
pub fn __expand_as_ptr_method(&self, scope: &Scope) -> *const NativeExpand<E>
pub fn __expand_as_mut_ptr_method( &mut self, scope: &Scope, ) -> *mut NativeExpand<E>
pub fn __expand_as_mut_unchecked_method( &self, scope: &Scope, ) -> &mut SliceExpand<E>
Sourcepub fn __expand_len_method(&self, scope: &Scope) -> NativeExpand<usize>
pub fn __expand_len_method(&self, scope: &Scope) -> NativeExpand<usize>
Get the length of the slice.
Sourcepub fn is_empty(&self, scope: &Scope) -> NativeExpand<bool>
pub fn is_empty(&self, scope: &Scope) -> NativeExpand<bool>
Returns true if the slice is empty.
pub fn __expand_as_slice_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, ) -> &'infer <[E] as CubeType>::ExpandType ⓘ
pub fn __expand_as_mut_slice_method<'infer, 'scope>( &'infer mut self, scope: &'scope Scope, ) -> &'infer mut <[E] as CubeType>::ExpandType ⓘ
pub fn __expand_as_slice_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, ) -> &'infer <[E] as CubeType>::ExpandType ⓘ
pub fn __expand_as_mut_slice_method<'infer, 'scope>( &'infer mut self, scope: &'scope Scope, ) -> &'infer mut <[E] as CubeType>::ExpandType ⓘ
pub fn __expand_copy_from_slice_method( &mut self, scope: &Scope, source: &SliceExpand<E>, )
pub fn __expand_insert_method( &mut self, scope: &Scope, index: <usize as CubeType>::ExpandType, value: <P as CubeType>::ExpandType, )
Sourcepub fn size(&self) -> VectorSize
pub fn size(&self) -> VectorSize
Comptime version of size.
Sourcepub fn __expand_size_method(&self, _scope: &Scope) -> VectorSize
pub fn __expand_size_method(&self, _scope: &Scope) -> VectorSize
Expand method of size.
Sourcepub fn __expand_equal_method(
&self,
scope: &Scope,
other: &Self,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_equal_method( &self, scope: &Scope, other: &Self, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being equal to the second vector.
Sourcepub fn __expand_not_equal_method(
&self,
scope: &Scope,
other: &Self,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_not_equal_method( &self, scope: &Scope, other: &Self, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being not equal to the second vector.
Sourcepub fn __expand_less_than_method(
&self,
scope: &Scope,
other: &Self,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_less_than_method( &self, scope: &Scope, other: &Self, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being less than the second vector.
Sourcepub fn __expand_greater_than_method(
&self,
scope: &Scope,
other: &Self,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_greater_than_method( &self, scope: &Scope, other: &Self, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being greater than the second vector.
Sourcepub fn __expand_less_equal_method(
&self,
scope: &Scope,
other: &Self,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_less_equal_method( &self, scope: &Scope, other: &Self, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being less than or equal to the second vector.
Sourcepub fn __expand_greater_equal_method(
&self,
scope: &Scope,
other: &Self,
) -> <Vector<bool, N> as CubeType>::ExpandType
pub fn __expand_greater_equal_method( &self, scope: &Scope, other: &Self, ) -> <Vector<bool, N> as CubeType>::ExpandType
Return a new vector with the element-wise comparison of the first vector being greater than or equal to the second vector.
Sourcepub fn __expand_load_method(
&self,
scope: &Scope,
) -> <Inner as CubeType>::ExpandType
pub fn __expand_load_method( &self, scope: &Scope, ) -> <Inner as CubeType>::ExpandType
Load the value of the atomic.
Sourcepub fn __expand_store_method(
&self,
scope: &Scope,
value: <Inner as CubeType>::ExpandType,
)
pub fn __expand_store_method( &self, scope: &Scope, value: <Inner as CubeType>::ExpandType, )
Store the value of the atomic.
Sourcepub fn __expand_swap_method(
&self,
scope: &Scope,
value: <Inner as CubeType>::ExpandType,
) -> <Inner as CubeType>::ExpandType
pub fn __expand_swap_method( &self, scope: &Scope, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType
Atomically stores the value into the atomic and returns the old value.
Sourcepub fn __expand_fetch_add_method(
&self,
scope: &Scope,
value: <Inner as CubeType>::ExpandType,
) -> <Inner as CubeType>::ExpandType
pub fn __expand_fetch_add_method( &self, scope: &Scope, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType
Atomically add a number to the atomic variable. Returns the old value.
Sourcepub fn __expand_fetch_sub_method(
&self,
scope: &Scope,
value: <Inner as CubeType>::ExpandType,
) -> <Inner as CubeType>::ExpandType
pub fn __expand_fetch_sub_method( &self, scope: &Scope, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType
Atomically subtracts a number from the atomic variable. Returns the old value.
Sourcepub fn __expand_fetch_max_method(
&self,
scope: &Scope,
value: <Inner as CubeType>::ExpandType,
) -> <Inner as CubeType>::ExpandType
pub fn __expand_fetch_max_method( &self, scope: &Scope, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType
Atomically sets the value of the atomic variable to max(current_value, value). Returns
the old value.
Sourcepub fn __expand_fetch_min_method(
&self,
scope: &Scope,
value: <Inner as CubeType>::ExpandType,
) -> <Inner as CubeType>::ExpandType
pub fn __expand_fetch_min_method( &self, scope: &Scope, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType
Atomically sets the value of the atomic variable to min(current_value, value). Returns the
old value.
Sourcepub fn __expand_compare_exchange_weak_method(
&self,
scope: &Scope,
cmp: <Inner as CubeType>::ExpandType,
value: <Inner as CubeType>::ExpandType,
) -> <Inner as CubeType>::ExpandType
pub fn __expand_compare_exchange_weak_method( &self, scope: &Scope, cmp: <Inner as CubeType>::ExpandType, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType
Compare the value at pointer to cmp and set it to value only if they are the same.
Returns the old value of the pointer before the store.
§Tip
Compare the returned value to cmp to determine whether the store was successful.
Sourcepub fn __expand_fetch_and_method(
&self,
scope: &Scope,
value: <Inner as CubeType>::ExpandType,
) -> <Inner as CubeType>::ExpandType
pub fn __expand_fetch_and_method( &self, scope: &Scope, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType
Executes an atomic bitwise and operation on the atomic variable. Returns the old value.
Sourcepub fn __expand_fetch_or_method(
&self,
scope: &Scope,
value: <Inner as CubeType>::ExpandType,
) -> <Inner as CubeType>::ExpandType
pub fn __expand_fetch_or_method( &self, scope: &Scope, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType
Executes an atomic bitwise or operation on the atomic variable. Returns the old value.
Sourcepub fn __expand_fetch_xor_method(
&self,
scope: &Scope,
value: <Inner as CubeType>::ExpandType,
) -> <Inner as CubeType>::ExpandType
pub fn __expand_fetch_xor_method( &self, scope: &Scope, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType
Executes an atomic bitwise xor operation on the atomic variable. Returns the old value.
Sourcepub unsafe fn as_type_ref_unchecked<E: ?Sized>(&self) -> &NativeExpand<E>
pub unsafe fn as_type_ref_unchecked<E: ?Sized>(&self) -> &NativeExpand<E>
Casts a reference of this expand element to a different type.
§Safety
There’s no guarantee the new type is valid for the Value
Sourcepub unsafe fn as_type_mut_unchecked<E: ?Sized>(
&mut self,
) -> &mut NativeExpand<E>
pub unsafe fn as_type_mut_unchecked<E: ?Sized>( &mut self, ) -> &mut NativeExpand<E>
Casts a mutable reference of this expand element to a different type.
§Safety
There’s no guarantee the new type is valid for the Value
Sourcepub fn vector_size(&self) -> VectorSize
pub fn vector_size(&self) -> VectorSize
Comptime version of crate::frontend::Array::vector_size.
pub fn __expand_vector_size_method(&self, _scope: &Scope) -> VectorSize
Sourcepub fn constant(&self) -> Option<ConstantValue>
pub fn constant(&self) -> Option<ConstantValue>
Get the ConstantValue from the variable.
Trait Implementations§
Source§impl<T: CubePrimitive> AsMutExpand for TensorExpand<T>
impl<T: CubePrimitive> AsMutExpand for TensorExpand<T>
fn __expand_ref_mut_method(&mut self, _: &Scope) -> &mut Self
fn __expand_as_mut_method(&mut self, scope: &Scope) -> &mut T
Source§impl<T: CubePrimitive> AsRefExpand for TensorExpand<T>
impl<T: CubePrimitive> AsRefExpand for TensorExpand<T>
fn __expand_ref_method(&self, _: &Scope) -> &Self
fn __expand_as_ref_method(&self, scope: &Scope) -> &T
Source§impl<T: CubePrimitive> CubeDebug for TensorExpand<T>
impl<T: CubePrimitive> CubeDebug for TensorExpand<T>
Source§fn set_debug_name(&self, scope: &Scope, name: &'static str)
fn set_debug_name(&self, scope: &Scope, name: &'static str)
Source§impl<T: CubePrimitive> Deref for TensorExpand<T>
impl<T: CubePrimitive> Deref for TensorExpand<T>
Source§impl<T: CubePrimitive> DerefMut for TensorExpand<T>
impl<T: CubePrimitive> DerefMut for TensorExpand<T>
Source§impl<T: CubePrimitive> ExpandTypeClone for TensorExpand<T>
impl<T: CubePrimitive> ExpandTypeClone for TensorExpand<T>
Source§fn clone_unchecked(&self) -> Self
fn clone_unchecked(&self) -> Self
Clone semantics and should only be used for the
conceptual expand values, never real data. Using two values in the same branch is undefined
behaviour.Source§impl<'a, E: CubePrimitive> From<&'a OwnedTensorExpand<E>> for &'a TensorExpand<E>
impl<'a, E: CubePrimitive> From<&'a OwnedTensorExpand<E>> for &'a TensorExpand<E>
Source§fn from(value: &'a OwnedTensorExpand<E>) -> Self
fn from(value: &'a OwnedTensorExpand<E>) -> Self
Source§impl<'a, E: CubePrimitive> From<&'a TensorExpand<E>> for &'a SliceExpand<E>
impl<'a, E: CubePrimitive> From<&'a TensorExpand<E>> for &'a SliceExpand<E>
Source§fn from(value: &'a TensorExpand<E>) -> Self
fn from(value: &'a TensorExpand<E>) -> Self
Source§impl<'a, E: CubePrimitive> From<&'a mut OwnedTensorExpand<E>> for &'a mut TensorExpand<E>
impl<'a, E: CubePrimitive> From<&'a mut OwnedTensorExpand<E>> for &'a mut TensorExpand<E>
Source§fn from(value: &'a mut OwnedTensorExpand<E>) -> Self
fn from(value: &'a mut OwnedTensorExpand<E>) -> Self
Source§impl<'a, E: CubePrimitive> From<&'a mut TensorExpand<E>> for &'a mut SliceExpand<E>
impl<'a, E: CubePrimitive> From<&'a mut TensorExpand<E>> for &'a mut SliceExpand<E>
Source§fn from(value: &'a mut TensorExpand<E>) -> Self
fn from(value: &'a mut TensorExpand<E>) -> Self
Source§impl<E: CubePrimitive> IndexExpand<NativeExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexExpand<NativeExpand<usize>> for TensorExpand<E>
type Output = NativeExpand<E>
fn __expand_index_method( &self, scope: &Scope, index: NativeExpand<usize>, ) -> &Self::Output
Source§impl<E: CubePrimitive> IndexExpand<RangeExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexExpand<RangeExpand<usize>> for TensorExpand<E>
type Output = NativeExpand<[E]>
fn __expand_index_method( &self, scope: &Scope, index: RangeExpand<usize>, ) -> &Self::Output
Source§impl<E: CubePrimitive> IndexExpand<RangeFromExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexExpand<RangeFromExpand<usize>> for TensorExpand<E>
type Output = NativeExpand<[E]>
fn __expand_index_method( &self, scope: &Scope, index: RangeFromExpand<usize>, ) -> &Self::Output
Source§impl<E: CubePrimitive> IndexExpand<RangeFullExpand> for TensorExpand<E>
impl<E: CubePrimitive> IndexExpand<RangeFullExpand> for TensorExpand<E>
type Output = NativeExpand<[E]>
fn __expand_index_method( &self, scope: &Scope, index: RangeFullExpand, ) -> &Self::Output
Source§impl<E: CubePrimitive> IndexExpand<RangeInclusiveExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexExpand<RangeInclusiveExpand<usize>> for TensorExpand<E>
type Output = NativeExpand<[E]>
fn __expand_index_method( &self, scope: &Scope, index: RangeInclusiveExpand<usize>, ) -> &Self::Output
Source§impl<E: CubePrimitive> IndexExpand<RangeToExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexExpand<RangeToExpand<usize>> for TensorExpand<E>
type Output = NativeExpand<[E]>
fn __expand_index_method( &self, scope: &Scope, index: RangeToExpand<usize>, ) -> &Self::Output
Source§impl<E: CubePrimitive> IndexExpand<RangeToInclusiveExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexExpand<RangeToInclusiveExpand<usize>> for TensorExpand<E>
type Output = NativeExpand<[E]>
fn __expand_index_method( &self, scope: &Scope, index: RangeToInclusiveExpand<usize>, ) -> &Self::Output
Source§impl<E: CubePrimitive> IndexMutExpand<NativeExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexMutExpand<NativeExpand<usize>> for TensorExpand<E>
fn __expand_index_mut_method( &mut self, scope: &Scope, index: NativeExpand<usize>, ) -> &mut E::ExpandType
Source§impl<E: CubePrimitive> IndexMutExpand<RangeExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexMutExpand<RangeExpand<usize>> for TensorExpand<E>
fn __expand_index_mut_method( &mut self, scope: &Scope, index: RangeExpand<usize>, ) -> &mut <Self as IndexExpand<RangeExpand<usize>>>::Output
Source§impl<E: CubePrimitive> IndexMutExpand<RangeFromExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexMutExpand<RangeFromExpand<usize>> for TensorExpand<E>
fn __expand_index_mut_method( &mut self, scope: &Scope, index: RangeFromExpand<usize>, ) -> &mut <Self as IndexExpand<RangeFromExpand<usize>>>::Output
Source§impl<E: CubePrimitive> IndexMutExpand<RangeFullExpand> for TensorExpand<E>
impl<E: CubePrimitive> IndexMutExpand<RangeFullExpand> for TensorExpand<E>
fn __expand_index_mut_method( &mut self, scope: &Scope, index: RangeFullExpand, ) -> &mut <Self as IndexExpand<RangeFullExpand>>::Output
Source§impl<E: CubePrimitive> IndexMutExpand<RangeInclusiveExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexMutExpand<RangeInclusiveExpand<usize>> for TensorExpand<E>
fn __expand_index_mut_method( &mut self, scope: &Scope, index: RangeInclusiveExpand<usize>, ) -> &mut <Self as IndexExpand<RangeInclusiveExpand<usize>>>::Output
Source§impl<E: CubePrimitive> IndexMutExpand<RangeToExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexMutExpand<RangeToExpand<usize>> for TensorExpand<E>
fn __expand_index_mut_method( &mut self, scope: &Scope, index: RangeToExpand<usize>, ) -> &mut <Self as IndexExpand<RangeToExpand<usize>>>::Output
Source§impl<E: CubePrimitive> IndexMutExpand<RangeToInclusiveExpand<usize>> for TensorExpand<E>
impl<E: CubePrimitive> IndexMutExpand<RangeToInclusiveExpand<usize>> for TensorExpand<E>
fn __expand_index_mut_method( &mut self, scope: &Scope, index: RangeToInclusiveExpand<usize>, ) -> &mut <Self as IndexExpand<RangeToInclusiveExpand<usize>>>::Output
Source§impl<T: CubePrimitive> IntoExpand for TensorExpand<T>
impl<T: CubePrimitive> IntoExpand for TensorExpand<T>
type Expand = TensorExpand<T>
fn into_expand(self, _: &Scope) -> Self
Source§impl<T: CubePrimitive> IntoMut for TensorExpand<T>
impl<T: CubePrimitive> IntoMut for TensorExpand<T>
Source§impl<T: CubePrimitive> ListExpand<T> for TensorExpand<T>
impl<T: CubePrimitive> ListExpand<T> for TensorExpand<T>
fn __expand_len_method(&self, scope: &Scope) -> NativeExpand<usize>
Source§impl<T: CubePrimitive> SizedContainerExpand<usize> for TensorExpand<T>
impl<T: CubePrimitive> SizedContainerExpand<usize> for TensorExpand<T>
fn __expand_len_method(&self, scope: &Scope) -> NativeExpand<usize>
Source§impl<T: CubePrimitive> VectorizedExpand for TensorExpand<T>
impl<T: CubePrimitive> VectorizedExpand for TensorExpand<T>
fn vector_size(&self) -> VectorSize
fn __expand_vector_size_method(&self, _scope: &Scope) -> VectorSize
Auto Trait Implementations§
impl<T> Freeze for TensorExpand<T>
impl<T> RefUnwindSafe for TensorExpand<T>where
T: RefUnwindSafe,
impl<T> Send for TensorExpand<T>
impl<T> Sync for TensorExpand<T>
impl<T> Unpin for TensorExpand<T>where
T: Unpin,
impl<T> UnsafeUnpin for TensorExpand<T>
impl<T> UnwindSafe for TensorExpand<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more