Liking cljdoc? Tell your friends :D

tech.compute


->deviceclj

(->device item)

Generically get a device from a thing

Generically get a device from a thing
sourceraw docstring

->driverclj

(->driver item)

Generically get a driver from a thing

Generically get a driver from a thing
sourceraw docstring

->streamclj

(->stream item)

Generically get a stream from a thing

Generically get a stream from a thing
sourceraw docstring

alias?clj

(alias? lhs-dev-buffer rhs-dev-buffer)

Do these two buffers alias each other? Meaning do they start at the same address and overlap completely?

Do these two buffers alias each other?  Meaning do they start at the same address and
overlap completely?
sourceraw docstring

allocate-device-bufferclj

(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.
sourceraw docstring

allocate-host-bufferclj

(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.
sourceraw docstring

copy-device->deviceclj

(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.
sourceraw docstring

copy-device->hostclj

(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.
sourceraw docstring

copy-host->deviceclj

(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.
sourceraw docstring

copy-host-data->device-bufferclj

(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.

  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.
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.
sourceraw docstring

create-streamclj

(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.
sourceraw docstring

default-deviceclj

(default-device driver)
source

default-streamclj

(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.
sourceraw docstring

device->device-copy-compatible?clj

(device->device-copy-compatible? src-device dst-device)
source

device-buffer->host-bufferclj

(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.

  1. Make host buffer of correct size.
  2. Copy device buffer into host buffer.
  3. Wait until operation completes.
  4. Return host buffer.
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.
sourceraw docstring

driverclj

(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.
sourceraw docstring

driver-nameclj

(driver-name driver)
source

driver-namesclj

(driver-names)

Get the names of the registered drivers.

Get the names of the registered drivers.
sourceraw docstring

get-devicesclj

(get-devices driver)
source

memory-infoclj

(memory-info device)

Get a map of {:free <long> :total <long>} describing the free and total memory in bytes.

Get a map of {:free <long> :total <long>} describing the free and total memory in bytes.
sourceraw docstring

partially-alias?clj

(partially-alias? lhs-dev-buffer rhs-dev-buffer)

Do these two buffers partially alias each other? Does some sub-range of their data overlap?

Do these two buffers partially alias each other?  Does some sub-range of their data
overlap?
sourceraw docstring

sub-bufferclj

(sub-buffer buffer offset)
(sub-buffer device-buffer offset length)

Create a sub buffer that shares the backing store with the main buffer.

Create a sub buffer that shares the backing store with the main buffer.
sourceraw docstring

supports-create-stream?clj

(supports-create-stream? device)

Does this device support create-stream?

Does this device support create-stream?
sourceraw docstring

sync-with-hostclj

(sync-with-host stream & [options])

Block host until stream's queue is finished executing

Block host until stream's queue is finished executing
sourceraw docstring

sync-with-streamclj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close