Skip to main content

NativeExpand

Struct NativeExpand 

Source
pub struct NativeExpand<T: ?Sized> {
    pub expand: Value,
    /* private fields */
}
Expand description

Expand type of a native GPU type, i.e. scalar primitives, arrays, shared memory.

Fields§

§expand: Value

Implementations§

Source§

impl NativeExpand<Barrier>

Source

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>, )

Source§

impl NativeExpand<Barrier>

Source

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>, )

Source§

impl NativeExpand<Barrier>

Source

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>, )

Source§

impl NativeExpand<Barrier>

Source

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>, )

Source§

impl NativeExpand<Barrier>

Source

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>, )

Source§

impl NativeExpand<Barrier>

Source

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>, )

Source§

impl NativeExpand<Barrier>

Source

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>, )

Source§

impl NativeExpand<Barrier>

Source

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>, )

Source§

impl NativeExpand<Barrier>

Source

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().

Source

pub fn __expand_local(scope: &Scope) -> Self

Create a local barrier object for the current unit. Automatically initialized with an arrival count of 1.

Source

pub fn __expand_shared( scope: &Scope, arrival_count: <u32 as CubeType>::ExpandType, is_elected: <bool as CubeType>::ExpandType, ) -> <Shared<Barrier> as CubeType>::ExpandType

Create a shared memory barrier that can be accesses by all units in the cube. Initialized by the is_elected unit with an arrival count of 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.

Source

pub fn __expand_shared_uninit( scope: &Scope, ) -> <Shared<Barrier> as CubeType>::ExpandType

Create a shared memory barrier that can be accesses by all units in the cube. Only declared, but not initialized.

Source

pub fn __expand_init_manual( scope: &Scope, this: &Self, 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().

Source§

impl NativeExpand<Barrier>

Source

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

Source

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

Source

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

Source

pub fn __expand_memcpy_async<C: CubePrimitive>( scope: &Scope, this: &Self, 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

Source

pub fn __expand_memcpy_async_cooperative<C: CubePrimitive>( scope: &Scope, this: &Self, 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

Source

pub fn __expand_memcpy_async_tx<C: CubePrimitive>( scope: &Scope, this: &Self, 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

Source§

impl NativeExpand<Barrier>

Source

pub fn __expand_arrive_method( &self, scope: &Scope, ) -> <BarrierToken as CubeType>::ExpandType

Arrive at the barrier, decrementing arrival count

Source

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.

Source

pub fn __expand_expect_tx_method( &self, scope: &Scope, expected_count: <u32 as CubeType>::ExpandType, )

Increments the expected count of the barrier.

Source

pub fn __expand_arrive_and_wait_method(&self, scope: &Scope)

Wait until all data is loaded

Source

pub fn __expand_wait_method( &self, scope: &Scope, token: <BarrierToken as CubeType>::ExpandType, )

Wait at the barrier until all arrivals are done

Source

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.

Source

pub fn __expand_arrive( scope: &Scope, this: &Self, ) -> <BarrierToken as CubeType>::ExpandType

Arrive at the barrier, decrementing arrival count

Source

pub fn __expand_arrive_and_expect_tx( scope: &Scope, this: &Self, 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.

Source

pub fn __expand_expect_tx( scope: &Scope, this: &Self, expected_count: <u32 as CubeType>::ExpandType, )

Increments the expected count of the barrier.

Source

pub fn __expand_arrive_and_wait(scope: &Scope, this: &Self)

Wait until all data is loaded

Source

pub fn __expand_wait( scope: &Scope, this: &Self, token: <BarrierToken as CubeType>::ExpandType, )

Wait at the barrier until all arrivals are done

Source

pub fn __expand_wait_parity( scope: &Scope, this: &Self, 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.

Source§

impl NativeExpand<Barrier>

Source

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.

Source

pub fn __expand_commit_copy_async(scope: &Scope, this: &Self)

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.

Source§

impl<E: CubePrimitive> NativeExpand<Array<E>>

Source

pub fn __expand_len_method(&self, scope: &Scope) -> usize

Obtain the array length

Source

pub fn __expand_len(scope: &Scope, this: &Self) -> usize

Obtain the array length

Source§

impl<T: CubePrimitive> NativeExpand<Shared<[T]>>

Source

pub fn __expand_len_method( &self, scope: &Scope, ) -> <usize as CubeType>::ExpandType

Source

pub fn __expand_new_slice(scope: &Scope, len: usize) -> Self

Create a new shared slice.

§Safety

Shared memory is always uninitialized by default. Reading uninitialized shared values is undefined behavior.

Source

pub fn __expand_new_aligned_slice( scope: &Scope, len: usize, alignment: usize, ) -> Self

Create a new shared slice with a specified minimum alignment.

§Safety

Shared memory is always uninitialized by default. Reading uninitialized shared values is undefined behavior.

Source

pub fn __expand_len( scope: &Scope, this: &Self, ) -> <usize as CubeType>::ExpandType

Source§

impl<T: NativeCubeType + ?Sized> NativeExpand<Shared<T>>

Source

pub fn __expand_map_method<U: NativeCubeType + ?Sized>( self, scope: &Scope, map: impl for<'a> FnOnce(&Scope, &'a NativeExpand<T>) -> &'a NativeExpand<U>, ) -> SharedExpand<U>

Source§

impl<T: NativeCubeType + ?Sized> NativeExpand<Shared<T>>

Source

pub fn __expand_inner_ref_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, ) -> &'infer <T as CubeType>::ExpandType

Source

pub fn __expand_inner_mut_method<'infer, 'scope>( &'infer mut self, scope: &'scope Scope, ) -> &'infer mut <T as CubeType>::ExpandType

Source

pub fn __expand_inner_ref<'infer, 'scope>( scope: &'scope Scope, this: &'infer Self, ) -> &'infer <T as CubeType>::ExpandType

Source

pub fn __expand_inner_mut<'infer, 'scope>( scope: &'scope Scope, this: &'infer mut Self, ) -> &'infer mut <T as CubeType>::ExpandType

Source§

impl<T: NativeCubeType + ?Sized> NativeExpand<Shared<T>>

Source

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

Source

pub fn __expand_free(scope: &Scope, this: &Self)

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

Source§

impl<E: CubePrimitive> NativeExpand<[E]>

Source

pub fn __extract_list(&self, scope: &Scope) -> Value

Source

pub fn __extract_offset(&self, scope: &Scope) -> NativeExpand<usize>

Source

pub fn __extract_length(&self, scope: &Scope) -> NativeExpand<usize>

Source§

impl<E: Scalar, N: Size> NativeExpand<[Vector<E, N>]>

Source

pub fn __expand_with_vector_size_method<'infer, N2: Size>( &'infer self, scope: &Scope, ) -> &'infer SliceExpand<Vector<E, N2>>

Source

pub fn __expand_with_vector_size_mut_method<'infer, N2: Size>( &'infer mut self, scope: &Scope, ) -> &'infer mut SliceExpand<Vector<E, N2>>

Source§

impl<E: CubePrimitive> NativeExpand<[E]>

Source

pub fn __expand_as_vectorized_method( &self, _: &Scope, ) -> &SliceExpand<Vector<E::Scalar, E::Size>>

Source

pub fn __expand_as_vectorized_mut_method( &mut self, _: &Scope, ) -> &mut SliceExpand<Vector<E::Scalar, E::Size>>

Source

pub fn __expand_downcast_method<T: CubePrimitive>( &self, scope: &Scope, ) -> &SliceExpand<T>

Source

pub fn __expand_downcast_mut_method<T: CubePrimitive>( &mut self, scope: &Scope, ) -> &mut SliceExpand<T>

Source

pub fn __expand_as_ptr_method(&self, scope: &Scope) -> *const NativeExpand<E>

Source

pub fn __expand_as_mut_ptr_method( &mut self, scope: &Scope, ) -> *mut NativeExpand<E>

Source

pub fn __expand_as_mut_unchecked_method( &self, scope: &Scope, ) -> &mut SliceExpand<E>

Source§

impl<E: CubePrimitive> NativeExpand<[E]>

Source

pub fn __expand_len_method(&self, scope: &Scope) -> NativeExpand<usize>

Get the length of the slice.

Source

pub fn is_empty(&self, scope: &Scope) -> NativeExpand<bool>

Returns true if the slice is empty.

Source§

impl<E: CubePrimitive> NativeExpand<Array<E>>

Source

pub fn __expand_as_slice_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, ) -> &'infer <[E] as CubeType>::ExpandType

Source

pub fn __expand_as_mut_slice_method<'infer, 'scope>( &'infer mut self, scope: &'scope Scope, ) -> &'infer mut <[E] as CubeType>::ExpandType

Source

pub fn __expand_as_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer Self, ) -> &'infer <[E] as CubeType>::ExpandType

Source

pub fn __expand_as_mut_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer mut Self, ) -> &'infer mut <[E] as CubeType>::ExpandType

