pub struct HipServer { /* private fields */ }Trait Implementations§
Source§impl ComputeServer for HipServer
impl ComputeServer for HipServer
Source§type Kernel = Box<dyn CubeTask<CppCompiler<Hip>>>
type Kernel = Box<dyn CubeTask<CppCompiler<Hip>>>
The kernel type defines the computation algorithms.
Source§type Storage = HipStorage
type Storage = HipStorage
The storage type defines how data is stored and accessed.
Source§fn read(&mut self, binding: Binding) -> impl Future<Output = Vec<u8>> + 'static
fn read(&mut self, binding: Binding) -> impl Future<Output = Vec<u8>> + 'static
Given a handle, returns the owned resource as bytes.
Source§fn memory_usage(&self) -> MemoryUsage
fn memory_usage(&self) -> MemoryUsage
The current memory usage of the server.
Source§fn create(&mut self, data: &[u8]) -> Handle
fn create(&mut self, data: &[u8]) -> Handle
Given a resource as bytes, stores it and returns the memory handle.
Source§fn empty(&mut self, size: usize) -> Handle
fn empty(&mut self, size: usize) -> Handle
Reserves
size bytes in the storage, and returns a handle over them.Source§unsafe fn execute(
&mut self,
kernel: Self::Kernel,
count: CubeCount,
bindings: Vec<Binding>,
mode: ExecutionMode,
)
unsafe fn execute( &mut self, kernel: Self::Kernel, count: CubeCount, bindings: Vec<Binding>, mode: ExecutionMode, )
Source§fn sync(&mut self) -> impl Future<Output = ()> + 'static
fn sync(&mut self) -> impl Future<Output = ()> + 'static
Wait for the completion of every task in the server.
Source§fn sync_elapsed(&mut self) -> impl Future<Output = TimestampsResult> + 'static
fn sync_elapsed(&mut self) -> impl Future<Output = TimestampsResult> + 'static
Wait for the completion of every task in the server. Read more
Source§fn get_resource(&mut self, binding: Binding) -> BindingResource<Self>
fn get_resource(&mut self, binding: Binding) -> BindingResource<Self>
Given a resource handle, returns the storage resource.
Source§fn enable_timestamps(&mut self)
fn enable_timestamps(&mut self)
Enable collecting timestamps.
Source§fn disable_timestamps(&mut self)
fn disable_timestamps(&mut self)
Disable collecting timestamps.
impl Send for HipServer
Auto Trait Implementations§
impl Freeze for HipServer
impl !RefUnwindSafe for HipServer
impl !Sync for HipServer
impl Unpin for HipServer
impl !UnwindSafe for HipServer
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
Mutably borrows from an owned value. Read more