[][src]Function emu_core::pool::assert_device_pool_initialized

pub async fn assert_device_pool_initialized()

Asserts that the device pool has been initialized

This must be the first thing you call before using Emu for anything. The only thing you might call before this is pool if you are manually setting the pool of devices. You can call this as many times as you like. If no custom pool has be set with pool, this will go ahead and initialize all detected devices and add them to the pool.

This function is asynchronous so you must pass the future it returns to an executor like so.


So if you are an application, definitely call this before you use Emu do anything on a GPU device. If you are a library, definitely make sure that you call this before every possible first time that you use Emu. You don't have to call it before every API call of course - just before every time when it's possible that this is the first time you are using Emu.