Source§

impl<E: CubePrimitive> NativeExpand<Shared<[E]>>

Source

pub fn __expand_as_slice_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, ) -> &'infer <[E] as CubeType>::ExpandType

Source

pub fn __expand_as_mut_slice_method<'infer, 'scope>( &'infer mut self, scope: &'scope Scope, ) -> &'infer mut <[E] as CubeType>::ExpandType

Source

pub fn __expand_as_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer Self, ) -> &'infer <[E] as CubeType>::ExpandType

Source

pub fn __expand_as_mut_slice<'infer, 'scope>( scope: &'scope Scope, this: &'infer mut Self, ) -> &'infer mut <[E] as CubeType>::ExpandType

Source§

impl<E: CubePrimitive> NativeExpand<[E]>

Source

pub fn __expand_copy_from_slice_method( &mut self, scope: &Scope, source: &SliceExpand<E>, )

Source§

impl<T: CubePrimitive, K: TensorMapKind> NativeExpand<TensorMap<T, K>>

Source§

impl<P: Scalar, N: Size> NativeExpand<Vector<P, N>>

Source

pub fn __expand_extract_method( self, scope: &Scope, index: <usize as CubeType>::ExpandType, ) -> <P as CubeType>::ExpandType

Source

pub fn __expand_insert_method( &mut self, scope: &Scope, index: <usize as CubeType>::ExpandType, value: <P as CubeType>::ExpandType, )

Source

pub fn __expand_extract( scope: &Scope, this: Self, index: <usize as CubeType>::ExpandType, ) -> <P as CubeType>::ExpandType

Source

pub fn __expand_insert( scope: &Scope, this: &mut Self, index: <usize as CubeType>::ExpandType, value: <P as CubeType>::ExpandType, )

Source§

impl<P: Scalar, N: Size> NativeExpand<Vector<P, N>>

Source

pub fn __expand_fill_method( self, scope: &Scope, value: <P as CubeType>::ExpandType, ) -> Self

Fill the vector with the given value.

If you want to fill the vector with different values, consider using the index API instead.

let mut vector = Vector::<u32>::empty(2);
vector[0] = 1;
vector[1] = 2;
Source

pub fn __expand_fill( scope: &Scope, this: Self, value: <P as CubeType>::ExpandType, ) -> Self

Fill the vector with the given value.

If you want to fill the vector with different values, consider using the index API instead.

let mut vector = Vector::<u32>::empty(2);
vector[0] = 1;
vector[1] = 2;
Source§

impl<P: Scalar, N: Size> NativeExpand<Vector<P, N>>

Source

pub fn size(&self) -> VectorSize

Comptime version of size.

Source

pub fn __expand_size_method(&self, _scope: &Scope) -> VectorSize

Expand method of size.

Source§

impl<P: Scalar, N: Size> NativeExpand<Vector<P, N>>

Source

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.

Source

