Liking cljdoc? Tell your friends :D

tech.datatype

Generalized efficient manipulations of sequences of primitive datatype. Includes specializations for java arrays and nio buffers. There are specializations to allow implementations to provide efficient full typed copy functions when the types can be ascertained. Usually this involves a double-dispatch on both the src and dest arguments:

https://en.wikipedia.org/wiki/Double_dispatch.

Generic operations include:

  1. datatype of this sequence.
  2. Writing to, reading from.
  3. Construction.
  4. Efficient mutable copy from one sequence to another.
Generalized efficient manipulations of sequences of primitive datatype.  Includes
specializations for java arrays and nio buffers.  There are specializations to allow
implementations to provide efficient full typed copy functions when the types can be
ascertained.  Usually this involves a double-dispatch on both the src and dest
arguments:

https://en.wikipedia.org/wiki/Double_dispatch.

Generic operations include:
1. datatype of this sequence.
2. Writing to, reading from.
3. Construction.
4. Efficient mutable copy from one sequence to another.
raw docstring

->arrayclj

(->array item)

Returns nil of item does not share a backing store with an array.

Returns nil of item does not share a backing store with an array.
sourceraw docstring

->array-copyclj

(->array-copy item)

Copy the data into an array that can correctly hold the datatype. This array may not have the same datatype as the source item

Copy the data into an array that can correctly hold the datatype.  This
array may not have the same datatype as the source item
sourceraw docstring

->buffer-backing-storeclj

(->buffer-backing-store src-ary)

Convert to nio buffer that stores the data for the object. This may have a different datatype than the object, so for instance the backing store for the uint8 datatype is a nio buffer of type int8.

Convert to nio buffer that stores the data for the object.  This may have
a different datatype than the object, so for instance the backing store for
the uint8 datatype is a nio buffer of type int8.
sourceraw docstring

->typed-bufferclj

(->typed-buffer item & {:keys [datatype]})

Conversion of a thing to a typed buffer

Conversion of a thing to a typed buffer
sourceraw docstring

->vectorclj

(->vector item)

Conversion to persistent vector

Conversion to persistent vector
sourceraw docstring

add-cast-fnclj

(add-cast-fn datatype cast-fn)
source

add-container-conversion-fnclj

(add-container-conversion-fn src-container-type dst-container-type convert-fn)

Add a container->container conversion. Function takes a dst-datatype and the src-container and returns a tuple of [result-container result-offset].

Add a container->container conversion.  Function takes a dst-datatype and the src-container
and returns a tuple of [result-container result-offset].
sourceraw docstring

add-copy-operationclj

(add-copy-operation src-container-type
                    dst-container-type
                    src-dtype
                    dst-dtype
                    unchecked?
                    copy-fn)

Add a new copy operation. Note that this is a single point in a 5 dimensional space of operations.

Add a new copy operation.  Note that this is a single point in a 5 dimensional space
of operations.
sourceraw docstring

add-datatype->size-mappingclj

(add-datatype->size-mapping datatype byte-size)
source

add-unchecked-cast-fnclj

(add-unchecked-cast-fn datatype cast-fn)
source

castclj

(cast value datatype)
source

cloneclj

(clone item & {:keys [datatype]})
source

container-typeclj

(container-type item)
source

copy!clj

(copy! src dst)
(copy! src src-offset dst dst-offset n-elems)
(copy! src src-offset dst dst-offset n-elems options)
source

copy-raw->item!clj

(copy-raw->item! raw-data ary-target target-offset)
(copy-raw->item! raw-data ary-target target-offset options)

Copy raw data into an array. Returns a tuple of [ary-target result-offset-after-copy]

Copy raw data into an array.  Returns a tuple of
[ary-target result-offset-after-copy]
sourceraw docstring

datatype->byte-sizeclj

(datatype->byte-size datatype)
source

ecountclj

(ecount item)

Type hinted ecount so numeric expressions run faster. Calls clojure.core.matrix/ecount.

Type hinted ecount so numeric expressions run faster.
Calls clojure.core.matrix/ecount.
sourceraw docstring

from-prototypeclj

(from-prototype item & {:keys [datatype shape]})
source

get-datatypeclj

(get-datatype item)
source

get-valueclj

(get-value item offset)
source

make-array-of-typeclj

(make-array-of-type datatype elem-count-or-seq & [options])
source

make-buffer-of-typeclj

(make-buffer-of-type datatype elem-count-or-seq & [options])
source

make-typed-bufferclj

(make-typed-buffer datatype elem-count-or-seq & [options])

Support for unsigned datatypes comes via the typed buffer mechanism

Support for unsigned datatypes comes via the typed buffer mechanism
sourceraw docstring

set-constant!clj

(set-constant! item offset value elem-count)
source

set-value!clj

(set-value! item offset value)
source

shapeclj

(shape item)

m/shape with fallback to m/ecount if m/shape is not available.

m/shape with fallback to m/ecount if m/shape is not available.
sourceraw docstring

shape->ecountclj

(shape->ecount shape-or-num)
source

unchecked-castclj

(unchecked-cast value datatype)
source

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

× close