dtype-next Buffered Image Support
+ gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.120
dtype-next Buffered Image Support
dtype-next
contains support for loading/saving buffered images
and creating tensors from buffered images.
Usage
diff --git a/docs/cheatsheet.html b/docs/cheatsheet.html index c8261069..bfbc5272 100644 --- a/docs/cheatsheet.html +++ b/docs/cheatsheet.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.119
dtype-next Cheatsheet
+ gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.120
dtype-next Cheatsheet
The old cheatsheet has been moved to overview.
Most of these functions are accessible via the [tech.v3.datatype :as dtype]
namespace. When another namespace is required, it is specified separately.
Generated by Codox with RDash UI theme
DType Next 10.119
Why dtype-next?
+ gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.120
Why dtype-next?
tech.datatype
tech.datatype as a numerics stack fulfills our technical needs at TechAscent in regards to scientific computing, data science, and machine learning. It enables a completely diff --git a/docs/dimensions-bytecode-gen.html b/docs/dimensions-bytecode-gen.html index d9245d4c..488c9a31 100644 --- a/docs/dimensions-bytecode-gen.html +++ b/docs/dimensions-bytecode-gen.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.119
dtype-next Tensor Dimensions and Bytecode Generation
+ gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.120
dtype-next Tensor Dimensions and Bytecode Generation
dtype-next uses a dimensions operator in order to transform nd
space to a linear
address space. We no longer compile in bytecode address operator generation by
default as it takes a bit longer to load and most users won't see any benefit as
diff --git a/docs/index.html b/docs/index.html
index 83b28d8f..2b290264 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1,10 +1,10 @@
-
Generated by Codox with RDash UI theme
DType Next 10.119
DType Next 10.119
High Performance Clojure Primitives.
Topics
- dtype-next Buffered Image Support
- dtype-next Cheatsheet
- Why dtype-next?
- dtype-next Tensor Dimensions and Bytecode Generation
- dtype-next Overview
Namespaces
tech.v3.datatype
Base namespace for container creation and elementwise access of data
+ gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.120
DType Next 10.120
High Performance Clojure Primitives.
Topics
- dtype-next Buffered Image Support
- dtype-next Cheatsheet
- Why dtype-next?
- dtype-next Tensor Dimensions and Bytecode Generation
- dtype-next Overview
Namespaces
tech.v3.datatype
Base namespace for container creation and elementwise access of data
Public variables and functions:
- ->array
- ->array-buffer
- ->buffer
- ->byte-array
- ->char-array
- ->double-array
- ->float-array
- ->int-array
- ->iterable
- ->long-array
- ->native-buffer
- ->reader
- ->short-array
- ->vector
- ->writer
- alloc-uninitialized
- alloc-zeros
- arg-type
- as-array-buffer
- as-array-buffer-data
- as-buffer
- as-concrete-buffer
- as-native-buffer
- as-native-buffer-data
- as-nd-buffer-descriptor
- as-reader
- as-roaring-bitmap
- as-writer
- cast
- clone
- clone-native
- coalesce!
- coalesce-blocks!
- concat-buffers
- const-reader
- copy!
- copy-raw->item!
- datatype
- ecount
- elemwise-cast
- elemwise-datatype
- emap
- ensure-native
- ensure-reader
- ensure-serializeable
- export-symbols
- get-datatype
- get-value
- indexed-buffer
- iterable?
- make-container
- make-list
- make-reader
- make-reader-fn
- malloc
- prealloc-list
- reader-like?
- reader?
- reverse
- set-constant!
- set-datatype
- set-native-datatype
- set-value!
- shape
- sub-buffer
- unchecked-cast
- vectorized-dispatch-1
- vectorized-dispatch-2
- writer?
tech.v3.datatype.argops
Efficient functions for operating in index space. Take-off of the argsort, argmin, etc. type functions from Matlab. These functions generally only work on readers and all return some version of an index or list of indexes.
@@ -19,7 +19,7 @@Public variables and functions:
- between
- datetime->epoch
- datetime->milliseconds
- datetime-datatype?
- days-since-epoch->local-date
- duration
- duration->milliseconds
- duration->nanoseconds
- duration-datatype?
- epoch->datetime
- epoch-days->epoch-months
- epoch-months->epoch-days
- epoch-months->local-date
- instant
- instant->local-date-time
- instant->microseconds-since-epoch
- instant->milliseconds-since-epoch
- instant->seconds-since-epoch
- instant->zoned-date-time
- local-date
- local-date->days-since-epoch
- local-date->epoch-months
- local-date->instant
- local-date->local-date-time
- local-date->milliseconds-since-epoch
- local-date->zoned-date-time
- local-date-time
- local-date-time->instant
- local-date-time->local-date
- local-date-time->local-time
- local-date-time->milliseconds-since-epoch
- local-date-time->zoned-date-time
- local-time
- local-time->instant
- local-time->local-date-time
- local-time->milliseconds
- local-time->seconds
- long-temporal-field
- microseconds-since-epoch->instant
- millisecond-descriptive-statistics
- milliseconds->datetime
- milliseconds->duration
- milliseconds->local-time
- milliseconds-in-day
- milliseconds-in-hour
- milliseconds-in-minute
- milliseconds-in-second
- milliseconds-in-week
- milliseconds-since-epoch->instant
- milliseconds-since-epoch->local-date
- milliseconds-since-epoch->local-date-time
- milliseconds-since-epoch->local-time
- milliseconds-since-epoch->zoned-date-time
- minus-temporal-amount
- nanoseconds->duration
- nanoseconds-in-day
- nanoseconds-in-hour
- nanoseconds-in-millisecond
- nanoseconds-in-minute
- nanoseconds-in-second
- nanoseconds-in-week
- plus-temporal-amount
- seconds->local-time
- seconds-in-day
- seconds-in-hour
- seconds-in-minute
- seconds-since-epoch->instant
- system-zone-id
- system-zone-offset
- utc-zone-id
- utc-zone-offset
- variable-rolling-window-ranges
- zoned-date-time
- zoned-date-time->instant
- zoned-date-time->milliseconds-since-epoch
tech.v3.datatype.errors
Generic, basic error handling. No dependencies aside from apache commons math for NAN exception.
Public variables and functions:
tech.v3.datatype.ffi
Generalized C Foreign Function Interface (FFI) that unifies JNA and JDK-16 FFI architectures.
-Public variables and functions:
- c->string
- clear-string->c-stats!
- define-foreign-interface
- define-library
- define-library!
- define-library-functions
- define-library-interface
- enable-string->c-stats!
- find-library
- find-symbol
- foreign-interface-instance->c
- if-class
- instantiate-class
- instantiate-foreign-interface
- instantiate-library
- jdk-ffi?
- jdk-mmodel?
- jna-ffi?
- library-loadable?
- library-singleton
- make-ptr
- PLibrarySingleton
- PToPointer
- ptr->struct
- set-ffi-impl!
- string->c
- string->c-data-histogram
- struct-member-ptr
- utf16-platform-encoding
- utf32-platform-encoding
- windows-platform?
tech.v3.datatype.ffi.clang
General utilites to work with clang in order to define things like structs or +
Public variables and functions:
- c->string
- clear-string->c-stats!
- define-foreign-interface
- define-library
- define-library!
- define-library-functions
- define-library-interface
- enable-string->c-stats!
- find-library
- find-symbol
- foreign-interface-instance->c
- if-class
- instantiate-class
- instantiate-foreign-interface
- instantiate-library
- jdk-ffi?
- jdk-mmodel?
- jna-ffi?
- library-loadable?
- library-singleton
- make-ptr
- PLibrarySingleton
- pointer->address
- PToPointer
- ptr->struct
- set-ffi-impl!
- string->c
- string->c-data-histogram
- struct-member-ptr
- utf16-platform-encoding
- utf32-platform-encoding
- windows-platform?
tech.v3.datatype.ffi.clang
General utilites to work with clang in order to define things like structs or enumerations.
Public variables and functions:
tech.v3.datatype.ffi.graalvm
Graalvm-specific namespace that implements the dtype-next ffi system and allows users to build stand-alone shared libraries that other languages can use to call Clojure code via diff --git a/docs/overview.html b/docs/overview.html index dc23e0ad..9d2bb27f 100644 --- a/docs/overview.html +++ b/docs/overview.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.119
dtype-next Overview
+ gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.120
dtype-next Overview
Setup
(require '[tech.v3.datatype :as dtype])
diff --git a/docs/tech.v3.datatype.argops.html b/docs/tech.v3.datatype.argops.html
index 88561b5e..3ed96edf 100644
--- a/docs/tech.v3.datatype.argops.html
+++ b/docs/tech.v3.datatype.argops.html
@@ -4,7 +4,7 @@
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
- gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype.argops
Efficient functions for operating in index space. Take-off of the argsort, argmin, etc. + gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype.argops
Efficient functions for operating in index space. Take-off of the argsort, argmin, etc. type functions from Matlab. These functions generally only work on readers and all return some version of an index or list of indexes.
->binary-operator
(->binary-operator op)
Convert a thing to a binary operator. Thing can be a keyword or diff --git a/docs/tech.v3.datatype.bitmap.html b/docs/tech.v3.datatype.bitmap.html index 542a7bea..d1258ca1 100644 --- a/docs/tech.v3.datatype.bitmap.html +++ b/docs/tech.v3.datatype.bitmap.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype.bitmap
Functions for working with RoaringBitmaps. These are integrated deeply into + gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype.bitmap
Functions for working with RoaringBitmaps. These are integrated deeply into several tech.v3.datatype algorithms and have many potential applications in high performance computing applications as they are both extremely fast and storage-space efficient.
diff --git a/docs/tech.v3.datatype.convolve.html b/docs/tech.v3.datatype.convolve.html index 30b5abb6..99b744ab 100644 --- a/docs/tech.v3.datatype.convolve.html +++ b/docs/tech.v3.datatype.convolve.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype.convolve
Namespace for implementing various basic convolutions. Currently only 1d + gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype.convolve
Namespace for implementing various basic convolutions. Currently only 1d convolutions are supported.
convolve1d
(convolve1d data win options)
(convolve1d data win)
Convolve a window across a signal. The only difference from correlate is the window is reversed and then correlate is called. See options for correlate, this diff --git a/docs/tech.v3.datatype.datetime.html b/docs/tech.v3.datatype.datetime.html index f323a89c..7314ae96 100644 --- a/docs/tech.v3.datatype.datetime.html +++ b/docs/tech.v3.datatype.datetime.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype.datetime
Thorough bindings to java.time.datetime. Includes packed datatypes and + gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype.datetime
Thorough bindings to java.time.datetime. Includes packed datatypes and lifting various datetime datatypes into the datatype system.
A general outline is:
-
diff --git a/docs/tech.v3.datatype.errors.html b/docs/tech.v3.datatype.errors.html
index 207ed736..a50b2958 100644
--- a/docs/tech.v3.datatype.errors.html
+++ b/docs/tech.v3.datatype.errors.html
@@ -4,7 +4,7 @@
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
- gtag('config', 'G-95TVFC1FEB');
fn-defs
- map of fn-name -> {:rettype :argtypes} @@ -347,29 +347,29 @@A Word On Efficiency
#native-buffer@0x00007F4E28CE56D0<float32>[10] [0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, ] -foreign-inst
- an instance of the class defined by 'define-foreign-interface'.- :jdk - namespace
'tech.v3.datatype.ffi.mmodel/ffi-fns
- only available with jdk's foreign function module enabled. - :jna - namespace
''tech.v3.datatype.ffi.jna/ffi-fns
- available if JNA version 5+ is in the classpath. :ascii
,:utf-8
(default),:utf-16
,:utf-16LE
,utf-16-BE
and:utf-32
- n-bytes - the number of bytes to malloc +
- opts - Either a keyword datatype or an options map. +
:resource-type
- defaults to:gc
- maps to:track-type
intech.v3.resource/track
but can also be set to nil in which case the data is not tracked this library will not clean it up.
+:datatype
- Datatype - defaults to :int8. Datatype byte width must evenly divide n-bytes.:uninitialized?
- do not initialize to zero. Use for perf in very very rare cases.:endianness
- Either:little-endian
or:big-endian
- defaults to platform.:log-level
- one of#{:debug :trace :info :warn :error :fatal}
or nil if no logging @@ -179,19 +184,19 @@ a compilation error if older versions of dtype-next are included and is the equivalent (in latest versions of dtype-next) to(make-list datatype n-elems)
. -- If range, returns a new range.
- If sequence, uses clojure.core/reverse
- If reader, returns a new reader that performs an in-place reverse.
Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype.errors
Generic, basic error handling. No dependencies aside from apache commons math + gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype.errors
Generic, basic error handling. No dependencies aside from apache commons math for NAN exception.
check-idx
macro
(check-idx idx n-elems)
Check that an index is less than n-elems. Throw an index-out-of-bounds exception if that isn't the case.
diff --git a/docs/tech.v3.datatype.ffi.clang.html b/docs/tech.v3.datatype.ffi.clang.html index 5e4cae64..457842d4 100644 --- a/docs/tech.v3.datatype.ffi.clang.html +++ b/docs/tech.v3.datatype.ffi.clang.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype.ffi.clang
General utilites to work with clang in order to define things like structs or + gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype.ffi.clang
General utilites to work with clang in order to define things like structs or enumerations.
defstruct-from-layout
(defstruct-from-layout struct-dtype layout {:keys [failed-line-parser]})
(defstruct-from-layout struct-dtype layout)
Function to take a partial clang record dump and make a struct defintion. In order to generate a file containing dumps we do something like:
diff --git a/docs/tech.v3.datatype.ffi.graalvm.html b/docs/tech.v3.datatype.ffi.graalvm.html index 04e0896b..aabf4497 100644 --- a/docs/tech.v3.datatype.ffi.graalvm.html +++ b/docs/tech.v3.datatype.ffi.graalvm.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype.ffi.graalvm
Graalvm-specific namespace that implements the dtype-next ffi system and allows users + gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype.ffi.graalvm
Graalvm-specific namespace that implements the dtype-next ffi system and allows users to build stand-alone shared libraries that other languages can use to call Clojure code via a binary C interface.
define-library
(define-library fn-defs symbols {:keys [classname instantiate?], :as options})
Define a graal-native set functions bound to a particular native library. See the diff --git a/docs/tech.v3.datatype.ffi.html b/docs/tech.v3.datatype.ffi.html index 63649480..17faea06 100644 --- a/docs/tech.v3.datatype.ffi.html +++ b/docs/tech.v3.datatype.ffi.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype.ffi
Generalized C Foreign Function Interface (FFI) that unifies JNA and JDK-16 FFI architectures.
+ gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype.ffi
Generalized C Foreign Function Interface (FFI) that unifies JNA and JDK-16 FFI architectures.
Users can dynamically define and load libraries and define callbacks that C can then call.
This namespace is meant to work with the struct
namespace where you can define
@@ -192,7 +192,7 @@
A Word On Efficiency
be a valid call.See foreign-interface-instance->c for example.
-define-library
(define-library fn-defs symbols options)
(define-library fn-defs options)
(define-library fn-defs)
Define a library returning the class. The class can be instantiated with a string +
define-library
(define-library fn-defs symbols options)
(define-library fn-defs options)
(define-library fn-defs)
Define a library returning the class. The class can be instantiated with a string naming the library path or nil for the current process. After instantiation the library instance will have strongly typed methods named the same as the keyword keys in fn-defs efficiently bound to symbols of the same exact name in @@ -244,7 +244,7 @@
A Word On Efficiency
[0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, ] user> -define-library!
macro
(define-library! lib-varname lib-fns lib-symbols error-checker)
Define a library singleton that will export the defined functions and symbols.
+define-library!
macro
(define-library! lib-varname lib-fns lib-symbols error-checker)
Define a library singleton that will export the defined functions and symbols.
Only jvm-supported primitives work here - no unsigned but if you have the correct datatype widths the data will be passed unchanged so unsigned does work.
See namespace declaration for full example.
@@ -268,7 +268,7 @@A Word On Efficiency
nil nil) -define-library-functions
macro
(define-library-functions library-def-symbol find-fn check-error)
Define public callable vars that will call library functions marshaling strings +
define-library-functions
macro
(define-library-functions library-def-symbol find-fn check-error)
Define public callable vars that will call library functions marshaling strings back and forth. These vars will call find-fn with the fn-name in a late-bound way and check-error may be provided and called on a return value assuming :check-error? is set in the library definition.
@@ -282,7 +282,7 @@A Word On Efficiency
Example:
(dt-ffi/define-library-functions avclj.ffi/avcodec-fns find-avcodec-fn check-error)
-define-library-interface
macro
(define-library-interface fn-defs & {:keys [_classname check-error symbols libraries _header-files], :as opts})
Define public callable vars that will call library functions marshaling strings +
define-library-interface
macro
(define-library-interface fn-defs & {:keys [_classname check-error symbols libraries _header-files], :as opts})
Define public callable vars that will call library functions marshaling strings back and forth. Returns a library singleton.
enable-string->c-stats!
(enable-string->c-stats! enabled?)
(enable-string->c-stats!)
Enable tracking how often string->c is getting called.
+enable-string->c-stats!
(enable-string->c-stats! enabled?)
(enable-string->c-stats!)
Enable tracking how often string->c is getting called.
find-library
(find-library libname)
This method is useful to check if loading a library will work. If successful,
returns the library name that did finally succeed. This may be different from
libname
in the case where java.library.path has been used to actively find the
library.
find-symbol
(find-symbol libname symbol-name)
(find-symbol symbol-name)
Find a symbol in a library. A library symbol is guaranteed to have a conversion to +
find-symbol
(find-symbol libname symbol-name)
(find-symbol symbol-name)
Find a symbol in a library. A library symbol is guaranteed to have a conversion to a pointer.
-foreign-interface-instance->c
(foreign-interface-instance->c ffi-def foreign-inst)
Convert an instance of the above foreign interface definition into a Pointer +
foreign-interface-instance->c
(foreign-interface-instance->c ffi-def foreign-inst)
Convert an instance of the above foreign interface definition into a Pointer suitable to be called from C. Callers must ensure that foreign-inst is visible to the gc the entire time the foreign system has a reference to the pointer.
instantiate-class
(instantiate-class cls & args)
Utility function to instantiate a class via its first constructor in its list +
instantiate-class
(instantiate-class cls & args)
Utility function to instantiate a class via its first constructor in its list of declared constructors. Works with classes returned from 'define-library' and 'define-foreign-interface'. Uses reflection.
-instantiate-foreign-interface
(instantiate-foreign-interface ffi-def ifn)
Instantiate a foreign interface defintion. This returns an instance object which +
instantiate-foreign-interface
(instantiate-foreign-interface ffi-def ifn)
Instantiate a foreign interface defintion. This returns an instance object which
can then be converted into a c-pointer via foreign-interface-instance->c
.
instantiate-library
(instantiate-library library-def libpath)
Uses reflection to instantiate a library
-instantiate-library
(instantiate-library library-def libpath)
Uses reflection to instantiate a library
+library-singleton
(library-singleton library-def-var library-sym-var library-def-opts)
(library-singleton library-def-var)
Create a singleton object, ideally assigned to a variable with defonce, that +
library-singleton
(library-singleton library-def-var library-sym-var library-def-opts)
(library-singleton library-def-var)
Create a singleton object, ideally assigned to a variable with defonce, that you can reset to auto-reload the bindings i.e. with new function definitions at the repl.
-
@@ -388,9 +388,9 @@
A Word On Efficiency
[fn-kwd] (dt-ffi/library-singelton-find-fn lib fn-kwd)) -make-ptr
(make-ptr dtype prim-init-value options)
(make-ptr dtype prim-init-value)
Make an object convertible to a pointer that points to single value of type +
make-ptr
(make-ptr dtype prim-init-value options)
(make-ptr dtype prim-init-value)
Make an object convertible to a pointer that points to single value of type
dtype
.
PLibrarySingleton
protocol
Protocol to allow easy definition of a library singleton that manages re-creating +
PLibrarySingleton
protocol
Protocol to allow easy definition of a library singleton that manages re-creating the library definition when the library data changes and also recreating the library instance if necessary.
members
library-singleton-definition
(library-singleton-definition lib-singleton)
Return the library definition.
@@ -403,19 +403,19 @@A Word On Efficiency
iterative development.library-singleton-set!
(library-singleton-set! lib-singleton libpath)
Set the library path, generate the library and create a new instance.
library-singleton-set-instance!
(library-singleton-set-instance! lib-singleton libinst)
In some cases such as graal native pathways you have to hard-set the definition and instance.
-PToPointer
protocol
members
->pointer
(->pointer item)
Convert an item into a Pointer, throwing an exception upon failure.
+PToPointer
protocol
members
->pointer
(->pointer item)
Convert an item into a Pointer, throwing an exception upon failure.
convertible-to-pointer?
(convertible-to-pointer? item)
Query whether an item is convertible to a pointer.
ptr->struct
(ptr->struct struct-type ptr)
Given a struct type and a pointer return a struct whose data starts at the address of the pointer.
(let [codec (dt-ffi/ptr->struct (:datatype-name @av-context/codec-def*) codec-ptr)]
...)
-set-ffi-impl!
(set-ffi-impl! ffi-kwd)
Set the global ffi implementation. Options are
string->c
(string->c str-data & [{:keys [encoding], :as options}])
Convert a java String to a zero-padded c-string. Available encodings are
+string->c
(string->c str-data & [{:keys [encoding], :as options}])
Convert a java String to a zero-padded c-string. Available encodings are
A Word On Efficiency
(struct-member-ptr encoder-frame :data) (struct-member-ptr encoder-frame :linesize)) -utf16-platform-encoding
(utf16-platform-encoding)
Get the utf-16 encoding that matches the current platform so you can encode +
utf16-platform-encoding
(utf16-platform-encoding)
Get the utf-16 encoding that matches the current platform so you can encode a utf-16 string without a bom.
utf32-platform-encoding
(utf32-platform-encoding)
Get the utf-16 encoding that matches the current platform so you can encode a utf-16 string without a bom.
diff --git a/docs/tech.v3.datatype.ffi.size-t.html b/docs/tech.v3.datatype.ffi.size-t.html index 98ca64f8..6af21779 100644 --- a/docs/tech.v3.datatype.ffi.size-t.html +++ b/docs/tech.v3.datatype.ffi.size-t.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype.ffi.size-t
offset-t-type
(offset-t-type)
the offset-t datatype - either :int32
or :int64
.
Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype.ffi.size-t
Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype.functional
Arithmetic and statistical operations based on the Buffer interface. These + gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype.functional
Arithmetic and statistical operations based on the Buffer interface. These operators and functions all implement vectorized interfaces so passing in something convertible to a reader will return a reader. Arithmetic operations are done lazily. These functions generally incur a large dispatch cost so for example each call to '+' diff --git a/docs/tech.v3.datatype.gradient.html b/docs/tech.v3.datatype.gradient.html index 41fb7f8f..b20cde61 100644 --- a/docs/tech.v3.datatype.gradient.html +++ b/docs/tech.v3.datatype.gradient.html @@ -4,7 +4,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype.gradient
Calculate the numeric gradient of successive elements. + gtag('config', 'G-95TVFC1FEB');
Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype.gradient
Calculate the numeric gradient of successive elements. Contains simplified versions of numpy.gradient and numpy.diff.
diff1d
(diff1d data & [options])
Returns a lazy reader of each successive element minus the previous element of length
input-len - 1 unless the :prepend
option is used.
Generated by Codox with RDash UI theme
DType Next 10.119
tech.v3.datatype
Base namespace for container creation and elementwise access of data
+ gtag('config', 'G-95TVFC1FEB');Generated by Codox with RDash UI theme
DType Next 10.120
tech.v3.datatype
Base namespace for container creation and elementwise access of data
->array
(->array datatype options item)
(->array datatype item)
(->array item)
Perform a NaN-aware conversion into an array. Default nan-strategy is :keep. Nan strategies can be: :keep :remove :exception
@@ -163,12 +163,17 @@ true false false false false user> (dtype/make-reader :float32 5 (* idx 2)) 0.0 2.0 4.0 6.0 8.0 -malloc
(malloc n-bytes opts)
(malloc n-bytes)
Malloc memory. If a desired buffer type is needed follow up with set-native-datatype.
+malloc
(malloc n-bytes dtype-or-opts)
(malloc n-bytes)
Malloc memory. If a desired buffer type is needed follow up with set-native-datatype.
+-
+
Options:
reader-like?
(reader-like? argtype)
Returns true if this argument type is convertible to a reader.
-reader?
(reader? item)
True if this item is convertible to a read-only or read-write Buffer +
reader-like?
(reader-like? argtype)
Returns true if this argument type is convertible to a reader.
+reader?
(reader? item)
True if this item is convertible to a read-only or read-write Buffer interface.
-reverse
(reverse item)
Reverse an sequence, range or reader.
set-constant!
(set-constant! item offset length value)
(set-constant! item offset value)
(set-constant! item value)
Set a contiguous region of a buffer to a constant value
-set-native-datatype
(set-native-datatype item datatype)
Set the datatype of a native buffer. n-elems will be recalculated.
-set-value!
(set-value! item idx value)
Set a value on an object via conversion to a writer. set-value can also take a tuple +
set-constant!
(set-constant! item offset length value)
(set-constant! item offset value)
(set-constant! item value)
Set a contiguous region of a buffer to a constant value
+set-native-datatype
(set-native-datatype item datatype)
Set the datatype of a native buffer. n-elems will be recalculated.
+set-value!
(set-value! item idx value)
Set a value on an object via conversion to a writer. set-value can also take a tuple in which case a select operation will be done on the tensor and value applied to the result. See also set-constant!.
Example:
@@ -237,11 +242,11 @@ [2.000 2.000 23.00] [3.000 3.000 26.00]]] -shape
(shape item)
Return a persistent vector of the shape of the object. Dimensions are returned from least-rapidly-changing to most-rapidly-changing.
-sub-buffer
(sub-buffer item offset length)
(sub-buffer item offset)
Create a sub-buffer (view) of the given buffer.
-unchecked-cast
(unchecked-cast value datatype)
Perform an unchecked cast of a value to specific datatype.
-vectorized-dispatch-1
(vectorized-dispatch-1 scalar-fn iterable-fn reader-fn options arg1)
(vectorized-dispatch-1 scalar-fn iterable-fn reader-fn arg1)
(vectorized-dispatch-1 scalar-fn reader-fn arg1)
Perform a vectorized dispatch meaning return a different object depending on the +
sub-buffer
(sub-buffer item offset length)
(sub-buffer item offset)
Create a sub-buffer (view) of the given buffer.
+unchecked-cast
(unchecked-cast value datatype)
Perform an unchecked cast of a value to specific datatype.
+vectorized-dispatch-1
(vectorized-dispatch-1 scalar-fn iterable-fn reader-fn options arg1)
(vectorized-dispatch-1 scalar-fn iterable-fn reader-fn arg1)
(vectorized-dispatch-1 scalar-fn reader-fn arg1)
Perform a vectorized dispatch meaning return a different object depending on the argument type of arg1. If arg1 is scalar, use scalar-fn. If arg1 is an iterable, use iterable-fn. Finally if arg1 is a reader, use reader-fn. The space the operation is to be performed in can be loosely set with :operation-space in the @@ -249,7 +254,7 @@ of the system) is a combination of :operation-space if it exists and the elemwise datatype of arg1. See tech.v3.datatype.casting/widest-datatype for more information.
-vectorized-dispatch-2
(vectorized-dispatch-2 scalar-fn iterable-fn reader-fn options arg1 arg2)
(vectorized-dispatch-2 scalar-fn reader-fn arg1 arg2)
Perform a vectorized dispatch meaning return a different object depending on the +
vectorized-dispatch-2
(vectorized-dispatch-2 scalar-fn iterable-fn reader-fn options arg1 arg2)
(vectorized-dispatch-2 scalar-fn reader-fn arg1 arg2)
Perform a vectorized dispatch meaning return a different object depending on the argument types of arg1 and arg2. If arg1 and arg2 are both scalar, use scalar-fn. If neither argument is a reader, use iterable-fn. Finally if both arguments are readers, use reader-fn. The space the operation is to be performed in can be @@ -257,6 +262,6 @@ will be performed in (and the return type of the system) is a combination of :operation-space if it exists and the elemwise datatypes of arg1 and arg2. See tech.v3.datatype.casting/widest-datatype for more information.
-writer?
(writer? item)
True if this item is convertible to a Buffer interface that supports +
writer?
(writer? item)
True if this item is convertible to a Buffer interface that supports writing.
-