#[repr(C)]
pub struct LaunchablePtr<T>(_);
Expand description

A pointer to immutable memory that can be dereferenced on the GPU.

LaunchablePtr is intended to be passed as an argument to a CUDA kernel function. For example, it can be passed to RUSTACuda’s launch!() macro.

LaunchablePtr must not be dereferenced on the CPU, as it may point to device memory.

LaunchablePtr is guaranteed to have an equivalent internal representation to a raw pointer. Thus, it can be safely reinterpreted or transmuted to *const T.

Implementations

Creates a null launchable pointer.

Cast internal pointer to void pointer.

Calculates the offset from a pointer

Trait Implementations

Implement Clone trait to support cloning std::ffi::c_void pointers. c_void doesn’t implement Clone, thus can’t be derived automatically.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.