rebase
This commit is contained in:
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 136f45bc6db8a54d889bf646df22a392
|
||||
config: 106d4f405b471b3dd6a82c4cc5ee12b0
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
||||
+78
-153
@@ -22,12 +22,12 @@ You can do that in MLX directly:
|
||||
This function performs that operation while leaving the implementation and
|
||||
function transformations to MLX.
|
||||
|
||||
However you may need to customize the underlying implementation, perhaps to
|
||||
make it faster or for custom differentiation. In this tutorial we will go
|
||||
through adding custom extensions. It will cover:
|
||||
However, you may want to customize the underlying implementation, perhaps to
|
||||
make it faster. In this tutorial we will go through adding custom extensions.
|
||||
It will cover:
|
||||
|
||||
* The structure of the MLX library.
|
||||
* Implementing a CPU operation that redirects to Accelerate_ when appropriate.
|
||||
* Implementing a CPU operation.
|
||||
* Implementing a GPU operation using metal.
|
||||
* Adding the ``vjp`` and ``jvp`` function transformation.
|
||||
* Building a custom extension and binding it to python.
|
||||
@@ -45,7 +45,7 @@ Operations
|
||||
Operations are the front-end functions that operate on arrays. They are defined
|
||||
in the C++ API (:ref:`cpp_ops`), and the Python API (:ref:`ops`) binds them.
|
||||
|
||||
We would like an operation, :meth:`axpby` that takes in two arrays ``x`` and
|
||||
We would like an operation :meth:`axpby` that takes in two arrays, ``x`` and
|
||||
``y``, and two scalars, ``alpha`` and ``beta``. This is how to define it in
|
||||
C++:
|
||||
|
||||
@@ -55,7 +55,7 @@ C++:
|
||||
* Scale and sum two vectors element-wise
|
||||
* z = alpha * x + beta * y
|
||||
*
|
||||
* Follow numpy style broadcasting between x and y
|
||||
* Use NumPy-style broadcasting between x and y
|
||||
* Inputs are upcasted to floats if needed
|
||||
**/
|
||||
array axpby(
|
||||
@@ -66,7 +66,7 @@ C++:
|
||||
StreamOrDevice s = {} // Stream on which to schedule the operation
|
||||
);
|
||||
|
||||
The simplest way to this operation is in terms of existing operations:
|
||||
The simplest way to implement this is with existing operations:
|
||||
|
||||
.. code-block:: C++
|
||||
|
||||
@@ -153,9 +153,6 @@ more concrete:
|
||||
private:
|
||||
float alpha_;
|
||||
float beta_;
|
||||
|
||||
/** Fall back implementation for evaluation on CPU */
|
||||
void eval(const std::vector<array>& inputs, array& out);
|
||||
};
|
||||
|
||||
The :class:`Axpby` class derives from the base :class:`Primitive` class. The
|
||||
@@ -188,7 +185,7 @@ Let's reimplement our operation now in terms of our :class:`Axpby` primitive.
|
||||
auto promoted_dtype = promote_types(x.dtype(), y.dtype());
|
||||
|
||||
// Upcast to float32 for non-floating point inputs x and y
|
||||
auto out_dtype = is_floating_point(promoted_dtype)
|
||||
auto out_dtype = issubdtype(promoted_dtype, float32)
|
||||
? promoted_dtype
|
||||
: promote_types(promoted_dtype, float32);
|
||||
|
||||
@@ -234,49 +231,59 @@ the execution of the computation graph, and calls :meth:`Axpby::eval_cpu` or
|
||||
Implementing the CPU Back-end
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Let's start by implementing a naive and generic version of
|
||||
:meth:`Axpby::eval_cpu`. We declared this as a private member function of
|
||||
:class:`Axpby` earlier called :meth:`Axpby::eval`.
|
||||
Let's start by implementing :meth:`Axpby::eval_cpu`.
|
||||
|
||||
Our naive method will go over each element of the output array, find the
|
||||
The method will go over each element of the output array, find the
|
||||
corresponding input elements of ``x`` and ``y`` and perform the operation
|
||||
point-wise. This is captured in the templated function :meth:`axpby_impl`.
|
||||
|
||||
.. code-block:: C++
|
||||
|
||||
template <typename T>
|
||||
void axpby_impl(
|
||||
const array& x,
|
||||
const array& y,
|
||||
array& out,
|
||||
float alpha_,
|
||||
float beta_) {
|
||||
// We only allocate memory when we are ready to fill the output
|
||||
// malloc_or_wait synchronously allocates available memory
|
||||
// There may be a wait executed here if the allocation is requested
|
||||
// under memory-pressured conditions
|
||||
out.set_data(allocator::malloc_or_wait(out.nbytes()));
|
||||
template <typename T>
|
||||
void axpby_impl(
|
||||
const mx::array& x,
|
||||
const mx::array& y,
|
||||
mx::array& out,
|
||||
float alpha_,
|
||||
float beta_,
|
||||
mx::Stream stream) {
|
||||
// Allocate the output with `malloc_or_wait` which synchronously allocates
|
||||
// memory, potentially waiting if the system is under memory pressure
|
||||
out.set_data(mx::allocator::malloc_or_wait(out.nbytes()));
|
||||
|
||||
// Collect input and output data pointers
|
||||
const T* x_ptr = x.data<T>();
|
||||
const T* y_ptr = y.data<T>();
|
||||
T* out_ptr = out.data<T>();
|
||||
// Get the CPU command encoder and register input and output arrays
|
||||
auto& encoder = mx::cpu::get_command_encoder(stream);
|
||||
encoder.set_input_array(x);
|
||||
encoder.set_input_array(y);
|
||||
encoder.set_output_array(out);
|
||||
|
||||
// Cast alpha and beta to the relevant types
|
||||
T alpha = static_cast<T>(alpha_);
|
||||
T beta = static_cast<T>(beta_);
|
||||
// Launch the CPU kernel
|
||||
encoder.dispatch([x_ptr = x.data<T>(),
|
||||
y_ptr = y.data<T>(),
|
||||
out_ptr = out.data<T>(),
|
||||
size = out.size(),
|
||||
shape = out.shape(),
|
||||
x_strides = x.strides(),
|
||||
y_strides = y.strides(),
|
||||
alpha_,
|
||||
beta_]() {
|
||||
|
||||
// Do the element-wise operation for each output
|
||||
for (size_t out_idx = 0; out_idx < out.size(); out_idx++) {
|
||||
// Map linear indices to offsets in x and y
|
||||
auto x_offset = elem_to_loc(out_idx, x.shape(), x.strides());
|
||||
auto y_offset = elem_to_loc(out_idx, y.shape(), y.strides());
|
||||
// Cast alpha and beta to the relevant types
|
||||
T alpha = static_cast<T>(alpha_);
|
||||
T beta = static_cast<T>(beta_);
|
||||
|
||||
// We allocate the output to be contiguous and regularly strided
|
||||
// (defaults to row major) and hence it doesn't need additional mapping
|
||||
out_ptr[out_idx] = alpha * x_ptr[x_offset] + beta * y_ptr[y_offset];
|
||||
}
|
||||
}
|
||||
// Do the element-wise operation for each output
|
||||
for (size_t out_idx = 0; out_idx < size; out_idx++) {
|
||||
// Map linear indices to offsets in x and y
|
||||
auto x_offset = mx::elem_to_loc(out_idx, shape, x_strides);
|
||||
auto y_offset = mx::elem_to_loc(out_idx, shape, y_strides);
|
||||
|
||||
// We allocate the output to be contiguous and regularly strided
|
||||
// (defaults to row major) and hence it doesn't need additional mapping
|
||||
out_ptr[out_idx] = alpha * x_ptr[x_offset] + beta * y_ptr[y_offset];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Our implementation should work for all incoming floating point arrays.
|
||||
Accordingly, we add dispatches for ``float32``, ``float16``, ``bfloat16`` and
|
||||
@@ -284,112 +291,32 @@ Accordingly, we add dispatches for ``float32``, ``float16``, ``bfloat16`` and
|
||||
|
||||
.. code-block:: C++
|
||||
|
||||
/** Fall back implementation for evaluation on CPU */
|
||||
void Axpby::eval(
|
||||
const std::vector<array>& inputs,
|
||||
const std::vector<array>& outputs) {
|
||||
auto& x = inputs[0];
|
||||
auto& y = inputs[1];
|
||||
auto& out = outputs[0];
|
||||
|
||||
// Dispatch to the correct dtype
|
||||
if (out.dtype() == float32) {
|
||||
return axpby_impl<float>(x, y, out, alpha_, beta_);
|
||||
} else if (out.dtype() == float16) {
|
||||
return axpby_impl<float16_t>(x, y, out, alpha_, beta_);
|
||||
} else if (out.dtype() == bfloat16) {
|
||||
return axpby_impl<bfloat16_t>(x, y, out, alpha_, beta_);
|
||||
} else if (out.dtype() == complex64) {
|
||||
return axpby_impl<complex64_t>(x, y, out, alpha_, beta_);
|
||||
} else {
|
||||
throw std::runtime_error(
|
||||
"[Axpby] Only supports floating point types.");
|
||||
}
|
||||
}
|
||||
|
||||
This is good as a fallback implementation. We can use the ``axpby`` routine
|
||||
provided by the Accelerate_ framework for a faster implementation in certain
|
||||
cases:
|
||||
|
||||
#. Accelerate does not provide implementations of ``axpby`` for half precision
|
||||
floats. We can only use it for ``float32`` types.
|
||||
#. Accelerate assumes the inputs ``x`` and ``y`` are contiguous and all
|
||||
elements have fixed strides between them. We only direct to Accelerate
|
||||
if both ``x`` and ``y`` are row contiguous or column contiguous.
|
||||
#. Accelerate performs the routine ``Y = (alpha * X) + (beta * Y)`` in-place.
|
||||
MLX expects to write the output to a new array. We must copy the elements
|
||||
of ``y`` into the output and use that as an input to ``axpby``.
|
||||
|
||||
Let's write an implementation that uses Accelerate in the right conditions.
|
||||
It allocates data for the output, copies ``y`` into it, and then calls the
|
||||
:func:`catlas_saxpby` from accelerate.
|
||||
|
||||
.. code-block:: C++
|
||||
|
||||
template <typename T>
|
||||
void axpby_impl_accelerate(
|
||||
const array& x,
|
||||
const array& y,
|
||||
array& out,
|
||||
float alpha_,
|
||||
float beta_) {
|
||||
// Accelerate library provides catlas_saxpby which does
|
||||
// Y = (alpha * X) + (beta * Y) in place
|
||||
// To use it, we first copy the data in y over to the output array
|
||||
out.set_data(allocator::malloc_or_wait(out.nbytes()));
|
||||
|
||||
// We then copy over the elements using the contiguous vector specialization
|
||||
copy_inplace(y, out, CopyType::Vector);
|
||||
|
||||
// Get x and y pointers for catlas_saxpby
|
||||
const T* x_ptr = x.data<T>();
|
||||
T* y_ptr = out.data<T>();
|
||||
|
||||
T alpha = static_cast<T>(alpha_);
|
||||
T beta = static_cast<T>(beta_);
|
||||
|
||||
// Call the inplace accelerate operator
|
||||
catlas_saxpby(
|
||||
/* N = */ out.size(),
|
||||
/* ALPHA = */ alpha,
|
||||
/* X = */ x_ptr,
|
||||
/* INCX = */ 1,
|
||||
/* BETA = */ beta,
|
||||
/* Y = */ y_ptr,
|
||||
/* INCY = */ 1);
|
||||
}
|
||||
|
||||
For inputs that do not fit the criteria for accelerate, we fall back to
|
||||
:meth:`Axpby::eval`. With this in mind, let's finish our
|
||||
:meth:`Axpby::eval_cpu`.
|
||||
|
||||
.. code-block:: C++
|
||||
|
||||
/** Evaluate primitive on CPU using accelerate specializations */
|
||||
void Axpby::eval_cpu(
|
||||
const std::vector<array>& inputs,
|
||||
const std::vector<array>& outputs) {
|
||||
assert(inputs.size() == 2);
|
||||
auto& x = inputs[0];
|
||||
auto& y = inputs[1];
|
||||
auto& out = outputs[0];
|
||||
const std::vector<mx::array>& inputs,
|
||||
std::vector<mx::array>& outputs) {
|
||||
auto& x = inputs[0];
|
||||
auto& y = inputs[1];
|
||||
auto& out = outputs[0];
|
||||
|
||||
// Accelerate specialization for contiguous single precision float arrays
|
||||
if (out.dtype() == float32 &&
|
||||
((x.flags().row_contiguous && y.flags().row_contiguous) ||
|
||||
(x.flags().col_contiguous && y.flags().col_contiguous))) {
|
||||
axpby_impl_accelerate<float>(x, y, out, alpha_, beta_);
|
||||
return;
|
||||
}
|
||||
|
||||
// Fall back to common back-end if specializations are not available
|
||||
eval(inputs, outputs);
|
||||
// Dispatch to the correct dtype
|
||||
if (out.dtype() == mx::float32) {
|
||||
return axpby_impl<float>(x, y, out, alpha_, beta_, stream());
|
||||
} else if (out.dtype() == mx::float16) {
|
||||
return axpby_impl<mx::float16_t>(x, y, out, alpha_, beta_, stream());
|
||||
} else if (out.dtype() == mx::bfloat16) {
|
||||
return axpby_impl<mx::bfloat16_t>(x, y, out, alpha_, beta_, stream());
|
||||
} else if (out.dtype() == mx::complex64) {
|
||||
return axpby_impl<mx::complex64_t>(x, y, out, alpha_, beta_, stream());
|
||||
} else {
|
||||
throw std::runtime_error(
|
||||
"Axpby is only supported for floating point types.");
|
||||
}
|
||||
}
|
||||
|
||||
Just this much is enough to run the operation :meth:`axpby` on a CPU stream! If
|
||||
you do not plan on running the operation on the GPU or using transforms on
|
||||
computation graphs that contain :class:`Axpby`, you can stop implementing the
|
||||
primitive here and enjoy the speed-ups you get from the Accelerate library.
|
||||
primitive here.
|
||||
|
||||
Implementing the GPU Back-end
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -824,7 +751,7 @@ Results
|
||||
^^^^^^^
|
||||
|
||||
Let's run a quick benchmark and see how our new ``axpby`` operation compares
|
||||
with the naive :meth:`simple_axpby` we first defined on the CPU.
|
||||
with the naive :meth:`simple_axpby` we first defined.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -832,13 +759,11 @@ with the naive :meth:`simple_axpby` we first defined on the CPU.
|
||||
from mlx_sample_extensions import axpby
|
||||
import time
|
||||
|
||||
mx.set_default_device(mx.cpu)
|
||||
|
||||
def simple_axpby(x: mx.array, y: mx.array, alpha: float, beta: float) -> mx.array:
|
||||
return alpha * x + beta * y
|
||||
|
||||
M = 256
|
||||
N = 512
|
||||
M = 4096
|
||||
N = 4096
|
||||
|
||||
x = mx.random.normal((M, N))
|
||||
y = mx.random.normal((M, N))
|
||||
@@ -849,24 +774,24 @@ with the naive :meth:`simple_axpby` we first defined on the CPU.
|
||||
|
||||
def bench(f):
|
||||
# Warm up
|
||||
for i in range(100):
|
||||
for i in range(5):
|
||||
z = f(x, y, alpha, beta)
|
||||
mx.eval(z)
|
||||
|
||||
# Timed run
|
||||
s = time.time()
|
||||
for i in range(5000):
|
||||
for i in range(100):
|
||||
z = f(x, y, alpha, beta)
|
||||
mx.eval(z)
|
||||
e = time.time()
|
||||
return e - s
|
||||
return 1000 * (e - s) / 100
|
||||
|
||||
simple_time = bench(simple_axpby)
|
||||
custom_time = bench(axpby)
|
||||
|
||||
print(f"Simple axpby: {simple_time:.3f} s | Custom axpby: {custom_time:.3f} s")
|
||||
print(f"Simple axpby: {simple_time:.3f} ms | Custom axpby: {custom_time:.3f} ms")
|
||||
|
||||
The results are ``Simple axpby: 0.114 s | Custom axpby: 0.109 s``. We see
|
||||
The results are ``Simple axpby: 1.559 ms | Custom axpby: 0.774 ms``. We see
|
||||
modest improvements right away!
|
||||
|
||||
This operation is now good to be used to build other operations, in
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
const DOCUMENTATION_OPTIONS = {
|
||||
VERSION: '0.23.2',
|
||||
VERSION: '0.24.0',
|
||||
LANGUAGE: 'en',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
|
||||
Vendored
+296
-293
@@ -123,301 +123,304 @@ $(function(){initNavTree('annotated.html',''); initResizable(true); });
|
||||
<tr id="row_1_0_0_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1allocator_1_1_allocator.html" target="_self">Allocator</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_0_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1allocator_1_1_buffer.html" target="_self">Buffer</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_0_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1allocator_1_1_common_allocator.html" target="_self">CommonAllocator</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_1_" class="arrow" onclick="dynsection.toggleFolder('1_0_1_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1detail.html" target="_self">detail</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_abs.html" target="_self">Abs</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_add.html" target="_self">Add</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_cos.html" target="_self">ArcCos</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_cosh.html" target="_self">ArcCosh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_4_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_sin.html" target="_self">ArcSin</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_5_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_sinh.html" target="_self">ArcSinh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_6_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_tan.html" target="_self">ArcTan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_7_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_tan2.html" target="_self">ArcTan2</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_8_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_tanh.html" target="_self">ArcTanh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_9_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_bitwise_and.html" target="_self">BitwiseAnd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_10_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_bitwise_invert.html" target="_self">BitwiseInvert</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_11_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_bitwise_or.html" target="_self">BitwiseOr</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_12_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_bitwise_xor.html" target="_self">BitwiseXor</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_13_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_ceil.html" target="_self">Ceil</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_14_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_conjugate.html" target="_self">Conjugate</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_15_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_cos.html" target="_self">Cos</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_16_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_cosh.html" target="_self">Cosh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_17_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_divide.html" target="_self">Divide</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_18_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_equal.html" target="_self">Equal</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_19_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_erf.html" target="_self">Erf</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_20_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_erf_inv.html" target="_self">ErfInv</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_21_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_exp.html" target="_self">Exp</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_22_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_expm1.html" target="_self">Expm1</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_23_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_floor.html" target="_self">Floor</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_24_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_greater.html" target="_self">Greater</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_25_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_greater_equal.html" target="_self">GreaterEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_26_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_imag.html" target="_self">Imag</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_27_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_in_tracing.html" target="_self">InTracing</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_28_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_left_shift.html" target="_self">LeftShift</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_29_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_less.html" target="_self">Less</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_30_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_less_equal.html" target="_self">LessEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_31_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_log.html" target="_self">Log</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_32_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_log10.html" target="_self">Log10</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_33_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_log1p.html" target="_self">Log1p</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_34_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_log2.html" target="_self">Log2</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_35_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_log_add_exp.html" target="_self">LogAddExp</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_36_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_logical_and.html" target="_self">LogicalAnd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_37_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_logical_not.html" target="_self">LogicalNot</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_38_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_logical_or.html" target="_self">LogicalOr</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_39_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_maximum.html" target="_self">Maximum</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_40_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_minimum.html" target="_self">Minimum</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_41_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_multiply.html" target="_self">Multiply</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_42_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_na_n_equal.html" target="_self">NaNEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_43_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_negative.html" target="_self">Negative</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_44_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_not_equal.html" target="_self">NotEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_45_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_power.html" target="_self">Power</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_46_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_real.html" target="_self">Real</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_47_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_remainder.html" target="_self">Remainder</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_48_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_retain_graph.html" target="_self">RetainGraph</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_49_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_right_shift.html" target="_self">RightShift</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_50_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_round.html" target="_self">Round</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_51_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_rsqrt.html" target="_self">Rsqrt</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_52_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_select.html" target="_self">Select</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_53_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_sigmoid.html" target="_self">Sigmoid</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_54_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_sign.html" target="_self">Sign</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_55_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_sin.html" target="_self">Sin</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_56_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_sinh.html" target="_self">Sinh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_57_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_sqrt.html" target="_self">Sqrt</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_58_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_square.html" target="_self">Square</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_59_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_subtract.html" target="_self">Subtract</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_60_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_tan.html" target="_self">Tan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_61_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_tanh.html" target="_self">Tanh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_2_" class="arrow" onclick="dynsection.toggleFolder('1_0_2_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1distributed.html" target="_self">distributed</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_0_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span id="arr_1_0_2_0_" class="arrow" onclick="dynsection.toggleFolder('1_0_2_0_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1distributed_1_1detail.html" target="_self">detail</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_0_0_" class="even" style="display:none;"><td class="entry"><span style="width:80px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html" target="_self">GroupImpl</a></td><td class="desc">Abstract base class of a distributed group implementation </td></tr>
|
||||
<tr id="row_1_0_2_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1_all_gather.html" target="_self">AllGather</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1_all_reduce.html" target="_self">AllReduce</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1_dist_primitive.html" target="_self">DistPrimitive</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_4_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html" target="_self">Group</a></td><td class="desc">A <a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html" title="A distributed::Group represents a group of independent mlx processes that can communicate.">distributed::Group</a> represents a group of independent mlx processes that can communicate </td></tr>
|
||||
<tr id="row_1_0_2_5_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1_recv.html" target="_self">Recv</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_6_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1_send.html" target="_self">Send</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_3_" class="arrow" onclick="dynsection.toggleFolder('1_0_3_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1fast.html" target="_self">fast</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html" target="_self">AffineQuantize</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_custom.html" target="_self">Custom</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_custom_kernel.html" target="_self">CustomKernel</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1fast_1_1_custom_kernel_shape_info.html" target="_self">CustomKernelShapeInfo</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_4_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_layer_norm.html" target="_self">LayerNorm</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_5_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_layer_norm_v_j_p.html" target="_self">LayerNormVJP</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_6_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_r_m_s_norm.html" target="_self">RMSNorm</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_7_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_r_m_s_norm_v_j_p.html" target="_self">RMSNormVJP</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_8_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_ro_p_e.html" target="_self">RoPE</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_9_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html" target="_self">ScaledDotProductAttention</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_4_" class="arrow" onclick="dynsection.toggleFolder('1_0_4_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1io.html" target="_self">io</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1io_1_1_file_writer.html" target="_self">FileWriter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1io_1_1_parallel_file_reader.html" target="_self">ParallelFileReader</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1io_1_1_reader.html" target="_self">Reader</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1io_1_1_writer.html" target="_self">Writer</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_5_" class="arrow" onclick="dynsection.toggleFolder('1_0_5_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1metal.html" target="_self">metal</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1metal_1_1_buffer.html" target="_self">Buffer</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_1_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span id="arr_1_0_5_1_" class="arrow" onclick="dynsection.toggleFolder('1_0_5_1_')">►</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html" target="_self">CommandEncoder</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_1_0_" class="even" style="display:none;"><td class="entry"><span style="width:80px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1metal_1_1_command_encoder_1_1_concurrent_context.html" target="_self">ConcurrentContext</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1metal_1_1_device.html" target="_self">Device</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1metal_1_1_device_stream.html" target="_self">DeviceStream</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_4_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1metal_1_1_fence.html" target="_self">Fence</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_5_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1metal_1_1_metal_allocator.html" target="_self">MetalAllocator</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_6_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1metal_1_1_residency_set.html" target="_self">ResidencySet</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_6_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_6_" class="arrow" onclick="dynsection.toggleFolder('1_0_6_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1random.html" target="_self">random</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_6_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1random_1_1_key_sequence.html" target="_self">KeySequence</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_7_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_7_" class="arrow" onclick="dynsection.toggleFolder('1_0_7_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1scheduler.html" target="_self">scheduler</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_7_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1scheduler_1_1_scheduler.html" target="_self">Scheduler</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_7_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html" target="_self">StreamThread</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_8_" class="arrow" onclick="dynsection.toggleFolder('1_0_8_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1simd.html" target="_self">simd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_scalar_t.html" target="_self">ScalarT</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_scalar_t_3_01bool_00_01_n_01_4.html" target="_self">ScalarT< bool, N ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_scalar_t_3_01int64__t_00_01_n_01_4.html" target="_self">ScalarT< int64_t, N ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_scalar_t_3_01int8__t_00_01_n_01_4.html" target="_self">ScalarT< int8_t, N ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_4_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_scalar_t_3_01uint64__t_00_01_n_01_4.html" target="_self">ScalarT< uint64_t, N ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_5_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_simd.html" target="_self">Simd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_6_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html" target="_self">Simd< float16_t, N ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_7_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_simd_3_01_t_00_011_01_4.html" target="_self">Simd< T, 1 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_9_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1___m_l_x___b_float16.html" target="_self">_MLX_BFloat16</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_10_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1___m_l_x___float16.html" target="_self">_MLX_Float16</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_11_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_abs.html" target="_self">Abs</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_12_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_add.html" target="_self">Add</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_13_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_add_m_m.html" target="_self">AddMM</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_14_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arange.html" target="_self">Arange</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_15_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_cos.html" target="_self">ArcCos</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_16_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_cosh.html" target="_self">ArcCosh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_17_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_sin.html" target="_self">ArcSin</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_18_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_sinh.html" target="_self">ArcSinh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_19_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_tan.html" target="_self">ArcTan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_20_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_tan2.html" target="_self">ArcTan2</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_21_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_tanh.html" target="_self">ArcTanh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_22_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arg_partition.html" target="_self">ArgPartition</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_23_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arg_reduce.html" target="_self">ArgReduce</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_24_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arg_sort.html" target="_self">ArgSort</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_25_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_25_" class="arrow" onclick="dynsection.toggleFolder('1_0_25_')">►</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1array.html" target="_self">array</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_25_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1array_1_1_array_iterator.html" target="_self">ArrayIterator</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_25_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1array_1_1_data.html" target="_self">Data</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_25_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1array_1_1_flags.html" target="_self">Flags</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_26_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_as_strided.html" target="_self">AsStrided</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_27_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_as_type.html" target="_self">AsType</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_28_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_bitwise_binary.html" target="_self">BitwiseBinary</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_29_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_bitwise_invert.html" target="_self">BitwiseInvert</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_30_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_block_masked_m_m.html" target="_self">BlockMaskedMM</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_31_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_broadcast.html" target="_self">Broadcast</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_32_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_broadcast_axes.html" target="_self">BroadcastAxes</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_33_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_ceil.html" target="_self">Ceil</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_34_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_cholesky.html" target="_self">Cholesky</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_35_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_35_" class="arrow" onclick="dynsection.toggleFolder('1_0_35_')">►</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_command_encoder.html" target="_self">CommandEncoder</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_35_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_command_encoder_1_1_concurrent_context.html" target="_self">ConcurrentContext</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_36_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_compiled.html" target="_self">Compiled</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_37_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1complex128__t.html" target="_self">complex128_t</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_38_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1complex64__t.html" target="_self">complex64_t</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_39_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_concatenate.html" target="_self">Concatenate</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_40_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_conjugate.html" target="_self">Conjugate</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_41_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_contiguous.html" target="_self">Contiguous</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_42_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_contiguous_iterator.html" target="_self">ContiguousIterator</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_43_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_convolution.html" target="_self">Convolution</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_44_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_copy.html" target="_self">Copy</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_45_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_cos.html" target="_self">Cos</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_46_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_cosh.html" target="_self">Cosh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_47_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_custom_transforms.html" target="_self">CustomTransforms</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_48_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_depends.html" target="_self">Depends</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_49_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_device.html" target="_self">Device</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_50_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_divide.html" target="_self">Divide</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_51_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_div_mod.html" target="_self">DivMod</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_52_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_dtype.html" target="_self">Dtype</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_53_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_dynamic_slice.html" target="_self">DynamicSlice</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_54_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_dynamic_slice_update.html" target="_self">DynamicSliceUpdate</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_55_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_eigh.html" target="_self">Eigh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_56_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_equal.html" target="_self">Equal</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_57_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_erf.html" target="_self">Erf</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_58_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_erf_inv.html" target="_self">ErfInv</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_59_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_event.html" target="_self">Event</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_60_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_exp.html" target="_self">Exp</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_61_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_expand_dims.html" target="_self">ExpandDims</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_62_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_expm1.html" target="_self">Expm1</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_63_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_fence.html" target="_self">Fence</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_64_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_f_f_t.html" target="_self">FFT</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_65_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1finfo.html" target="_self">finfo</a></td><td class="desc">Holds information about floating-point types </td></tr>
|
||||
<tr id="row_1_0_66_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_flatten.html" target="_self">Flatten</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_67_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_floor.html" target="_self">Floor</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_68_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_full.html" target="_self">Full</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_69_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_function_exporter.html" target="_self">FunctionExporter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_70_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_gather.html" target="_self">Gather</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_71_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_gather_axis.html" target="_self">GatherAxis</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_72_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_gather_m_m.html" target="_self">GatherMM</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_73_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_gather_q_m_m.html" target="_self">GatherQMM</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_74_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_greater.html" target="_self">Greater</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_75_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_greater_equal.html" target="_self">GreaterEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_76_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_hadamard.html" target="_self">Hadamard</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_77_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_imag.html" target="_self">Imag</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_78_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_imported_function.html" target="_self">ImportedFunction</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_79_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_inverse.html" target="_self">Inverse</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_80_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_jit_compiler.html" target="_self">JitCompiler</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_81_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_less.html" target="_self">Less</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_82_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_less_equal.html" target="_self">LessEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_83_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_load.html" target="_self">Load</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_84_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_log.html" target="_self">Log</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_85_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_log1p.html" target="_self">Log1p</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_86_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_log_add_exp.html" target="_self">LogAddExp</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_87_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_logical_and.html" target="_self">LogicalAnd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_88_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_logical_not.html" target="_self">LogicalNot</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_89_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_logical_or.html" target="_self">LogicalOr</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_90_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_l_u_f.html" target="_self">LUF</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_91_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_matmul.html" target="_self">Matmul</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_92_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_maximum.html" target="_self">Maximum</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_93_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_minimum.html" target="_self">Minimum</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_94_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_multiply.html" target="_self">Multiply</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_95_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_negative.html" target="_self">Negative</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_96_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_node_namer.html" target="_self">NodeNamer</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_97_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_not_equal.html" target="_self">NotEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_98_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_number_of_elements.html" target="_self">NumberOfElements</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_99_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1numeric__limits.html" target="_self">numeric_limits</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_100_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1numeric__limits_3_01bfloat16__t_01_4.html" target="_self">numeric_limits< bfloat16_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_101_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1numeric__limits_3_01double_01_4.html" target="_self">numeric_limits< double ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_102_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1numeric__limits_3_01float_01_4.html" target="_self">numeric_limits< float ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_103_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1numeric__limits_3_01float16__t_01_4.html" target="_self">numeric_limits< float16_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_104_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_pad.html" target="_self">Pad</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_105_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_partition.html" target="_self">Partition</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_106_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_power.html" target="_self">Power</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_107_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_primitive.html" target="_self">Primitive</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_108_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_print_formatter.html" target="_self">PrintFormatter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_109_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_q_r_f.html" target="_self">QRF</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_110_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_quantized_matmul.html" target="_self">QuantizedMatmul</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_111_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_random_bits.html" target="_self">RandomBits</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_112_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_real.html" target="_self">Real</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_113_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_reduce.html" target="_self">Reduce</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_114_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_reduction_plan.html" target="_self">ReductionPlan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_115_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_remainder.html" target="_self">Remainder</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_116_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_reshape.html" target="_self">Reshape</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_117_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_round.html" target="_self">Round</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_118_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_scalar_vector.html" target="_self">ScalarVector</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_119_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_scan.html" target="_self">Scan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_120_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_scatter.html" target="_self">Scatter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_121_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_scatter_axis.html" target="_self">ScatterAxis</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_122_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_select.html" target="_self">Select</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_123_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sigmoid.html" target="_self">Sigmoid</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_124_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sign.html" target="_self">Sign</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_125_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sin.html" target="_self">Sin</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_126_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sinh.html" target="_self">Sinh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_127_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_slice.html" target="_self">Slice</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_128_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_slice_update.html" target="_self">SliceUpdate</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_129_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_softmax.html" target="_self">Softmax</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_130_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sort.html" target="_self">Sort</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_131_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_split.html" target="_self">Split</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_132_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sqrt.html" target="_self">Sqrt</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_133_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_square.html" target="_self">Square</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_134_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_squeeze.html" target="_self">Squeeze</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_135_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_stop_gradient.html" target="_self">StopGradient</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_136_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_stream.html" target="_self">Stream</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_137_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_stream_context.html" target="_self">StreamContext</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_138_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_subtract.html" target="_self">Subtract</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_139_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_s_v_d.html" target="_self">SVD</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_140_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_tan.html" target="_self">Tan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_141_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_tanh.html" target="_self">Tanh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_142_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_transpose.html" target="_self">Transpose</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_143_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_type_to_dtype.html" target="_self">TypeToDtype</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_144_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_unary_primitive.html" target="_self">UnaryPrimitive</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_145_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_unflatten.html" target="_self">Unflatten</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_146_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_vector_scalar.html" target="_self">VectorScalar</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_147_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_vector_vector.html" target="_self">VectorVector</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_148_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_view.html" target="_self">View</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_1_" class="arrow" onclick="dynsection.toggleFolder('1_0_1_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1cpu.html" target="_self">cpu</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html" target="_self">CommandEncoder</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_2_" class="arrow" onclick="dynsection.toggleFolder('1_0_2_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1detail.html" target="_self">detail</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_abs.html" target="_self">Abs</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_add.html" target="_self">Add</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_cos.html" target="_self">ArcCos</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_cosh.html" target="_self">ArcCosh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_4_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_sin.html" target="_self">ArcSin</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_5_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_sinh.html" target="_self">ArcSinh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_6_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_tan.html" target="_self">ArcTan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_7_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_tan2.html" target="_self">ArcTan2</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_8_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_arc_tanh.html" target="_self">ArcTanh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_9_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_bitwise_and.html" target="_self">BitwiseAnd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_10_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_bitwise_invert.html" target="_self">BitwiseInvert</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_11_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_bitwise_or.html" target="_self">BitwiseOr</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_12_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_bitwise_xor.html" target="_self">BitwiseXor</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_13_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_ceil.html" target="_self">Ceil</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_14_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_conjugate.html" target="_self">Conjugate</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_15_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_cos.html" target="_self">Cos</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_16_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_cosh.html" target="_self">Cosh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_17_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_divide.html" target="_self">Divide</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_18_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_equal.html" target="_self">Equal</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_19_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_erf.html" target="_self">Erf</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_20_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_erf_inv.html" target="_self">ErfInv</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_21_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_exp.html" target="_self">Exp</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_22_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_expm1.html" target="_self">Expm1</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_23_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_floor.html" target="_self">Floor</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_24_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_greater.html" target="_self">Greater</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_25_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_greater_equal.html" target="_self">GreaterEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_26_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_imag.html" target="_self">Imag</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_27_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_in_tracing.html" target="_self">InTracing</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_28_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_left_shift.html" target="_self">LeftShift</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_29_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_less.html" target="_self">Less</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_30_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_less_equal.html" target="_self">LessEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_31_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_log.html" target="_self">Log</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_32_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_log10.html" target="_self">Log10</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_33_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_log1p.html" target="_self">Log1p</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_34_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_log2.html" target="_self">Log2</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_35_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_log_add_exp.html" target="_self">LogAddExp</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_36_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_logical_and.html" target="_self">LogicalAnd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_37_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_logical_not.html" target="_self">LogicalNot</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_38_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_logical_or.html" target="_self">LogicalOr</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_39_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_maximum.html" target="_self">Maximum</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_40_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_minimum.html" target="_self">Minimum</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_41_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_multiply.html" target="_self">Multiply</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_42_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_na_n_equal.html" target="_self">NaNEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_43_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_negative.html" target="_self">Negative</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_44_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_not_equal.html" target="_self">NotEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_45_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_power.html" target="_self">Power</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_46_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_real.html" target="_self">Real</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_47_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_remainder.html" target="_self">Remainder</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_48_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_retain_graph.html" target="_self">RetainGraph</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_49_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_right_shift.html" target="_self">RightShift</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_50_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_round.html" target="_self">Round</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_51_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_rsqrt.html" target="_self">Rsqrt</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_52_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_select.html" target="_self">Select</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_53_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_sigmoid.html" target="_self">Sigmoid</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_54_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_sign.html" target="_self">Sign</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_55_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_sin.html" target="_self">Sin</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_56_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_sinh.html" target="_self">Sinh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_57_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_sqrt.html" target="_self">Sqrt</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_58_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_square.html" target="_self">Square</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_59_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_subtract.html" target="_self">Subtract</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_60_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_tan.html" target="_self">Tan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_61_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1detail_1_1_tanh.html" target="_self">Tanh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_3_" class="arrow" onclick="dynsection.toggleFolder('1_0_3_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1distributed.html" target="_self">distributed</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_0_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span id="arr_1_0_3_0_" class="arrow" onclick="dynsection.toggleFolder('1_0_3_0_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1distributed_1_1detail.html" target="_self">detail</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_0_0_" class="even" style="display:none;"><td class="entry"><span style="width:80px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html" target="_self">GroupImpl</a></td><td class="desc">Abstract base class of a distributed group implementation </td></tr>
|
||||
<tr id="row_1_0_3_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1_all_gather.html" target="_self">AllGather</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1_all_reduce.html" target="_self">AllReduce</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1_dist_primitive.html" target="_self">DistPrimitive</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_4_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html" target="_self">Group</a></td><td class="desc">A <a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html" title="A distributed::Group represents a group of independent mlx processes that can communicate.">distributed::Group</a> represents a group of independent mlx processes that can communicate </td></tr>
|
||||
<tr id="row_1_0_3_5_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1_recv.html" target="_self">Recv</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_3_6_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1distributed_1_1_send.html" target="_self">Send</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_4_" class="arrow" onclick="dynsection.toggleFolder('1_0_4_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1fast.html" target="_self">fast</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html" target="_self">AffineQuantize</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_custom.html" target="_self">Custom</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_custom_kernel.html" target="_self">CustomKernel</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1fast_1_1_custom_kernel_shape_info.html" target="_self">CustomKernelShapeInfo</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_4_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_layer_norm.html" target="_self">LayerNorm</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_5_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_layer_norm_v_j_p.html" target="_self">LayerNormVJP</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_6_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_r_m_s_norm.html" target="_self">RMSNorm</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_7_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_r_m_s_norm_v_j_p.html" target="_self">RMSNormVJP</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_8_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_ro_p_e.html" target="_self">RoPE</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_4_9_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html" target="_self">ScaledDotProductAttention</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_5_" class="arrow" onclick="dynsection.toggleFolder('1_0_5_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1io.html" target="_self">io</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1io_1_1_file_writer.html" target="_self">FileWriter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1io_1_1_parallel_file_reader.html" target="_self">ParallelFileReader</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1io_1_1_reader.html" target="_self">Reader</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_5_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1io_1_1_writer.html" target="_self">Writer</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_6_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_6_" class="arrow" onclick="dynsection.toggleFolder('1_0_6_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1metal.html" target="_self">metal</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_6_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1metal_1_1_buffer.html" target="_self">Buffer</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_6_1_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span id="arr_1_0_6_1_" class="arrow" onclick="dynsection.toggleFolder('1_0_6_1_')">►</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html" target="_self">CommandEncoder</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_6_1_0_" class="even" style="display:none;"><td class="entry"><span style="width:80px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1metal_1_1_command_encoder_1_1_concurrent_context.html" target="_self">ConcurrentContext</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_6_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1metal_1_1_device.html" target="_self">Device</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_6_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1metal_1_1_device_stream.html" target="_self">DeviceStream</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_6_4_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1metal_1_1_fence.html" target="_self">Fence</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_6_5_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1metal_1_1_metal_allocator.html" target="_self">MetalAllocator</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_6_6_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1metal_1_1_residency_set.html" target="_self">ResidencySet</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_7_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_7_" class="arrow" onclick="dynsection.toggleFolder('1_0_7_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1random.html" target="_self">random</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_7_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1random_1_1_key_sequence.html" target="_self">KeySequence</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_8_" class="arrow" onclick="dynsection.toggleFolder('1_0_8_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1scheduler.html" target="_self">scheduler</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1scheduler_1_1_scheduler.html" target="_self">Scheduler</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_8_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html" target="_self">StreamThread</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_9_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_9_" class="arrow" onclick="dynsection.toggleFolder('1_0_9_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1core_1_1simd.html" target="_self">simd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_9_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_scalar_t.html" target="_self">ScalarT</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_9_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_scalar_t_3_01bool_00_01_n_01_4.html" target="_self">ScalarT< bool, N ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_9_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_scalar_t_3_01int64__t_00_01_n_01_4.html" target="_self">ScalarT< int64_t, N ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_9_3_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_scalar_t_3_01int8__t_00_01_n_01_4.html" target="_self">ScalarT< int8_t, N ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_9_4_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_scalar_t_3_01uint64__t_00_01_n_01_4.html" target="_self">ScalarT< uint64_t, N ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_9_5_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_simd.html" target="_self">Simd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_9_6_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_simd_3_01float16__t_00_01_n_01_4.html" target="_self">Simd< float16_t, N ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_9_7_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1simd_1_1_simd_3_01_t_00_011_01_4.html" target="_self">Simd< T, 1 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_10_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1___m_l_x___b_float16.html" target="_self">_MLX_BFloat16</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_11_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1___m_l_x___float16.html" target="_self">_MLX_Float16</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_12_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_abs.html" target="_self">Abs</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_13_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_add.html" target="_self">Add</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_14_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_add_m_m.html" target="_self">AddMM</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_15_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arange.html" target="_self">Arange</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_16_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_cos.html" target="_self">ArcCos</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_17_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_cosh.html" target="_self">ArcCosh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_18_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_sin.html" target="_self">ArcSin</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_19_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_sinh.html" target="_self">ArcSinh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_20_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_tan.html" target="_self">ArcTan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_21_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_tan2.html" target="_self">ArcTan2</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_22_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arc_tanh.html" target="_self">ArcTanh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_23_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arg_partition.html" target="_self">ArgPartition</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_24_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arg_reduce.html" target="_self">ArgReduce</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_25_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_arg_sort.html" target="_self">ArgSort</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_26_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_26_" class="arrow" onclick="dynsection.toggleFolder('1_0_26_')">►</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1array.html" target="_self">array</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_26_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1array_1_1_array_iterator.html" target="_self">ArrayIterator</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_26_1_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1array_1_1_data.html" target="_self">Data</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_26_2_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1array_1_1_flags.html" target="_self">Flags</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_27_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_as_strided.html" target="_self">AsStrided</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_28_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_as_type.html" target="_self">AsType</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_29_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_bitwise_binary.html" target="_self">BitwiseBinary</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_30_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_bitwise_invert.html" target="_self">BitwiseInvert</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_31_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_block_masked_m_m.html" target="_self">BlockMaskedMM</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_32_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_broadcast.html" target="_self">Broadcast</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_33_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_broadcast_axes.html" target="_self">BroadcastAxes</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_34_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_ceil.html" target="_self">Ceil</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_35_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_cholesky.html" target="_self">Cholesky</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_36_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_0_36_" class="arrow" onclick="dynsection.toggleFolder('1_0_36_')">►</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_command_encoder.html" target="_self">CommandEncoder</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_36_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_command_encoder_1_1_concurrent_context.html" target="_self">ConcurrentContext</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_37_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_compiled.html" target="_self">Compiled</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_38_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1complex128__t.html" target="_self">complex128_t</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_39_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1complex64__t.html" target="_self">complex64_t</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_40_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_concatenate.html" target="_self">Concatenate</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_41_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_conjugate.html" target="_self">Conjugate</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_42_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_contiguous.html" target="_self">Contiguous</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_43_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_contiguous_iterator.html" target="_self">ContiguousIterator</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_44_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_convolution.html" target="_self">Convolution</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_45_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_copy.html" target="_self">Copy</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_46_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_cos.html" target="_self">Cos</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_47_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_cosh.html" target="_self">Cosh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_48_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_custom_transforms.html" target="_self">CustomTransforms</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_49_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_depends.html" target="_self">Depends</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_50_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_device.html" target="_self">Device</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_51_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_divide.html" target="_self">Divide</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_52_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_div_mod.html" target="_self">DivMod</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_53_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_dtype.html" target="_self">Dtype</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_54_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_dynamic_slice.html" target="_self">DynamicSlice</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_55_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_dynamic_slice_update.html" target="_self">DynamicSliceUpdate</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_56_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_eigh.html" target="_self">Eigh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_57_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_equal.html" target="_self">Equal</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_58_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_erf.html" target="_self">Erf</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_59_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_erf_inv.html" target="_self">ErfInv</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_60_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_event.html" target="_self">Event</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_61_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_exp.html" target="_self">Exp</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_62_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_expand_dims.html" target="_self">ExpandDims</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_63_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_expm1.html" target="_self">Expm1</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_64_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_fence.html" target="_self">Fence</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_65_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_f_f_t.html" target="_self">FFT</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_66_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1finfo.html" target="_self">finfo</a></td><td class="desc">Holds information about floating-point types </td></tr>
|
||||
<tr id="row_1_0_67_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_flatten.html" target="_self">Flatten</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_68_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_floor.html" target="_self">Floor</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_69_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_full.html" target="_self">Full</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_70_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_function_exporter.html" target="_self">FunctionExporter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_71_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_gather.html" target="_self">Gather</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_72_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_gather_axis.html" target="_self">GatherAxis</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_73_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_gather_m_m.html" target="_self">GatherMM</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_74_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_gather_q_m_m.html" target="_self">GatherQMM</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_75_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_greater.html" target="_self">Greater</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_76_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_greater_equal.html" target="_self">GreaterEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_77_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_hadamard.html" target="_self">Hadamard</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_78_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_imag.html" target="_self">Imag</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_79_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_imported_function.html" target="_self">ImportedFunction</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_80_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_inverse.html" target="_self">Inverse</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_81_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_jit_compiler.html" target="_self">JitCompiler</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_82_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_less.html" target="_self">Less</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_83_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_less_equal.html" target="_self">LessEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_84_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_load.html" target="_self">Load</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_85_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_log.html" target="_self">Log</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_86_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_log1p.html" target="_self">Log1p</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_87_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_log_add_exp.html" target="_self">LogAddExp</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_88_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_logical_and.html" target="_self">LogicalAnd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_89_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_logical_not.html" target="_self">LogicalNot</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_90_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_logical_or.html" target="_self">LogicalOr</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_91_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_l_u_f.html" target="_self">LUF</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_92_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_matmul.html" target="_self">Matmul</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_93_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_maximum.html" target="_self">Maximum</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_94_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_minimum.html" target="_self">Minimum</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_95_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_multiply.html" target="_self">Multiply</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_96_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_negative.html" target="_self">Negative</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_97_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_node_namer.html" target="_self">NodeNamer</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_98_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_not_equal.html" target="_self">NotEqual</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_99_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_number_of_elements.html" target="_self">NumberOfElements</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_100_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1numeric__limits.html" target="_self">numeric_limits</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_101_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1numeric__limits_3_01bfloat16__t_01_4.html" target="_self">numeric_limits< bfloat16_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_102_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1numeric__limits_3_01double_01_4.html" target="_self">numeric_limits< double ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_103_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1numeric__limits_3_01float_01_4.html" target="_self">numeric_limits< float ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_104_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1numeric__limits_3_01float16__t_01_4.html" target="_self">numeric_limits< float16_t ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_105_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_pad.html" target="_self">Pad</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_106_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_partition.html" target="_self">Partition</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_107_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_power.html" target="_self">Power</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_108_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_primitive.html" target="_self">Primitive</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_109_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_print_formatter.html" target="_self">PrintFormatter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_110_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_q_r_f.html" target="_self">QRF</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_111_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_quantized_matmul.html" target="_self">QuantizedMatmul</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_112_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_random_bits.html" target="_self">RandomBits</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_113_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_real.html" target="_self">Real</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_114_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_reduce.html" target="_self">Reduce</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_115_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_reduction_plan.html" target="_self">ReductionPlan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_116_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_remainder.html" target="_self">Remainder</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_117_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_reshape.html" target="_self">Reshape</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_118_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_round.html" target="_self">Round</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_119_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_scalar_vector.html" target="_self">ScalarVector</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_120_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_scan.html" target="_self">Scan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_121_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_scatter.html" target="_self">Scatter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_122_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_scatter_axis.html" target="_self">ScatterAxis</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_123_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_select.html" target="_self">Select</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_124_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sigmoid.html" target="_self">Sigmoid</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_125_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sign.html" target="_self">Sign</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_126_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sin.html" target="_self">Sin</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_127_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sinh.html" target="_self">Sinh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_128_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_slice.html" target="_self">Slice</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_129_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_slice_update.html" target="_self">SliceUpdate</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_130_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_softmax.html" target="_self">Softmax</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_131_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sort.html" target="_self">Sort</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_132_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_split.html" target="_self">Split</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_133_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_sqrt.html" target="_self">Sqrt</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_134_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_square.html" target="_self">Square</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_135_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_squeeze.html" target="_self">Squeeze</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_136_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_stop_gradient.html" target="_self">StopGradient</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_137_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_stream.html" target="_self">Stream</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_138_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_stream_context.html" target="_self">StreamContext</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_139_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_subtract.html" target="_self">Subtract</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_140_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_s_v_d.html" target="_self">SVD</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_141_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_tan.html" target="_self">Tan</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_142_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_tanh.html" target="_self">Tanh</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_143_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_transpose.html" target="_self">Transpose</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_144_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_type_to_dtype.html" target="_self">TypeToDtype</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_145_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_unary_primitive.html" target="_self">UnaryPrimitive</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_146_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_unflatten.html" target="_self">Unflatten</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_147_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_vector_scalar.html" target="_self">VectorScalar</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_148_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1core_1_1_vector_vector.html" target="_self">VectorVector</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_149_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmlx_1_1core_1_1_view.html" target="_self">View</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_" class="even" style="display:none;"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span id="arr_1_1_" class="arrow" onclick="dynsection.toggleFolder('1_1_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemlx_1_1steel.html" target="_self">steel</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_0_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_accum_helper.html" target="_self">AccumHelper</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_1_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_attn_params.html" target="_self">AttnParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_2_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_base_m_m_a_frag.html" target="_self">BaseMMAFrag</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_3_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_base_m_m_a_frag_3_01_t_00_018_00_018_01_4.html" target="_self">BaseMMAFrag< T, 8, 8 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_4_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_1_4_" class="arrow" onclick="dynsection.toggleFolder('1_1_4_')">►</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_block_loader.html" target="_self">BlockLoader</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_4_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_block_loader_1_1_read_vector.html" target="_self">ReadVector</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_5_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_block_loader_t.html" target="_self">BlockLoaderT</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_6_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_block_m_m_a.html" target="_self">BlockMMA</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_7_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_block_swizzle.html" target="_self">BlockSwizzle</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_8_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_channel_helper.html" target="_self">ChannelHelper</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_9_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_channel_helper_3_011_01_4.html" target="_self">ChannelHelper< 1 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_10_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_channel_helper_3_012_01_4.html" target="_self">ChannelHelper< 2 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_11_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_channel_helper_3_013_01_4.html" target="_self">ChannelHelper< 3 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_12_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_channel_helper_3_014_01_4.html" target="_self">ChannelHelper< 4 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_13_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_general_base_info.html" target="_self">Conv2DGeneralBaseInfo</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_14_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_general_jump_params.html" target="_self">Conv2DGeneralJumpParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_15_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_input_block_loader_general.html" target="_self">Conv2DInputBlockLoaderGeneral</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_16_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_input_block_loader_large_filter.html" target="_self">Conv2DInputBlockLoaderLargeFilter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_17_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_input_block_loader_small_channels.html" target="_self">Conv2DInputBlockLoaderSmallChannels</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_18_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_input_block_loader_small_filter.html" target="_self">Conv2DInputBlockLoaderSmallFilter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_19_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_weight_block_loader.html" target="_self">Conv2DWeightBlockLoader</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_20_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_weight_block_loader_general.html" target="_self">Conv2DWeightBlockLoaderGeneral</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_21_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_weight_block_loader_small_channels.html" target="_self">Conv2DWeightBlockLoaderSmallChannels</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_22_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_c_shape.html" target="_self">CShape</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_23_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_g_e_m_m_add_m_m_params.html" target="_self">GEMMAddMMParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_24_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_g_e_m_m_kernel.html" target="_self">GEMMKernel</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_25_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_g_e_m_m_params.html" target="_self">GEMMParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_26_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_g_e_m_m_spilt_k_params.html" target="_self">GEMMSpiltKParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_27_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_implicit_gemm_conv2_d_params.html" target="_self">ImplicitGemmConv2DParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_28_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1integral__constant.html" target="_self">integral_constant</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_29_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1is__integral.html" target="_self">is_integral</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_30_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1is__integral_3_01integral__constant_3_01_t_00_01v_01_4_01_4.html" target="_self">is_integral< integral_constant< T, v > ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_31_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_layout2_d.html" target="_self">Layout2D</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_32_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_loop_alignment.html" target="_self">LoopAlignment</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_33_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_m_m_a_tile.html" target="_self">MMATile</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_34_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_shape2_d.html" target="_self">Shape2D</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_35_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_transform_add.html" target="_self">TransformAdd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_36_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_transform_axpby.html" target="_self">TransformAxpby</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_37_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_transform_none.html" target="_self">TransformNone</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_1_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_attn_mask_params.html" target="_self">AttnMaskParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_2_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_attn_params.html" target="_self">AttnParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_3_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_base_m_m_a_frag.html" target="_self">BaseMMAFrag</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_4_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_base_m_m_a_frag_3_01_t_00_018_00_018_01_4.html" target="_self">BaseMMAFrag< T, 8, 8 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_5_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_1_1_5_" class="arrow" onclick="dynsection.toggleFolder('1_1_5_')">►</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_block_loader.html" target="_self">BlockLoader</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_5_0_" class="even" style="display:none;"><td class="entry"><span style="width:64px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_block_loader_1_1_read_vector.html" target="_self">ReadVector</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_6_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_block_loader_t.html" target="_self">BlockLoaderT</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_7_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_block_m_m_a.html" target="_self">BlockMMA</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_8_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_block_swizzle.html" target="_self">BlockSwizzle</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_9_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_channel_helper.html" target="_self">ChannelHelper</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_10_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_channel_helper_3_011_01_4.html" target="_self">ChannelHelper< 1 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_11_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_channel_helper_3_012_01_4.html" target="_self">ChannelHelper< 2 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_12_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_channel_helper_3_013_01_4.html" target="_self">ChannelHelper< 3 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_13_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_channel_helper_3_014_01_4.html" target="_self">ChannelHelper< 4 ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_14_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_general_base_info.html" target="_self">Conv2DGeneralBaseInfo</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_15_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_general_jump_params.html" target="_self">Conv2DGeneralJumpParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_16_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_input_block_loader_general.html" target="_self">Conv2DInputBlockLoaderGeneral</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_17_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_input_block_loader_large_filter.html" target="_self">Conv2DInputBlockLoaderLargeFilter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_18_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_input_block_loader_small_channels.html" target="_self">Conv2DInputBlockLoaderSmallChannels</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_19_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_input_block_loader_small_filter.html" target="_self">Conv2DInputBlockLoaderSmallFilter</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_20_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_weight_block_loader.html" target="_self">Conv2DWeightBlockLoader</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_21_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_weight_block_loader_general.html" target="_self">Conv2DWeightBlockLoaderGeneral</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_22_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_conv2_d_weight_block_loader_small_channels.html" target="_self">Conv2DWeightBlockLoaderSmallChannels</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_23_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_c_shape.html" target="_self">CShape</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_24_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_g_e_m_m_add_m_m_params.html" target="_self">GEMMAddMMParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_25_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_g_e_m_m_kernel.html" target="_self">GEMMKernel</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_26_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_g_e_m_m_params.html" target="_self">GEMMParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_27_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_g_e_m_m_spilt_k_params.html" target="_self">GEMMSpiltKParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_28_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_implicit_gemm_conv2_d_params.html" target="_self">ImplicitGemmConv2DParams</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_29_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1integral__constant.html" target="_self">integral_constant</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_30_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1is__integral.html" target="_self">is_integral</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_31_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1is__integral_3_01integral__constant_3_01_t_00_01v_01_4_01_4.html" target="_self">is_integral< integral_constant< T, v > ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_32_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_layout2_d.html" target="_self">Layout2D</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_33_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_loop_alignment.html" target="_self">LoopAlignment</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_34_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_m_m_a_tile.html" target="_self">MMATile</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_35_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_shape2_d.html" target="_self">Shape2D</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_36_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_transform_add.html" target="_self">TransformAdd</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_37_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_transform_axpby.html" target="_self">TransformAxpby</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_38_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structmlx_1_1steel_1_1_transform_none.html" target="_self">TransformNone</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_2_" class="arrow" onclick="dynsection.toggleFolder('2_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacepocketfft.html" target="_self">pocketfft</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_2_0_" class="odd" style="display:none;"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span id="arr_2_0_" class="arrow" onclick="dynsection.toggleFolder('2_0_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacepocketfft_1_1detail.html" target="_self">detail</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_2_0_0_" class="odd" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_2_0_0_" class="arrow" onclick="dynsection.toggleFolder('2_0_0_')">►</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacepocketfft_1_1detail_1_1threading.html" target="_self">threading</a></td><td class="desc"></td></tr>
|
||||
|
||||
Vendored
+4
@@ -18,6 +18,9 @@ var annotated_dup =
|
||||
[ "Buffer", "classmlx_1_1core_1_1allocator_1_1_buffer.html", "classmlx_1_1core_1_1allocator_1_1_buffer" ],
|
||||
[ "CommonAllocator", "classmlx_1_1core_1_1allocator_1_1_common_allocator.html", "classmlx_1_1core_1_1allocator_1_1_common_allocator" ]
|
||||
] ],
|
||||
[ "cpu", "namespacemlx_1_1core_1_1cpu.html", [
|
||||
[ "CommandEncoder", "structmlx_1_1core_1_1cpu_1_1_command_encoder.html", "structmlx_1_1core_1_1cpu_1_1_command_encoder" ]
|
||||
] ],
|
||||
[ "detail", "namespacemlx_1_1core_1_1detail.html", [
|
||||
[ "Abs", "structmlx_1_1core_1_1detail_1_1_abs.html", "structmlx_1_1core_1_1detail_1_1_abs" ],
|
||||
[ "Add", "structmlx_1_1core_1_1detail_1_1_add.html", "structmlx_1_1core_1_1detail_1_1_add" ],
|
||||
@@ -280,6 +283,7 @@ var annotated_dup =
|
||||
] ],
|
||||
[ "steel", "namespacemlx_1_1steel.html", [
|
||||
[ "AccumHelper", "structmlx_1_1steel_1_1_accum_helper.html", "structmlx_1_1steel_1_1_accum_helper" ],
|
||||
[ "AttnMaskParams", "structmlx_1_1steel_1_1_attn_mask_params.html", "structmlx_1_1steel_1_1_attn_mask_params" ],
|
||||
[ "AttnParams", "structmlx_1_1steel_1_1_attn_params.html", "structmlx_1_1steel_1_1_attn_params" ],
|
||||
[ "BaseMMAFrag", "structmlx_1_1steel_1_1_base_m_m_a_frag.html", null ],
|
||||
[ "BaseMMAFrag< T, 8, 8 >", "structmlx_1_1steel_1_1_base_m_m_a_frag_3_01_t_00_018_00_018_01_4.html", "structmlx_1_1steel_1_1_base_m_m_a_frag_3_01_t_00_018_00_018_01_4" ],
|
||||
|
||||
Vendored
+428
-445
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -228,7 +228,7 @@ $(function(){initNavTree('attn_2mma_8h_source.html',''); initResizable(true); })
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordflow">for</span> (<span class="keywordtype">short</span> j = 0; j < kElemCols; j++) {</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">if</span> ((off_x + i) < lim_x && (off_y + j) < lim_y) {</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> dst[i * kElemCols + j] =</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keyword">static_cast<</span>T<span class="keyword">></span>(src[(off_x + i) * str_x + (off_x + j) * str_y]);</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keyword">static_cast<</span>T<span class="keyword">></span>(src[(off_x + i) * str_x + (off_y + j) * str_y]);</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> dst[i * kElemCols + j] = T(0);</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> }</div>
|
||||
|
||||
Vendored
+2
@@ -115,6 +115,8 @@ $(function(){initNavTree('attn_2params_8h.html',''); initResizable(true); });
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structmlx_1_1steel_1_1_attn_params.html">mlx::steel::AttnParams</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structmlx_1_1steel_1_1_attn_mask_params.html">mlx::steel::AttnMaskParams</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
|
||||
Vendored
+2
-1
@@ -1,4 +1,5 @@
|
||||
var attn_2params_8h =
|
||||
[
|
||||
[ "mlx::steel::AttnParams", "structmlx_1_1steel_1_1_attn_params.html", "structmlx_1_1steel_1_1_attn_params" ]
|
||||
[ "mlx::steel::AttnParams", "structmlx_1_1steel_1_1_attn_params.html", "structmlx_1_1steel_1_1_attn_params" ],
|
||||
[ "mlx::steel::AttnMaskParams", "structmlx_1_1steel_1_1_attn_mask_params.html", "structmlx_1_1steel_1_1_attn_mask_params" ]
|
||||
];
|
||||
+27
-12
@@ -132,20 +132,33 @@ $(function(){initNavTree('attn_2params_8h_source.html',''); initResizable(true);
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#a4cfd2ccb0fd7eb81c2a781a0614fdcbe"> 26</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#a4cfd2ccb0fd7eb81c2a781a0614fdcbe">NQ_aligned</a>; </div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#aaf953954274794cfcb4e35e82d681b58"> 27</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#aaf953954274794cfcb4e35e82d681b58">NK_aligned</a>; </div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#a9150df3fb79de521bbccf57c43f6b092"> 29</a></span> int64_t <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#a9150df3fb79de521bbccf57c43f6b092">Q_strides</a>[3]; </div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#af71b762aa702a3ee592d2098a14b74a9"> 30</a></span> int64_t <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#af71b762aa702a3ee592d2098a14b74a9">K_strides</a>[3]; </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#ad1495980297901b8ded1fb6dd73979b1"> 31</a></span> int64_t <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#ad1495980297901b8ded1fb6dd73979b1">V_strides</a>[3]; </div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#ab210f29dcc3a732aba34894cd5a42cf7"> 32</a></span> int64_t <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#ab210f29dcc3a732aba34894cd5a42cf7">O_strides</a>[3]; </div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span>};</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#af3fcd78329de006a9a44db64ba469345"> 29</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#af3fcd78329de006a9a44db64ba469345">qL_rem</a>; </div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#a752033afdf873d2c506aa83b02e38139"> 30</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#a752033afdf873d2c506aa83b02e38139">kL_rem</a>; </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#a2d18657f764a8b4097bc5a05238b5dde"> 31</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#a2d18657f764a8b4097bc5a05238b5dde">qL_off</a>; </div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#a9150df3fb79de521bbccf57c43f6b092"> 33</a></span> int64_t <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#a9150df3fb79de521bbccf57c43f6b092">Q_strides</a>[3]; </div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#af71b762aa702a3ee592d2098a14b74a9"> 34</a></span> int64_t <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#af71b762aa702a3ee592d2098a14b74a9">K_strides</a>[3]; </div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#ad1495980297901b8ded1fb6dd73979b1"> 35</a></span> int64_t <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#ad1495980297901b8ded1fb6dd73979b1">V_strides</a>[3]; </div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_params.html#ab210f29dcc3a732aba34894cd5a42cf7"> 36</a></span> int64_t <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_params.html#ab210f29dcc3a732aba34894cd5a42cf7">O_strides</a>[3]; </div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span>} <span class="comment">// namespace steel</span></div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span>} <span class="comment">// namespace mlx</span></div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
||||
<div class="foldopen" id="foldopen00039" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_mask_params.html"> 39</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structmlx_1_1steel_1_1_attn_mask_params.html">AttnMaskParams</a> {</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="structmlx_1_1steel_1_1_attn_mask_params.html#aaf6c5822d2cb2dcf0992798dc08e27d6"> 40</a></span> int64_t <a class="code hl_variable" href="structmlx_1_1steel_1_1_attn_mask_params.html#aaf6c5822d2cb2dcf0992798dc08e27d6">M_strides</a>[3]; </div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>} <span class="comment">// namespace steel</span></div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>} <span class="comment">// namespace mlx</span></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1steel_html"><div class="ttname"><a href="namespacemlx_1_1steel.html">mlx::steel</a></div><div class="ttdef"><b>Definition</b> attn.h:19</div></div>
|
||||
<div class="ttc" id="anamespacemlx_html"><div class="ttname"><a href="namespacemlx.html">mlx</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_mask_params_html"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_mask_params.html">mlx::steel::AttnMaskParams</a></div><div class="ttdef"><b>Definition</b> params.h:39</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_mask_params_html_aaf6c5822d2cb2dcf0992798dc08e27d6"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_mask_params.html#aaf6c5822d2cb2dcf0992798dc08e27d6">mlx::steel::AttnMaskParams::M_strides</a></div><div class="ttdeci">int64_t M_strides[3]</div><div class="ttdoc">Mask strides (B, H, qL, kL = 1)</div><div class="ttdef"><b>Definition</b> params.h:40</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html">mlx::steel::AttnParams</a></div><div class="ttdef"><b>Definition</b> params.h:12</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a07ae31628e43e09bce533c7682c8dae3"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a07ae31628e43e09bce533c7682c8dae3">mlx::steel::AttnParams::D</a></div><div class="ttdeci">int D</div><div class="ttdoc">Head Dim.</div><div class="ttdef"><b>Definition</b> params.h:15</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a1cba7fedbd02e157922619195997cf4f"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a1cba7fedbd02e157922619195997cf4f">mlx::steel::AttnParams::B</a></div><div class="ttdeci">int B</div><div class="ttdoc">Batch Size.</div><div class="ttdef"><b>Definition</b> params.h:13</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a2d18657f764a8b4097bc5a05238b5dde"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a2d18657f764a8b4097bc5a05238b5dde">mlx::steel::AttnParams::qL_off</a></div><div class="ttdeci">int qL_off</div><div class="ttdoc">Offset in query sequence start.</div><div class="ttdef"><b>Definition</b> params.h:31</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a3b3e18cb993ab24819c852bc64288841"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a3b3e18cb993ab24819c852bc64288841">mlx::steel::AttnParams::gqa_factor</a></div><div class="ttdeci">int gqa_factor</div><div class="ttdoc">Group Query factor.</div><div class="ttdef"><b>Definition</b> params.h:20</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a3d286a0c27bace6016ed7a87f43291b7"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a3d286a0c27bace6016ed7a87f43291b7">mlx::steel::AttnParams::H</a></div><div class="ttdeci">int H</div><div class="ttdoc">Heads.</div><div class="ttdef"><b>Definition</b> params.h:14</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a48575afc94ab9ff74deaba61464e57a1"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a48575afc94ab9ff74deaba61464e57a1">mlx::steel::AttnParams::NQ</a></div><div class="ttdeci">int NQ</div><div class="ttdoc">Number of query blocks.</div><div class="ttdef"><b>Definition</b> params.h:23</div></div>
|
||||
@@ -153,12 +166,14 @@ $(function(){initNavTree('attn_2params_8h_source.html',''); initResizable(true);
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a4cfd2ccb0fd7eb81c2a781a0614fdcbe"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a4cfd2ccb0fd7eb81c2a781a0614fdcbe">mlx::steel::AttnParams::NQ_aligned</a></div><div class="ttdeci">int NQ_aligned</div><div class="ttdoc">Number of full query blocks.</div><div class="ttdef"><b>Definition</b> params.h:26</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a59255882cbd78bb6f15e704e3a356a7f"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a59255882cbd78bb6f15e704e3a356a7f">mlx::steel::AttnParams::qL</a></div><div class="ttdeci">int qL</div><div class="ttdoc">Query Sequence Length.</div><div class="ttdef"><b>Definition</b> params.h:17</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a68a66e3fafa922dcfd1ab1f6bdc2375e"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a68a66e3fafa922dcfd1ab1f6bdc2375e">mlx::steel::AttnParams::NK</a></div><div class="ttdeci">int NK</div><div class="ttdoc">Number of key/value blocks.</div><div class="ttdef"><b>Definition</b> params.h:24</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a9150df3fb79de521bbccf57c43f6b092"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a9150df3fb79de521bbccf57c43f6b092">mlx::steel::AttnParams::Q_strides</a></div><div class="ttdeci">int64_t Q_strides[3]</div><div class="ttdoc">Query strides (B, H, L, D = 1)</div><div class="ttdef"><b>Definition</b> params.h:29</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a752033afdf873d2c506aa83b02e38139"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a752033afdf873d2c506aa83b02e38139">mlx::steel::AttnParams::kL_rem</a></div><div class="ttdeci">int kL_rem</div><div class="ttdoc">Remainder in last key/value block.</div><div class="ttdef"><b>Definition</b> params.h:30</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_a9150df3fb79de521bbccf57c43f6b092"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#a9150df3fb79de521bbccf57c43f6b092">mlx::steel::AttnParams::Q_strides</a></div><div class="ttdeci">int64_t Q_strides[3]</div><div class="ttdoc">Query strides (B, H, L, D = 1)</div><div class="ttdef"><b>Definition</b> params.h:33</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_aaf953954274794cfcb4e35e82d681b58"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#aaf953954274794cfcb4e35e82d681b58">mlx::steel::AttnParams::NK_aligned</a></div><div class="ttdeci">int NK_aligned</div><div class="ttdoc">Number of full key/value blocks.</div><div class="ttdef"><b>Definition</b> params.h:27</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_ab210f29dcc3a732aba34894cd5a42cf7"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#ab210f29dcc3a732aba34894cd5a42cf7">mlx::steel::AttnParams::O_strides</a></div><div class="ttdeci">int64_t O_strides[3]</div><div class="ttdoc">Output strides (B, H, L, D = 1)</div><div class="ttdef"><b>Definition</b> params.h:32</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_ad1495980297901b8ded1fb6dd73979b1"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#ad1495980297901b8ded1fb6dd73979b1">mlx::steel::AttnParams::V_strides</a></div><div class="ttdeci">int64_t V_strides[3]</div><div class="ttdoc">Value strides (B, H, L, D = 1)</div><div class="ttdef"><b>Definition</b> params.h:31</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_ab210f29dcc3a732aba34894cd5a42cf7"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#ab210f29dcc3a732aba34894cd5a42cf7">mlx::steel::AttnParams::O_strides</a></div><div class="ttdeci">int64_t O_strides[3]</div><div class="ttdoc">Output strides (B, H, L, D = 1)</div><div class="ttdef"><b>Definition</b> params.h:36</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_ad1495980297901b8ded1fb6dd73979b1"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#ad1495980297901b8ded1fb6dd73979b1">mlx::steel::AttnParams::V_strides</a></div><div class="ttdeci">int64_t V_strides[3]</div><div class="ttdoc">Value strides (B, H, L, D = 1)</div><div class="ttdef"><b>Definition</b> params.h:35</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_ad81bcd32e6ff8fec0000eca505fb6826"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#ad81bcd32e6ff8fec0000eca505fb6826">mlx::steel::AttnParams::scale</a></div><div class="ttdeci">float scale</div><div class="ttdoc">Attention scale.</div><div class="ttdef"><b>Definition</b> params.h:21</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_af71b762aa702a3ee592d2098a14b74a9"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#af71b762aa702a3ee592d2098a14b74a9">mlx::steel::AttnParams::K_strides</a></div><div class="ttdeci">int64_t K_strides[3]</div><div class="ttdoc">Key strides (B, H, L, D = 1)</div><div class="ttdef"><b>Definition</b> params.h:30</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_af3fcd78329de006a9a44db64ba469345"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#af3fcd78329de006a9a44db64ba469345">mlx::steel::AttnParams::qL_rem</a></div><div class="ttdeci">int qL_rem</div><div class="ttdoc">Remainder in last query block.</div><div class="ttdef"><b>Definition</b> params.h:29</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1steel_1_1_attn_params_html_af71b762aa702a3ee592d2098a14b74a9"><div class="ttname"><a href="structmlx_1_1steel_1_1_attn_params.html#af71b762aa702a3ee592d2098a14b74a9">mlx::steel::AttnParams::K_strides</a></div><div class="ttdeci">int64_t K_strides[3]</div><div class="ttdoc">Key strides (B, H, L, D = 1)</div><div class="ttdef"><b>Definition</b> params.h:34</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
var backend_2common_2load_8h =
|
||||
[
|
||||
[ "mlx::core::load", "namespacemlx_1_1core.html#a954de19249da7c1fa39b89bdc47368aa", null ]
|
||||
];
|
||||
@@ -149,10 +149,6 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:ab2b50a44a9d3a06282be4611f5fc7447"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af650e831ce21759da1ac103037d08d84" id="r_af650e831ce21759da1ac103037d08d84"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">mlx::core::is_donatable</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &in, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out)</td></tr>
|
||||
<tr class="separator:af650e831ce21759da1ac103037d08d84"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a830a47d8a317dffb0c88e5a7afe6aee2" id="r_a830a47d8a317dffb0c88e5a7afe6aee2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a830a47d8a317dffb0c88e5a7afe6aee2">mlx::core::move_or_copy</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &in, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out)</td></tr>
|
||||
<tr class="separator:a830a47d8a317dffb0c88e5a7afe6aee2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9fcb3711b150cb65c7778a35c51284b2" id="r_a9fcb3711b150cb65c7778a35c51284b2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a9fcb3711b150cb65c7778a35c51284b2">mlx::core::move_or_copy</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &in, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &strides, <a class="el" href="structmlx_1_1core_1_1array_1_1_flags.html">array::Flags</a> flags, size_t data_size, size_t offset=0)</td></tr>
|
||||
<tr class="separator:a9fcb3711b150cb65c7778a35c51284b2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6783cfc7dbe1a116ba84a3904a37145f" id="r_a6783cfc7dbe1a116ba84a3904a37145f"><td class="memItemLeft" align="right" valign="top">std::pair< bool, <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a6783cfc7dbe1a116ba84a3904a37145f">mlx::core::prepare_reshape</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &in, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out)</td></tr>
|
||||
<tr class="separator:a6783cfc7dbe1a116ba84a3904a37145f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a88d88987bd8bf3ca46bf3b5e8aacce9d" id="r_a88d88987bd8bf3ca46bf3b5e8aacce9d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a88d88987bd8bf3ca46bf3b5e8aacce9d">mlx::core::shared_buffer_reshape</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &in, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &out_strides, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out)</td></tr>
|
||||
|
||||
@@ -11,8 +11,6 @@ var backend_2common_2utils_8h =
|
||||
[ "mlx::core::elem_to_loc", "namespacemlx_1_1core.html#a59c0af06c5325c04ad8d69563c1c6b0a", null ],
|
||||
[ "mlx::core::is_donatable", "namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84", null ],
|
||||
[ "mlx::core::make_contiguous_strides", "namespacemlx_1_1core.html#a449ef1148816a37bbc7ffd43d3c586a0", null ],
|
||||
[ "mlx::core::move_or_copy", "namespacemlx_1_1core.html#a830a47d8a317dffb0c88e5a7afe6aee2", null ],
|
||||
[ "mlx::core::move_or_copy", "namespacemlx_1_1core.html#a9fcb3711b150cb65c7778a35c51284b2", null ],
|
||||
[ "mlx::core::prepare_reshape", "namespacemlx_1_1core.html#a6783cfc7dbe1a116ba84a3904a37145f", null ],
|
||||
[ "mlx::core::shared_buffer_reshape", "namespacemlx_1_1core.html#a88d88987bd8bf3ca46bf3b5e8aacce9d", null ]
|
||||
];
|
||||
+12
-23
@@ -292,30 +292,21 @@ $(function(){initNavTree('backend_2common_2utils_8h_source.html',''); initResiza
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> </div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a830a47d8a317dffb0c88e5a7afe6aee2"> 162</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a830a47d8a317dffb0c88e5a7afe6aee2">move_or_copy</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& in, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out);</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a9fcb3711b150cb65c7778a35c51284b2"> 163</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a830a47d8a317dffb0c88e5a7afe6aee2">move_or_copy</a>(</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& in,</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out,</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& strides,</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <a class="code hl_struct" href="structmlx_1_1core_1_1array_1_1_flags.html">array::Flags</a> flags,</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <span class="keywordtype">size_t</span> data_size,</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordtype">size_t</span> offset = 0);</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> </div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a6783cfc7dbe1a116ba84a3904a37145f"> 171</a></span>std::pair<bool, Strides> <a class="code hl_function" href="namespacemlx_1_1core.html#a6783cfc7dbe1a116ba84a3904a37145f">prepare_reshape</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& in, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out);</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> </div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a88d88987bd8bf3ca46bf3b5e8aacce9d"> 173</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a88d88987bd8bf3ca46bf3b5e8aacce9d">shared_buffer_reshape</a>(</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& in,</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& out_strides,</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out);</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a6783cfc7dbe1a116ba84a3904a37145f"> 162</a></span>std::pair<bool, Strides> <a class="code hl_function" href="namespacemlx_1_1core.html#a6783cfc7dbe1a116ba84a3904a37145f">prepare_reshape</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& in, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out);</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> </div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a88d88987bd8bf3ca46bf3b5e8aacce9d"> 164</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a88d88987bd8bf3ca46bf3b5e8aacce9d">shared_buffer_reshape</a>(</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& in,</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& out_strides,</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out);</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a0a20a6065ae71b64c1e3aa22a45fd8a1"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">mlx::core::array::flags</a></div><div class="ttdeci">const Flags & flags() const</div><div class="ttdoc">Get the Flags bit-field.</div><div class="ttdef"><b>Definition</b> array.h:318</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a0a20a6065ae71b64c1e3aa22a45fd8a1"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">mlx::core::array::flags</a></div><div class="ttdeci">const Flags & flags() const</div><div class="ttdoc">Get the Flags bit-field.</div><div class="ttdef"><b>Definition</b> array.h:313</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a1d06c76b0f3010a5c329d0e9e29e0597"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">mlx::core::array::shape</a></div><div class="ttdeci">const Shape & shape() const</div><div class="ttdoc">The shape of the array as a vector of integers.</div><div class="ttdef"><b>Definition</b> array.h:103</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a28cf1928f5ec2f972a94ff1c0e71187d"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">mlx::core::array::strides</a></div><div class="ttdeci">const Strides & strides() const</div><div class="ttdoc">The strides of the array.</div><div class="ttdef"><b>Definition</b> array.h:117</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a387b67cd3ef5cfc1e749c371766c4a05"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">mlx::core::array::nbytes</a></div><div class="ttdeci">size_t nbytes() const</div><div class="ttdoc">The number of bytes in the array.</div><div class="ttdef"><b>Definition</b> array.h:93</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a4677a404b5d191af20b52649225de087"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a4677a404b5d191af20b52649225de087">mlx::core::array::is_donatable</a></div><div class="ttdeci">bool is_donatable() const</div><div class="ttdoc">True indicates the arrays buffer is safe to reuse.</div><div class="ttdef"><b>Definition</b> array.h:283</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a914577c63755b2e862d2da68bbf8e3dd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a914577c63755b2e862d2da68bbf8e3dd">mlx::core::array::buffer_size</a></div><div class="ttdeci">size_t buffer_size() const</div><div class="ttdef"><b>Definition</b> array.h:343</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a4677a404b5d191af20b52649225de087"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a4677a404b5d191af20b52649225de087">mlx::core::array::is_donatable</a></div><div class="ttdeci">bool is_donatable() const</div><div class="ttdoc">True indicates the arrays buffer is safe to reuse.</div><div class="ttdef"><b>Definition</b> array.h:278</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a914577c63755b2e862d2da68bbf8e3dd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a914577c63755b2e862d2da68bbf8e3dd">mlx::core::array::buffer_size</a></div><div class="ttdeci">size_t buffer_size() const</div><div class="ttdef"><b>Definition</b> array.h:338</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_af329d9432c92de87cbaa2de8454eefc0"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">mlx::core::array::itemsize</a></div><div class="ttdeci">size_t itemsize() const</div><div class="ttdoc">The size of the array's datatype in bytes.</div><div class="ttdef"><b>Definition</b> array.h:83</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a449ef1148816a37bbc7ffd43d3c586a0"><div class="ttname"><a href="namespacemlx_1_1core.html#a449ef1148816a37bbc7ffd43d3c586a0">mlx::core::make_contiguous_strides</a></div><div class="ttdeci">Strides make_contiguous_strides(const Shape &shape)</div><div class="ttdef"><b>Definition</b> utils.h:29</div></div>
|
||||
@@ -324,11 +315,10 @@ $(function(){initNavTree('backend_2common_2utils_8h_source.html',''); initResiza
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6783cfc7dbe1a116ba84a3904a37145f"><div class="ttname"><a href="namespacemlx_1_1core.html#a6783cfc7dbe1a116ba84a3904a37145f">mlx::core::prepare_reshape</a></div><div class="ttdeci">std::pair< bool, Strides > prepare_reshape(const array &in, const array &out)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a694e23f2d59606643728ad443d621416"><div class="ttname"><a href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">mlx::core::Shape</a></div><div class="ttdeci">std::vector< ShapeElem > Shape</div><div class="ttdef"><b>Definition</b> array.h:21</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a79939016d0972ded7db37130da2a8b5c"><div class="ttname"><a href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">mlx::core::Strides</a></div><div class="ttdeci">std::vector< int64_t > Strides</div><div class="ttdef"><b>Definition</b> array.h:22</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a830a47d8a317dffb0c88e5a7afe6aee2"><div class="ttname"><a href="namespacemlx_1_1core.html#a830a47d8a317dffb0c88e5a7afe6aee2">mlx::core::move_or_copy</a></div><div class="ttdeci">void move_or_copy(const array &in, array &out)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a88d88987bd8bf3ca46bf3b5e8aacce9d"><div class="ttname"><a href="namespacemlx_1_1core.html#a88d88987bd8bf3ca46bf3b5e8aacce9d">mlx::core::shared_buffer_reshape</a></div><div class="ttdeci">void shared_buffer_reshape(const array &in, const Strides &out_strides, array &out)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ab2b50a44a9d3a06282be4611f5fc7447"><div class="ttname"><a href="namespacemlx_1_1core.html#ab2b50a44a9d3a06282be4611f5fc7447">mlx::core::check_contiguity</a></div><div class="ttdeci">auto check_contiguity(const Shape &shape, const Strides &strides)</div><div class="ttdef"><b>Definition</b> utils.h:134</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_af650e831ce21759da1ac103037d08d84"><div class="ttname"><a href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">mlx::core::is_donatable</a></div><div class="ttdeci">bool is_donatable(const array &in, const array &out)</div><div class="ttdef"><b>Definition</b> utils.h:155</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_af89751d79339f3e4d9318ea97d64d114"><div class="ttname"><a href="namespacemlx_1_1core.html#af89751d79339f3e4d9318ea97d64d114">mlx::core::enable_for_arrays_t</a></div><div class="ttdeci">typename std::enable_if_t< is_arrays_v< T... > > enable_for_arrays_t</div><div class="ttdef"><b>Definition</b> array.h:630</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_af89751d79339f3e4d9318ea97d64d114"><div class="ttname"><a href="namespacemlx_1_1core.html#af89751d79339f3e4d9318ea97d64d114">mlx::core::enable_for_arrays_t</a></div><div class="ttdeci">typename std::enable_if_t< is_arrays_v< T... > > enable_for_arrays_t</div><div class="ttdef"><b>Definition</b> array.h:615</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html_a5ea4f0e40900e8c7e0830e1fb561af1a"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">mlx::core::ContiguousIterator::loc</a></div><div class="ttdeci">int64_t loc</div><div class="ttdef"><b>Definition</b> utils.h:126</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html_a727442ddff5fd3c3ebe09b000a01c9d3"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html#a727442ddff5fd3c3ebe09b000a01c9d3">mlx::core::ContiguousIterator::ContiguousIterator</a></div><div class="ttdeci">ContiguousIterator()</div><div class="ttdef"><b>Definition</b> utils.h:104</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html_a8760380bff7462a886e7a4edd2955375"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html#a8760380bff7462a886e7a4edd2955375">mlx::core::ContiguousIterator::ContiguousIterator</a></div><div class="ttdeci">ContiguousIterator(const Shape &shape, const Strides &strides, int dims)</div><div class="ttdef"><b>Definition</b> utils.h:114</div></div>
|
||||
@@ -336,8 +326,7 @@ $(function(){initNavTree('backend_2common_2utils_8h_source.html',''); initResiza
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html_aad921dd422adb0a0f555e19a2f42239c"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">mlx::core::ContiguousIterator::step</a></div><div class="ttdeci">void step()</div><div class="ttdef"><b>Definition</b> utils.h:74</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html_af08f009e0a72414d274db2ff1b2c7dd5"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html#af08f009e0a72414d274db2ff1b2c7dd5">mlx::core::ContiguousIterator::seek</a></div><div class="ttdeci">void seek(int64_t n)</div><div class="ttdef"><b>Definition</b> utils.h:89</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html_afa2e2bde9bfa57ac759bc7f5b881262a"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html#afa2e2bde9bfa57ac759bc7f5b881262a">mlx::core::ContiguousIterator::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdef"><b>Definition</b> utils.h:99</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html">mlx::core::array::Flags</a></div><div class="ttdef"><b>Definition</b> array.h:225</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_a3170fa381dc7a90f6eabcc029bdf9bfd"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">mlx::core::array::Flags::row_contiguous</a></div><div class="ttdeci">bool row_contiguous</div><div class="ttdef"><b>Definition</b> array.h:237</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_a3170fa381dc7a90f6eabcc029bdf9bfd"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">mlx::core::array::Flags::row_contiguous</a></div><div class="ttdeci">bool row_contiguous</div><div class="ttdef"><b>Definition</b> array.h:244</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
+2
-2
@@ -178,7 +178,7 @@ $(function(){initNavTree('backend_2metal_2device_8h_source.html',''); initResiza
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ab69ff0d7f14b9b59db4df0608193dce4"> 63</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ab69ff0d7f14b9b59db4df0608193dce4">set_input_array</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <span class="keywordtype">int</span> idx, int64_t offset = 0);</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a6a2e28e542eaa2886041bddd51ff6522"> 64</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a6a2e28e542eaa2886041bddd51ff6522">set_output_array</a>(<a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <span class="keywordtype">int</span> idx, int64_t offset = 0);</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ada20558738968ca2ecdcd95f228e028a"> 65</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ada20558738968ca2ecdcd95f228e028a">register_output_array</a>(<a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a);</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a2d42827ff8551ec43cef2d33b9051c0f"> 65</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a2d42827ff8551ec43cef2d33b9051c0f">register_output_array</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a);</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a85796b2bf41dbf347ae0978d4660600d"> 66</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a85796b2bf41dbf347ae0978d4660600d">dispatch_threadgroups</a>(MTL::Size grid_dims, MTL::Size group_dims);</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a0a8501b940e5a347475fa4bc38fb4c05"> 67</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a0a8501b940e5a347475fa4bc38fb4c05">dispatch_threads</a>(MTL::Size grid_dims, MTL::Size group_dims);</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ad538ae88f90560063f9ba502e2795991"> 68</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ad538ae88f90560063f9ba502e2795991">maybeInsertBarrier</a>();</div>
|
||||
@@ -472,6 +472,7 @@ $(function(){initNavTree('backend_2metal_2device_8h_source.html',''); initResiza
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html">mlx::core::metal::CommandEncoder</a></div><div class="ttdef"><b>Definition</b> device.h:43</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_a0a8501b940e5a347475fa4bc38fb4c05"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a0a8501b940e5a347475fa4bc38fb4c05">mlx::core::metal::CommandEncoder::dispatch_threads</a></div><div class="ttdeci">void dispatch_threads(MTL::Size grid_dims, MTL::Size group_dims)</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_a27ded7e54bc1712063c874646b445509"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a27ded7e54bc1712063c874646b445509">mlx::core::metal::CommandEncoder::inputs</a></div><div class="ttdeci">std::unordered_set< const void * > & inputs()</div><div class="ttdef"><b>Definition</b> device.h:108</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_a2d42827ff8551ec43cef2d33b9051c0f"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a2d42827ff8551ec43cef2d33b9051c0f">mlx::core::metal::CommandEncoder::register_output_array</a></div><div class="ttdeci">void register_output_array(const array &a)</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_a3f42a1362b4a513fa89e7b3dcc570a8e"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a3f42a1362b4a513fa89e7b3dcc570a8e">mlx::core::metal::CommandEncoder::operator=</a></div><div class="ttdeci">CommandEncoder & operator=(const CommandEncoder &)=delete</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_a48b548a0b15f9d1279c938a1c6167034"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a48b548a0b15f9d1279c938a1c6167034">mlx::core::metal::CommandEncoder::start_concurrent</a></div><div class="ttdeci">ConcurrentContext start_concurrent()</div><div class="ttdef"><b>Definition</b> device.h:102</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_a68c3c6a036e11ec40211c09811bbed1b"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a68c3c6a036e11ec40211c09811bbed1b">mlx::core::metal::CommandEncoder::set_vector_bytes</a></div><div class="ttdeci">void set_vector_bytes(const std::vector< T > &vec, size_t nelems, int idx)</div><div class="ttdef"><b>Definition</b> device.h:84</div></div>
|
||||
@@ -487,7 +488,6 @@ $(function(){initNavTree('backend_2metal_2device_8h_source.html',''); initResiza
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_abc52d18ea87d213c47fd26062c829849"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#abc52d18ea87d213c47fd26062c829849">mlx::core::metal::CommandEncoder::set_bytes</a></div><div class="ttdeci">void set_bytes(const T &v, int idx)</div><div class="ttdef"><b>Definition</b> device.h:98</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_ac68ca977b5bde5434284ce7979647f14"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ac68ca977b5bde5434284ce7979647f14">mlx::core::metal::CommandEncoder::CommandEncoder</a></div><div class="ttdeci">CommandEncoder(const CommandEncoder &)=delete</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_ad538ae88f90560063f9ba502e2795991"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ad538ae88f90560063f9ba502e2795991">mlx::core::metal::CommandEncoder::maybeInsertBarrier</a></div><div class="ttdeci">void maybeInsertBarrier()</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_ada20558738968ca2ecdcd95f228e028a"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ada20558738968ca2ecdcd95f228e028a">mlx::core::metal::CommandEncoder::register_output_array</a></div><div class="ttdeci">void register_output_array(array &a)</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_ae890f5cefa4ae24ae0f5d8e46a313a92"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ae890f5cefa4ae24ae0f5d8e46a313a92">mlx::core::metal::CommandEncoder::set_buffer</a></div><div class="ttdeci">void set_buffer(const MTL::Buffer *buf, int idx, int64_t offset=0)</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_aeef08f5f3c015578d40de756a6465aa2"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#aeef08f5f3c015578d40de756a6465aa2">mlx::core::metal::CommandEncoder::update_fence</a></div><div class="ttdeci">void update_fence(MTL::Fence *fence)</div><div class="ttdef"><b>Definition</b> device.h:79</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1metal_1_1_command_encoder_html_aefa48740fdee884f02e2d379bca4e78f"><div class="ttname"><a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#aefa48740fdee884f02e2d379bca4e78f">mlx::core::metal::CommandEncoder::outputs</a></div><div class="ttdeci">std::unordered_set< const void * > outputs()</div><div class="ttdef"><b>Definition</b> device.h:113</div></div>
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
var backend_2metal_2event_8h =
|
||||
[
|
||||
[ "mlx::core::encode_signal", "namespacemlx_1_1core.html#a6d452306f0f046a7d021bd94f8713a89", null ],
|
||||
[ "mlx::core::encode_wait", "namespacemlx_1_1core.html#a2874ba55b73057b76c23a7429fdd2d6e", null ]
|
||||
];
|
||||
@@ -147,9 +147,6 @@ Functions</h2></td></tr>
|
||||
<tr class="memitem:aaf51544472fa87fa974686eacdd2a4a6" id="r_aaf51544472fa87fa974686eacdd2a4a6"><td class="memTemplParams" colspan="2">template<typename T, typename... Args> </td></tr>
|
||||
<tr class="memitem:aaf51544472fa87fa974686eacdd2a4a6"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#aaf51544472fa87fa974686eacdd2a4a6">mlx::core::concatenate</a> (std::string &acc, T first, Args... args)</td></tr>
|
||||
<tr class="separator:aaf51544472fa87fa974686eacdd2a4a6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a357f4172305d2021bde8cf07d99adb7d" id="r_a357f4172305d2021bde8cf07d99adb7d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1array.html">array</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a357f4172305d2021bde8cf07d99adb7d">mlx::core::unsafe_weak_copy</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &x)</td></tr>
|
||||
<tr class="memdesc:a357f4172305d2021bde8cf07d99adb7d"><td class="mdescLeft"> </td><td class="mdescRight">Get a new array that refers to the same data but has a non-owning pointer to them. <br /></td></tr>
|
||||
<tr class="separator:a357f4172305d2021bde8cf07d99adb7d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
+1
-2
@@ -10,6 +10,5 @@ var backend_2metal_2utils_8h =
|
||||
[ "mlx::core::get_primitive_string", "namespacemlx_1_1core.html#ad4be35b310a252edd80d9cf04f094a60", null ],
|
||||
[ "mlx::core::make_string", "namespacemlx_1_1core.html#aed148d95e7b5221f1312473deded0d27", null ],
|
||||
[ "mlx::core::type_to_name", "namespacemlx_1_1core.html#af1fdfdaa5644394362e6baba30701bae", null ],
|
||||
[ "mlx::core::type_to_name", "namespacemlx_1_1core.html#aef60e3a8d9c987c9c338b193673d2164", null ],
|
||||
[ "mlx::core::unsafe_weak_copy", "namespacemlx_1_1core.html#a357f4172305d2021bde8cf07d99adb7d", null ]
|
||||
[ "mlx::core::type_to_name", "namespacemlx_1_1core.html#aef60e3a8d9c987c9c338b193673d2164", null ]
|
||||
];
|
||||
+2
-22
@@ -185,35 +185,15 @@ $(function(){initNavTree('backend_2metal_2utils_8h_source.html',''); initResizab
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a76a2e310857f60f5ea6f1388d45b964d">concatenate</a>(acc, args...);</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span></div>
|
||||
<div class="foldopen" id="foldopen00076" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a357f4172305d2021bde8cf07d99adb7d"> 76</a></span><span class="keyword">inline</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a> <a class="code hl_function" href="namespacemlx_1_1core.html#a357f4172305d2021bde8cf07d99adb7d">unsafe_weak_copy</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& x) {</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">return</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>(</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> x.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ab3daf04c27c4593d9d73c397b8484a08">buffer</a>(),</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> x.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>(),</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> x.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>(),</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> x.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> x.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>(),</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> x.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>(),</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> [](<span class="keyword">auto</span> b) {});</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="abackend_2metal_2device_8h_html"><div class="ttname"><a href="backend_2metal_2device_8h.html">device.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_primitive_html"><div class="ttname"><a href="classmlx_1_1core_1_1_primitive.html">mlx::core::Primitive</a></div><div class="ttdef"><b>Definition</b> primitives.h:48</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_primitive_html_ae1aff91354ce036596088a3e19474ecb"><div class="ttname"><a href="classmlx_1_1core_1_1_primitive.html#ae1aff91354ce036596088a3e19474ecb">mlx::core::Primitive::print</a></div><div class="ttdeci">virtual void print(std::ostream &os)=0</div><div class="ttdoc">Print the primitive.</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a0a20a6065ae71b64c1e3aa22a45fd8a1"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">mlx::core::array::flags</a></div><div class="ttdeci">const Flags & flags() const</div><div class="ttdoc">Get the Flags bit-field.</div><div class="ttdef"><b>Definition</b> array.h:318</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a1d06c76b0f3010a5c329d0e9e29e0597"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">mlx::core::array::shape</a></div><div class="ttdeci">const Shape & shape() const</div><div class="ttdoc">The shape of the array as a vector of integers.</div><div class="ttdef"><b>Definition</b> array.h:103</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a28cf1928f5ec2f972a94ff1c0e71187d"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">mlx::core::array::strides</a></div><div class="ttdeci">const Strides & strides() const</div><div class="ttdoc">The strides of the array.</div><div class="ttdef"><b>Definition</b> array.h:117</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ab3daf04c27c4593d9d73c397b8484a08"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ab3daf04c27c4593d9d73c397b8484a08">mlx::core::array::buffer</a></div><div class="ttdeci">allocator::Buffer & buffer()</div><div class="ttdef"><b>Definition</b> array.h:336</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ae29e7d6fbfbea1e5e321a8d1ea3cfacd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">mlx::core::array::dtype</a></div><div class="ttdeci">Dtype dtype() const</div><div class="ttdoc">Get the arrays data type.</div><div class="ttdef"><b>Definition</b> array.h:131</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_afaf2a370fa35d96af1b27a4b814e3bfd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">mlx::core::array::data_size</a></div><div class="ttdeci">size_t data_size() const</div><div class="ttdoc">The size (in elements) of the underlying buffer the array points to.</div><div class="ttdef"><b>Definition</b> array.h:332</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a0f0f59d3ffe2d16a684e5fc093302e15"><div class="ttname"><a href="namespacemlx_1_1core.html#a0f0f59d3ffe2d16a684e5fc093302e15">mlx::core::get_block_dims</a></div><div class="ttdeci">MTL::Size get_block_dims(int dim0, int dim1, int dim2, int pow2=10)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a357f4172305d2021bde8cf07d99adb7d"><div class="ttname"><a href="namespacemlx_1_1core.html#a357f4172305d2021bde8cf07d99adb7d">mlx::core::unsafe_weak_copy</a></div><div class="ttdeci">array unsafe_weak_copy(const array &x)</div><div class="ttdoc">Get a new array that refers to the same data but has a non-owning pointer to them.</div><div class="ttdef"><b>Definition</b> utils.h:76</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a489e45b3a5cd8b46e8ea56b9132eb230"><div class="ttname"><a href="namespacemlx_1_1core.html#a489e45b3a5cd8b46e8ea56b9132eb230">mlx::core::debug_set_primitive_buffer_label</a></div><div class="ttdeci">void debug_set_primitive_buffer_label(MTL::CommandBuffer *command_buffer, Primitive &primitive)</div><div class="ttdef"><b>Definition</b> utils.h:46</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a694e23f2d59606643728ad443d621416"><div class="ttname"><a href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">mlx::core::Shape</a></div><div class="ttdeci">std::vector< ShapeElem > Shape</div><div class="ttdef"><b>Definition</b> array.h:21</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a76a2e310857f60f5ea6f1388d45b964d"><div class="ttname"><a href="namespacemlx_1_1core.html#a76a2e310857f60f5ea6f1388d45b964d">mlx::core::concatenate</a></div><div class="ttdeci">void concatenate(std::string &acc, T first)</div><div class="ttdef"><b>Definition</b> utils.h:62</div></div>
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+6
-5
@@ -108,16 +108,17 @@ $(function(){initNavTree('classmlx_1_1core_1_1_event.html',''); initResizable(tr
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#a833506419b2110ad1abd89b2dd238b4d">Event</a>()=default</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#a13e4835f2ffb2cc22e29148a448ea184">Event</a>(const Stream &steam)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#a98f1f98d6cac43ddb682522acdce63d5">Event</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#acdc48fc71fcf3f8d128be029d63b7826">Event</a>(Stream stream)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"><span class="mlabel">explicit</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#a05a9a3de88185b4a89e154242b4e770a">is_signaled</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#af408d30df17c4771e9e2aa550cb6e921">raw_event</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#a0d077b11f4b28f882b42440b7ac6d40d">set_value</a>(uint64_t v)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#a65a858445506a61be5889ae0e3651b89">signal</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#a0d077b11f4b28f882b42440b7ac6d40d">set_value</a>(uint64_t v)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#a65a858445506a61be5889ae0e3651b89">signal</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#ab514bd9e9c21d1fdd7c1460dc7d0ec7f">signal</a>(Stream stream)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614">stream</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#aa77afd9669e2ef9d5e9ae1c2c6fd24fa">valid</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#ab71c7baee3d1d02ad6a2001bbf90b970">value</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#a634afd918e6ed847f354531ba9f48252">wait</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html#ac58282a36a02aed7a5bd59b1602d11a8">wait</a>(Stream stream)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_event.html">mlx::core::Event</a></td><td class="entry"></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
+58
-39
@@ -113,14 +113,18 @@ $(function(){initNavTree('classmlx_1_1core_1_1_event.html',''); initResizable(tr
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a833506419b2110ad1abd89b2dd238b4d" id="r_a833506419b2110ad1abd89b2dd238b4d"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a833506419b2110ad1abd89b2dd238b4d">Event</a> ()=default</td></tr>
|
||||
<tr class="separator:a833506419b2110ad1abd89b2dd238b4d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a13e4835f2ffb2cc22e29148a448ea184" id="r_a13e4835f2ffb2cc22e29148a448ea184"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a13e4835f2ffb2cc22e29148a448ea184">Event</a> (const <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> &steam)</td></tr>
|
||||
<tr class="separator:a13e4835f2ffb2cc22e29148a448ea184"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a98f1f98d6cac43ddb682522acdce63d5" id="r_a98f1f98d6cac43ddb682522acdce63d5"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a98f1f98d6cac43ddb682522acdce63d5">Event</a> ()</td></tr>
|
||||
<tr class="separator:a98f1f98d6cac43ddb682522acdce63d5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:acdc48fc71fcf3f8d128be029d63b7826" id="r_acdc48fc71fcf3f8d128be029d63b7826"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#acdc48fc71fcf3f8d128be029d63b7826">Event</a> (<a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> <a class="el" href="#a193143bad31b68c699fa27f135b45614">stream</a>)</td></tr>
|
||||
<tr class="separator:acdc48fc71fcf3f8d128be029d63b7826"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a634afd918e6ed847f354531ba9f48252" id="r_a634afd918e6ed847f354531ba9f48252"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a634afd918e6ed847f354531ba9f48252">wait</a> ()</td></tr>
|
||||
<tr class="separator:a634afd918e6ed847f354531ba9f48252"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a65a858445506a61be5889ae0e3651b89" id="r_a65a858445506a61be5889ae0e3651b89"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a65a858445506a61be5889ae0e3651b89">signal</a> ()</td></tr>
|
||||
<tr class="separator:a65a858445506a61be5889ae0e3651b89"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac58282a36a02aed7a5bd59b1602d11a8" id="r_ac58282a36a02aed7a5bd59b1602d11a8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac58282a36a02aed7a5bd59b1602d11a8">wait</a> (<a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> <a class="el" href="#a193143bad31b68c699fa27f135b45614">stream</a>)</td></tr>
|
||||
<tr class="separator:ac58282a36a02aed7a5bd59b1602d11a8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab514bd9e9c21d1fdd7c1460dc7d0ec7f" id="r_ab514bd9e9c21d1fdd7c1460dc7d0ec7f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ab514bd9e9c21d1fdd7c1460dc7d0ec7f">signal</a> (<a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> <a class="el" href="#a193143bad31b68c699fa27f135b45614">stream</a>)</td></tr>
|
||||
<tr class="separator:ab514bd9e9c21d1fdd7c1460dc7d0ec7f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a05a9a3de88185b4a89e154242b4e770a" id="r_a05a9a3de88185b4a89e154242b4e770a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#a05a9a3de88185b4a89e154242b4e770a">is_signaled</a> () const</td></tr>
|
||||
<tr class="separator:a05a9a3de88185b4a89e154242b4e770a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa77afd9669e2ef9d5e9ae1c2c6fd24fa" id="r_aa77afd9669e2ef9d5e9ae1c2c6fd24fa"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa77afd9669e2ef9d5e9ae1c2c6fd24fa">valid</a> () const</td></tr>
|
||||
@@ -131,12 +135,10 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="separator:a0d077b11f4b28f882b42440b7ac6d40d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a193143bad31b68c699fa27f135b45614" id="r_a193143bad31b68c699fa27f135b45614"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="#a193143bad31b68c699fa27f135b45614">stream</a> () const</td></tr>
|
||||
<tr class="separator:a193143bad31b68c699fa27f135b45614"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af408d30df17c4771e9e2aa550cb6e921" id="r_af408d30df17c4771e9e2aa550cb6e921"><td class="memItemLeft" align="right" valign="top">const std::shared_ptr< void > & </td><td class="memItemRight" valign="bottom"><a class="el" href="#af408d30df17c4771e9e2aa550cb6e921">raw_event</a> () const</td></tr>
|
||||
<tr class="separator:af408d30df17c4771e9e2aa550cb6e921"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="a833506419b2110ad1abd89b2dd238b4d" name="a833506419b2110ad1abd89b2dd238b4d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a833506419b2110ad1abd89b2dd238b4d">◆ </a></span>Event() <span class="overload">[1/2]</span></h2>
|
||||
<a id="a98f1f98d6cac43ddb682522acdce63d5" name="a98f1f98d6cac43ddb682522acdce63d5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a98f1f98d6cac43ddb682522acdce63d5">◆ </a></span>Event() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -153,26 +155,34 @@ Public Member Functions</h2></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel default">default</span></span> </td>
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a13e4835f2ffb2cc22e29148a448ea184" name="a13e4835f2ffb2cc22e29148a448ea184"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a13e4835f2ffb2cc22e29148a448ea184">◆ </a></span>Event() <span class="overload">[2/2]</span></h2>
|
||||
<a id="acdc48fc71fcf3f8d128be029d63b7826" name="acdc48fc71fcf3f8d128be029d63b7826"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#acdc48fc71fcf3f8d128be029d63b7826">◆ </a></span>Event() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">mlx::core::Event::Event </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> &</td> <td class="paramname"><span class="paramname"><em>steam</em></span></td><td>)</td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a></td> <td class="paramname"><span class="paramname"><em>stream</em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel explicit">explicit</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
@@ -193,31 +203,6 @@ Public Member Functions</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="af408d30df17c4771e9e2aa550cb6e921" name="af408d30df17c4771e9e2aa550cb6e921"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af408d30df17c4771e9e2aa550cb6e921">◆ </a></span>raw_event()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const std::shared_ptr< void > & mlx::core::Event::raw_event </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a0d077b11f4b28f882b42440b7ac6d40d" name="a0d077b11f4b28f882b42440b7ac6d40d"></a>
|
||||
@@ -246,7 +231,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<a id="a65a858445506a61be5889ae0e3651b89" name="a65a858445506a61be5889ae0e3651b89"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a65a858445506a61be5889ae0e3651b89">◆ </a></span>signal()</h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a65a858445506a61be5889ae0e3651b89">◆ </a></span>signal() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -260,6 +245,23 @@ Public Member Functions</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ab514bd9e9c21d1fdd7c1460dc7d0ec7f" name="ab514bd9e9c21d1fdd7c1460dc7d0ec7f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab514bd9e9c21d1fdd7c1460dc7d0ec7f">◆ </a></span>signal() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void mlx::core::Event::signal </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a></td> <td class="paramname"><span class="paramname"><em>stream</em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a193143bad31b68c699fa27f135b45614" name="a193143bad31b68c699fa27f135b45614"></a>
|
||||
@@ -338,7 +340,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<a id="a634afd918e6ed847f354531ba9f48252" name="a634afd918e6ed847f354531ba9f48252"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a634afd918e6ed847f354531ba9f48252">◆ </a></span>wait()</h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a634afd918e6ed847f354531ba9f48252">◆ </a></span>wait() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -352,6 +354,23 @@ Public Member Functions</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac58282a36a02aed7a5bd59b1602d11a8" name="ac58282a36a02aed7a5bd59b1602d11a8"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac58282a36a02aed7a5bd59b1602d11a8">◆ </a></span>wait() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void mlx::core::Event::wait </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a></td> <td class="paramname"><span class="paramname"><em>stream</em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
|
||||
+5
-4
@@ -1,13 +1,14 @@
|
||||
var classmlx_1_1core_1_1_event =
|
||||
[
|
||||
[ "Event", "classmlx_1_1core_1_1_event.html#a833506419b2110ad1abd89b2dd238b4d", null ],
|
||||
[ "Event", "classmlx_1_1core_1_1_event.html#a13e4835f2ffb2cc22e29148a448ea184", null ],
|
||||
[ "Event", "classmlx_1_1core_1_1_event.html#a98f1f98d6cac43ddb682522acdce63d5", null ],
|
||||
[ "Event", "classmlx_1_1core_1_1_event.html#acdc48fc71fcf3f8d128be029d63b7826", null ],
|
||||
[ "is_signaled", "classmlx_1_1core_1_1_event.html#a05a9a3de88185b4a89e154242b4e770a", null ],
|
||||
[ "raw_event", "classmlx_1_1core_1_1_event.html#af408d30df17c4771e9e2aa550cb6e921", null ],
|
||||
[ "set_value", "classmlx_1_1core_1_1_event.html#a0d077b11f4b28f882b42440b7ac6d40d", null ],
|
||||
[ "signal", "classmlx_1_1core_1_1_event.html#a65a858445506a61be5889ae0e3651b89", null ],
|
||||
[ "signal", "classmlx_1_1core_1_1_event.html#ab514bd9e9c21d1fdd7c1460dc7d0ec7f", null ],
|
||||
[ "stream", "classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614", null ],
|
||||
[ "valid", "classmlx_1_1core_1_1_event.html#aa77afd9669e2ef9d5e9ae1c2c6fd24fa", null ],
|
||||
[ "value", "classmlx_1_1core_1_1_event.html#ab71c7baee3d1d02ad6a2001bbf90b970", null ],
|
||||
[ "wait", "classmlx_1_1core_1_1_event.html#a634afd918e6ed847f354531ba9f48252", null ]
|
||||
[ "wait", "classmlx_1_1core_1_1_event.html#a634afd918e6ed847f354531ba9f48252", null ],
|
||||
[ "wait", "classmlx_1_1core_1_1_event.html#ac58282a36a02aed7a5bd59b1602d11a8", null ]
|
||||
];
|
||||
+4
-5
@@ -108,11 +108,10 @@ $(function(){initNavTree('classmlx_1_1core_1_1_fence.html',''); initResizable(tr
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classmlx_1_1core_1_1_fence.html">mlx::core::Fence</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html#a3e3ed08eb6a1025b051b5a435f6f95f7">Fence</a>(const Stream &stream)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html">mlx::core::Fence</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html#a653279d4023d69751a930a91d3bf010a">update</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html">mlx::core::Fence</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html#a6c5652aad6e93b06c72258bb8d9c19fc">update_gpu</a>(const array &x)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html">mlx::core::Fence</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html#a1ccbe354d043e6c4d76286c6635a38e2">wait</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html">mlx::core::Fence</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html#ab6d783dee02656ebb8ffcbbfa6de5b53">wait_gpu</a>(array &x)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html">mlx::core::Fence</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html#aeb09655b3ef4db12810defebdbbdac33">Fence</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html">mlx::core::Fence</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html#a7cabe72d8b165344ff9f7118975b6214">Fence</a>(Stream stream)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html">mlx::core::Fence</a></td><td class="entry"><span class="mlabel">explicit</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html#a19438c60b5e9c6f64529c8f0329ead13">update</a>(Stream stream, const array &x)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html">mlx::core::Fence</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html#a9d9bc0b57f741577a34f8dfd3b1de8f2">wait</a>(Stream stream, const array &x)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_fence.html">mlx::core::Fence</a></td><td class="entry"></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
+55
-50
@@ -113,38 +113,69 @@ $(function(){initNavTree('classmlx_1_1core_1_1_fence.html',''); initResizable(tr
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a3e3ed08eb6a1025b051b5a435f6f95f7" id="r_a3e3ed08eb6a1025b051b5a435f6f95f7"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a3e3ed08eb6a1025b051b5a435f6f95f7">Fence</a> (const <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> &stream)</td></tr>
|
||||
<tr class="separator:a3e3ed08eb6a1025b051b5a435f6f95f7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6c5652aad6e93b06c72258bb8d9c19fc" id="r_a6c5652aad6e93b06c72258bb8d9c19fc"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a6c5652aad6e93b06c72258bb8d9c19fc">update_gpu</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &x)</td></tr>
|
||||
<tr class="separator:a6c5652aad6e93b06c72258bb8d9c19fc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab6d783dee02656ebb8ffcbbfa6de5b53" id="r_ab6d783dee02656ebb8ffcbbfa6de5b53"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ab6d783dee02656ebb8ffcbbfa6de5b53">wait_gpu</a> (<a class="el" href="classmlx_1_1core_1_1array.html">array</a> &x)</td></tr>
|
||||
<tr class="separator:ab6d783dee02656ebb8ffcbbfa6de5b53"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1ccbe354d043e6c4d76286c6635a38e2" id="r_a1ccbe354d043e6c4d76286c6635a38e2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a1ccbe354d043e6c4d76286c6635a38e2">wait</a> ()</td></tr>
|
||||
<tr class="separator:a1ccbe354d043e6c4d76286c6635a38e2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a653279d4023d69751a930a91d3bf010a" id="r_a653279d4023d69751a930a91d3bf010a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a653279d4023d69751a930a91d3bf010a">update</a> ()</td></tr>
|
||||
<tr class="separator:a653279d4023d69751a930a91d3bf010a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aeb09655b3ef4db12810defebdbbdac33" id="r_aeb09655b3ef4db12810defebdbbdac33"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#aeb09655b3ef4db12810defebdbbdac33">Fence</a> ()</td></tr>
|
||||
<tr class="separator:aeb09655b3ef4db12810defebdbbdac33"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7cabe72d8b165344ff9f7118975b6214" id="r_a7cabe72d8b165344ff9f7118975b6214"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a7cabe72d8b165344ff9f7118975b6214">Fence</a> (<a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:a7cabe72d8b165344ff9f7118975b6214"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a19438c60b5e9c6f64529c8f0329ead13" id="r_a19438c60b5e9c6f64529c8f0329ead13"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a19438c60b5e9c6f64529c8f0329ead13">update</a> (<a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &x)</td></tr>
|
||||
<tr class="separator:a19438c60b5e9c6f64529c8f0329ead13"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9d9bc0b57f741577a34f8dfd3b1de8f2" id="r_a9d9bc0b57f741577a34f8dfd3b1de8f2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a9d9bc0b57f741577a34f8dfd3b1de8f2">wait</a> (<a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &x)</td></tr>
|
||||
<tr class="separator:a9d9bc0b57f741577a34f8dfd3b1de8f2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="a3e3ed08eb6a1025b051b5a435f6f95f7" name="a3e3ed08eb6a1025b051b5a435f6f95f7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3e3ed08eb6a1025b051b5a435f6f95f7">◆ </a></span>Fence()</h2>
|
||||
<a id="aeb09655b3ef4db12810defebdbbdac33" name="aeb09655b3ef4db12810defebdbbdac33"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aeb09655b3ef4db12810defebdbbdac33">◆ </a></span>Fence() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">mlx::core::Fence::Fence </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> &</td> <td class="paramname"><span class="paramname"><em>stream</em></span></td><td>)</td>
|
||||
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a7cabe72d8b165344ff9f7118975b6214" name="a7cabe72d8b165344ff9f7118975b6214"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a7cabe72d8b165344ff9f7118975b6214">◆ </a></span>Fence() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">mlx::core::Fence::Fence </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a></td> <td class="paramname"><span class="paramname"><em>stream</em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel explicit">explicit</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="a653279d4023d69751a930a91d3bf010a" name="a653279d4023d69751a930a91d3bf010a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a653279d4023d69751a930a91d3bf010a">◆ </a></span>update()</h2>
|
||||
<a id="a19438c60b5e9c6f64529c8f0329ead13" name="a19438c60b5e9c6f64529c8f0329ead13"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a19438c60b5e9c6f64529c8f0329ead13">◆ </a></span>update()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -152,33 +183,20 @@ Public Member Functions</h2></td></tr>
|
||||
<tr>
|
||||
<td class="memname">void mlx::core::Fence::update </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a></td> <td class="paramname"><span class="paramname"><em>stream</em></span>, </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a6c5652aad6e93b06c72258bb8d9c19fc" name="a6c5652aad6e93b06c72258bb8d9c19fc"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a6c5652aad6e93b06c72258bb8d9c19fc">◆ </a></span>update_gpu()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void mlx::core::Fence::update_gpu </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &</td> <td class="paramname"><span class="paramname"><em>x</em></span></td><td>)</td>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &</td> <td class="paramname"><span class="paramname"><em>x</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a1ccbe354d043e6c4d76286c6635a38e2" name="a1ccbe354d043e6c4d76286c6635a38e2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1ccbe354d043e6c4d76286c6635a38e2">◆ </a></span>wait()</h2>
|
||||
<a id="a9d9bc0b57f741577a34f8dfd3b1de8f2" name="a9d9bc0b57f741577a34f8dfd3b1de8f2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a9d9bc0b57f741577a34f8dfd3b1de8f2">◆ </a></span>wait()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -186,25 +204,12 @@ Public Member Functions</h2></td></tr>
|
||||
<tr>
|
||||
<td class="memname">void mlx::core::Fence::wait </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a></td> <td class="paramname"><span class="paramname"><em>stream</em></span>, </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ab6d783dee02656ebb8ffcbbfa6de5b53" name="ab6d783dee02656ebb8ffcbbfa6de5b53"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab6d783dee02656ebb8ffcbbfa6de5b53">◆ </a></span>wait_gpu()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void mlx::core::Fence::wait_gpu </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="classmlx_1_1core_1_1array.html">array</a> &</td> <td class="paramname"><span class="paramname"><em>x</em></span></td><td>)</td>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &</td> <td class="paramname"><span class="paramname"><em>x</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -212,7 +217,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>mlx/backend/metal/<a class="el" href="fence_8h_source.html">fence.h</a></li>
|
||||
<li>mlx/<a class="el" href="fence_8h_source.html">fence.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
+4
-5
@@ -1,8 +1,7 @@
|
||||
var classmlx_1_1core_1_1_fence =
|
||||
[
|
||||
[ "Fence", "classmlx_1_1core_1_1_fence.html#a3e3ed08eb6a1025b051b5a435f6f95f7", null ],
|
||||
[ "update", "classmlx_1_1core_1_1_fence.html#a653279d4023d69751a930a91d3bf010a", null ],
|
||||
[ "update_gpu", "classmlx_1_1core_1_1_fence.html#a6c5652aad6e93b06c72258bb8d9c19fc", null ],
|
||||
[ "wait", "classmlx_1_1core_1_1_fence.html#a1ccbe354d043e6c4d76286c6635a38e2", null ],
|
||||
[ "wait_gpu", "classmlx_1_1core_1_1_fence.html#ab6d783dee02656ebb8ffcbbfa6de5b53", null ]
|
||||
[ "Fence", "classmlx_1_1core_1_1_fence.html#aeb09655b3ef4db12810defebdbbdac33", null ],
|
||||
[ "Fence", "classmlx_1_1core_1_1_fence.html#a7cabe72d8b165344ff9f7118975b6214", null ],
|
||||
[ "update", "classmlx_1_1core_1_1_fence.html#a19438c60b5e9c6f64529c8f0329ead13", null ],
|
||||
[ "wait", "classmlx_1_1core_1_1_fence.html#a9d9bc0b57f741577a34f8dfd3b1de8f2", null ]
|
||||
];
|
||||
+29
-31
@@ -119,20 +119,20 @@ $(function(){initNavTree('classmlx_1_1core_1_1array.html',''); initResizable(tru
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a297df274e2da5cb884257bbeffd6b187">array</a>(const array &other)=default</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ab6cbccbba66cc54acda4390b19f0397c">array</a>(array &&other)=default</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#abc26528271076510822e374d1668a94b">array</a>(Shape shape, Dtype dtype, std::shared_ptr< Primitive > primitive, std::vector< array > inputs)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a2476f987ec7a5afb7665d3b3974db0b2">array</a>(allocator::Buffer data, Shape shape, Dtype dtype, Strides strides, size_t data_size, Flags flags, Deleter deleter=allocator::free)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">explicit</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a000c3cfe13cb378bf0523b62816190da">attach_event</a>(Event e) const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078a308bd3e5bf976888b120dd36d0c2d2ae">available</a> enum value</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a76b258b169d7d73419ebbf85340fb914">begin</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ab3daf04c27c4593d9d73c397b8484a08">buffer</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a634466ce661485394f2fdc3bd6796bcd">buffer</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a914577c63755b2e862d2da68bbf8e3dd">buffer_size</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(const array &other, const Strides &strides, Flags flags, size_t data_size, size_t offset=0)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a92974c656c35a972ad241f80584bbd29">copy_shared_buffer</a>(const array &other)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a99fb28eeab39b9f429373f8bd7557676">data</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ab84c792117e29cdf90ef3433303f6141">data_shared_ptr</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a84948c29df8c957904919c8602692bd2">detach</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a000c3cfe13cb378bf0523b62816190da">attach_event</a>(Event e) const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078a308bd3e5bf976888b120dd36d0c2d2ae">available</a> enum value</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a76b258b169d7d73419ebbf85340fb914">begin</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ab3daf04c27c4593d9d73c397b8484a08">buffer</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a634466ce661485394f2fdc3bd6796bcd">buffer</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a914577c63755b2e862d2da68bbf8e3dd">buffer_size</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(const array &other, const Strides &strides, Flags flags, size_t data_size, size_t offset=0)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a92974c656c35a972ad241f80584bbd29">copy_shared_buffer</a>(const array &other)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a99fb28eeab39b9f429373f8bd7557676">data</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ab84c792117e29cdf90ef3433303f6141">data_shared_ptr</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a84948c29df8c957904919c8602692bd2">detach</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a9ff36a88bfd7c99a2662136ee9315f4e">detach_event</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a5daf64552fb450825c9b382f3a5fa2d4">end</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a2820c45188071a22175e9fa42e10a49a">eval</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
@@ -150,8 +150,6 @@ $(function(){initNavTree('classmlx_1_1core_1_1array.html',''); initResizable(tru
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a8650a99a6b7549bc823b03ad92590ff7">item</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a45b1c9763fe921fe5880ca28316ae98c">make_arrays</a>(std::vector< Shape > shapes, const std::vector< Dtype > &dtypes, const std::shared_ptr< Primitive > &primitive, const std::vector< array > &inputs)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8">move_shared_buffer</a>(array other, const Strides &strides, Flags flags, size_t data_size, size_t offset=0)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a38d7ad605f8282e5e49d0c09e0555c78">move_shared_buffer</a>(array other)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">nbytes</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a53006e77d13d9d88b525ef577748939f">ndim</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a8acf2b4c75f9b7f79da6675dbc36cf36">operator=</a>(const array &other) &&=delete</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
@@ -163,21 +161,21 @@ $(function(){initNavTree('classmlx_1_1core_1_1array.html',''); initResizable(tru
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a790548666511d8c6d9f92ee79d2ce14c">primitive</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#af5ad83605d4eea81561246873bee1d7c">primitive_id</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a5119cd616ec3c05d65878944b8889469">primitive_ptr</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078af8a6f8eed2395ab89a758dec434393ae">scheduled</a> enum value</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(allocator::Buffer buffer, Deleter d=allocator::free)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a5f338202a39d37fa3f4241e851a15838">set_data</a>(allocator::Buffer buffer, size_t data_size, Strides strides, Flags flags, Deleter d=allocator::free)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a8fccbe7a4edfd8cca168161124e263b1">set_siblings</a>(std::vector< array > siblings, uint16_t position)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a63598018999b49f1340b183cb303f05c">set_status</a>(Status s) const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#af26e6be1a9e6239471a4c24310c0c7c8">set_tracer</a>(bool is_tracer)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ac50382b652f6e8fbd50d42b7ff595810">shape</a>(int dim) const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#acf80fde8f743f65ad5b4be69fcb7a74d">siblings</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a7263f23e70a580a9bc2129fbcde36e6c">siblings</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078">Status</a> enum name</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a7102659be87e9ef62966696ab9b07dad">status</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ac9bfc251a9937eaefbe7f8c5ffd304d1">strides</a>(int dim) const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(allocator::Buffer buffer, Deleter d=allocator::free)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a5f338202a39d37fa3f4241e851a15838">set_data</a>(allocator::Buffer buffer, size_t data_size, Strides strides, Flags flags, Deleter d=allocator::free)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a8fccbe7a4edfd8cca168161124e263b1">set_siblings</a>(std::vector< array > siblings, uint16_t position)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a63598018999b49f1340b183cb303f05c">set_status</a>(Status s) const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#af26e6be1a9e6239471a4c24310c0c7c8">set_tracer</a>(bool is_tracer)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ac50382b652f6e8fbd50d42b7ff595810">shape</a>(int dim) const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#acf80fde8f743f65ad5b4be69fcb7a74d">siblings</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a7263f23e70a580a9bc2129fbcde36e6c">siblings</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078">Status</a> enum name</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a7102659be87e9ef62966696ab9b07dad">status</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>() const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#ac9bfc251a9937eaefbe7f8c5ffd304d1">strides</a>(int dim) const</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">unsafe_weak_copy</a>(const array &other)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078ae8a9988458b0355001674020a45656fb">unscheduled</a> enum value</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a648592006f1c92287734ba2428eaa45e">wait</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html#a2f16c1ef8ee248d2fba95520c86dfad2">~array</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1array.html">mlx::core::array</a></td><td class="entry"></td></tr>
|
||||
|
||||
+69
-130
@@ -126,7 +126,6 @@ Classes</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
|
||||
Public Types</h2></td></tr>
|
||||
<tr class="memitem:a199726612fa8a4bcd5c2d05eadad7078" id="r_a199726612fa8a4bcd5c2d05eadad7078"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="#a199726612fa8a4bcd5c2d05eadad7078">Status</a> { <a class="el" href="#a199726612fa8a4bcd5c2d05eadad7078ae8a9988458b0355001674020a45656fb">unscheduled</a>
|
||||
, <a class="el" href="#a199726612fa8a4bcd5c2d05eadad7078af8a6f8eed2395ab89a758dec434393ae">scheduled</a>
|
||||
, <a class="el" href="#a199726612fa8a4bcd5c2d05eadad7078a6fc3d7595445dd877584495f47535268">evaluated</a>
|
||||
, <a class="el" href="#a199726612fa8a4bcd5c2d05eadad7078a308bd3e5bf976888b120dd36d0c2d2ae">available</a>
|
||||
}</td></tr>
|
||||
@@ -219,9 +218,6 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:af5ad83605d4eea81561246873bee1d7c" id="r_af5ad83605d4eea81561246873bee1d7c"><td class="memItemLeft" align="right" valign="top">std::uintptr_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#af5ad83605d4eea81561246873bee1d7c">primitive_id</a> () const</td></tr>
|
||||
<tr class="memdesc:af5ad83605d4eea81561246873bee1d7c"><td class="mdescLeft"> </td><td class="mdescRight">A unique identifier for an arrays primitive. <br /></td></tr>
|
||||
<tr class="separator:af5ad83605d4eea81561246873bee1d7c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2476f987ec7a5afb7665d3b3974db0b2" id="r_a2476f987ec7a5afb7665d3b3974db0b2"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a2476f987ec7a5afb7665d3b3974db0b2">array</a> (<a class="el" href="classmlx_1_1core_1_1allocator_1_1_buffer.html">allocator::Buffer</a> <a class="el" href="#a72e3ce6c03fefe272cadf214bd127b95">data</a>, <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> <a class="el" href="#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>, <a class="el" href="structmlx_1_1core_1_1_dtype.html">Dtype</a> <a class="el" href="#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>, <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> <a class="el" href="#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>, size_t <a class="el" href="#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>, <a class="el" href="structmlx_1_1core_1_1array_1_1_flags.html">Flags</a> <a class="el" href="#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>, <a class="el" href="namespacemlx_1_1core.html#af834c1e18d6f11c4f233a2e1ce814a4b">Deleter</a> deleter=<a class="el" href="namespacemlx_1_1core_1_1allocator.html#a77f0a1215be242db6485612bcb273af5">allocator::free</a>)</td></tr>
|
||||
<tr class="memdesc:a2476f987ec7a5afb7665d3b3974db0b2"><td class="mdescLeft"> </td><td class="mdescRight">Build an array from all the info held by the array description. <br /></td></tr>
|
||||
<tr class="separator:a2476f987ec7a5afb7665d3b3974db0b2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a790548666511d8c6d9f92ee79d2ce14c" id="r_a790548666511d8c6d9f92ee79d2ce14c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmlx_1_1core_1_1_primitive.html">Primitive</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="#a790548666511d8c6d9f92ee79d2ce14c">primitive</a> () const</td></tr>
|
||||
<tr class="memdesc:a790548666511d8c6d9f92ee79d2ce14c"><td class="mdescLeft"> </td><td class="mdescRight">The array's primitive. <br /></td></tr>
|
||||
<tr class="separator:a790548666511d8c6d9f92ee79d2ce14c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -285,6 +281,8 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="separator:a0a8e4d6e67e739a712876bb36f88f9bf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a000c3cfe13cb378bf0523b62816190da" id="r_a000c3cfe13cb378bf0523b62816190da"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a000c3cfe13cb378bf0523b62816190da">attach_event</a> (<a class="el" href="classmlx_1_1core_1_1_event.html">Event</a> e) const</td></tr>
|
||||
<tr class="separator:a000c3cfe13cb378bf0523b62816190da"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9ff36a88bfd7c99a2662136ee9315f4e" id="r_a9ff36a88bfd7c99a2662136ee9315f4e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a9ff36a88bfd7c99a2662136ee9315f4e">detach_event</a> () const</td></tr>
|
||||
<tr class="separator:a9ff36a88bfd7c99a2662136ee9315f4e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af26e6be1a9e6239471a4c24310c0c7c8" id="r_af26e6be1a9e6239471a4c24310c0c7c8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#af26e6be1a9e6239471a4c24310c0c7c8">set_tracer</a> (bool <a class="el" href="#af9acb115019b995354d366c4ac6b968c">is_tracer</a>)</td></tr>
|
||||
<tr class="separator:af26e6be1a9e6239471a4c24310c0c7c8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af9acb115019b995354d366c4ac6b968c" id="r_af9acb115019b995354d366c4ac6b968c"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#af9acb115019b995354d366c4ac6b968c">is_tracer</a> () const</td></tr>
|
||||
@@ -297,10 +295,6 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="separator:ad2814dbffa5ad174d9c97a10bf4cf26b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a92974c656c35a972ad241f80584bbd29" id="r_a92974c656c35a972ad241f80584bbd29"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a92974c656c35a972ad241f80584bbd29">copy_shared_buffer</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &other)</td></tr>
|
||||
<tr class="separator:a92974c656c35a972ad241f80584bbd29"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad41cc5e7aebfcad849ad15d697584cf8" id="r_ad41cc5e7aebfcad849ad15d697584cf8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ad41cc5e7aebfcad849ad15d697584cf8">move_shared_buffer</a> (<a class="el" href="classmlx_1_1core_1_1array.html">array</a> other, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &<a class="el" href="#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>, <a class="el" href="structmlx_1_1core_1_1array_1_1_flags.html">Flags</a> <a class="el" href="#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>, size_t <a class="el" href="#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>, size_t offset=0)</td></tr>
|
||||
<tr class="separator:ad41cc5e7aebfcad849ad15d697584cf8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a38d7ad605f8282e5e49d0c09e0555c78" id="r_a38d7ad605f8282e5e49d0c09e0555c78"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a38d7ad605f8282e5e49d0c09e0555c78">move_shared_buffer</a> (<a class="el" href="classmlx_1_1core_1_1array.html">array</a> other)</td></tr>
|
||||
<tr class="separator:a38d7ad605f8282e5e49d0c09e0555c78"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a95e6b156c8e05439f076b85c05079387" id="r_a95e6b156c8e05439f076b85c05079387"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a95e6b156c8e05439f076b85c05079387">overwrite_descriptor</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &other)</td></tr>
|
||||
<tr class="separator:a95e6b156c8e05439f076b85c05079387"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2f16c1ef8ee248d2fba95520c86dfad2" id="r_a2f16c1ef8ee248d2fba95520c86dfad2"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a2f16c1ef8ee248d2fba95520c86dfad2">~array</a> ()</td></tr>
|
||||
@@ -310,6 +304,9 @@ Public Member Functions</h2></td></tr>
|
||||
Static Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a45b1c9763fe921fe5880ca28316ae98c" id="r_a45b1c9763fe921fe5880ca28316ae98c"><td class="memItemLeft" align="right" valign="top">static std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="#a45b1c9763fe921fe5880ca28316ae98c">make_arrays</a> (std::vector< <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> > shapes, const std::vector< <a class="el" href="structmlx_1_1core_1_1_dtype.html">Dtype</a> > &dtypes, const std::shared_ptr< <a class="el" href="classmlx_1_1core_1_1_primitive.html">Primitive</a> > &<a class="el" href="#a790548666511d8c6d9f92ee79d2ce14c">primitive</a>, const std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &<a class="el" href="#a2913abcdf71826827c8457f529825fff">inputs</a>)</td></tr>
|
||||
<tr class="separator:a45b1c9763fe921fe5880ca28316ae98c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a797ae8a1708a7c67d62e6c55c321d802" id="r_a797ae8a1708a7c67d62e6c55c321d802"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classmlx_1_1core_1_1array.html">array</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a797ae8a1708a7c67d62e6c55c321d802">unsafe_weak_copy</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &other)</td></tr>
|
||||
<tr class="memdesc:a797ae8a1708a7c67d62e6c55c321d802"><td class="mdescLeft"> </td><td class="mdescRight">Get a new array that refers to the same data as the input but with a non-owning pointer to it. <br /></td></tr>
|
||||
<tr class="separator:a797ae8a1708a7c67d62e6c55c321d802"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Member Enumeration Documentation</h2>
|
||||
<a id="a199726612fa8a4bcd5c2d05eadad7078" name="a199726612fa8a4bcd5c2d05eadad7078"></a>
|
||||
@@ -325,7 +322,6 @@ Static Public Member Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
<table class="fieldtable">
|
||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a199726612fa8a4bcd5c2d05eadad7078ae8a9988458b0355001674020a45656fb" name="a199726612fa8a4bcd5c2d05eadad7078ae8a9988458b0355001674020a45656fb"></a>unscheduled </td><td class="fielddoc"></td></tr>
|
||||
<tr><td class="fieldname"><a id="a199726612fa8a4bcd5c2d05eadad7078af8a6f8eed2395ab89a758dec434393ae" name="a199726612fa8a4bcd5c2d05eadad7078af8a6f8eed2395ab89a758dec434393ae"></a>scheduled </td><td class="fielddoc"></td></tr>
|
||||
<tr><td class="fieldname"><a id="a199726612fa8a4bcd5c2d05eadad7078a6fc3d7595445dd877584495f47535268" name="a199726612fa8a4bcd5c2d05eadad7078a6fc3d7595445dd877584495f47535268"></a>evaluated </td><td class="fielddoc"></td></tr>
|
||||
<tr><td class="fieldname"><a id="a199726612fa8a4bcd5c2d05eadad7078a308bd3e5bf976888b120dd36d0c2d2ae" name="a199726612fa8a4bcd5c2d05eadad7078a308bd3e5bf976888b120dd36d0c2d2ae"></a>available </td><td class="fielddoc"></td></tr>
|
||||
</table>
|
||||
@@ -334,7 +330,7 @@ Static Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="a75fac72da3ce214fa3737df92a64b232" name="a75fac72da3ce214fa3737df92a64b232"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a75fac72da3ce214fa3737df92a64b232">◆ </a></span>array() <span class="overload">[1/12]</span></h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a75fac72da3ce214fa3737df92a64b232">◆ </a></span>array() <span class="overload">[1/11]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -367,7 +363,7 @@ template<typename T> </div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="a6db4b8c28c767cc16ad2785ece496dca" name="a6db4b8c28c767cc16ad2785ece496dca"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a6db4b8c28c767cc16ad2785ece496dca">◆ </a></span>array() <span class="overload">[2/12]</span></h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a6db4b8c28c767cc16ad2785ece496dca">◆ </a></span>array() <span class="overload">[2/11]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -396,7 +392,7 @@ template<typename T> </div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="abcc030a1c2434ec75ad9425751bffdc7" name="abcc030a1c2434ec75ad9425751bffdc7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#abcc030a1c2434ec75ad9425751bffdc7">◆ </a></span>array() <span class="overload">[3/12]</span></h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#abcc030a1c2434ec75ad9425751bffdc7">◆ </a></span>array() <span class="overload">[3/11]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -432,7 +428,7 @@ template<typename It> </div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="a87f170384f4fb93decf2b80ae7280f00" name="a87f170384f4fb93decf2b80ae7280f00"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a87f170384f4fb93decf2b80ae7280f00">◆ </a></span>array() <span class="overload">[4/12]</span></h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a87f170384f4fb93decf2b80ae7280f00">◆ </a></span>array() <span class="overload">[4/11]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -463,7 +459,7 @@ template<typename T> </div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="a46642301da11e3eb4312c37349fbc9d7" name="a46642301da11e3eb4312c37349fbc9d7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a46642301da11e3eb4312c37349fbc9d7">◆ </a></span>array() <span class="overload">[5/12]</span></h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a46642301da11e3eb4312c37349fbc9d7">◆ </a></span>array() <span class="overload">[5/11]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -488,7 +484,7 @@ template<typename T> </div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="a5e1812029394bfb1a706c83611286f49" name="a5e1812029394bfb1a706c83611286f49"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a5e1812029394bfb1a706c83611286f49">◆ </a></span>array() <span class="overload">[6/12]</span></h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a5e1812029394bfb1a706c83611286f49">◆ </a></span>array() <span class="overload">[6/11]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -517,7 +513,7 @@ template<typename T> </div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="a89a7b0c02366ca456232d347ebb11507" name="a89a7b0c02366ca456232d347ebb11507"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a89a7b0c02366ca456232d347ebb11507">◆ </a></span>array() <span class="overload">[7/12]</span></h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a89a7b0c02366ca456232d347ebb11507">◆ </a></span>array() <span class="overload">[7/11]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -553,7 +549,7 @@ template<typename T> </div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="a485399a6680a370cabb08470306b63d4" name="a485399a6680a370cabb08470306b63d4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a485399a6680a370cabb08470306b63d4">◆ </a></span>array() <span class="overload">[8/12]</span></h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a485399a6680a370cabb08470306b63d4">◆ </a></span>array() <span class="overload">[8/11]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -592,7 +588,7 @@ template<typename T> </div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="a297df274e2da5cb884257bbeffd6b187" name="a297df274e2da5cb884257bbeffd6b187"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a297df274e2da5cb884257bbeffd6b187">◆ </a></span>array() <span class="overload">[9/12]</span></h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a297df274e2da5cb884257bbeffd6b187">◆ </a></span>array() <span class="overload">[9/11]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -617,7 +613,7 @@ template<typename T> </div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="ab6cbccbba66cc54acda4390b19f0397c" name="ab6cbccbba66cc54acda4390b19f0397c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab6cbccbba66cc54acda4390b19f0397c">◆ </a></span>array() <span class="overload">[10/12]</span></h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab6cbccbba66cc54acda4390b19f0397c">◆ </a></span>array() <span class="overload">[10/11]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -642,7 +638,7 @@ template<typename T> </div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="abc26528271076510822e374d1668a94b" name="abc26528271076510822e374d1668a94b"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#abc26528271076510822e374d1668a94b">◆ </a></span>array() <span class="overload">[11/12]</span></h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#abc26528271076510822e374d1668a94b">◆ </a></span>array() <span class="overload">[11/11]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -673,63 +669,6 @@ template<typename T> </div>
|
||||
<p>The following methods should be used with caution. </p>
|
||||
<p>They are intended for use by the backend implementation and the API may change. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a2476f987ec7a5afb7665d3b3974db0b2" name="a2476f987ec7a5afb7665d3b3974db0b2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a2476f987ec7a5afb7665d3b3974db0b2">◆ </a></span>array() <span class="overload">[12/12]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">mlx::core::array::array </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="classmlx_1_1core_1_1allocator_1_1_buffer.html">allocator::Buffer</a></td> <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a></td> <td class="paramname"><span class="paramname"><em>shape</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1_dtype.html">Dtype</a></td> <td class="paramname"><span class="paramname"><em>dtype</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a></td> <td class="paramname"><span class="paramname"><em>strides</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>data_size</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1array_1_1_flags.html">Flags</a></td> <td class="paramname"><span class="paramname"><em>flags</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="namespacemlx_1_1core.html#af834c1e18d6f11c4f233a2e1ce814a4b">Deleter</a></td> <td class="paramname"><span class="paramname"><em>deleter</em></span><span class="paramdefsep"> = </span><span class="paramdefval"><a class="el" href="namespacemlx_1_1core_1_1allocator.html#a77f0a1215be242db6485612bcb273af5">allocator::free</a></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel explicit">explicit</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Build an array from all the info held by the array description. </p>
|
||||
<p>Including the buffer, strides, flags. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a2f16c1ef8ee248d2fba95520c86dfad2" name="a2f16c1ef8ee248d2fba95520c86dfad2"></a>
|
||||
@@ -1052,6 +991,31 @@ template<typename T> </div>
|
||||
|
||||
<p>Detach the array from the graph. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a9ff36a88bfd7c99a2662136ee9315f4e" name="a9ff36a88bfd7c99a2662136ee9315f4e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a9ff36a88bfd7c99a2662136ee9315f4e">◆ </a></span>detach_event()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void mlx::core::array::detach_event </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae29e7d6fbfbea1e5e321a8d1ea3cfacd" name="ae29e7d6fbfbea1e5e321a8d1ea3cfacd"></a>
|
||||
@@ -1448,59 +1412,6 @@ template<typename T> </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a38d7ad605f8282e5e49d0c09e0555c78" name="a38d7ad605f8282e5e49d0c09e0555c78"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a38d7ad605f8282e5e49d0c09e0555c78">◆ </a></span>move_shared_buffer() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void mlx::core::array::move_shared_buffer </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="classmlx_1_1core_1_1array.html">array</a></td> <td class="paramname"><span class="paramname"><em>other</em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ad41cc5e7aebfcad849ad15d697584cf8" name="ad41cc5e7aebfcad849ad15d697584cf8"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ad41cc5e7aebfcad849ad15d697584cf8">◆ </a></span>move_shared_buffer() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void mlx::core::array::move_shared_buffer </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="classmlx_1_1core_1_1array.html">array</a></td> <td class="paramname"><span class="paramname"><em>other</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &</td> <td class="paramname"><span class="paramname"><em>strides</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1array_1_1_flags.html">Flags</a></td> <td class="paramname"><span class="paramname"><em>flags</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>data_size</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>offset</em></span><span class="paramdefsep"> = </span><span class="paramdefval">0</span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a387b67cd3ef5cfc1e749c371766c4a05" name="a387b67cd3ef5cfc1e749c371766c4a05"></a>
|
||||
@@ -2145,6 +2056,34 @@ template<typename T> </div>
|
||||
<p>Get the stride of the corresponding dimension. </p>
|
||||
<p>This function supports negative indexing and provides bounds checking. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a797ae8a1708a7c67d62e6c55c321d802" name="a797ae8a1708a7c67d62e6c55c321d802"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a797ae8a1708a7c67d62e6c55c321d802">◆ </a></span>unsafe_weak_copy()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static <a class="el" href="classmlx_1_1core_1_1array.html">array</a> mlx::core::array::unsafe_weak_copy </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &</td> <td class="paramname"><span class="paramname"><em>other</em></span></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel static">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Get a new array that refers to the same data as the input but with a non-owning pointer to it. </p>
|
||||
<p>Note the array is detached from the graph and has no inputs, siblings or primitive. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a648592006f1c92287734ba2428eaa45e" name="a648592006f1c92287734ba2428eaa45e"></a>
|
||||
|
||||
+2
-4
@@ -5,7 +5,6 @@ var classmlx_1_1core_1_1array =
|
||||
[ "Flags", "structmlx_1_1core_1_1array_1_1_flags.html", "structmlx_1_1core_1_1array_1_1_flags" ],
|
||||
[ "Status", "classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078", [
|
||||
[ "unscheduled", "classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078ae8a9988458b0355001674020a45656fb", null ],
|
||||
[ "scheduled", "classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078af8a6f8eed2395ab89a758dec434393ae", null ],
|
||||
[ "evaluated", "classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078a6fc3d7595445dd877584495f47535268", null ],
|
||||
[ "available", "classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078a308bd3e5bf976888b120dd36d0c2d2ae", null ]
|
||||
] ],
|
||||
@@ -20,7 +19,6 @@ var classmlx_1_1core_1_1array =
|
||||
[ "array", "classmlx_1_1core_1_1array.html#a297df274e2da5cb884257bbeffd6b187", null ],
|
||||
[ "array", "classmlx_1_1core_1_1array.html#ab6cbccbba66cc54acda4390b19f0397c", null ],
|
||||
[ "array", "classmlx_1_1core_1_1array.html#abc26528271076510822e374d1668a94b", null ],
|
||||
[ "array", "classmlx_1_1core_1_1array.html#a2476f987ec7a5afb7665d3b3974db0b2", null ],
|
||||
[ "~array", "classmlx_1_1core_1_1array.html#a2f16c1ef8ee248d2fba95520c86dfad2", null ],
|
||||
[ "attach_event", "classmlx_1_1core_1_1array.html#a000c3cfe13cb378bf0523b62816190da", null ],
|
||||
[ "begin", "classmlx_1_1core_1_1array.html#a76b258b169d7d73419ebbf85340fb914", null ],
|
||||
@@ -34,6 +32,7 @@ var classmlx_1_1core_1_1array =
|
||||
[ "data_shared_ptr", "classmlx_1_1core_1_1array.html#ab84c792117e29cdf90ef3433303f6141", null ],
|
||||
[ "data_size", "classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd", null ],
|
||||
[ "detach", "classmlx_1_1core_1_1array.html#a84948c29df8c957904919c8602692bd2", null ],
|
||||
[ "detach_event", "classmlx_1_1core_1_1array.html#a9ff36a88bfd7c99a2662136ee9315f4e", null ],
|
||||
[ "dtype", "classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd", null ],
|
||||
[ "end", "classmlx_1_1core_1_1array.html#a5daf64552fb450825c9b382f3a5fa2d4", null ],
|
||||
[ "eval", "classmlx_1_1core_1_1array.html#a2820c45188071a22175e9fa42e10a49a", null ],
|
||||
@@ -50,8 +49,6 @@ var classmlx_1_1core_1_1array =
|
||||
[ "item", "classmlx_1_1core_1_1array.html#a8650a99a6b7549bc823b03ad92590ff7", null ],
|
||||
[ "itemsize", "classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0", null ],
|
||||
[ "make_arrays", "classmlx_1_1core_1_1array.html#a45b1c9763fe921fe5880ca28316ae98c", null ],
|
||||
[ "move_shared_buffer", "classmlx_1_1core_1_1array.html#a38d7ad605f8282e5e49d0c09e0555c78", null ],
|
||||
[ "move_shared_buffer", "classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8", null ],
|
||||
[ "nbytes", "classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05", null ],
|
||||
[ "ndim", "classmlx_1_1core_1_1array.html#a53006e77d13d9d88b525ef577748939f", null ],
|
||||
[ "operator=", "classmlx_1_1core_1_1array.html#a5c89c2406a610b32943955f9a5060fbd", null ],
|
||||
@@ -76,5 +73,6 @@ var classmlx_1_1core_1_1array =
|
||||
[ "status", "classmlx_1_1core_1_1array.html#a7102659be87e9ef62966696ab9b07dad", null ],
|
||||
[ "strides", "classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d", null ],
|
||||
[ "strides", "classmlx_1_1core_1_1array.html#ac9bfc251a9937eaefbe7f8c5ffd304d1", null ],
|
||||
[ "unsafe_weak_copy", "classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802", null ],
|
||||
[ "wait", "classmlx_1_1core_1_1array.html#a648592006f1c92287734ba2428eaa45e", null ]
|
||||
];
|
||||
+4
-4
@@ -108,11 +108,11 @@ $(function(){initNavTree('classmlx_1_1core_1_1distributed_1_1detail_1_1_group_im
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a04bb1df23abe5b1f3fa0126375c6cea4">all_gather</a>(const array &input, array &output)=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ae163a6f444c6cc8820288b20f294e483">all_sum</a>(const array &input, array &output)=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a65ae9485d2b1a2fd769744d50b0dd225">all_gather</a>(const array &input, array &output, Stream stream)=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a23f620ec55d75f236d5371e05a52fd64">all_sum</a>(const array &input, array &output, Stream stream)=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ae0838a40ce58442cdc73d57d7969a702">rank</a>()=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac4af5fc16a82ba8c72df04d7694f8352">recv</a>(array &out, int src)=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac8472eb2f96d1b14c7e4ccef56268ba0">send</a>(const array &input, int dst)=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a7ce5b7a19d0fb8e189986c84845c5898">recv</a>(array &out, int src, Stream stream)=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a74befcdc600669cb87761106ae0bd9a5">send</a>(const array &input, int dst, Stream stream)=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ab1c8044b05f185c4bcc53002d4587599">size</a>()=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a87800a23c8160933a2d77a55a959194d">split</a>(int color, int key=-1)=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a83f119b87210f53438c5ba675a78065e">~GroupImpl</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr>
|
||||
|
||||
+40
-20
@@ -124,14 +124,14 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="separator:ab1c8044b05f185c4bcc53002d4587599"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a87800a23c8160933a2d77a55a959194d" id="r_a87800a23c8160933a2d77a55a959194d"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr< <a class="el" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">GroupImpl</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="#a87800a23c8160933a2d77a55a959194d">split</a> (int color, int key=-1)=0</td></tr>
|
||||
<tr class="separator:a87800a23c8160933a2d77a55a959194d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae163a6f444c6cc8820288b20f294e483" id="r_ae163a6f444c6cc8820288b20f294e483"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ae163a6f444c6cc8820288b20f294e483">all_sum</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &output)=0</td></tr>
|
||||
<tr class="separator:ae163a6f444c6cc8820288b20f294e483"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a04bb1df23abe5b1f3fa0126375c6cea4" id="r_a04bb1df23abe5b1f3fa0126375c6cea4"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a04bb1df23abe5b1f3fa0126375c6cea4">all_gather</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &output)=0</td></tr>
|
||||
<tr class="separator:a04bb1df23abe5b1f3fa0126375c6cea4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac8472eb2f96d1b14c7e4ccef56268ba0" id="r_ac8472eb2f96d1b14c7e4ccef56268ba0"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac8472eb2f96d1b14c7e4ccef56268ba0">send</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, int dst)=0</td></tr>
|
||||
<tr class="separator:ac8472eb2f96d1b14c7e4ccef56268ba0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac4af5fc16a82ba8c72df04d7694f8352" id="r_ac4af5fc16a82ba8c72df04d7694f8352"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac4af5fc16a82ba8c72df04d7694f8352">recv</a> (<a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, int src)=0</td></tr>
|
||||
<tr class="separator:ac4af5fc16a82ba8c72df04d7694f8352"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a23f620ec55d75f236d5371e05a52fd64" id="r_a23f620ec55d75f236d5371e05a52fd64"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a23f620ec55d75f236d5371e05a52fd64">all_sum</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &output, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)=0</td></tr>
|
||||
<tr class="separator:a23f620ec55d75f236d5371e05a52fd64"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a65ae9485d2b1a2fd769744d50b0dd225" id="r_a65ae9485d2b1a2fd769744d50b0dd225"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a65ae9485d2b1a2fd769744d50b0dd225">all_gather</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &output, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)=0</td></tr>
|
||||
<tr class="separator:a65ae9485d2b1a2fd769744d50b0dd225"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a74befcdc600669cb87761106ae0bd9a5" id="r_a74befcdc600669cb87761106ae0bd9a5"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a74befcdc600669cb87761106ae0bd9a5">send</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, int dst, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)=0</td></tr>
|
||||
<tr class="separator:a74befcdc600669cb87761106ae0bd9a5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7ce5b7a19d0fb8e189986c84845c5898" id="r_a7ce5b7a19d0fb8e189986c84845c5898"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a7ce5b7a19d0fb8e189986c84845c5898">recv</a> (<a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, int src, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)=0</td></tr>
|
||||
<tr class="separator:a7ce5b7a19d0fb8e189986c84845c5898"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Abstract base class of a distributed group implementation. </p>
|
||||
@@ -162,8 +162,8 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="a04bb1df23abe5b1f3fa0126375c6cea4" name="a04bb1df23abe5b1f3fa0126375c6cea4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a04bb1df23abe5b1f3fa0126375c6cea4">◆ </a></span>all_gather()</h2>
|
||||
<a id="a65ae9485d2b1a2fd769744d50b0dd225" name="a65ae9485d2b1a2fd769744d50b0dd225"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a65ae9485d2b1a2fd769744d50b0dd225">◆ </a></span>all_gather()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -179,7 +179,12 @@ Public Member Functions</h2></td></tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="classmlx_1_1core_1_1array.html">array</a> &</td> <td class="paramname"><span class="paramname"><em>output</em></span> )</td>
|
||||
<td class="paramtype"><a class="el" href="classmlx_1_1core_1_1array.html">array</a> &</td> <td class="paramname"><span class="paramname"><em>output</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a></td> <td class="paramname"><span class="paramname"><em>stream</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -191,8 +196,8 @@ Public Member Functions</h2></td></tr>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae163a6f444c6cc8820288b20f294e483" name="ae163a6f444c6cc8820288b20f294e483"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae163a6f444c6cc8820288b20f294e483">◆ </a></span>all_sum()</h2>
|
||||
<a id="a23f620ec55d75f236d5371e05a52fd64" name="a23f620ec55d75f236d5371e05a52fd64"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a23f620ec55d75f236d5371e05a52fd64">◆ </a></span>all_sum()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -208,7 +213,12 @@ Public Member Functions</h2></td></tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="classmlx_1_1core_1_1array.html">array</a> &</td> <td class="paramname"><span class="paramname"><em>output</em></span> )</td>
|
||||
<td class="paramtype"><a class="el" href="classmlx_1_1core_1_1array.html">array</a> &</td> <td class="paramname"><span class="paramname"><em>output</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a></td> <td class="paramname"><span class="paramname"><em>stream</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -245,8 +255,8 @@ Public Member Functions</h2></td></tr>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac4af5fc16a82ba8c72df04d7694f8352" name="ac4af5fc16a82ba8c72df04d7694f8352"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac4af5fc16a82ba8c72df04d7694f8352">◆ </a></span>recv()</h2>
|
||||
<a id="a7ce5b7a19d0fb8e189986c84845c5898" name="a7ce5b7a19d0fb8e189986c84845c5898"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a7ce5b7a19d0fb8e189986c84845c5898">◆ </a></span>recv()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -262,7 +272,12 @@ Public Member Functions</h2></td></tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>src</em></span> )</td>
|
||||
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>src</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a></td> <td class="paramname"><span class="paramname"><em>stream</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -274,8 +289,8 @@ Public Member Functions</h2></td></tr>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac8472eb2f96d1b14c7e4ccef56268ba0" name="ac8472eb2f96d1b14c7e4ccef56268ba0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac8472eb2f96d1b14c7e4ccef56268ba0">◆ </a></span>send()</h2>
|
||||
<a id="a74befcdc600669cb87761106ae0bd9a5" name="a74befcdc600669cb87761106ae0bd9a5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a74befcdc600669cb87761106ae0bd9a5">◆ </a></span>send()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -291,7 +306,12 @@ Public Member Functions</h2></td></tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>dst</em></span> )</td>
|
||||
<td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>dst</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a></td> <td class="paramname"><span class="paramname"><em>stream</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
var classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl =
|
||||
[
|
||||
[ "~GroupImpl", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a83f119b87210f53438c5ba675a78065e", null ],
|
||||
[ "all_gather", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a04bb1df23abe5b1f3fa0126375c6cea4", null ],
|
||||
[ "all_sum", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ae163a6f444c6cc8820288b20f294e483", null ],
|
||||
[ "all_gather", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a65ae9485d2b1a2fd769744d50b0dd225", null ],
|
||||
[ "all_sum", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a23f620ec55d75f236d5371e05a52fd64", null ],
|
||||
[ "rank", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ae0838a40ce58442cdc73d57d7969a702", null ],
|
||||
[ "recv", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac4af5fc16a82ba8c72df04d7694f8352", null ],
|
||||
[ "send", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac8472eb2f96d1b14c7e4ccef56268ba0", null ],
|
||||
[ "recv", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a7ce5b7a19d0fb8e189986c84845c5898", null ],
|
||||
[ "send", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a74befcdc600669cb87761106ae0bd9a5", null ],
|
||||
[ "size", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ab1c8044b05f185c4bcc53002d4587599", null ],
|
||||
[ "split", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a87800a23c8160933a2d77a55a959194d", null ]
|
||||
];
|
||||
+1
-1
@@ -124,7 +124,7 @@ $(function(){initNavTree('classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attent
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_primitive.html#a3349f745fae50ca7627f79a731a19e32">Primitive</a>(const Primitive &other)=delete</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_primitive.html">mlx::core::Primitive</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_primitive.html#a342da891b9882bdee9a0e0c1ac826eda">Primitive</a>(Primitive &&other)=delete</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_primitive.html">mlx::core::Primitive</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_primitive.html#ae1aff91354ce036596088a3e19474ecb">print</a>(std::ostream &os)=0</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_primitive.html">mlx::core::Primitive</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#ab3f78d30e5bb3e76cfe701f2358e4748">ScaledDotProductAttention</a>(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, const float scale)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html">mlx::core::fast::ScaledDotProductAttention</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#a09c99b460cca606b2ebb22f90b3d13a2">ScaledDotProductAttention</a>(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, const float scale, const bool do_causal)</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html">mlx::core::fast::ScaledDotProductAttention</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1_primitive.html#a46e6257397a662528f9f831842ac456a">stream</a>()</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1_primitive.html">mlx::core::Primitive</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classmlx_1_1core_1_1fast_1_1_custom.html#a74be4bcd0382f7f6400bf73fd5569c91">vjp</a>(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1fast_1_1_custom.html">mlx::core::fast::Custom</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classmlx_1_1core_1_1fast_1_1_custom.html#a7f4c3a4c48c6807faa36fb31e39dad8d">vmap</a>(const std::vector< array > &inputs, const std::vector< int > &axes) override</td><td class="entry"><a class="el" href="classmlx_1_1core_1_1fast_1_1_custom.html">mlx::core::fast::Custom</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
|
||||
|
||||
+10
-5
@@ -123,8 +123,8 @@ Inheritance diagram for mlx::core::fast::ScaledDotProductAttention:</div>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:ab3f78d30e5bb3e76cfe701f2358e4748" id="r_ab3f78d30e5bb3e76cfe701f2358e4748"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ab3f78d30e5bb3e76cfe701f2358e4748">ScaledDotProductAttention</a> (<a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> <a class="el" href="classmlx_1_1core_1_1_primitive.html#a46e6257397a662528f9f831842ac456a">stream</a>, std::function< std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> >(std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> >)> fallback, const float scale)</td></tr>
|
||||
<tr class="separator:ab3f78d30e5bb3e76cfe701f2358e4748"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a09c99b460cca606b2ebb22f90b3d13a2" id="r_a09c99b460cca606b2ebb22f90b3d13a2"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a09c99b460cca606b2ebb22f90b3d13a2">ScaledDotProductAttention</a> (<a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> <a class="el" href="classmlx_1_1core_1_1_primitive.html#a46e6257397a662528f9f831842ac456a">stream</a>, std::function< std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> >(std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> >)> fallback, const float scale, const bool <a class="el" href="steel__attention_8h.html#abfa50278ba59a90e0acb7e5d94500741">do_causal</a>)</td></tr>
|
||||
<tr class="separator:a09c99b460cca606b2ebb22f90b3d13a2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae20851e002f7fcb6d4f97817596f6328" id="r_ae20851e002f7fcb6d4f97817596f6328"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ae20851e002f7fcb6d4f97817596f6328">eval_cpu</a> (const std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &inputs, std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &outputs) override</td></tr>
|
||||
<tr class="memdesc:ae20851e002f7fcb6d4f97817596f6328"><td class="mdescLeft"> </td><td class="mdescRight">A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays. <br /></td></tr>
|
||||
<tr class="separator:ae20851e002f7fcb6d4f97817596f6328"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -178,8 +178,8 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="separator:a50bbddd43e1ba0cf5f127cd7aa756a9e inherit pub_methods_classmlx_1_1core_1_1_primitive"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="ab3f78d30e5bb3e76cfe701f2358e4748" name="ab3f78d30e5bb3e76cfe701f2358e4748"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab3f78d30e5bb3e76cfe701f2358e4748">◆ </a></span>ScaledDotProductAttention()</h2>
|
||||
<a id="a09c99b460cca606b2ebb22f90b3d13a2" name="a09c99b460cca606b2ebb22f90b3d13a2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a09c99b460cca606b2ebb22f90b3d13a2">◆ </a></span>ScaledDotProductAttention()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -200,7 +200,12 @@ Public Member Functions</h2></td></tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const float</td> <td class="paramname"><span class="paramname"><em>scale</em></span> )</td>
|
||||
<td class="paramtype">const float</td> <td class="paramname"><span class="paramname"><em>scale</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const bool</td> <td class="paramname"><span class="paramname"><em>do_causal</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
var classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention =
|
||||
[
|
||||
[ "ScaledDotProductAttention", "classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#ab3f78d30e5bb3e76cfe701f2358e4748", null ],
|
||||
[ "ScaledDotProductAttention", "classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#a09c99b460cca606b2ebb22f90b3d13a2", null ],
|
||||
[ "DEFINE_INPUT_OUTPUT_SHAPE", "classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#a64d2ce4b46b529a6a9ef068947bc623e", null ],
|
||||
[ "DEFINE_PRINT", "classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#a6cc2092fa5b8e7585921b8e0f3ec3db7", null ],
|
||||
[ "eval_cpu", "classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#ae20851e002f7fcb6d4f97817596f6328", null ],
|
||||
|
||||
@@ -109,7 +109,7 @@ $(function(){initNavTree('classmlx_1_1core_1_1io_1_1_file_writer.html',''); init
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p><code>#include <<a class="el" href="io_2load_8h_source.html">load.h</a>></code></p>
|
||||
<p><code>#include <<a class="el" href="load_8h_source.html">load.h</a>></code></p>
|
||||
<div class="dynheader">
|
||||
Inheritance diagram for mlx::core::io::FileWriter:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -446,7 +446,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>mlx/io/<a class="el" href="io_2load_8h_source.html">load.h</a></li>
|
||||
<li>mlx/io/<a class="el" href="load_8h_source.html">load.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
@@ -109,7 +109,7 @@ $(function(){initNavTree('classmlx_1_1core_1_1io_1_1_parallel_file_reader.html',
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p><code>#include <<a class="el" href="io_2load_8h_source.html">load.h</a>></code></p>
|
||||
<p><code>#include <<a class="el" href="load_8h_source.html">load.h</a>></code></p>
|
||||
<div class="dynheader">
|
||||
Inheritance diagram for mlx::core::io::ParallelFileReader:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -403,7 +403,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>mlx/io/<a class="el" href="io_2load_8h_source.html">load.h</a></li>
|
||||
<li>mlx/io/<a class="el" href="load_8h_source.html">load.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
+2
-2
@@ -109,7 +109,7 @@ $(function(){initNavTree('classmlx_1_1core_1_1io_1_1_reader.html',''); initResiz
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p><code>#include <<a class="el" href="io_2load_8h_source.html">load.h</a>></code></p>
|
||||
<p><code>#include <<a class="el" href="load_8h_source.html">load.h</a>></code></p>
|
||||
<div class="dynheader">
|
||||
Inheritance diagram for mlx::core::io::Reader:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -373,7 +373,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>mlx/io/<a class="el" href="io_2load_8h_source.html">load.h</a></li>
|
||||
<li>mlx/io/<a class="el" href="load_8h_source.html">load.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
+2
-2
@@ -109,7 +109,7 @@ $(function(){initNavTree('classmlx_1_1core_1_1io_1_1_writer.html',''); initResiz
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p><code>#include <<a class="el" href="io_2load_8h_source.html">load.h</a>></code></p>
|
||||
<p><code>#include <<a class="el" href="load_8h_source.html">load.h</a>></code></p>
|
||||
<div class="dynheader">
|
||||
Inheritance diagram for mlx::core::io::Writer:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -335,7 +335,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>mlx/io/<a class="el" href="io_2load_8h_source.html">load.h</a></li>
|
||||
<li>mlx/io/<a class="el" href="load_8h_source.html">load.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
+2
-2
@@ -139,8 +139,8 @@ Enumerations</h2></td></tr>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a24eef9908f164adeece3be7c6924919a" id="r_a24eef9908f164adeece3be7c6924919a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">BinaryOpType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a24eef9908f164adeece3be7c6924919a">mlx::core::get_binary_op_type</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b)</td></tr>
|
||||
<tr class="separator:a24eef9908f164adeece3be7c6924919a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6a52856325c2eb031d3983eba2108d59" id="r_a6a52856325c2eb031d3983eba2108d59"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a6a52856325c2eb031d3983eba2108d59">mlx::core::set_binary_op_output_data</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, <a class="el" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">BinaryOpType</a> bopt, bool donate_with_move=false)</td></tr>
|
||||
<tr class="separator:a6a52856325c2eb031d3983eba2108d59"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9f22a9ed98104aaffb929381055b966d" id="r_a9f22a9ed98104aaffb929381055b966d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a9f22a9ed98104aaffb929381055b966d">mlx::core::set_binary_op_output_data</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, <a class="el" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">BinaryOpType</a> bopt)</td></tr>
|
||||
<tr class="separator:a9f22a9ed98104aaffb929381055b966d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
Vendored
+1
-1
@@ -8,5 +8,5 @@ var common_2binary_8h =
|
||||
[ "mlx::core::BinaryOpType::General", "namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f", null ]
|
||||
] ],
|
||||
[ "mlx::core::get_binary_op_type", "namespacemlx_1_1core.html#a24eef9908f164adeece3be7c6924919a", null ],
|
||||
[ "mlx::core::set_binary_op_output_data", "namespacemlx_1_1core.html#a6a52856325c2eb031d3983eba2108d59", null ]
|
||||
[ "mlx::core::set_binary_op_output_data", "namespacemlx_1_1core.html#a9f22a9ed98104aaffb929381055b966d", null ]
|
||||
];
|
||||
+67
-93
@@ -146,106 +146,80 @@ $(function(){initNavTree('common_2binary_8h_source.html',''); initResizable(true
|
||||
</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
||||
<div class="foldopen" id="foldopen00037" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a6a52856325c2eb031d3983eba2108d59"> 37</a></span><span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a6a52856325c2eb031d3983eba2108d59">set_binary_op_output_data</a>(</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a9f22a9ed98104aaffb929381055b966d"> 37</a></span><span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9f22a9ed98104aaffb929381055b966d">set_binary_op_output_data</a>(</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a,</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b,</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out,</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <a class="code hl_enumeration" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">BinaryOpType</a> bopt,</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordtype">bool</span> donate_with_move = <span class="keyword">false</span>) {</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordtype">bool</span> b_donatable = <a class="code hl_function" href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">is_donatable</a>(b, out);</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordtype">bool</span> a_donatable = <a class="code hl_function" href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">is_donatable</a>(a, out);</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">switch</span> (bopt) {</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4">BinaryOpType::ScalarScalar</a>:</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()), 1, a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(), a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">BinaryOpType::ScalarVector</a>:</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">if</span> (b_donatable) {</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">if</span> (donate_with_move) {</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8">move_shared_buffer</a>(b);</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(b);</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> }</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>() * out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()),</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>(),</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> }</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">BinaryOpType::VectorScalar</a>:</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">if</span> (a_donatable) {</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">if</span> (donate_with_move) {</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8">move_shared_buffer</a>(a);</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(a);</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>() * out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()),</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>(),</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> }</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a4d8269410dcd9cadc9722e9a118bddfb">BinaryOpType::VectorVector</a>:</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordflow">if</span> (a_donatable) {</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">if</span> (donate_with_move) {</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8">move_shared_buffer</a>(a);</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(a);</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> }</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (b_donatable) {</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">if</span> (donate_with_move) {</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8">move_shared_buffer</a>(b);</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(b);</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>() * out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()),</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>(),</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> }</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f">BinaryOpType::General</a>:</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">if</span> (a_donatable && a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">row_contiguous</a> && a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>() == out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>()) {</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">if</span> (donate_with_move) {</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8">move_shared_buffer</a>(a);</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(a);</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> }</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> b_donatable && b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">row_contiguous</a> && b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>() == out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>()) {</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">if</span> (donate_with_move) {</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8">move_shared_buffer</a>(b);</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(b);</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> }</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">nbytes</a>()));</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> }</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> }</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span>}</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <a class="code hl_enumeration" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">BinaryOpType</a> bopt) {</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordtype">bool</span> b_donatable = <a class="code hl_function" href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">is_donatable</a>(b, out);</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordtype">bool</span> a_donatable = <a class="code hl_function" href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">is_donatable</a>(a, out);</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">switch</span> (bopt) {</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4">BinaryOpType::ScalarScalar</a>:</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()), 1, a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(), a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">BinaryOpType::ScalarVector</a>:</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">if</span> (b_donatable) {</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(b);</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>() * out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()),</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>(),</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> }</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">BinaryOpType::VectorScalar</a>:</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">if</span> (a_donatable) {</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(a);</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>() * out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()),</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>(),</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> }</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a4d8269410dcd9cadc9722e9a118bddfb">BinaryOpType::VectorVector</a>:</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">if</span> (a_donatable) {</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(a);</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (b_donatable) {</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(b);</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>() * out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()),</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>(),</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> }</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f">BinaryOpType::General</a>:</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">if</span> (a_donatable && a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">row_contiguous</a> && a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>() == out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>()) {</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(a);</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> b_donatable && b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">row_contiguous</a> && b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>() == out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>()) {</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(b);</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">nbytes</a>()));</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> }</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aallocator_8h_html"><div class="ttname"><a href="allocator_8h.html">allocator.h</a></div></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="abackend_2common_2utils_8h_html"><div class="ttname"><a href="backend_2common_2utils_8h.html">utils.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a0a20a6065ae71b64c1e3aa22a45fd8a1"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">mlx::core::array::flags</a></div><div class="ttdeci">const Flags & flags() const</div><div class="ttdoc">Get the Flags bit-field.</div><div class="ttdef"><b>Definition</b> array.h:318</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a0a20a6065ae71b64c1e3aa22a45fd8a1"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">mlx::core::array::flags</a></div><div class="ttdeci">const Flags & flags() const</div><div class="ttdoc">Get the Flags bit-field.</div><div class="ttdef"><b>Definition</b> array.h:313</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a28cf1928f5ec2f972a94ff1c0e71187d"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">mlx::core::array::strides</a></div><div class="ttdeci">const Strides & strides() const</div><div class="ttdoc">The strides of the array.</div><div class="ttdef"><b>Definition</b> array.h:117</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a387b67cd3ef5cfc1e749c371766c4a05"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">mlx::core::array::nbytes</a></div><div class="ttdeci">size_t nbytes() const</div><div class="ttdoc">The number of bytes in the array.</div><div class="ttdef"><b>Definition</b> array.h:93</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a598f87161926d9e0b516860f0ea2c8f6"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">mlx::core::array::size</a></div><div class="ttdeci">size_t size() const</div><div class="ttdoc">The number of elements in the array.</div><div class="ttdef"><b>Definition</b> array.h:88</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ad2814dbffa5ad174d9c97a10bf4cf26b"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">mlx::core::array::copy_shared_buffer</a></div><div class="ttdeci">void copy_shared_buffer(const array &other, const Strides &strides, Flags flags, size_t data_size, size_t offset=0)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ad41cc5e7aebfcad849ad15d697584cf8"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8">mlx::core::array::move_shared_buffer</a></div><div class="ttdeci">void move_shared_buffer(array other, const Strides &strides, Flags flags, size_t data_size, size_t offset=0)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_af329d9432c92de87cbaa2de8454eefc0"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">mlx::core::array::itemsize</a></div><div class="ttdeci">size_t itemsize() const</div><div class="ttdoc">The size of the array's datatype in bytes.</div><div class="ttdef"><b>Definition</b> array.h:83</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_af9e3a02b4c0023c36248dc75c887214f"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">mlx::core::array::set_data</a></div><div class="ttdeci">void set_data(allocator::Buffer buffer, Deleter d=allocator::free)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_afaf2a370fa35d96af1b27a4b814e3bfd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">mlx::core::array::data_size</a></div><div class="ttdeci">size_t data_size() const</div><div class="ttdoc">The size (in elements) of the underlying buffer the array points to.</div><div class="ttdef"><b>Definition</b> array.h:332</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_afaf2a370fa35d96af1b27a4b814e3bfd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">mlx::core::array::data_size</a></div><div class="ttdeci">size_t data_size() const</div><div class="ttdoc">The size (in elements) of the underlying buffer the array points to.</div><div class="ttdef"><b>Definition</b> array.h:327</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1allocator_html_a86ac0a11ff78f21e717f641716c34abc"><div class="ttname"><a href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">mlx::core::allocator::malloc_or_wait</a></div><div class="ttdeci">Buffer malloc_or_wait(size_t size)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a24eef9908f164adeece3be7c6924919a"><div class="ttname"><a href="namespacemlx_1_1core.html#a24eef9908f164adeece3be7c6924919a">mlx::core::get_binary_op_type</a></div><div class="ttdeci">BinaryOpType get_binary_op_type(const array &a, const array &b)</div><div class="ttdef"><b>Definition</b> binary.h:19</div></div>
|
||||
@@ -255,14 +229,14 @@ $(function(){initNavTree('common_2binary_8h_source.html',''); initResizable(true
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4">mlx::core::BinaryOpType::ScalarScalar</a></div><div class="ttdeci">@ ScalarScalar</div><div class="ttdef"><b>Definition</b> binary.h:12</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">mlx::core::BinaryOpType::VectorScalar</a></div><div class="ttdeci">@ VectorScalar</div><div class="ttdef"><b>Definition</b> binary.h:14</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">mlx::core::BinaryOpType::ScalarVector</a></div><div class="ttdeci">@ ScalarVector</div><div class="ttdef"><b>Definition</b> binary.h:13</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6a52856325c2eb031d3983eba2108d59"><div class="ttname"><a href="namespacemlx_1_1core.html#a6a52856325c2eb031d3983eba2108d59">mlx::core::set_binary_op_output_data</a></div><div class="ttdeci">void set_binary_op_output_data(const array &a, const array &b, array &out, BinaryOpType bopt, bool donate_with_move=false)</div><div class="ttdef"><b>Definition</b> binary.h:37</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9f22a9ed98104aaffb929381055b966d"><div class="ttname"><a href="namespacemlx_1_1core.html#a9f22a9ed98104aaffb929381055b966d">mlx::core::set_binary_op_output_data</a></div><div class="ttdeci">void set_binary_op_output_data(const array &a, const array &b, array &out, BinaryOpType bopt)</div><div class="ttdef"><b>Definition</b> binary.h:37</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_af650e831ce21759da1ac103037d08d84"><div class="ttname"><a href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">mlx::core::is_donatable</a></div><div class="ttdeci">bool is_donatable(const array &in, const array &out)</div><div class="ttdef"><b>Definition</b> utils.h:155</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_scalar_vector_html"><div class="ttname"><a href="structmlx_1_1core_1_1_scalar_vector.html">mlx::core::ScalarVector</a></div><div class="ttdef"><b>Definition</b> binary.h:40</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_scalar_html"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_scalar.html">mlx::core::VectorScalar</a></div><div class="ttdef"><b>Definition</b> binary.h:16</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_vector_html"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_vector.html">mlx::core::VectorVector</a></div><div class="ttdef"><b>Definition</b> binary.h:64</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_a3170fa381dc7a90f6eabcc029bdf9bfd"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">mlx::core::array::Flags::row_contiguous</a></div><div class="ttdeci">bool row_contiguous</div><div class="ttdef"><b>Definition</b> array.h:237</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_ae24709026598d635e6b5c24a15f8a802"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#ae24709026598d635e6b5c24a15f8a802">mlx::core::array::Flags::col_contiguous</a></div><div class="ttdeci">bool col_contiguous</div><div class="ttdef"><b>Definition</b> array.h:243</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_afd0ab11e7a486a2a8e50ee84b971ac8a"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#afd0ab11e7a486a2a8e50ee84b971ac8a">mlx::core::array::Flags::contiguous</a></div><div class="ttdeci">bool contiguous</div><div class="ttdef"><b>Definition</b> array.h:231</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_scalar_vector_html"><div class="ttname"><a href="structmlx_1_1core_1_1_scalar_vector.html">mlx::core::ScalarVector</a></div><div class="ttdef"><b>Definition</b> binary.h:35</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_scalar_html"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_scalar.html">mlx::core::VectorScalar</a></div><div class="ttdef"><b>Definition</b> binary.h:15</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_vector_html"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_vector.html">mlx::core::VectorVector</a></div><div class="ttdef"><b>Definition</b> binary.h:55</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_a3170fa381dc7a90f6eabcc029bdf9bfd"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">mlx::core::array::Flags::row_contiguous</a></div><div class="ttdeci">bool row_contiguous</div><div class="ttdef"><b>Definition</b> array.h:244</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_ae24709026598d635e6b5c24a15f8a802"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#ae24709026598d635e6b5c24a15f8a802">mlx::core::array::Flags::col_contiguous</a></div><div class="ttdeci">bool col_contiguous</div><div class="ttdef"><b>Definition</b> array.h:250</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_afd0ab11e7a486a2a8e50ee84b971ac8a"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#afd0ab11e7a486a2a8e50ee84b971ac8a">mlx::core::array::Flags::contiguous</a></div><div class="ttdeci">bool contiguous</div><div class="ttdef"><b>Definition</b> array.h:238</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
Vendored
+7
-1
@@ -104,7 +104,8 @@ $(function(){initNavTree('common_2copy_8h.html',''); initResizable(true); });
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#enum-members">Enumerations</a> </div>
|
||||
<a href="#enum-members">Enumerations</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">copy.h File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
@@ -127,6 +128,11 @@ Enumerations</h2></td></tr>
|
||||
, <a class="el" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337a6fe62e8ce1fae1e70cb9eeaa67d29dab">mlx::core::GeneralGeneral</a>
|
||||
}</td></tr>
|
||||
<tr class="separator:abd84ff6c5245e4e170b2ef5247594337"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a3892b68a2e828270caa1c7accf44f038" id="r_a3892b68a2e828270caa1c7accf44f038"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a3892b68a2e828270caa1c7accf44f038">mlx::core::set_copy_output_data</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &in, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, <a class="el" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype)</td></tr>
|
||||
<tr class="separator:a3892b68a2e828270caa1c7accf44f038"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
Vendored
+2
-1
@@ -5,5 +5,6 @@ var common_2copy_8h =
|
||||
[ "mlx::core::CopyType::Vector", "namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337a57dea6f5039281b7fee517fc43bf3110", null ],
|
||||
[ "mlx::core::CopyType::General", "namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337a0db377921f4ce762c62526131097968f", null ],
|
||||
[ "mlx::core::CopyType::GeneralGeneral", "namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337a6fe62e8ce1fae1e70cb9eeaa67d29dab", null ]
|
||||
] ]
|
||||
] ],
|
||||
[ "mlx::core::set_copy_output_data", "namespacemlx_1_1core.html#a3892b68a2e828270caa1c7accf44f038", null ]
|
||||
];
|
||||
+35
-1
@@ -131,9 +131,43 @@ $(function(){initNavTree('common_2copy_8h_source.html',''); initResizable(true);
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="foldopen" id="foldopen00025" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a3892b68a2e828270caa1c7accf44f038"> 25</a></span><span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a3892b68a2e828270caa1c7accf44f038">set_copy_output_data</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& in, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, <a class="code hl_enumeration" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype) {</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">if</span> (ctype == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337a57dea6f5039281b7fee517fc43bf3110">CopyType::Vector</a>) {</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="comment">// If the input is donateable, we are doing a vector copy and the types</span></div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="comment">// have the same size, then the input buffer can hold the output.</span></div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">if</span> (in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a4677a404b5d191af20b52649225de087">is_donatable</a>() && in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>() == out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()) {</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(in);</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>() * out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()),</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>(),</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> }</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">nbytes</a>()));</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> }</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a0a20a6065ae71b64c1e3aa22a45fd8a1"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">mlx::core::array::flags</a></div><div class="ttdeci">const Flags & flags() const</div><div class="ttdoc">Get the Flags bit-field.</div><div class="ttdef"><b>Definition</b> array.h:313</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a28cf1928f5ec2f972a94ff1c0e71187d"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">mlx::core::array::strides</a></div><div class="ttdeci">const Strides & strides() const</div><div class="ttdoc">The strides of the array.</div><div class="ttdef"><b>Definition</b> array.h:117</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a387b67cd3ef5cfc1e749c371766c4a05"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">mlx::core::array::nbytes</a></div><div class="ttdeci">size_t nbytes() const</div><div class="ttdoc">The number of bytes in the array.</div><div class="ttdef"><b>Definition</b> array.h:93</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a4677a404b5d191af20b52649225de087"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a4677a404b5d191af20b52649225de087">mlx::core::array::is_donatable</a></div><div class="ttdeci">bool is_donatable() const</div><div class="ttdoc">True indicates the arrays buffer is safe to reuse.</div><div class="ttdef"><b>Definition</b> array.h:278</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ad2814dbffa5ad174d9c97a10bf4cf26b"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">mlx::core::array::copy_shared_buffer</a></div><div class="ttdeci">void copy_shared_buffer(const array &other, const Strides &strides, Flags flags, size_t data_size, size_t offset=0)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_af329d9432c92de87cbaa2de8454eefc0"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">mlx::core::array::itemsize</a></div><div class="ttdeci">size_t itemsize() const</div><div class="ttdoc">The size of the array's datatype in bytes.</div><div class="ttdef"><b>Definition</b> array.h:83</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_af9e3a02b4c0023c36248dc75c887214f"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">mlx::core::array::set_data</a></div><div class="ttdeci">void set_data(allocator::Buffer buffer, Deleter d=allocator::free)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_afaf2a370fa35d96af1b27a4b814e3bfd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">mlx::core::array::data_size</a></div><div class="ttdeci">size_t data_size() const</div><div class="ttdoc">The size (in elements) of the underlying buffer the array points to.</div><div class="ttdef"><b>Definition</b> array.h:327</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1allocator_html_a86ac0a11ff78f21e717f641716c34abc"><div class="ttname"><a href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">mlx::core::allocator::malloc_or_wait</a></div><div class="ttdeci">Buffer malloc_or_wait(size_t size)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a3892b68a2e828270caa1c7accf44f038"><div class="ttname"><a href="namespacemlx_1_1core.html#a3892b68a2e828270caa1c7accf44f038">mlx::core::set_copy_output_data</a></div><div class="ttdeci">bool set_copy_output_data(const array &in, array &out, CopyType ctype)</div><div class="ttdef"><b>Definition</b> copy.h:25</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f">mlx::core::BinaryOpType::General</a></div><div class="ttdeci">@ General</div><div class="ttdef"><b>Definition</b> binary.h:16</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_abd84ff6c5245e4e170b2ef5247594337"><div class="ttname"><a href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">mlx::core::CopyType</a></div><div class="ttdeci">CopyType</div><div class="ttdef"><b>Definition</b> copy.h:9</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_abd84ff6c5245e4e170b2ef5247594337a57dea6f5039281b7fee517fc43bf3110"><div class="ttname"><a href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337a57dea6f5039281b7fee517fc43bf3110">mlx::core::CopyType::Vector</a></div><div class="ttdeci">@ Vector</div><div class="ttdef"><b>Definition</b> copy.h:15</div></div>
|
||||
|
||||
+1
-1
@@ -220,7 +220,7 @@ $(function(){initNavTree('common_2hadamard_8h_source.html',''); initResizable(tr
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a50214cf406957fab27c8bef32046f030"><div class="ttname"><a href="namespacemlx_1_1core.html#a50214cf406957fab27c8bef32046f030">mlx::core::hadamard_matrices</a></div><div class="ttdeci">const std::map< int, std::string_view > hadamard_matrices()</div><div class="ttdef"><b>Definition</b> hadamard.h:81</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a862c6b94fec384c34a699ced64d01404"><div class="ttname"><a href="namespacemlx_1_1core.html#a862c6b94fec384c34a699ced64d01404">mlx::core::h20</a></div><div class="ttdeci">constexpr std::string_view h20</div><div class="ttdef"><b>Definition</b> hadamard.h:27</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac447ad59592dd06435adca7df37e33ad"><div class="ttname"><a href="namespacemlx_1_1core.html#ac447ad59592dd06435adca7df37e33ad">mlx::core::h28</a></div><div class="ttdeci">constexpr std::string_view h28</div><div class="ttdef"><b>Definition</b> hadamard.h:50</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_adacbc4526e8964b267a8ec3eb1bc1a32"><div class="ttname"><a href="namespacemlx_1_1core.html#adacbc4526e8964b267a8ec3eb1bc1a32">mlx::core::is_power_of_2</a></div><div class="ttdeci">bool is_power_of_2(int n)</div><div class="ttdef"><b>Definition</b> utils.h:105</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_adacbc4526e8964b267a8ec3eb1bc1a32"><div class="ttname"><a href="namespacemlx_1_1core.html#adacbc4526e8964b267a8ec3eb1bc1a32">mlx::core::is_power_of_2</a></div><div class="ttdeci">bool is_power_of_2(int n)</div><div class="ttdef"><b>Definition</b> utils.h:106</div></div>
|
||||
<div class="ttc" id="autils_8h_html"><div class="ttname"><a href="utils_8h.html">utils.h</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
+2
-2
@@ -134,8 +134,8 @@ Enumerations</h2></td></tr>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a548b6f4a39e639c18896e50b1702c830" id="r_a548b6f4a39e639c18896e50b1702c830"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1">TernaryOpType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a548b6f4a39e639c18896e50b1702c830">mlx::core::get_ternary_op_type</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &c)</td></tr>
|
||||
<tr class="separator:a548b6f4a39e639c18896e50b1702c830"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6f4528d0d338ea5e1f19d345875c26a2" id="r_a6f4528d0d338ea5e1f19d345875c26a2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a6f4528d0d338ea5e1f19d345875c26a2">mlx::core::set_ternary_op_output_data</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &c, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, <a class="el" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1">TernaryOpType</a> topt, bool donate_with_move=false)</td></tr>
|
||||
<tr class="separator:a6f4528d0d338ea5e1f19d345875c26a2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae159e1f9193c12eff9a56dfceb1502ef" id="r_ae159e1f9193c12eff9a56dfceb1502ef"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#ae159e1f9193c12eff9a56dfceb1502ef">mlx::core::set_ternary_op_output_data</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &c, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, <a class="el" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1">TernaryOpType</a> topt)</td></tr>
|
||||
<tr class="separator:ae159e1f9193c12eff9a56dfceb1502ef"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ var common_2ternary_8h =
|
||||
[ "mlx::core::TernaryOpType::General", "namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1a0db377921f4ce762c62526131097968f", null ]
|
||||
] ],
|
||||
[ "mlx::core::get_ternary_op_type", "namespacemlx_1_1core.html#a548b6f4a39e639c18896e50b1702c830", null ],
|
||||
[ "mlx::core::set_ternary_op_output_data", "namespacemlx_1_1core.html#a6f4528d0d338ea5e1f19d345875c26a2", null ]
|
||||
[ "mlx::core::set_ternary_op_output_data", "namespacemlx_1_1core.html#ae159e1f9193c12eff9a56dfceb1502ef", null ]
|
||||
];
|
||||
+41
-47
@@ -143,76 +143,70 @@ $(function(){initNavTree('common_2ternary_8h_source.html',''); initResizable(tru
|
||||
</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
|
||||
<div class="foldopen" id="foldopen00034" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a6f4528d0d338ea5e1f19d345875c26a2"> 34</a></span><span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a6f4528d0d338ea5e1f19d345875c26a2">set_ternary_op_output_data</a>(</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ae159e1f9193c12eff9a56dfceb1502ef"> 34</a></span><span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ae159e1f9193c12eff9a56dfceb1502ef">set_ternary_op_output_data</a>(</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a,</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b,</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& c,</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out,</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <a class="code hl_enumeration" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1">TernaryOpType</a> topt,</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordtype">bool</span> donate_with_move = <span class="keyword">false</span>) {</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">auto</span> maybe_donate = [&out, donate_with_move](<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& x) {</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">is_donatable</a>(x, out)) {</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">if</span> (donate_with_move) {</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8">move_shared_buffer</a>(x);</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(x);</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> }</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> }</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> };</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">switch</span> (topt) {</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1a09c2e68746fa22c9903625cea17464db">TernaryOpType::ScalarScalarScalar</a>:</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()), 1, b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(), b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1acbcaeeb0e232871afe48bcf063a14b42">TernaryOpType::VectorVectorVector</a>:</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">if</span> (!(maybe_donate(a) || maybe_donate(b) || maybe_donate(c))) {</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>() * b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>()),</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>(),</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> }</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1a0db377921f4ce762c62526131097968f">TernaryOpType::General</a>:</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="comment">// Try to donate an input which is row_contiguous</span></div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">if</span> (!((a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">row_contiguous</a> && maybe_donate(a)) ||</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> (b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">row_contiguous</a> && maybe_donate(b)) ||</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> (c.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">row_contiguous</a> && maybe_donate(c)))) {</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">nbytes</a>()));</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> }</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> }</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span>}</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <a class="code hl_enumeration" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1">TernaryOpType</a> topt) {</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">auto</span> maybe_donate = [&out](<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& x) {</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">is_donatable</a>(x, out)) {</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(x);</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> }</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> };</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">switch</span> (topt) {</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1a09c2e68746fa22c9903625cea17464db">TernaryOpType::ScalarScalarScalar</a>:</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()), 1, b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(), b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1acbcaeeb0e232871afe48bcf063a14b42">TernaryOpType::VectorVectorVector</a>:</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">if</span> (!(maybe_donate(a) || maybe_donate(b) || maybe_donate(c))) {</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>() * b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>()),</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>(),</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> }</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1a0db377921f4ce762c62526131097968f">TernaryOpType::General</a>:</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="comment">// Try to donate an input which is row_contiguous</span></div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">if</span> (!((a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">row_contiguous</a> && maybe_donate(a)) ||</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> (b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">row_contiguous</a> && maybe_donate(b)) ||</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> (c.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">row_contiguous</a> && maybe_donate(c)))) {</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">nbytes</a>()));</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> }</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> }</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aallocator_8h_html"><div class="ttname"><a href="allocator_8h.html">allocator.h</a></div></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="abackend_2common_2utils_8h_html"><div class="ttname"><a href="backend_2common_2utils_8h.html">utils.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a0a20a6065ae71b64c1e3aa22a45fd8a1"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">mlx::core::array::flags</a></div><div class="ttdeci">const Flags & flags() const</div><div class="ttdoc">Get the Flags bit-field.</div><div class="ttdef"><b>Definition</b> array.h:318</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a0a20a6065ae71b64c1e3aa22a45fd8a1"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">mlx::core::array::flags</a></div><div class="ttdeci">const Flags & flags() const</div><div class="ttdoc">Get the Flags bit-field.</div><div class="ttdef"><b>Definition</b> array.h:313</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a28cf1928f5ec2f972a94ff1c0e71187d"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">mlx::core::array::strides</a></div><div class="ttdeci">const Strides & strides() const</div><div class="ttdoc">The strides of the array.</div><div class="ttdef"><b>Definition</b> array.h:117</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a387b67cd3ef5cfc1e749c371766c4a05"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">mlx::core::array::nbytes</a></div><div class="ttdeci">size_t nbytes() const</div><div class="ttdoc">The number of bytes in the array.</div><div class="ttdef"><b>Definition</b> array.h:93</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ad2814dbffa5ad174d9c97a10bf4cf26b"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">mlx::core::array::copy_shared_buffer</a></div><div class="ttdeci">void copy_shared_buffer(const array &other, const Strides &strides, Flags flags, size_t data_size, size_t offset=0)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ad41cc5e7aebfcad849ad15d697584cf8"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8">mlx::core::array::move_shared_buffer</a></div><div class="ttdeci">void move_shared_buffer(array other, const Strides &strides, Flags flags, size_t data_size, size_t offset=0)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_af329d9432c92de87cbaa2de8454eefc0"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">mlx::core::array::itemsize</a></div><div class="ttdeci">size_t itemsize() const</div><div class="ttdoc">The size of the array's datatype in bytes.</div><div class="ttdef"><b>Definition</b> array.h:83</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_af9e3a02b4c0023c36248dc75c887214f"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">mlx::core::array::set_data</a></div><div class="ttdeci">void set_data(allocator::Buffer buffer, Deleter d=allocator::free)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_afaf2a370fa35d96af1b27a4b814e3bfd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">mlx::core::array::data_size</a></div><div class="ttdeci">size_t data_size() const</div><div class="ttdoc">The size (in elements) of the underlying buffer the array points to.</div><div class="ttdef"><b>Definition</b> array.h:332</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_afaf2a370fa35d96af1b27a4b814e3bfd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">mlx::core::array::data_size</a></div><div class="ttdeci">size_t data_size() const</div><div class="ttdoc">The size (in elements) of the underlying buffer the array points to.</div><div class="ttdef"><b>Definition</b> array.h:327</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1allocator_html_a86ac0a11ff78f21e717f641716c34abc"><div class="ttname"><a href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">mlx::core::allocator::malloc_or_wait</a></div><div class="ttdeci">Buffer malloc_or_wait(size_t size)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f">mlx::core::BinaryOpType::General</a></div><div class="ttdeci">@ General</div><div class="ttdef"><b>Definition</b> binary.h:16</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a548b6f4a39e639c18896e50b1702c830"><div class="ttname"><a href="namespacemlx_1_1core.html#a548b6f4a39e639c18896e50b1702c830">mlx::core::get_ternary_op_type</a></div><div class="ttdeci">TernaryOpType get_ternary_op_type(const array &a, const array &b, const array &c)</div><div class="ttdef"><b>Definition</b> ternary.h:18</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6f4528d0d338ea5e1f19d345875c26a2"><div class="ttname"><a href="namespacemlx_1_1core.html#a6f4528d0d338ea5e1f19d345875c26a2">mlx::core::set_ternary_op_output_data</a></div><div class="ttdeci">void set_ternary_op_output_data(const array &a, const array &b, const array &c, array &out, TernaryOpType topt, bool donate_with_move=false)</div><div class="ttdef"><b>Definition</b> ternary.h:34</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac2b8997537c7f25dd2b244d4c0a865a1"><div class="ttname"><a href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1">mlx::core::TernaryOpType</a></div><div class="ttdeci">TernaryOpType</div><div class="ttdef"><b>Definition</b> ternary.h:11</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac2b8997537c7f25dd2b244d4c0a865a1a09c2e68746fa22c9903625cea17464db"><div class="ttname"><a href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1a09c2e68746fa22c9903625cea17464db">mlx::core::TernaryOpType::ScalarScalarScalar</a></div><div class="ttdeci">@ ScalarScalarScalar</div><div class="ttdef"><b>Definition</b> ternary.h:12</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac2b8997537c7f25dd2b244d4c0a865a1a0db377921f4ce762c62526131097968f"><div class="ttname"><a href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1a0db377921f4ce762c62526131097968f">mlx::core::TernaryOpType::General</a></div><div class="ttdeci">@ General</div><div class="ttdef"><b>Definition</b> ternary.h:14</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac2b8997537c7f25dd2b244d4c0a865a1acbcaeeb0e232871afe48bcf063a14b42"><div class="ttname"><a href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1acbcaeeb0e232871afe48bcf063a14b42">mlx::core::TernaryOpType::VectorVectorVector</a></div><div class="ttdeci">@ VectorVectorVector</div><div class="ttdef"><b>Definition</b> ternary.h:13</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ae159e1f9193c12eff9a56dfceb1502ef"><div class="ttname"><a href="namespacemlx_1_1core.html#ae159e1f9193c12eff9a56dfceb1502ef">mlx::core::set_ternary_op_output_data</a></div><div class="ttdeci">void set_ternary_op_output_data(const array &a, const array &b, const array &c, array &out, TernaryOpType topt)</div><div class="ttdef"><b>Definition</b> ternary.h:34</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_af650e831ce21759da1ac103037d08d84"><div class="ttname"><a href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">mlx::core::is_donatable</a></div><div class="ttdeci">bool is_donatable(const array &in, const array &out)</div><div class="ttdef"><b>Definition</b> utils.h:155</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_a3170fa381dc7a90f6eabcc029bdf9bfd"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">mlx::core::array::Flags::row_contiguous</a></div><div class="ttdeci">bool row_contiguous</div><div class="ttdef"><b>Definition</b> array.h:237</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_ae24709026598d635e6b5c24a15f8a802"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#ae24709026598d635e6b5c24a15f8a802">mlx::core::array::Flags::col_contiguous</a></div><div class="ttdeci">bool col_contiguous</div><div class="ttdef"><b>Definition</b> array.h:243</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_a3170fa381dc7a90f6eabcc029bdf9bfd"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#a3170fa381dc7a90f6eabcc029bdf9bfd">mlx::core::array::Flags::row_contiguous</a></div><div class="ttdeci">bool row_contiguous</div><div class="ttdef"><b>Definition</b> array.h:244</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_ae24709026598d635e6b5c24a15f8a802"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#ae24709026598d635e6b5c24a15f8a802">mlx::core::array::Flags::col_contiguous</a></div><div class="ttdeci">bool col_contiguous</div><div class="ttdef"><b>Definition</b> array.h:250</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
Vendored
+2
-2
@@ -146,8 +146,8 @@ Functions</h2></td></tr>
|
||||
<tr class="separator:a985c60929757190e0b4ec51f57c767d0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a562040f4a03f2c0a5d50eb9c8f14a8be" id="r_a562040f4a03f2c0a5d50eb9c8f14a8be"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a562040f4a03f2c0a5d50eb9c8f14a8be">mlx::core::compiled_check_contiguity</a> (const std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &inputs, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &shape)</td></tr>
|
||||
<tr class="separator:a562040f4a03f2c0a5d50eb9c8f14a8be"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab8c3c4fc05745f586de922c8266f4fce" id="r_ab8c3c4fc05745f586de922c8266f4fce"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#ab8c3c4fc05745f586de922c8266f4fce">mlx::core::compiled_allocate_outputs</a> (const std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &inputs, std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &outputs, const std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &inputs_, const std::unordered_set< uintptr_t > &constant_ids_, bool <a class="el" href="group__ops.html#ga8ab10aa6c41416d739791164a52b25d5">contiguous</a>, bool move_buffers=false)</td></tr>
|
||||
<tr class="separator:ab8c3c4fc05745f586de922c8266f4fce"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8ed5ff0d69f6c7d2e092fe811e40d564" id="r_a8ed5ff0d69f6c7d2e092fe811e40d564"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a8ed5ff0d69f6c7d2e092fe811e40d564">mlx::core::compiled_allocate_outputs</a> (const std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &inputs, std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &outputs, const std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &inputs_, const std::unordered_set< uintptr_t > &constant_ids_, bool <a class="el" href="group__ops.html#ga8ab10aa6c41416d739791164a52b25d5">contiguous</a>)</td></tr>
|
||||
<tr class="separator:a8ed5ff0d69f6c7d2e092fe811e40d564"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
var compiled_8h =
|
||||
[
|
||||
[ "mlx::core::build_lib_name", "namespacemlx_1_1core.html#a3ef23f334cb9f68a2c50524bc67c913b", null ],
|
||||
[ "mlx::core::compiled_allocate_outputs", "namespacemlx_1_1core.html#ab8c3c4fc05745f586de922c8266f4fce", null ],
|
||||
[ "mlx::core::compiled_allocate_outputs", "namespacemlx_1_1core.html#a8ed5ff0d69f6c7d2e092fe811e40d564", null ],
|
||||
[ "mlx::core::compiled_check_contiguity", "namespacemlx_1_1core.html#a562040f4a03f2c0a5d50eb9c8f14a8be", null ],
|
||||
[ "mlx::core::get_type_string", "namespacemlx_1_1core.html#af776fd91dd60594dcfebbafd17f19068", null ],
|
||||
[ "mlx::core::is_scalar", "namespacemlx_1_1core.html#a985c60929757190e0b4ec51f57c767d0", null ],
|
||||
|
||||
+6
-7
@@ -174,22 +174,21 @@ $(function(){initNavTree('compiled_8h_source.html',''); initResizable(true); });
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a>& shape);</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment">// Allocate space for the outputs possibly with input donation</span></div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ab8c3c4fc05745f586de922c8266f4fce"> 60</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ab8c3c4fc05745f586de922c8266f4fce">compiled_allocate_outputs</a>(</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a8ed5ff0d69f6c7d2e092fe811e40d564"> 60</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a8ed5ff0d69f6c7d2e092fe811e40d564">compiled_allocate_outputs</a>(</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keyword">const</span> std::vector<array>& inputs,</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> std::vector<array>& outputs,</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keyword">const</span> std::vector<array>& inputs_,</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keyword">const</span> std::unordered_set<uintptr_t>& constant_ids_,</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__ops.html#ga8ab10aa6c41416d739791164a52b25d5">contiguous</a>,</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordtype">bool</span> move_buffers = <span class="keyword">false</span>);</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="group__ops.html#ga8ab10aa6c41416d739791164a52b25d5">contiguous</a>);</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_as_type_html"><div class="ttname"><a href="classmlx_1_1core_1_1_as_type.html">mlx::core::AsType</a></div><div class="ttdef"><b>Definition</b> primitives.h:392</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_broadcast_html"><div class="ttname"><a href="classmlx_1_1core_1_1_broadcast.html">mlx::core::Broadcast</a></div><div class="ttdef"><b>Definition</b> primitives.h:541</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_primitive_html"><div class="ttname"><a href="classmlx_1_1core_1_1_primitive.html">mlx::core::Primitive</a></div><div class="ttdef"><b>Definition</b> primitives.h:48</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a53006e77d13d9d88b525ef577748939f"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a53006e77d13d9d88b525ef577748939f">mlx::core::array::ndim</a></div><div class="ttdeci">size_t ndim() const</div><div class="ttdoc">The number of dimensions of the array.</div><div class="ttdef"><b>Definition</b> array.h:98</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a90c5afddc2fa3028c0f8099bd64c8a99"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a90c5afddc2fa3028c0f8099bd64c8a99">mlx::core::array::item</a></div><div class="ttdeci">T item()</div><div class="ttdoc">Get the value from a scalar array.</div><div class="ttdef"><b>Definition</b> array.h:551</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a90c5afddc2fa3028c0f8099bd64c8a99"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a90c5afddc2fa3028c0f8099bd64c8a99">mlx::core::array::item</a></div><div class="ttdeci">T item()</div><div class="ttdoc">Get the value from a scalar array.</div><div class="ttdef"><b>Definition</b> array.h:536</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ae29e7d6fbfbea1e5e321a8d1ea3cfacd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">mlx::core::array::dtype</a></div><div class="ttdeci">Dtype dtype() const</div><div class="ttdoc">Get the arrays data type.</div><div class="ttdef"><b>Definition</b> array.h:131</div></div>
|
||||
<div class="ttc" id="agroup__ops_html_ga8ab10aa6c41416d739791164a52b25d5"><div class="ttname"><a href="group__ops.html#ga8ab10aa6c41416d739791164a52b25d5">mlx::core::contiguous</a></div><div class="ttdeci">array contiguous(const array &a, bool allow_col_major=false, StreamOrDevice s={})</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
@@ -198,10 +197,10 @@ $(function(){initNavTree('compiled_8h_source.html',''); initResizable(true); });
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a562040f4a03f2c0a5d50eb9c8f14a8be"><div class="ttname"><a href="namespacemlx_1_1core.html#a562040f4a03f2c0a5d50eb9c8f14a8be">mlx::core::compiled_check_contiguity</a></div><div class="ttdeci">bool compiled_check_contiguity(const std::vector< array > &inputs, const Shape &shape)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a694e23f2d59606643728ad443d621416"><div class="ttname"><a href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">mlx::core::Shape</a></div><div class="ttdeci">std::vector< ShapeElem > Shape</div><div class="ttdef"><b>Definition</b> array.h:21</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a7d11b000895d44d183260634f4192d92"><div class="ttname"><a href="namespacemlx_1_1core.html#a7d11b000895d44d183260634f4192d92">mlx::core::print_constant</a></div><div class="ttdeci">void print_constant(std::ostream &os, const array &x)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a8ed5ff0d69f6c7d2e092fe811e40d564"><div class="ttname"><a href="namespacemlx_1_1core.html#a8ed5ff0d69f6c7d2e092fe811e40d564">mlx::core::compiled_allocate_outputs</a></div><div class="ttdeci">void compiled_allocate_outputs(const std::vector< array > &inputs, std::vector< array > &outputs, const std::vector< array > &inputs_, const std::unordered_set< uintptr_t > &constant_ids_, bool contiguous)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a93a8ac59c644b801ec8881a58368caf2"><div class="ttname"><a href="namespacemlx_1_1core.html#a93a8ac59c644b801ec8881a58368caf2">mlx::core::print_float_constant</a></div><div class="ttdeci">void print_float_constant(std::ostream &os, const array &x)</div><div class="ttdef"><b>Definition</b> compiled.h:26</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a948ce3dfc4520d3aa98b33e42f617c64"><div class="ttname"><a href="namespacemlx_1_1core.html#a948ce3dfc4520d3aa98b33e42f617c64">mlx::core::print_int_constant</a></div><div class="ttdeci">void print_int_constant(std::ostream &os, const array &x)</div><div class="ttdef"><b>Definition</b> compiled.h:33</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a985c60929757190e0b4ec51f57c767d0"><div class="ttname"><a href="namespacemlx_1_1core.html#a985c60929757190e0b4ec51f57c767d0">mlx::core::is_scalar</a></div><div class="ttdeci">bool is_scalar(const array &x)</div><div class="ttdef"><b>Definition</b> compiled.h:50</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ab8c3c4fc05745f586de922c8266f4fce"><div class="ttname"><a href="namespacemlx_1_1core.html#ab8c3c4fc05745f586de922c8266f4fce">mlx::core::compiled_allocate_outputs</a></div><div class="ttdeci">void compiled_allocate_outputs(const std::vector< array > &inputs, std::vector< array > &outputs, const std::vector< array > &inputs_, const std::unordered_set< uintptr_t > &constant_ids_, bool contiguous, bool move_buffers=false)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_af776fd91dd60594dcfebbafd17f19068"><div class="ttname"><a href="namespacemlx_1_1core.html#af776fd91dd60594dcfebbafd17f19068">mlx::core::get_type_string</a></div><div class="ttdeci">std::string get_type_string(Dtype d)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_afd9e740e567f9d7c28e00113caf46d5f"><div class="ttname"><a href="namespacemlx_1_1core.html#afd9e740e567f9d7c28e00113caf46d5f">mlx::core::is_static_cast</a></div><div class="ttdeci">bool is_static_cast(const Primitive &p)</div><div class="ttdef"><b>Definition</b> compiled.h:13</div></div>
|
||||
<div class="ttc" id="aprimitives_8h_html"><div class="ttname"><a href="primitives_8h.html">primitives.h</a></div></div>
|
||||
|
||||
Vendored
+4
-4
@@ -8,7 +8,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Operations — MLX 0.23.2 documentation</title>
|
||||
<title>Operations — MLX 0.24.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
|
||||
<script src="../_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
|
||||
|
||||
<script src="../_static/documentation_options.js?v=9900918c"></script>
|
||||
<script src="../_static/documentation_options.js?v=ae1d10b0"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/scripts/sphinx-book-theme.js?v=887ef09a"></script>
|
||||
@@ -137,8 +137,8 @@
|
||||
|
||||
|
||||
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.23.2 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.23.2 documentation - Home"/>`);</script>
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.24.0 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.24.0 documentation - Home"/>`);</script>
|
||||
|
||||
|
||||
</a></div>
|
||||
|
||||
Vendored
+3
-9
@@ -103,13 +103,12 @@ $(function(){initNavTree('cpu_2arange_8h.html',''); initResizable(true); });
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<a href="#namespaces">Namespaces</a> </div>
|
||||
<div class="headertitle"><div class="title">arange.h File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><code>#include "<a class="el" href="allocator_8h_source.html">mlx/allocator.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="array_8h_source.html">mlx/array.h</a>"</code><br />
|
||||
<div class="textblock"><code>#include "<a class="el" href="array_8h_source.html">mlx/array.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="encoder_8h_source.html">mlx/backend/cpu/encoder.h</a>"</code><br />
|
||||
</div>
|
||||
<p><a href="cpu_2arange_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
@@ -119,11 +118,6 @@ Namespaces</h2></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html">mlx::core</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a369aa886219b83cf219e7a7862ce260b" id="r_a369aa886219b83cf219e7a7862ce260b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">mlx::core::arange</a> (const std::vector< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &inputs, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, double start, double step)</td></tr>
|
||||
<tr class="separator:a369aa886219b83cf219e7a7862ce260b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
Vendored
-4
@@ -1,4 +0,0 @@
|
||||
var cpu_2arange_8h =
|
||||
[
|
||||
[ "mlx::core::arange", "namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b", null ]
|
||||
];
|
||||
+22
-89
@@ -109,105 +109,38 @@ $(function(){initNavTree('cpu_2arange_8h_source.html',''); initResizable(true);
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#pragma once</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include "<a class="code" href="allocator_8h.html">mlx/allocator.h</a>"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "<a class="code" href="encoder_8h.html">mlx/backend/cpu/encoder.h</a>"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core.html">mlx::core</a> {</div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">namespace </span>{</div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange</a>(T start, T next, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, <span class="keywordtype">size_t</span> size) {</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">auto</span> ptr = out.data<T>();</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__ops.html#ga7ca088b8090b9f84f2e08345cf3f835a">arange</a>(T start, T next, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, <span class="keywordtype">size_t</span> size, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) {</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">auto</span> ptr = out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>();</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">auto</span> step_size = next - start;</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < size; ++i) {</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> ptr[i] = start;</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> start += step_size;</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> }</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span>}</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span>} <span class="comment">// namespace</span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
|
||||
<div class="foldopen" id="foldopen00024" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b"> 24</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange</a>(</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">const</span> std::vector<array>& inputs,</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out,</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordtype">double</span> start,</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordtype">double</span> step) {</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> assert(inputs.size() == 0);</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">nbytes</a>()));</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">switch</span> (out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>()) {</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a113d2bac7e4aa6a4cb4a5c3242527b82">bool_</a>:</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"Bool type unsupported for arange."</span>);</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9778d50afbf456b0bd738751243b3b68">uint8</a>:</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<uint8_t></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a312a70c487366968af5e6cbf5038c812">uint16</a>:</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<uint16_t></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#ac63820d6fe10545907c33faf466a929e">uint32</a>:</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<uint32_t></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8">uint64</a>:</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<uint64_t></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">int8</a>:</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<int8_t></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">int16</a>:</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<int16_t></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">int32</a>:</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<int32_t></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">int64</a>:</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<int64_t></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">float16</a>:</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<float16_t></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">float32</a>:</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<float></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">float64</a>:</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<double></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">bfloat16</a>:</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<bfloat16_t></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">complex64</a>:</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">arange<complex64_t></a>(start, start + step, out, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> }</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aallocator_8h_html"><div class="ttname"><a href="allocator_8h.html">allocator.h</a></div></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">auto</span>& encoder = <a class="code hl_function" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">cpu::get_command_encoder</a>(stream);</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> encoder.set_output_array(out);</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> encoder.dispatch([ptr, start, step_size, size]() <span class="keyword">mutable</span> {</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < size; ++i) {</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> ptr[i] = start;</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> start += step_size;</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> }</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> });</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span>}</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>} <span class="comment">// namespace</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a387b67cd3ef5cfc1e749c371766c4a05"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">mlx::core::array::nbytes</a></div><div class="ttdeci">size_t nbytes() const</div><div class="ttdoc">The number of bytes in the array.</div><div class="ttdef"><b>Definition</b> array.h:93</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a598f87161926d9e0b516860f0ea2c8f6"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">mlx::core::array::size</a></div><div class="ttdeci">size_t size() const</div><div class="ttdoc">The number of elements in the array.</div><div class="ttdef"><b>Definition</b> array.h:88</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ae29e7d6fbfbea1e5e321a8d1ea3cfacd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">mlx::core::array::dtype</a></div><div class="ttdeci">Dtype dtype() const</div><div class="ttdoc">Get the arrays data type.</div><div class="ttdef"><b>Definition</b> array.h:131</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_af9e3a02b4c0023c36248dc75c887214f"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">mlx::core::array::set_data</a></div><div class="ttdeci">void set_data(allocator::Buffer buffer, Deleter d=allocator::free)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1allocator_html_a86ac0a11ff78f21e717f641716c34abc"><div class="ttname"><a href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">mlx::core::allocator::malloc_or_wait</a></div><div class="ttdeci">Buffer malloc_or_wait(size_t size)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a72e3ce6c03fefe272cadf214bd127b95"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">mlx::core::array::data</a></div><div class="ttdeci">T * data()</div><div class="ttdef"><b>Definition</b> array.h:349</div></div>
|
||||
<div class="ttc" id="aencoder_8h_html"><div class="ttname"><a href="encoder_8h.html">encoder.h</a></div></div>
|
||||
<div class="ttc" id="agroup__ops_html_ga7ca088b8090b9f84f2e08345cf3f835a"><div class="ttname"><a href="group__ops.html#ga7ca088b8090b9f84f2e08345cf3f835a">mlx::core::arange</a></div><div class="ttdeci">array arange(double start, double stop, double step, Dtype dtype, StreamOrDevice s={})</div><div class="ttdoc">A 1D array of numbers starting at start (optional), stopping at stop, stepping by step (optional).</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1cpu_html_a65b1789c4b339a108e64fda5f102d933"><div class="ttname"><a href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">mlx::core::cpu::get_command_encoder</a></div><div class="ttdeci">CommandEncoder & get_command_encoder(Stream stream)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a113d2bac7e4aa6a4cb4a5c3242527b82"><div class="ttname"><a href="namespacemlx_1_1core.html#a113d2bac7e4aa6a4cb4a5c3242527b82">mlx::core::bool_</a></div><div class="ttdeci">constexpr Dtype bool_</div><div class="ttdef"><b>Definition</b> dtype.h:68</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a1f42e3dd4787d2ecec7114a12daefec8"><div class="ttname"><a href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8">mlx::core::uint64</a></div><div class="ttdeci">constexpr Dtype uint64</div><div class="ttdef"><b>Definition</b> dtype.h:73</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a312a70c487366968af5e6cbf5038c812"><div class="ttname"><a href="namespacemlx_1_1core.html#a312a70c487366968af5e6cbf5038c812">mlx::core::uint16</a></div><div class="ttdeci">constexpr Dtype uint16</div><div class="ttdef"><b>Definition</b> dtype.h:71</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a369aa886219b83cf219e7a7862ce260b"><div class="ttname"><a href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b">mlx::core::arange</a></div><div class="ttdeci">void arange(const std::vector< array > &inputs, array &out, double start, double step)</div><div class="ttdef"><b>Definition</b> arange.h:24</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a474bf5eb8bca8c380207c9f659aef3b1"><div class="ttname"><a href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">mlx::core::float64</a></div><div class="ttdeci">constexpr Dtype float64</div><div class="ttdef"><b>Definition</b> dtype.h:82</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a514cf8b4e6f0a6af3a867e752f4338f7"><div class="ttname"><a href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">mlx::core::bfloat16</a></div><div class="ttdeci">constexpr Dtype bfloat16</div><div class="ttdef"><b>Definition</b> dtype.h:83</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a5d6373aad1444edc9de1eb07bfe5cad3"><div class="ttname"><a href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">mlx::core::int32</a></div><div class="ttdeci">constexpr Dtype int32</div><div class="ttdef"><b>Definition</b> dtype.h:77</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6894543b340321193dfb8052c438a319"><div class="ttname"><a href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">mlx::core::float32</a></div><div class="ttdeci">constexpr Dtype float32</div><div class="ttdef"><b>Definition</b> dtype.h:81</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a71ebba4ad1afa730962f0692c4f42f07"><div class="ttname"><a href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">mlx::core::int16</a></div><div class="ttdeci">constexpr Dtype int16</div><div class="ttdef"><b>Definition</b> dtype.h:76</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a892e934e146dd938d144cee8813ca672"><div class="ttname"><a href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">mlx::core::int8</a></div><div class="ttdeci">constexpr Dtype int8</div><div class="ttdef"><b>Definition</b> dtype.h:75</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9019bdc191054ada0a502c7c34cef5b8"><div class="ttname"><a href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">mlx::core::int64</a></div><div class="ttdeci">constexpr Dtype int64</div><div class="ttdef"><b>Definition</b> dtype.h:78</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9778d50afbf456b0bd738751243b3b68"><div class="ttname"><a href="namespacemlx_1_1core.html#a9778d50afbf456b0bd738751243b3b68">mlx::core::uint8</a></div><div class="ttdeci">constexpr Dtype uint8</div><div class="ttdef"><b>Definition</b> dtype.h:70</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_abf228ee9d8ec48c03bb15adcc4e1f3ec"><div class="ttname"><a href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">mlx::core::float16</a></div><div class="ttdeci">constexpr Dtype float16</div><div class="ttdef"><b>Definition</b> dtype.h:80</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac63820d6fe10545907c33faf466a929e"><div class="ttname"><a href="namespacemlx_1_1core.html#ac63820d6fe10545907c33faf466a929e">mlx::core::uint32</a></div><div class="ttdeci">constexpr Dtype uint32</div><div class="ttdef"><b>Definition</b> dtype.h:72</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_af99db87e0078bfcdb383f5689bc874d4"><div class="ttname"><a href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">mlx::core::complex64</a></div><div class="ttdeci">constexpr Dtype complex64</div><div class="ttdef"><b>Definition</b> dtype.h:84</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_stream_html"><div class="ttname"><a href="structmlx_1_1core_1_1_stream.html">mlx::core::Stream</a></div><div class="ttdef"><b>Definition</b> stream.h:9</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
Vendored
+12
-16
@@ -110,7 +110,6 @@ $(function(){initNavTree('cpu_2binary_8h.html',''); initResizable(true); });
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><code>#include <cassert></code><br />
|
||||
<code>#include "<a class="el" href="allocator_8h_source.html">mlx/allocator.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="array_8h_source.html">mlx/array.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="common_2binary_8h_source.html">mlx/backend/common/binary.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="backend_2common_2utils_8h_source.html">mlx/backend/common/utils.h</a>"</code><br />
|
||||
@@ -136,21 +135,18 @@ Namespaces</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a7ca09ebf776fe32db580f9038587ec31" id="r_a7ca09ebf776fe32db580f9038587ec31"><td class="memTemplParams" colspan="2">template<typename T, typename U, typename Op, int D, bool Strided> </td></tr>
|
||||
<tr class="memitem:a7ca09ebf776fe32db580f9038587ec31"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">mlx::core::binary_op_dims</a> (const T *a, const T *b, U *out, Op op, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &shape, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &a_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &b_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &out_strides, int axis)</td></tr>
|
||||
<tr class="separator:a7ca09ebf776fe32db580f9038587ec31"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a66c9ee5018168b9101de52e0122d9755" id="r_a66c9ee5018168b9101de52e0122d9755"><td class="memTemplParams" colspan="2">template<typename T, typename U, bool Strided, typename Op> </td></tr>
|
||||
<tr class="memitem:a66c9ee5018168b9101de52e0122d9755"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755">mlx::core::binary_op_dispatch_dims</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op, int dim, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &shape, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &a_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &b_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &out_strides)</td></tr>
|
||||
<tr class="separator:a66c9ee5018168b9101de52e0122d9755"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9c1c1fdf9a0840a16a4d10a8f74f761d" id="r_a9c1c1fdf9a0840a16a4d10a8f74f761d"><td class="memTemplParams" colspan="2">template<typename T, typename U, typename Op> </td></tr>
|
||||
<tr class="memitem:a9c1c1fdf9a0840a16a4d10a8f74f761d"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">mlx::core::binary_op</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op)</td></tr>
|
||||
<tr class="separator:a9c1c1fdf9a0840a16a4d10a8f74f761d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2aca3458c56605a74d07ec39876549bc" id="r_a2aca3458c56605a74d07ec39876549bc"><td class="memTemplParams" colspan="2">template<typename T, typename Op> </td></tr>
|
||||
<tr class="memitem:a2aca3458c56605a74d07ec39876549bc"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a2aca3458c56605a74d07ec39876549bc">mlx::core::binary_op</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op)</td></tr>
|
||||
<tr class="separator:a2aca3458c56605a74d07ec39876549bc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae374861abd45cf019c3e6be2026f3798" id="r_ae374861abd45cf019c3e6be2026f3798"><td class="memTemplParams" colspan="2">template<typename Op> </td></tr>
|
||||
<tr class="memitem:ae374861abd45cf019c3e6be2026f3798"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#ae374861abd45cf019c3e6be2026f3798">mlx::core::binary</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op)</td></tr>
|
||||
<tr class="separator:ae374861abd45cf019c3e6be2026f3798"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aeac6fa9529eedba76b27de9d098de963" id="r_aeac6fa9529eedba76b27de9d098de963"><td class="memTemplParams" colspan="2">template<typename T, typename U, typename Op, int D, bool Strided> </td></tr>
|
||||
<tr class="memitem:aeac6fa9529eedba76b27de9d098de963"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">mlx::core::binary_op_dims</a> (const T *a, const T *b, U *out, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &shape, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &a_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &b_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &out_strides, int axis)</td></tr>
|
||||
<tr class="separator:aeac6fa9529eedba76b27de9d098de963"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad1229ffbba21bdb81f63482a4651bc5a" id="r_ad1229ffbba21bdb81f63482a4651bc5a"><td class="memTemplParams" colspan="2">template<typename T, typename U, bool Strided, typename Op> </td></tr>
|
||||
<tr class="memitem:ad1229ffbba21bdb81f63482a4651bc5a"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a">mlx::core::binary_op_dispatch_dims</a> (const T *a, const T *b, U *out, int dim, int size, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &shape, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &a_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &b_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &out_strides)</td></tr>
|
||||
<tr class="separator:ad1229ffbba21bdb81f63482a4651bc5a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae0c47c0bd95bb8c44339159e04c0f604" id="r_ae0c47c0bd95bb8c44339159e04c0f604"><td class="memTemplParams" colspan="2">template<typename T, typename U, typename Op> </td></tr>
|
||||
<tr class="memitem:ae0c47c0bd95bb8c44339159e04c0f604"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#ae0c47c0bd95bb8c44339159e04c0f604">mlx::core::binary_op</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, <a class="el" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">BinaryOpType</a> bopt)</td></tr>
|
||||
<tr class="separator:ae0c47c0bd95bb8c44339159e04c0f604"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a5160ef5819f58cf040c9613ecce548f1" id="r_a5160ef5819f58cf040c9613ecce548f1"><td class="memTemplParams" colspan="2">template<typename T, typename Op> </td></tr>
|
||||
<tr class="memitem:a5160ef5819f58cf040c9613ecce548f1"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a5160ef5819f58cf040c9613ecce548f1">mlx::core::binary_op</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, <a class="el" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">BinaryOpType</a> bopt)</td></tr>
|
||||
<tr class="separator:a5160ef5819f58cf040c9613ecce548f1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
Vendored
+4
-5
@@ -3,9 +3,8 @@ var cpu_2binary_8h =
|
||||
[ "mlx::core::VectorScalar< Op >", "structmlx_1_1core_1_1_vector_scalar.html", "structmlx_1_1core_1_1_vector_scalar" ],
|
||||
[ "mlx::core::ScalarVector< Op >", "structmlx_1_1core_1_1_scalar_vector.html", "structmlx_1_1core_1_1_scalar_vector" ],
|
||||
[ "mlx::core::VectorVector< Op >", "structmlx_1_1core_1_1_vector_vector.html", "structmlx_1_1core_1_1_vector_vector" ],
|
||||
[ "mlx::core::binary", "namespacemlx_1_1core.html#ae374861abd45cf019c3e6be2026f3798", null ],
|
||||
[ "mlx::core::binary_op", "namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d", null ],
|
||||
[ "mlx::core::binary_op", "namespacemlx_1_1core.html#a2aca3458c56605a74d07ec39876549bc", null ],
|
||||
[ "mlx::core::binary_op_dims", "namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31", null ],
|
||||
[ "mlx::core::binary_op_dispatch_dims", "namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755", null ]
|
||||
[ "mlx::core::binary_op", "namespacemlx_1_1core.html#ae0c47c0bd95bb8c44339159e04c0f604", null ],
|
||||
[ "mlx::core::binary_op", "namespacemlx_1_1core.html#a5160ef5819f58cf040c9613ecce548f1", null ],
|
||||
[ "mlx::core::binary_op_dims", "namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963", null ],
|
||||
[ "mlx::core::binary_op_dispatch_dims", "namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a", null ]
|
||||
];
|
||||
+307
-413
@@ -110,454 +110,348 @@ $(function(){initNavTree('cpu_2binary_8h_source.html',''); initResizable(true);
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#pragma once</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include <cassert></span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "<a class="code" href="allocator_8h.html">mlx/allocator.h</a>"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "<a class="code" href="common_2binary_8h.html">mlx/backend/common/binary.h</a>"</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include "<a class="code" href="backend_2common_2utils_8h.html">mlx/backend/common/utils.h</a>"</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include "<a class="code" href="simd_8h.html">mlx/backend/cpu/simd/simd.h</a>"</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core.html">mlx::core</a> {</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00016" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_scalar.html"> 16</a></span><span class="keyword">struct </span><a class="code hl_function" href="structmlx_1_1core_1_1_vector_scalar.html#a97088143e6d301d753dcdd1ccdd82287">VectorScalar</a> {</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_scalar.html#a5fe1744adb58aaa845acca1e46725537"> 17</a></span> Op <a class="code hl_variable" href="structmlx_1_1core_1_1_vector_scalar.html#a5fe1744adb58aaa845acca1e46725537">op</a>;</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_scalar.html#a97088143e6d301d753dcdd1ccdd82287"> 19</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1_vector_scalar.html#a97088143e6d301d753dcdd1ccdd82287">VectorScalar</a>(Op op_) : <a class="code hl_variable" href="structmlx_1_1core_1_1_vector_scalar.html#a5fe1744adb58aaa845acca1e46725537">op</a>(op_) {}</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U></div>
|
||||
<div class="foldopen" id="foldopen00022" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_scalar.html#a1af3ff644ce023a7e4f92a7c3634c44f"> 22</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1_vector_scalar.html#a1af3ff644ce023a7e4f92a7c3634c44f">operator()</a>(<span class="keyword">const</span> T* a, <span class="keyword">const</span> T* b, U* dst, <span class="keywordtype">int</span> size) {</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> T scalar = *b;</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> N = <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">simd::max_size<T></a>;</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">while</span> (size >= N) {</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afa2236afddfdec312eb7e27b89a5316a">simd::store</a>(dst, <a class="code hl_variable" href="structmlx_1_1core_1_1_vector_scalar.html#a5fe1744adb58aaa845acca1e46725537">op</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">simd::load<T, N></a>(a), <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">simd::Simd<T, N></a>(scalar)));</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> dst += N;</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> a += N;</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> size -= N;</div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "<a class="code" href="common_2binary_8h.html">mlx/backend/common/binary.h</a>"</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "<a class="code" href="backend_2common_2utils_8h.html">mlx/backend/common/utils.h</a>"</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include "<a class="code" href="simd_8h.html">mlx/backend/cpu/simd/simd.h</a>"</span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core.html">mlx::core</a> {</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00015" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_scalar.html"> 15</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structmlx_1_1core_1_1_vector_scalar.html">VectorScalar</a> {</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U></div>
|
||||
<div class="foldopen" id="foldopen00017" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_scalar.html#a1af3ff644ce023a7e4f92a7c3634c44f"> 17</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1_vector_scalar.html#a1af3ff644ce023a7e4f92a7c3634c44f">operator()</a>(<span class="keyword">const</span> T* a, <span class="keyword">const</span> T* b, U* dst, <span class="keywordtype">int</span> size) {</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> T scalar = *b;</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> N = <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">simd::max_size<T></a>;</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordflow">while</span> (size >= N) {</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afa2236afddfdec312eb7e27b89a5316a">simd::store</a>(dst, Op{}(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">simd::load<T, N></a>(a), <a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">simd::Simd<T, N></a>(scalar)));</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> dst += N;</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> a += N;</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> size -= N;</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> }</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">while</span> (size-- > 0) {</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> *dst = Op{}(*a, scalar);</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> dst++;</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> a++;</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> }</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">while</span> (size-- > 0) {</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> *dst = <a class="code hl_variable" href="structmlx_1_1core_1_1_vector_scalar.html#a5fe1744adb58aaa845acca1e46725537">op</a>(*a, scalar);</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> dst++;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> a++;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> }</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> }</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span>};</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00040" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_scalar_vector.html"> 40</a></span><span class="keyword">struct </span><a class="code hl_function" href="structmlx_1_1core_1_1_scalar_vector.html#a69d6a3ddd7586e8e19a42c5e6f5a287b">ScalarVector</a> {</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_scalar_vector.html#ac9c2214744bc972150740e169b603b9b"> 41</a></span> Op <a class="code hl_variable" href="structmlx_1_1core_1_1_scalar_vector.html#ac9c2214744bc972150740e169b603b9b">op</a>;</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_scalar_vector.html#a69d6a3ddd7586e8e19a42c5e6f5a287b"> 43</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1_scalar_vector.html#a69d6a3ddd7586e8e19a42c5e6f5a287b">ScalarVector</a>(Op op_) : <a class="code hl_variable" href="structmlx_1_1core_1_1_scalar_vector.html#ac9c2214744bc972150740e169b603b9b">op</a>(op_) {}</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U></div>
|
||||
<div class="foldopen" id="foldopen00046" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_scalar_vector.html#ab174fe55970fb4ee1c6a2b7628a24df1"> 46</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1_scalar_vector.html#ab174fe55970fb4ee1c6a2b7628a24df1">operator()</a>(<span class="keyword">const</span> T* a, <span class="keyword">const</span> T* b, U* dst, <span class="keywordtype">int</span> size) {</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> T scalar = *a;</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> N = <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">simd::max_size<T></a>;</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">while</span> (size >= N) {</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afa2236afddfdec312eb7e27b89a5316a">simd::store</a>(dst, <a class="code hl_variable" href="structmlx_1_1core_1_1_scalar_vector.html#ac9c2214744bc972150740e169b603b9b">op</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">simd::Simd<T, N></a>(scalar), <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">simd::load<T, N></a>(b)));</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> dst += N;</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> b += N;</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> size -= N;</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> }</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">while</span> (size-- > 0) {</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> *dst = <a class="code hl_variable" href="structmlx_1_1core_1_1_scalar_vector.html#ac9c2214744bc972150740e169b603b9b">op</a>(scalar, *b);</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> dst++;</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> b++;</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> }</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> }</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00035" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_scalar_vector.html"> 35</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structmlx_1_1core_1_1_scalar_vector.html">ScalarVector</a> {</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U></div>
|
||||
<div class="foldopen" id="foldopen00037" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_scalar_vector.html#ab174fe55970fb4ee1c6a2b7628a24df1"> 37</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1_scalar_vector.html#ab174fe55970fb4ee1c6a2b7628a24df1">operator()</a>(<span class="keyword">const</span> T* a, <span class="keyword">const</span> T* b, U* dst, <span class="keywordtype">int</span> size) {</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> T scalar = *a;</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> N = <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">simd::max_size<T></a>;</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">while</span> (size >= N) {</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afa2236afddfdec312eb7e27b89a5316a">simd::store</a>(dst, Op{}(<a class="code hl_struct" href="structmlx_1_1core_1_1simd_1_1_simd.html">simd::Simd<T, N></a>(scalar), <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">simd::load<T, N></a>(b)));</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> dst += N;</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> b += N;</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> size -= N;</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> }</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">while</span> (size-- > 0) {</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> *dst = Op{}(scalar, *b);</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> dst++;</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> b++;</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> }</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>};</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00064" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_vector.html"> 64</a></span><span class="keyword">struct </span><a class="code hl_function" href="structmlx_1_1core_1_1_vector_vector.html#a4867666c95c597a113afb64f173cc022">VectorVector</a> {</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_vector.html#a6d69d070c75cf0281e11e36e0717ab50"> 65</a></span> Op <a class="code hl_variable" href="structmlx_1_1core_1_1_vector_vector.html#a6d69d070c75cf0281e11e36e0717ab50">op</a>;</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_vector.html#a4867666c95c597a113afb64f173cc022"> 67</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1_vector_vector.html#a4867666c95c597a113afb64f173cc022">VectorVector</a>(Op op_) : <a class="code hl_variable" href="structmlx_1_1core_1_1_vector_vector.html#a6d69d070c75cf0281e11e36e0717ab50">op</a>(op_) {}</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U></div>
|
||||
<div class="foldopen" id="foldopen00070" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_vector.html#a97a0bed419933d7685238a962f2e4215"> 70</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1_vector_vector.html#a97a0bed419933d7685238a962f2e4215">operator()</a>(<span class="keyword">const</span> T* a, <span class="keyword">const</span> T* b, U* dst, <span class="keywordtype">int</span> size) {</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> N = <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">simd::max_size<T></a>;</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">while</span> (size >= N) {</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afa2236afddfdec312eb7e27b89a5316a">simd::store</a>(dst, <a class="code hl_variable" href="structmlx_1_1core_1_1_vector_vector.html#a6d69d070c75cf0281e11e36e0717ab50">op</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">simd::load<T, N></a>(a), <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">simd::load<T, N></a>(b)));</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> dst += N;</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> a += N;</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> b += N;</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> size -= N;</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> }</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">while</span> (size-- > 0) {</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> *dst = <a class="code hl_variable" href="structmlx_1_1core_1_1_vector_vector.html#a6d69d070c75cf0281e11e36e0717ab50">op</a>(*a, *b);</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> dst++;</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> a++;</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> b++;</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> }</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> }</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00055" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_vector.html"> 55</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structmlx_1_1core_1_1_vector_vector.html">VectorVector</a> {</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U></div>
|
||||
<div class="foldopen" id="foldopen00057" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1_vector_vector.html#a97a0bed419933d7685238a962f2e4215"> 57</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1_vector_vector.html#a97a0bed419933d7685238a962f2e4215">operator()</a>(<span class="keyword">const</span> T* a, <span class="keyword">const</span> T* b, U* dst, <span class="keywordtype">int</span> size) {</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> N = <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">simd::max_size<T></a>;</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">while</span> (size >= N) {</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afa2236afddfdec312eb7e27b89a5316a">simd::store</a>(dst, Op{}(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">simd::load<T, N></a>(a), <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">simd::load<T, N></a>(b)));</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> dst += N;</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> a += N;</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> b += N;</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> size -= N;</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> }</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">while</span> (size-- > 0) {</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> *dst = Op{}(*a, *b);</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> dst++;</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> a++;</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> b++;</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span>};</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keyword">typename</span> Op, <span class="keywordtype">int</span> D, <span class="keywordtype">bool</span> Str<span class="keywordtype">id</span>ed></div>
|
||||
<div class="foldopen" id="foldopen00089" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31"> 89</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">binary_op_dims</a>(</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keyword">const</span> T* a,</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keyword">const</span> T* b,</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> U* out,</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> Op op,</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a>& shape,</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& a_strides,</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& b_strides,</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& out_strides,</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordtype">int</span> axis) {</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keyword">auto</span> stride_a = a_strides[axis];</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keyword">auto</span> stride_b = b_strides[axis];</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keyword">auto</span> stride_out = out_strides[axis];</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keyword">auto</span> N = shape[axis];</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < N; i++) {</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (D > 1) {</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">binary_op_dims</a><T, U, Op, D - 1, Strided>(</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> a, b, out, op, shape, a_strides, b_strides, out_strides, axis + 1);</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (Strided) {</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> op(a, b, out, stride_out);</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> *out = op(*a, *b);</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> }</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> }</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> out += stride_out;</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> a += stride_a;</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> b += stride_b;</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> }</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span>}</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keyword">typename</span> Op, <span class="keywordtype">int</span> D, <span class="keywordtype">bool</span> Str<span class="keywordtype">id</span>ed></div>
|
||||
<div class="foldopen" id="foldopen00076" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963"> 76</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">binary_op_dims</a>(</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keyword">const</span> T* a,</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keyword">const</span> T* b,</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> U* out,</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a>& shape,</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& a_strides,</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& b_strides,</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& out_strides,</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordtype">int</span> axis) {</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keyword">auto</span> stride_a = a_strides[axis];</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keyword">auto</span> stride_b = b_strides[axis];</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keyword">auto</span> stride_out = out_strides[axis];</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keyword">auto</span> N = shape[axis];</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < N; i++) {</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (D > 1) {</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">binary_op_dims</a><T, U, Op, D - 1, Strided>(</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> a, b, out, shape, a_strides, b_strides, out_strides, axis + 1);</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (Strided) {</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> Op{}(a, b, out, stride_out);</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> *out = Op{}(*a, *b);</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> }</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> }</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> out += stride_out;</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> a += stride_a;</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> b += stride_b;</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> }</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keywordtype">bool</span> Str<span class="keywordtype">id</span>ed, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00122" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755"> 122</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755">binary_op_dispatch_dims</a>(</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a,</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b,</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out,</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> Op op,</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordtype">int</span> dim,</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a>& shape,</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& a_strides,</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& b_strides,</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& out_strides) {</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keyword">const</span> T* a_ptr = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>();</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keyword">const</span> T* b_ptr = b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>();</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> U* out_ptr = out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>();</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordflow">switch</span> (dim) {</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">case</span> 1:</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">binary_op_dims<T, U, Op, 1, Strided></a>(</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> out_ptr,</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> op,</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> shape,</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> a_strides,</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> b_strides,</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> out_strides,</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> 0);</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">case</span> 2:</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">binary_op_dims<T, U, Op, 2, Strided></a>(</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> out_ptr,</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> op,</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> shape,</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> a_strides,</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> b_strides,</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> out_strides,</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> 0);</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordflow">case</span> 3:</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">binary_op_dims<T, U, Op, 3, Strided></a>(</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> out_ptr,</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> op,</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> shape,</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> a_strides,</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> b_strides,</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> out_strides,</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> 0);</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> }</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> a_it(shape, a_strides, dim - 3);</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> b_it(shape, b_strides, dim - 3);</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="keyword">auto</span> stride = out_strides[dim - 4];</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keywordflow">for</span> (int64_t elem = 0; elem < a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>(); elem += stride) {</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">binary_op_dims<T, U, Op, 3, Strided></a>(</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> a_ptr + a_it.<a class="code hl_variable" href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">loc</a>,</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> b_ptr + b_it.<a class="code hl_variable" href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">loc</a>,</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> out_ptr + elem,</div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> op,</div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> shape,</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> a_strides,</div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> b_strides,</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> out_strides,</div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> dim - 3);</div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> a_it.<a class="code hl_function" href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">step</a>();</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> b_it.<a class="code hl_function" href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">step</a>();</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> }</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span>}</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> </div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keywordtype">bool</span> Str<span class="keywordtype">id</span>ed, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00108" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a"> 108</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a">binary_op_dispatch_dims</a>(</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keyword">const</span> T* a,</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keyword">const</span> T* b,</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> U* out,</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordtype">int</span> dim,</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordtype">int</span> size,</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a>& shape,</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& a_strides,</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& b_strides,</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& out_strides) {</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">switch</span> (dim) {</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">case</span> 1:</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">binary_op_dims<T, U, Op, 1, Strided></a>(</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> a, b, out, shape, a_strides, b_strides, out_strides, 0);</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">case</span> 2:</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">binary_op_dims<T, U, Op, 2, Strided></a>(</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> a, b, out, shape, a_strides, b_strides, out_strides, 0);</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">case</span> 3:</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">binary_op_dims<T, U, Op, 3, Strided></a>(</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> a, b, out, shape, a_strides, b_strides, out_strides, 0);</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> }</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> a_it(shape, a_strides, dim - 3);</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> b_it(shape, b_strides, dim - 3);</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keyword">auto</span> stride = out_strides[dim - 4];</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">for</span> (int64_t elem = 0; elem < size; elem += stride) {</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">binary_op_dims<T, U, Op, 3, Strided></a>(</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> a + a_it.<a class="code hl_variable" href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">loc</a>,</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> b + b_it.<a class="code hl_variable" href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">loc</a>,</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> out + elem,</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> shape,</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> a_strides,</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> b_strides,</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> out_strides,</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> dim - 3);</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> a_it.<a class="code hl_function" href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">step</a>();</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> b_it.<a class="code hl_function" href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">step</a>();</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> }</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> </div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00194" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d"> 194</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op) {</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keyword">auto</span> bopt = <a class="code hl_function" href="namespacemlx_1_1core.html#a24eef9908f164adeece3be7c6924919a">get_binary_op_type</a>(a, b);</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a6a52856325c2eb031d3983eba2108d59">set_binary_op_output_data</a>(a, b, out, bopt);</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00152" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ae0c47c0bd95bb8c44339159e04c0f604"> 152</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ae0c47c0bd95bb8c44339159e04c0f604">binary_op</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, <a class="code hl_enumeration" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">BinaryOpType</a> bopt) {</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="comment">// The full computation is scalar scalar so call the base op once</span></div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keyword">auto</span> a_ptr = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>();</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keyword">auto</span> b_ptr = b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>();</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> </div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keyword">auto</span> out_ptr = out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>();</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4">BinaryOpType::ScalarScalar</a>) {</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> *out_ptr = Op{}(*a_ptr, *b_ptr);</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> }</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> </div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="comment">// The full computation is scalar vector so delegate to the op</span></div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">BinaryOpType::ScalarVector</a>) {</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_scalar_vector.html">ScalarVector<Op></a>{}(a_ptr, b_ptr, out_ptr, b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>());</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> }</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="comment">// The full computation is vector scalar so delegate to the op</span></div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">BinaryOpType::VectorScalar</a>) {</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_vector_scalar.html">VectorScalar<Op></a>{}(a_ptr, b_ptr, out_ptr, a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>());</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> }</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> </div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="comment">// The full computation is vector vector so delegate to the op</span></div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a4d8269410dcd9cadc9722e9a118bddfb">BinaryOpType::VectorVector</a>) {</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_vector_vector.html">VectorVector<Op></a>{}(a_ptr, b_ptr, out_ptr, a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> }</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> </div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <span class="comment">// General computation so let's try to optimize</span></div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="keyword">auto</span> [new_shape, new_strides] = <a class="code hl_function" href="namespacemlx_1_1core.html#a4d594bb84abeff4619d1abb77b20123e">collapse_contiguous_dims</a>(</div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>(), {a.strides(), b.strides(), out.strides()});</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keyword">auto</span>& a_strides = new_strides[0];</div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="keyword">auto</span>& b_strides = new_strides[1];</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keyword">auto</span>& strides = new_strides[2];</div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> </div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="comment">// Get the left-most dim such that the array is row contiguous after</span></div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="keyword">auto</span> leftmost_rc_dim = [&strides](<span class="keyword">const</span> <span class="keyword">auto</span>& arr_strides) {</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="keywordtype">int</span> d = arr_strides.size() - 1;</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <span class="keywordflow">for</span> (; d >= 0 && arr_strides[d] == strides[d]; d--) {</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> }</div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordflow">return</span> d + 1;</div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> };</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keyword">auto</span> a_rc_dim = leftmost_rc_dim(a_strides);</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keyword">auto</span> b_rc_dim = leftmost_rc_dim(b_strides);</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> </div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <span class="comment">// The full computation is scalar scalar so call the base op once</span></div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4">BinaryOpType::ScalarScalar</a>) {</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> *(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>()) = op(*a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>(), *b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>());</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> }</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> </div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="comment">// The full computation is scalar vector so delegate to the op</span></div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">BinaryOpType::ScalarVector</a>) {</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_scalar_vector.html">ScalarVector</a>{op}(a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>(), b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>(), out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>(), b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>());</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> }</div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <span class="comment">// Get the left-most dim such that the array is a broadcasted "scalar" after</span></div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="keyword">auto</span> leftmost_s_dim = [](<span class="keyword">const</span> <span class="keyword">auto</span>& arr_strides) {</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="keywordtype">int</span> d = arr_strides.size() - 1;</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">for</span> (; d >= 0 && arr_strides[d] == 0; d--) {</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> }</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordflow">return</span> d + 1;</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> };</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keyword">auto</span> a_s_dim = leftmost_s_dim(a_strides);</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="keyword">auto</span> b_s_dim = leftmost_s_dim(b_strides);</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> </div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keyword">auto</span> ndim = new_shape.size();</div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> </div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <span class="comment">// The full computation is vector scalar so delegate to the op</span></div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">BinaryOpType::VectorScalar</a>) {</div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_vector_scalar.html">VectorScalar</a>{op}(a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>(), b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>(), out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>(), a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>());</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> }</div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> </div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <span class="comment">// The full computation is vector vector so delegate to the op</span></div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a4d8269410dcd9cadc9722e9a118bddfb">BinaryOpType::VectorVector</a>) {</div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_vector_vector.html">VectorVector</a>{op}(a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>(), b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>(), out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>(), out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>());</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> }</div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> </div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="comment">// General computation so let's try to optimize</span></div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="keyword">auto</span> [new_shape, new_strides] = <a class="code hl_function" href="namespacemlx_1_1core.html#a4d594bb84abeff4619d1abb77b20123e">collapse_contiguous_dims</a>(</div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>(), {a.strides(), b.strides(), out.strides()});</div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keyword">const</span> <span class="keyword">auto</span>& a_strides = new_strides[0];</div>
|
||||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> <span class="keyword">const</span> <span class="keyword">auto</span>& b_strides = new_strides[1];</div>
|
||||
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <span class="keyword">const</span> <span class="keyword">auto</span>& strides = new_strides[2];</div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> </div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="comment">// Get the left-most dim such that the array is row contiguous after</span></div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <span class="keyword">auto</span> leftmost_rc_dim = [&strides](<span class="keyword">const</span> <span class="keyword">auto</span>& arr_strides) {</div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <span class="keywordtype">int</span> d = arr_strides.size() - 1;</div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="keywordflow">for</span> (; d >= 0 && arr_strides[d] == strides[d]; d--) {</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> }</div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> <span class="keywordflow">return</span> d + 1;</div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> };</div>
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> <span class="keyword">auto</span> a_rc_dim = leftmost_rc_dim(a_strides);</div>
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="keyword">auto</span> b_rc_dim = leftmost_rc_dim(b_strides);</div>
|
||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> </div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> <span class="comment">// Get the left-most dim such that the array is a broadcasted "scalar" after</span></div>
|
||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> <span class="keyword">auto</span> leftmost_s_dim = [](<span class="keyword">const</span> <span class="keyword">auto</span>& arr_strides) {</div>
|
||||
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> <span class="keywordtype">int</span> d = arr_strides.size() - 1;</div>
|
||||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> <span class="keywordflow">for</span> (; d >= 0 && arr_strides[d] == 0; d--) {</div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> }</div>
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> <span class="keywordflow">return</span> d + 1;</div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> };</div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <span class="keyword">auto</span> a_s_dim = leftmost_s_dim(a_strides);</div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> <span class="keyword">auto</span> b_s_dim = leftmost_s_dim(b_strides);</div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> </div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keyword">auto</span> ndim = new_shape.size();</div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> </div>
|
||||
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> <span class="comment">// Case 1: LxM and FxM where L and F are broadcastable and M is row contiguous</span></div>
|
||||
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <span class="keywordtype">int</span> dim = ndim;</div>
|
||||
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> <span class="keywordflow">if</span> (<span class="keywordtype">int</span> d = std::max(a_rc_dim, b_rc_dim); d < ndim) {</div>
|
||||
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> bopt = <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a4d8269410dcd9cadc9722e9a118bddfb">BinaryOpType::VectorVector</a>;</div>
|
||||
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> dim = d;</div>
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> <span class="comment">// Case 2: LxM and Fx1 where L and F are broadcastable and M is row</span></div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> <span class="comment">// contiguous</span></div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">int</span> d = std::max(a_rc_dim, b_s_dim); d < ndim) {</div>
|
||||
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> bopt = <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">BinaryOpType::VectorScalar</a>;</div>
|
||||
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> dim = d;</div>
|
||||
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> <span class="comment">// Case 3: Lx1 and FxM where L and F are broadcastable and M is row</span></div>
|
||||
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> <span class="comment">// contiguous</span></div>
|
||||
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">int</span> d = std::max(a_s_dim, b_rc_dim); d < ndim) {</div>
|
||||
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> bopt = <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">BinaryOpType::ScalarVector</a>;</div>
|
||||
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> dim = d;</div>
|
||||
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> }</div>
|
||||
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> </div>
|
||||
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> <span class="comment">// Can be sure dim > 0 since otherwise we would have used one of the fully</span></div>
|
||||
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <span class="comment">// contiguous methods above. Except for the case that the flags do not</span></div>
|
||||
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="comment">// correspond to the underlying contiguity.</span></div>
|
||||
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <span class="keywordflow">if</span> (dim == 0 || strides[dim - 1] < 16) {</div>
|
||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> bopt = <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f">BinaryOpType::General</a>;</div>
|
||||
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> dim = ndim;</div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> }</div>
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> </div>
|
||||
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> <span class="keywordflow">switch</span> (bopt) {</div>
|
||||
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a4d8269410dcd9cadc9722e9a118bddfb">BinaryOpType::VectorVector</a>:</div>
|
||||
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755">binary_op_dispatch_dims<T, U, true></a>(</div>
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> a,</div>
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> b,</div>
|
||||
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> out,</div>
|
||||
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_vector_vector.html">VectorVector</a>{op},</div>
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> dim,</div>
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> new_shape,</div>
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> a_strides,</div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> b_strides,</div>
|
||||
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> strides);</div>
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">BinaryOpType::VectorScalar</a>:</div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755">binary_op_dispatch_dims<T, U, true></a>(</div>
|
||||
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> a,</div>
|
||||
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> b,</div>
|
||||
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> out,</div>
|
||||
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_vector_scalar.html">VectorScalar</a>{op},</div>
|
||||
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> dim,</div>
|
||||
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> new_shape,</div>
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> a_strides,</div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> b_strides,</div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> strides);</div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">BinaryOpType::ScalarVector</a>:</div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755">binary_op_dispatch_dims<T, U, true></a>(</div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> a,</div>
|
||||
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> b,</div>
|
||||
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> out,</div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_scalar_vector.html">ScalarVector</a>{op},</div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> dim,</div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> new_shape,</div>
|
||||
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> a_strides,</div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> b_strides,</div>
|
||||
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> strides);</div>
|
||||
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755">binary_op_dispatch_dims<T, U, false></a>(</div>
|
||||
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> a, b, out, op, dim, new_shape, a_strides, b_strides, strides);</div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> }</div>
|
||||
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span>}</div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <span class="comment">// Case 1: LxM and FxM where L and F are broadcastable and M is row</span></div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="comment">// contiguous</span></div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <span class="keywordtype">int</span> dim = ndim;</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordflow">if</span> (<span class="keywordtype">int</span> d = std::max(a_rc_dim, b_rc_dim); d < ndim) {</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> bopt = <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a4d8269410dcd9cadc9722e9a118bddfb">BinaryOpType::VectorVector</a>;</div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> dim = d;</div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <span class="comment">// Case 2: LxM and Fx1 where L and F are broadcastable and M is row</span></div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="comment">// contiguous</span></div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">int</span> d = std::max(a_rc_dim, b_s_dim); d < ndim) {</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> bopt = <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">BinaryOpType::VectorScalar</a>;</div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> dim = d;</div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="comment">// Case 3: Lx1 and FxM where L and F are broadcastable and M is row</span></div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="comment">// contiguous</span></div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keywordtype">int</span> d = std::max(a_s_dim, b_rc_dim); d < ndim) {</div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> bopt = <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">BinaryOpType::ScalarVector</a>;</div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> dim = d;</div>
|
||||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> }</div>
|
||||
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> </div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="comment">// Can be sure dim > 0 since otherwise we would have used one of the fully</span></div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="comment">// contiguous methods above. Except for the case that the flags do not</span></div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <span class="comment">// correspond to the underlying contiguity.</span></div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <span class="keywordflow">if</span> (dim == 0 || strides[dim - 1] < 16) {</div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> bopt = <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f">BinaryOpType::General</a>;</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> dim = ndim;</div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> }</div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> </div>
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> <span class="keywordflow">switch</span> (bopt) {</div>
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a4d8269410dcd9cadc9722e9a118bddfb">BinaryOpType::VectorVector</a>:</div>
|
||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a">binary_op_dispatch_dims<T, U, true, VectorVector<Op></a>>(</div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> out_ptr,</div>
|
||||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> dim,</div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>(),</div>
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> new_shape,</div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> a_strides,</div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> b_strides,</div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> strides);</div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">BinaryOpType::VectorScalar</a>:</div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a">binary_op_dispatch_dims<T, U, true, VectorScalar<Op></a>>(</div>
|
||||
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> out_ptr,</div>
|
||||
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> dim,</div>
|
||||
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>(),</div>
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> new_shape,</div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> a_strides,</div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> b_strides,</div>
|
||||
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> strides);</div>
|
||||
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">BinaryOpType::ScalarVector</a>:</div>
|
||||
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a">binary_op_dispatch_dims<T, U, true, ScalarVector<Op></a>>(</div>
|
||||
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> out_ptr,</div>
|
||||
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> dim,</div>
|
||||
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>(),</div>
|
||||
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> new_shape,</div>
|
||||
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> a_strides,</div>
|
||||
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> b_strides,</div>
|
||||
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> strides);</div>
|
||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a">binary_op_dispatch_dims<T, U, false, Op></a>(</div>
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> out_ptr,</div>
|
||||
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> dim,</div>
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>(),</div>
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> new_shape,</div>
|
||||
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> a_strides,</div>
|
||||
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> b_strides,</div>
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> strides);</div>
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> }</div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> </div>
|
||||
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00321" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a2aca3458c56605a74d07ec39876549bc"> 321</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op) {</div>
|
||||
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<T, T></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span>}</div>
|
||||
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> </div>
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00289" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a5160ef5819f58cf040c9613ecce548f1"> 289</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ae0c47c0bd95bb8c44339159e04c0f604">binary_op</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, <a class="code hl_enumeration" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">BinaryOpType</a> bopt) {</div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ae0c47c0bd95bb8c44339159e04c0f604">binary_op<T, T, Op></a>(a, b, out, bopt);</div>
|
||||
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> </div>
|
||||
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00326" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ae374861abd45cf019c3e6be2026f3798"> 326</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ae374861abd45cf019c3e6be2026f3798">binary</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op) {</div>
|
||||
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> <span class="keywordflow">switch</span> (out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>()) {</div>
|
||||
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a113d2bac7e4aa6a4cb4a5c3242527b82">bool_</a>:</div>
|
||||
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<bool></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9778d50afbf456b0bd738751243b3b68">uint8</a>:</div>
|
||||
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<uint8_t></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a312a70c487366968af5e6cbf5038c812">uint16</a>:</div>
|
||||
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<uint16_t></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#ac63820d6fe10545907c33faf466a929e">uint32</a>:</div>
|
||||
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<uint32_t></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8">uint64</a>:</div>
|
||||
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<uint64_t></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">int8</a>:</div>
|
||||
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<int8_t></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">int16</a>:</div>
|
||||
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<int16_t></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">int32</a>:</div>
|
||||
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<int32_t></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">int64</a>:</div>
|
||||
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<int64_t></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">float16</a>:</div>
|
||||
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<float16_t></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">float32</a>:</div>
|
||||
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<float></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">float64</a>:</div>
|
||||
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"> 362</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<double></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">bfloat16</a>:</div>
|
||||
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<bfloat16_t></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">complex64</a>:</div>
|
||||
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<complex64_t></a>(a, b, out, op);</div>
|
||||
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> }</div>
|
||||
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"> 371</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> </div>
|
||||
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aallocator_8h_html"><div class="ttname"><a href="allocator_8h.html">allocator.h</a></div></div>
|
||||
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> </div>
|
||||
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="abackend_2common_2utils_8h_html"><div class="ttname"><a href="backend_2common_2utils_8h.html">utils.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a1d06c76b0f3010a5c329d0e9e29e0597"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">mlx::core::array::shape</a></div><div class="ttdeci">const Shape & shape() const</div><div class="ttdoc">The shape of the array as a vector of integers.</div><div class="ttdef"><b>Definition</b> array.h:103</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a598f87161926d9e0b516860f0ea2c8f6"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">mlx::core::array::size</a></div><div class="ttdeci">size_t size() const</div><div class="ttdoc">The number of elements in the array.</div><div class="ttdef"><b>Definition</b> array.h:88</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a72e3ce6c03fefe272cadf214bd127b95"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">mlx::core::array::data</a></div><div class="ttdeci">T * data()</div><div class="ttdef"><b>Definition</b> array.h:354</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ae29e7d6fbfbea1e5e321a8d1ea3cfacd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">mlx::core::array::dtype</a></div><div class="ttdeci">Dtype dtype() const</div><div class="ttdoc">Get the arrays data type.</div><div class="ttdef"><b>Definition</b> array.h:131</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_afaf2a370fa35d96af1b27a4b814e3bfd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">mlx::core::array::data_size</a></div><div class="ttdeci">size_t data_size() const</div><div class="ttdoc">The size (in elements) of the underlying buffer the array points to.</div><div class="ttdef"><b>Definition</b> array.h:332</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a72e3ce6c03fefe272cadf214bd127b95"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">mlx::core::array::data</a></div><div class="ttdeci">T * data()</div><div class="ttdef"><b>Definition</b> array.h:349</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_afaf2a370fa35d96af1b27a4b814e3bfd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">mlx::core::array::data_size</a></div><div class="ttdeci">size_t data_size() const</div><div class="ttdoc">The size (in elements) of the underlying buffer the array points to.</div><div class="ttdef"><b>Definition</b> array.h:327</div></div>
|
||||
<div class="ttc" id="acommon_2binary_8h_html"><div class="ttname"><a href="common_2binary_8h.html">binary.h</a></div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a4041676517d96870293e5448c7e2b5a4"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">mlx::core::simd::load</a></div><div class="ttdeci">Simd< T, N > load(const T *x)</div><div class="ttdef"><b>Definition</b> base_simd.h:28</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_ac91bd36c7caafd3c7ff176e7e2f81887"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">mlx::core::simd::max_size</a></div><div class="ttdeci">static constexpr int max_size</div><div class="ttdef"><b>Definition</b> base_simd.h:14</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_afa2236afddfdec312eb7e27b89a5316a"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#afa2236afddfdec312eb7e27b89a5316a">mlx::core::simd::store</a></div><div class="ttdeci">void store(T *dst, Simd< T, N > x)</div><div class="ttdef"><b>Definition</b> base_simd.h:33</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a113d2bac7e4aa6a4cb4a5c3242527b82"><div class="ttname"><a href="namespacemlx_1_1core.html#a113d2bac7e4aa6a4cb4a5c3242527b82">mlx::core::bool_</a></div><div class="ttdeci">constexpr Dtype bool_</div><div class="ttdef"><b>Definition</b> dtype.h:68</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a1f42e3dd4787d2ecec7114a12daefec8"><div class="ttname"><a href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8">mlx::core::uint64</a></div><div class="ttdeci">constexpr Dtype uint64</div><div class="ttdef"><b>Definition</b> dtype.h:73</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a24eef9908f164adeece3be7c6924919a"><div class="ttname"><a href="namespacemlx_1_1core.html#a24eef9908f164adeece3be7c6924919a">mlx::core::get_binary_op_type</a></div><div class="ttdeci">BinaryOpType get_binary_op_type(const array &a, const array &b)</div><div class="ttdef"><b>Definition</b> binary.h:19</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a312a70c487366968af5e6cbf5038c812"><div class="ttname"><a href="namespacemlx_1_1core.html#a312a70c487366968af5e6cbf5038c812">mlx::core::uint16</a></div><div class="ttdeci">constexpr Dtype uint16</div><div class="ttdef"><b>Definition</b> dtype.h:71</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a474bf5eb8bca8c380207c9f659aef3b1"><div class="ttname"><a href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">mlx::core::float64</a></div><div class="ttdeci">constexpr Dtype float64</div><div class="ttdef"><b>Definition</b> dtype.h:82</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a4d594bb84abeff4619d1abb77b20123e"><div class="ttname"><a href="namespacemlx_1_1core.html#a4d594bb84abeff4619d1abb77b20123e">mlx::core::collapse_contiguous_dims</a></div><div class="ttdeci">std::tuple< Shape, std::vector< Strides > > collapse_contiguous_dims(const Shape &shape, const std::vector< Strides > &strides, int64_t size_cap=std::numeric_limits< int32_t >::max())</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a514cf8b4e6f0a6af3a867e752f4338f7"><div class="ttname"><a href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">mlx::core::bfloat16</a></div><div class="ttdeci">constexpr Dtype bfloat16</div><div class="ttdef"><b>Definition</b> dtype.h:83</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">mlx::core::BinaryOpType</a></div><div class="ttdeci">BinaryOpType</div><div class="ttdef"><b>Definition</b> binary.h:11</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f">mlx::core::BinaryOpType::General</a></div><div class="ttdeci">@ General</div><div class="ttdef"><b>Definition</b> binary.h:16</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6a4d8269410dcd9cadc9722e9a118bddfb"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a4d8269410dcd9cadc9722e9a118bddfb">mlx::core::BinaryOpType::VectorVector</a></div><div class="ttdeci">@ VectorVector</div><div class="ttdef"><b>Definition</b> binary.h:15</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4">mlx::core::BinaryOpType::ScalarScalar</a></div><div class="ttdeci">@ ScalarScalar</div><div class="ttdef"><b>Definition</b> binary.h:12</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">mlx::core::BinaryOpType::VectorScalar</a></div><div class="ttdeci">@ VectorScalar</div><div class="ttdef"><b>Definition</b> binary.h:14</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">mlx::core::BinaryOpType::ScalarVector</a></div><div class="ttdeci">@ ScalarVector</div><div class="ttdef"><b>Definition</b> binary.h:13</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a5d6373aad1444edc9de1eb07bfe5cad3"><div class="ttname"><a href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">mlx::core::int32</a></div><div class="ttdeci">constexpr Dtype int32</div><div class="ttdef"><b>Definition</b> dtype.h:77</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a66c9ee5018168b9101de52e0122d9755"><div class="ttname"><a href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755">mlx::core::binary_op_dispatch_dims</a></div><div class="ttdeci">void binary_op_dispatch_dims(const array &a, const array &b, array &out, Op op, int dim, const Shape &shape, const Strides &a_strides, const Strides &b_strides, const Strides &out_strides)</div><div class="ttdef"><b>Definition</b> binary.h:122</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6894543b340321193dfb8052c438a319"><div class="ttname"><a href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">mlx::core::float32</a></div><div class="ttdeci">constexpr Dtype float32</div><div class="ttdef"><b>Definition</b> dtype.h:81</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a694e23f2d59606643728ad443d621416"><div class="ttname"><a href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">mlx::core::Shape</a></div><div class="ttdeci">std::vector< ShapeElem > Shape</div><div class="ttdef"><b>Definition</b> array.h:21</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6a52856325c2eb031d3983eba2108d59"><div class="ttname"><a href="namespacemlx_1_1core.html#a6a52856325c2eb031d3983eba2108d59">mlx::core::set_binary_op_output_data</a></div><div class="ttdeci">void set_binary_op_output_data(const array &a, const array &b, array &out, BinaryOpType bopt, bool donate_with_move=false)</div><div class="ttdef"><b>Definition</b> binary.h:37</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a71ebba4ad1afa730962f0692c4f42f07"><div class="ttname"><a href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">mlx::core::int16</a></div><div class="ttdeci">constexpr Dtype int16</div><div class="ttdef"><b>Definition</b> dtype.h:76</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a79939016d0972ded7db37130da2a8b5c"><div class="ttname"><a href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">mlx::core::Strides</a></div><div class="ttdeci">std::vector< int64_t > Strides</div><div class="ttdef"><b>Definition</b> array.h:22</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a7ca09ebf776fe32db580f9038587ec31"><div class="ttname"><a href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">mlx::core::binary_op_dims</a></div><div class="ttdeci">void binary_op_dims(const T *a, const T *b, U *out, Op op, const Shape &shape, const Strides &a_strides, const Strides &b_strides, const Strides &out_strides, int axis)</div><div class="ttdef"><b>Definition</b> binary.h:89</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a892e934e146dd938d144cee8813ca672"><div class="ttname"><a href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">mlx::core::int8</a></div><div class="ttdeci">constexpr Dtype int8</div><div class="ttdef"><b>Definition</b> dtype.h:75</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9019bdc191054ada0a502c7c34cef5b8"><div class="ttname"><a href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">mlx::core::int64</a></div><div class="ttdeci">constexpr Dtype int64</div><div class="ttdef"><b>Definition</b> dtype.h:78</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9778d50afbf456b0bd738751243b3b68"><div class="ttname"><a href="namespacemlx_1_1core.html#a9778d50afbf456b0bd738751243b3b68">mlx::core::uint8</a></div><div class="ttdeci">constexpr Dtype uint8</div><div class="ttdef"><b>Definition</b> dtype.h:70</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9c1c1fdf9a0840a16a4d10a8f74f761d"><div class="ttname"><a href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">mlx::core::binary_op</a></div><div class="ttdeci">void binary_op(const array &a, const array &b, array &out, Op op)</div><div class="ttdef"><b>Definition</b> binary.h:194</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_abf228ee9d8ec48c03bb15adcc4e1f3ec"><div class="ttname"><a href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">mlx::core::float16</a></div><div class="ttdeci">constexpr Dtype float16</div><div class="ttdef"><b>Definition</b> dtype.h:80</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac63820d6fe10545907c33faf466a929e"><div class="ttname"><a href="namespacemlx_1_1core.html#ac63820d6fe10545907c33faf466a929e">mlx::core::uint32</a></div><div class="ttdeci">constexpr Dtype uint32</div><div class="ttdef"><b>Definition</b> dtype.h:72</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ae374861abd45cf019c3e6be2026f3798"><div class="ttname"><a href="namespacemlx_1_1core.html#ae374861abd45cf019c3e6be2026f3798">mlx::core::binary</a></div><div class="ttdeci">void binary(const array &a, const array &b, array &out, Op op)</div><div class="ttdef"><b>Definition</b> binary.h:326</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_af99db87e0078bfcdb383f5689bc874d4"><div class="ttname"><a href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">mlx::core::complex64</a></div><div class="ttdeci">constexpr Dtype complex64</div><div class="ttdef"><b>Definition</b> dtype.h:84</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ad1229ffbba21bdb81f63482a4651bc5a"><div class="ttname"><a href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a">mlx::core::binary_op_dispatch_dims</a></div><div class="ttdeci">void binary_op_dispatch_dims(const T *a, const T *b, U *out, int dim, int size, const Shape &shape, const Strides &a_strides, const Strides &b_strides, const Strides &out_strides)</div><div class="ttdef"><b>Definition</b> binary.h:108</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ae0c47c0bd95bb8c44339159e04c0f604"><div class="ttname"><a href="namespacemlx_1_1core.html#ae0c47c0bd95bb8c44339159e04c0f604">mlx::core::binary_op</a></div><div class="ttdeci">void binary_op(const array &a, const array &b, array &out, BinaryOpType bopt)</div><div class="ttdef"><b>Definition</b> binary.h:152</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_aeac6fa9529eedba76b27de9d098de963"><div class="ttname"><a href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">mlx::core::binary_op_dims</a></div><div class="ttdeci">void binary_op_dims(const T *a, const T *b, U *out, const Shape &shape, const Strides &a_strides, const Strides &b_strides, const Strides &out_strides, int axis)</div><div class="ttdef"><b>Definition</b> binary.h:76</div></div>
|
||||
<div class="ttc" id="asimd_8h_html"><div class="ttname"><a href="simd_8h.html">simd.h</a></div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html">mlx::core::ContiguousIterator</a></div><div class="ttdef"><b>Definition</b> utils.h:73</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html_a5ea4f0e40900e8c7e0830e1fb561af1a"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">mlx::core::ContiguousIterator::loc</a></div><div class="ttdeci">int64_t loc</div><div class="ttdef"><b>Definition</b> utils.h:126</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html_aad921dd422adb0a0f555e19a2f42239c"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">mlx::core::ContiguousIterator::step</a></div><div class="ttdeci">void step()</div><div class="ttdef"><b>Definition</b> utils.h:74</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_scalar_vector_html"><div class="ttname"><a href="structmlx_1_1core_1_1_scalar_vector.html">mlx::core::ScalarVector</a></div><div class="ttdef"><b>Definition</b> binary.h:40</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_scalar_vector_html_a69d6a3ddd7586e8e19a42c5e6f5a287b"><div class="ttname"><a href="structmlx_1_1core_1_1_scalar_vector.html#a69d6a3ddd7586e8e19a42c5e6f5a287b">mlx::core::ScalarVector::ScalarVector</a></div><div class="ttdeci">ScalarVector(Op op_)</div><div class="ttdef"><b>Definition</b> binary.h:43</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_scalar_vector_html_ab174fe55970fb4ee1c6a2b7628a24df1"><div class="ttname"><a href="structmlx_1_1core_1_1_scalar_vector.html#ab174fe55970fb4ee1c6a2b7628a24df1">mlx::core::ScalarVector::operator()</a></div><div class="ttdeci">void operator()(const T *a, const T *b, U *dst, int size)</div><div class="ttdef"><b>Definition</b> binary.h:46</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_scalar_vector_html_ac9c2214744bc972150740e169b603b9b"><div class="ttname"><a href="structmlx_1_1core_1_1_scalar_vector.html#ac9c2214744bc972150740e169b603b9b">mlx::core::ScalarVector::op</a></div><div class="ttdeci">Op op</div><div class="ttdef"><b>Definition</b> binary.h:41</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_scalar_html"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_scalar.html">mlx::core::VectorScalar</a></div><div class="ttdef"><b>Definition</b> binary.h:16</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_scalar_html_a1af3ff644ce023a7e4f92a7c3634c44f"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_scalar.html#a1af3ff644ce023a7e4f92a7c3634c44f">mlx::core::VectorScalar::operator()</a></div><div class="ttdeci">void operator()(const T *a, const T *b, U *dst, int size)</div><div class="ttdef"><b>Definition</b> binary.h:22</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_scalar_html_a5fe1744adb58aaa845acca1e46725537"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_scalar.html#a5fe1744adb58aaa845acca1e46725537">mlx::core::VectorScalar::op</a></div><div class="ttdeci">Op op</div><div class="ttdef"><b>Definition</b> binary.h:17</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_scalar_html_a97088143e6d301d753dcdd1ccdd82287"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_scalar.html#a97088143e6d301d753dcdd1ccdd82287">mlx::core::VectorScalar::VectorScalar</a></div><div class="ttdeci">VectorScalar(Op op_)</div><div class="ttdef"><b>Definition</b> binary.h:19</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_vector_html"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_vector.html">mlx::core::VectorVector</a></div><div class="ttdef"><b>Definition</b> binary.h:64</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_vector_html_a4867666c95c597a113afb64f173cc022"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_vector.html#a4867666c95c597a113afb64f173cc022">mlx::core::VectorVector::VectorVector</a></div><div class="ttdeci">VectorVector(Op op_)</div><div class="ttdef"><b>Definition</b> binary.h:67</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_vector_html_a6d69d070c75cf0281e11e36e0717ab50"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_vector.html#a6d69d070c75cf0281e11e36e0717ab50">mlx::core::VectorVector::op</a></div><div class="ttdeci">Op op</div><div class="ttdef"><b>Definition</b> binary.h:65</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_vector_html_a97a0bed419933d7685238a962f2e4215"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_vector.html#a97a0bed419933d7685238a962f2e4215">mlx::core::VectorVector::operator()</a></div><div class="ttdeci">void operator()(const T *a, const T *b, U *dst, int size)</div><div class="ttdef"><b>Definition</b> binary.h:70</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_scalar_vector_html"><div class="ttname"><a href="structmlx_1_1core_1_1_scalar_vector.html">mlx::core::ScalarVector</a></div><div class="ttdef"><b>Definition</b> binary.h:35</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_scalar_vector_html_ab174fe55970fb4ee1c6a2b7628a24df1"><div class="ttname"><a href="structmlx_1_1core_1_1_scalar_vector.html#ab174fe55970fb4ee1c6a2b7628a24df1">mlx::core::ScalarVector::operator()</a></div><div class="ttdeci">void operator()(const T *a, const T *b, U *dst, int size)</div><div class="ttdef"><b>Definition</b> binary.h:37</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_scalar_html"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_scalar.html">mlx::core::VectorScalar</a></div><div class="ttdef"><b>Definition</b> binary.h:15</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_scalar_html_a1af3ff644ce023a7e4f92a7c3634c44f"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_scalar.html#a1af3ff644ce023a7e4f92a7c3634c44f">mlx::core::VectorScalar::operator()</a></div><div class="ttdeci">void operator()(const T *a, const T *b, U *dst, int size)</div><div class="ttdef"><b>Definition</b> binary.h:17</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_vector_html"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_vector.html">mlx::core::VectorVector</a></div><div class="ttdef"><b>Definition</b> binary.h:55</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_vector_vector_html_a97a0bed419933d7685238a962f2e4215"><div class="ttname"><a href="structmlx_1_1core_1_1_vector_vector.html#a97a0bed419933d7685238a962f2e4215">mlx::core::VectorVector::operator()</a></div><div class="ttdeci">void operator()(const T *a, const T *b, U *dst, int size)</div><div class="ttdef"><b>Definition</b> binary.h:57</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1simd_1_1_simd_html"><div class="ttname"><a href="structmlx_1_1core_1_1simd_1_1_simd.html">mlx::core::simd::Simd</a></div><div class="ttdef"><b>Definition</b> accelerate_simd.h:55</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
+63
-135
@@ -117,7 +117,7 @@ $(function(){initNavTree('cpu_2binary__two_8h_source.html',''); initResizable(tr
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">namespace </span>{</div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keyword">typename</span> Op, <span class="keywordtype">int</span> D></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">binary_op_dims</a>(</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">binary_op_dims</a>(</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">const</span> T* a,</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">const</span> T* b,</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> U* out_a,</div>
|
||||
@@ -135,7 +135,7 @@ $(function(){initNavTree('cpu_2binary__two_8h_source.html',''); initResizable(tr
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">N</a>; i++) {</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (D > 1) {</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">binary_op_dims</a><T, U, Op, D - 1>(</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">binary_op_dims</a><T, U, Op, D - 1>(</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> a,</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> b,</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> out_a,</div>
|
||||
@@ -157,7 +157,7 @@ $(function(){initNavTree('cpu_2binary__two_8h_source.html',''); initResizable(tr
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span>}</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keyword">typename</span> Op></div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755">binary_op_dispatch_dims</a>(</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a">binary_op_dispatch_dims</a>(</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a,</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b,</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out_a,</div>
|
||||
@@ -165,18 +165,18 @@ $(function(){initNavTree('cpu_2binary__two_8h_source.html',''); initResizable(tr
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> Op op) {</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keyword">auto</span> [shape, strides] = <a class="code hl_function" href="namespacemlx_1_1core.html#a4d594bb84abeff4619d1abb77b20123e">collapse_contiguous_dims</a>(</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> a.shape(), {a.strides(), b.strides(), out_a.strides()});</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keyword">const</span> <span class="keyword">auto</span>& a_strides = strides[0];</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keyword">const</span> <span class="keyword">auto</span>& b_strides = strides[1];</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keyword">const</span> <span class="keyword">auto</span>& out_strides = strides[2];</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keyword">const</span> T* a_ptr = a.data<T>();</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">const</span> T* b_ptr = b.data<T>();</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> U* out_a_ptr = out_a.data<U>();</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> U* out_b_ptr = out_b.data<U>();</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keyword">const</span> T* a_ptr = a.data<T>();</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keyword">const</span> T* b_ptr = b.data<T>();</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> U* out_a_ptr = out_a.data<U>();</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> U* out_b_ptr = out_b.data<U>();</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">const</span> <span class="keyword">auto</span>& a_strides = strides[0];</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">const</span> <span class="keyword">auto</span>& b_strides = strides[1];</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keyword">const</span> <span class="keyword">auto</span>& out_strides = strides[2];</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordtype">int</span> ndim = shape.size();</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">switch</span> (ndim) {</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordflow">case</span> 1:</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">binary_op_dims<T, U, Op, 1></a>(</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">binary_op_dims<T, U, Op, 1></a>(</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> out_a_ptr,</div>
|
||||
@@ -189,7 +189,7 @@ $(function(){initNavTree('cpu_2binary__two_8h_source.html',''); initResizable(tr
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> 0);</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">case</span> 2:</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">binary_op_dims<T, U, Op, 2></a>(</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">binary_op_dims<T, U, Op, 2></a>(</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> out_a_ptr,</div>
|
||||
@@ -207,7 +207,7 @@ $(function(){initNavTree('cpu_2binary__two_8h_source.html',''); initResizable(tr
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> b_it(shape, b_strides, ndim - 2);</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keyword">auto</span> stride = out_strides[ndim - 3];</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> elem = 0; elem < a.size(); elem += stride) {</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">binary_op_dims<T, U, Op, 2></a>(</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">binary_op_dims<T, U, Op, 2></a>(</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> a_ptr + a_it.loc,</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> b_ptr + b_it.loc,</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> out_a_ptr + elem,</div>
|
||||
@@ -224,141 +224,69 @@ $(function(){initNavTree('cpu_2binary__two_8h_source.html',''); initResizable(tr
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span>}</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U = T, <span class="keyword">typename</span> Op></div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op</a>(</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ae0c47c0bd95bb8c44339159e04c0f604">binary_op</a>(</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a,</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b,</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> std::vector<array>& outputs,</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> Op op) {</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keyword">auto</span> bopt = <a class="code hl_function" href="namespacemlx_1_1core.html#a24eef9908f164adeece3be7c6924919a">get_binary_op_type</a>(a, b);</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keyword">auto</span>& out_a = outputs[0];</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keyword">auto</span>& out_b = outputs[1];</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a6a52856325c2eb031d3983eba2108d59">set_binary_op_output_data</a>(a, b, out_a, bopt);</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a6a52856325c2eb031d3983eba2108d59">set_binary_op_output_data</a>(a, b, out_b, bopt);</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="comment">// The full computation is scalar scalar so call the base op once</span></div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f">BinaryOpType::General</a>) {</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755">binary_op_dispatch_dims<T, U, Op></a>(a, b, out_a, out_b, op);</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> }</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> </div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keyword">auto</span> a_ptr = a.data<T>();</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keyword">auto</span> b_ptr = b.data<T>();</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keyword">auto</span> out_a_ptr = out_a.data<U>();</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keyword">auto</span> out_b_ptr = out_b.data<U>();</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4">BinaryOpType::ScalarScalar</a>) {</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> std::tie(*out_a_ptr, *out_b_ptr) = op(*a_ptr, *b_ptr);</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">BinaryOpType::ScalarVector</a>) {</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < b.size(); ++i) {</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> std::tie(*out_a_ptr, *out_b_ptr) = op(*a_ptr, *b_ptr);</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> out_a_ptr++;</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> out_b_ptr++;</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> b_ptr++;</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> }</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">BinaryOpType::VectorScalar</a>) {</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < a.size(); ++i) {</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> std::tie(*out_a_ptr, *out_b_ptr) = op(*a_ptr, *b_ptr);</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> out_a_ptr++;</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> out_b_ptr++;</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> a_ptr++;</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> }</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> } <span class="keywordflow">else</span> { <span class="comment">// VectorVector</span></div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < a.size(); ++i) {</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> std::tie(*out_a_ptr, *out_b_ptr) = op(*a_ptr, *b_ptr);</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> out_a_ptr++;</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> out_b_ptr++;</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> a_ptr++;</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> b_ptr++;</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> }</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> }</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span>}</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> </div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ae374861abd45cf019c3e6be2026f3798">binary</a>(</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a,</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b,</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> std::vector<array>& outputs,</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> Op op) {</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keywordflow">switch</span> (outputs[0].dtype()) {</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a113d2bac7e4aa6a4cb4a5c3242527b82">bool_</a>:</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<bool></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9778d50afbf456b0bd738751243b3b68">uint8</a>:</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<uint8_t></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a312a70c487366968af5e6cbf5038c812">uint16</a>:</div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<uint16_t></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#ac63820d6fe10545907c33faf466a929e">uint32</a>:</div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<uint32_t></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8">uint64</a>:</div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<uint64_t></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">int8</a>:</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<int8_t></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">int16</a>:</div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<int16_t></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">int32</a>:</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<int32_t></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">int64</a>:</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<int64_t></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">float16</a>:</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<float16_t></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">float32</a>:</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<float></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">float64</a>:</div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<double></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">bfloat16</a>:</div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<bfloat16_t></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">complex64</a>:</div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">binary_op<complex64_t></a>(a, b, outputs, op);</div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> }</div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span>}</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> </div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span>} <span class="comment">// namespace</span></div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> </div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out_a,</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out_b,</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> Op op,</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <a class="code hl_enumeration" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">BinaryOpType</a> bopt) {</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="comment">// The full computation is scalar scalar so call the base op once</span></div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f">BinaryOpType::General</a>) {</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a">binary_op_dispatch_dims<T, U, Op></a>(a, b, out_a, out_b, op);</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> }</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keyword">auto</span> a_ptr = a.data<T>();</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keyword">auto</span> b_ptr = b.data<T>();</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keyword">auto</span> out_a_ptr = out_a.data<U>();</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keyword">auto</span> out_b_ptr = out_b.data<U>();</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4">BinaryOpType::ScalarScalar</a>) {</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> std::tie(*out_a_ptr, *out_b_ptr) = op(*a_ptr, *b_ptr);</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">BinaryOpType::ScalarVector</a>) {</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < b.data_size(); ++i) {</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> std::tie(*out_a_ptr, *out_b_ptr) = op(*a_ptr, *b_ptr);</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> out_a_ptr++;</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> out_b_ptr++;</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> b_ptr++;</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> }</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bopt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">BinaryOpType::VectorScalar</a>) {</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < a.data_size(); ++i) {</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> std::tie(*out_a_ptr, *out_b_ptr) = op(*a_ptr, *b_ptr);</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> out_a_ptr++;</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> out_b_ptr++;</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> a_ptr++;</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> }</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> } <span class="keywordflow">else</span> { <span class="comment">// VectorVector</span></div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < a.size(); ++i) {</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> std::tie(*out_a_ptr, *out_b_ptr) = op(*a_ptr, *b_ptr);</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> out_a_ptr++;</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> out_b_ptr++;</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> a_ptr++;</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> b_ptr++;</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> }</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> }</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span>}</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> </div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span>} <span class="comment">// namespace</span></div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="abackend_2common_2utils_8h_html"><div class="ttname"><a href="backend_2common_2utils_8h.html">utils.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="acpu_2binary_8h_html"><div class="ttname"><a href="cpu_2binary_8h.html">binary.h</a></div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a12b1553495a0c99d52472bd2a6626ddb"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a12b1553495a0c99d52472bd2a6626ddb">mlx::core::simd::N</a></div><div class="ttdeci">constexpr int N</div><div class="ttdef"><b>Definition</b> neon_fp16_simd.h:9</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a113d2bac7e4aa6a4cb4a5c3242527b82"><div class="ttname"><a href="namespacemlx_1_1core.html#a113d2bac7e4aa6a4cb4a5c3242527b82">mlx::core::bool_</a></div><div class="ttdeci">constexpr Dtype bool_</div><div class="ttdef"><b>Definition</b> dtype.h:68</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a1f42e3dd4787d2ecec7114a12daefec8"><div class="ttname"><a href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8">mlx::core::uint64</a></div><div class="ttdeci">constexpr Dtype uint64</div><div class="ttdef"><b>Definition</b> dtype.h:73</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a24eef9908f164adeece3be7c6924919a"><div class="ttname"><a href="namespacemlx_1_1core.html#a24eef9908f164adeece3be7c6924919a">mlx::core::get_binary_op_type</a></div><div class="ttdeci">BinaryOpType get_binary_op_type(const array &a, const array &b)</div><div class="ttdef"><b>Definition</b> binary.h:19</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a312a70c487366968af5e6cbf5038c812"><div class="ttname"><a href="namespacemlx_1_1core.html#a312a70c487366968af5e6cbf5038c812">mlx::core::uint16</a></div><div class="ttdeci">constexpr Dtype uint16</div><div class="ttdef"><b>Definition</b> dtype.h:71</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a474bf5eb8bca8c380207c9f659aef3b1"><div class="ttname"><a href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">mlx::core::float64</a></div><div class="ttdeci">constexpr Dtype float64</div><div class="ttdef"><b>Definition</b> dtype.h:82</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a4d594bb84abeff4619d1abb77b20123e"><div class="ttname"><a href="namespacemlx_1_1core.html#a4d594bb84abeff4619d1abb77b20123e">mlx::core::collapse_contiguous_dims</a></div><div class="ttdeci">std::tuple< Shape, std::vector< Strides > > collapse_contiguous_dims(const Shape &shape, const std::vector< Strides > &strides, int64_t size_cap=std::numeric_limits< int32_t >::max())</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a514cf8b4e6f0a6af3a867e752f4338f7"><div class="ttname"><a href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">mlx::core::bfloat16</a></div><div class="ttdeci">constexpr Dtype bfloat16</div><div class="ttdef"><b>Definition</b> dtype.h:83</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6">mlx::core::BinaryOpType</a></div><div class="ttdeci">BinaryOpType</div><div class="ttdef"><b>Definition</b> binary.h:11</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a0db377921f4ce762c62526131097968f">mlx::core::BinaryOpType::General</a></div><div class="ttdeci">@ General</div><div class="ttdef"><b>Definition</b> binary.h:16</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a7b15cb76e0535ea81a5b6af9c96dcde4">mlx::core::BinaryOpType::ScalarScalar</a></div><div class="ttdeci">@ ScalarScalar</div><div class="ttdef"><b>Definition</b> binary.h:12</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6a8a94416459b638cebf3bfbce26a6ce78">mlx::core::BinaryOpType::VectorScalar</a></div><div class="ttdeci">@ VectorScalar</div><div class="ttdef"><b>Definition</b> binary.h:14</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6"><div class="ttname"><a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6aabac63719294588466e3c2f00cccb0a6">mlx::core::BinaryOpType::ScalarVector</a></div><div class="ttdeci">@ ScalarVector</div><div class="ttdef"><b>Definition</b> binary.h:13</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a5d6373aad1444edc9de1eb07bfe5cad3"><div class="ttname"><a href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">mlx::core::int32</a></div><div class="ttdeci">constexpr Dtype int32</div><div class="ttdef"><b>Definition</b> dtype.h:77</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a66c9ee5018168b9101de52e0122d9755"><div class="ttname"><a href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755">mlx::core::binary_op_dispatch_dims</a></div><div class="ttdeci">void binary_op_dispatch_dims(const array &a, const array &b, array &out, Op op, int dim, const Shape &shape, const Strides &a_strides, const Strides &b_strides, const Strides &out_strides)</div><div class="ttdef"><b>Definition</b> binary.h:122</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6894543b340321193dfb8052c438a319"><div class="ttname"><a href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">mlx::core::float32</a></div><div class="ttdeci">constexpr Dtype float32</div><div class="ttdef"><b>Definition</b> dtype.h:81</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a694e23f2d59606643728ad443d621416"><div class="ttname"><a href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">mlx::core::Shape</a></div><div class="ttdeci">std::vector< ShapeElem > Shape</div><div class="ttdef"><b>Definition</b> array.h:21</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6a52856325c2eb031d3983eba2108d59"><div class="ttname"><a href="namespacemlx_1_1core.html#a6a52856325c2eb031d3983eba2108d59">mlx::core::set_binary_op_output_data</a></div><div class="ttdeci">void set_binary_op_output_data(const array &a, const array &b, array &out, BinaryOpType bopt, bool donate_with_move=false)</div><div class="ttdef"><b>Definition</b> binary.h:37</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a71ebba4ad1afa730962f0692c4f42f07"><div class="ttname"><a href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">mlx::core::int16</a></div><div class="ttdeci">constexpr Dtype int16</div><div class="ttdef"><b>Definition</b> dtype.h:76</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a79939016d0972ded7db37130da2a8b5c"><div class="ttname"><a href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">mlx::core::Strides</a></div><div class="ttdeci">std::vector< int64_t > Strides</div><div class="ttdef"><b>Definition</b> array.h:22</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a7ca09ebf776fe32db580f9038587ec31"><div class="ttname"><a href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31">mlx::core::binary_op_dims</a></div><div class="ttdeci">void binary_op_dims(const T *a, const T *b, U *out, Op op, const Shape &shape, const Strides &a_strides, const Strides &b_strides, const Strides &out_strides, int axis)</div><div class="ttdef"><b>Definition</b> binary.h:89</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a892e934e146dd938d144cee8813ca672"><div class="ttname"><a href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">mlx::core::int8</a></div><div class="ttdeci">constexpr Dtype int8</div><div class="ttdef"><b>Definition</b> dtype.h:75</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9019bdc191054ada0a502c7c34cef5b8"><div class="ttname"><a href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">mlx::core::int64</a></div><div class="ttdeci">constexpr Dtype int64</div><div class="ttdef"><b>Definition</b> dtype.h:78</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9778d50afbf456b0bd738751243b3b68"><div class="ttname"><a href="namespacemlx_1_1core.html#a9778d50afbf456b0bd738751243b3b68">mlx::core::uint8</a></div><div class="ttdeci">constexpr Dtype uint8</div><div class="ttdef"><b>Definition</b> dtype.h:70</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9c1c1fdf9a0840a16a4d10a8f74f761d"><div class="ttname"><a href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d">mlx::core::binary_op</a></div><div class="ttdeci">void binary_op(const array &a, const array &b, array &out, Op op)</div><div class="ttdef"><b>Definition</b> binary.h:194</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_abf228ee9d8ec48c03bb15adcc4e1f3ec"><div class="ttname"><a href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">mlx::core::float16</a></div><div class="ttdeci">constexpr Dtype float16</div><div class="ttdef"><b>Definition</b> dtype.h:80</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac63820d6fe10545907c33faf466a929e"><div class="ttname"><a href="namespacemlx_1_1core.html#ac63820d6fe10545907c33faf466a929e">mlx::core::uint32</a></div><div class="ttdeci">constexpr Dtype uint32</div><div class="ttdef"><b>Definition</b> dtype.h:72</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ae374861abd45cf019c3e6be2026f3798"><div class="ttname"><a href="namespacemlx_1_1core.html#ae374861abd45cf019c3e6be2026f3798">mlx::core::binary</a></div><div class="ttdeci">void binary(const array &a, const array &b, array &out, Op op)</div><div class="ttdef"><b>Definition</b> binary.h:326</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_af99db87e0078bfcdb383f5689bc874d4"><div class="ttname"><a href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">mlx::core::complex64</a></div><div class="ttdeci">constexpr Dtype complex64</div><div class="ttdef"><b>Definition</b> dtype.h:84</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ad1229ffbba21bdb81f63482a4651bc5a"><div class="ttname"><a href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a">mlx::core::binary_op_dispatch_dims</a></div><div class="ttdeci">void binary_op_dispatch_dims(const T *a, const T *b, U *out, int dim, int size, const Shape &shape, const Strides &a_strides, const Strides &b_strides, const Strides &out_strides)</div><div class="ttdef"><b>Definition</b> binary.h:108</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ae0c47c0bd95bb8c44339159e04c0f604"><div class="ttname"><a href="namespacemlx_1_1core.html#ae0c47c0bd95bb8c44339159e04c0f604">mlx::core::binary_op</a></div><div class="ttdeci">void binary_op(const array &a, const array &b, array &out, BinaryOpType bopt)</div><div class="ttdef"><b>Definition</b> binary.h:152</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_aeac6fa9529eedba76b27de9d098de963"><div class="ttname"><a href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963">mlx::core::binary_op_dims</a></div><div class="ttdeci">void binary_op_dims(const T *a, const T *b, U *out, const Shape &shape, const Strides &a_strides, const Strides &b_strides, const Strides &out_strides, int axis)</div><div class="ttdef"><b>Definition</b> binary.h:76</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html">mlx::core::ContiguousIterator</a></div><div class="ttdef"><b>Definition</b> utils.h:73</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
Vendored
+8
-7
@@ -108,7 +108,8 @@ $(function(){initNavTree('cpu_2copy_8h.html',''); initResizable(true); });
|
||||
<div class="headertitle"><div class="title">copy.h File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><code>#include "<a class="el" href="array_8h_source.html">mlx/array.h</a>"</code><br />
|
||||
<div class="textblock"><code>#include <optional></code><br />
|
||||
<code>#include "<a class="el" href="array_8h_source.html">mlx/array.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="common_2copy_8h_source.html">mlx/backend/common/copy.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="backend_2common_2utils_8h_source.html">mlx/backend/common/utils.h</a>"</code><br />
|
||||
</div>
|
||||
@@ -123,12 +124,12 @@ Namespaces</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a479648542a2bea151b947b18f0e79dd2" id="r_a479648542a2bea151b947b18f0e79dd2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a479648542a2bea151b947b18f0e79dd2">mlx::core::copy</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &src, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &dst, <a class="el" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype)</td></tr>
|
||||
<tr class="separator:a479648542a2bea151b947b18f0e79dd2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a98495894a796b2cc6d022e7a03432c64" id="r_a98495894a796b2cc6d022e7a03432c64"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a98495894a796b2cc6d022e7a03432c64">mlx::core::copy_inplace</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &src, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &dst, <a class="el" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype)</td></tr>
|
||||
<tr class="separator:a98495894a796b2cc6d022e7a03432c64"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae85bafda5ab0b4b2289591260cf07685" id="r_ae85bafda5ab0b4b2289591260cf07685"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#ae85bafda5ab0b4b2289591260cf07685">mlx::core::copy_inplace</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &src, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &dst, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &data_shape, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &i_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &o_strides, int64_t i_offset, int64_t o_offset, <a class="el" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype)</td></tr>
|
||||
<tr class="separator:ae85bafda5ab0b4b2289591260cf07685"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a017bd8bd743e26f1ff971c8749b55daf" id="r_a017bd8bd743e26f1ff971c8749b55daf"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a017bd8bd743e26f1ff971c8749b55daf">mlx::core::copy</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &src, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &dst, <a class="el" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:a017bd8bd743e26f1ff971c8749b55daf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab30708325761c91e7dde245827e9dd91" id="r_ab30708325761c91e7dde245827e9dd91"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#ab30708325761c91e7dde245827e9dd91">mlx::core::copy_inplace</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &src, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &dst, <a class="el" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:ab30708325761c91e7dde245827e9dd91"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1e4381d42877a5c6050c20e77d13c990" id="r_a1e4381d42877a5c6050c20e77d13c990"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a1e4381d42877a5c6050c20e77d13c990">mlx::core::copy_inplace</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &src, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &dst, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &data_shape, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &i_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &o_strides, int64_t i_offset, int64_t o_offset, <a class="el" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream, const std::optional< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &dynamic_i_offset=std::nullopt, const std::optional< <a class="el" href="classmlx_1_1core_1_1array.html">array</a> > &dynamic_o_offset=std::nullopt)</td></tr>
|
||||
<tr class="separator:a1e4381d42877a5c6050c20e77d13c990"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
Vendored
+3
-3
@@ -1,6 +1,6 @@
|
||||
var cpu_2copy_8h =
|
||||
[
|
||||
[ "mlx::core::copy", "namespacemlx_1_1core.html#a479648542a2bea151b947b18f0e79dd2", null ],
|
||||
[ "mlx::core::copy_inplace", "namespacemlx_1_1core.html#ae85bafda5ab0b4b2289591260cf07685", null ],
|
||||
[ "mlx::core::copy_inplace", "namespacemlx_1_1core.html#a98495894a796b2cc6d022e7a03432c64", null ]
|
||||
[ "mlx::core::copy", "namespacemlx_1_1core.html#a017bd8bd743e26f1ff971c8749b55daf", null ],
|
||||
[ "mlx::core::copy_inplace", "namespacemlx_1_1core.html#a1e4381d42877a5c6050c20e77d13c990", null ],
|
||||
[ "mlx::core::copy_inplace", "namespacemlx_1_1core.html#ab30708325761c91e7dde245827e9dd91", null ]
|
||||
];
|
||||
+27
-21
@@ -109,36 +109,42 @@ $(function(){initNavTree('cpu_2copy_8h_source.html',''); initResizable(true); })
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#pragma once</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "<a class="code" href="common_2copy_8h.html">mlx/backend/common/copy.h</a>"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "<a class="code" href="backend_2common_2utils_8h.html">mlx/backend/common/utils.h</a>"</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core.html">mlx::core</a> {</div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include <optional></span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "<a class="code" href="common_2copy_8h.html">mlx/backend/common/copy.h</a>"</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include "<a class="code" href="backend_2common_2utils_8h.html">mlx/backend/common/utils.h</a>"</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a479648542a2bea151b947b18f0e79dd2"> 11</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a479648542a2bea151b947b18f0e79dd2">copy</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& src, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& dst, <a class="code hl_enumeration" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype);</div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a98495894a796b2cc6d022e7a03432c64"> 12</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a98495894a796b2cc6d022e7a03432c64">copy_inplace</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& src, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& dst, <a class="code hl_enumeration" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype);</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ae85bafda5ab0b4b2289591260cf07685"> 14</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a98495894a796b2cc6d022e7a03432c64">copy_inplace</a>(</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& src,</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& dst,</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a>& data_shape,</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& i_strides,</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& o_strides,</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> int64_t i_offset,</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> int64_t o_offset,</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <a class="code hl_enumeration" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype);</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core.html">mlx::core</a> {</div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a017bd8bd743e26f1ff971c8749b55daf"> 13</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a017bd8bd743e26f1ff971c8749b55daf">copy</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& src, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& dst, <a class="code hl_enumeration" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream);</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ab30708325761c91e7dde245827e9dd91"> 14</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ab30708325761c91e7dde245827e9dd91">copy_inplace</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& src, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& dst, <a class="code hl_enumeration" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream);</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a1e4381d42877a5c6050c20e77d13c990"> 16</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ab30708325761c91e7dde245827e9dd91">copy_inplace</a>(</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& src,</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& dst,</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a>& data_shape,</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& i_strides,</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& o_strides,</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> int64_t i_offset,</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> int64_t o_offset,</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <a class="code hl_enumeration" href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">CopyType</a> ctype,</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream,</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">const</span> std::optional<array>& dynamic_i_offset = std::nullopt,</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">const</span> std::optional<array>& dynamic_o_offset = std::nullopt);</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="abackend_2common_2utils_8h_html"><div class="ttname"><a href="backend_2common_2utils_8h.html">utils.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="acommon_2copy_8h_html"><div class="ttname"><a href="common_2copy_8h.html">copy.h</a></div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a479648542a2bea151b947b18f0e79dd2"><div class="ttname"><a href="namespacemlx_1_1core.html#a479648542a2bea151b947b18f0e79dd2">mlx::core::copy</a></div><div class="ttdeci">void copy(const array &src, array &dst, CopyType ctype)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a017bd8bd743e26f1ff971c8749b55daf"><div class="ttname"><a href="namespacemlx_1_1core.html#a017bd8bd743e26f1ff971c8749b55daf">mlx::core::copy</a></div><div class="ttdeci">void copy(const array &src, array &dst, CopyType ctype, Stream stream)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a694e23f2d59606643728ad443d621416"><div class="ttname"><a href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">mlx::core::Shape</a></div><div class="ttdeci">std::vector< ShapeElem > Shape</div><div class="ttdef"><b>Definition</b> array.h:21</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a79939016d0972ded7db37130da2a8b5c"><div class="ttname"><a href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">mlx::core::Strides</a></div><div class="ttdeci">std::vector< int64_t > Strides</div><div class="ttdef"><b>Definition</b> array.h:22</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a98495894a796b2cc6d022e7a03432c64"><div class="ttname"><a href="namespacemlx_1_1core.html#a98495894a796b2cc6d022e7a03432c64">mlx::core::copy_inplace</a></div><div class="ttdeci">void copy_inplace(const array &src, array &dst, CopyType ctype)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ab30708325761c91e7dde245827e9dd91"><div class="ttname"><a href="namespacemlx_1_1core.html#ab30708325761c91e7dde245827e9dd91">mlx::core::copy_inplace</a></div><div class="ttdeci">void copy_inplace(const array &src, array &dst, CopyType ctype, Stream stream)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_abd84ff6c5245e4e170b2ef5247594337"><div class="ttname"><a href="namespacemlx_1_1core.html#abd84ff6c5245e4e170b2ef5247594337">mlx::core::CopyType</a></div><div class="ttdeci">CopyType</div><div class="ttdef"><b>Definition</b> copy.h:9</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_stream_html"><div class="ttname"><a href="structmlx_1_1core_1_1_stream.html">mlx::core::Stream</a></div><div class="ttdef"><b>Definition</b> stream.h:9</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
Vendored
+3
-3
@@ -121,9 +121,9 @@ Namespaces</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:aaacf0afe13d77a5c49ce96f1e833eb2d" id="r_aaacf0afe13d77a5c49ce96f1e833eb2d"><td class="memTemplParams" colspan="2">template<typename T> </td></tr>
|
||||
<tr class="memitem:aaacf0afe13d77a5c49ce96f1e833eb2d"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#aaacf0afe13d77a5c49ce96f1e833eb2d">mlx::core::matmul</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, bool a_transposed, bool b_transposed, size_t lda, size_t ldb, float alpha, float beta)</td></tr>
|
||||
<tr class="separator:aaacf0afe13d77a5c49ce96f1e833eb2d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:afd07258882634dcda1e6f18f10dc28d5" id="r_afd07258882634dcda1e6f18f10dc28d5"><td class="memTemplParams" colspan="2">template<typename T> </td></tr>
|
||||
<tr class="memitem:afd07258882634dcda1e6f18f10dc28d5"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#afd07258882634dcda1e6f18f10dc28d5">mlx::core::matmul</a> (const T *a, const T *b, T *out, bool a_transposed, bool b_transposed, size_t lda, size_t ldb, size_t ldc, float alpha, float beta, size_t batch_size, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &a_shape, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &a_strides, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &b_shape, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &b_strides)</td></tr>
|
||||
<tr class="separator:afd07258882634dcda1e6f18f10dc28d5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
var cpu_2gemm_8h =
|
||||
[
|
||||
[ "mlx::core::matmul", "namespacemlx_1_1core.html#aaacf0afe13d77a5c49ce96f1e833eb2d", null ]
|
||||
[ "mlx::core::matmul", "namespacemlx_1_1core.html#afd07258882634dcda1e6f18f10dc28d5", null ]
|
||||
];
|
||||
+17
-10
@@ -113,22 +113,29 @@ $(function(){initNavTree('cpu_2gemm_8h_source.html',''); initResizable(true); })
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core.html">mlx::core</a> {</div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#aaacf0afe13d77a5c49ce96f1e833eb2d"> 9</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aaacf0afe13d77a5c49ce96f1e833eb2d">matmul</a>(</div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a,</div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b,</div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out,</div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#afd07258882634dcda1e6f18f10dc28d5"> 9</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#afd07258882634dcda1e6f18f10dc28d5">matmul</a>(</div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="keyword">const</span> T* a,</div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="keyword">const</span> T* b,</div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> T* out,</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="keywordtype">bool</span> a_transposed,</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordtype">bool</span> b_transposed,</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keywordtype">size_t</span> lda,</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keywordtype">size_t</span> ldb,</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keywordtype">float</span> alpha,</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keywordtype">float</span> beta);</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keywordtype">size_t</span> ldc,</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keywordtype">float</span> alpha,</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keywordtype">float</span> beta,</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordtype">size_t</span> batch_size,</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a>& a_shape,</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& a_strides,</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a>& b_shape,</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a>& b_strides);</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_aaacf0afe13d77a5c49ce96f1e833eb2d"><div class="ttname"><a href="namespacemlx_1_1core.html#aaacf0afe13d77a5c49ce96f1e833eb2d">mlx::core::matmul</a></div><div class="ttdeci">void matmul(const array &a, const array &b, array &out, bool a_transposed, bool b_transposed, size_t lda, size_t ldb, float alpha, float beta)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a694e23f2d59606643728ad443d621416"><div class="ttname"><a href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">mlx::core::Shape</a></div><div class="ttdeci">std::vector< ShapeElem > Shape</div><div class="ttdef"><b>Definition</b> array.h:21</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a79939016d0972ded7db37130da2a8b5c"><div class="ttname"><a href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">mlx::core::Strides</a></div><div class="ttdeci">std::vector< int64_t > Strides</div><div class="ttdef"><b>Definition</b> array.h:22</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_afd07258882634dcda1e6f18f10dc28d5"><div class="ttname"><a href="namespacemlx_1_1core.html#afd07258882634dcda1e6f18f10dc28d5">mlx::core::matmul</a></div><div class="ttdeci">void matmul(const T *a, const T *b, T *out, bool a_transposed, bool b_transposed, size_t lda, size_t ldb, size_t ldc, float alpha, float beta, size_t batch_size, const Shape &a_shape, const Strides &a_strides, const Shape &b_shape, const Strides &b_strides)</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
Vendored
+8
-8
@@ -108,10 +108,10 @@ $(function(){initNavTree('cpu_2ternary_8h.html',''); initResizable(true); });
|
||||
<div class="headertitle"><div class="title">ternary.h File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><code>#include "<a class="el" href="allocator_8h_source.html">mlx/allocator.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="array_8h_source.html">mlx/array.h</a>"</code><br />
|
||||
<div class="textblock"><code>#include "<a class="el" href="array_8h_source.html">mlx/array.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="common_2ternary_8h_source.html">mlx/backend/common/ternary.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="backend_2common_2utils_8h_source.html">mlx/backend/common/utils.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="encoder_8h_source.html">mlx/backend/cpu/encoder.h</a>"</code><br />
|
||||
</div>
|
||||
<p><a href="cpu_2ternary_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
@@ -127,12 +127,12 @@ Functions</h2></td></tr>
|
||||
<tr class="memitem:a8096c7a688ac3f09cca69a3a85f7f157" id="r_a8096c7a688ac3f09cca69a3a85f7f157"><td class="memTemplParams" colspan="2">template<typename T1, typename T2, typename T3, typename U, typename Op, int D> </td></tr>
|
||||
<tr class="memitem:a8096c7a688ac3f09cca69a3a85f7f157"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a8096c7a688ac3f09cca69a3a85f7f157">mlx::core::ternary_op_dims</a> (const T1 *a, const T2 *b, const T3 *c, U *out, Op op, const <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &shape, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &a_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &b_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &c_strides, const <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> &out_strides, int axis)</td></tr>
|
||||
<tr class="separator:a8096c7a688ac3f09cca69a3a85f7f157"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac1c085e305954247d042f5d8803cd85b" id="r_ac1c085e305954247d042f5d8803cd85b"><td class="memTemplParams" colspan="2">template<typename T1, typename T2, typename T3, typename U, typename Op> </td></tr>
|
||||
<tr class="memitem:ac1c085e305954247d042f5d8803cd85b"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#ac1c085e305954247d042f5d8803cd85b">mlx::core::ternary_op_dispatch_dims</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &c, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op)</td></tr>
|
||||
<tr class="separator:ac1c085e305954247d042f5d8803cd85b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9dcc3018702ee31c21c8652bdc2182b1" id="r_a9dcc3018702ee31c21c8652bdc2182b1"><td class="memTemplParams" colspan="2">template<typename T1, typename T2, typename T3, typename U, typename Op> </td></tr>
|
||||
<tr class="memitem:a9dcc3018702ee31c21c8652bdc2182b1"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a9dcc3018702ee31c21c8652bdc2182b1">mlx::core::ternary_op</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &c, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op)</td></tr>
|
||||
<tr class="separator:a9dcc3018702ee31c21c8652bdc2182b1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9abcc6efafd9ab5df1293b1793a734d2" id="r_a9abcc6efafd9ab5df1293b1793a734d2"><td class="memTemplParams" colspan="2">template<typename T1, typename T2, typename T3, typename U, typename Op> </td></tr>
|
||||
<tr class="memitem:a9abcc6efafd9ab5df1293b1793a734d2"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a9abcc6efafd9ab5df1293b1793a734d2">mlx::core::ternary_op_dispatch_dims</a> (const T1 *a_ptr, const T2 *b_ptr, const T3 *c_ptr, U *out_ptr, Op op, size_t size, <a class="el" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a> &shape, std::vector< <a class="el" href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">Strides</a> > &strides)</td></tr>
|
||||
<tr class="separator:a9abcc6efafd9ab5df1293b1793a734d2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a48fbbd43d2165ab7f42bac3f228bbda3" id="r_a48fbbd43d2165ab7f42bac3f228bbda3"><td class="memTemplParams" colspan="2">template<typename T1, typename T2, typename T3, typename U, typename Op> </td></tr>
|
||||
<tr class="memitem:a48fbbd43d2165ab7f42bac3f228bbda3"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a48fbbd43d2165ab7f42bac3f228bbda3">mlx::core::ternary_op</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &b, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &c, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op, <a class="el" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1">TernaryOpType</a> topt)</td></tr>
|
||||
<tr class="separator:a48fbbd43d2165ab7f42bac3f228bbda3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
var cpu_2ternary_8h =
|
||||
[
|
||||
[ "mlx::core::ternary_op", "namespacemlx_1_1core.html#a9dcc3018702ee31c21c8652bdc2182b1", null ],
|
||||
[ "mlx::core::ternary_op", "namespacemlx_1_1core.html#a48fbbd43d2165ab7f42bac3f228bbda3", null ],
|
||||
[ "mlx::core::ternary_op_dims", "namespacemlx_1_1core.html#a8096c7a688ac3f09cca69a3a85f7f157", null ],
|
||||
[ "mlx::core::ternary_op_dispatch_dims", "namespacemlx_1_1core.html#ac1c085e305954247d042f5d8803cd85b", null ]
|
||||
[ "mlx::core::ternary_op_dispatch_dims", "namespacemlx_1_1core.html#a9abcc6efafd9ab5df1293b1793a734d2", null ]
|
||||
];
|
||||
+109
-114
@@ -108,10 +108,10 @@ $(function(){initNavTree('cpu_2ternary_8h_source.html',''); initResizable(true);
|
||||
<a href="cpu_2ternary_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright © 2023 Apple Inc.</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#pragma once</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include "<a class="code" href="allocator_8h.html">mlx/allocator.h</a>"</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "<a class="code" href="common_2ternary_8h.html">mlx/backend/common/ternary.h</a>"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "<a class="code" href="backend_2common_2utils_8h.html">mlx/backend/common/utils.h</a>"</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include "<a class="code" href="common_2ternary_8h.html">mlx/backend/common/ternary.h</a>"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "<a class="code" href="backend_2common_2utils_8h.html">mlx/backend/common/utils.h</a>"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "<a class="code" href="encoder_8h.html">mlx/backend/cpu/encoder.h</a>"</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core.html">mlx::core</a> {</div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
|
||||
@@ -162,129 +162,124 @@ $(function(){initNavTree('cpu_2ternary_8h_source.html',''); initResizable(true);
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="keyword">template</span> <<span class="keyword">typename</span> T1, <span class="keyword">typename</span> T2, <span class="keyword">typename</span> T3, <span class="keyword">typename</span> U, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00055" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ac1c085e305954247d042f5d8803cd85b"> 55</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ac1c085e305954247d042f5d8803cd85b">ternary_op_dispatch_dims</a>(</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a,</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b,</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& c,</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out,</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> Op op) {</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keyword">auto</span> [shape, strides] = <a class="code hl_function" href="namespacemlx_1_1core.html#a4d594bb84abeff4619d1abb77b20123e">collapse_contiguous_dims</a>(</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>(), {a.strides(), b.strides(), c.strides(), out.strides()});</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keyword">const</span> <span class="keyword">auto</span>& a_strides = strides[0];</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keyword">const</span> <span class="keyword">auto</span>& b_strides = strides[1];</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">const</span> <span class="keyword">auto</span>& c_strides = strides[2];</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">const</span> <span class="keyword">auto</span>& out_strides = strides[3];</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keyword">const</span> T1* a_ptr = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T1>();</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">const</span> T2* b_ptr = b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T2>();</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keyword">const</span> T3* c_ptr = c.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T3>();</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> U* out_ptr = out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T3>();</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">int</span> ndim = shape.size();</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">switch</span> (ndim) {</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keywordflow">case</span> 1:</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a8096c7a688ac3f09cca69a3a85f7f157">ternary_op_dims<T1, T2, T3, U, Op, 1></a>(</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> c_ptr,</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> out_ptr,</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> op,</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> shape,</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> a_strides,</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> b_strides,</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> c_strides,</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> out_strides,</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> 0);</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">case</span> 2:</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a8096c7a688ac3f09cca69a3a85f7f157">ternary_op_dims<T1, T2, T3, U, Op, 2></a>(</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> c_ptr,</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> out_ptr,</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> op,</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> shape,</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> a_strides,</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> b_strides,</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> c_strides,</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> out_strides,</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> 0);</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> }</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> a_it(shape, a_strides, ndim - 2);</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> b_it(shape, b_strides, ndim - 2);</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> c_it(shape, c_strides, ndim - 2);</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keyword">auto</span> stride = out_strides[ndim - 3];</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> elem = 0; elem < a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>(); elem += stride) {</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a8096c7a688ac3f09cca69a3a85f7f157">ternary_op_dims<T1, T2, T3, U, Op, 2></a>(</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> a_ptr + a_it.<a class="code hl_variable" href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">loc</a>,</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> b_ptr + b_it.<a class="code hl_variable" href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">loc</a>,</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> c_ptr + c_it.<a class="code hl_variable" href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">loc</a>,</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> out_ptr + elem,</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> op,</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> shape,</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> a_strides,</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> b_strides,</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> c_strides,</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> out_strides,</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> ndim - 2);</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> a_it.<a class="code hl_function" href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">step</a>();</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> b_it.<a class="code hl_function" href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">step</a>();</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> c_it.<a class="code hl_function" href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">step</a>();</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> }</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>}</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a9abcc6efafd9ab5df1293b1793a734d2"> 55</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9abcc6efafd9ab5df1293b1793a734d2">ternary_op_dispatch_dims</a>(</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">const</span> T1* a_ptr,</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">const</span> T2* b_ptr,</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keyword">const</span> T3* c_ptr,</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> U* out_ptr,</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> Op op,</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordtype">size_t</span> size,</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <a class="code hl_typedef" href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">Shape</a>& shape,</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> std::vector<Strides>& strides) {</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keyword">const</span> <span class="keyword">auto</span>& a_strides = strides[0];</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">const</span> <span class="keyword">auto</span>& b_strides = strides[1];</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">const</span> <span class="keyword">auto</span>& c_strides = strides[2];</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">const</span> <span class="keyword">auto</span>& out_strides = strides[3];</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordtype">int</span> ndim = shape.size();</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">switch</span> (ndim) {</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">case</span> 1:</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a8096c7a688ac3f09cca69a3a85f7f157">ternary_op_dims<T1, T2, T3, U, Op, 1></a>(</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> c_ptr,</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> out_ptr,</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> op,</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> shape,</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> a_strides,</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> b_strides,</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> c_strides,</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> out_strides,</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> 0);</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">case</span> 2:</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a8096c7a688ac3f09cca69a3a85f7f157">ternary_op_dims<T1, T2, T3, U, Op, 2></a>(</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> a_ptr,</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> b_ptr,</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> c_ptr,</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> out_ptr,</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> op,</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> shape,</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> a_strides,</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> b_strides,</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> c_strides,</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> out_strides,</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> 0);</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> }</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> a_it(shape, a_strides, ndim - 2);</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> b_it(shape, b_strides, ndim - 2);</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> c_it(shape, c_strides, ndim - 2);</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keyword">auto</span> stride = out_strides[ndim - 3];</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> elem = 0; elem < size; elem += stride) {</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a8096c7a688ac3f09cca69a3a85f7f157">ternary_op_dims<T1, T2, T3, U, Op, 2></a>(</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> a_ptr + a_it.<a class="code hl_variable" href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">loc</a>,</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> b_ptr + b_it.<a class="code hl_variable" href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">loc</a>,</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> c_ptr + c_it.<a class="code hl_variable" href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">loc</a>,</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> out_ptr + elem,</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> op,</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> shape,</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> a_strides,</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> b_strides,</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> c_strides,</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> out_strides,</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> ndim - 2);</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> a_it.<a class="code hl_function" href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">step</a>();</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> b_it.<a class="code hl_function" href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">step</a>();</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> c_it.<a class="code hl_function" href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">step</a>();</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> }</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span><span class="keyword">template</span> <<span class="keyword">typename</span> T1, <span class="keyword">typename</span> T2, <span class="keyword">typename</span> T3, <span class="keyword">typename</span> U, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00128" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a9dcc3018702ee31c21c8652bdc2182b1"> 128</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9dcc3018702ee31c21c8652bdc2182b1">ternary_op</a>(</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a,</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b,</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& c,</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out,</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> Op op) {</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <a class="code hl_enumeration" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1">TernaryOpType</a> topt = <a class="code hl_function" href="namespacemlx_1_1core.html#a548b6f4a39e639c18896e50b1702c830">get_ternary_op_type</a>(a, b, c);</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a6f4528d0d338ea5e1f19d345875c26a2">set_ternary_op_output_data</a>(a, b, c, out, topt);</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> </div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="comment">// The full computation is scalar-scalar-scalar so we call the base op once.</span></div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">if</span> (topt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1a09c2e68746fa22c9903625cea17464db">TernaryOpType::ScalarScalarScalar</a>) {</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> *(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>()) = op(*a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T1>(), *b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T2>(), *c.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T3>());</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (topt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1acbcaeeb0e232871afe48bcf063a14b42">TernaryOpType::VectorVectorVector</a>) {</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="keyword">const</span> T1* a_ptr = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T1>();</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keyword">const</span> T2* b_ptr = b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T2>();</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keyword">const</span> T3* c_ptr = c.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T3>();</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> U* out_ptr = out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>();</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>(); ++i) {</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> *out_ptr = op(*a_ptr, *b_ptr, *c_ptr);</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> a_ptr++;</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> b_ptr++;</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> c_ptr++;</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> out_ptr++;</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> }</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <a class="code hl_function" href="namespacemlx_1_1core.html#ac1c085e305954247d042f5d8803cd85b">ternary_op_dispatch_dims<T1, T2, T3, U></a>(a, b, c, out, op);</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> }</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span>}</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span><span class="keyword">template</span> <<span class="keyword">typename</span> T1, <span class="keyword">typename</span> T2, <span class="keyword">typename</span> T3, <span class="keyword">typename</span> U, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00124" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a48fbbd43d2165ab7f42bac3f228bbda3"> 124</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a48fbbd43d2165ab7f42bac3f228bbda3">ternary_op</a>(</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a,</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& b,</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& c,</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out,</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> Op op,</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <a class="code hl_enumeration" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1">TernaryOpType</a> topt) {</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keyword">const</span> T1* a_ptr = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T1>();</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keyword">const</span> T2* b_ptr = b.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T2>();</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keyword">const</span> T3* c_ptr = c.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T3>();</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> U* out_ptr = out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>();</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">if</span> (topt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1a09c2e68746fa22c9903625cea17464db">TernaryOpType::ScalarScalarScalar</a>) {</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> *out_ptr = op(*a_ptr, *b_ptr, *c_ptr);</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (topt == <a class="code hl_enumvalue" href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1acbcaeeb0e232871afe48bcf063a14b42">TernaryOpType::VectorVectorVector</a>) {</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>(); ++i) {</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> *out_ptr = op(*a_ptr, *b_ptr, *c_ptr);</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> a_ptr++;</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> b_ptr++;</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> c_ptr++;</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> out_ptr++;</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> }</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keyword">auto</span> [shape, strides] = <a class="code hl_function" href="namespacemlx_1_1core.html#a4d594bb84abeff4619d1abb77b20123e">collapse_contiguous_dims</a>(</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>(), {a.strides(), b.strides(), c.strides(), out.strides()});</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9abcc6efafd9ab5df1293b1793a734d2">ternary_op_dispatch_dims<T1, T2, T3, U></a>(</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> a_ptr, b_ptr, c_ptr, out_ptr, op, out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>(), shape, strides);</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> }</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> </div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aallocator_8h_html"><div class="ttname"><a href="allocator_8h.html">allocator.h</a></div></div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="abackend_2common_2utils_8h_html"><div class="ttname"><a href="backend_2common_2utils_8h.html">utils.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a1d06c76b0f3010a5c329d0e9e29e0597"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">mlx::core::array::shape</a></div><div class="ttdeci">const Shape & shape() const</div><div class="ttdoc">The shape of the array as a vector of integers.</div><div class="ttdef"><b>Definition</b> array.h:103</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a598f87161926d9e0b516860f0ea2c8f6"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">mlx::core::array::size</a></div><div class="ttdeci">size_t size() const</div><div class="ttdoc">The number of elements in the array.</div><div class="ttdef"><b>Definition</b> array.h:88</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a72e3ce6c03fefe272cadf214bd127b95"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">mlx::core::array::data</a></div><div class="ttdeci">T * data()</div><div class="ttdef"><b>Definition</b> array.h:354</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a72e3ce6c03fefe272cadf214bd127b95"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">mlx::core::array::data</a></div><div class="ttdeci">T * data()</div><div class="ttdef"><b>Definition</b> array.h:349</div></div>
|
||||
<div class="ttc" id="acommon_2ternary_8h_html"><div class="ttname"><a href="common_2ternary_8h.html">ternary.h</a></div></div>
|
||||
<div class="ttc" id="aencoder_8h_html"><div class="ttname"><a href="encoder_8h.html">encoder.h</a></div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a48fbbd43d2165ab7f42bac3f228bbda3"><div class="ttname"><a href="namespacemlx_1_1core.html#a48fbbd43d2165ab7f42bac3f228bbda3">mlx::core::ternary_op</a></div><div class="ttdeci">void ternary_op(const array &a, const array &b, const array &c, array &out, Op op, TernaryOpType topt)</div><div class="ttdef"><b>Definition</b> ternary.h:124</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a4d594bb84abeff4619d1abb77b20123e"><div class="ttname"><a href="namespacemlx_1_1core.html#a4d594bb84abeff4619d1abb77b20123e">mlx::core::collapse_contiguous_dims</a></div><div class="ttdeci">std::tuple< Shape, std::vector< Strides > > collapse_contiguous_dims(const Shape &shape, const std::vector< Strides > &strides, int64_t size_cap=std::numeric_limits< int32_t >::max())</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a548b6f4a39e639c18896e50b1702c830"><div class="ttname"><a href="namespacemlx_1_1core.html#a548b6f4a39e639c18896e50b1702c830">mlx::core::get_ternary_op_type</a></div><div class="ttdeci">TernaryOpType get_ternary_op_type(const array &a, const array &b, const array &c)</div><div class="ttdef"><b>Definition</b> ternary.h:18</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a694e23f2d59606643728ad443d621416"><div class="ttname"><a href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416">mlx::core::Shape</a></div><div class="ttdeci">std::vector< ShapeElem > Shape</div><div class="ttdef"><b>Definition</b> array.h:21</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6f4528d0d338ea5e1f19d345875c26a2"><div class="ttname"><a href="namespacemlx_1_1core.html#a6f4528d0d338ea5e1f19d345875c26a2">mlx::core::set_ternary_op_output_data</a></div><div class="ttdeci">void set_ternary_op_output_data(const array &a, const array &b, const array &c, array &out, TernaryOpType topt, bool donate_with_move=false)</div><div class="ttdef"><b>Definition</b> ternary.h:34</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a79939016d0972ded7db37130da2a8b5c"><div class="ttname"><a href="namespacemlx_1_1core.html#a79939016d0972ded7db37130da2a8b5c">mlx::core::Strides</a></div><div class="ttdeci">std::vector< int64_t > Strides</div><div class="ttdef"><b>Definition</b> array.h:22</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a8096c7a688ac3f09cca69a3a85f7f157"><div class="ttname"><a href="namespacemlx_1_1core.html#a8096c7a688ac3f09cca69a3a85f7f157">mlx::core::ternary_op_dims</a></div><div class="ttdeci">void ternary_op_dims(const T1 *a, const T2 *b, const T3 *c, U *out, Op op, const Shape &shape, const Strides &a_strides, const Strides &b_strides, const Strides &c_strides, const Strides &out_strides, int axis)</div><div class="ttdef"><b>Definition</b> ternary.h:12</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9dcc3018702ee31c21c8652bdc2182b1"><div class="ttname"><a href="namespacemlx_1_1core.html#a9dcc3018702ee31c21c8652bdc2182b1">mlx::core::ternary_op</a></div><div class="ttdeci">void ternary_op(const array &a, const array &b, const array &c, array &out, Op op)</div><div class="ttdef"><b>Definition</b> ternary.h:128</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac1c085e305954247d042f5d8803cd85b"><div class="ttname"><a href="namespacemlx_1_1core.html#ac1c085e305954247d042f5d8803cd85b">mlx::core::ternary_op_dispatch_dims</a></div><div class="ttdeci">void ternary_op_dispatch_dims(const array &a, const array &b, const array &c, array &out, Op op)</div><div class="ttdef"><b>Definition</b> ternary.h:55</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9abcc6efafd9ab5df1293b1793a734d2"><div class="ttname"><a href="namespacemlx_1_1core.html#a9abcc6efafd9ab5df1293b1793a734d2">mlx::core::ternary_op_dispatch_dims</a></div><div class="ttdeci">void ternary_op_dispatch_dims(const T1 *a_ptr, const T2 *b_ptr, const T3 *c_ptr, U *out_ptr, Op op, size_t size, Shape &shape, std::vector< Strides > &strides)</div><div class="ttdef"><b>Definition</b> ternary.h:55</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac2b8997537c7f25dd2b244d4c0a865a1"><div class="ttname"><a href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1">mlx::core::TernaryOpType</a></div><div class="ttdeci">TernaryOpType</div><div class="ttdef"><b>Definition</b> ternary.h:11</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac2b8997537c7f25dd2b244d4c0a865a1a09c2e68746fa22c9903625cea17464db"><div class="ttname"><a href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1a09c2e68746fa22c9903625cea17464db">mlx::core::TernaryOpType::ScalarScalarScalar</a></div><div class="ttdeci">@ ScalarScalarScalar</div><div class="ttdef"><b>Definition</b> ternary.h:12</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac2b8997537c7f25dd2b244d4c0a865a1acbcaeeb0e232871afe48bcf063a14b42"><div class="ttname"><a href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1acbcaeeb0e232871afe48bcf063a14b42">mlx::core::TernaryOpType::VectorVectorVector</a></div><div class="ttdeci">@ VectorVectorVector</div><div class="ttdef"><b>Definition</b> ternary.h:13</div></div>
|
||||
|
||||
Vendored
+28
-15
@@ -111,6 +111,7 @@ $(function(){initNavTree('cpu_2unary_8h.html',''); initResizable(true); });
|
||||
<div class="textblock"><code>#include "<a class="el" href="allocator_8h_source.html">mlx/allocator.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="array_8h_source.html">mlx/array.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="backend_2common_2utils_8h_source.html">mlx/backend/common/utils.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="encoder_8h_source.html">mlx/backend/cpu/encoder.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="simd_8h_source.html">mlx/backend/cpu/simd/simd.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="utils_8h_source.html">mlx/utils.h</a>"</code><br />
|
||||
</div>
|
||||
@@ -127,21 +128,33 @@ Namespaces</h2></td></tr>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a4c6a4241bfcdd7bbf30d0e521b79e5a3" id="r_a4c6a4241bfcdd7bbf30d0e521b79e5a3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">mlx::core::set_unary_output_data</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &in, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out)</td></tr>
|
||||
<tr class="separator:a4c6a4241bfcdd7bbf30d0e521b79e5a3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a27f00519f9756896734fd4d47fec0625" id="r_a27f00519f9756896734fd4d47fec0625"><td class="memTemplParams" colspan="2">template<typename T, typename U = T, typename Op> </td></tr>
|
||||
<tr class="memitem:a27f00519f9756896734fd4d47fec0625"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">mlx::core::unary_op</a> (const T *a, U *out, Op op, size_t shape, size_t stride)</td></tr>
|
||||
<tr class="separator:a27f00519f9756896734fd4d47fec0625"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae20f207ad1ed3badc17cecf08f118b5e" id="r_ae20f207ad1ed3badc17cecf08f118b5e"><td class="memTemplParams" colspan="2">template<typename T, typename U = T, typename Op> </td></tr>
|
||||
<tr class="memitem:ae20f207ad1ed3badc17cecf08f118b5e"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#ae20f207ad1ed3badc17cecf08f118b5e">mlx::core::unary_op</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op)</td></tr>
|
||||
<tr class="separator:ae20f207ad1ed3badc17cecf08f118b5e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6c8fdd03ef891d7f47804bf02e9a8507" id="r_a6c8fdd03ef891d7f47804bf02e9a8507"><td class="memTemplParams" colspan="2">template<typename Op> </td></tr>
|
||||
<tr class="memitem:a6c8fdd03ef891d7f47804bf02e9a8507"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a6c8fdd03ef891d7f47804bf02e9a8507">mlx::core::unary</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op)</td></tr>
|
||||
<tr class="separator:a6c8fdd03ef891d7f47804bf02e9a8507"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a76a2cb4634f5fd6970a8c3b3753d7a4a" id="r_a76a2cb4634f5fd6970a8c3b3753d7a4a"><td class="memTemplParams" colspan="2">template<typename Op> </td></tr>
|
||||
<tr class="memitem:a76a2cb4634f5fd6970a8c3b3753d7a4a"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a76a2cb4634f5fd6970a8c3b3753d7a4a">mlx::core::unary_fp</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op)</td></tr>
|
||||
<tr class="separator:a76a2cb4634f5fd6970a8c3b3753d7a4a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a078859db0d66ff77f97af6dc9764e8eb" id="r_a078859db0d66ff77f97af6dc9764e8eb"><td class="memTemplParams" colspan="2">template<typename Op> </td></tr>
|
||||
<tr class="memitem:a078859db0d66ff77f97af6dc9764e8eb"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a078859db0d66ff77f97af6dc9764e8eb">mlx::core::unary_int</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op)</td></tr>
|
||||
<tr class="separator:a078859db0d66ff77f97af6dc9764e8eb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa6b3dfc27a21d26b3fda96022aa60e32" id="r_aa6b3dfc27a21d26b3fda96022aa60e32"><td class="memTemplParams" colspan="2">template<typename T, typename U = T, typename Op> </td></tr>
|
||||
<tr class="memitem:aa6b3dfc27a21d26b3fda96022aa60e32"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">mlx::core::unary_op</a> (const T *a, U *out, size_t shape, size_t stride)</td></tr>
|
||||
<tr class="separator:aa6b3dfc27a21d26b3fda96022aa60e32"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab9812785763451ceb86486032d614048" id="r_ab9812785763451ceb86486032d614048"><td class="memTemplParams" colspan="2">template<typename T, typename U = T, typename Op> </td></tr>
|
||||
<tr class="memitem:ab9812785763451ceb86486032d614048"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#ab9812785763451ceb86486032d614048">mlx::core::unary_op</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op)</td></tr>
|
||||
<tr class="separator:ab9812785763451ceb86486032d614048"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0f3ff0f676d28840c210ef6277caa546" id="r_a0f3ff0f676d28840c210ef6277caa546"><td class="memTemplParams" colspan="2">template<typename Op> </td></tr>
|
||||
<tr class="memitem:a0f3ff0f676d28840c210ef6277caa546"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a0f3ff0f676d28840c210ef6277caa546">mlx::core::unary</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:a0f3ff0f676d28840c210ef6277caa546"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a940f998c7469d14f5234f78dcaecd48b" id="r_a940f998c7469d14f5234f78dcaecd48b"><td class="memTemplParams" colspan="2">template<typename Op> </td></tr>
|
||||
<tr class="memitem:a940f998c7469d14f5234f78dcaecd48b"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a940f998c7469d14f5234f78dcaecd48b">mlx::core::unary_real_fp</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:a940f998c7469d14f5234f78dcaecd48b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6c1b92aea938457e44f93a7955d22823" id="r_a6c1b92aea938457e44f93a7955d22823"><td class="memTemplParams" colspan="2">template<typename Op> </td></tr>
|
||||
<tr class="memitem:a6c1b92aea938457e44f93a7955d22823"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a6c1b92aea938457e44f93a7955d22823">mlx::core::unary_fp</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:a6c1b92aea938457e44f93a7955d22823"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aed2b5550f8424094ef10bdadfe92ec0f" id="r_aed2b5550f8424094ef10bdadfe92ec0f"><td class="memTemplParams" colspan="2">template<typename Op> </td></tr>
|
||||
<tr class="memitem:aed2b5550f8424094ef10bdadfe92ec0f"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#aed2b5550f8424094ef10bdadfe92ec0f">mlx::core::unary_signed</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:aed2b5550f8424094ef10bdadfe92ec0f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9af588b2e7f4e5249cd8b7722ad829c0" id="r_a9af588b2e7f4e5249cd8b7722ad829c0"><td class="memTemplParams" colspan="2">template<typename Op> </td></tr>
|
||||
<tr class="memitem:a9af588b2e7f4e5249cd8b7722ad829c0"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a9af588b2e7f4e5249cd8b7722ad829c0">mlx::core::unary_complex</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:a9af588b2e7f4e5249cd8b7722ad829c0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0640d1f5bcd9a4f5cdaea9f197a53515" id="r_a0640d1f5bcd9a4f5cdaea9f197a53515"><td class="memTemplParams" colspan="2">template<typename Op> </td></tr>
|
||||
<tr class="memitem:a0640d1f5bcd9a4f5cdaea9f197a53515"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a0640d1f5bcd9a4f5cdaea9f197a53515">mlx::core::unary_complex_to_float</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:a0640d1f5bcd9a4f5cdaea9f197a53515"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a50536365b8bcfec55e7d023ae9a6395c" id="r_a50536365b8bcfec55e7d023ae9a6395c"><td class="memTemplParams" colspan="2">template<typename Op> </td></tr>
|
||||
<tr class="memitem:a50536365b8bcfec55e7d023ae9a6395c"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a50536365b8bcfec55e7d023ae9a6395c">mlx::core::unary_int</a> (const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &a, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, Op op, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:a50536365b8bcfec55e7d023ae9a6395c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
Vendored
+9
-5
@@ -1,9 +1,13 @@
|
||||
var cpu_2unary_8h =
|
||||
[
|
||||
[ "mlx::core::set_unary_output_data", "namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3", null ],
|
||||
[ "mlx::core::unary", "namespacemlx_1_1core.html#a6c8fdd03ef891d7f47804bf02e9a8507", null ],
|
||||
[ "mlx::core::unary_fp", "namespacemlx_1_1core.html#a76a2cb4634f5fd6970a8c3b3753d7a4a", null ],
|
||||
[ "mlx::core::unary_int", "namespacemlx_1_1core.html#a078859db0d66ff77f97af6dc9764e8eb", null ],
|
||||
[ "mlx::core::unary_op", "namespacemlx_1_1core.html#ae20f207ad1ed3badc17cecf08f118b5e", null ],
|
||||
[ "mlx::core::unary_op", "namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625", null ]
|
||||
[ "mlx::core::unary", "namespacemlx_1_1core.html#a0f3ff0f676d28840c210ef6277caa546", null ],
|
||||
[ "mlx::core::unary_complex", "namespacemlx_1_1core.html#a9af588b2e7f4e5249cd8b7722ad829c0", null ],
|
||||
[ "mlx::core::unary_complex_to_float", "namespacemlx_1_1core.html#a0640d1f5bcd9a4f5cdaea9f197a53515", null ],
|
||||
[ "mlx::core::unary_fp", "namespacemlx_1_1core.html#a6c1b92aea938457e44f93a7955d22823", null ],
|
||||
[ "mlx::core::unary_int", "namespacemlx_1_1core.html#a50536365b8bcfec55e7d023ae9a6395c", null ],
|
||||
[ "mlx::core::unary_op", "namespacemlx_1_1core.html#ab9812785763451ceb86486032d614048", null ],
|
||||
[ "mlx::core::unary_op", "namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32", null ],
|
||||
[ "mlx::core::unary_real_fp", "namespacemlx_1_1core.html#a940f998c7469d14f5234f78dcaecd48b", null ],
|
||||
[ "mlx::core::unary_signed", "namespacemlx_1_1core.html#aed2b5550f8424094ef10bdadfe92ec0f", null ]
|
||||
];
|
||||
+324
-188
@@ -112,235 +112,371 @@ $(function(){initNavTree('cpu_2unary_8h_source.html',''); initResizable(true); }
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include "<a class="code" href="allocator_8h.html">mlx/allocator.h</a>"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "<a class="code" href="backend_2common_2utils_8h.html">mlx/backend/common/utils.h</a>"</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "<a class="code" href="simd_8h.html">mlx/backend/cpu/simd/simd.h</a>"</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include "<a class="code" href="utils_8h.html">mlx/utils.h</a>"</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core.html">mlx::core</a> {</div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
|
||||
<div class="foldopen" id="foldopen00013" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3"> 13</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">set_unary_output_data</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& in, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out) {</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">is_donatable</a>(in, out)) {</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(in);</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keyword">auto</span> size = in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>();</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(size * out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()),</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> size,</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> }</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span>}</div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "<a class="code" href="encoder_8h.html">mlx/backend/cpu/encoder.h</a>"</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include "<a class="code" href="simd_8h.html">mlx/backend/cpu/simd/simd.h</a>"</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include "<a class="code" href="utils_8h.html">mlx/utils.h</a>"</span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core.html">mlx::core</a> {</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
|
||||
<div class="foldopen" id="foldopen00014" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3"> 14</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">set_unary_output_data</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& in, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out) {</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keywordflow">if</span> (in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#afd0ab11e7a486a2a8e50ee84b971ac8a">contiguous</a>) {</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">is_donatable</a>(in, out)) {</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">copy_shared_buffer</a>(in);</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keyword">auto</span> size = in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>();</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(size * out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">itemsize</a>()),</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> size,</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(),</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> in.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>());</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> }</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">nbytes</a>()));</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> }</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U = T, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00027" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625"> 27</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op</a>(<span class="keyword">const</span> T* a, U* out, Op op, <span class="keywordtype">size_t</span> shape, <span class="keywordtype">size_t</span> stride) {</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < shape; i += 1) {</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> out[i] = op(*a);</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> a += stride;</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> }</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>}</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U = T, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00032" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32"> 32</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op</a>(<span class="keyword">const</span> T* a, U* out, <span class="keywordtype">size_t</span> shape, <span class="keywordtype">size_t</span> stride) {</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < shape; i += 1) {</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> out[i] = Op{}(*a);</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> a += stride;</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> }</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U = T, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00035" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ae20f207ad1ed3badc17cecf08f118b5e"> 35</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op) {</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">const</span> T* a_ptr = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>();</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordflow">if</span> (a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#afd0ab11e7a486a2a8e50ee84b971ac8a">contiguous</a>) {</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">set_unary_output_data</a>(a, out);</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> U* dst = out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>();</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> N = <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">simd::max_size<T></a>;</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordtype">size_t</span> size = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>();</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">while</span> (size >= N) {</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afa2236afddfdec312eb7e27b89a5316a">simd::store</a>(dst, op(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">simd::load<T, N></a>(a_ptr)));</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> size -= N;</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> a_ptr += N;</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> dst += N;</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> }</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">while</span> (size > 0) {</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> *dst = op(*a_ptr);</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> size--;</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> dst++;</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> a_ptr++;</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> }</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">set_data</a>(<a class="code hl_function" href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">allocator::malloc_or_wait</a>(out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">nbytes</a>()));</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> U* dst = out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>();</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordtype">size_t</span> shape = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a53006e77d13d9d88b525ef577748939f">ndim</a>() > 0 ? a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>(-1) : 1;</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">size_t</span> stride = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a53006e77d13d9d88b525ef577748939f">ndim</a>() > 0 ? a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(-1) : 1;</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">if</span> (a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a53006e77d13d9d88b525ef577748939f">ndim</a>() <= 1) {</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op</a>(a_ptr, dst, op, shape, stride);</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> }</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a> it(a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>(), a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(), a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a53006e77d13d9d88b525ef577748939f">ndim</a>() - 1);</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> elem = 0; elem < a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>(); elem += shape) {</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op</a>(a_ptr + it.<a class="code hl_variable" href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">loc</a>, dst + elem, op, shape, stride);</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> it.<a class="code hl_function" href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">step</a>();</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> }</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> }</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span>}</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U = T, <span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00040" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#ab9812785763451ceb86486032d614048"> 40</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op) {</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">const</span> T* src = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><T>();</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> U* dst = out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">data</a><U>();</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">auto</span> ndim = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a53006e77d13d9d88b525ef577748939f">ndim</a>();</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">if</span> (a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">flags</a>().<a class="code hl_variable" href="structmlx_1_1core_1_1array_1_1_flags.html#afd0ab11e7a486a2a8e50ee84b971ac8a">contiguous</a>) {</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">auto</span> size = a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">data_size</a>();</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> N = <a class="code hl_variable" href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">simd::max_size<T></a>;</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">while</span> (size >= N) {</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#afa2236afddfdec312eb7e27b89a5316a">simd::store</a>(dst, Op{}(<a class="code hl_function" href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">simd::load<T, N></a>(src)));</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> size -= N;</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> src += N;</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> dst += N;</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> }</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">while</span> (size > 0) {</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> *dst = Op{}(*src);</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> size--;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> dst++;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> src++;</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> }</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordtype">size_t</span> shape = ndim > 0 ? a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>().back() : 1;</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordtype">size_t</span> stride = ndim > 0 ? a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>().back() : 1;</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">if</span> (ndim <= 1) {</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<T, U, Op></a>(src, dst, shape, stride);</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> }</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">auto</span> it = <a class="code hl_struct" href="structmlx_1_1core_1_1_contiguous_iterator.html">ContiguousIterator</a>(a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">shape</a>(), a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">strides</a>(), ndim - 1);</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> elem = 0; elem < a.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">size</a>(); elem += shape) {</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<T, U, Op></a>(src + it.loc, dst + elem, shape, stride);</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> it.step();</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> }</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00072" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a6c8fdd03ef891d7f47804bf02e9a8507"> 72</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a6c8fdd03ef891d7f47804bf02e9a8507">unary</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op) {</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">switch</span> (out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>()) {</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a113d2bac7e4aa6a4cb4a5c3242527b82">bool_</a>:</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<bool></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9778d50afbf456b0bd738751243b3b68">uint8</a>:</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<uint8_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a312a70c487366968af5e6cbf5038c812">uint16</a>:</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<uint16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#ac63820d6fe10545907c33faf466a929e">uint32</a>:</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<uint32_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8">uint64</a>:</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<uint64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">int8</a>:</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<int8_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">int16</a>:</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<int16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">int32</a>:</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<int32_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">int64</a>:</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<int64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">float16</a>:</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<float16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">float32</a>:</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<float></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">float64</a>:</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<double></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">bfloat16</a>:</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<bfloat16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">complex64</a>:</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<complex64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> }</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span>}</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00075" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a0f3ff0f676d28840c210ef6277caa546"> 75</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a0f3ff0f676d28840c210ef6277caa546">unary</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) {</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">set_unary_output_data</a>(a, out);</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keyword">auto</span>& encoder = <a class="code hl_function" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">cpu::get_command_encoder</a>(stream);</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> encoder.set_input_array(a);</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> encoder.set_output_array(out);</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> encoder.dispatch([a = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(a),</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> out = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(out),</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> op = op]() <span class="keyword">mutable</span> {</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">switch</span> (out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>()) {</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a113d2bac7e4aa6a4cb4a5c3242527b82">bool_</a>:</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<bool></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9778d50afbf456b0bd738751243b3b68">uint8</a>:</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<uint8_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a312a70c487366968af5e6cbf5038c812">uint16</a>:</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<uint16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#ac63820d6fe10545907c33faf466a929e">uint32</a>:</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<uint32_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8">uint64</a>:</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<uint64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">int8</a>:</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int8_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">int16</a>:</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">int32</a>:</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int32_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">int64</a>:</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">float16</a>:</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<float16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">float32</a>:</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<float></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">float64</a>:</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<double></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">bfloat16</a>:</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<bfloat16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">complex64</a>:</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<complex64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> }</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> });</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00120" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a76a2cb4634f5fd6970a8c3b3753d7a4a"> 120</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a76a2cb4634f5fd6970a8c3b3753d7a4a">unary_fp</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op) {</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">switch</span> (out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>()) {</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">bfloat16</a>:</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<bfloat16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">float16</a>:</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<float16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">float32</a>:</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<float></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">float64</a>:</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<double></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">complex64</a>:</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<complex64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> std::ostringstream err;</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> err << <span class="stringliteral">"[unary_fp] Does not support "</span> << out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>();</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keywordflow">throw</span> std::runtime_error(err.str());</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> }</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span>}</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00131" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a940f998c7469d14f5234f78dcaecd48b"> 131</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a940f998c7469d14f5234f78dcaecd48b">unary_real_fp</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) {</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">set_unary_output_data</a>(a, out);</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keyword">auto</span>& encoder = <a class="code hl_function" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">cpu::get_command_encoder</a>(stream);</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> encoder.set_input_array(a);</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> encoder.set_output_array(out);</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> encoder.dispatch([a = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(a),</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> out = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(out),</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> op = op]() <span class="keyword">mutable</span> {</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordflow">switch</span> (out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>()) {</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">bfloat16</a>:</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<bfloat16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">float16</a>:</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<float16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">float32</a>:</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<float></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">float64</a>:</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<double></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> std::ostringstream err;</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> err << <span class="stringliteral">"[unary_real] Does not support "</span> << out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>();</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keywordflow">throw</span> std::runtime_error(err.str());</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> }</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> });</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> </div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00145" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a078859db0d66ff77f97af6dc9764e8eb"> 145</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a078859db0d66ff77f97af6dc9764e8eb">unary_int</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op) {</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordflow">switch</span> (out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>()) {</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9778d50afbf456b0bd738751243b3b68">uint8</a>:</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<uint8_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a312a70c487366968af5e6cbf5038c812">uint16</a>:</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<uint16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#ac63820d6fe10545907c33faf466a929e">uint32</a>:</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<uint32_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8">uint64</a>:</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<uint64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">int8</a>:</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<int8_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">int16</a>:</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<int16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">int32</a>:</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<int32_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">int64</a>:</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">unary_op<int64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> std::ostringstream err;</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> err << <span class="stringliteral">"[unary_int] Does not support "</span> << out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>();</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keywordflow">throw</span> std::runtime_error(err.str());</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> }</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span>}</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00160" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a6c1b92aea938457e44f93a7955d22823"> 160</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a6c1b92aea938457e44f93a7955d22823">unary_fp</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) {</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">set_unary_output_data</a>(a, out);</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keyword">auto</span>& encoder = <a class="code hl_function" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">cpu::get_command_encoder</a>(stream);</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> encoder.set_input_array(a);</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> encoder.set_output_array(out);</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> encoder.dispatch([a = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(a),</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> out = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(out),</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> op = op]() <span class="keyword">mutable</span> {</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <span class="keywordflow">switch</span> (out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>()) {</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">bfloat16</a>:</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<bfloat16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">float16</a>:</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<float16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">float32</a>:</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<float></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">float64</a>:</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<double></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">complex64</a>:</div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<complex64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> std::ostringstream err;</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> err << <span class="stringliteral">"[unary_fp] Does not support "</span> << out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>();</div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="keywordflow">throw</span> std::runtime_error(err.str());</div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> }</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> });</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> </div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00193" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#aed2b5550f8424094ef10bdadfe92ec0f"> 193</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aed2b5550f8424094ef10bdadfe92ec0f">unary_signed</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) {</div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">set_unary_output_data</a>(a, out);</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keyword">auto</span>& encoder = <a class="code hl_function" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">cpu::get_command_encoder</a>(stream);</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> encoder.set_input_array(a);</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> encoder.set_output_array(out);</div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> encoder.dispatch([a = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(a),</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> out = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(out),</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> op = op]() <span class="keyword">mutable</span> {</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">switch</span> (out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>()) {</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">int8</a>:</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int8_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">int16</a>:</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">int32</a>:</div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int32_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">int64</a>:</div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">float16</a>:</div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<float16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">float32</a>:</div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<float></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">float64</a>:</div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<double></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">bfloat16</a>:</div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<bfloat16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">complex64</a>:</div>
|
||||
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<complex64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"[Abs] Called on unsigned type"</span>);</div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> }</div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> });</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> </div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00236" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a9af588b2e7f4e5249cd8b7722ad829c0"> 236</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a9af588b2e7f4e5249cd8b7722ad829c0">unary_complex</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) {</div>
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">set_unary_output_data</a>(a, out);</div>
|
||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <span class="keyword">auto</span>& encoder = <a class="code hl_function" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">cpu::get_command_encoder</a>(stream);</div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> encoder.set_input_array(a);</div>
|
||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> encoder.set_output_array(out);</div>
|
||||
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> encoder.dispatch([a = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(a),</div>
|
||||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> out = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(out),</div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> op = op]() <span class="keyword">mutable</span> { <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<complex64_t></a>(a, out, op); });</div>
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> </div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00247" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a0640d1f5bcd9a4f5cdaea9f197a53515"> 247</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a0640d1f5bcd9a4f5cdaea9f197a53515">unary_complex_to_float</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) {</div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">set_unary_output_data</a>(a, out);</div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keyword">auto</span>& encoder = <a class="code hl_function" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">cpu::get_command_encoder</a>(stream);</div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> encoder.set_input_array(a);</div>
|
||||
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> encoder.set_output_array(out);</div>
|
||||
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> encoder.dispatch(</div>
|
||||
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> [a = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(a),</div>
|
||||
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> out = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(out),</div>
|
||||
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> op = op]() <span class="keyword">mutable</span> { <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<complex64_t, float></a>(a, out, op); });</div>
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> </div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span><span class="keyword">template</span> <<span class="keyword">typename</span> Op></div>
|
||||
<div class="foldopen" id="foldopen00259" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a50536365b8bcfec55e7d023ae9a6395c"> 259</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a50536365b8bcfec55e7d023ae9a6395c">unary_int</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, Op op, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) {</div>
|
||||
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">set_unary_output_data</a>(a, out);</div>
|
||||
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> <span class="keyword">auto</span>& encoder = <a class="code hl_function" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">cpu::get_command_encoder</a>(stream);</div>
|
||||
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> encoder.set_input_array(a);</div>
|
||||
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> encoder.set_output_array(out);</div>
|
||||
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> encoder.dispatch([a = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(a),</div>
|
||||
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> out = <a class="code hl_function" href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">array::unsafe_weak_copy</a>(out),</div>
|
||||
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> op = op]() <span class="keyword">mutable</span> {</div>
|
||||
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> <span class="keywordflow">switch</span> (out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>()) {</div>
|
||||
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9778d50afbf456b0bd738751243b3b68">uint8</a>:</div>
|
||||
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<uint8_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a312a70c487366968af5e6cbf5038c812">uint16</a>:</div>
|
||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<uint16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#ac63820d6fe10545907c33faf466a929e">uint32</a>:</div>
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<uint32_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8">uint64</a>:</div>
|
||||
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<uint64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">int8</a>:</div>
|
||||
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int8_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">int16</a>:</div>
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int16_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">int32</a>:</div>
|
||||
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int32_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> <span class="keywordflow">case</span> <a class="code hl_variable" href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">int64</a>:</div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <a class="code hl_function" href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">unary_op<int64_t></a>(a, out, op);</div>
|
||||
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> std::ostringstream err;</div>
|
||||
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> err << <span class="stringliteral">"[unary_int] Does not support "</span> << out.<a class="code hl_function" href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">dtype</a>();</div>
|
||||
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> <span class="keywordflow">throw</span> std::runtime_error(err.str());</div>
|
||||
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> }</div>
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> });</div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> </div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aallocator_8h_html"><div class="ttname"><a href="allocator_8h.html">allocator.h</a></div></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="abackend_2common_2utils_8h_html"><div class="ttname"><a href="backend_2common_2utils_8h.html">utils.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a0a20a6065ae71b64c1e3aa22a45fd8a1"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">mlx::core::array::flags</a></div><div class="ttdeci">const Flags & flags() const</div><div class="ttdoc">Get the Flags bit-field.</div><div class="ttdef"><b>Definition</b> array.h:318</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a0a20a6065ae71b64c1e3aa22a45fd8a1"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a0a20a6065ae71b64c1e3aa22a45fd8a1">mlx::core::array::flags</a></div><div class="ttdeci">const Flags & flags() const</div><div class="ttdoc">Get the Flags bit-field.</div><div class="ttdef"><b>Definition</b> array.h:313</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a1d06c76b0f3010a5c329d0e9e29e0597"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597">mlx::core::array::shape</a></div><div class="ttdeci">const Shape & shape() const</div><div class="ttdoc">The shape of the array as a vector of integers.</div><div class="ttdef"><b>Definition</b> array.h:103</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a28cf1928f5ec2f972a94ff1c0e71187d"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d">mlx::core::array::strides</a></div><div class="ttdeci">const Strides & strides() const</div><div class="ttdoc">The strides of the array.</div><div class="ttdef"><b>Definition</b> array.h:117</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a387b67cd3ef5cfc1e749c371766c4a05"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05">mlx::core::array::nbytes</a></div><div class="ttdeci">size_t nbytes() const</div><div class="ttdoc">The number of bytes in the array.</div><div class="ttdef"><b>Definition</b> array.h:93</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a53006e77d13d9d88b525ef577748939f"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a53006e77d13d9d88b525ef577748939f">mlx::core::array::ndim</a></div><div class="ttdeci">size_t ndim() const</div><div class="ttdoc">The number of dimensions of the array.</div><div class="ttdef"><b>Definition</b> array.h:98</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a598f87161926d9e0b516860f0ea2c8f6"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a598f87161926d9e0b516860f0ea2c8f6">mlx::core::array::size</a></div><div class="ttdeci">size_t size() const</div><div class="ttdoc">The number of elements in the array.</div><div class="ttdef"><b>Definition</b> array.h:88</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a72e3ce6c03fefe272cadf214bd127b95"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">mlx::core::array::data</a></div><div class="ttdeci">T * data()</div><div class="ttdef"><b>Definition</b> array.h:354</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a72e3ce6c03fefe272cadf214bd127b95"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a72e3ce6c03fefe272cadf214bd127b95">mlx::core::array::data</a></div><div class="ttdeci">T * data()</div><div class="ttdef"><b>Definition</b> array.h:349</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_a797ae8a1708a7c67d62e6c55c321d802"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802">mlx::core::array::unsafe_weak_copy</a></div><div class="ttdeci">static array unsafe_weak_copy(const array &other)</div><div class="ttdoc">Get a new array that refers to the same data as the input but with a non-owning pointer to it.</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ad2814dbffa5ad174d9c97a10bf4cf26b"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b">mlx::core::array::copy_shared_buffer</a></div><div class="ttdeci">void copy_shared_buffer(const array &other, const Strides &strides, Flags flags, size_t data_size, size_t offset=0)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_ae29e7d6fbfbea1e5e321a8d1ea3cfacd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd">mlx::core::array::dtype</a></div><div class="ttdeci">Dtype dtype() const</div><div class="ttdoc">Get the arrays data type.</div><div class="ttdef"><b>Definition</b> array.h:131</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_af329d9432c92de87cbaa2de8454eefc0"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#af329d9432c92de87cbaa2de8454eefc0">mlx::core::array::itemsize</a></div><div class="ttdeci">size_t itemsize() const</div><div class="ttdoc">The size of the array's datatype in bytes.</div><div class="ttdef"><b>Definition</b> array.h:83</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_af9e3a02b4c0023c36248dc75c887214f"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#af9e3a02b4c0023c36248dc75c887214f">mlx::core::array::set_data</a></div><div class="ttdeci">void set_data(allocator::Buffer buffer, Deleter d=allocator::free)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_afaf2a370fa35d96af1b27a4b814e3bfd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">mlx::core::array::data_size</a></div><div class="ttdeci">size_t data_size() const</div><div class="ttdoc">The size (in elements) of the underlying buffer the array points to.</div><div class="ttdef"><b>Definition</b> array.h:332</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html_afaf2a370fa35d96af1b27a4b814e3bfd"><div class="ttname"><a href="classmlx_1_1core_1_1array.html#afaf2a370fa35d96af1b27a4b814e3bfd">mlx::core::array::data_size</a></div><div class="ttdeci">size_t data_size() const</div><div class="ttdoc">The size (in elements) of the underlying buffer the array points to.</div><div class="ttdef"><b>Definition</b> array.h:327</div></div>
|
||||
<div class="ttc" id="aencoder_8h_html"><div class="ttname"><a href="encoder_8h.html">encoder.h</a></div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1allocator_html_a86ac0a11ff78f21e717f641716c34abc"><div class="ttname"><a href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc">mlx::core::allocator::malloc_or_wait</a></div><div class="ttdeci">Buffer malloc_or_wait(size_t size)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1cpu_html_a65b1789c4b339a108e64fda5f102d933"><div class="ttname"><a href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">mlx::core::cpu::get_command_encoder</a></div><div class="ttdeci">CommandEncoder & get_command_encoder(Stream stream)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_a4041676517d96870293e5448c7e2b5a4"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#a4041676517d96870293e5448c7e2b5a4">mlx::core::simd::load</a></div><div class="ttdeci">Simd< T, N > load(const T *x)</div><div class="ttdef"><b>Definition</b> base_simd.h:28</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_ac91bd36c7caafd3c7ff176e7e2f81887"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#ac91bd36c7caafd3c7ff176e7e2f81887">mlx::core::simd::max_size</a></div><div class="ttdeci">static constexpr int max_size</div><div class="ttdef"><b>Definition</b> base_simd.h:14</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1simd_html_afa2236afddfdec312eb7e27b89a5316a"><div class="ttname"><a href="namespacemlx_1_1core_1_1simd.html#afa2236afddfdec312eb7e27b89a5316a">mlx::core::simd::store</a></div><div class="ttdeci">void store(T *dst, Simd< T, N > x)</div><div class="ttdef"><b>Definition</b> base_simd.h:33</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a078859db0d66ff77f97af6dc9764e8eb"><div class="ttname"><a href="namespacemlx_1_1core.html#a078859db0d66ff77f97af6dc9764e8eb">mlx::core::unary_int</a></div><div class="ttdeci">void unary_int(const array &a, array &out, Op op)</div><div class="ttdef"><b>Definition</b> unary.h:145</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a0640d1f5bcd9a4f5cdaea9f197a53515"><div class="ttname"><a href="namespacemlx_1_1core.html#a0640d1f5bcd9a4f5cdaea9f197a53515">mlx::core::unary_complex_to_float</a></div><div class="ttdeci">void unary_complex_to_float(const array &a, array &out, Op op, Stream stream)</div><div class="ttdef"><b>Definition</b> unary.h:247</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a0f3ff0f676d28840c210ef6277caa546"><div class="ttname"><a href="namespacemlx_1_1core.html#a0f3ff0f676d28840c210ef6277caa546">mlx::core::unary</a></div><div class="ttdeci">void unary(const array &a, array &out, Op op, Stream stream)</div><div class="ttdef"><b>Definition</b> unary.h:75</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a113d2bac7e4aa6a4cb4a5c3242527b82"><div class="ttname"><a href="namespacemlx_1_1core.html#a113d2bac7e4aa6a4cb4a5c3242527b82">mlx::core::bool_</a></div><div class="ttdeci">constexpr Dtype bool_</div><div class="ttdef"><b>Definition</b> dtype.h:68</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a1f42e3dd4787d2ecec7114a12daefec8"><div class="ttname"><a href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8">mlx::core::uint64</a></div><div class="ttdeci">constexpr Dtype uint64</div><div class="ttdef"><b>Definition</b> dtype.h:73</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a27f00519f9756896734fd4d47fec0625"><div class="ttname"><a href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625">mlx::core::unary_op</a></div><div class="ttdeci">void unary_op(const T *a, U *out, Op op, size_t shape, size_t stride)</div><div class="ttdef"><b>Definition</b> unary.h:27</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a312a70c487366968af5e6cbf5038c812"><div class="ttname"><a href="namespacemlx_1_1core.html#a312a70c487366968af5e6cbf5038c812">mlx::core::uint16</a></div><div class="ttdeci">constexpr Dtype uint16</div><div class="ttdef"><b>Definition</b> dtype.h:71</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a474bf5eb8bca8c380207c9f659aef3b1"><div class="ttname"><a href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1">mlx::core::float64</a></div><div class="ttdeci">constexpr Dtype float64</div><div class="ttdef"><b>Definition</b> dtype.h:82</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a4c6a4241bfcdd7bbf30d0e521b79e5a3"><div class="ttname"><a href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">mlx::core::set_unary_output_data</a></div><div class="ttdeci">void set_unary_output_data(const array &in, array &out)</div><div class="ttdef"><b>Definition</b> unary.h:13</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a4c6a4241bfcdd7bbf30d0e521b79e5a3"><div class="ttname"><a href="namespacemlx_1_1core.html#a4c6a4241bfcdd7bbf30d0e521b79e5a3">mlx::core::set_unary_output_data</a></div><div class="ttdeci">void set_unary_output_data(const array &in, array &out)</div><div class="ttdef"><b>Definition</b> unary.h:14</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a50536365b8bcfec55e7d023ae9a6395c"><div class="ttname"><a href="namespacemlx_1_1core.html#a50536365b8bcfec55e7d023ae9a6395c">mlx::core::unary_int</a></div><div class="ttdeci">void unary_int(const array &a, array &out, Op op, Stream stream)</div><div class="ttdef"><b>Definition</b> unary.h:259</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a514cf8b4e6f0a6af3a867e752f4338f7"><div class="ttname"><a href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7">mlx::core::bfloat16</a></div><div class="ttdeci">constexpr Dtype bfloat16</div><div class="ttdef"><b>Definition</b> dtype.h:83</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a5d6373aad1444edc9de1eb07bfe5cad3"><div class="ttname"><a href="namespacemlx_1_1core.html#a5d6373aad1444edc9de1eb07bfe5cad3">mlx::core::int32</a></div><div class="ttdeci">constexpr Dtype int32</div><div class="ttdef"><b>Definition</b> dtype.h:77</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6894543b340321193dfb8052c438a319"><div class="ttname"><a href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319">mlx::core::float32</a></div><div class="ttdeci">constexpr Dtype float32</div><div class="ttdef"><b>Definition</b> dtype.h:81</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6c8fdd03ef891d7f47804bf02e9a8507"><div class="ttname"><a href="namespacemlx_1_1core.html#a6c8fdd03ef891d7f47804bf02e9a8507">mlx::core::unary</a></div><div class="ttdeci">void unary(const array &a, array &out, Op op)</div><div class="ttdef"><b>Definition</b> unary.h:72</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a6c1b92aea938457e44f93a7955d22823"><div class="ttname"><a href="namespacemlx_1_1core.html#a6c1b92aea938457e44f93a7955d22823">mlx::core::unary_fp</a></div><div class="ttdeci">void unary_fp(const array &a, array &out, Op op, Stream stream)</div><div class="ttdef"><b>Definition</b> unary.h:160</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a71ebba4ad1afa730962f0692c4f42f07"><div class="ttname"><a href="namespacemlx_1_1core.html#a71ebba4ad1afa730962f0692c4f42f07">mlx::core::int16</a></div><div class="ttdeci">constexpr Dtype int16</div><div class="ttdef"><b>Definition</b> dtype.h:76</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a76a2cb4634f5fd6970a8c3b3753d7a4a"><div class="ttname"><a href="namespacemlx_1_1core.html#a76a2cb4634f5fd6970a8c3b3753d7a4a">mlx::core::unary_fp</a></div><div class="ttdeci">void unary_fp(const array &a, array &out, Op op)</div><div class="ttdef"><b>Definition</b> unary.h:120</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a892e934e146dd938d144cee8813ca672"><div class="ttname"><a href="namespacemlx_1_1core.html#a892e934e146dd938d144cee8813ca672">mlx::core::int8</a></div><div class="ttdeci">constexpr Dtype int8</div><div class="ttdef"><b>Definition</b> dtype.h:75</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9019bdc191054ada0a502c7c34cef5b8"><div class="ttname"><a href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8">mlx::core::int64</a></div><div class="ttdeci">constexpr Dtype int64</div><div class="ttdef"><b>Definition</b> dtype.h:78</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a940f998c7469d14f5234f78dcaecd48b"><div class="ttname"><a href="namespacemlx_1_1core.html#a940f998c7469d14f5234f78dcaecd48b">mlx::core::unary_real_fp</a></div><div class="ttdeci">void unary_real_fp(const array &a, array &out, Op op, Stream stream)</div><div class="ttdef"><b>Definition</b> unary.h:131</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9778d50afbf456b0bd738751243b3b68"><div class="ttname"><a href="namespacemlx_1_1core.html#a9778d50afbf456b0bd738751243b3b68">mlx::core::uint8</a></div><div class="ttdeci">constexpr Dtype uint8</div><div class="ttdef"><b>Definition</b> dtype.h:70</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a9af588b2e7f4e5249cd8b7722ad829c0"><div class="ttname"><a href="namespacemlx_1_1core.html#a9af588b2e7f4e5249cd8b7722ad829c0">mlx::core::unary_complex</a></div><div class="ttdeci">void unary_complex(const array &a, array &out, Op op, Stream stream)</div><div class="ttdef"><b>Definition</b> unary.h:236</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_aa6b3dfc27a21d26b3fda96022aa60e32"><div class="ttname"><a href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32">mlx::core::unary_op</a></div><div class="ttdeci">void unary_op(const T *a, U *out, size_t shape, size_t stride)</div><div class="ttdef"><b>Definition</b> unary.h:32</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_abf228ee9d8ec48c03bb15adcc4e1f3ec"><div class="ttname"><a href="namespacemlx_1_1core.html#abf228ee9d8ec48c03bb15adcc4e1f3ec">mlx::core::float16</a></div><div class="ttdeci">constexpr Dtype float16</div><div class="ttdef"><b>Definition</b> dtype.h:80</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_ac63820d6fe10545907c33faf466a929e"><div class="ttname"><a href="namespacemlx_1_1core.html#ac63820d6fe10545907c33faf466a929e">mlx::core::uint32</a></div><div class="ttdeci">constexpr Dtype uint32</div><div class="ttdef"><b>Definition</b> dtype.h:72</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_aed2b5550f8424094ef10bdadfe92ec0f"><div class="ttname"><a href="namespacemlx_1_1core.html#aed2b5550f8424094ef10bdadfe92ec0f">mlx::core::unary_signed</a></div><div class="ttdeci">void unary_signed(const array &a, array &out, Op op, Stream stream)</div><div class="ttdef"><b>Definition</b> unary.h:193</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_af650e831ce21759da1ac103037d08d84"><div class="ttname"><a href="namespacemlx_1_1core.html#af650e831ce21759da1ac103037d08d84">mlx::core::is_donatable</a></div><div class="ttdeci">bool is_donatable(const array &in, const array &out)</div><div class="ttdef"><b>Definition</b> utils.h:155</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_af99db87e0078bfcdb383f5689bc874d4"><div class="ttname"><a href="namespacemlx_1_1core.html#af99db87e0078bfcdb383f5689bc874d4">mlx::core::complex64</a></div><div class="ttdeci">constexpr Dtype complex64</div><div class="ttdef"><b>Definition</b> dtype.h:84</div></div>
|
||||
<div class="ttc" id="asimd_8h_html"><div class="ttname"><a href="simd_8h.html">simd.h</a></div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html">mlx::core::ContiguousIterator</a></div><div class="ttdef"><b>Definition</b> utils.h:73</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html_a5ea4f0e40900e8c7e0830e1fb561af1a"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html#a5ea4f0e40900e8c7e0830e1fb561af1a">mlx::core::ContiguousIterator::loc</a></div><div class="ttdeci">int64_t loc</div><div class="ttdef"><b>Definition</b> utils.h:126</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_contiguous_iterator_html_aad921dd422adb0a0f555e19a2f42239c"><div class="ttname"><a href="structmlx_1_1core_1_1_contiguous_iterator.html#aad921dd422adb0a0f555e19a2f42239c">mlx::core::ContiguousIterator::step</a></div><div class="ttdeci">void step()</div><div class="ttdef"><b>Definition</b> utils.h:74</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_afd0ab11e7a486a2a8e50ee84b971ac8a"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#afd0ab11e7a486a2a8e50ee84b971ac8a">mlx::core::array::Flags::contiguous</a></div><div class="ttdeci">bool contiguous</div><div class="ttdef"><b>Definition</b> array.h:231</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_stream_html"><div class="ttname"><a href="structmlx_1_1core_1_1_stream.html">mlx::core::Stream</a></div><div class="ttdef"><b>Definition</b> stream.h:9</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1array_1_1_flags_html_afd0ab11e7a486a2a8e50ee84b971ac8a"><div class="ttname"><a href="structmlx_1_1core_1_1array_1_1_flags.html#afd0ab11e7a486a2a8e50ee84b971ac8a">mlx::core::array::Flags::contiguous</a></div><div class="ttdeci">bool contiguous</div><div class="ttdef"><b>Definition</b> array.h:238</div></div>
|
||||
<div class="ttc" id="autils_8h_html"><div class="ttname"><a href="utils_8h.html">utils.h</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
+4
-4
@@ -8,7 +8,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Custom Metal Kernels — MLX 0.23.2 documentation</title>
|
||||
<title>Custom Metal Kernels — MLX 0.24.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
|
||||
<script src="../_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
|
||||
|
||||
<script src="../_static/documentation_options.js?v=9900918c"></script>
|
||||
<script src="../_static/documentation_options.js?v=ae1d10b0"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/scripts/sphinx-book-theme.js?v=887ef09a"></script>
|
||||
@@ -137,8 +137,8 @@
|
||||
|
||||
|
||||
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.23.2 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.23.2 documentation - Home"/>`);</script>
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.24.0 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.24.0 documentation - Home"/>`);</script>
|
||||
|
||||
|
||||
</a></div>
|
||||
|
||||
Vendored
+75
-146
@@ -8,7 +8,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Custom Extensions in MLX — MLX 0.23.2 documentation</title>
|
||||
<title>Custom Extensions in MLX — MLX 0.24.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
|
||||
<script src="../_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
|
||||
|
||||
<script src="../_static/documentation_options.js?v=9900918c"></script>
|
||||
<script src="../_static/documentation_options.js?v=ae1d10b0"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/scripts/sphinx-book-theme.js?v=887ef09a"></script>
|
||||
@@ -137,8 +137,8 @@
|
||||
|
||||
|
||||
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.23.2 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.23.2 documentation - Home"/>`);</script>
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.24.0 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.24.0 documentation - Home"/>`);</script>
|
||||
|
||||
|
||||
</a></div>
|
||||
@@ -942,12 +942,12 @@ You can do that in MLX directly:</p>
|
||||
</div>
|
||||
<p>This function performs that operation while leaving the implementation and
|
||||
function transformations to MLX.</p>
|
||||
<p>However you may need to customize the underlying implementation, perhaps to
|
||||
make it faster or for custom differentiation. In this tutorial we will go
|
||||
through adding custom extensions. It will cover:</p>
|
||||
<p>However, you may want to customize the underlying implementation, perhaps to
|
||||
make it faster. In this tutorial we will go through adding custom extensions.
|
||||
It will cover:</p>
|
||||
<ul class="simple">
|
||||
<li><p>The structure of the MLX library.</p></li>
|
||||
<li><p>Implementing a CPU operation that redirects to <a class="reference external" href="https://developer.apple.com/documentation/accelerate/blas?language=objc">Accelerate</a> when appropriate.</p></li>
|
||||
<li><p>Implementing a CPU operation.</p></li>
|
||||
<li><p>Implementing a GPU operation using metal.</p></li>
|
||||
<li><p>Adding the <code class="docutils literal notranslate"><span class="pre">vjp</span></code> and <code class="docutils literal notranslate"><span class="pre">jvp</span></code> function transformation.</p></li>
|
||||
<li><p>Building a custom extension and binding it to python.</p></li>
|
||||
@@ -962,14 +962,14 @@ more detail.</p>
|
||||
<h3>Operations<a class="headerlink" href="#operations" title="Link to this heading">#</a></h3>
|
||||
<p>Operations are the front-end functions that operate on arrays. They are defined
|
||||
in the C++ API (<a class="reference internal" href="../cpp/ops.html#cpp-ops"><span class="std std-ref">Operations</span></a>), and the Python API (<a class="reference internal" href="../python/ops.html#ops"><span class="std std-ref">Operations</span></a>) binds them.</p>
|
||||
<p>We would like an operation, <code class="xref py py-meth docutils literal notranslate"><span class="pre">axpby()</span></code> that takes in two arrays <code class="docutils literal notranslate"><span class="pre">x</span></code> and
|
||||
<p>We would like an operation <code class="xref py py-meth docutils literal notranslate"><span class="pre">axpby()</span></code> that takes in two arrays, <code class="docutils literal notranslate"><span class="pre">x</span></code> and
|
||||
<code class="docutils literal notranslate"><span class="pre">y</span></code>, and two scalars, <code class="docutils literal notranslate"><span class="pre">alpha</span></code> and <code class="docutils literal notranslate"><span class="pre">beta</span></code>. This is how to define it in
|
||||
C++:</p>
|
||||
<div class="highlight-C++ notranslate"><div class="highlight"><pre><span></span><span class="cm">/**</span>
|
||||
<span class="cm">* Scale and sum two vectors element-wise</span>
|
||||
<span class="cm">* z = alpha * x + beta * y</span>
|
||||
<span class="cm">*</span>
|
||||
<span class="cm">* Follow numpy style broadcasting between x and y</span>
|
||||
<span class="cm">* Use NumPy-style broadcasting between x and y</span>
|
||||
<span class="cm">* Inputs are upcasted to floats if needed</span>
|
||||
<span class="cm">**/</span>
|
||||
<span class="n">array</span><span class="w"> </span><span class="nf">axpby</span><span class="p">(</span>
|
||||
@@ -981,7 +981,7 @@ C++:</p>
|
||||
<span class="p">);</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The simplest way to this operation is in terms of existing operations:</p>
|
||||
<p>The simplest way to implement this is with existing operations:</p>
|
||||
<div class="highlight-C++ notranslate"><div class="highlight"><pre><span></span><span class="n">array</span><span class="w"> </span><span class="nf">axpby</span><span class="p">(</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="c1">// Input array x</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="c1">// Input array y</span>
|
||||
@@ -1062,9 +1062,6 @@ more concrete:</p>
|
||||
<span class="w"> </span><span class="k">private</span><span class="o">:</span>
|
||||
<span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">alpha_</span><span class="p">;</span>
|
||||
<span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">beta_</span><span class="p">;</span>
|
||||
|
||||
<span class="w"> </span><span class="cm">/** Fall back implementation for evaluation on CPU */</span>
|
||||
<span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">eval</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">array</span><span class="o">>&</span><span class="w"> </span><span class="n">inputs</span><span class="p">,</span><span class="w"> </span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">out</span><span class="p">);</span>
|
||||
<span class="p">};</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
@@ -1093,7 +1090,7 @@ inputs that are passed to the primitive.</p>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">promoted_dtype</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">promote_types</span><span class="p">(</span><span class="n">x</span><span class="p">.</span><span class="n">dtype</span><span class="p">(),</span><span class="w"> </span><span class="n">y</span><span class="p">.</span><span class="n">dtype</span><span class="p">());</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// Upcast to float32 for non-floating point inputs x and y</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">out_dtype</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">is_floating_point</span><span class="p">(</span><span class="n">promoted_dtype</span><span class="p">)</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">out_dtype</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">issubdtype</span><span class="p">(</span><span class="n">promoted_dtype</span><span class="p">,</span><span class="w"> </span><span class="n">float32</span><span class="p">)</span>
|
||||
<span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="n">promoted_dtype</span>
|
||||
<span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">promote_types</span><span class="p">(</span><span class="n">promoted_dtype</span><span class="p">,</span><span class="w"> </span><span class="n">float32</span><span class="p">);</span>
|
||||
|
||||
@@ -1139,153 +1136,87 @@ of these functions to allocate memory as needed.</p>
|
||||
</div>
|
||||
<section id="implementing-the-cpu-back-end">
|
||||
<h3>Implementing the CPU Back-end<a class="headerlink" href="#implementing-the-cpu-back-end" title="Link to this heading">#</a></h3>
|
||||
<p>Let’s start by implementing a naive and generic version of
|
||||
<code class="xref py py-meth docutils literal notranslate"><span class="pre">Axpby::eval_cpu()</span></code>. We declared this as a private member function of
|
||||
<code class="xref py py-class docutils literal notranslate"><span class="pre">Axpby</span></code> earlier called <code class="xref py py-meth docutils literal notranslate"><span class="pre">Axpby::eval()</span></code>.</p>
|
||||
<p>Our naive method will go over each element of the output array, find the
|
||||
<p>Let’s start by implementing <code class="xref py py-meth docutils literal notranslate"><span class="pre">Axpby::eval_cpu()</span></code>.</p>
|
||||
<p>The method will go over each element of the output array, find the
|
||||
corresponding input elements of <code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">y</span></code> and perform the operation
|
||||
point-wise. This is captured in the templated function <code class="xref py py-meth docutils literal notranslate"><span class="pre">axpby_impl()</span></code>.</p>
|
||||
<div class="highlight-C++ notranslate"><div class="highlight"><pre><span></span><span class="k">template</span><span class="w"> </span><span class="o"><</span><span class="k">typename</span><span class="w"> </span><span class="nc">T</span><span class="o">></span>
|
||||
<span class="kt">void</span><span class="w"> </span><span class="n">axpby_impl</span><span class="p">(</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">x</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">y</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">out</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">beta_</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="c1">// We only allocate memory when we are ready to fill the output</span>
|
||||
<span class="w"> </span><span class="c1">// malloc_or_wait synchronously allocates available memory</span>
|
||||
<span class="w"> </span><span class="c1">// There may be a wait executed here if the allocation is requested</span>
|
||||
<span class="w"> </span><span class="c1">// under memory-pressured conditions</span>
|
||||
<span class="w"> </span><span class="n">out</span><span class="p">.</span><span class="n">set_data</span><span class="p">(</span><span class="n">allocator</span><span class="o">::</span><span class="n">malloc_or_wait</span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">nbytes</span><span class="p">()));</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">mx</span><span class="o">::</span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">x</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">mx</span><span class="o">::</span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">y</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="n">mx</span><span class="o">::</span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">out</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">beta_</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="n">mx</span><span class="o">::</span><span class="n">Stream</span><span class="w"> </span><span class="n">stream</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="c1">// Allocate the output with `malloc_or_wait` which synchronously allocates</span>
|
||||
<span class="w"> </span><span class="c1">// memory, potentially waiting if the system is under memory pressure</span>
|
||||
<span class="w"> </span><span class="n">out</span><span class="p">.</span><span class="n">set_data</span><span class="p">(</span><span class="n">mx</span><span class="o">::</span><span class="n">allocator</span><span class="o">::</span><span class="n">malloc_or_wait</span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">nbytes</span><span class="p">()));</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// Collect input and output data pointers</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">T</span><span class="o">*</span><span class="w"> </span><span class="n">x_ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="n">data</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">();</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">T</span><span class="o">*</span><span class="w"> </span><span class="n">y_ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">y</span><span class="p">.</span><span class="n">data</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">();</span>
|
||||
<span class="w"> </span><span class="n">T</span><span class="o">*</span><span class="w"> </span><span class="n">out_ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">out</span><span class="p">.</span><span class="n">data</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">();</span>
|
||||
<span class="w"> </span><span class="c1">// Get the CPU command encoder and register input and output arrays</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="o">&</span><span class="w"> </span><span class="n">encoder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mx</span><span class="o">::</span><span class="n">cpu</span><span class="o">::</span><span class="n">get_command_encoder</span><span class="p">(</span><span class="n">stream</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="n">encoder</span><span class="p">.</span><span class="n">set_input_array</span><span class="p">(</span><span class="n">x</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="n">encoder</span><span class="p">.</span><span class="n">set_input_array</span><span class="p">(</span><span class="n">y</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="n">encoder</span><span class="p">.</span><span class="n">set_output_array</span><span class="p">(</span><span class="n">out</span><span class="p">);</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// Launch the CPU kernel</span>
|
||||
<span class="w"> </span><span class="n">encoder</span><span class="p">.</span><span class="n">dispatch</span><span class="p">([</span><span class="n">x_ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="n">data</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">(),</span>
|
||||
<span class="w"> </span><span class="n">y_ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">y</span><span class="p">.</span><span class="n">data</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">(),</span>
|
||||
<span class="w"> </span><span class="n">out_ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">out</span><span class="p">.</span><span class="n">data</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">(),</span>
|
||||
<span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">out</span><span class="p">.</span><span class="n">size</span><span class="p">(),</span>
|
||||
<span class="w"> </span><span class="n">shape</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">out</span><span class="p">.</span><span class="n">shape</span><span class="p">(),</span>
|
||||
<span class="w"> </span><span class="n">x_strides</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="n">strides</span><span class="p">(),</span>
|
||||
<span class="w"> </span><span class="n">y_strides</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">y</span><span class="p">.</span><span class="n">strides</span><span class="p">(),</span>
|
||||
<span class="w"> </span><span class="n">alpha_</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="n">beta_</span><span class="p">]()</span><span class="w"> </span><span class="p">{</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// Cast alpha and beta to the relevant types</span>
|
||||
<span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="n">alpha</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">static_cast</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">(</span><span class="n">alpha_</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="n">beta</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">static_cast</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">(</span><span class="n">beta_</span><span class="p">);</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// Do the element-wise operation for each output</span>
|
||||
<span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">size_t</span><span class="w"> </span><span class="n">out_idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">out_idx</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">out</span><span class="p">.</span><span class="n">size</span><span class="p">();</span><span class="w"> </span><span class="n">out_idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="c1">// Map linear indices to offsets in x and y</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">x_offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">elem_to_loc</span><span class="p">(</span><span class="n">out_idx</span><span class="p">,</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="n">shape</span><span class="p">(),</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="n">strides</span><span class="p">());</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">y_offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">elem_to_loc</span><span class="p">(</span><span class="n">out_idx</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">.</span><span class="n">shape</span><span class="p">(),</span><span class="w"> </span><span class="n">y</span><span class="p">.</span><span class="n">strides</span><span class="p">());</span>
|
||||
<span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">size_t</span><span class="w"> </span><span class="n">out_idx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">out_idx</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">size</span><span class="p">;</span><span class="w"> </span><span class="n">out_idx</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="c1">// Map linear indices to offsets in x and y</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">x_offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mx</span><span class="o">::</span><span class="n">elem_to_loc</span><span class="p">(</span><span class="n">out_idx</span><span class="p">,</span><span class="w"> </span><span class="n">shape</span><span class="p">,</span><span class="w"> </span><span class="n">x_strides</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="w"> </span><span class="n">y_offset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">mx</span><span class="o">::</span><span class="n">elem_to_loc</span><span class="p">(</span><span class="n">out_idx</span><span class="p">,</span><span class="w"> </span><span class="n">shape</span><span class="p">,</span><span class="w"> </span><span class="n">y_strides</span><span class="p">);</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// We allocate the output to be contiguous and regularly strided</span>
|
||||
<span class="w"> </span><span class="c1">// (defaults to row major) and hence it doesn't need additional mapping</span>
|
||||
<span class="w"> </span><span class="n">out_ptr</span><span class="p">[</span><span class="n">out_idx</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">alpha</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">x_ptr</span><span class="p">[</span><span class="n">x_offset</span><span class="p">]</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">beta</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">y_ptr</span><span class="p">[</span><span class="n">y_offset</span><span class="p">];</span>
|
||||
<span class="w"> </span><span class="c1">// We allocate the output to be contiguous and regularly strided</span>
|
||||
<span class="w"> </span><span class="c1">// (defaults to row major) and hence it doesn't need additional mapping</span>
|
||||
<span class="w"> </span><span class="n">out_ptr</span><span class="p">[</span><span class="n">out_idx</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">alpha</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">x_ptr</span><span class="p">[</span><span class="n">x_offset</span><span class="p">]</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">beta</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">y_ptr</span><span class="p">[</span><span class="n">y_offset</span><span class="p">];</span>
|
||||
<span class="w"> </span><span class="p">}</span>
|
||||
<span class="w"> </span><span class="p">});</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Our implementation should work for all incoming floating point arrays.
|
||||
Accordingly, we add dispatches for <code class="docutils literal notranslate"><span class="pre">float32</span></code>, <code class="docutils literal notranslate"><span class="pre">float16</span></code>, <code class="docutils literal notranslate"><span class="pre">bfloat16</span></code> and
|
||||
<code class="docutils literal notranslate"><span class="pre">complex64</span></code>. We throw an error if we encounter an unexpected type.</p>
|
||||
<div class="highlight-C++ notranslate"><div class="highlight"><pre><span></span><span class="cm">/** Fall back implementation for evaluation on CPU */</span>
|
||||
<span class="kt">void</span><span class="w"> </span><span class="nf">Axpby::eval</span><span class="p">(</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">array</span><span class="o">>&</span><span class="w"> </span><span class="n">inputs</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">array</span><span class="o">>&</span><span class="w"> </span><span class="n">outputs</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="o">&</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">inputs</span><span class="p">[</span><span class="mi">0</span><span class="p">];</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="o">&</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">inputs</span><span class="p">[</span><span class="mi">1</span><span class="p">];</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="o">&</span><span class="w"> </span><span class="n">out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">outputs</span><span class="p">[</span><span class="mi">0</span><span class="p">];</span>
|
||||
<div class="highlight-C++ notranslate"><div class="highlight"><pre><span></span><span class="kt">void</span><span class="w"> </span><span class="nf">Axpby::eval_cpu</span><span class="p">(</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">mx</span><span class="o">::</span><span class="n">array</span><span class="o">>&</span><span class="w"> </span><span class="n">inputs</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">mx</span><span class="o">::</span><span class="n">array</span><span class="o">>&</span><span class="w"> </span><span class="n">outputs</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="o">&</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">inputs</span><span class="p">[</span><span class="mi">0</span><span class="p">];</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="o">&</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">inputs</span><span class="p">[</span><span class="mi">1</span><span class="p">];</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="o">&</span><span class="w"> </span><span class="n">out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">outputs</span><span class="p">[</span><span class="mi">0</span><span class="p">];</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// Dispatch to the correct dtype</span>
|
||||
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">dtype</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">float32</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">axpby_impl</span><span class="o"><</span><span class="kt">float</span><span class="o">></span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span><span class="w"> </span><span class="n">beta_</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">dtype</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">float16</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">axpby_impl</span><span class="o"><</span><span class="n">float16_t</span><span class="o">></span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span><span class="w"> </span><span class="n">beta_</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">dtype</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">bfloat16</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">axpby_impl</span><span class="o"><</span><span class="n">bfloat16_t</span><span class="o">></span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span><span class="w"> </span><span class="n">beta_</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">dtype</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">complex64</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">axpby_impl</span><span class="o"><</span><span class="n">complex64_t</span><span class="o">></span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span><span class="w"> </span><span class="n">beta_</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">throw</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">runtime_error</span><span class="p">(</span>
|
||||
<span class="w"> </span><span class="s">"[Axpby] Only supports floating point types."</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This is good as a fallback implementation. We can use the <code class="docutils literal notranslate"><span class="pre">axpby</span></code> routine
|
||||
provided by the <a class="reference external" href="https://developer.apple.com/documentation/accelerate/blas?language=objc">Accelerate</a> framework for a faster implementation in certain
|
||||
cases:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>Accelerate does not provide implementations of <code class="docutils literal notranslate"><span class="pre">axpby</span></code> for half precision
|
||||
floats. We can only use it for <code class="docutils literal notranslate"><span class="pre">float32</span></code> types.</p></li>
|
||||
<li><p>Accelerate assumes the inputs <code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">y</span></code> are contiguous and all
|
||||
elements have fixed strides between them. We only direct to Accelerate
|
||||
if both <code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">y</span></code> are row contiguous or column contiguous.</p></li>
|
||||
<li><p>Accelerate performs the routine <code class="docutils literal notranslate"><span class="pre">Y</span> <span class="pre">=</span> <span class="pre">(alpha</span> <span class="pre">*</span> <span class="pre">X)</span> <span class="pre">+</span> <span class="pre">(beta</span> <span class="pre">*</span> <span class="pre">Y)</span></code> in-place.
|
||||
MLX expects to write the output to a new array. We must copy the elements
|
||||
of <code class="docutils literal notranslate"><span class="pre">y</span></code> into the output and use that as an input to <code class="docutils literal notranslate"><span class="pre">axpby</span></code>.</p></li>
|
||||
</ol>
|
||||
<p>Let’s write an implementation that uses Accelerate in the right conditions.
|
||||
It allocates data for the output, copies <code class="docutils literal notranslate"><span class="pre">y</span></code> into it, and then calls the
|
||||
<code class="xref py py-func docutils literal notranslate"><span class="pre">catlas_saxpby()</span></code> from accelerate.</p>
|
||||
<div class="highlight-C++ notranslate"><div class="highlight"><pre><span></span><span class="k">template</span><span class="w"> </span><span class="o"><</span><span class="k">typename</span><span class="w"> </span><span class="nc">T</span><span class="o">></span>
|
||||
<span class="kt">void</span><span class="w"> </span><span class="n">axpby_impl_accelerate</span><span class="p">(</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">x</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">y</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="n">array</span><span class="o">&</span><span class="w"> </span><span class="n">out</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="kt">float</span><span class="w"> </span><span class="n">beta_</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="c1">// Accelerate library provides catlas_saxpby which does</span>
|
||||
<span class="w"> </span><span class="c1">// Y = (alpha * X) + (beta * Y) in place</span>
|
||||
<span class="w"> </span><span class="c1">// To use it, we first copy the data in y over to the output array</span>
|
||||
<span class="w"> </span><span class="n">out</span><span class="p">.</span><span class="n">set_data</span><span class="p">(</span><span class="n">allocator</span><span class="o">::</span><span class="n">malloc_or_wait</span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">nbytes</span><span class="p">()));</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// We then copy over the elements using the contiguous vector specialization</span>
|
||||
<span class="w"> </span><span class="n">copy_inplace</span><span class="p">(</span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">CopyType</span><span class="o">::</span><span class="n">Vector</span><span class="p">);</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// Get x and y pointers for catlas_saxpby</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">T</span><span class="o">*</span><span class="w"> </span><span class="n">x_ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">.</span><span class="n">data</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">();</span>
|
||||
<span class="w"> </span><span class="n">T</span><span class="o">*</span><span class="w"> </span><span class="n">y_ptr</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">out</span><span class="p">.</span><span class="n">data</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">();</span>
|
||||
|
||||
<span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="n">alpha</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">static_cast</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">(</span><span class="n">alpha_</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="n">beta</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">static_cast</span><span class="o"><</span><span class="n">T</span><span class="o">></span><span class="p">(</span><span class="n">beta_</span><span class="p">);</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// Call the inplace accelerate operator</span>
|
||||
<span class="w"> </span><span class="n">catlas_saxpby</span><span class="p">(</span>
|
||||
<span class="w"> </span><span class="cm">/* N = */</span><span class="w"> </span><span class="n">out</span><span class="p">.</span><span class="n">size</span><span class="p">(),</span>
|
||||
<span class="w"> </span><span class="cm">/* ALPHA = */</span><span class="w"> </span><span class="n">alpha</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="cm">/* X = */</span><span class="w"> </span><span class="n">x_ptr</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="cm">/* INCX = */</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="cm">/* BETA = */</span><span class="w"> </span><span class="n">beta</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="cm">/* Y = */</span><span class="w"> </span><span class="n">y_ptr</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="cm">/* INCY = */</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>For inputs that do not fit the criteria for accelerate, we fall back to
|
||||
<code class="xref py py-meth docutils literal notranslate"><span class="pre">Axpby::eval()</span></code>. With this in mind, let’s finish our
|
||||
<code class="xref py py-meth docutils literal notranslate"><span class="pre">Axpby::eval_cpu()</span></code>.</p>
|
||||
<div class="highlight-C++ notranslate"><div class="highlight"><pre><span></span><span class="cm">/** Evaluate primitive on CPU using accelerate specializations */</span>
|
||||
<span class="kt">void</span><span class="w"> </span><span class="nf">Axpby::eval_cpu</span><span class="p">(</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">array</span><span class="o">>&</span><span class="w"> </span><span class="n">inputs</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o"><</span><span class="n">array</span><span class="o">>&</span><span class="w"> </span><span class="n">outputs</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="n">assert</span><span class="p">(</span><span class="n">inputs</span><span class="p">.</span><span class="n">size</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="o">&</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">inputs</span><span class="p">[</span><span class="mi">0</span><span class="p">];</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="o">&</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">inputs</span><span class="p">[</span><span class="mi">1</span><span class="p">];</span>
|
||||
<span class="w"> </span><span class="k">auto</span><span class="o">&</span><span class="w"> </span><span class="n">out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">outputs</span><span class="p">[</span><span class="mi">0</span><span class="p">];</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// Accelerate specialization for contiguous single precision float arrays</span>
|
||||
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">dtype</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">float32</span><span class="w"> </span><span class="o">&&</span>
|
||||
<span class="w"> </span><span class="p">((</span><span class="n">x</span><span class="p">.</span><span class="n">flags</span><span class="p">().</span><span class="n">row_contiguous</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">y</span><span class="p">.</span><span class="n">flags</span><span class="p">().</span><span class="n">row_contiguous</span><span class="p">)</span><span class="w"> </span><span class="o">||</span>
|
||||
<span class="w"> </span><span class="p">(</span><span class="n">x</span><span class="p">.</span><span class="n">flags</span><span class="p">().</span><span class="n">col_contiguous</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="n">y</span><span class="p">.</span><span class="n">flags</span><span class="p">().</span><span class="n">col_contiguous</span><span class="p">)))</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="n">axpby_impl_accelerate</span><span class="o"><</span><span class="kt">float</span><span class="o">></span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span><span class="w"> </span><span class="n">beta_</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="k">return</span><span class="p">;</span>
|
||||
<span class="w"> </span><span class="p">}</span>
|
||||
|
||||
<span class="w"> </span><span class="c1">// Fall back to common back-end if specializations are not available</span>
|
||||
<span class="w"> </span><span class="n">eval</span><span class="p">(</span><span class="n">inputs</span><span class="p">,</span><span class="w"> </span><span class="n">outputs</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="c1">// Dispatch to the correct dtype</span>
|
||||
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">dtype</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">mx</span><span class="o">::</span><span class="n">float32</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">axpby_impl</span><span class="o"><</span><span class="kt">float</span><span class="o">></span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span><span class="w"> </span><span class="n">beta_</span><span class="p">,</span><span class="w"> </span><span class="n">stream</span><span class="p">());</span>
|
||||
<span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">dtype</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">mx</span><span class="o">::</span><span class="n">float16</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">axpby_impl</span><span class="o"><</span><span class="n">mx</span><span class="o">::</span><span class="n">float16_t</span><span class="o">></span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span><span class="w"> </span><span class="n">beta_</span><span class="p">,</span><span class="w"> </span><span class="n">stream</span><span class="p">());</span>
|
||||
<span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">dtype</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">mx</span><span class="o">::</span><span class="n">bfloat16</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">axpby_impl</span><span class="o"><</span><span class="n">mx</span><span class="o">::</span><span class="n">bfloat16_t</span><span class="o">></span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span><span class="w"> </span><span class="n">beta_</span><span class="p">,</span><span class="w"> </span><span class="n">stream</span><span class="p">());</span>
|
||||
<span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">out</span><span class="p">.</span><span class="n">dtype</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">mx</span><span class="o">::</span><span class="n">complex64</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">axpby_impl</span><span class="o"><</span><span class="n">mx</span><span class="o">::</span><span class="n">complex64_t</span><span class="o">></span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">alpha_</span><span class="p">,</span><span class="w"> </span><span class="n">beta_</span><span class="p">,</span><span class="w"> </span><span class="n">stream</span><span class="p">());</span>
|
||||
<span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
|
||||
<span class="w"> </span><span class="k">throw</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">runtime_error</span><span class="p">(</span>
|
||||
<span class="w"> </span><span class="s">"Axpby is only supported for floating point types."</span><span class="p">);</span>
|
||||
<span class="w"> </span><span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Just this much is enough to run the operation <code class="xref py py-meth docutils literal notranslate"><span class="pre">axpby()</span></code> on a CPU stream! If
|
||||
you do not plan on running the operation on the GPU or using transforms on
|
||||
computation graphs that contain <code class="xref py py-class docutils literal notranslate"><span class="pre">Axpby</span></code>, you can stop implementing the
|
||||
primitive here and enjoy the speed-ups you get from the Accelerate library.</p>
|
||||
primitive here.</p>
|
||||
</section>
|
||||
<section id="implementing-the-gpu-back-end">
|
||||
<h3>Implementing the GPU Back-end<a class="headerlink" href="#implementing-the-gpu-back-end" title="Link to this heading">#</a></h3>
|
||||
@@ -1688,18 +1619,16 @@ import the Python package and play with it as you would any other MLX operation.
|
||||
<section id="results">
|
||||
<h3>Results<a class="headerlink" href="#results" title="Link to this heading">#</a></h3>
|
||||
<p>Let’s run a quick benchmark and see how our new <code class="docutils literal notranslate"><span class="pre">axpby</span></code> operation compares
|
||||
with the naive <code class="xref py py-meth docutils literal notranslate"><span class="pre">simple_axpby()</span></code> we first defined on the CPU.</p>
|
||||
with the naive <code class="xref py py-meth docutils literal notranslate"><span class="pre">simple_axpby()</span></code> we first defined.</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">mlx.core</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">mx</span>
|
||||
<span class="kn">from</span><span class="w"> </span><span class="nn">mlx_sample_extensions</span><span class="w"> </span><span class="kn">import</span> <span class="n">axpby</span>
|
||||
<span class="kn">import</span><span class="w"> </span><span class="nn">time</span>
|
||||
|
||||
<span class="n">mx</span><span class="o">.</span><span class="n">set_default_device</span><span class="p">(</span><span class="n">mx</span><span class="o">.</span><span class="n">cpu</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span><span class="w"> </span><span class="nf">simple_axpby</span><span class="p">(</span><span class="n">x</span><span class="p">:</span> <span class="n">mx</span><span class="o">.</span><span class="n">array</span><span class="p">,</span> <span class="n">y</span><span class="p">:</span> <span class="n">mx</span><span class="o">.</span><span class="n">array</span><span class="p">,</span> <span class="n">alpha</span><span class="p">:</span> <span class="nb">float</span><span class="p">,</span> <span class="n">beta</span><span class="p">:</span> <span class="nb">float</span><span class="p">)</span> <span class="o">-></span> <span class="n">mx</span><span class="o">.</span><span class="n">array</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="n">alpha</span> <span class="o">*</span> <span class="n">x</span> <span class="o">+</span> <span class="n">beta</span> <span class="o">*</span> <span class="n">y</span>
|
||||
|
||||
<span class="n">M</span> <span class="o">=</span> <span class="mi">256</span>
|
||||
<span class="n">N</span> <span class="o">=</span> <span class="mi">512</span>
|
||||
<span class="n">M</span> <span class="o">=</span> <span class="mi">4096</span>
|
||||
<span class="n">N</span> <span class="o">=</span> <span class="mi">4096</span>
|
||||
|
||||
<span class="n">x</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">normal</span><span class="p">((</span><span class="n">M</span><span class="p">,</span> <span class="n">N</span><span class="p">))</span>
|
||||
<span class="n">y</span> <span class="o">=</span> <span class="n">mx</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">normal</span><span class="p">((</span><span class="n">M</span><span class="p">,</span> <span class="n">N</span><span class="p">))</span>
|
||||
@@ -1710,25 +1639,25 @@ with the naive <code class="xref py py-meth docutils literal notranslate"><span
|
||||
|
||||
<span class="k">def</span><span class="w"> </span><span class="nf">bench</span><span class="p">(</span><span class="n">f</span><span class="p">):</span>
|
||||
<span class="c1"># Warm up</span>
|
||||
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">):</span>
|
||||
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">5</span><span class="p">):</span>
|
||||
<span class="n">z</span> <span class="o">=</span> <span class="n">f</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">alpha</span><span class="p">,</span> <span class="n">beta</span><span class="p">)</span>
|
||||
<span class="n">mx</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">z</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># Timed run</span>
|
||||
<span class="n">s</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">5000</span><span class="p">):</span>
|
||||
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">):</span>
|
||||
<span class="n">z</span> <span class="o">=</span> <span class="n">f</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">alpha</span><span class="p">,</span> <span class="n">beta</span><span class="p">)</span>
|
||||
<span class="n">mx</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="n">z</span><span class="p">)</span>
|
||||
<span class="n">e</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
|
||||
<span class="k">return</span> <span class="n">e</span> <span class="o">-</span> <span class="n">s</span>
|
||||
<span class="k">return</span> <span class="mi">1000</span> <span class="o">*</span> <span class="p">(</span><span class="n">e</span> <span class="o">-</span> <span class="n">s</span><span class="p">)</span> <span class="o">/</span> <span class="mi">100</span>
|
||||
|
||||
<span class="n">simple_time</span> <span class="o">=</span> <span class="n">bench</span><span class="p">(</span><span class="n">simple_axpby</span><span class="p">)</span>
|
||||
<span class="n">custom_time</span> <span class="o">=</span> <span class="n">bench</span><span class="p">(</span><span class="n">axpby</span><span class="p">)</span>
|
||||
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Simple axpby: </span><span class="si">{</span><span class="n">simple_time</span><span class="si">:</span><span class="s2">.3f</span><span class="si">}</span><span class="s2"> s | Custom axpby: </span><span class="si">{</span><span class="n">custom_time</span><span class="si">:</span><span class="s2">.3f</span><span class="si">}</span><span class="s2"> s"</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Simple axpby: </span><span class="si">{</span><span class="n">simple_time</span><span class="si">:</span><span class="s2">.3f</span><span class="si">}</span><span class="s2"> ms | Custom axpby: </span><span class="si">{</span><span class="n">custom_time</span><span class="si">:</span><span class="s2">.3f</span><span class="si">}</span><span class="s2"> ms"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The results are <code class="docutils literal notranslate"><span class="pre">Simple</span> <span class="pre">axpby:</span> <span class="pre">0.114</span> <span class="pre">s</span> <span class="pre">|</span> <span class="pre">Custom</span> <span class="pre">axpby:</span> <span class="pre">0.109</span> <span class="pre">s</span></code>. We see
|
||||
<p>The results are <code class="docutils literal notranslate"><span class="pre">Simple</span> <span class="pre">axpby:</span> <span class="pre">1.559</span> <span class="pre">ms</span> <span class="pre">|</span> <span class="pre">Custom</span> <span class="pre">axpby:</span> <span class="pre">0.774</span> <span class="pre">ms</span></code>. We see
|
||||
modest improvements right away!</p>
|
||||
<p>This operation is now good to be used to build other operations, in
|
||||
<a class="reference internal" href="../python/nn/module.html#mlx.nn.Module" title="mlx.nn.Module"><code class="xref py py-class docutils literal notranslate"><span class="pre">mlx.nn.Module</span></code></a> calls, and also as a part of graph transformations like
|
||||
|
||||
+4
-4
@@ -8,7 +8,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Metal Debugger — MLX 0.23.2 documentation</title>
|
||||
<title>Metal Debugger — MLX 0.24.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
|
||||
<script src="../_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
|
||||
|
||||
<script src="../_static/documentation_options.js?v=9900918c"></script>
|
||||
<script src="../_static/documentation_options.js?v=ae1d10b0"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/scripts/sphinx-book-theme.js?v=887ef09a"></script>
|
||||
@@ -137,8 +137,8 @@
|
||||
|
||||
|
||||
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.23.2 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.23.2 documentation - Home"/>`);</script>
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.24.0 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.24.0 documentation - Home"/>`);</script>
|
||||
|
||||
|
||||
</a></div>
|
||||
|
||||
Vendored
+4
-4
@@ -8,7 +8,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Using MLX in C++ — MLX 0.23.2 documentation</title>
|
||||
<title>Using MLX in C++ — MLX 0.24.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
|
||||
<script src="../_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
|
||||
|
||||
<script src="../_static/documentation_options.js?v=9900918c"></script>
|
||||
<script src="../_static/documentation_options.js?v=ae1d10b0"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/scripts/sphinx-book-theme.js?v=887ef09a"></script>
|
||||
@@ -136,8 +136,8 @@
|
||||
|
||||
|
||||
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.23.2 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.23.2 documentation - Home"/>`);</script>
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.24.0 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.24.0 documentation - Home"/>`);</script>
|
||||
|
||||
|
||||
</a></div>
|
||||
|
||||
@@ -110,7 +110,7 @@ $(function(){initNavTree('dir_2193406f5b2eae6fc53753d8a9a80df3.html',''); initRe
|
||||
Files</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="gguf_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="gguf_8h.html">gguf.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="io_2load_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="io_2load_8h.html">load.h</a></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="load_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="load_8h.html">load.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
var dir_2193406f5b2eae6fc53753d8a9a80df3 =
|
||||
[
|
||||
[ "gguf.h", "gguf_8h.html", "gguf_8h" ],
|
||||
[ "load.h", "io_2load_8h.html", "io_2load_8h" ]
|
||||
[ "load.h", "load_8h.html", "load_8h" ]
|
||||
];
|
||||
@@ -125,6 +125,10 @@ Files</h2></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="cpu_2copy_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="cpu_2copy_8h.html">copy.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="encoder_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="encoder_8h.html">encoder.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="eval_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="eval_8h.html">eval.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="cpu_2gemm_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="cpu_2gemm_8h.html">gemm.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="jit__compiler_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="jit__compiler_8h.html">jit_compiler.h</a></td></tr>
|
||||
|
||||
+3
-1
@@ -1,12 +1,14 @@
|
||||
var dir_48c8bf40aae7e42226b4fe31ea48af19 =
|
||||
[
|
||||
[ "simd", "dir_777905fddc177f731a39846ae16b0314.html", "dir_777905fddc177f731a39846ae16b0314" ],
|
||||
[ "arange.h", "cpu_2arange_8h.html", "cpu_2arange_8h" ],
|
||||
[ "arange.h", "cpu_2arange_8h.html", null ],
|
||||
[ "binary.h", "cpu_2binary_8h.html", "cpu_2binary_8h" ],
|
||||
[ "binary_ops.h", "cpu_2binary__ops_8h.html", "cpu_2binary__ops_8h" ],
|
||||
[ "binary_two.h", "cpu_2binary__two_8h.html", null ],
|
||||
[ "compiled_preamble.h", "compiled__preamble_8h.html", "compiled__preamble_8h" ],
|
||||
[ "copy.h", "cpu_2copy_8h.html", "cpu_2copy_8h" ],
|
||||
[ "encoder.h", "encoder_8h.html", "encoder_8h" ],
|
||||
[ "eval.h", "eval_8h.html", "eval_8h" ],
|
||||
[ "gemm.h", "cpu_2gemm_8h.html", "cpu_2gemm_8h" ],
|
||||
[ "jit_compiler.h", "jit__compiler_8h.html", "jit__compiler_8h" ],
|
||||
[ "lapack.h", "lapack_8h.html", "lapack_8h" ],
|
||||
|
||||
@@ -145,6 +145,8 @@ Files</h2></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="fast__primitives_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="fast__primitives_8h.html">fast_primitives.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="fence_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="fence_8h.html">fence.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="fft_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="fft_8h.html">fft.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="graph__utils_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="graph__utils_8h.html">graph_utils.h</a></td></tr>
|
||||
|
||||
@@ -17,6 +17,7 @@ var dir_938ab0ecf10b8b860ff766c820f665fd =
|
||||
[ "export_impl.h", "export__impl_8h.html", "export__impl_8h" ],
|
||||
[ "fast.h", "fast_8h.html", "fast_8h" ],
|
||||
[ "fast_primitives.h", "fast__primitives_8h.html", "fast__primitives_8h" ],
|
||||
[ "fence.h", "fence_8h.html", "fence_8h" ],
|
||||
[ "fft.h", "fft_8h.html", "fft_8h" ],
|
||||
[ "graph_utils.h", "graph__utils_8h.html", "graph__utils_8h" ],
|
||||
[ "io.h", "io_8h.html", "io_8h" ],
|
||||
|
||||
@@ -123,10 +123,6 @@ Files</h2></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="backend_2metal_2device_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="backend_2metal_2device_8h.html">device.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="backend_2metal_2event_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="backend_2metal_2event_8h.html">event.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="fence_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="fence_8h.html">fence.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="kernels_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="kernels_8h.html">kernels.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="matmul_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="matmul_8h.html">matmul.h</a></td></tr>
|
||||
|
||||
@@ -6,8 +6,6 @@ var dir_d0c977ea65824390717cdb7efc36c157 =
|
||||
[ "binary.h", "metal_2binary_8h.html", "metal_2binary_8h" ],
|
||||
[ "copy.h", "metal_2copy_8h.html", "metal_2copy_8h" ],
|
||||
[ "device.h", "backend_2metal_2device_8h.html", "backend_2metal_2device_8h" ],
|
||||
[ "event.h", "backend_2metal_2event_8h.html", "backend_2metal_2event_8h" ],
|
||||
[ "fence.h", "fence_8h.html", "fence_8h" ],
|
||||
[ "kernels.h", "kernels_8h.html", "kernels_8h" ],
|
||||
[ "matmul.h", "matmul_8h.html", "matmul_8h" ],
|
||||
[ "metal.h", "metal_8h.html", "metal_8h" ],
|
||||
|
||||
@@ -116,8 +116,6 @@ Files</h2></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="common_2hadamard_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="common_2hadamard_8h.html">hadamard.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="backend_2common_2load_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="backend_2common_2load_8h.html">load.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="common_2reduce_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="common_2reduce_8h.html">reduce.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="common_2slicing_8h_source.html"><span class="icondoc"></span></a> </td><td class="memItemRight" valign="bottom"><a class="el" href="common_2slicing_8h.html">slicing.h</a></td></tr>
|
||||
|
||||
@@ -4,7 +4,6 @@ var dir_f149b24a1b5be11cd70151abe517e3f8 =
|
||||
[ "compiled.h", "compiled_8h.html", "compiled_8h" ],
|
||||
[ "copy.h", "common_2copy_8h.html", "common_2copy_8h" ],
|
||||
[ "hadamard.h", "common_2hadamard_8h.html", "common_2hadamard_8h" ],
|
||||
[ "load.h", "backend_2common_2load_8h.html", "backend_2common_2load_8h" ],
|
||||
[ "reduce.h", "common_2reduce_8h.html", "common_2reduce_8h" ],
|
||||
[ "slicing.h", "common_2slicing_8h.html", "common_2slicing_8h" ],
|
||||
[ "ternary.h", "common_2ternary_8h.html", "common_2ternary_8h" ],
|
||||
|
||||
+10
-12
@@ -132,18 +132,16 @@ Namespaces</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ac3612edf0e0e18c1e4ba0ce7c6e35cd6" id="r_ac3612edf0e0e18c1e4ba0ce7c6e35cd6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#ac3612edf0e0e18c1e4ba0ce7c6e35cd6">mlx::core::distributed::detail::communication_stream</a> ()</td></tr>
|
||||
<tr class="separator:ac3612edf0e0e18c1e4ba0ce7c6e35cd6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa1d225b25f7b6426c48c5e35860ee960" id="r_aa1d225b25f7b6426c48c5e35860ee960"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#aa1d225b25f7b6426c48c5e35860ee960">mlx::core::distributed::detail::all_sum</a> (<a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &output)</td></tr>
|
||||
<tr class="separator:aa1d225b25f7b6426c48c5e35860ee960"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aeb5a1726358213bc75756506f7b54d04" id="r_aeb5a1726358213bc75756506f7b54d04"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#aeb5a1726358213bc75756506f7b54d04">mlx::core::distributed::detail::all_gather</a> (<a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &output)</td></tr>
|
||||
<tr class="separator:aeb5a1726358213bc75756506f7b54d04"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:abf33511660ac71df5fc92f2aad6c6e08" id="r_abf33511660ac71df5fc92f2aad6c6e08"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#abf33511660ac71df5fc92f2aad6c6e08">mlx::core::distributed::detail::send</a> (<a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, int dst)</td></tr>
|
||||
<tr class="memdesc:abf33511660ac71df5fc92f2aad6c6e08"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1distributed_1_1_send.html">Send</a> an array to the dst rank. <br /></td></tr>
|
||||
<tr class="separator:abf33511660ac71df5fc92f2aad6c6e08"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a003de04deb00ecbb19179b3f557df548" id="r_a003de04deb00ecbb19179b3f557df548"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a003de04deb00ecbb19179b3f557df548">mlx::core::distributed::detail::recv</a> (<a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, int src)</td></tr>
|
||||
<tr class="memdesc:a003de04deb00ecbb19179b3f557df548"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1distributed_1_1_recv.html">Recv</a> an array from the src rank. <br /></td></tr>
|
||||
<tr class="separator:a003de04deb00ecbb19179b3f557df548"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a042be875217168ccfc267fba19a627cb" id="r_a042be875217168ccfc267fba19a627cb"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a042be875217168ccfc267fba19a627cb">mlx::core::distributed::detail::all_sum</a> (<a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &output, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:a042be875217168ccfc267fba19a627cb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab3dc0367476257f13fe15d4db946edf5" id="r_ab3dc0367476257f13fe15d4db946edf5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#ab3dc0367476257f13fe15d4db946edf5">mlx::core::distributed::detail::all_gather</a> (<a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &output, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:ab3dc0367476257f13fe15d4db946edf5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a23c5cf992d4f2b2ce9dfa51593a4876d" id="r_a23c5cf992d4f2b2ce9dfa51593a4876d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a23c5cf992d4f2b2ce9dfa51593a4876d">mlx::core::distributed::detail::send</a> (<a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, const <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &input, int dst, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="memdesc:a23c5cf992d4f2b2ce9dfa51593a4876d"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1distributed_1_1_send.html">Send</a> an array to the dst rank. <br /></td></tr>
|
||||
<tr class="separator:a23c5cf992d4f2b2ce9dfa51593a4876d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a79bb934225482f2104e8ff270b0530c3" id="r_a79bb934225482f2104e8ff270b0530c3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a79bb934225482f2104e8ff270b0530c3">mlx::core::distributed::detail::recv</a> (<a class="el" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, <a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, int src, <a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="memdesc:a79bb934225482f2104e8ff270b0530c3"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classmlx_1_1core_1_1distributed_1_1_recv.html">Recv</a> an array from the src rank. <br /></td></tr>
|
||||
<tr class="separator:a79bb934225482f2104e8ff270b0530c3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
+4
-5
@@ -1,9 +1,8 @@
|
||||
var distributed__impl_8h =
|
||||
[
|
||||
[ "mlx::core::distributed::detail::GroupImpl", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html", "classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl" ],
|
||||
[ "mlx::core::distributed::detail::all_gather", "namespacemlx_1_1core_1_1distributed_1_1detail.html#aeb5a1726358213bc75756506f7b54d04", null ],
|
||||
[ "mlx::core::distributed::detail::all_sum", "namespacemlx_1_1core_1_1distributed_1_1detail.html#aa1d225b25f7b6426c48c5e35860ee960", null ],
|
||||
[ "mlx::core::distributed::detail::communication_stream", "namespacemlx_1_1core_1_1distributed_1_1detail.html#ac3612edf0e0e18c1e4ba0ce7c6e35cd6", null ],
|
||||
[ "mlx::core::distributed::detail::recv", "namespacemlx_1_1core_1_1distributed_1_1detail.html#a003de04deb00ecbb19179b3f557df548", null ],
|
||||
[ "mlx::core::distributed::detail::send", "namespacemlx_1_1core_1_1distributed_1_1detail.html#abf33511660ac71df5fc92f2aad6c6e08", null ]
|
||||
[ "mlx::core::distributed::detail::all_gather", "namespacemlx_1_1core_1_1distributed_1_1detail.html#ab3dc0367476257f13fe15d4db946edf5", null ],
|
||||
[ "mlx::core::distributed::detail::all_sum", "namespacemlx_1_1core_1_1distributed_1_1detail.html#a042be875217168ccfc267fba19a627cb", null ],
|
||||
[ "mlx::core::distributed::detail::recv", "namespacemlx_1_1core_1_1distributed_1_1detail.html#a79bb934225482f2104e8ff270b0530c3", null ],
|
||||
[ "mlx::core::distributed::detail::send", "namespacemlx_1_1core_1_1distributed_1_1detail.html#a23c5cf992d4f2b2ce9dfa51593a4876d", null ]
|
||||
];
|
||||
+21
-25
@@ -122,44 +122,40 @@ $(function(){initNavTree('distributed__impl_8h_source.html',''); initResizable(t
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ab1c8044b05f185c4bcc53002d4587599"> 17</a></span> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ab1c8044b05f185c4bcc53002d4587599">size</a>() = 0;</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a87800a23c8160933a2d77a55a959194d"> 18</a></span> <span class="keyword">virtual</span> std::shared_ptr<GroupImpl> <a class="code hl_function" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a87800a23c8160933a2d77a55a959194d">split</a>(<span class="keywordtype">int</span> color, <span class="keywordtype">int</span> key = -1) = 0;</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ae163a6f444c6cc8820288b20f294e483"> 20</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ae163a6f444c6cc8820288b20f294e483">all_sum</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& output) = 0;</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a04bb1df23abe5b1f3fa0126375c6cea4"> 21</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a04bb1df23abe5b1f3fa0126375c6cea4">all_gather</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& output) = 0;</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac8472eb2f96d1b14c7e4ccef56268ba0"> 22</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac8472eb2f96d1b14c7e4ccef56268ba0">send</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <span class="keywordtype">int</span> dst) = 0;</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac4af5fc16a82ba8c72df04d7694f8352"> 23</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac4af5fc16a82ba8c72df04d7694f8352">recv</a>(<a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, <span class="keywordtype">int</span> src) = 0;</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a23f620ec55d75f236d5371e05a52fd64"> 20</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a23f620ec55d75f236d5371e05a52fd64">all_sum</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& output, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) = 0;</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a65ae9485d2b1a2fd769744d50b0dd225"> 21</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a65ae9485d2b1a2fd769744d50b0dd225">all_gather</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& output, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) = 0;</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a74befcdc600669cb87761106ae0bd9a5"> 22</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a74befcdc600669cb87761106ae0bd9a5">send</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <span class="keywordtype">int</span> dst, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) = 0;</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a7ce5b7a19d0fb8e189986c84845c5898"> 23</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a7ce5b7a19d0fb8e189986c84845c5898">recv</a>(<a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, <span class="keywordtype">int</span> src, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) = 0;</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">/* Return the communication stream. */</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#ac3612edf0e0e18c1e4ba0ce7c6e35cd6"> 27</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> <a class="code hl_function" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#ac3612edf0e0e18c1e4ba0ce7c6e35cd6">communication_stream</a>();</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">/* Perform an all reduce sum operation */</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a042be875217168ccfc267fba19a627cb"> 27</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a042be875217168ccfc267fba19a627cb">all_sum</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& output, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream);</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">/* Perform an all reduce sum operation */</span></div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#aa1d225b25f7b6426c48c5e35860ee960"> 30</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#aa1d225b25f7b6426c48c5e35860ee960">all_sum</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& output);</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="comment">/* Perform an all gather operation */</span></div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#aeb5a1726358213bc75756506f7b54d04"> 33</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#aeb5a1726358213bc75756506f7b54d04">all_gather</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& output);</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">/* Perform an all gather operation */</span></div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#ab3dc0367476257f13fe15d4db946edf5"> 30</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#ab3dc0367476257f13fe15d4db946edf5">all_gather</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& output, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream);</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span></div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a23c5cf992d4f2b2ce9dfa51593a4876d"> 33</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a23c5cf992d4f2b2ce9dfa51593a4876d">send</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <span class="keywordtype">int</span> dst, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream);</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span></div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#abf33511660ac71df5fc92f2aad6c6e08"> 36</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#abf33511660ac71df5fc92f2aad6c6e08">send</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, <span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& input, <span class="keywordtype">int</span> dst);</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span></div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a003de04deb00ecbb19179b3f557df548"> 39</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a003de04deb00ecbb19179b3f557df548">recv</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, <span class="keywordtype">int</span> src);</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span>} <span class="comment">// namespace mlx::core::distributed::detail</span></div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a79bb934225482f2104e8ff270b0530c3"> 36</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a79bb934225482f2104e8ff270b0530c3">recv</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1distributed_1_1_group.html">Group</a> group, <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out, <span class="keywordtype">int</span> src, <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream);</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span>} <span class="comment">// namespace mlx::core::distributed::detail</span></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html">mlx::core::distributed::detail::GroupImpl</a></div><div class="ttdoc">Abstract base class of a distributed group implementation.</div><div class="ttdef"><b>Definition</b> distributed_impl.h:12</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_a04bb1df23abe5b1f3fa0126375c6cea4"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a04bb1df23abe5b1f3fa0126375c6cea4">mlx::core::distributed::detail::GroupImpl::all_gather</a></div><div class="ttdeci">virtual void all_gather(const array &input, array &output)=0</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_a23f620ec55d75f236d5371e05a52fd64"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a23f620ec55d75f236d5371e05a52fd64">mlx::core::distributed::detail::GroupImpl::all_sum</a></div><div class="ttdeci">virtual void all_sum(const array &input, array &output, Stream stream)=0</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_a65ae9485d2b1a2fd769744d50b0dd225"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a65ae9485d2b1a2fd769744d50b0dd225">mlx::core::distributed::detail::GroupImpl::all_gather</a></div><div class="ttdeci">virtual void all_gather(const array &input, array &output, Stream stream)=0</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_a74befcdc600669cb87761106ae0bd9a5"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a74befcdc600669cb87761106ae0bd9a5">mlx::core::distributed::detail::GroupImpl::send</a></div><div class="ttdeci">virtual void send(const array &input, int dst, Stream stream)=0</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_a7ce5b7a19d0fb8e189986c84845c5898"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a7ce5b7a19d0fb8e189986c84845c5898">mlx::core::distributed::detail::GroupImpl::recv</a></div><div class="ttdeci">virtual void recv(array &out, int src, Stream stream)=0</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_a83f119b87210f53438c5ba675a78065e"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a83f119b87210f53438c5ba675a78065e">mlx::core::distributed::detail::GroupImpl::~GroupImpl</a></div><div class="ttdeci">virtual ~GroupImpl()</div><div class="ttdef"><b>Definition</b> distributed_impl.h:14</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_a87800a23c8160933a2d77a55a959194d"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a87800a23c8160933a2d77a55a959194d">mlx::core::distributed::detail::GroupImpl::split</a></div><div class="ttdeci">virtual std::shared_ptr< GroupImpl > split(int color, int key=-1)=0</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_ab1c8044b05f185c4bcc53002d4587599"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ab1c8044b05f185c4bcc53002d4587599">mlx::core::distributed::detail::GroupImpl::size</a></div><div class="ttdeci">virtual int size()=0</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_ac4af5fc16a82ba8c72df04d7694f8352"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac4af5fc16a82ba8c72df04d7694f8352">mlx::core::distributed::detail::GroupImpl::recv</a></div><div class="ttdeci">virtual void recv(array &out, int src)=0</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_ac8472eb2f96d1b14c7e4ccef56268ba0"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac8472eb2f96d1b14c7e4ccef56268ba0">mlx::core::distributed::detail::GroupImpl::send</a></div><div class="ttdeci">virtual void send(const array &input, int dst)=0</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_ae0838a40ce58442cdc73d57d7969a702"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ae0838a40ce58442cdc73d57d7969a702">mlx::core::distributed::detail::GroupImpl::rank</a></div><div class="ttdeci">virtual int rank()=0</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl_html_ae163a6f444c6cc8820288b20f294e483"><div class="ttname"><a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ae163a6f444c6cc8820288b20f294e483">mlx::core::distributed::detail::GroupImpl::all_sum</a></div><div class="ttdeci">virtual void all_sum(const array &input, array &output)=0</div></div>
|
||||
<div class="ttc" id="adistributed_8h_html"><div class="ttname"><a href="distributed_8h.html">distributed.h</a></div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1distributed_1_1detail_html"><div class="ttname"><a href="namespacemlx_1_1core_1_1distributed_1_1detail.html">mlx::core::distributed::detail</a></div><div class="ttdef"><b>Definition</b> distributed.h:12</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1distributed_1_1detail_html_a003de04deb00ecbb19179b3f557df548"><div class="ttname"><a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a003de04deb00ecbb19179b3f557df548">mlx::core::distributed::detail::recv</a></div><div class="ttdeci">void recv(Group group, array &out, int src)</div><div class="ttdoc">Recv an array from the src rank.</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1distributed_1_1detail_html_aa1d225b25f7b6426c48c5e35860ee960"><div class="ttname"><a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#aa1d225b25f7b6426c48c5e35860ee960">mlx::core::distributed::detail::all_sum</a></div><div class="ttdeci">void all_sum(Group group, const array &input, array &output)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1distributed_1_1detail_html_abf33511660ac71df5fc92f2aad6c6e08"><div class="ttname"><a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#abf33511660ac71df5fc92f2aad6c6e08">mlx::core::distributed::detail::send</a></div><div class="ttdeci">void send(Group group, const array &input, int dst)</div><div class="ttdoc">Send an array to the dst rank.</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1distributed_1_1detail_html_ac3612edf0e0e18c1e4ba0ce7c6e35cd6"><div class="ttname"><a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#ac3612edf0e0e18c1e4ba0ce7c6e35cd6">mlx::core::distributed::detail::communication_stream</a></div><div class="ttdeci">Stream communication_stream()</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1distributed_1_1detail_html_aeb5a1726358213bc75756506f7b54d04"><div class="ttname"><a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#aeb5a1726358213bc75756506f7b54d04">mlx::core::distributed::detail::all_gather</a></div><div class="ttdeci">void all_gather(Group group, const array &input, array &output)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1distributed_1_1detail_html_a042be875217168ccfc267fba19a627cb"><div class="ttname"><a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a042be875217168ccfc267fba19a627cb">mlx::core::distributed::detail::all_sum</a></div><div class="ttdeci">void all_sum(Group group, const array &input, array &output, Stream stream)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1distributed_1_1detail_html_a23c5cf992d4f2b2ce9dfa51593a4876d"><div class="ttname"><a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a23c5cf992d4f2b2ce9dfa51593a4876d">mlx::core::distributed::detail::send</a></div><div class="ttdeci">void send(Group group, const array &input, int dst, Stream stream)</div><div class="ttdoc">Send an array to the dst rank.</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1distributed_1_1detail_html_a79bb934225482f2104e8ff270b0530c3"><div class="ttname"><a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a79bb934225482f2104e8ff270b0530c3">mlx::core::distributed::detail::recv</a></div><div class="ttdeci">void recv(Group group, array &out, int src, Stream stream)</div><div class="ttdoc">Recv an array from the src rank.</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1distributed_1_1detail_html_ab3dc0367476257f13fe15d4db946edf5"><div class="ttname"><a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#ab3dc0367476257f13fe15d4db946edf5">mlx::core::distributed::detail::all_gather</a></div><div class="ttdeci">void all_gather(Group group, const array &input, array &output, Stream stream)</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_stream_html"><div class="ttname"><a href="structmlx_1_1core_1_1_stream.html">mlx::core::Stream</a></div><div class="ttdef"><b>Definition</b> stream.h:9</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1distributed_1_1_group_html"><div class="ttname"><a href="structmlx_1_1core_1_1distributed_1_1_group.html">mlx::core::distributed::Group</a></div><div class="ttdoc">A distributed::Group represents a group of independent mlx processes that can communicate.</div><div class="ttdef"><b>Definition</b> distributed.h:24</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
|
||||
Vendored
+109
-95
@@ -46,16 +46,12 @@
|
||||
<a href="attn_2params_8h_source.html"/>
|
||||
<a href="attn_8h.html"/>
|
||||
<a href="attn_8h_source.html"/>
|
||||
<a href="backend_2common_2load_8h.html"/>
|
||||
<a href="backend_2common_2load_8h_source.html"/>
|
||||
<a href="backend_2common_2utils_8h.html"/>
|
||||
<a href="backend_2common_2utils_8h_source.html"/>
|
||||
<a href="backend_2metal_2allocator_8h.html"/>
|
||||
<a href="backend_2metal_2allocator_8h_source.html"/>
|
||||
<a href="backend_2metal_2device_8h.html"/>
|
||||
<a href="backend_2metal_2device_8h_source.html"/>
|
||||
<a href="backend_2metal_2event_8h.html"/>
|
||||
<a href="backend_2metal_2event_8h_source.html"/>
|
||||
<a href="backend_2metal_2kernels_2complex_8h.html"/>
|
||||
<a href="backend_2metal_2kernels_2complex_8h.html#a032a8d3eec2384c9f03066f7fd945995"/>
|
||||
<a href="backend_2metal_2kernels_2complex_8h.html#a226cfd54d49f02e35c5aab3139c7596b"/>
|
||||
@@ -988,14 +984,15 @@
|
||||
<a href="classmlx_1_1core_1_1_event.html"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#a05a9a3de88185b4a89e154242b4e770a"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#a0d077b11f4b28f882b42440b7ac6d40d"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#a13e4835f2ffb2cc22e29148a448ea184"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#a634afd918e6ed847f354531ba9f48252"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#a65a858445506a61be5889ae0e3651b89"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#a833506419b2110ad1abd89b2dd238b4d"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#a98f1f98d6cac43ddb682522acdce63d5"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#aa77afd9669e2ef9d5e9ae1c2c6fd24fa"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#ab514bd9e9c21d1fdd7c1460dc7d0ec7f"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#ab71c7baee3d1d02ad6a2001bbf90b970"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#af408d30df17c4771e9e2aa550cb6e921"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#ac58282a36a02aed7a5bd59b1602d11a8"/>
|
||||
<a href="classmlx_1_1core_1_1_event.html#acdc48fc71fcf3f8d128be029d63b7826"/>
|
||||
<a href="classmlx_1_1core_1_1_exp-members.html"/>
|
||||
<a href="classmlx_1_1core_1_1_exp.html"/>
|
||||
<a href="classmlx_1_1core_1_1_exp.html#a0fcd579fe148b4c3dbc72e514b81bb37"/>
|
||||
@@ -1043,11 +1040,10 @@
|
||||
<a href="classmlx_1_1core_1_1_f_f_t.html#ac32d6cc9b67289124f855ea68a61ede1"/>
|
||||
<a href="classmlx_1_1core_1_1_fence-members.html"/>
|
||||
<a href="classmlx_1_1core_1_1_fence.html"/>
|
||||
<a href="classmlx_1_1core_1_1_fence.html#a1ccbe354d043e6c4d76286c6635a38e2"/>
|
||||
<a href="classmlx_1_1core_1_1_fence.html#a3e3ed08eb6a1025b051b5a435f6f95f7"/>
|
||||
<a href="classmlx_1_1core_1_1_fence.html#a653279d4023d69751a930a91d3bf010a"/>
|
||||
<a href="classmlx_1_1core_1_1_fence.html#a6c5652aad6e93b06c72258bb8d9c19fc"/>
|
||||
<a href="classmlx_1_1core_1_1_fence.html#ab6d783dee02656ebb8ffcbbfa6de5b53"/>
|
||||
<a href="classmlx_1_1core_1_1_fence.html#a19438c60b5e9c6f64529c8f0329ead13"/>
|
||||
<a href="classmlx_1_1core_1_1_fence.html#a7cabe72d8b165344ff9f7118975b6214"/>
|
||||
<a href="classmlx_1_1core_1_1_fence.html#a9d9bc0b57f741577a34f8dfd3b1de8f2"/>
|
||||
<a href="classmlx_1_1core_1_1_fence.html#aeb09655b3ef4db12810defebdbbdac33"/>
|
||||
<a href="classmlx_1_1core_1_1_flatten-members.html"/>
|
||||
<a href="classmlx_1_1core_1_1_flatten.html"/>
|
||||
<a href="classmlx_1_1core_1_1_flatten.html#a244a03915313286d36ed4d36b01a99f2"/>
|
||||
@@ -1830,9 +1826,7 @@
|
||||
<a href="classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078a308bd3e5bf976888b120dd36d0c2d2ae"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078a6fc3d7595445dd877584495f47535268"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078ae8a9988458b0355001674020a45656fb"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a199726612fa8a4bcd5c2d05eadad7078af8a6f8eed2395ab89a758dec434393ae"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a1d06c76b0f3010a5c329d0e9e29e0597"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a2476f987ec7a5afb7665d3b3974db0b2"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a2820c45188071a22175e9fa42e10a49a"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a28cf1928f5ec2f972a94ff1c0e71187d"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a2913abcdf71826827c8457f529825fff"/>
|
||||
@@ -1840,7 +1834,6 @@
|
||||
<a href="classmlx_1_1core_1_1array.html#a2c186fd527f984f0589d4183b4976289"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a2f16c1ef8ee248d2fba95520c86dfad2"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a387b67cd3ef5cfc1e749c371766c4a05"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a38d7ad605f8282e5e49d0c09e0555c78"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a45b1c9763fe921fe5880ca28316ae98c"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a46642301da11e3eb4312c37349fbc9d7"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a4677a404b5d191af20b52649225de087"/>
|
||||
@@ -1863,6 +1856,7 @@
|
||||
<a href="classmlx_1_1core_1_1array.html#a75fac72da3ce214fa3737df92a64b232"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a76b258b169d7d73419ebbf85340fb914"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a790548666511d8c6d9f92ee79d2ce14c"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a797ae8a1708a7c67d62e6c55c321d802"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a84948c29df8c957904919c8602692bd2"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a8650a99a6b7549bc823b03ad92590ff7"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a87f170384f4fb93decf2b80ae7280f00"/>
|
||||
@@ -1874,6 +1868,7 @@
|
||||
<a href="classmlx_1_1core_1_1array.html#a92974c656c35a972ad241f80584bbd29"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a95e6b156c8e05439f076b85c05079387"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a99fb28eeab39b9f429373f8bd7557676"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#a9ff36a88bfd7c99a2662136ee9315f4e"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#aa5aceab15241e7826cbaf8b8a41440c1"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#ab3daf04c27c4593d9d73c397b8484a08"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#ab6cbccbba66cc54acda4390b19f0397c"/>
|
||||
@@ -1886,7 +1881,6 @@
|
||||
<a href="classmlx_1_1core_1_1array.html#acffb082177f9b78f0c52e406adff972f"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#ad2814dbffa5ad174d9c97a10bf4cf26b"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#ad3277ff68f1336aa217f9cbe40181479"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#ad41cc5e7aebfcad849ad15d697584cf8"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#adfa53f3f26bb0f942fb1c67ec8cd5380"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#ae29e7d6fbfbea1e5e321a8d1ea3cfacd"/>
|
||||
<a href="classmlx_1_1core_1_1array.html#aebed1f37c19197be76105161102a8a40"/>
|
||||
@@ -1940,14 +1934,14 @@
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1_send.html#af2620837bfc1b97217d006ed6e374051"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl-members.html"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a04bb1df23abe5b1f3fa0126375c6cea4"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a23f620ec55d75f236d5371e05a52fd64"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a65ae9485d2b1a2fd769744d50b0dd225"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a74befcdc600669cb87761106ae0bd9a5"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a7ce5b7a19d0fb8e189986c84845c5898"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a83f119b87210f53438c5ba675a78065e"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#a87800a23c8160933a2d77a55a959194d"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ab1c8044b05f185c4bcc53002d4587599"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac4af5fc16a82ba8c72df04d7694f8352"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ac8472eb2f96d1b14c7e4ccef56268ba0"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ae0838a40ce58442cdc73d57d7969a702"/>
|
||||
<a href="classmlx_1_1core_1_1distributed_1_1detail_1_1_group_impl.html#ae163a6f444c6cc8820288b20f294e483"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_affine_quantize-members.html"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_affine_quantize.html#a3b5d628628d245b38911118d4a0ff9fd"/>
|
||||
@@ -2009,10 +2003,10 @@
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_ro_p_e.html#ad999105414badd66c8fd9e069454a533"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention-members.html"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#a09c99b460cca606b2ebb22f90b3d13a2"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#a505f38ba93a3499895f5312e0112e73d"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#a64d2ce4b46b529a6a9ef068947bc623e"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#a6cc2092fa5b8e7585921b8e0f3ec3db7"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#ab3f78d30e5bb3e76cfe701f2358e4748"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#ad51666e69f670e286293aff96eb435a9"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#ae20851e002f7fcb6d4f97817596f6328"/>
|
||||
<a href="classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html#af08b1294f3f93505a96fdfa85b1edd62"/>
|
||||
@@ -2365,10 +2359,14 @@
|
||||
<a href="dtype_8h_source.html"/>
|
||||
<a href="einsum_8h.html"/>
|
||||
<a href="einsum_8h_source.html"/>
|
||||
<a href="encoder_8h.html"/>
|
||||
<a href="encoder_8h_source.html"/>
|
||||
<a href="erf_8h.html"/>
|
||||
<a href="erf_8h.html#a1846e0d683c7aff826bb32addcc3b885"/>
|
||||
<a href="erf_8h.html#a6ce199ee56105c67adbf8c48c019a8b2"/>
|
||||
<a href="erf_8h_source.html"/>
|
||||
<a href="eval_8h.html"/>
|
||||
<a href="eval_8h_source.html"/>
|
||||
<a href="event_8h.html"/>
|
||||
<a href="event_8h_source.html"/>
|
||||
<a href="expm1f_8h.html"/>
|
||||
@@ -2873,9 +2871,6 @@
|
||||
<a href="integral__constant_8h.html"/>
|
||||
<a href="integral__constant_8h.html#ab28d2705f6fd4f54faccbb78fd5ddfb6"/>
|
||||
<a href="integral__constant_8h_source.html"/>
|
||||
<a href="io_2load_8h.html"/>
|
||||
<a href="io_2load_8h.html#a36fa9b2e726512bc17a7a6d3e39002be"/>
|
||||
<a href="io_2load_8h_source.html"/>
|
||||
<a href="io_8h.html"/>
|
||||
<a href="io_8h_source.html"/>
|
||||
<a href="jit_2indexing_8h.html"/>
|
||||
@@ -2913,6 +2908,9 @@
|
||||
<a href="limits_8h_source.html"/>
|
||||
<a href="linalg_8h.html"/>
|
||||
<a href="linalg_8h_source.html"/>
|
||||
<a href="load_8h.html"/>
|
||||
<a href="load_8h.html#a36fa9b2e726512bc17a7a6d3e39002be"/>
|
||||
<a href="load_8h_source.html"/>
|
||||
<a href="loader__channel__l_8h.html"/>
|
||||
<a href="loader__channel__l_8h_source.html"/>
|
||||
<a href="loader__channel__n_8h.html"/>
|
||||
@@ -3262,6 +3260,7 @@
|
||||
<a href="namespacemlx_1_1core.html#a012130a0458cbc30b88365e0e0eab232"/>
|
||||
<a href="namespacemlx_1_1core.html#a0175beb3de139faa08479a88215b35ea"/>
|
||||
<a href="namespacemlx_1_1core.html#a017b52ecf30b33da4aa8da35ccc43220"/>
|
||||
<a href="namespacemlx_1_1core.html#a017bd8bd743e26f1ff971c8749b55daf"/>
|
||||
<a href="namespacemlx_1_1core.html#a0196171cfe6ee2953113abce597dc815"/>
|
||||
<a href="namespacemlx_1_1core.html#a019df48807b506d9995856684bf7797a"/>
|
||||
<a href="namespacemlx_1_1core.html#a01b0d64a75dfa2e95d6c7b5c53d708af"/>
|
||||
@@ -3276,11 +3275,11 @@
|
||||
<a href="namespacemlx_1_1core.html#a050299d0d366ca5c9d09d1004dcc3e7d"/>
|
||||
<a href="namespacemlx_1_1core.html#a058878237ce50baa4c909d8d15448d7e"/>
|
||||
<a href="namespacemlx_1_1core.html#a05a220cff45f12439fde775983c6df78"/>
|
||||
<a href="namespacemlx_1_1core.html#a0640d1f5bcd9a4f5cdaea9f197a53515"/>
|
||||
<a href="namespacemlx_1_1core.html#a064318b7a16e5cb6d0a6407501b5c7dc"/>
|
||||
<a href="namespacemlx_1_1core.html#a067d47823a322b88043cce7ce4a3ec78"/>
|
||||
<a href="namespacemlx_1_1core.html#a069c0aab6b36aef34419534ec4a4310d"/>
|
||||
<a href="namespacemlx_1_1core.html#a074d000f25ae3ed77450e6a5fec4b38b"/>
|
||||
<a href="namespacemlx_1_1core.html#a078859db0d66ff77f97af6dc9764e8eb"/>
|
||||
<a href="namespacemlx_1_1core.html#a084558b6a5487549799c49c37c9e9652"/>
|
||||
<a href="namespacemlx_1_1core.html#a085eb092f4ada47f8169de62886cff90"/>
|
||||
<a href="namespacemlx_1_1core.html#a0908a61ab261aff726922b33fa6ed159"/>
|
||||
@@ -3297,6 +3296,7 @@
|
||||
<a href="namespacemlx_1_1core.html#a0d42d6c1d5f77a96e2f296b8ebd79ee6"/>
|
||||
<a href="namespacemlx_1_1core.html#a0dd3893abc8986901872c8365ab1509d"/>
|
||||
<a href="namespacemlx_1_1core.html#a0f0f59d3ffe2d16a684e5fc093302e15"/>
|
||||
<a href="namespacemlx_1_1core.html#a0f3ff0f676d28840c210ef6277caa546"/>
|
||||
<a href="namespacemlx_1_1core.html#a0fdadf87edd8a0a57c63953fb0ebe053"/>
|
||||
<a href="namespacemlx_1_1core.html#a0fefc3ae4f1350ebe05ec6098fd6bae3"/>
|
||||
<a href="namespacemlx_1_1core.html#a113d2bac7e4aa6a4cb4a5c3242527b82"/>
|
||||
@@ -3330,6 +3330,7 @@
|
||||
<a href="namespacemlx_1_1core.html#a1c482bb3d9f9d4c62dee5865892c1f96"/>
|
||||
<a href="namespacemlx_1_1core.html#a1cc130b06d9cdd03dddc74a3b1db0167"/>
|
||||
<a href="namespacemlx_1_1core.html#a1d4cffc3c78067b3d9a62d64f3fb686f"/>
|
||||
<a href="namespacemlx_1_1core.html#a1e4381d42877a5c6050c20e77d13c990"/>
|
||||
<a href="namespacemlx_1_1core.html#a1e4cb758ccfe5c267baed9aeb0044834"/>
|
||||
<a href="namespacemlx_1_1core.html#a1e5c30e316afa30c14bc48b92afdb794"/>
|
||||
<a href="namespacemlx_1_1core.html#a1f42e3dd4787d2ecec7114a12daefec8"/>
|
||||
@@ -3349,17 +3350,14 @@
|
||||
<a href="namespacemlx_1_1core.html#a265a37b8ee4a97390213e9ec49693e66"/>
|
||||
<a href="namespacemlx_1_1core.html#a2689b8f1181648cb1685204fea9f3066"/>
|
||||
<a href="namespacemlx_1_1core.html#a26a721b8111fce3a1dec9bf724034cd4"/>
|
||||
<a href="namespacemlx_1_1core.html#a27f00519f9756896734fd4d47fec0625"/>
|
||||
<a href="namespacemlx_1_1core.html#a27fe23230cd082c0363b9451b731ce6b"/>
|
||||
<a href="namespacemlx_1_1core.html#a2822d2a4d346c826d3cfebbcf89c3057"/>
|
||||
<a href="namespacemlx_1_1core.html#a2874ba55b73057b76c23a7429fdd2d6e"/>
|
||||
<a href="namespacemlx_1_1core.html#a28d6c2f89e73b7b874dd1f67f853a96f"/>
|
||||
<a href="namespacemlx_1_1core.html#a29cbacf4b399c24728fb0808fad498f9"/>
|
||||
<a href="namespacemlx_1_1core.html#a29e457a170b6cefb6ba1e394c96c6f7b"/>
|
||||
<a href="namespacemlx_1_1core.html#a2a8a09851097571fb51ac5b608550e44"/>
|
||||
<a href="namespacemlx_1_1core.html#a2a9b98c65578dd3720b3b375c1471e58"/>
|
||||
<a href="namespacemlx_1_1core.html#a2aa12b351ce559deb14cda0a5292c2ce"/>
|
||||
<a href="namespacemlx_1_1core.html#a2aca3458c56605a74d07ec39876549bc"/>
|
||||
<a href="namespacemlx_1_1core.html#a2afa4ea816ac9317200fd5c964fc89dc"/>
|
||||
<a href="namespacemlx_1_1core.html#a2b78f270942c6eb185e8045f1c5b4286"/>
|
||||
<a href="namespacemlx_1_1core.html#a2bb28a9a0894a73ae1b27e7f4da0841a"/>
|
||||
@@ -3384,17 +3382,16 @@
|
||||
<a href="namespacemlx_1_1core.html#a349a9fc2bfd950f679a3fe39b8bdedad"/>
|
||||
<a href="namespacemlx_1_1core.html#a34d69c4d46aa9b2a4a79dba7aba093d2"/>
|
||||
<a href="namespacemlx_1_1core.html#a3555a2b31fc0925850d3240e85e03ec5"/>
|
||||
<a href="namespacemlx_1_1core.html#a357f4172305d2021bde8cf07d99adb7d"/>
|
||||
<a href="namespacemlx_1_1core.html#a358e66ff205bda3e8542427b6d2edadc"/>
|
||||
<a href="namespacemlx_1_1core.html#a359c6257097a304c00d41d64296ef4c9"/>
|
||||
<a href="namespacemlx_1_1core.html#a35a412f688d79eb47e42d20a7c8650ee"/>
|
||||
<a href="namespacemlx_1_1core.html#a369aa886219b83cf219e7a7862ce260b"/>
|
||||
<a href="namespacemlx_1_1core.html#a3728ed9b6cbd152bf675251a0501b466"/>
|
||||
<a href="namespacemlx_1_1core.html#a3755925b24a903045937464be117de2f"/>
|
||||
<a href="namespacemlx_1_1core.html#a37645c0adccb3eb46844115def1a68d7"/>
|
||||
<a href="namespacemlx_1_1core.html#a377ccc6b4ef36767abca102dca56dc10"/>
|
||||
<a href="namespacemlx_1_1core.html#a3803f8d36558d32bb7dd6e580ea683b4"/>
|
||||
<a href="namespacemlx_1_1core.html#a383a26cc2689c98fd6c4435ade8dc669"/>
|
||||
<a href="namespacemlx_1_1core.html#a3892b68a2e828270caa1c7accf44f038"/>
|
||||
<a href="namespacemlx_1_1core.html#a38a44c412c8be4c8b952d3082cc7db74"/>
|
||||
<a href="namespacemlx_1_1core.html#a394797646010ba9ef2a1f9b9a4b8ddd9"/>
|
||||
<a href="namespacemlx_1_1core.html#a3a52675c3d4552b319dd9707844abdec"/>
|
||||
@@ -3427,9 +3424,9 @@
|
||||
<a href="namespacemlx_1_1core.html#a473fb602368f6c73d9105c9a151c4c82"/>
|
||||
<a href="namespacemlx_1_1core.html#a474bf5eb8bca8c380207c9f659aef3b1"/>
|
||||
<a href="namespacemlx_1_1core.html#a477cade78296bc85894170f62db68870"/>
|
||||
<a href="namespacemlx_1_1core.html#a479648542a2bea151b947b18f0e79dd2"/>
|
||||
<a href="namespacemlx_1_1core.html#a47c82778e43032c0bbf5d59407e81dc9"/>
|
||||
<a href="namespacemlx_1_1core.html#a489e45b3a5cd8b46e8ea56b9132eb230"/>
|
||||
<a href="namespacemlx_1_1core.html#a48fbbd43d2165ab7f42bac3f228bbda3"/>
|
||||
<a href="namespacemlx_1_1core.html#a49421ea65b5a98df080d75b1636b2157"/>
|
||||
<a href="namespacemlx_1_1core.html#a49445a55f976c4397f25ea18e1e92bef"/>
|
||||
<a href="namespacemlx_1_1core.html#a49fc043a981925b9be79e37fc415d966"/>
|
||||
@@ -3448,12 +3445,14 @@
|
||||
<a href="namespacemlx_1_1core.html#a4f5d80d03bae6d8d90455d3c47a8c116"/>
|
||||
<a href="namespacemlx_1_1core.html#a4fbb29691ee1ff22c3ee2a67cbc053d5"/>
|
||||
<a href="namespacemlx_1_1core.html#a50214cf406957fab27c8bef32046f030"/>
|
||||
<a href="namespacemlx_1_1core.html#a50536365b8bcfec55e7d023ae9a6395c"/>
|
||||
<a href="namespacemlx_1_1core.html#a505922e54acd43114308e3bdbda0e497"/>
|
||||
<a href="namespacemlx_1_1core.html#a50bae338a7353f8b0ed3441071bb0cf6"/>
|
||||
<a href="namespacemlx_1_1core.html#a50f4177d3ca03a95fc2614e100c7391d"/>
|
||||
<a href="namespacemlx_1_1core.html#a50f6a94bb36d89cf28817aff88ab89c8"/>
|
||||
<a href="namespacemlx_1_1core.html#a514263e63f6825b490203ca586864687"/>
|
||||
<a href="namespacemlx_1_1core.html#a514cf8b4e6f0a6af3a867e752f4338f7"/>
|
||||
<a href="namespacemlx_1_1core.html#a5160ef5819f58cf040c9613ecce548f1"/>
|
||||
<a href="namespacemlx_1_1core.html#a517019d42d4e426b7b98e1c719bb47ce"/>
|
||||
<a href="namespacemlx_1_1core.html#a5287610200ff573730c9c92413f48881"/>
|
||||
<a href="namespacemlx_1_1core.html#a546e3d3c8957fbf2758f9504f4a2d0b6"/>
|
||||
@@ -3512,7 +3511,6 @@
|
||||
<a href="namespacemlx_1_1core.html#a6652d93bfb2d426e261a1712a181a4d2"/>
|
||||
<a href="namespacemlx_1_1core.html#a667e95146dd5199e67bcb121b984b1f0"/>
|
||||
<a href="namespacemlx_1_1core.html#a668fde2bd280a88f63a68b68a343d375"/>
|
||||
<a href="namespacemlx_1_1core.html#a66c9ee5018168b9101de52e0122d9755"/>
|
||||
<a href="namespacemlx_1_1core.html#a676a40637a563f013c725d24fa33fdc8"/>
|
||||
<a href="namespacemlx_1_1core.html#a6783cfc7dbe1a116ba84a3904a37145f"/>
|
||||
<a href="namespacemlx_1_1core.html#a685c0530e338aabc622325685846ce93"/>
|
||||
@@ -3520,16 +3518,13 @@
|
||||
<a href="namespacemlx_1_1core.html#a6894543b340321193dfb8052c438a319"/>
|
||||
<a href="namespacemlx_1_1core.html#a692ce931b660415e17f92d18a8e0d446"/>
|
||||
<a href="namespacemlx_1_1core.html#a694e23f2d59606643728ad443d621416"/>
|
||||
<a href="namespacemlx_1_1core.html#a6a52856325c2eb031d3983eba2108d59"/>
|
||||
<a href="namespacemlx_1_1core.html#a6a6f4e46c8fc44fdc74c50ace02bcf38"/>
|
||||
<a href="namespacemlx_1_1core.html#a6a8e093b24c4c789b7cd160f7e7f7de9"/>
|
||||
<a href="namespacemlx_1_1core.html#a6b678bea8fdcda1f11c6691b56a15211"/>
|
||||
<a href="namespacemlx_1_1core.html#a6c8fdd03ef891d7f47804bf02e9a8507"/>
|
||||
<a href="namespacemlx_1_1core.html#a6c1b92aea938457e44f93a7955d22823"/>
|
||||
<a href="namespacemlx_1_1core.html#a6cfe9b03e7c5f1eb9374208a552c3cc9"/>
|
||||
<a href="namespacemlx_1_1core.html#a6d452306f0f046a7d021bd94f8713a89"/>
|
||||
<a href="namespacemlx_1_1core.html#a6d565dd93c46259f9486d9fdf0969589"/>
|
||||
<a href="namespacemlx_1_1core.html#a6ec5cdf3253a9f20ca5ea7a1590fb386"/>
|
||||
<a href="namespacemlx_1_1core.html#a6f4528d0d338ea5e1f19d345875c26a2"/>
|
||||
<a href="namespacemlx_1_1core.html#a6f65d8fd0cdddc96fc01f6af95804873"/>
|
||||
<a href="namespacemlx_1_1core.html#a6f7c63a9be10337b3b96d527e1db3c2f"/>
|
||||
<a href="namespacemlx_1_1core.html#a6fa13b9359cf3f575fbda5260e6e035d"/>
|
||||
@@ -3549,7 +3544,6 @@
|
||||
<a href="namespacemlx_1_1core.html#a759191fb984e7737f0ef529c2053ad73"/>
|
||||
<a href="namespacemlx_1_1core.html#a7620f1ae298127cb6181db9162f012a7"/>
|
||||
<a href="namespacemlx_1_1core.html#a766157c5d5d00fdf3da95eb7cb2981b9"/>
|
||||
<a href="namespacemlx_1_1core.html#a76a2cb4634f5fd6970a8c3b3753d7a4a"/>
|
||||
<a href="namespacemlx_1_1core.html#a76a2e310857f60f5ea6f1388d45b964d"/>
|
||||
<a href="namespacemlx_1_1core.html#a76dcd1fa3c68b386bc1d1d899a68a120"/>
|
||||
<a href="namespacemlx_1_1core.html#a76f614e9956a6ca05a9be4db5a483446"/>
|
||||
@@ -3565,7 +3559,6 @@
|
||||
<a href="namespacemlx_1_1core.html#a7b987f404b8699de00f9e0099ab6b1b0"/>
|
||||
<a href="namespacemlx_1_1core.html#a7bae3ff296d9a60ff3c7e448f7fbc6bd"/>
|
||||
<a href="namespacemlx_1_1core.html#a7c7dd6d346e0cdf398a896f2c6958258"/>
|
||||
<a href="namespacemlx_1_1core.html#a7ca09ebf776fe32db580f9038587ec31"/>
|
||||
<a href="namespacemlx_1_1core.html#a7ccc479be236f2bf3f7725729c5ba201"/>
|
||||
<a href="namespacemlx_1_1core.html#a7d11b000895d44d183260634f4192d92"/>
|
||||
<a href="namespacemlx_1_1core.html#a7d6e097d8effed52f4713672e471f299"/>
|
||||
@@ -3582,7 +3575,6 @@
|
||||
<a href="namespacemlx_1_1core.html#a81e1c727c3fc48910b030cb65a9e7afa"/>
|
||||
<a href="namespacemlx_1_1core.html#a827167f6a1ae55428fd218ddd51ec3b6"/>
|
||||
<a href="namespacemlx_1_1core.html#a830324cd1b6231218b3e561e247e69b9"/>
|
||||
<a href="namespacemlx_1_1core.html#a830a47d8a317dffb0c88e5a7afe6aee2"/>
|
||||
<a href="namespacemlx_1_1core.html#a839f94dbad44f0d37333006fc876b42e"/>
|
||||
<a href="namespacemlx_1_1core.html#a8481a3bb4c12c2b7dc6ba576c2be3d0d"/>
|
||||
<a href="namespacemlx_1_1core.html#a8494764f5c686743ede66dc76d85d955"/>
|
||||
@@ -3613,6 +3605,7 @@
|
||||
<a href="namespacemlx_1_1core.html#a8d3ca5fbaecdb995660c24cde5aeebaf"/>
|
||||
<a href="namespacemlx_1_1core.html#a8d48dbd49cccff07777affb2a412058c"/>
|
||||
<a href="namespacemlx_1_1core.html#a8e1d21375ae4b89b3cbea3a46d262abd"/>
|
||||
<a href="namespacemlx_1_1core.html#a8ed5ff0d69f6c7d2e092fe811e40d564"/>
|
||||
<a href="namespacemlx_1_1core.html#a9019bdc191054ada0a502c7c34cef5b8"/>
|
||||
<a href="namespacemlx_1_1core.html#a90c24e0d0b99b68fad9deefcf4d3e818"/>
|
||||
<a href="namespacemlx_1_1core.html#a9119e518234df7923cae2b3802d59bf2"/>
|
||||
@@ -3622,11 +3615,11 @@
|
||||
<a href="namespacemlx_1_1core.html#a92eca79fce8233e4299343eee3996511"/>
|
||||
<a href="namespacemlx_1_1core.html#a937503d72b66c661bf3f5fdcd98ef97c"/>
|
||||
<a href="namespacemlx_1_1core.html#a93a8ac59c644b801ec8881a58368caf2"/>
|
||||
<a href="namespacemlx_1_1core.html#a940f998c7469d14f5234f78dcaecd48b"/>
|
||||
<a href="namespacemlx_1_1core.html#a948ce3dfc4520d3aa98b33e42f617c64"/>
|
||||
<a href="namespacemlx_1_1core.html#a94c1057929b390e5613304afa16dfbda"/>
|
||||
<a href="namespacemlx_1_1core.html#a94d00a1b7f8a4717ab3f26f45e4da655"/>
|
||||
<a href="namespacemlx_1_1core.html#a94e7b51185590492b46916685641276f"/>
|
||||
<a href="namespacemlx_1_1core.html#a954de19249da7c1fa39b89bdc47368aa"/>
|
||||
<a href="namespacemlx_1_1core.html#a95a7757e8d18fced38acfc6a3e8d686a"/>
|
||||
<a href="namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58"/>
|
||||
<a href="namespacemlx_1_1core.html#a95fd207028f125eefbafe9e0522407fe"/>
|
||||
@@ -3638,21 +3631,21 @@
|
||||
<a href="namespacemlx_1_1core.html#a977c7c84de79ad67055ae2a89b7f6869"/>
|
||||
<a href="namespacemlx_1_1core.html#a97cb7d3eac404a442e84656cefe7cfb4"/>
|
||||
<a href="namespacemlx_1_1core.html#a97efcd96d6be666e5608034ae77289ef"/>
|
||||
<a href="namespacemlx_1_1core.html#a98495894a796b2cc6d022e7a03432c64"/>
|
||||
<a href="namespacemlx_1_1core.html#a985c60929757190e0b4ec51f57c767d0"/>
|
||||
<a href="namespacemlx_1_1core.html#a987d631e1508e8df55d98ddd57e4d086"/>
|
||||
<a href="namespacemlx_1_1core.html#a999be930e8a5b35eb33d934eefd548e8"/>
|
||||
<a href="namespacemlx_1_1core.html#a9a5ae769f67f886d59c8e292a8218550"/>
|
||||
<a href="namespacemlx_1_1core.html#a9abcc6efafd9ab5df1293b1793a734d2"/>
|
||||
<a href="namespacemlx_1_1core.html#a9af588b2e7f4e5249cd8b7722ad829c0"/>
|
||||
<a href="namespacemlx_1_1core.html#a9b33065059fd68fed26da94603cfcce3"/>
|
||||
<a href="namespacemlx_1_1core.html#a9c1c1fdf9a0840a16a4d10a8f74f761d"/>
|
||||
<a href="namespacemlx_1_1core.html#a9ca27fd1e512c8ed126342e565da12ae"/>
|
||||
<a href="namespacemlx_1_1core.html#a9dcc3018702ee31c21c8652bdc2182b1"/>
|
||||
<a href="namespacemlx_1_1core.html#a9edfe65f3c6da583c7b109290ec94b22"/>
|
||||
<a href="namespacemlx_1_1core.html#a9ee95f97bbd69262d99d7bea3bf77631"/>
|
||||
<a href="namespacemlx_1_1core.html#a9f158db20c2405557f3ebc397e876de8"/>
|
||||
<a href="namespacemlx_1_1core.html#a9f22a9ed98104aaffb929381055b966d"/>
|
||||
<a href="namespacemlx_1_1core.html#a9f2c9d2f21fbf9fbbacd940c6967c9d1"/>
|
||||
<a href="namespacemlx_1_1core.html#a9f81f5ea8909db9660197217612ee446"/>
|
||||
<a href="namespacemlx_1_1core.html#a9fac4b96a3d783c6392ebc08c81ebdbd"/>
|
||||
<a href="namespacemlx_1_1core.html#a9fcb3711b150cb65c7778a35c51284b2"/>
|
||||
<a href="namespacemlx_1_1core.html#a9fcb662b1561e4136bac0106cfb63b6c"/>
|
||||
<a href="namespacemlx_1_1core.html#aa0332c64ee9965f05026c30a0b778000"/>
|
||||
<a href="namespacemlx_1_1core.html#aa24713cb9e39bacb516c992eb03d2b2b"/>
|
||||
@@ -3661,9 +3654,9 @@
|
||||
<a href="namespacemlx_1_1core.html#aa56a8bda08be9ef3711496e216a75c95"/>
|
||||
<a href="namespacemlx_1_1core.html#aa5b0f7f13a941e1f41c411194e9033c7"/>
|
||||
<a href="namespacemlx_1_1core.html#aa63e62b6d3906e4cac871d498515a1cd"/>
|
||||
<a href="namespacemlx_1_1core.html#aa6b3dfc27a21d26b3fda96022aa60e32"/>
|
||||
<a href="namespacemlx_1_1core.html#aa9692de582995fd3ce19493b45ab7144"/>
|
||||
<a href="namespacemlx_1_1core.html#aaa22230a66b15c3e774d8ce45783a746"/>
|
||||
<a href="namespacemlx_1_1core.html#aaacf0afe13d77a5c49ce96f1e833eb2d"/>
|
||||
<a href="namespacemlx_1_1core.html#aaaf591cb2188381e6cbd857132d04eb7"/>
|
||||
<a href="namespacemlx_1_1core.html#aab26a3284dd3ac7d47c8b5b3a3290ce3"/>
|
||||
<a href="namespacemlx_1_1core.html#aab9d96b0a168f4d05146000a6212b5d8"/>
|
||||
@@ -3683,6 +3676,7 @@
|
||||
<a href="namespacemlx_1_1core.html#ab1f260710251256ef737dd59be9e143c"/>
|
||||
<a href="namespacemlx_1_1core.html#ab25e5d211e2c8785b45c3a81a6282e2b"/>
|
||||
<a href="namespacemlx_1_1core.html#ab2b50a44a9d3a06282be4611f5fc7447"/>
|
||||
<a href="namespacemlx_1_1core.html#ab30708325761c91e7dde245827e9dd91"/>
|
||||
<a href="namespacemlx_1_1core.html#ab38f7a0d3c0809071ff5d3af859018d6"/>
|
||||
<a href="namespacemlx_1_1core.html#ab436b8c08be2be32ef61bd72f7df63cd"/>
|
||||
<a href="namespacemlx_1_1core.html#ab48feddc1aa304383e5493923506ad7a"/>
|
||||
@@ -3695,7 +3689,7 @@
|
||||
<a href="namespacemlx_1_1core.html#ab79d66ddf1ec38b2f2c01234892a2230"/>
|
||||
<a href="namespacemlx_1_1core.html#ab81ad16e3be591dfc9e42ac3c19b055f"/>
|
||||
<a href="namespacemlx_1_1core.html#ab8a0a3f70664049b35ce1887bd8ff5c2"/>
|
||||
<a href="namespacemlx_1_1core.html#ab8c3c4fc05745f586de922c8266f4fce"/>
|
||||
<a href="namespacemlx_1_1core.html#ab9812785763451ceb86486032d614048"/>
|
||||
<a href="namespacemlx_1_1core.html#ab9d0f9910070231695d61de08cadb930"/>
|
||||
<a href="namespacemlx_1_1core.html#aba2b4accc059f30d4dca88db9f7a6e13"/>
|
||||
<a href="namespacemlx_1_1core.html#abada9bfa834d7423959362386720f3db"/>
|
||||
@@ -3726,7 +3720,6 @@
|
||||
<a href="namespacemlx_1_1core.html#ac18be72269b1bcfb0249cc00a0600681"/>
|
||||
<a href="namespacemlx_1_1core.html#ac198b7e282957c724c84a435e8f1215e"/>
|
||||
<a href="namespacemlx_1_1core.html#ac1afa5d4c856e4b58109eff086e70ffd"/>
|
||||
<a href="namespacemlx_1_1core.html#ac1c085e305954247d042f5d8803cd85b"/>
|
||||
<a href="namespacemlx_1_1core.html#ac2217bf760038cd011781158923149ed"/>
|
||||
<a href="namespacemlx_1_1core.html#ac25a05679f312b724c406d8b282803c9"/>
|
||||
<a href="namespacemlx_1_1core.html#ac2b8997537c7f25dd2b244d4c0a865a1"/>
|
||||
@@ -3765,6 +3758,7 @@
|
||||
<a href="namespacemlx_1_1core.html#ad04f1ccd2cd7c487a2f2aaa055939f64"/>
|
||||
<a href="namespacemlx_1_1core.html#ad05311ca8e2f19ffe5849e963837cec7"/>
|
||||
<a href="namespacemlx_1_1core.html#ad1014a836e7ce9301de8588eef1e89ee"/>
|
||||
<a href="namespacemlx_1_1core.html#ad1229ffbba21bdb81f63482a4651bc5a"/>
|
||||
<a href="namespacemlx_1_1core.html#ad1f96f0a02024f347b4c4431629407fc"/>
|
||||
<a href="namespacemlx_1_1core.html#ad25880c67bbcbfafbe54dc16418bf736"/>
|
||||
<a href="namespacemlx_1_1core.html#ad2f9e1c230ec35d5c406dd616e8f4dea"/>
|
||||
@@ -3807,15 +3801,15 @@
|
||||
<a href="namespacemlx_1_1core.html#ae0470605dc819efeb6510183619f0299"/>
|
||||
<a href="namespacemlx_1_1core.html#ae0540f16c4e7bd55d0e86a88495e4967"/>
|
||||
<a href="namespacemlx_1_1core.html#ae065fe5c42c1a333d7858d19f6434fa9"/>
|
||||
<a href="namespacemlx_1_1core.html#ae0c47c0bd95bb8c44339159e04c0f604"/>
|
||||
<a href="namespacemlx_1_1core.html#ae159e1f9193c12eff9a56dfceb1502ef"/>
|
||||
<a href="namespacemlx_1_1core.html#ae1b6e5cfd27b1526285648686898e011"/>
|
||||
<a href="namespacemlx_1_1core.html#ae1e41ca94022e43a00cdfc5845102daa"/>
|
||||
<a href="namespacemlx_1_1core.html#ae20f207ad1ed3badc17cecf08f118b5e"/>
|
||||
<a href="namespacemlx_1_1core.html#ae24c337810c841ff23e327efde7045e1"/>
|
||||
<a href="namespacemlx_1_1core.html#ae25e0c01b46612f039313a4825ba6428"/>
|
||||
<a href="namespacemlx_1_1core.html#ae2a0bcdc171d7e9745d33e1d9aac4f8a"/>
|
||||
<a href="namespacemlx_1_1core.html#ae36badb78a17cd7d13663a69645fc328"/>
|
||||
<a href="namespacemlx_1_1core.html#ae36ea40b8477bfa12d41aae8245225c9"/>
|
||||
<a href="namespacemlx_1_1core.html#ae374861abd45cf019c3e6be2026f3798"/>
|
||||
<a href="namespacemlx_1_1core.html#ae3e1e8b7a5410e0edf35f31f74295e2f"/>
|
||||
<a href="namespacemlx_1_1core.html#ae4690f349b2483f5d1a4b75aba67399f"/>
|
||||
<a href="namespacemlx_1_1core.html#ae736defc89a04fbaf7627ad2695bb838"/>
|
||||
@@ -3823,18 +3817,19 @@
|
||||
<a href="namespacemlx_1_1core.html#ae789dbda2a0f4e21aa0984f6a5dc986c"/>
|
||||
<a href="namespacemlx_1_1core.html#ae7a0f810e546a166c7d05849b5d41f30"/>
|
||||
<a href="namespacemlx_1_1core.html#ae83df12368cb07ccb1c10c1117ff3922"/>
|
||||
<a href="namespacemlx_1_1core.html#ae85bafda5ab0b4b2289591260cf07685"/>
|
||||
<a href="namespacemlx_1_1core.html#ae877e1d5e3cf57734da8b49535fe3fb3"/>
|
||||
<a href="namespacemlx_1_1core.html#ae8aacc606ea16f018a90eae758830a35"/>
|
||||
<a href="namespacemlx_1_1core.html#ae8c890bdcffadee8c5dab85c907f57eb"/>
|
||||
<a href="namespacemlx_1_1core.html#ae93556906e115625ed1b62d36cf21b70"/>
|
||||
<a href="namespacemlx_1_1core.html#ae9ee4a7c205df061c1caa7e62b7504e8"/>
|
||||
<a href="namespacemlx_1_1core.html#aea414c04bddc4b9b609262e97398f1b4"/>
|
||||
<a href="namespacemlx_1_1core.html#aeac6fa9529eedba76b27de9d098de963"/>
|
||||
<a href="namespacemlx_1_1core.html#aeb879815228efbd2c8f80986e1c8d41f"/>
|
||||
<a href="namespacemlx_1_1core.html#aec63a0472cb943fe39f31e7678555572"/>
|
||||
<a href="namespacemlx_1_1core.html#aececc0e451237aa6c0d1a2c3d828c86e"/>
|
||||
<a href="namespacemlx_1_1core.html#aecfbf5ef4872ae447eb4a374e4db28e4"/>
|
||||
<a href="namespacemlx_1_1core.html#aed148d95e7b5221f1312473deded0d27"/>
|
||||
<a href="namespacemlx_1_1core.html#aed2b5550f8424094ef10bdadfe92ec0f"/>
|
||||
<a href="namespacemlx_1_1core.html#aed3d9cd32698ef0fe65b1280f103b3f5"/>
|
||||
<a href="namespacemlx_1_1core.html#aedc4e9df4bf71c0ac34fcfae60cdf550"/>
|
||||
<a href="namespacemlx_1_1core.html#aeefaff208444d3fa61ecc0946fe1de5f"/>
|
||||
@@ -3886,6 +3881,7 @@
|
||||
<a href="namespacemlx_1_1core.html#afbd2769c30e721afc85a7b9fb55b8e52"/>
|
||||
<a href="namespacemlx_1_1core.html#afc71e62dc5757564486cea5ebb12500e"/>
|
||||
<a href="namespacemlx_1_1core.html#afc9a87f1fccbac05242b91bfbb35c24d"/>
|
||||
<a href="namespacemlx_1_1core.html#afd07258882634dcda1e6f18f10dc28d5"/>
|
||||
<a href="namespacemlx_1_1core.html#afd4170c1e364384f30e6bae341146fa6"/>
|
||||
<a href="namespacemlx_1_1core.html#afd4519985b6b207ec41ad8530d1036df"/>
|
||||
<a href="namespacemlx_1_1core.html#afd9e740e567f9d7c28e00113caf46d5f"/>
|
||||
@@ -3896,6 +3892,10 @@
|
||||
<a href="namespacemlx_1_1core_1_1allocator.html#a77f0a1215be242db6485612bcb273af5"/>
|
||||
<a href="namespacemlx_1_1core_1_1allocator.html#a86ac0a11ff78f21e717f641716c34abc"/>
|
||||
<a href="namespacemlx_1_1core_1_1allocator.html#aa23e2f20a336d0b159c097087194634e"/>
|
||||
<a href="namespacemlx_1_1core_1_1cpu.html"/>
|
||||
<a href="namespacemlx_1_1core_1_1cpu.html#a1fc5871c94ccee8536c6d43f8f6d5557"/>
|
||||
<a href="namespacemlx_1_1core_1_1cpu.html#a3f721e92f604a57ed204a13d1ba9cad5"/>
|
||||
<a href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933"/>
|
||||
<a href="namespacemlx_1_1core_1_1detail.html"/>
|
||||
<a href="namespacemlx_1_1core_1_1detail.html#a10d612cb45a17fa17b704a357a902a68"/>
|
||||
<a href="namespacemlx_1_1core_1_1detail.html#a31a5582530faea230eb8acafc0f7e154"/>
|
||||
@@ -3921,11 +3921,10 @@
|
||||
<a href="namespacemlx_1_1core_1_1distributed.html#a95655473cd0032c06e5fe3fca85aeef3"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed.html#af93c1680b656e98158d5f6eed8e092e8"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1detail.html"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a003de04deb00ecbb19179b3f557df548"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#aa1d225b25f7b6426c48c5e35860ee960"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#abf33511660ac71df5fc92f2aad6c6e08"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#ac3612edf0e0e18c1e4ba0ce7c6e35cd6"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#aeb5a1726358213bc75756506f7b54d04"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a042be875217168ccfc267fba19a627cb"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a23c5cf992d4f2b2ce9dfa51593a4876d"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#a79bb934225482f2104e8ff270b0530c3"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1detail.html#ab3dc0367476257f13fe15d4db946edf5"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1mpi.html"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1mpi.html#a86d8a52e75b15bae8fb0992b418a41c7"/>
|
||||
<a href="namespacemlx_1_1core_1_1distributed_1_1mpi.html#ab40a34a8837956e24fb9b9661104c8f9"/>
|
||||
@@ -3944,7 +3943,7 @@
|
||||
<a href="namespacemlx_1_1core_1_1fast.html#a01bd533ebd0e2415c4ee30032d51d7bf"/>
|
||||
<a href="namespacemlx_1_1core_1_1fast.html#a12c7ef41409d6fb378008e67b6fab328"/>
|
||||
<a href="namespacemlx_1_1core_1_1fast.html#a1632b78950f0c8c31b24be7d80faeb39"/>
|
||||
<a href="namespacemlx_1_1core_1_1fast.html#a3663b50265b0a9c0cca2b5376852e059"/>
|
||||
<a href="namespacemlx_1_1core_1_1fast.html#a4207ab2eb838335c0074f6bbb6b4cfc5"/>
|
||||
<a href="namespacemlx_1_1core_1_1fast.html#a534ef357eae24892684a6ecd866d3fab"/>
|
||||
<a href="namespacemlx_1_1core_1_1fast.html#a85ec3abc6b9d968c58275f5eef916f01"/>
|
||||
<a href="namespacemlx_1_1core_1_1fast.html#a9390693ff7be931f3ef3428e2ea4c3f9"/>
|
||||
@@ -4020,17 +4019,18 @@
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a39f43360d9e916fcf7e86c919b419554"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a3fb2c4a237fa4bfdff798156146c4937"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a43307654f62ed7c58e014be7fb03909c"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a4552b7ccdfa7f3cc9895c09799d8048e"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a46583a1aba89449fa72e6cb3a7090981"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a4b67d680cefa95f0ed5801f0e14e48ce"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a4fe937c2c584fd646926057f31d54ca6"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a529dc6c2d4a37ba544b66b2c3cd792cc"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a545de371fefba1feec2e70b7e9f4187c"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a5bfb8d4e6a7d1e51010d81ce008c3232"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a5fd6ba2040e53a254b9d71ae7ebd315f"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a616e09a1ef321d527770721cef264c54"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a74b3558bd518aecde6b14b0ba5e1a0d5"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a7b75c2639016ac4d350fa6c9da386667"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a81c2cf124b0803098a54a78f8f6873a6"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a87f378c14345e475d7e5701a987b66cd"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a88c1d42d525fcdfb2f9e8aa2c3f82ea6"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a8b4188f9a090a1da42d62b8a369bf106"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#a8bd0072616087cd568c2c804e7114aa9"/>
|
||||
@@ -4043,12 +4043,12 @@
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#aa47cb5651bf3b65c46ab216b7e504d77"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#ab09c9b60f1e886ab859e6a066c9a5b9d"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#ab1704e853394c725668c06752ebb5c24"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#ab31abdda3052162d59f6590a89e38337"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#ab77c9a9ecaeeab8c66b712862777c24b"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#abb997ccbed4c9a9ccd975b1574755fca"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#abc055b75e6a059618f279c35f8de36e7"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#ac46fd23516a61fc56d997910e4144281"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#ac90714424e36fb01e04550de69b8314f"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#acc15b940ea02dcac263a1af9e39ec16b"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#ad0dfd40ba7c09755711ceb731e57a5ac"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#adc66b1b48b51ac2d2f1f5bfac1b95ee3"/>
|
||||
<a href="namespacemlx_1_1core_1_1metal.html#adec8bb375da6c9dd5ff625a3a8434122"/>
|
||||
@@ -4607,10 +4607,10 @@
|
||||
<a href="scheduler_8h_source.html"/>
|
||||
<a href="sdpa__vector_8h.html"/>
|
||||
<a href="sdpa__vector_8h.html#a0c2c54bcc20cc4783a5040d47fa3ba81"/>
|
||||
<a href="sdpa__vector_8h.html#a1cdf4f03898ffe2800519892f7f6e0ad"/>
|
||||
<a href="sdpa__vector_8h.html#a3289383906473a108e6aee1993a72816"/>
|
||||
<a href="sdpa__vector_8h.html#a6ed0dd113fe7d471fc0b869b8c028c81"/>
|
||||
<a href="sdpa__vector_8h.html#aa83885125881230b6c4657dd3d0eba18"/>
|
||||
<a href="sdpa__vector_8h.html#ae1be83816bf9332277dab185aa1b58c2"/>
|
||||
<a href="sdpa__vector_8h.html#ae2a4a8d17e571578ed529f4d4afe93ac"/>
|
||||
<a href="sdpa__vector_8h_source.html"/>
|
||||
<a href="simd_8h.html"/>
|
||||
<a href="simd_8h_source.html"/>
|
||||
@@ -4631,8 +4631,10 @@
|
||||
<a href="steel_2defines_8h_source.html"/>
|
||||
<a href="steel__attention_8h.html"/>
|
||||
<a href="steel__attention_8h.html#a171fdea1b23976453f5dc5e6b3161982"/>
|
||||
<a href="steel__attention_8h.html#a5423b2a414f5e3c14166d568dedfbd33"/>
|
||||
<a href="steel__attention_8h.html#a6ed0dd113fe7d471fc0b869b8c028c81"/>
|
||||
<a href="steel__attention_8h.html#a835f90451dd42ce2d52352d5cce0722a"/>
|
||||
<a href="steel__attention_8h.html#a8bdd2cecf97aa5b033152b1d0f0d2416"/>
|
||||
<a href="steel__attention_8h.html#abfa50278ba59a90e0acb7e5d94500741"/>
|
||||
<a href="steel__attention_8h_source.html"/>
|
||||
<a href="steel__conv_8h.html"/>
|
||||
<a href="steel__conv_8h.html#a5728711d1c2ee4038457babb7ac12888"/>
|
||||
@@ -4836,32 +4838,32 @@
|
||||
<a href="struct_floor_divide.html#afc16a2b2a745225e0bc95640f3fc0219"/>
|
||||
<a href="struct_g_e_m_v_kernel-members.html"/>
|
||||
<a href="struct_g_e_m_v_kernel.html"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a04bb72da9a93d6d1eba468fa311bbba7"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a0edbf2dd6a6563e7afa6dab6b670615c"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a1dd943fcbf5e7be435fc36bed589a641"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a2fef17f9c9aa0bdf530ad3554fb0988b"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a47bfab7d21dd18760d3e0937ad36b19d"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a6013e9c5b2f72fa1311dd038172df0ce"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a7281520100658811076400060663903c"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a9ef4d0e62094d7033069f5dda5efb236"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#ab00784dff1512a7b0919fcb4cfa5d50e"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#ab8b64c94f4c8f6f09c0777415589b487"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#ac4a7b5011a0ea938ab1949bb1767fc1a"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#ad47223ee49b3cb7bf3746a2cec45f883"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#ae8113fddf6fb637acfd12efd978b704c"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a047eca250e7cbc928bce0e13de98e558"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a09f0e646822d45dc2543e31509552258"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a188ef7ed5c1d74d9b540b6d4ebf12f2e"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a23142b7400f1f678e5d6d69d87f51032"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a3b0b9ccf11bd5d7de50b9626fa9a22cc"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a53514fa199efc5b7328052dac45aabab"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#a68bad880d1e689228ae4d3c6958cc6c1"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#ac1a9e1d9853489dd928916912cc627a7"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#ad54fb5c6f0f9a820365b638542693291"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#ae1c8e57e6718f22732570cc92d9bcf99"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#af22b6e5ed1a9d350866aaafa35d63a8a"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#af96a768a213a95e7a4d8f3ec1948034f"/>
|
||||
<a href="struct_g_e_m_v_kernel.html#afbe7ab8ebfa912ffbf3ba2cf4db24940"/>
|
||||
<a href="struct_g_e_m_v_t_kernel-members.html"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a2ae8ce535d59cccf453381b4485a77f0"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a48a09a21d7b822f380d040c752b785d7"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a4a53e73a581aa8881b1f86ce653519e6"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a5d68656832de892f33db939005713927"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a60be87666006ba0bf88bc8e6902da42a"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a6729d6e63e76a1e9c7c8e78d9aac4869"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a67be7ec69c3791f02e97ccdb00ae0e03"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a8db6f01f96a36b216acd801c34a96ef5"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a8eb06f6569e4042e24fee220b11fa10d"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#aaefdf8f023da255bbb70a0c3e3408626"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#ade6f15a9744616de9dd71498ad7e758d"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a09cb1cda991a8d1b8dc83b22f8cab994"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a0cb1a4fa56fab7090b7c0fdc69a5470a"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a19bcb2d9377493a81da072f33711de33"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a19df54577e341044dc8e57cc5b6147f3"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a1a96467ee6957e62c2aa1061431095a4"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a2091b9804b702cbb995899312e3da417"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a2c30d01fd0932dfc3b4ef1e7e650d30f"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a3521f62aa2f4070fdc6858874121e3b4"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#a94f56f0ecf1f148f0513312325f33653"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#aa3f9e771c59770a72b73fb673eb7bf71"/>
|
||||
<a href="struct_g_e_m_v_t_kernel.html#aef8622b2f76d1ff272ced396c89e829d"/>
|
||||
<a href="struct_greater-members.html"/>
|
||||
<a href="struct_greater.html"/>
|
||||
<a href="struct_greater.html#a98d7d8ee360cd0f469c6eb9a017560f5"/>
|
||||
@@ -5309,6 +5311,7 @@
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#a0a8501b940e5a347475fa4bc38fb4c05"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#a27ded7e54bc1712063c874646b445509"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#a2d42827ff8551ec43cef2d33b9051c0f"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#a3f42a1362b4a513fa89e7b3dcc570a8e"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#a48b548a0b15f9d1279c938a1c6167034"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#a68c3c6a036e11ec40211c09811bbed1b"/>
|
||||
@@ -5324,7 +5327,6 @@
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#abc52d18ea87d213c47fd26062c829849"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#ac68ca977b5bde5434284ce7979647f14"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#ad538ae88f90560063f9ba502e2795991"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#ada20558738968ca2ecdcd95f228e028a"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#ae890f5cefa4ae24ae0f5d8e46a313a92"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#aeef08f5f3c015578d40de756a6465aa2"/>
|
||||
<a href="structmlx_1_1core_1_1_command_encoder.html#aefa48740fdee884f02e2d379bca4e78f"/>
|
||||
@@ -5438,9 +5440,7 @@
|
||||
<a href="structmlx_1_1core_1_1_reduction_plan.html#aec7496f3740a0b0d51aaa606f6fd68f4"/>
|
||||
<a href="structmlx_1_1core_1_1_scalar_vector-members.html"/>
|
||||
<a href="structmlx_1_1core_1_1_scalar_vector.html"/>
|
||||
<a href="structmlx_1_1core_1_1_scalar_vector.html#a69d6a3ddd7586e8e19a42c5e6f5a287b"/>
|
||||
<a href="structmlx_1_1core_1_1_scalar_vector.html#ab174fe55970fb4ee1c6a2b7628a24df1"/>
|
||||
<a href="structmlx_1_1core_1_1_scalar_vector.html#ac9c2214744bc972150740e169b603b9b"/>
|
||||
<a href="structmlx_1_1core_1_1_stream-members.html"/>
|
||||
<a href="structmlx_1_1core_1_1_stream.html"/>
|
||||
<a href="structmlx_1_1core_1_1_stream.html#a406b1b0162287a4162fab1f70e2ff3bb"/>
|
||||
@@ -5456,12 +5456,8 @@
|
||||
<a href="structmlx_1_1core_1_1_vector_scalar-members.html"/>
|
||||
<a href="structmlx_1_1core_1_1_vector_scalar.html"/>
|
||||
<a href="structmlx_1_1core_1_1_vector_scalar.html#a1af3ff644ce023a7e4f92a7c3634c44f"/>
|
||||
<a href="structmlx_1_1core_1_1_vector_scalar.html#a5fe1744adb58aaa845acca1e46725537"/>
|
||||
<a href="structmlx_1_1core_1_1_vector_scalar.html#a97088143e6d301d753dcdd1ccdd82287"/>
|
||||
<a href="structmlx_1_1core_1_1_vector_vector-members.html"/>
|
||||
<a href="structmlx_1_1core_1_1_vector_vector.html"/>
|
||||
<a href="structmlx_1_1core_1_1_vector_vector.html#a4867666c95c597a113afb64f173cc022"/>
|
||||
<a href="structmlx_1_1core_1_1_vector_vector.html#a6d69d070c75cf0281e11e36e0717ab50"/>
|
||||
<a href="structmlx_1_1core_1_1_vector_vector.html#a97a0bed419933d7685238a962f2e4215"/>
|
||||
<a href="structmlx_1_1core_1_1array_1_1_array_iterator-members.html"/>
|
||||
<a href="structmlx_1_1core_1_1array_1_1_array_iterator.html"/>
|
||||
@@ -5502,6 +5498,19 @@
|
||||
<a href="structmlx_1_1core_1_1complex64__t.html#a90d224dd37308345086bb9cc882ef6fc"/>
|
||||
<a href="structmlx_1_1core_1_1complex64__t.html#ad27bed7d6b7966bfcf563af06bedddf3"/>
|
||||
<a href="structmlx_1_1core_1_1complex64__t.html#ae065e39938f9c4374b4116f4c67d4d09"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder-members.html"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a0879746a3ca3531a081de1bcf484fa31"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a30676a55a977418879a6a3a8a858d7c3"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a3d4415f4022da093cee23ef6f2a50c7c"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a61e90a31f29ae3ffe5f6f1e7672f79b0"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a8e66b11850caa812b1eab2304493aa95"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa0646f94b37d9d419b0e379c8b81a5fe"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa82e91e3b530f13126f674a6f4902096"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#addd04a642072b7097faa74d1a924147b"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#ae7753ac99229f9241c41bcf1b5216c9b"/>
|
||||
<a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#af2623c4a8fd0408e5be2c5fabaf98771"/>
|
||||
<a href="structmlx_1_1core_1_1detail_1_1_abs-members.html"/>
|
||||
<a href="structmlx_1_1core_1_1detail_1_1_abs.html"/>
|
||||
<a href="structmlx_1_1core_1_1detail_1_1_abs.html#a0d657bc9a381dca1b5860b9a1b5a5702"/>
|
||||
@@ -5775,6 +5784,7 @@
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a0a8501b940e5a347475fa4bc38fb4c05"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a27ded7e54bc1712063c874646b445509"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a2d42827ff8551ec43cef2d33b9051c0f"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a3f42a1362b4a513fa89e7b3dcc570a8e"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a48b548a0b15f9d1279c938a1c6167034"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#a68c3c6a036e11ec40211c09811bbed1b"/>
|
||||
@@ -5790,7 +5800,6 @@
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#abc52d18ea87d213c47fd26062c829849"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ac68ca977b5bde5434284ce7979647f14"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ad538ae88f90560063f9ba502e2795991"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ada20558738968ca2ecdcd95f228e028a"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#ae890f5cefa4ae24ae0f5d8e46a313a92"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#aeef08f5f3c015578d40de756a6465aa2"/>
|
||||
<a href="structmlx_1_1core_1_1metal_1_1_command_encoder.html#aefa48740fdee884f02e2d379bca4e78f"/>
|
||||
@@ -5833,14 +5842,13 @@
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread-members.html"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html#a06a62c21c1174e4eb4d242e50aad7adf"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html#a18486415163f4d531bedb3b923d724cf"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html#a449de02bf2ac80d8fe2f208fa7eac359"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html#a456ad1c0c9e731833a2f8411c4ed51aa"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html#a4918720319cf224a1b4208568964c286"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html#a4ffd524d6a5bedd1a303b63bdde6701c"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html#a70410c9e612f871663929f1e8441a976"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html#a71de50591388b6e2cc6c57827e1a1ad4"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html#a8462e4acffcd385c6248bd7102e6bcb1"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html#ac528109a11abcb82e6e221c5efa4493c"/>
|
||||
<a href="structmlx_1_1core_1_1scheduler_1_1_stream_thread.html#adf608e22d0c0397217472408aab52631"/>
|
||||
<a href="structmlx_1_1core_1_1simd_1_1_scalar_t-members.html"/>
|
||||
<a href="structmlx_1_1core_1_1simd_1_1_scalar_t.html"/>
|
||||
@@ -5892,10 +5900,14 @@
|
||||
<a href="structmlx_1_1steel_1_1_accum_helper-members.html"/>
|
||||
<a href="structmlx_1_1steel_1_1_accum_helper.html"/>
|
||||
<a href="structmlx_1_1steel_1_1_accum_helper.html#ae52abf69e7ba6af1a73d65d57182ed26"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_mask_params-members.html"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_mask_params.html"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_mask_params.html#aaf6c5822d2cb2dcf0992798dc08e27d6"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params-members.html"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#a07ae31628e43e09bce533c7682c8dae3"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#a1cba7fedbd02e157922619195997cf4f"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#a2d18657f764a8b4097bc5a05238b5dde"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#a3b3e18cb993ab24819c852bc64288841"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#a3d286a0c27bace6016ed7a87f43291b7"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#a48575afc94ab9ff74deaba61464e57a1"/>
|
||||
@@ -5903,11 +5915,13 @@
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#a4cfd2ccb0fd7eb81c2a781a0614fdcbe"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#a59255882cbd78bb6f15e704e3a356a7f"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#a68a66e3fafa922dcfd1ab1f6bdc2375e"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#a752033afdf873d2c506aa83b02e38139"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#a9150df3fb79de521bbccf57c43f6b092"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#aaf953954274794cfcb4e35e82d681b58"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#ab210f29dcc3a732aba34894cd5a42cf7"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#ad1495980297901b8ded1fb6dd73979b1"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#ad81bcd32e6ff8fec0000eca505fb6826"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#af3fcd78329de006a9a44db64ba469345"/>
|
||||
<a href="structmlx_1_1steel_1_1_attn_params.html#af71b762aa702a3ee592d2098a14b74a9"/>
|
||||
<a href="structmlx_1_1steel_1_1_base_m_m_a_frag.html"/>
|
||||
<a href="structmlx_1_1steel_1_1_base_m_m_a_frag_3_01_t_00_018_00_018_01_4-members.html"/>
|
||||
|
||||
+26
-11
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>MLX: mlx/backend/metal/event.h File Reference</title>
|
||||
<title>MLX: mlx/backend/cpu/encoder.h File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
@@ -76,7 +76,7 @@ $(function() { codefold.init(0); });
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('backend_2metal_2event_8h.html',''); initResizable(true); });
|
||||
$(function(){initNavTree('encoder_8h.html',''); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
@@ -103,34 +103,49 @@ $(function(){initNavTree('backend_2metal_2event_8h.html',''); initResizable(true
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> |
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">event.h File Reference</div></div>
|
||||
<a href="#func-members">Functions</a> |
|
||||
<a href="#var-members">Variables</a> </div>
|
||||
<div class="headertitle"><div class="title">encoder.h File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p><a href="backend_2metal_2event_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<div class="textblock"><code>#include <unordered_map></code><br />
|
||||
<code>#include "<a class="el" href="array_8h_source.html">mlx/array.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="scheduler_8h_source.html">mlx/scheduler.h</a>"</code><br />
|
||||
</div>
|
||||
<p><a href="encoder_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html">mlx::core::cpu::CommandEncoder</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx.html">mlx</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html">mlx::core</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1cpu.html">mlx::core::cpu</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a2874ba55b73057b76c23a7429fdd2d6e" id="r_a2874ba55b73057b76c23a7429fdd2d6e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a2874ba55b73057b76c23a7429fdd2d6e">mlx::core::encode_wait</a> (<a class="el" href="classmlx_1_1core_1_1_event.html">Event</a> e)</td></tr>
|
||||
<tr class="separator:a2874ba55b73057b76c23a7429fdd2d6e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6d452306f0f046a7d021bd94f8713a89" id="r_a6d452306f0f046a7d021bd94f8713a89"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a6d452306f0f046a7d021bd94f8713a89">mlx::core::encode_signal</a> (<a class="el" href="classmlx_1_1core_1_1_event.html">Event</a> e)</td></tr>
|
||||
<tr class="separator:a6d452306f0f046a7d021bd94f8713a89"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a65b1789c4b339a108e64fda5f102d933" id="r_a65b1789c4b339a108e64fda5f102d933"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html">CommandEncoder</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">mlx::core::cpu::get_command_encoder</a> (<a class="el" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream)</td></tr>
|
||||
<tr class="separator:a65b1789c4b339a108e64fda5f102d933"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
|
||||
Variables</h2></td></tr>
|
||||
<tr class="memitem:a1fc5871c94ccee8536c6d43f8f6d5557" id="r_a1fc5871c94ccee8536c6d43f8f6d5557"><td class="memItemLeft" align="right" valign="top">constexpr int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1cpu.html#a1fc5871c94ccee8536c6d43f8f6d5557">mlx::core::cpu::DISPATCHES_PER_TASK</a> = 10</td></tr>
|
||||
<tr class="separator:a1fc5871c94ccee8536c6d43f8f6d5557"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_938ab0ecf10b8b860ff766c820f665fd.html">mlx</a></li><li class="navelem"><a class="el" href="dir_1d446c9bd3c99228254c9484e0bc5c06.html">backend</a></li><li class="navelem"><a class="el" href="dir_d0c977ea65824390717cdb7efc36c157.html">metal</a></li><li class="navelem"><a class="el" href="backend_2metal_2event_8h.html">event.h</a></li>
|
||||
<li class="navelem"><a class="el" href="dir_938ab0ecf10b8b860ff766c820f665fd.html">mlx</a></li><li class="navelem"><a class="el" href="dir_1d446c9bd3c99228254c9484e0bc5c06.html">backend</a></li><li class="navelem"><a class="el" href="dir_48c8bf40aae7e42226b4fe31ea48af19.html">cpu</a></li><li class="navelem"><a class="el" href="encoder_8h.html">encoder.h</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
var encoder_8h =
|
||||
[
|
||||
[ "mlx::core::cpu::CommandEncoder", "structmlx_1_1core_1_1cpu_1_1_command_encoder.html", "structmlx_1_1core_1_1cpu_1_1_command_encoder" ],
|
||||
[ "mlx::core::cpu::get_command_encoder", "namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933", null ],
|
||||
[ "mlx::core::cpu::DISPATCHES_PER_TASK", "namespacemlx_1_1core_1_1cpu.html#a1fc5871c94ccee8536c6d43f8f6d5557", null ]
|
||||
];
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>MLX: mlx/backend/cpu/encoder.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<script type="text/javascript" src="clipboard.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="cookie.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">MLX
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </span>
|
||||
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.13.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(0); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('encoder_8h_source.html',''); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">encoder.h</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="encoder_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright © 2025 Apple Inc.</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#pragma once</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include <unordered_map></span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "<a class="code" href="scheduler_8h.html">mlx/scheduler.h</a>"</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
|
||||
<div class="foldopen" id="foldopen00010" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1cpu.html"> 10</a></span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core_1_1cpu.html">mlx::core::cpu</a> {</div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// Number of dispatches per scheduler task</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1cpu.html#a1fc5871c94ccee8536c6d43f8f6d5557"> 13</a></span><span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="namespacemlx_1_1core_1_1cpu.html#a1fc5871c94ccee8536c6d43f8f6d5557">DISPATCHES_PER_TASK</a> = 10;</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
|
||||
<div class="foldopen" id="foldopen00015" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html"> 15</a></span><span class="keyword">struct </span><a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a> {</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c"> 16</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream) : stream_(stream) {}</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a8e66b11850caa812b1eab2304493aa95"> 18</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a8e66b11850caa812b1eab2304493aa95">CommandEncoder</a>(<span class="keyword">const</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>&) = <span class="keyword">delete</span>;</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a3d4415f4022da093cee23ef6f2a50c7c"> 19</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>& <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a3d4415f4022da093cee23ef6f2a50c7c">operator=</a>(<span class="keyword">const</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>&) = <span class="keyword">delete</span>;</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa82e91e3b530f13126f674a6f4902096"> 20</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa82e91e3b530f13126f674a6f4902096">CommandEncoder</a>(<a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>&&) = <span class="keyword">delete</span>;</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#af2623c4a8fd0408e5be2c5fabaf98771"> 21</a></span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>& <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#af2623c4a8fd0408e5be2c5fabaf98771">operator=</a>(<a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">CommandEncoder</a>&&) = <span class="keyword">delete</span>;</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa0646f94b37d9d419b0e379c8b81a5fe"> 23</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa0646f94b37d9d419b0e379c8b81a5fe">set_input_array</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a) {}</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#addd04a642072b7097faa74d1a924147b"> 24</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#addd04a642072b7097faa74d1a924147b">set_output_array</a>(<a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& a) {}</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="comment">// Hold onto a temporary until any already scheduled tasks which use it as</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="comment">// an input are complete.</span></div>
|
||||
<div class="foldopen" id="foldopen00028" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a0879746a3ca3531a081de1bcf484fa31"> 28</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a0879746a3ca3531a081de1bcf484fa31">add_temporary</a>(<a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a> arr) {</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> temporaries_.push_back(std::move(arr));</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
|
||||
<div class="foldopen" id="foldopen00032" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a30676a55a977418879a6a3a8a858d7c3"> 32</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a30676a55a977418879a6a3a8a858d7c3">add_temporaries</a>(std::vector<array> arrays) {</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> temporaries_.insert(</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> temporaries_.end(),</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> std::make_move_iterator(arrays.begin()),</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> std::make_move_iterator(arrays.end()));</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
||||
<div class="foldopen" id="foldopen00039" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a61e90a31f29ae3ffe5f6f1e7672f79b0"> 39</a></span> std::vector<array>& <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a61e90a31f29ae3ffe5f6f1e7672f79b0">temporaries</a>() {</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">return</span> temporaries_;</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">template</span> <<span class="keyword">class </span>F, <span class="keyword">class</span>... <a class="code hl_typedef" href="namespacemlx_1_1core.html#acace1870dbbc6a0af0c054e8e71adc1f">Args</a>></div>
|
||||
<div class="foldopen" id="foldopen00044" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#ae7753ac99229f9241c41bcf1b5216c9b"> 44</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#ae7753ac99229f9241c41bcf1b5216c9b">dispatch</a>(F&& f, <a class="code hl_typedef" href="namespacemlx_1_1core.html#acace1870dbbc6a0af0c054e8e71adc1f">Args</a>&&... args) {</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> num_ops_ = (num_ops_ + 1) % <a class="code hl_variable" href="namespacemlx_1_1core_1_1cpu.html#a1fc5871c94ccee8536c6d43f8f6d5557">DISPATCHES_PER_TASK</a>;</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">auto</span> task = std::bind(std::forward<F>(f), std::forward<Args>(args)...);</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">if</span> (num_ops_ == 0) {</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1scheduler.html#a6b7289e33cef665178fe614aac75c1b2">scheduler::notify_new_task</a>(stream_);</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">auto</span> task_wrap = [s = stream_, task = std::move(task)]() <span class="keyword">mutable</span> {</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> task();</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1scheduler.html#a1d06ffdbab36790b78deb6e34adc737f">scheduler::notify_task_completion</a>(s);</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> };</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1scheduler.html#aa2d4eacf5d5cbc778a51aafd4fd8e4d7">scheduler::enqueue</a>(stream_, std::move(task_wrap));</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1scheduler.html#aa2d4eacf5d5cbc778a51aafd4fd8e4d7">scheduler::enqueue</a>(stream_, std::move(task));</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> }</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream_;</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> std::vector<array> temporaries_;</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordtype">int</span> num_ops_{0};</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933"> 65</a></span><a class="code hl_struct" href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html">CommandEncoder</a>& <a class="code hl_function" href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">get_command_encoder</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream);</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>} <span class="comment">// namespace mlx::core::cpu</span></div>
|
||||
</div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1cpu_html"><div class="ttname"><a href="namespacemlx_1_1core_1_1cpu.html">mlx::core::cpu</a></div><div class="ttdef"><b>Definition</b> encoder.h:10</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1cpu_html_a1fc5871c94ccee8536c6d43f8f6d5557"><div class="ttname"><a href="namespacemlx_1_1core_1_1cpu.html#a1fc5871c94ccee8536c6d43f8f6d5557">mlx::core::cpu::DISPATCHES_PER_TASK</a></div><div class="ttdeci">constexpr int DISPATCHES_PER_TASK</div><div class="ttdef"><b>Definition</b> encoder.h:13</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1cpu_html_a65b1789c4b339a108e64fda5f102d933"><div class="ttname"><a href="namespacemlx_1_1core_1_1cpu.html#a65b1789c4b339a108e64fda5f102d933">mlx::core::cpu::get_command_encoder</a></div><div class="ttdeci">CommandEncoder & get_command_encoder(Stream stream)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1scheduler_html_a1d06ffdbab36790b78deb6e34adc737f"><div class="ttname"><a href="namespacemlx_1_1core_1_1scheduler.html#a1d06ffdbab36790b78deb6e34adc737f">mlx::core::scheduler::notify_task_completion</a></div><div class="ttdeci">void notify_task_completion(const Stream &stream)</div><div class="ttdef"><b>Definition</b> scheduler.h:177</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1scheduler_html_a6b7289e33cef665178fe614aac75c1b2"><div class="ttname"><a href="namespacemlx_1_1core_1_1scheduler.html#a6b7289e33cef665178fe614aac75c1b2">mlx::core::scheduler::notify_new_task</a></div><div class="ttdeci">void notify_new_task(const Stream &stream)</div><div class="ttdef"><b>Definition</b> scheduler.h:173</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1scheduler_html_aa2d4eacf5d5cbc778a51aafd4fd8e4d7"><div class="ttname"><a href="namespacemlx_1_1core_1_1scheduler.html#aa2d4eacf5d5cbc778a51aafd4fd8e4d7">mlx::core::scheduler::enqueue</a></div><div class="ttdeci">void enqueue(const Stream &stream, F &&f)</div><div class="ttdef"><b>Definition</b> scheduler.h:165</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_acace1870dbbc6a0af0c054e8e71adc1f"><div class="ttname"><a href="namespacemlx_1_1core.html#acace1870dbbc6a0af0c054e8e71adc1f">mlx::core::Args</a></div><div class="ttdeci">std::vector< array > Args</div><div class="ttdef"><b>Definition</b> export.h:11</div></div>
|
||||
<div class="ttc" id="ascheduler_8h_html"><div class="ttname"><a href="scheduler_8h.html">scheduler.h</a></div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_stream_html"><div class="ttname"><a href="structmlx_1_1core_1_1_stream.html">mlx::core::Stream</a></div><div class="ttdef"><b>Definition</b> stream.h:9</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html">mlx::core::cpu::CommandEncoder</a></div><div class="ttdef"><b>Definition</b> encoder.h:15</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a0879746a3ca3531a081de1bcf484fa31"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a0879746a3ca3531a081de1bcf484fa31">mlx::core::cpu::CommandEncoder::add_temporary</a></div><div class="ttdeci">void add_temporary(array arr)</div><div class="ttdef"><b>Definition</b> encoder.h:28</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a23815084f53da65b092624c89df7383c"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a23815084f53da65b092624c89df7383c">mlx::core::cpu::CommandEncoder::CommandEncoder</a></div><div class="ttdeci">CommandEncoder(Stream stream)</div><div class="ttdef"><b>Definition</b> encoder.h:16</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a30676a55a977418879a6a3a8a858d7c3"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a30676a55a977418879a6a3a8a858d7c3">mlx::core::cpu::CommandEncoder::add_temporaries</a></div><div class="ttdeci">void add_temporaries(std::vector< array > arrays)</div><div class="ttdef"><b>Definition</b> encoder.h:32</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a3d4415f4022da093cee23ef6f2a50c7c"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a3d4415f4022da093cee23ef6f2a50c7c">mlx::core::cpu::CommandEncoder::operator=</a></div><div class="ttdeci">CommandEncoder & operator=(const CommandEncoder &)=delete</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a61e90a31f29ae3ffe5f6f1e7672f79b0"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a61e90a31f29ae3ffe5f6f1e7672f79b0">mlx::core::cpu::CommandEncoder::temporaries</a></div><div class="ttdeci">std::vector< array > & temporaries()</div><div class="ttdef"><b>Definition</b> encoder.h:39</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_a8e66b11850caa812b1eab2304493aa95"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#a8e66b11850caa812b1eab2304493aa95">mlx::core::cpu::CommandEncoder::CommandEncoder</a></div><div class="ttdeci">CommandEncoder(const CommandEncoder &)=delete</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_aa0646f94b37d9d419b0e379c8b81a5fe"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa0646f94b37d9d419b0e379c8b81a5fe">mlx::core::cpu::CommandEncoder::set_input_array</a></div><div class="ttdeci">void set_input_array(const array &a)</div><div class="ttdef"><b>Definition</b> encoder.h:23</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_aa82e91e3b530f13126f674a6f4902096"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#aa82e91e3b530f13126f674a6f4902096">mlx::core::cpu::CommandEncoder::CommandEncoder</a></div><div class="ttdeci">CommandEncoder(CommandEncoder &&)=delete</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_addd04a642072b7097faa74d1a924147b"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#addd04a642072b7097faa74d1a924147b">mlx::core::cpu::CommandEncoder::set_output_array</a></div><div class="ttdeci">void set_output_array(array &a)</div><div class="ttdef"><b>Definition</b> encoder.h:24</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_ae7753ac99229f9241c41bcf1b5216c9b"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#ae7753ac99229f9241c41bcf1b5216c9b">mlx::core::cpu::CommandEncoder::dispatch</a></div><div class="ttdeci">void dispatch(F &&f, Args &&... args)</div><div class="ttdef"><b>Definition</b> encoder.h:44</div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1cpu_1_1_command_encoder_html_af2623c4a8fd0408e5be2c5fabaf98771"><div class="ttname"><a href="structmlx_1_1core_1_1cpu_1_1_command_encoder.html#af2623c4a8fd0408e5be2c5fabaf98771">mlx::core::cpu::CommandEncoder::operator=</a></div><div class="ttdeci">CommandEncoder & operator=(CommandEncoder &&)=delete</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_938ab0ecf10b8b860ff766c820f665fd.html">mlx</a></li><li class="navelem"><a class="el" href="dir_1d446c9bd3c99228254c9484e0bc5c06.html">backend</a></li><li class="navelem"><a class="el" href="dir_48c8bf40aae7e42226b4fe31ea48af19.html">cpu</a></li><li class="navelem"><a class="el" href="encoder_8h.html">encoder.h</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+10
-8
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>MLX: mlx/backend/common/load.h File Reference</title>
|
||||
<title>MLX: mlx/backend/cpu/eval.h File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
@@ -76,7 +76,7 @@ $(function() { codefold.init(0); });
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('backend_2common_2load_8h.html',''); initResizable(true); });
|
||||
$(function(){initNavTree('eval_8h.html',''); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
@@ -105,13 +105,13 @@ $(function(){initNavTree('backend_2common_2load_8h.html',''); initResizable(true
|
||||
<div class="summary">
|
||||
<a href="#namespaces">Namespaces</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">load.h File Reference</div></div>
|
||||
<div class="headertitle"><div class="title">eval.h File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><code>#include "<a class="el" href="array_8h_source.html">mlx/array.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="io_2load_8h_source.html">mlx/io/load.h</a>"</code><br />
|
||||
<code>#include "<a class="el" href="stream_8h_source.html">mlx/stream.h</a>"</code><br />
|
||||
</div>
|
||||
<p><a href="backend_2common_2load_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<p><a href="eval_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
||||
Namespaces</h2></td></tr>
|
||||
@@ -119,18 +119,20 @@ Namespaces</h2></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html">mlx::core</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1cpu.html">mlx::core::cpu</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a954de19249da7c1fa39b89bdc47368aa" id="r_a954de19249da7c1fa39b89bdc47368aa"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core.html#a954de19249da7c1fa39b89bdc47368aa">mlx::core::load</a> (<a class="el" href="classmlx_1_1core_1_1array.html">array</a> &out, size_t offset, const std::shared_ptr< <a class="el" href="classmlx_1_1core_1_1io_1_1_reader.html">io::Reader</a> > &reader, bool swap_endianess)</td></tr>
|
||||
<tr class="separator:a954de19249da7c1fa39b89bdc47368aa"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3f721e92f604a57ed204a13d1ba9cad5" id="r_a3f721e92f604a57ed204a13d1ba9cad5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemlx_1_1core_1_1cpu.html#a3f721e92f604a57ed204a13d1ba9cad5">mlx::core::cpu::eval</a> (<a class="el" href="classmlx_1_1core_1_1array.html">array</a> &arr)</td></tr>
|
||||
<tr class="separator:a3f721e92f604a57ed204a13d1ba9cad5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_938ab0ecf10b8b860ff766c820f665fd.html">mlx</a></li><li class="navelem"><a class="el" href="dir_1d446c9bd3c99228254c9484e0bc5c06.html">backend</a></li><li class="navelem"><a class="el" href="dir_f149b24a1b5be11cd70151abe517e3f8.html">common</a></li><li class="navelem"><a class="el" href="backend_2common_2load_8h.html">load.h</a></li>
|
||||
<li class="navelem"><a class="el" href="dir_938ab0ecf10b8b860ff766c820f665fd.html">mlx</a></li><li class="navelem"><a class="el" href="dir_1d446c9bd3c99228254c9484e0bc5c06.html">backend</a></li><li class="navelem"><a class="el" href="dir_48c8bf40aae7e42226b4fe31ea48af19.html">cpu</a></li><li class="navelem"><a class="el" href="eval_8h.html">eval.h</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
var eval_8h =
|
||||
[
|
||||
[ "mlx::core::cpu::eval", "namespacemlx_1_1core_1_1cpu.html#a3f721e92f604a57ed204a13d1ba9cad5", null ]
|
||||
];
|
||||
+17
-19
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.13.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>MLX: mlx/backend/common/load.h Source File</title>
|
||||
<title>MLX: mlx/backend/cpu/eval.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
@@ -76,7 +76,7 @@ $(function() { codefold.init(0); });
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('backend_2common_2load_8h_source.html',''); initResizable(true); });
|
||||
$(function(){initNavTree('eval_8h_source.html',''); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
@@ -102,34 +102,32 @@ $(function(){initNavTree('backend_2common_2load_8h_source.html',''); initResizab
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">load.h</div></div>
|
||||
<div class="headertitle"><div class="title">eval.h</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="backend_2common_2load_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright © 2024 Apple Inc.</span></div>
|
||||
<a href="eval_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright © 2025 Apple Inc.</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include "<a class="code" href="io_2load_8h.html">mlx/io/load.h</a>"</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core.html">mlx::core</a> {</div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#pragma once</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include "<a class="code" href="array_8h.html">mlx/array.h</a>"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "<a class="code" href="stream_8h.html">mlx/stream.h</a>"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core.html#a954de19249da7c1fa39b89bdc47368aa"> 8</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core.html#a954de19249da7c1fa39b89bdc47368aa">load</a>(</div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& out,</div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="keywordtype">size_t</span> offset,</div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="keyword">const</span> std::shared_ptr<io::Reader>& reader,</div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="keywordtype">bool</span> swap_endianess);</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core_1_1cpu.html">mlx::core::cpu</a> {</div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"><a class="line" href="namespacemlx_1_1core_1_1cpu.html#a3f721e92f604a57ed204a13d1ba9cad5"> 10</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespacemlx_1_1core_1_1cpu.html#a3f721e92f604a57ed204a13d1ba9cad5">eval</a>(<a class="code hl_class" href="classmlx_1_1core_1_1array.html">array</a>& arr);</div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span>} <span class="comment">// namespace mlx::core::cpu</span></div>
|
||||
<div class="ttc" id="aarray_8h_html"><div class="ttname"><a href="array_8h.html">array.h</a></div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1array_html"><div class="ttname"><a href="classmlx_1_1core_1_1array.html">mlx::core::array</a></div><div class="ttdef"><b>Definition</b> array.h:24</div></div>
|
||||
<div class="ttc" id="aio_2load_8h_html"><div class="ttname"><a href="io_2load_8h.html">load.h</a></div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html_a954de19249da7c1fa39b89bdc47368aa"><div class="ttname"><a href="namespacemlx_1_1core.html#a954de19249da7c1fa39b89bdc47368aa">mlx::core::load</a></div><div class="ttdeci">void load(array &out, size_t offset, const std::shared_ptr< io::Reader > &reader, bool swap_endianess)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1cpu_html"><div class="ttname"><a href="namespacemlx_1_1core_1_1cpu.html">mlx::core::cpu</a></div><div class="ttdef"><b>Definition</b> encoder.h:10</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_1_1cpu_html_a3f721e92f604a57ed204a13d1ba9cad5"><div class="ttname"><a href="namespacemlx_1_1core_1_1cpu.html#a3f721e92f604a57ed204a13d1ba9cad5">mlx::core::cpu::eval</a></div><div class="ttdeci">void eval(array &arr)</div></div>
|
||||
<div class="ttc" id="astream_8h_html"><div class="ttname"><a href="stream_8h.html">stream.h</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_938ab0ecf10b8b860ff766c820f665fd.html">mlx</a></li><li class="navelem"><a class="el" href="dir_1d446c9bd3c99228254c9484e0bc5c06.html">backend</a></li><li class="navelem"><a class="el" href="dir_f149b24a1b5be11cd70151abe517e3f8.html">common</a></li><li class="navelem"><a class="el" href="backend_2common_2load_8h.html">load.h</a></li>
|
||||
<li class="navelem"><a class="el" href="dir_938ab0ecf10b8b860ff766c820f665fd.html">mlx</a></li><li class="navelem"><a class="el" href="dir_1d446c9bd3c99228254c9484e0bc5c06.html">backend</a></li><li class="navelem"><a class="el" href="dir_48c8bf40aae7e42226b4fe31ea48af19.html">cpu</a></li><li class="navelem"><a class="el" href="eval_8h.html">eval.h</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
|
||||
</ul>
|
||||
</div>
|
||||
Vendored
+60
-60
@@ -116,76 +116,76 @@ $(function(){initNavTree('event_8h_source.html',''); initResizable(true); });
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemlx_1_1core.html">mlx::core</a> {</div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
|
||||
<div class="foldopen" id="foldopen00011" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html"> 11</a></span><span class="keyword">class </span><a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a833506419b2110ad1abd89b2dd238b4d">Event</a> {</div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html"> 11</a></span><span class="keyword">class </span><a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a98f1f98d6cac43ddb682522acdce63d5">Event</a> {</div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a833506419b2110ad1abd89b2dd238b4d"> 13</a></span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a833506419b2110ad1abd89b2dd238b4d">Event</a>() = <span class="keywordflow">default</span>;</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a13e4835f2ffb2cc22e29148a448ea184"> 15</a></span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a13e4835f2ffb2cc22e29148a448ea184">Event</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a>& steam);</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="comment">// Wait for the event to be signaled at its current value</span></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a634afd918e6ed847f354531ba9f48252"> 18</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a634afd918e6ed847f354531ba9f48252">wait</a>();</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="comment">// Signal the event at its current value</span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a65a858445506a61be5889ae0e3651b89"> 21</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a65a858445506a61be5889ae0e3651b89">signal</a>();</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="comment">// Check if the event has been signaled at its current value</span></div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a05a9a3de88185b4a89e154242b4e770a"> 24</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a05a9a3de88185b4a89e154242b4e770a">is_signaled</a>() <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="comment">// Check if the event is valid</span></div>
|
||||
<div class="foldopen" id="foldopen00027" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#aa77afd9669e2ef9d5e9ae1c2c6fd24fa"> 27</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#aa77afd9669e2ef9d5e9ae1c2c6fd24fa">valid</a>()<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordflow">return</span> event_ != <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a98f1f98d6cac43ddb682522acdce63d5"> 13</a></span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a98f1f98d6cac43ddb682522acdce63d5">Event</a>() {};</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#acdc48fc71fcf3f8d128be029d63b7826"> 14</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#acdc48fc71fcf3f8d128be029d63b7826">Event</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614">stream</a>);</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// Wait for the event to be signaled at its current value</span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a634afd918e6ed847f354531ba9f48252"> 17</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a634afd918e6ed847f354531ba9f48252">wait</a>();</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// Signal the event at its current value</span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a65a858445506a61be5889ae0e3651b89"> 20</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a65a858445506a61be5889ae0e3651b89">signal</a>();</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="comment">// Wait in the given stream for the event to be signaled at its current value</span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#ac58282a36a02aed7a5bd59b1602d11a8"> 23</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#ac58282a36a02aed7a5bd59b1602d11a8">wait</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614">stream</a>);</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="comment">// Signal the event at its current value in the given stream</span></div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#ab514bd9e9c21d1fdd7c1460dc7d0ec7f"> 26</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#ab514bd9e9c21d1fdd7c1460dc7d0ec7f">signal</a>(<a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614">stream</a>);</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="comment">// Check if the event has been signaled at its current value</span></div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a05a9a3de88185b4a89e154242b4e770a"> 29</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a05a9a3de88185b4a89e154242b4e770a">is_signaled</a>() <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="foldopen" id="foldopen00031" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#ab71c7baee3d1d02ad6a2001bbf90b970"> 31</a></span> uint64_t <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#ab71c7baee3d1d02ad6a2001bbf90b970">value</a>()<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">return</span> value_;</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> }</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="comment">// Check if the event is valid</span></div>
|
||||
<div class="foldopen" id="foldopen00032" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#aa77afd9669e2ef9d5e9ae1c2c6fd24fa"> 32</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#aa77afd9669e2ef9d5e9ae1c2c6fd24fa">valid</a>()<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">return</span> event_ != <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
|
||||
<div class="foldopen" id="foldopen00035" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a0d077b11f4b28f882b42440b7ac6d40d"> 35</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a0d077b11f4b28f882b42440b7ac6d40d">set_value</a>(uint64_t v) {</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> value_ = v;</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> }</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
|
||||
<div class="foldopen" id="foldopen00036" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#ab71c7baee3d1d02ad6a2001bbf90b970"> 36</a></span> uint64_t <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#ab71c7baee3d1d02ad6a2001bbf90b970">value</a>()<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordflow">return</span> value_;</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
||||
<div class="foldopen" id="foldopen00039" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614"> 39</a></span> <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a>& <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614">stream</a>()<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="classmlx_1_1core_1_1_event.html#aa77afd9669e2ef9d5e9ae1c2c6fd24fa">valid</a>()) {</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">throw</span> std::runtime_error(</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="stringliteral">"[Event::stream] Cannot access stream on invalid event."</span>);</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> }</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">return</span> stream_;</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> }</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
|
||||
<div class="foldopen" id="foldopen00040" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a0d077b11f4b28f882b42440b7ac6d40d"> 40</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a0d077b11f4b28f882b42440b7ac6d40d">set_value</a>(uint64_t v) {</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> value_ = v;</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
|
||||
<div class="foldopen" id="foldopen00047" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#af408d30df17c4771e9e2aa550cb6e921"> 47</a></span> <span class="keyword">const</span> std::shared_ptr<void>& <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#af408d30df17c4771e9e2aa550cb6e921">raw_event</a>()<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">return</span> event_;</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> }</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
|
||||
<div class="foldopen" id="foldopen00044" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614"> 44</a></span> <span class="keyword">const</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a>& <a class="code hl_function" href="classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614">stream</a>()<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="classmlx_1_1core_1_1_event.html#aa77afd9669e2ef9d5e9ae1c2c6fd24fa">valid</a>()) {</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">throw</span> std::runtime_error(</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="stringliteral">"[Event::stream] Cannot access stream on invalid event."</span>);</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> }</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">return</span> stream_;</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="comment">// Default constructed stream should never be used</span></div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="comment">// since the event is not yet valid</span></div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream_{0, <a class="code hl_variable" href="structmlx_1_1core_1_1_device.html#a69ee81924251dec96f1945c9d91506fd">Device::cpu</a>};</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> std::shared_ptr<void> event_;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> uint64_t value_{0};</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>};</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="comment">// Default constructed stream should never be used</span></div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="comment">// since the event is not yet valid</span></div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_struct" href="structmlx_1_1core_1_1_stream.html">Stream</a> stream_{0, <a class="code hl_variable" href="structmlx_1_1core_1_1_device.html#a69ee81924251dec96f1945c9d91506fd">Device::cpu</a>};</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> std::shared_ptr<void> event_{<span class="keyword">nullptr</span>};</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> uint64_t value_{0};</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span>};</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>} <span class="comment">// namespace mlx::core</span></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_a05a9a3de88185b4a89e154242b4e770a"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#a05a9a3de88185b4a89e154242b4e770a">mlx::core::Event::is_signaled</a></div><div class="ttdeci">bool is_signaled() const</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_a0d077b11f4b28f882b42440b7ac6d40d"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#a0d077b11f4b28f882b42440b7ac6d40d">mlx::core::Event::set_value</a></div><div class="ttdeci">void set_value(uint64_t v)</div><div class="ttdef"><b>Definition</b> event.h:35</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_a13e4835f2ffb2cc22e29148a448ea184"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#a13e4835f2ffb2cc22e29148a448ea184">mlx::core::Event::Event</a></div><div class="ttdeci">Event(const Stream &steam)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_a193143bad31b68c699fa27f135b45614"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614">mlx::core::Event::stream</a></div><div class="ttdeci">const Stream & stream() const</div><div class="ttdef"><b>Definition</b> event.h:39</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_a0d077b11f4b28f882b42440b7ac6d40d"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#a0d077b11f4b28f882b42440b7ac6d40d">mlx::core::Event::set_value</a></div><div class="ttdeci">void set_value(uint64_t v)</div><div class="ttdef"><b>Definition</b> event.h:40</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_a193143bad31b68c699fa27f135b45614"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#a193143bad31b68c699fa27f135b45614">mlx::core::Event::stream</a></div><div class="ttdeci">const Stream & stream() const</div><div class="ttdef"><b>Definition</b> event.h:44</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_a634afd918e6ed847f354531ba9f48252"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#a634afd918e6ed847f354531ba9f48252">mlx::core::Event::wait</a></div><div class="ttdeci">void wait()</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_a65a858445506a61be5889ae0e3651b89"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#a65a858445506a61be5889ae0e3651b89">mlx::core::Event::signal</a></div><div class="ttdeci">void signal()</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_a833506419b2110ad1abd89b2dd238b4d"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#a833506419b2110ad1abd89b2dd238b4d">mlx::core::Event::Event</a></div><div class="ttdeci">Event()=default</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_aa77afd9669e2ef9d5e9ae1c2c6fd24fa"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#aa77afd9669e2ef9d5e9ae1c2c6fd24fa">mlx::core::Event::valid</a></div><div class="ttdeci">bool valid() const</div><div class="ttdef"><b>Definition</b> event.h:27</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_ab71c7baee3d1d02ad6a2001bbf90b970"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#ab71c7baee3d1d02ad6a2001bbf90b970">mlx::core::Event::value</a></div><div class="ttdeci">uint64_t value() const</div><div class="ttdef"><b>Definition</b> event.h:31</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_af408d30df17c4771e9e2aa550cb6e921"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#af408d30df17c4771e9e2aa550cb6e921">mlx::core::Event::raw_event</a></div><div class="ttdeci">const std::shared_ptr< void > & raw_event() const</div><div class="ttdef"><b>Definition</b> event.h:47</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_a98f1f98d6cac43ddb682522acdce63d5"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#a98f1f98d6cac43ddb682522acdce63d5">mlx::core::Event::Event</a></div><div class="ttdeci">Event()</div><div class="ttdef"><b>Definition</b> event.h:13</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_aa77afd9669e2ef9d5e9ae1c2c6fd24fa"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#aa77afd9669e2ef9d5e9ae1c2c6fd24fa">mlx::core::Event::valid</a></div><div class="ttdeci">bool valid() const</div><div class="ttdef"><b>Definition</b> event.h:32</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_ab514bd9e9c21d1fdd7c1460dc7d0ec7f"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#ab514bd9e9c21d1fdd7c1460dc7d0ec7f">mlx::core::Event::signal</a></div><div class="ttdeci">void signal(Stream stream)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_ab71c7baee3d1d02ad6a2001bbf90b970"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#ab71c7baee3d1d02ad6a2001bbf90b970">mlx::core::Event::value</a></div><div class="ttdeci">uint64_t value() const</div><div class="ttdef"><b>Definition</b> event.h:36</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_ac58282a36a02aed7a5bd59b1602d11a8"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#ac58282a36a02aed7a5bd59b1602d11a8">mlx::core::Event::wait</a></div><div class="ttdeci">void wait(Stream stream)</div></div>
|
||||
<div class="ttc" id="aclassmlx_1_1core_1_1_event_html_acdc48fc71fcf3f8d128be029d63b7826"><div class="ttname"><a href="classmlx_1_1core_1_1_event.html#acdc48fc71fcf3f8d128be029d63b7826">mlx::core::Event::Event</a></div><div class="ttdeci">Event(Stream stream)</div></div>
|
||||
<div class="ttc" id="anamespacemlx_1_1core_html"><div class="ttname"><a href="namespacemlx_1_1core.html">mlx::core</a></div><div class="ttdef"><b>Definition</b> allocator.h:7</div></div>
|
||||
<div class="ttc" id="astream_8h_html"><div class="ttname"><a href="stream_8h.html">stream.h</a></div></div>
|
||||
<div class="ttc" id="astructmlx_1_1core_1_1_device_html_a69ee81924251dec96f1945c9d91506fd"><div class="ttname"><a href="structmlx_1_1core_1_1_device.html#a69ee81924251dec96f1945c9d91506fd">mlx::core::Device::cpu</a></div><div class="ttdeci">static constexpr DeviceType cpu</div><div class="ttdef"><b>Definition</b> device.h:13</div></div>
|
||||
|
||||
+4
-4
@@ -8,7 +8,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Linear Regression — MLX 0.23.2 documentation</title>
|
||||
<title>Linear Regression — MLX 0.24.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
|
||||
<script src="../_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
|
||||
|
||||
<script src="../_static/documentation_options.js?v=9900918c"></script>
|
||||
<script src="../_static/documentation_options.js?v=ae1d10b0"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/scripts/sphinx-book-theme.js?v=887ef09a"></script>
|
||||
@@ -137,8 +137,8 @@
|
||||
|
||||
|
||||
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.23.2 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.23.2 documentation - Home"/>`);</script>
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.24.0 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.24.0 documentation - Home"/>`);</script>
|
||||
|
||||
|
||||
</a></div>
|
||||
|
||||
+4
-4
@@ -8,7 +8,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>LLM inference — MLX 0.23.2 documentation</title>
|
||||
<title>LLM inference — MLX 0.24.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
|
||||
<script src="../_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
|
||||
|
||||
<script src="../_static/documentation_options.js?v=9900918c"></script>
|
||||
<script src="../_static/documentation_options.js?v=ae1d10b0"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/scripts/sphinx-book-theme.js?v=887ef09a"></script>
|
||||
@@ -137,8 +137,8 @@
|
||||
|
||||
|
||||
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.23.2 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.23.2 documentation - Home"/>`);</script>
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.24.0 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.24.0 documentation - Home"/>`);</script>
|
||||
|
||||
|
||||
</a></div>
|
||||
|
||||
Vendored
+4
-4
@@ -8,7 +8,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<title>Multi-Layer Perceptron — MLX 0.23.2 documentation</title>
|
||||
<title>Multi-Layer Perceptron — MLX 0.24.0 documentation</title>
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
|
||||
<script src="../_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
|
||||
|
||||
<script src="../_static/documentation_options.js?v=9900918c"></script>
|
||||
<script src="../_static/documentation_options.js?v=ae1d10b0"></script>
|
||||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../_static/scripts/sphinx-book-theme.js?v=887ef09a"></script>
|
||||
@@ -137,8 +137,8 @@
|
||||
|
||||
|
||||
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.23.2 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.23.2 documentation - Home"/>`);</script>
|
||||
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.24.0 documentation - Home"/>
|
||||
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.24.0 documentation - Home"/>`);</script>
|
||||
|
||||
|
||||
</a></div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user