(->device item)
Generically get a device from a thing
Generically get a device from a thing
(->driver item)
Generically get a driver from a thing
Generically get a driver from a thing
(->stream item)
Generically get a stream from a thing
Generically get a stream from a thing
(allocate-device-buffer device elem-count elem-type & {:as options})
Allocate a device buffer. This is the generic unit of data storage used for computation. No options at this time.
Allocate a device buffer. This is the generic unit of data storage used for computation. No options at this time.
(allocate-host-buffer
driver
elem-count
elem-type
&
{:keys [usage-type] :or {usage-type :one-time} :as options})
Allocate a host buffer. Usage type gives a hint as to the intended usage of the buffer.
Allocate a host buffer. Usage type gives a hint as to the intended usage of the buffer.
(copy-device->device dev-a
dev-a-off
dev-b
dev-b-off
elem-count
&
{:keys [stream]})
Copy from one device to another. If no stream is provided then the destination buffer's device's default stream is used.
Copy from one device to another. If no stream is provided then the destination buffer's device's default stream is used.
(copy-device->host device-buffer
device-offset
host-buffer
host-offset
elem-count
&
{:keys [stream]})
Copy from one device to another. If no stream is provided then the source device buffer's device's default stream is used.
Copy from one device to another. If no stream is provided then the source device buffer's device's default stream is used.
(copy-host->device host-buffer
host-offset
device-buffer
device-offset
elem-count
&
{:keys [stream]})
Copy from one device to another. If no stream is provided then the destination buffer's device's default stream is used.
Copy from one device to another. If no stream is provided then the destination buffer's device's default stream is used.
(copy-host-data->device-buffer
stream
upload-ary
&
{:keys [datatype] :or {datatype (dtype/get-datatype upload-ary)} :as options})
Robustly and synchronously make a device buffer with these elements in it.
Robustly and synchronously make a device buffer with these elements in it. 1. Make host buffer of correct size. 2. Make device buffer of correct size. 3. Copy ary data into host buffer. 4. Copy host buffer into device buffer. 5. Wait until operation completes. 6. Release the host buffer. 7. Return device buffer.
(create-stream device)
Create a stream of execution. Streams are indepenent threads of execution. They can be synchronized with each other and the main thread using events.
Create a stream of execution. Streams are indepenent threads of execution. They can be synchronized with each other and the main thread using events.
(default-stream device)
All devices must have a default stream whether they support create or not.
All devices must have a default stream whether they support create or not.
(device-buffer->host-buffer
stream
device-buffer
&
{:keys [usage-type] :or {usage-type :one-time} :as options})
Robustly and synchronously make a device buffer with these elements in it.
Robustly and synchronously make a device buffer with these elements in it. 1. Make host buffer of correct size. 2. Copy device buffer into host buffer. 3. Wait until operation completes. 4. Return host buffer.
(driver driver-name)
Do a registry lookup to find a driver by its name.
Do a registry lookup to find a driver by its name.
(driver-names)
Get the names of the registered drivers.
Get the names of the registered drivers.
(supports-create-stream? device)
Does this device support create-stream?
Does this device support create-stream?
(sync-with-host)
(sync-with-host stream)
Block host until stream's queue is finished executing
Block host until stream's queue is finished executing
(sync-with-stream src-stream dst-stream & [options])
Create an event in src-stream's execution queue, then have dst stream wait on that event. This allows dst-stream to ensure src-stream has reached a certain point of execution before continuing. Both streams must be of the same driver.
Create an event in src-stream's execution queue, then have dst stream wait on that event. This allows dst-stream to ensure src-stream has reached a certain point of execution before continuing. Both streams must be of the same driver.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close