(all-distributions)
(all-rngs)
(axpy mult lhs rhs)
Perform a*x+y where a is a constant and x and y native buffers matching in datatype
and length. At this time only :float32
and :float64
datatypes are supported.
Meant to be used within a stack resource context. See docs for sub
.
Perform a*x+y where a is a constant and x and y native buffers matching in datatype and length. At this time only `:float32` and `:float64` datatypes are supported. Meant to be used within a stack resource context. See docs for [[sub]].
(axpy! mult lhs rhs)
Mutable axpy
placing results in rhs.
Mutable [[axpy]] placing results in rhs.
(correlate1d data kernel)
(correlate1d data kernel options)
Drop in replacement for dtype-next's convolve/correlate1d pathway that is significantly faster for large input data and kernel values.
Drop in replacement for dtype-next's convolve/correlate1d pathway that is significantly faster for large input data and kernel values.
(correlation1d-fn dtype
nsignal
nwin
&
{:keys [mode algorithm] :or {mode :full algorithm :auto}})
Create a correlation function that returns data the same length as the input. This function is not reentrant, do not call simultaneously from multiple threads.
dtype
- One of :float32
:float64
.nsignal
- Length of input signal.Options:
:mode
- One of :full
:same
:algorithm
- One of :fft
:naive
:auto
.Create a correlation function that returns data the same length as the input. This function is *not* reentrant, do not call simultaneously from multiple threads. * `dtype` - One of `:float32` `:float64`. * `nsignal` - Length of input signal. * `nwin - Number of elements in the kernel. Options: - `:mode` - One of `:full` `:same` - `:algorithm` - One of `:fft` `:naive` `:auto`.
(fft-forward data)
(fft-forward data options)
Compute the forward fft. Returns a dtype-next array buffer.
Compute the forward fft. Returns a dtype-next array buffer.
(fft-forward-fn dtype domain len)
Create a function to process forward fft. Returned function takes one arg, input and returns a pre-allocated output after each invocation. Input length must match len. If domain is complex, input length must be double len.
Complex data is stored packed as if in a struct - r1,i1,r2,i2
dtype
- either :float32
or :float64
.domain
- either :real
or :complex
.Create a function to process forward fft. Returned function takes one arg, input and returns a pre-allocated output after each invocation. Input length must match len. If domain is complex, input length must be double len. Complex data is stored packed as if in a struct - r1,i1,r2,i2 * `dtype` - either `:float32` or `:float64`. * `domain` - either `:real` or `:complex`.
(initialize!)
(initialize! options)
Initialize - find the mkl_rt
shared library and load it. Uses normal OS pathways to
find the library in addition to the java_library_path
system variable.
Initialize - find the `mkl_rt` shared library and load it. Uses normal OS pathways to find the library in addition to the `java_library_path` system variable.
(real->complex real)
Convert a real buffer to an interleaved real-complex buffer - not an efficient operation.
Convert a real buffer to an interleaved real-complex buffer - not an efficient operation.
(rng-stream n
{:keys [seed rng dist datatype]
:or {rng :sfmt19937 dist :uniform datatype :float64}
:as options})
Return a function that when called returns a new batch of random numbers. Returns the same native buffer on every call. The values of (all-distributions) state the name of the optional arguments and their order.
Options:
Note that the distribution arguments must be provided in the optional arguments map. See the documentation for various mkl distribution functions for their definitions.
:datatype
- defaults to :float64.:seed
- unsigned integer - defaults to unchecked integer cast of system/nanoTime if not provided.:rng
- one of (all-rngs) - defaults to :sfmt19937:dist
- one of the keys of (all-distributions). Defaults to :uniform.Return a function that when called returns a new batch of random numbers. Returns the same native buffer on every call. The values of (all-distributions) state the name of the optional arguments and their order. Options: Note that the distribution arguments *must* be provided in the optional arguments map. See the documentation for various [mkl distribution functions](https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2023-0/distribution-generators.html) for their definitions. * `:datatype` - defaults to :float64. * `:seed` - unsigned integer - defaults to unchecked integer cast of system/nanoTime if not provided. * `:rng` - one of (all-rngs) - defaults to :sfmt19937 * `:dist` - one of the keys of (all-distributions). Defaults to :uniform.
(sub a b)
Subtract two native buffers. No care has been taken to ensure buffers are native or to convert them.
Meant to be used within a stack resource context.
mkl.api> (def fdata (dt/make-container :native-heap :float32 (hamf/range 100000)))
#'mkl.api/fdata
mkl.api> (crit/quick-bench (resource/stack-resource-context
(sub (hamf/subvec fdata 0 (dec (dt/ecount fdata)))
(hamf/subvec fdata 1))))
Evaluation count : 27468 in 6 samples of 4578 calls.
Execution time mean : 21.781143 µs
Execution time std-deviation : 82.384894 ns
Execution time lower quantile : 21.689956 µs ( 2.5%)
Execution time upper quantile : 21.872100 µs (97.5%)
Overhead used : 1.998471 ns
Subtract two native buffers. No care has been taken to ensure buffers are native or to convert them. Meant to be used within a stack resource context. ```clojure mkl.api> (def fdata (dt/make-container :native-heap :float32 (hamf/range 100000))) #'mkl.api/fdata mkl.api> (crit/quick-bench (resource/stack-resource-context (sub (hamf/subvec fdata 0 (dec (dt/ecount fdata))) (hamf/subvec fdata 1)))) Evaluation count : 27468 in 6 samples of 4578 calls. Execution time mean : 21.781143 µs Execution time std-deviation : 82.384894 ns Execution time lower quantile : 21.689956 µs ( 2.5%) Execution time upper quantile : 21.872100 µs (97.5%) Overhead used : 1.998471 ns ```
(sub! a b ret)
Subtract two native buffers placing result into ret
. See docs for sub
.
Subtract two native buffers placing result into `ret`. See docs for [[sub]].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close