pub struct DeviceVariable<T: DeviceCopy> { /* private fields */ }
Expand description

Wrapper around a variable on the host and a DeviceBox holding the variable on the device, allowing for easy synchronization and storage.

Implementations

Create a new DeviceVariable wrapping var.

Allocates storage on the device and copies var to the device.

Copy the host copy of the variable to the device

Copy the device copy of the variable to the host

Trait Implementations

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Get the raw cuda device pointer

Get the size of the memory region in bytes

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

Performs the conversion.

Performs the conversion.

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.