pub fn __expand_equal( scope: &Scope, this: &Self, 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.

Source§

impl<P: Scalar, N: Size> NativeExpand<Vector<P, N>>

Source

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.

Source

pub fn __expand_not_equal( scope: &Scope, this: &Self, 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.

Source§

impl<P: Scalar, N: Size> NativeExpand<Vector<P, N>>

Source

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.

Source

pub fn __expand_less_than( scope: &Scope, this: &Self, 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.

Source§

impl<P: Scalar, N: Size> NativeExpand<Vector<P, N>>

Source

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.

Source

pub fn __expand_greater_than( scope: &Scope, this: &Self, 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.

Source§

impl<P: Scalar, N: Size> NativeExpand<Vector<P, N>>

Source

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.

Source

pub fn __expand_less_equal( scope: &Scope, this: &Self, 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.

Source§

impl<P: Scalar, N: Size> NativeExpand<Vector<P, N>>

Source

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.

Source

pub fn __expand_greater_equal( scope: &Scope, this: &Self, 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.

Source§

impl<N: Size> NativeExpand<Vector<bool, N>>

Source

pub fn __expand_vec_and_method( self, scope: &Scope, other: Self, ) -> <Vector<bool, N> as CubeType>::ExpandType

Return a new vector with the element-wise and of the vectors

Source

pub fn __expand_vec_and( scope: &Scope, this: Self, other: Self, ) -> <Vector<bool, N> as CubeType>::ExpandType

Return a new vector with the element-wise and of the vectors

Source§

impl<N: Size> NativeExpand<Vector<bool, N>>

Source

pub fn __expand_or_method( self, scope: &Scope, other: Self, ) -> <Vector<bool, N> as CubeType>::ExpandType

Return a new vector with the element-wise and of the vectors

Source

pub fn __expand_or( scope: &Scope, this: Self, other: Self, ) -> <Vector<bool, N> as CubeType>::ExpandType

Return a new vector with the element-wise and of the vectors

Source§

impl<P: CountOnes + Scalar, N: Size> NativeExpand<Vector<P, N>>

Source

pub fn __expand_count_ones_method( self, scope: &Scope, ) -> <Vector<u32, N> as CubeType>::ExpandType

Source

pub fn __expand_count_ones( scope: &Scope, this: Self, ) -> <Vector<u32, N> as CubeType>::ExpandType

Source§

impl<Inner: CubePrimitive<Scalar: Numeric>> NativeExpand<Atomic<Inner>>

Source

pub fn __expand_load_method( &self, scope: &Scope, ) -> <Inner as CubeType>::ExpandType

Load the value of the atomic.

Source

pub fn __expand_store_method( &self, scope: &Scope, value: <Inner as CubeType>::ExpandType, )

Store the value of the atomic.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn __expand_load( scope: &Scope, this: &Self, ) -> <Inner as CubeType>::ExpandType

Load the value of the atomic.

Source

pub fn __expand_store( scope: &Scope, this: &Self, value: <Inner as CubeType>::ExpandType, )

Store the value of the atomic.

Source

pub fn __expand_swap( scope: &Scope, this: &Self, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType

Atomically stores the value into the atomic and returns the old value.

Source

pub fn __expand_fetch_add( scope: &Scope, this: &Self, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType

Atomically add a number to the atomic variable. Returns the old value.

Source

pub fn __expand_fetch_sub( scope: &Scope, this: &Self, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType

Atomically subtracts a number from the atomic variable. Returns the old value.

Source

pub fn __expand_fetch_max( scope: &Scope, this: &Self, 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.

Source

pub fn __expand_fetch_min( scope: &Scope, this: &Self, 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.

Source§

impl<Inner: CubePrimitive<Scalar: Int>> NativeExpand<Atomic<Inner>>

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn __expand_compare_exchange_weak( scope: &Scope, this: &Self, 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.

Source

pub fn __expand_fetch_and( scope: &Scope, this: &Self, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType

Executes an atomic bitwise and operation on the atomic variable. Returns the old value.

Source

pub fn __expand_fetch_or( scope: &Scope, this: &Self, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType

Executes an atomic bitwise or operation on the atomic variable. Returns the old value.

Source

pub fn __expand_fetch_xor( scope: &Scope, this: &Self, value: <Inner as CubeType>::ExpandType, ) -> <Inner as CubeType>::ExpandType

Executes an atomic bitwise xor operation on the atomic variable. Returns the old value.

Source§

impl<T: ?Sized> NativeExpand<T>

Source

pub fn new(expand: Value) -> Self

Constructs a new NativeExpand.

Source§

impl<T: ?Sized> NativeExpand<T>

Source

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

Source

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

Source§

impl<T> NativeExpand<T>

Source§

impl<T: Scalar + Into<ConstantValue>> NativeExpand<T>

Source

pub fn from_lit(scope: &Scope, lit: T) -> Self

Create an NativeExpand from a value that is normally a literal.

Source

pub fn constant(&self) -> Option<ConstantValue>

Get the ConstantValue from the variable.

Source

pub fn __expand_into_lit_unchecked_method(self, _scope: &Scope) -> T

Source§

impl<E: Int> NativeExpand<E>

Trait Implementations§

Source§

impl<T: Abs + CubePrimitive> AbsExpand for NativeExpand<T>

Source§

fn __expand_abs_method(self, scope: &Scope) -> Self

Source§

impl<T: AddAssign + CubePrimitive> AddAssignExpand for NativeExpand<T>

Source§

fn __expand_add_assign_method(&mut self, scope: &Scope, rhs: Self)

Source§

impl<T: Add<Output = T> + CubePrimitive> AddExpand for NativeExpand<T>

Source§

fn __expand_add_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: CubeAnd + CubePrimitive> AndExpand for NativeExpand<T>

Source§

fn __expand_and_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: ArcCos + CubePrimitive> ArcCosExpand for NativeExpand<T>

Source§

fn __expand_acos_method(self, scope: &Scope) -> Self

Source§

impl<T: ArcCosh + CubePrimitive> ArcCoshExpand for NativeExpand<T>

Source§

fn __expand_acosh_method(self, scope: &Scope) -> Self

Source§

impl<T: ArcSin + CubePrimitive> ArcSinExpand for NativeExpand<T>

Source§

fn __expand_asin_method(self, scope: &Scope) -> Self

Source§

impl<T: ArcSinh + CubePrimitive> ArcSinhExpand for NativeExpand<T>

Source§

fn __expand_asinh_method(self, scope: &Scope) -> Self

Source§

impl<T: CubePrimitive + ArcTan2> ArcTan2Expand for NativeExpand<T>

Source§

fn __expand_atan2_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: ArcTan + CubePrimitive> ArcTanExpand for NativeExpand<T>

Source§

fn __expand_atan_method(self, scope: &Scope) -> Self

Source§

impl<T: ArcTanh + CubePrimitive> ArcTanhExpand for NativeExpand<T>

Source§

fn __expand_atanh_method(self, scope: &Scope) -> Self

Source§

impl AsMutExpand for NativeExpand<BarrierToken>

Source§

fn __expand_ref_mut_method(&mut self, _: &Scope) -> &mut Self

Source§

fn __expand_as_mut_method(&mut self, scope: &Scope) -> &mut T

Source§

impl<E> AsMutExpand for NativeExpand<Array<E>>

Source§

fn __expand_ref_mut_method(&mut self, _: &Scope) -> &mut Self

Source§

fn __expand_as_mut_method(&mut self, scope: &Scope) -> &mut T

Source§

impl<E: CubePrimitive> AsMutExpand for NativeExpand<Box<[E]>>

Source§

fn __expand_ref_mut_method(&mut self, _: &Scope) -> &mut Self

Source§

fn __expand_as_mut_method(&mut self, scope: &Scope) -> &mut T

Source§

impl<E: CubePrimitive, K: TensorMapKind> AsMutExpand for NativeExpand<TensorMap<E, K>>

Source§

fn __expand_ref_mut_method(&mut self, _: &Scope) -> &mut Self

Source§

fn __expand_as_mut_method(&mut self, scope: &Scope) -> &mut T

Source§

impl<T: CubePrimitive> AsMutExpand for NativeExpand<T>

Source§

fn __expand_ref_mut_method(&mut self, _scope: &Scope) -> &mut Self

Source§

fn __expand_as_mut_method(&mut self, scope: &Scope) -> &mut T

Source§

impl<T: ?Sized> AsRefExpand for NativeExpand<T>

Source§

fn __expand_ref_method(&self, _: &Scope) -> &Self

Source§

fn __expand_as_ref_method(&self, scope: &Scope) -> &T

Source§

impl<C: CubePrimitive> Assign for NativeExpand<Array<C>>

Source§

fn __expand_assign_method(&mut self, scope: &Scope, value: Self)

Assign value to self in scope.
Source§

impl<T: NativeAssign> Assign for NativeExpand<T>

Source§

fn __expand_assign_method(&mut self, scope: &Scope, value: Self)

Assign value to self in scope.
Source§

impl<T: CubePrimitive> Assign<NativeExpand<T>> for SharedExpand<T>

Source§

fn __expand_assign_method(&mut self, scope: &Scope, value: NativeExpand<T>)

Assign value to self in scope.
Source§

impl<T: BitAndAssign + CubePrimitive> BitAndAssignExpand for NativeExpand<T>

Source§

fn __expand_bitand_assign_method(&mut self, scope: &Scope, rhs: Self)

Source§

impl<T: BitAnd<Output = T> + CubePrimitive> BitAndExpand for NativeExpand<T>

Source§

fn __expand_bitand_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: BitOrAssign + CubePrimitive> BitOrAssignExpand for NativeExpand<T>

Source§

fn __expand_bitor_assign_method(&mut self, scope: &Scope, rhs: Self)

Source§

impl<T: BitOr<Output = T> + CubePrimitive> BitOrExpand for NativeExpand<T>

Source§

fn __expand_bitor_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: BitXorAssign + CubePrimitive> BitXorAssignExpand for NativeExpand<T>

Source§

fn __expand_bitxor_assign_method(&mut self, scope: &Scope, rhs: Self)

Source§

impl<T: BitXor<Output = T> + CubePrimitive> BitXorExpand for NativeExpand<T>

Source§

fn __expand_bitxor_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: Ceil + CubePrimitive> CeilExpand for NativeExpand<T>

Source§

fn __expand_ceil_method(self, scope: &Scope) -> Self

Source§

impl<T: Clone + ?Sized> Clone for NativeExpand<T>

Source§

fn clone(&self) -> NativeExpand<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Copy + ?Sized> Copy for NativeExpand<T>

Source§

impl<T: Cos + CubePrimitive> CosExpand for NativeExpand<T>

Source§

fn __expand_cos_method(self, scope: &Scope) -> Self

Source§

impl<T: Cosh + CubePrimitive> CoshExpand for NativeExpand<T>

Source§

fn __expand_cosh_method(self, scope: &Scope) -> Self

Source§

impl<T: CountOnes + CubePrimitive> CountOnesExpand for NativeExpand<T>

Source§

impl<T: ?Sized> CubeDebug for NativeExpand<T>

Source§

fn set_debug_name(&self, scope: &Scope, name: &'static str)

Set the debug name of this type’s expansion. Should do nothing for types that don’t appear at runtime
Source§

impl<T: CubePrimitive> CubePrimitiveExpand for NativeExpand<T>

Source§

impl<T: Debug + ?Sized> Debug for NativeExpand<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Degrees + CubePrimitive> DegreesExpand for NativeExpand<T>

Source§

fn __expand_to_degrees_method(self, scope: &Scope) -> Self

Source§

impl<T: CubePrimitive> Deref for NativeExpand<Array<T>>

Source§

type Target = NativeExpand<[T]>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<E> Deref for NativeExpand<Box<[E]>>

Source§

type Target = NativeExpand<[E]>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T: CubePrimitive> DerefExpand for NativeExpand<T>

Source§

impl<T: CubePrimitive> DerefMut for NativeExpand<Array<T>>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<E> DerefMut for NativeExpand<Box<[E]>>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<T: DivAssign + CubePrimitive> DivAssignExpand for NativeExpand<T>

Source§

fn __expand_div_assign_method(&mut self, scope: &Scope, rhs: Self)

Source§

impl<E: DivCeil> DivCeilExpand<E> for NativeExpand<E>

Source§

fn __expand_div_ceil_method( self, scope: &Scope, divisor: NativeExpand<E>, ) -> NativeExpand<E>

Source§

impl<T: Div<Output = T> + CubePrimitive> DivExpand for NativeExpand<T>

Source§

fn __expand_div_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: CubePrimitive + Dot> DotExpand for NativeExpand<T>

Source§

fn __expand_dot_method(self, scope: &Scope, rhs: Self) -> Self::Scalar

Source§

impl<T: Erf + CubePrimitive> ErfExpand for NativeExpand<T>

Source§

fn __expand_erf_method(self, scope: &Scope) -> Self

Source§

impl<T: Exp + CubePrimitive> ExpExpand for NativeExpand<T>

Source§

fn __expand_exp_method(self, scope: &Scope) -> Self

Source§

impl<T: ?Sized> ExpandTypeClone for NativeExpand<T>

Source§

fn clone_unchecked(&self) -> Self

Unchecked clone that only clones the conceptual runtime value. Should only be used in cases where each copy is used in a mutually exclusive branch (i.e. match, runtime enums). This is intentionally separated from Rust’s 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<T: Expm1 + CubePrimitive> Expm1Expand for NativeExpand<T>

Source§

fn __expand_exp_m1_method(self, scope: &Scope) -> Self

Source§

impl<T: FindFirstSet + CubePrimitive> FindFirstSetExpand for NativeExpand<T>

Source§

impl<F: FloatBits> FloatBitsExpand for NativeExpand<F>

Source§

impl<T: FloatOps + CubePrimitive> FloatOpsExpand for NativeExpand<T>

Source§

fn __expand_min_method(self, scope: &Scope, other: Self) -> Self

Source§

fn __expand_max_method(self, scope: &Scope, other: Self) -> Self

Source§

fn __expand_clamp_method(self, scope: &Scope, min: Self, max: Self) -> Self

Source§

impl<T: Floor + CubePrimitive> FloorExpand for NativeExpand<T>

Source§

fn __expand_floor_method(self, scope: &Scope) -> Self

Source§

impl<'a, E: CubePrimitive> From<&'a NativeExpand<Box<[E]>>> for &'a NativeExpand<[E]>

Source§

fn from(value: &'a NativeExpand<Box<[E]>>) -> Self

Converts to this type from the input type.
Source§

impl<'a, T: NativeCubeType + ?Sized> From<&'a NativeExpand<Shared<T>>> for &'a NativeExpand<T>

Source§

fn from(value: &'a SharedExpand<T>) -> Self

Converts to this type from the input type.
Source§

impl<'a, E: CubePrimitive> From<&'a mut NativeExpand<Box<[E]>>> for &'a mut NativeExpand<[E]>

Source§

fn from(value: &'a mut NativeExpand<Box<[E]>>) -> Self

Converts to this type from the input type.
Source§

impl<'a, T: NativeCubeType + ?Sized> From<&'a mut NativeExpand<Shared<T>>> for &'a mut NativeExpand<T>

Source§

fn from(value: &'a mut SharedExpand<T>) -> Self

Converts to this type from the input type.
Source§

impl<Marker: 'static> From<DynamicScalar<Marker>> for NativeExpand<DynamicScalar<Marker>>

Source§

fn from(value: DynamicScalar<Marker>) -> Self

Converts to this type from the input type.
Source§

impl From<NativeExpand<Shared<Barrier>>> for BarrierExpand

Source§

fn from(value: SharedExpand<Barrier>) -> Self

Converts to this type from the input type.
Source§

impl<T: ?Sized> From<NativeExpand<T>> for Value

Source§

fn from(value: NativeExpand<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: ?Sized> From<Value> for NativeExpand<T>

Source§

fn from(expand: Value) -> Self

Converts to this type from the input type.
Source§

impl From<bf16> for NativeExpand<bf16>

Source§

fn from(value: bf16) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for NativeExpand<bool>

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl From<e2m1> for NativeExpand<e2m1>

Source§

fn from(value: e2m1) -> Self

Converts to this type from the input type.
Source§

impl From<e2m1x2> for NativeExpand<e2m1x2>

Source§

fn from(value: e2m1x2) -> Self

Converts to this type from the input type.
Source§

impl From<e2m3> for NativeExpand<e2m3>

Source§

fn from(value: e2m3) -> Self

Converts to this type from the input type.
Source§

impl From<e3m2> for NativeExpand<e3m2>

Source§

fn from(value: e3m2) -> Self

Converts to this type from the input type.
Source§

impl From<e4m3> for NativeExpand<e4m3>

Source§

fn from(value: e4m3) -> Self

Converts to this type from the input type.
Source§

impl From<e5m2> for NativeExpand<e5m2>

Source§

fn from(value: e5m2) -> Self

Converts to this type from the input type.
Source§

impl From<f16> for NativeExpand<f16>

Source§

fn from(value: f16) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for NativeExpand<f32>

Source§

fn from(value: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for NativeExpand<f64>

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl From<flex32> for NativeExpand<flex32>

Source§

fn from(value: flex32) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for NativeExpand<i8>

Source§

fn from(value: i8) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for NativeExpand<i16>

Source§

fn from(value: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for NativeExpand<i32>

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for NativeExpand<i64>

Source§

fn from(value: i64) -> Self

Converts to this type from the input type.
Source§

impl From<isize> for NativeExpand<isize>

Source§

fn from(value: isize) -> Self

Converts to this type from the input type.
Source§

impl From<tf32> for NativeExpand<tf32>

Source§

fn from(value: tf32) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for NativeExpand<u8>

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for NativeExpand<u16>

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for NativeExpand<u32>

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for NativeExpand<u64>

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl From<ue8m0> for NativeExpand<ue8m0>

Source§

fn from(value: ue8m0) -> Self

Converts to this type from the input type.
Source§

impl From<usize> for NativeExpand<usize>

Source§

fn from(value: usize) -> Self

Converts to this type from the input type.
Source§

impl<T: CubePrimitive + Hypot> HypotExpand for NativeExpand<T>

Source§

fn __expand_hypot_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: CubeType> IndexExpand<NativeExpand<usize>> for SequenceExpand<T>

Source§

type Output = <T as CubeType>::ExpandType

Source§

fn __expand_index_method( &self, scope: &Scope, index: NativeExpand<usize>, ) -> &Self::Output

Source§

impl<E: CubePrimitive> IndexExpand<NativeExpand<usize>> for SliceExpand<E>

Source§

type Output = <E as CubeType>::ExpandType

Source§

fn __expand_index_method( &self, scope: &Scope, index: NativeExpand<usize>, ) -> &Self::Output

Source§

impl<E: CubePrimitive> IndexExpand<NativeExpand<usize>> for NativeExpand<Array<E>>

Source§

type Output = NativeExpand<E>

Source§

fn __expand_index_method( &self, scope: &Scope, index: NativeExpand<usize>, ) -> &Self::Output

Source§

impl<E: CubePrimitive> IndexExpand<NativeExpand<usize>> for TensorExpand<E>

Source§

type Output = NativeExpand<E>

Source§

fn __expand_index_method( &self, scope: &Scope, index: NativeExpand<usize>, ) -> &Self::Output

Source§

impl<E: CubePrimitive> IndexExpand<NativeExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

type Output = NativeExpand<E>

Source§

fn __expand_index_method( &self, scope: &Scope, index: NativeExpand<usize>, ) -> &Self::Output

Source§

impl<E: CubePrimitive> IndexExpand<RangeExpand<usize>> for NativeExpand<Array<E>>

Source§

impl<E: CubePrimitive> IndexExpand<RangeExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

impl<E: CubePrimitive> IndexExpand<RangeFromExpand<usize>> for NativeExpand<Array<E>>

Source§

impl<E: CubePrimitive> IndexExpand<RangeFromExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

impl<E: CubePrimitive> IndexExpand<RangeFullExpand> for NativeExpand<Array<E>>

Source§

impl<E: CubePrimitive> IndexExpand<RangeFullExpand> for NativeExpand<Shared<[E]>>

Source§

impl<E: CubePrimitive> IndexExpand<RangeInclusiveExpand<usize>> for NativeExpand<Array<E>>

Source§

impl<E: CubePrimitive> IndexExpand<RangeInclusiveExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

impl<E: CubePrimitive> IndexExpand<RangeToExpand<usize>> for NativeExpand<Array<E>>

Source§

impl<E: CubePrimitive> IndexExpand<RangeToExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

impl<E: CubePrimitive> IndexExpand<RangeToInclusiveExpand<usize>> for NativeExpand<Array<E>>

Source§

impl<E: CubePrimitive> IndexExpand<RangeToInclusiveExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

impl<T: CubeType> IndexMutExpand<NativeExpand<usize>> for SequenceExpand<T>

Source§

fn __expand_index_mut_method( &mut self, scope: &Scope, index: NativeExpand<usize>, ) -> &mut T::ExpandType

Source§

impl<E: CubePrimitive> IndexMutExpand<NativeExpand<usize>> for SliceExpand<E>

Source§

fn __expand_index_mut_method( &mut self, scope: &Scope, index: NativeExpand<usize>, ) -> &mut Self::Output

Source§

impl<E: CubePrimitive> IndexMutExpand<NativeExpand<usize>> for NativeExpand<Array<E>>

Source§

fn __expand_index_mut_method( &mut self, scope: &Scope, index: NativeExpand<usize>, ) -> &mut E::ExpandType

Source§

impl<E: CubePrimitive> IndexMutExpand<NativeExpand<usize>> for TensorExpand<E>

Source§

fn __expand_index_mut_method( &mut self, scope: &Scope, index: NativeExpand<usize>, ) -> &mut E::ExpandType

Source§

impl<E: CubePrimitive> IndexMutExpand<NativeExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

fn __expand_index_mut_method( &mut self, scope: &Scope, index: NativeExpand<usize>, ) -> &mut E::ExpandType

Source§

impl<E: CubePrimitive> IndexMutExpand<RangeExpand<usize>> for NativeExpand<Array<E>>

Source§

fn __expand_index_mut_method( &mut self, scope: &Scope, index: RangeExpand<usize>, ) -> &mut <Self as IndexExpand<RangeExpand<usize>>>::Output

Source§

impl<E: CubePrimitive> IndexMutExpand<RangeExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

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 NativeExpand<Array<E>>

Source§

impl<E: CubePrimitive> IndexMutExpand<RangeFromExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

impl<E: CubePrimitive> IndexMutExpand<RangeFullExpand> for NativeExpand<Array<E>>

Source§

fn __expand_index_mut_method( &mut self, scope: &Scope, index: RangeFullExpand, ) -> &mut <Self as IndexExpand<RangeFullExpand>>::Output

Source§

impl<E: CubePrimitive> IndexMutExpand<RangeFullExpand> for NativeExpand<Shared<[E]>>

Source§

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 NativeExpand<Array<E>>

Source§

impl<E: CubePrimitive> IndexMutExpand<RangeInclusiveExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

impl<E: CubePrimitive> IndexMutExpand<RangeToExpand<usize>> for NativeExpand<Array<E>>

Source§

fn __expand_index_mut_method( &mut self, scope: &Scope, index: RangeToExpand<usize>, ) -> &mut <Self as IndexExpand<RangeToExpand<usize>>>::Output

Source§

impl<E: CubePrimitive> IndexMutExpand<RangeToExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

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 NativeExpand<Array<E>>

Source§

impl<E: CubePrimitive> IndexMutExpand<RangeToInclusiveExpand<usize>> for NativeExpand<Shared<[E]>>

Source§

impl<P: Scalar + Into<NativeExpand<P>>, N: Size> Into<NativeExpand<Vector<P, N>>> for Vector<P, N>

Source§

fn into(self) -> NativeExpand<Self>

Converts this type into the (usually inferred) input type.
Source§

impl<T: ?Sized> IntoExpand for NativeExpand<T>

Source§

impl<C: CubeType> IntoMut for NativeExpand<Array<C>>

Source§

fn into_mut(self, _scope: &Scope) -> Self

Convert the variable into a potentially new mutable variable in scope, copying if needed.
Source§

impl<T: NativeCubeType + ?Sized> IntoMut for NativeExpand<Shared<T>>

Source§

fn into_mut(self, _scope: &Scope) -> Self

Convert the variable into a potentially new mutable variable in scope, copying if needed.
Source§

impl<E: CubePrimitive> IntoMut for NativeExpand<Box<[E]>>

Source§

fn into_mut(self, _scope: &Scope) -> Self

Convert the variable into a potentially new mutable variable in scope, copying if needed.
Source§

impl<E: CubePrimitive, K: TensorMapKind> IntoMut for NativeExpand<TensorMap<E, K>>

Source§

fn into_mut(self, _scope: &Scope) -> Self

Convert the variable into a potentially new mutable variable in scope, copying if needed.
Source§

impl<T: NativeAssign> IntoMut for NativeExpand<T>

Source§

fn into_mut(self, scope: &Scope) -> Self

Convert the variable into a potentially new mutable variable in scope, copying if needed.
Source§

impl<T: InverseSqrt + CubePrimitive> InverseSqrtExpand for NativeExpand<T>

Source§

impl<T: IsInf + CubePrimitive> IsInfExpand for NativeExpand<T>

Source§

impl<T: IsNan + CubePrimitive> IsNanExpand for NativeExpand<T>

Source§

impl<T: CubeIndex<usize> + SizedContainer<usize> + CubeType<ExpandType = NativeExpand<T>>> Iterable for NativeExpand<T>
where <T::Output as CubeType>::ExpandType: DerefExpand<Target = <T::Output as CubeType>::ExpandType>,

Source§

type Item = <<T as Index<usize>>::Output as CubeType>::ExpandType

Source§

fn expand(self, scope: &Scope, body: impl FnMut(&Scope, Self::Item))

Expand a runtime loop without unrolling Read more
Source§

fn expand_unroll(self, _scope: &Scope, _body: impl FnMut(&Scope, Self::Item))

Expand an unrolled loop. The body should be invoced n times, where n is the number of iterations. Read more
Source§

fn const_len(&self) -> Option<usize>

Return the comptime length of this iterable, if possible
Source§

impl<T: LeadingZeros + CubePrimitive> LeadingZerosExpand for NativeExpand<T>

Source§

impl<T: CubePrimitive> ListExpand<T> for NativeExpand<Array<T>>

Source§

impl<T: CubePrimitive> ListExpand<T> for NativeExpand<Shared<[T]>>

Source§

impl<T: Log1p + CubePrimitive> Log1pExpand for NativeExpand<T>

Source§

fn __expand_log1p_method(self, scope: &Scope) -> Self

Source§

impl<T: Log + CubePrimitive> LogExpand for NativeExpand<T>

Source§

fn __expand_ln_method(self, scope: &Scope) -> Self

Source§

impl<T: Magnitude + CubePrimitive> MagnitudeExpand for NativeExpand<T>

Source§

impl<T: CubePrimitive + ModFloor> ModFloorExpand for NativeExpand<T>

Source§

fn __expand_mod_floor_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: MulAssign + CubePrimitive> MulAssignExpand for NativeExpand<T>

Source§

fn __expand_mul_assign_method(&mut self, scope: &Scope, rhs: Self)

Source§

impl<T: Mul<Output = T> + CubePrimitive> MulExpand for NativeExpand<T>

Source§

fn __expand_mul_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: CubePrimitive + MulHi> MulHiExpand for NativeExpand<T>

Source§

fn __expand_mul_hi_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: Neg<Output = T> + CubePrimitive> NegExpand for NativeExpand<T>

Source§

fn __expand_neg_method(self, scope: &Scope) -> Self

Source§

impl<T: Normalize + CubePrimitive> NormalizeExpand for NativeExpand<T>

Source§

fn __expand_normalize_method(self, scope: &Scope) -> Self

Source§

impl<T: CubeNot + CubePrimitive> NotExpand for NativeExpand<T>

Source§

fn __expand_not_method(self, scope: &Scope) -> Self

Source§

impl<T: CubeOr + CubePrimitive> OrExpand for NativeExpand<T>

Source§

fn __expand_or_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: Ord + CubePrimitive> OrdExpand for NativeExpand<T>

Source§

fn __expand_cmp_method(&self, scope: &Scope, rhs: &Self) -> OrderingExpand

Source§

fn __expand_min_method(self, scope: &Scope, rhs: Self) -> Self

Source§

fn __expand_max_method(self, scope: &Scope, rhs: Self) -> Self

Source§

fn __expand_clamp_method(self, scope: &Scope, min: Self, max: Self) -> Self

Source§

impl<T: PartialEq + CubePrimitive> PartialEqExpand for NativeExpand<T>

Source§

fn __expand_eq_method(&self, scope: &Scope, rhs: &Self) -> NativeExpand<bool>

Source§

fn __expand_ne_method(&self, scope: &Scope, rhs: &Self) -> NativeExpand<bool>

Source§

impl<T: PartialOrd + CubePrimitive> PartialOrdExpand for NativeExpand<T>

Source§

fn __expand_partial_cmp_method( &self, scope: &Scope, rhs: &Self, ) -> OptionExpand<Ordering>

Source§

fn __expand_lt_method(&self, scope: &Scope, rhs: &Self) -> NativeExpand<bool>

Source§

fn __expand_le_method(&self, scope: &Scope, rhs: &Self) -> NativeExpand<bool>

Source§

fn __expand_gt_method(&self, scope: &Scope, rhs: &Self) -> NativeExpand<bool>

Source§

fn __expand_ge_method(&self, scope: &Scope, rhs: &Self) -> NativeExpand<bool>

Source§

impl<T: CubePrimitive + Powf> PowfExpand for NativeExpand<T>

Source§

fn __expand_powf_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<Rhs: CubePrimitive, T: CubePrimitive + Powi<Rhs>> PowiExpand<Rhs> for NativeExpand<T>

Source§

fn __expand_powi_method(self, scope: &Scope, rhs: NativeExpand<Rhs>) -> Self

Source§

impl<T: Radians + CubePrimitive> RadiansExpand for NativeExpand<T>

Source§

fn __expand_to_radians_method(self, scope: &Scope) -> Self

Source§

impl<T: Recip + CubePrimitive> RecipExpand for NativeExpand<T>

Source§

fn __expand_recip_method(self, scope: &Scope) -> Self

Source§

impl<T: RemAssign + CubePrimitive> RemAssignExpand for NativeExpand<T>

Source§

fn __expand_rem_assign_method(&mut self, scope: &Scope, rhs: Self)

Source§

impl<T: Rem<Output = T> + CubePrimitive> RemExpand for NativeExpand<T>

Source§

fn __expand_rem_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: ReverseBits + CubePrimitive> ReverseBitsExpand for NativeExpand<T>

Source§

impl<T: CubePrimitive + Rhypot> RhypotExpand for NativeExpand<T>

Source§

fn __expand_rhypot_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: Round + CubePrimitive> RoundExpand for NativeExpand<T>

Source§

fn __expand_round_method(self, scope: &Scope) -> Self

Source§

impl<C: CubePrimitive> RuntimeAssign for NativeExpand<Array<C>>

Source§

fn init_mut(&self, scope: &Scope) -> Self::Expand

Create a new mutable variable of this type in scope.
Source§

impl<T: NativeAssign> RuntimeAssign for NativeExpand<T>

Source§

fn init_mut(&self, scope: &Scope) -> Self::Expand

Create a new mutable variable of this type in scope.
Source§

impl<T: CubePrimitive> RuntimeAssign<NativeExpand<T>> for SharedExpand<T>

Source§

fn init_mut(&self, scope: &Scope) -> Self::Expand

Create a new mutable variable of this type in scope.
Source§

impl<T: CubePrimitive + SaturatingAdd> SaturatingAddExpand for NativeExpand<T>

Source§

fn __expand_saturating_add_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: CubePrimitive + SaturatingSub> SaturatingSubExpand for NativeExpand<T>

Source§

fn __expand_saturating_sub_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: ShlAssign + CubePrimitive> ShlAssignExpand for NativeExpand<T>

Source§

fn __expand_shl_assign_method(&mut self, scope: &Scope, rhs: Self)

Source§

impl<T: Shl<Output = T> + CubePrimitive> ShlExpand for NativeExpand<T>

Source§

fn __expand_shl_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: ShrAssign + CubePrimitive> ShrAssignExpand for NativeExpand<T>

Source§

fn __expand_shr_assign_method(&mut self, scope: &Scope, rhs: Self)

Source§

impl<T: Shr<Output = T> + CubePrimitive> ShrExpand for NativeExpand<T>

Source§

fn __expand_shr_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: Sin + CubePrimitive> SinExpand for NativeExpand<T>

Source§

fn __expand_sin_method(self, scope: &Scope) -> Self

Source§

impl<T: Sinh + CubePrimitive> SinhExpand for NativeExpand<T>

Source§

fn __expand_sinh_method(self, scope: &Scope) -> Self

Source§

impl<T: CubePrimitive> SizedContainerExpand<usize> for NativeExpand<Array<T>>

Source§

impl<T: Sqrt + CubePrimitive> SqrtExpand for NativeExpand<T>

Source§

fn __expand_sqrt_method(self, scope: &Scope) -> Self

Source§

impl<T: SubAssign + CubePrimitive> SubAssignExpand for NativeExpand<T>

Source§

fn __expand_sub_assign_method(&mut self, scope: &Scope, rhs: Self)

Source§

impl<T: Sub<Output = T> + CubePrimitive> SubExpand for NativeExpand<T>

Source§

fn __expand_sub_method(self, scope: &Scope, rhs: Self) -> Self

Source§

impl<T: Tan + CubePrimitive> TanExpand for NativeExpand<T>

Source§

fn __expand_tan_method(self, scope: &Scope) -> Self

Source§

impl<T: Tanh + CubePrimitive> TanhExpand for NativeExpand<T>

Source§

fn __expand_tanh_method(self, scope: &Scope) -> Self

Source§

impl<T: TrailingZeros + CubePrimitive> TrailingZerosExpand for NativeExpand<T>

Source§

impl<T: Trunc + CubePrimitive> TruncExpand for NativeExpand<T>

Source§

fn __expand_trunc_method(self, scope: &Scope) -> Self

Source§

impl<T: VectorSum + CubePrimitive> VectorSumExpand for NativeExpand<T>

Source§

impl<T: CubePrimitive> VectorizedExpand for NativeExpand<Array<T>>

Source§

impl<T: CubePrimitive> VectorizedExpand for NativeExpand<Shared<[T]>>

Source§

impl<E: CubePrimitive> VectorizedExpand for NativeExpand<Box<[E]>>

Source§

impl<E: CubePrimitive, K: TensorMapKind> VectorizedExpand for NativeExpand<TensorMap<E, K>>

Auto Trait Implementations§

§

impl<T> Freeze for NativeExpand<T>
where T: ?Sized,

§

impl<T> RefUnwindSafe for NativeExpand<T>
where T: RefUnwindSafe + ?Sized,

§

impl<T> Send for NativeExpand<T>
where T: Send + ?Sized,

§

impl<T> Sync for NativeExpand<T>
where T: Sync + ?Sized,

§

impl<T> Unpin for NativeExpand<T>
where T: Unpin + ?Sized,

§

impl<T> UnsafeUnpin for NativeExpand<T>
where T: ?Sized,

§

impl<T> UnwindSafe for NativeExpand<T>
where T: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneExpand for T
where T: Clone,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<R> CryptoRng for R
where R: TryCryptoRng<Error = Infallible> + ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoComptime for T

Source§

fn comptime(self) -> Self

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<R> Rng for R
where R: TryRng<Error = Infallible> + ?Sized,

Source§

fn next_u32(&mut self) -> u32

Return the next random u32.
Source§

fn next_u64(&mut self) -> u64

Return the next random u64.
Source§

fn fill_bytes(&mut self, dst: &mut [u8])

Fill dest with random data. Read more
Source§

impl<R> RngCore for R
where R: Rng,

Source§

impl<R> RngExt for R
where R: Rng + ?Sized,

Source§

fn random<T>(&mut self) -> T

Return a random value via the StandardUniform distribution. Read more
Source§

fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>

Return an iterator over random variates Read more
Source§

fn random_range<T, R>(&mut self, range: R) -> T
where T: SampleUniform, R: SampleRange<T>,

Generate a random value in the given range. Read more
Source§

fn random_bool(&mut self, p: f64) -> bool

Return a bool with a probability p of being true. Read more
Source§

fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool

Return a bool with a probability of numerator/denominator of being true. Read more
Source§

fn sample<T, D>(&mut self, distr: D) -> T
where D: Distribution<T>,

Sample a new value, using the given distribution. Read more
Source§

fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>
where D: Distribution<T>, Self: Sized,

Create an iterator that generates values using the given distribution. Read more
Source§

fn fill<T>(&mut self, dest: &mut [T])
where T: Fill,

Fill any type implementing Fill with random data Read more
Source§

impl<E, T> SliceOperatorExpand<E> for T
where E: CubePrimitive, T: Deref<Target = NativeExpand<[E]>> + DerefMut,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<R> TryCryptoRng for R
where R: DerefMut, <R as Deref>::Target: TryCryptoRng,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<R> TryRng for R
where R: DerefMut, <R as Deref>::Target: TryRng,

Source§

type Error = <<R as Deref>::Target as TryRng>::Error

The type returned in the event of a RNG error. Read more
Source§

fn try_next_u32(&mut self) -> Result<u32, <R as TryRng>::Error>

Return the next random u32.
Source§

fn try_next_u64(&mut self) -> Result<u64, <R as TryRng>::Error>

Return the next random u64.
Source§

fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), <R as TryRng>::Error>

Fill dst entirely with random data.
Source§

impl<R> TryRngCore for R
where R: TryRng,

Source§

type Error = <R as TryRng>::Error

👎Deprecated since 0.10.0:

use TryRng instead

Error type.
Source§

impl<T> TuneInputs for T
where T: Clone + Send + Sync + 'static,

Source§

type At<'a> = T

The concrete input type at lifetime 'a.