From 2360620475b502d23f67e885975c72e237e794e9 Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Thu, 23 May 2024 21:11:24 -0700 Subject: [PATCH] docs --- docs/build/html/.buildinfo | 2 +- docs/build/html/_sources/install.rst | 15 +- .../_autosummary/mlx.core.gather_mm.rst | 6 + .../_autosummary/mlx.core.gather_qmm.rst | 6 + .../python/_autosummary/mlx.core.trace.rst | 6 + docs/build/html/_sources/python/ops.rst | 4 +- .../html/_static/documentation_options.js | 2 +- docs/build/html/allocator_8h.html | 124 - docs/build/html/allocator_8h_source.html | 191 - docs/build/html/annotated.html | 447 - docs/build/html/arange_8h.html | 107 - docs/build/html/arange_8h_source.html | 192 - docs/build/html/array_8h.html | 138 - docs/build/html/array_8h_source.html | 842 - docs/build/html/atomic_8h.html | 521 - docs/build/html/atomic_8h_source.html | 478 - .../html/backend_2accelerate_2utils_8h.html | 107 - .../backend_2accelerate_2utils_8h_source.html | 134 - docs/build/html/backend_2common_2ops_8h.html | 234 - .../html/backend_2common_2ops_8h_source.html | 1218 -- .../build/html/backend_2common_2utils_8h.html | 121 - .../backend_2common_2utils_8h_source.html | 236 - .../html/backend_2metal_2allocator_8h.html | 161 - .../backend_2metal_2allocator_8h_source.html | 221 - .../build/html/backend_2metal_2device_8h.html | 135 - .../backend_2metal_2device_8h_source.html | 389 - .../backend_2metal_2kernels_2bf16_8h.html | 10952 ----------- ...ckend_2metal_2kernels_2bf16_8h_source.html | 489 - .../backend_2metal_2kernels_2complex_8h.html | 504 - ...nd_2metal_2kernels_2complex_8h_source.html | 276 - ...nd_2metal_2kernels_2reduction_2ops_8h.html | 116 - ...al_2kernels_2reduction_2ops_8h_source.html | 385 - ..._2metal_2kernels_2reduction_2utils_8h.html | 126 - ..._2kernels_2reduction_2utils_8h_source.html | 111 - ..._2kernels_2steel_2gemm_2transforms_8h.html | 114 - ...ls_2steel_2gemm_2transforms_8h_source.html | 206 - ...kend_2metal_2kernels_2steel_2utils_8h.html | 215 - ...etal_2kernels_2steel_2utils_8h_source.html | 142 - .../backend_2metal_2kernels_2utils_8h.html | 862 - ...kend_2metal_2kernels_2utils_8h_source.html | 488 - docs/build/html/backend_2metal_2utils_8h.html | 102 - .../html/backend_2metal_2utils_8h_source.html | 249 - docs/build/html/bc_s.png | Bin 676 -> 0 bytes docs/build/html/bc_sd.png | Bin 635 -> 0 bytes docs/build/html/bf16__math_8h.html | 594 - docs/build/html/bf16__math_8h_source.html | 498 - docs/build/html/binary__two_8h.html | 101 - docs/build/html/binary__two_8h_source.html | 646 - .../html/class_m_p_s_1_1_kernel-members.html | 92 - docs/build/html/class_m_p_s_1_1_kernel.html | 144 - docs/build/html/class_m_p_s_1_1_kernel.png | Bin 656 -> 0 bytes .../html/class_m_p_s_1_1_matrix-members.html | 93 - docs/build/html/class_m_p_s_1_1_matrix.html | 183 - docs/build/html/class_m_p_s_1_1_matrix.png | Bin 665 -> 0 bytes ...s_m_p_s_1_1_matrix_descriptor-members.html | 93 - .../class_m_p_s_1_1_matrix_descriptor.html | 221 - .../class_m_p_s_1_1_matrix_descriptor.png | Bin 813 -> 0 bytes ...p_s_1_1_matrix_multiplication-members.html | 98 - ...class_m_p_s_1_1_matrix_multiplication.html | 318 - .../class_m_p_s_1_1_matrix_multiplication.png | Bin 1041 -> 0 bytes ..._matrix_vector_multiplication-members.html | 93 - ..._p_s_1_1_matrix_vector_multiplication.html | 213 - ...m_p_s_1_1_matrix_vector_multiplication.png | Bin 1145 -> 0 bytes .../html/class_m_p_s_1_1_vector-members.html | 93 - docs/build/html/class_m_p_s_1_1_vector.html | 183 - docs/build/html/class_m_p_s_1_1_vector.png | Bin 658 -> 0 bytes ...s_m_p_s_1_1_vector_descriptor-members.html | 92 - .../class_m_p_s_1_1_vector_descriptor.html | 178 - .../class_m_p_s_1_1_vector_descriptor.png | Bin 794 -> 0 bytes docs/build/html/classes.html | 152 - .../classmlx_1_1core_1_1_abs-members.html | 115 - docs/build/html/classmlx_1_1core_1_1_abs.html | 463 - docs/build/html/classmlx_1_1core_1_1_abs.png | Bin 872 -> 0 bytes .../classmlx_1_1core_1_1_add-members.html | 115 - docs/build/html/classmlx_1_1core_1_1_add.html | 463 - docs/build/html/classmlx_1_1core_1_1_add.png | Bin 874 -> 0 bytes .../classmlx_1_1core_1_1_add_m_m-members.html | 115 - .../html/classmlx_1_1core_1_1_add_m_m.html | 404 - .../html/classmlx_1_1core_1_1_add_m_m.png | Bin 905 -> 0 bytes .../classmlx_1_1core_1_1_arange-members.html | 115 - .../html/classmlx_1_1core_1_1_arange.html | 332 - .../html/classmlx_1_1core_1_1_arange.png | Bin 907 -> 0 bytes .../classmlx_1_1core_1_1_arc_cos-members.html | 115 - .../html/classmlx_1_1core_1_1_arc_cos.html | 463 - .../html/classmlx_1_1core_1_1_arc_cos.png | Bin 897 -> 0 bytes ...classmlx_1_1core_1_1_arc_cosh-members.html | 115 - .../html/classmlx_1_1core_1_1_arc_cosh.html | 463 - .../html/classmlx_1_1core_1_1_arc_cosh.png | Bin 909 -> 0 bytes .../classmlx_1_1core_1_1_arc_sin-members.html | 115 - .../html/classmlx_1_1core_1_1_arc_sin.html | 463 - .../html/classmlx_1_1core_1_1_arc_sin.png | Bin 895 -> 0 bytes ...classmlx_1_1core_1_1_arc_sinh-members.html | 115 - .../html/classmlx_1_1core_1_1_arc_sinh.html | 463 - .../html/classmlx_1_1core_1_1_arc_sinh.png | Bin 901 -> 0 bytes .../classmlx_1_1core_1_1_arc_tan-members.html | 115 - .../html/classmlx_1_1core_1_1_arc_tan.html | 463 - .../html/classmlx_1_1core_1_1_arc_tan.png | Bin 895 -> 0 bytes ...classmlx_1_1core_1_1_arc_tan2-members.html | 115 - .../html/classmlx_1_1core_1_1_arc_tan2.html | 463 - .../html/classmlx_1_1core_1_1_arc_tan2.png | Bin 913 -> 0 bytes ...classmlx_1_1core_1_1_arc_tanh-members.html | 115 - .../html/classmlx_1_1core_1_1_arc_tanh.html | 463 - .../html/classmlx_1_1core_1_1_arc_tanh.png | Bin 901 -> 0 bytes ...mlx_1_1core_1_1_arg_partition-members.html | 115 - .../classmlx_1_1core_1_1_arg_partition.html | 391 - .../classmlx_1_1core_1_1_arg_partition.png | Bin 936 -> 0 bytes ...assmlx_1_1core_1_1_arg_reduce-members.html | 118 - .../html/classmlx_1_1core_1_1_arg_reduce.html | 418 - .../html/classmlx_1_1core_1_1_arg_reduce.png | Bin 932 -> 0 bytes ...classmlx_1_1core_1_1_arg_sort-members.html | 115 - .../html/classmlx_1_1core_1_1_arg_sort.html | 386 - .../html/classmlx_1_1core_1_1_arg_sort.png | Bin 919 -> 0 bytes ...assmlx_1_1core_1_1_as_strided-members.html | 115 - .../html/classmlx_1_1core_1_1_as_strided.html | 413 - .../html/classmlx_1_1core_1_1_as_strided.png | Bin 917 -> 0 bytes .../classmlx_1_1core_1_1_as_type-members.html | 115 - .../html/classmlx_1_1core_1_1_as_type.html | 467 - .../html/classmlx_1_1core_1_1_as_type.png | Bin 918 -> 0 bytes ...lx_1_1core_1_1_bitwise_binary-members.html | 121 - .../classmlx_1_1core_1_1_bitwise_binary.html | 422 - .../classmlx_1_1core_1_1_bitwise_binary.png | Bin 937 -> 0 bytes ..._1_1core_1_1_block_masked_m_m-members.html | 115 - ...classmlx_1_1core_1_1_block_masked_m_m.html | 365 - .../classmlx_1_1core_1_1_block_masked_m_m.png | Bin 966 -> 0 bytes ..._1_1core_1_1_block_sparse_m_m-members.html | 115 - ...classmlx_1_1core_1_1_block_sparse_m_m.html | 361 - .../classmlx_1_1core_1_1_block_sparse_m_m.png | Bin 952 -> 0 bytes ..._1core_1_1_block_sparse_q_m_m-members.html | 115 - ...assmlx_1_1core_1_1_block_sparse_q_m_m.html | 447 - ...lassmlx_1_1core_1_1_block_sparse_q_m_m.png | Bin 981 -> 0 bytes ...lassmlx_1_1core_1_1_broadcast-members.html | 115 - .../html/classmlx_1_1core_1_1_broadcast.html | 437 - .../html/classmlx_1_1core_1_1_broadcast.png | Bin 905 -> 0 bytes .../classmlx_1_1core_1_1_ceil-members.html | 115 - .../build/html/classmlx_1_1core_1_1_ceil.html | 463 - docs/build/html/classmlx_1_1core_1_1_ceil.png | Bin 864 -> 0 bytes ...classmlx_1_1core_1_1_cholesky-members.html | 115 - .../html/classmlx_1_1core_1_1_cholesky.html | 327 - .../html/classmlx_1_1core_1_1_cholesky.png | Bin 909 -> 0 bytes ...classmlx_1_1core_1_1_compiled-members.html | 108 - .../html/classmlx_1_1core_1_1_compiled.html | 493 - .../html/classmlx_1_1core_1_1_compiled.png | Bin 546 -> 0 bytes ...ssmlx_1_1core_1_1_concatenate-members.html | 115 - .../classmlx_1_1core_1_1_concatenate.html | 437 - .../html/classmlx_1_1core_1_1_concatenate.png | Bin 914 -> 0 bytes ...lassmlx_1_1core_1_1_conjugate-members.html | 115 - .../html/classmlx_1_1core_1_1_conjugate.html | 382 - .../html/classmlx_1_1core_1_1_conjugate.png | Bin 929 -> 0 bytes ...ssmlx_1_1core_1_1_convolution-members.html | 115 - .../classmlx_1_1core_1_1_convolution.html | 390 - .../html/classmlx_1_1core_1_1_convolution.png | Bin 907 -> 0 bytes .../classmlx_1_1core_1_1_copy-members.html | 115 - .../build/html/classmlx_1_1core_1_1_copy.html | 463 - docs/build/html/classmlx_1_1core_1_1_copy.png | Bin 892 -> 0 bytes .../classmlx_1_1core_1_1_cos-members.html | 115 - docs/build/html/classmlx_1_1core_1_1_cos.html | 463 - docs/build/html/classmlx_1_1core_1_1_cos.png | Bin 875 -> 0 bytes .../classmlx_1_1core_1_1_cosh-members.html | 115 - .../build/html/classmlx_1_1core_1_1_cosh.html | 463 - docs/build/html/classmlx_1_1core_1_1_cosh.png | Bin 888 -> 0 bytes ...smlx_1_1core_1_1_custom_v_j_p-members.html | 107 - .../classmlx_1_1core_1_1_custom_v_j_p.html | 320 - .../classmlx_1_1core_1_1_custom_v_j_p.png | Bin 575 -> 0 bytes .../classmlx_1_1core_1_1_depends-members.html | 107 - .../html/classmlx_1_1core_1_1_depends.html | 316 - .../html/classmlx_1_1core_1_1_depends.png | Bin 548 -> 0 bytes .../classmlx_1_1core_1_1_div_mod-members.html | 107 - .../html/classmlx_1_1core_1_1_div_mod.html | 447 - .../html/classmlx_1_1core_1_1_div_mod.png | Bin 536 -> 0 bytes .../classmlx_1_1core_1_1_divide-members.html | 115 - .../html/classmlx_1_1core_1_1_divide.html | 463 - .../html/classmlx_1_1core_1_1_divide.png | Bin 897 -> 0 bytes .../classmlx_1_1core_1_1_equal-members.html | 115 - .../html/classmlx_1_1core_1_1_equal.html | 467 - .../build/html/classmlx_1_1core_1_1_equal.png | Bin 893 -> 0 bytes .../classmlx_1_1core_1_1_erf-members.html | 115 - docs/build/html/classmlx_1_1core_1_1_erf.html | 463 - docs/build/html/classmlx_1_1core_1_1_erf.png | Bin 861 -> 0 bytes .../classmlx_1_1core_1_1_erf_inv-members.html | 115 - .../html/classmlx_1_1core_1_1_erf_inv.html | 463 - .../html/classmlx_1_1core_1_1_erf_inv.png | Bin 880 -> 0 bytes .../classmlx_1_1core_1_1_event-members.html | 99 - .../html/classmlx_1_1core_1_1_event.html | 320 - .../classmlx_1_1core_1_1_exp-members.html | 115 - docs/build/html/classmlx_1_1core_1_1_exp.html | 463 - docs/build/html/classmlx_1_1core_1_1_exp.png | Bin 875 -> 0 bytes .../classmlx_1_1core_1_1_expm1-members.html | 115 - .../html/classmlx_1_1core_1_1_expm1.html | 434 - .../build/html/classmlx_1_1core_1_1_expm1.png | Bin 883 -> 0 bytes .../classmlx_1_1core_1_1_f_f_t-members.html | 115 - .../html/classmlx_1_1core_1_1_f_f_t.html | 447 - .../build/html/classmlx_1_1core_1_1_f_f_t.png | Bin 847 -> 0 bytes .../classmlx_1_1core_1_1_floor-members.html | 115 - .../html/classmlx_1_1core_1_1_floor.html | 463 - .../build/html/classmlx_1_1core_1_1_floor.png | Bin 866 -> 0 bytes .../classmlx_1_1core_1_1_full-members.html | 115 - .../build/html/classmlx_1_1core_1_1_full.html | 433 - docs/build/html/classmlx_1_1core_1_1_full.png | Bin 852 -> 0 bytes .../classmlx_1_1core_1_1_gather-members.html | 115 - .../html/classmlx_1_1core_1_1_gather.html | 442 - .../html/classmlx_1_1core_1_1_gather.png | Bin 893 -> 0 bytes .../classmlx_1_1core_1_1_greater-members.html | 115 - .../html/classmlx_1_1core_1_1_greater.html | 463 - .../html/classmlx_1_1core_1_1_greater.png | Bin 910 -> 0 bytes ...mlx_1_1core_1_1_greater_equal-members.html | 115 - .../classmlx_1_1core_1_1_greater_equal.html | 463 - .../classmlx_1_1core_1_1_greater_equal.png | Bin 945 -> 0 bytes .../classmlx_1_1core_1_1_inverse-members.html | 115 - .../html/classmlx_1_1core_1_1_inverse.html | 323 - .../html/classmlx_1_1core_1_1_inverse.png | Bin 884 -> 0 bytes .../classmlx_1_1core_1_1_less-members.html | 115 - .../build/html/classmlx_1_1core_1_1_less.html | 463 - docs/build/html/classmlx_1_1core_1_1_less.png | Bin 867 -> 0 bytes ...assmlx_1_1core_1_1_less_equal-members.html | 115 - .../html/classmlx_1_1core_1_1_less_equal.html | 463 - .../html/classmlx_1_1core_1_1_less_equal.png | Bin 926 -> 0 bytes .../classmlx_1_1core_1_1_load-members.html | 115 - .../build/html/classmlx_1_1core_1_1_load.html | 303 - docs/build/html/classmlx_1_1core_1_1_load.png | Bin 872 -> 0 bytes .../classmlx_1_1core_1_1_log-members.html | 119 - docs/build/html/classmlx_1_1core_1_1_log.html | 496 - docs/build/html/classmlx_1_1core_1_1_log.png | Bin 866 -> 0 bytes .../classmlx_1_1core_1_1_log1p-members.html | 115 - .../html/classmlx_1_1core_1_1_log1p.html | 434 - .../build/html/classmlx_1_1core_1_1_log1p.png | Bin 884 -> 0 bytes ...ssmlx_1_1core_1_1_log_add_exp-members.html | 115 - .../classmlx_1_1core_1_1_log_add_exp.html | 463 - .../html/classmlx_1_1core_1_1_log_add_exp.png | Bin 943 -> 0 bytes ...ssmlx_1_1core_1_1_logical_and-members.html | 115 - .../classmlx_1_1core_1_1_logical_and.html | 463 - .../html/classmlx_1_1core_1_1_logical_and.png | Bin 930 -> 0 bytes ...ssmlx_1_1core_1_1_logical_not-members.html | 115 - .../classmlx_1_1core_1_1_logical_not.html | 463 - .../html/classmlx_1_1core_1_1_logical_not.png | Bin 918 -> 0 bytes ...assmlx_1_1core_1_1_logical_or-members.html | 115 - .../html/classmlx_1_1core_1_1_logical_or.html | 463 - .../html/classmlx_1_1core_1_1_logical_or.png | Bin 920 -> 0 bytes .../classmlx_1_1core_1_1_matmul-members.html | 115 - .../html/classmlx_1_1core_1_1_matmul.html | 395 - .../html/classmlx_1_1core_1_1_matmul.png | Bin 885 -> 0 bytes .../classmlx_1_1core_1_1_maximum-members.html | 115 - .../html/classmlx_1_1core_1_1_maximum.html | 463 - .../html/classmlx_1_1core_1_1_maximum.png | Bin 901 -> 0 bytes .../classmlx_1_1core_1_1_minimum-members.html | 115 - .../html/classmlx_1_1core_1_1_minimum.html | 463 - .../html/classmlx_1_1core_1_1_minimum.png | Bin 892 -> 0 bytes ...classmlx_1_1core_1_1_multiply-members.html | 115 - .../html/classmlx_1_1core_1_1_multiply.html | 463 - .../html/classmlx_1_1core_1_1_multiply.png | Bin 909 -> 0 bytes ...classmlx_1_1core_1_1_negative-members.html | 115 - .../html/classmlx_1_1core_1_1_negative.html | 463 - .../html/classmlx_1_1core_1_1_negative.png | Bin 929 -> 0 bytes ...lassmlx_1_1core_1_1_not_equal-members.html | 115 - .../html/classmlx_1_1core_1_1_not_equal.html | 463 - .../html/classmlx_1_1core_1_1_not_equal.png | Bin 916 -> 0 bytes ..._1core_1_1_number_of_elements-members.html | 115 - ...assmlx_1_1core_1_1_number_of_elements.html | 396 - ...lassmlx_1_1core_1_1_number_of_elements.png | Bin 991 -> 0 bytes .../classmlx_1_1core_1_1_pad-members.html | 115 - docs/build/html/classmlx_1_1core_1_1_pad.html | 447 - docs/build/html/classmlx_1_1core_1_1_pad.png | Bin 874 -> 0 bytes ...lassmlx_1_1core_1_1_partition-members.html | 115 - .../html/classmlx_1_1core_1_1_partition.html | 472 - .../html/classmlx_1_1core_1_1_partition.png | Bin 888 -> 0 bytes .../classmlx_1_1core_1_1_power-members.html | 115 - .../html/classmlx_1_1core_1_1_power.html | 463 - .../build/html/classmlx_1_1core_1_1_power.png | Bin 900 -> 0 bytes ...lassmlx_1_1core_1_1_primitive-members.html | 106 - .../html/classmlx_1_1core_1_1_primitive.html | 631 - .../html/classmlx_1_1core_1_1_primitive.png | Bin 3642 -> 0 bytes .../classmlx_1_1core_1_1_q_r_f-members.html | 107 - .../html/classmlx_1_1core_1_1_q_r_f.html | 273 - .../build/html/classmlx_1_1core_1_1_q_r_f.png | Bin 520 -> 0 bytes ..._1_1core_1_1_quantized_matmul-members.html | 115 - ...classmlx_1_1core_1_1_quantized_matmul.html | 447 - .../classmlx_1_1core_1_1_quantized_matmul.png | Bin 975 -> 0 bytes ...ssmlx_1_1core_1_1_random_bits-members.html | 115 - .../classmlx_1_1core_1_1_random_bits.html | 361 - .../html/classmlx_1_1core_1_1_random_bits.png | Bin 920 -> 0 bytes .../classmlx_1_1core_1_1_reduce-members.html | 122 - .../html/classmlx_1_1core_1_1_reduce.html | 472 - .../html/classmlx_1_1core_1_1_reduce.png | Bin 895 -> 0 bytes ...lassmlx_1_1core_1_1_remainder-members.html | 115 - .../html/classmlx_1_1core_1_1_remainder.html | 463 - .../html/classmlx_1_1core_1_1_remainder.png | Bin 917 -> 0 bytes .../classmlx_1_1core_1_1_reshape-members.html | 115 - .../html/classmlx_1_1core_1_1_reshape.html | 437 - .../html/classmlx_1_1core_1_1_reshape.png | Bin 910 -> 0 bytes .../classmlx_1_1core_1_1_round-members.html | 115 - .../html/classmlx_1_1core_1_1_round.html | 463 - .../build/html/classmlx_1_1core_1_1_round.png | Bin 881 -> 0 bytes .../classmlx_1_1core_1_1_s_v_d-members.html | 107 - .../html/classmlx_1_1core_1_1_s_v_d.html | 307 - .../build/html/classmlx_1_1core_1_1_s_v_d.png | Bin 520 -> 0 bytes .../classmlx_1_1core_1_1_scan-members.html | 120 - .../build/html/classmlx_1_1core_1_1_scan.html | 483 - docs/build/html/classmlx_1_1core_1_1_scan.png | Bin 884 -> 0 bytes .../classmlx_1_1core_1_1_scatter-members.html | 121 - .../html/classmlx_1_1core_1_1_scatter.html | 444 - .../html/classmlx_1_1core_1_1_scatter.png | Bin 901 -> 0 bytes .../classmlx_1_1core_1_1_select-members.html | 115 - .../html/classmlx_1_1core_1_1_select.html | 463 - .../html/classmlx_1_1core_1_1_select.png | Bin 884 -> 0 bytes .../classmlx_1_1core_1_1_sigmoid-members.html | 115 - .../html/classmlx_1_1core_1_1_sigmoid.html | 463 - .../html/classmlx_1_1core_1_1_sigmoid.png | Bin 906 -> 0 bytes .../classmlx_1_1core_1_1_sign-members.html | 115 - .../build/html/classmlx_1_1core_1_1_sign.html | 463 - docs/build/html/classmlx_1_1core_1_1_sign.png | Bin 890 -> 0 bytes .../classmlx_1_1core_1_1_sin-members.html | 115 - docs/build/html/classmlx_1_1core_1_1_sin.html | 463 - docs/build/html/classmlx_1_1core_1_1_sin.png | Bin 864 -> 0 bytes .../classmlx_1_1core_1_1_sinh-members.html | 115 - .../build/html/classmlx_1_1core_1_1_sinh.html | 463 - docs/build/html/classmlx_1_1core_1_1_sinh.png | Bin 870 -> 0 bytes .../classmlx_1_1core_1_1_slice-members.html | 115 - .../html/classmlx_1_1core_1_1_slice.html | 447 - .../build/html/classmlx_1_1core_1_1_slice.png | Bin 884 -> 0 bytes ...smlx_1_1core_1_1_slice_update-members.html | 115 - .../classmlx_1_1core_1_1_slice_update.html | 447 - .../classmlx_1_1core_1_1_slice_update.png | Bin 918 -> 0 bytes .../classmlx_1_1core_1_1_softmax-members.html | 115 - .../html/classmlx_1_1core_1_1_softmax.html | 467 - .../html/classmlx_1_1core_1_1_softmax.png | Bin 894 -> 0 bytes .../classmlx_1_1core_1_1_sort-members.html | 115 - .../build/html/classmlx_1_1core_1_1_sort.html | 467 - docs/build/html/classmlx_1_1core_1_1_sort.png | Bin 870 -> 0 bytes .../classmlx_1_1core_1_1_split-members.html | 107 - .../html/classmlx_1_1core_1_1_split.html | 426 - .../build/html/classmlx_1_1core_1_1_split.png | Bin 527 -> 0 bytes .../classmlx_1_1core_1_1_sqrt-members.html | 115 - .../build/html/classmlx_1_1core_1_1_sqrt.html | 467 - docs/build/html/classmlx_1_1core_1_1_sqrt.png | Bin 887 -> 0 bytes .../classmlx_1_1core_1_1_square-members.html | 115 - .../html/classmlx_1_1core_1_1_square.html | 463 - .../html/classmlx_1_1core_1_1_square.png | Bin 906 -> 0 bytes ...mlx_1_1core_1_1_stop_gradient-members.html | 115 - .../classmlx_1_1core_1_1_stop_gradient.html | 382 - .../classmlx_1_1core_1_1_stop_gradient.png | Bin 934 -> 0 bytes ...classmlx_1_1core_1_1_subtract-members.html | 115 - .../html/classmlx_1_1core_1_1_subtract.html | 463 - .../html/classmlx_1_1core_1_1_subtract.png | Bin 903 -> 0 bytes .../classmlx_1_1core_1_1_tan-members.html | 115 - docs/build/html/classmlx_1_1core_1_1_tan.html | 463 - docs/build/html/classmlx_1_1core_1_1_tan.png | Bin 875 -> 0 bytes .../classmlx_1_1core_1_1_tanh-members.html | 115 - .../build/html/classmlx_1_1core_1_1_tanh.html | 463 - docs/build/html/classmlx_1_1core_1_1_tanh.png | Bin 879 -> 0 bytes ...lassmlx_1_1core_1_1_transpose-members.html | 115 - .../html/classmlx_1_1core_1_1_transpose.html | 437 - .../html/classmlx_1_1core_1_1_transpose.png | Bin 914 -> 0 bytes ...x_1_1core_1_1_unary_primitive-members.html | 114 - .../classmlx_1_1core_1_1_unary_primitive.html | 534 - .../classmlx_1_1core_1_1_unary_primitive.png | Bin 32408 -> 0 bytes .../classmlx_1_1core_1_1_uniform-members.html | 115 - .../html/classmlx_1_1core_1_1_uniform.html | 352 - .../html/classmlx_1_1core_1_1_uniform.png | Bin 876 -> 0 bytes ...re_1_1allocator_1_1_allocator-members.html | 98 - ...lx_1_1core_1_1allocator_1_1_allocator.html | 338 - ...mlx_1_1core_1_1allocator_1_1_allocator.png | Bin 1087 -> 0 bytes ...1core_1_1allocator_1_1_buffer-members.html | 94 - ...ssmlx_1_1core_1_1allocator_1_1_buffer.html | 201 - ...llocator_1_1_common_allocator-members.html | 99 - ...ore_1_1allocator_1_1_common_allocator.html | 219 - ...core_1_1allocator_1_1_common_allocator.png | Bin 724 -> 0 bytes .../classmlx_1_1core_1_1array-members.html | 159 - .../build/html/classmlx_1_1core_1_1array.html | 2000 -- ...lx_1_1core_1_1fast_1_1_custom-members.html | 107 - .../classmlx_1_1core_1_1fast_1_1_custom.html | 306 - .../classmlx_1_1core_1_1fast_1_1_custom.png | Bin 2664 -> 0 bytes ..._1core_1_1fast_1_1_layer_norm-members.html | 109 - ...assmlx_1_1core_1_1fast_1_1_layer_norm.html | 327 - ...lassmlx_1_1core_1_1fast_1_1_layer_norm.png | Bin 951 -> 0 bytes ..._1_1fast_1_1_layer_norm_v_j_p-members.html | 109 - ..._1_1core_1_1fast_1_1_layer_norm_v_j_p.html | 284 - ...x_1_1core_1_1fast_1_1_layer_norm_v_j_p.png | Bin 994 -> 0 bytes ..._1core_1_1fast_1_1_r_m_s_norm-members.html | 109 - ...assmlx_1_1core_1_1fast_1_1_r_m_s_norm.html | 327 - ...lassmlx_1_1core_1_1fast_1_1_r_m_s_norm.png | Bin 927 -> 0 bytes ..._1_1fast_1_1_r_m_s_norm_v_j_p-members.html | 109 - ..._1_1core_1_1fast_1_1_r_m_s_norm_v_j_p.html | 284 - ...x_1_1core_1_1fast_1_1_r_m_s_norm_v_j_p.png | Bin 981 -> 0 bytes ...lx_1_1core_1_1fast_1_1_ro_p_e-members.html | 109 - .../classmlx_1_1core_1_1fast_1_1_ro_p_e.html | 352 - .../classmlx_1_1core_1_1fast_1_1_ro_p_e.png | Bin 863 -> 0 bytes ..._scaled_dot_product_attention-members.html | 110 - ...fast_1_1_scaled_dot_product_attention.html | 333 - ...1fast_1_1_scaled_dot_product_attention.png | Bin 1075 -> 0 bytes ...1_1core_1_1io_1_1_file_reader-members.html | 98 - ...lassmlx_1_1core_1_1io_1_1_file_reader.html | 346 - ...classmlx_1_1core_1_1io_1_1_file_reader.png | Bin 642 -> 0 bytes ...1_1core_1_1io_1_1_file_writer-members.html | 98 - ...lassmlx_1_1core_1_1io_1_1_file_writer.html | 346 - ...classmlx_1_1core_1_1io_1_1_file_writer.png | Bin 612 -> 0 bytes ...smlx_1_1core_1_1io_1_1_reader-members.html | 96 - .../classmlx_1_1core_1_1io_1_1_reader.html | 291 - .../classmlx_1_1core_1_1io_1_1_reader.png | Bin 647 -> 0 bytes ...smlx_1_1core_1_1io_1_1_writer-members.html | 96 - .../classmlx_1_1core_1_1io_1_1_writer.html | 291 - .../classmlx_1_1core_1_1io_1_1_writer.png | Bin 619 -> 0 bytes ...x_1_1core_1_1metal_1_1_device-members.html | 112 - .../classmlx_1_1core_1_1metal_1_1_device.html | 635 - ..._1_1metal_1_1_metal_allocator-members.html | 106 - ..._1_1core_1_1metal_1_1_metal_allocator.html | 388 - ...x_1_1core_1_1metal_1_1_metal_allocator.png | Bin 680 -> 0 bytes ...re_1_1random_1_1_key_sequence-members.html | 94 - ...lx_1_1core_1_1random_1_1_key_sequence.html | 197 - ...re_1_1scheduler_1_1_scheduler-members.html | 104 - ...lx_1_1core_1_1scheduler_1_1_scheduler.html | 478 - ...etfft_1_1detail_1_1_t__dcst23-members.html | 93 - ...lasspocketfft_1_1detail_1_1_t__dcst23.html | 210 - ...ketfft_1_1detail_1_1_t__dcst4-members.html | 93 - ...classpocketfft_1_1detail_1_1_t__dcst4.html | 210 - ...cketfft_1_1detail_1_1_t__dct1-members.html | 93 - .../classpocketfft_1_1detail_1_1_t__dct1.html | 210 - ...cketfft_1_1detail_1_1_t__dst1-members.html | 93 - .../classpocketfft_1_1detail_1_1_t__dst1.html | 210 - ...asspocketfft_1_1detail_1_1arr-members.html | 100 - .../html/classpocketfft_1_1detail_1_1arr.html | 391 - ...ketfft_1_1detail_1_1arr__info-members.html | 99 - ...classpocketfft_1_1detail_1_1arr__info.html | 357 - .../classpocketfft_1_1detail_1_1arr__info.png | Bin 1040 -> 0 bytes ...spocketfft_1_1detail_1_1cfftp-members.html | 92 - .../classpocketfft_1_1detail_1_1cfftp.html | 171 - ...pocketfft_1_1detail_1_1cndarr-members.html | 102 - .../classpocketfft_1_1detail_1_1cndarr.html | 229 - .../classpocketfft_1_1detail_1_1cndarr.png | Bin 1037 -> 0 bytes ...ocketfft_1_1detail_1_1fftblue-members.html | 93 - .../classpocketfft_1_1detail_1_1fftblue.html | 212 - ...tfft_1_1detail_1_1multi__iter-members.html | 101 - ...asspocketfft_1_1detail_1_1multi__iter.html | 437 - ...spocketfft_1_1detail_1_1ndarr-members.html | 104 - .../classpocketfft_1_1detail_1_1ndarr.html | 209 - .../classpocketfft_1_1detail_1_1ndarr.png | Bin 1032 -> 0 bytes ...fft_1_1detail_1_1pocketfft__c-members.html | 93 - ...sspocketfft_1_1detail_1_1pocketfft__c.html | 200 - ...fft_1_1detail_1_1pocketfft__r-members.html | 93 - ...sspocketfft_1_1detail_1_1pocketfft__r.html | 200 - ...ketfft_1_1detail_1_1rev__iter-members.html | 95 - ...classpocketfft_1_1detail_1_1rev__iter.html | 240 - ...spocketfft_1_1detail_1_1rfftp-members.html | 92 - .../classpocketfft_1_1detail_1_1rfftp.html | 171 - ...fft_1_1detail_1_1simple__iter-members.html | 94 - ...sspocketfft_1_1detail_1_1simple__iter.html | 209 - ...t_1_1detail_1_1sincos__2pibyn-members.html | 92 - ...pocketfft_1_1detail_1_1sincos__2pibyn.html | 159 - ...hreading_1_1concurrent__queue-members.html | 93 - ...ail_1_1threading_1_1concurrent__queue.html | 187 - ...1detail_1_1threading_1_1latch-members.html | 94 - ...etfft_1_1detail_1_1threading_1_1latch.html | 209 - ..._1_1threading_1_1thread__pool-members.html | 96 - ..._1detail_1_1threading_1_1thread__pool.html | 263 - docs/build/html/clipboard.js | 61 - docs/build/html/closed.png | Bin 132 -> 0 bytes docs/build/html/common_2binary_8h.html | 117 - docs/build/html/common_2binary_8h_source.html | 764 - .../html/common_2compiled__preamble_8h.html | 118 - .../common_2compiled__preamble_8h_source.html | 107 - docs/build/html/common_2copy_8h.html | 122 - docs/build/html/common_2copy_8h_source.html | 145 - docs/build/html/common_2reduce_8h.html | 136 - docs/build/html/common_2reduce_8h_source.html | 483 - docs/build/html/common_2ternary_8h.html | 103 - .../build/html/common_2ternary_8h_source.html | 327 - docs/build/html/common_2unary_8h.html | 103 - docs/build/html/common_2unary_8h_source.html | 229 - docs/build/html/compile_8h.html | 130 - docs/build/html/compile_8h_source.html | 123 - docs/build/html/compile__impl_8h.html | 108 - docs/build/html/compile__impl_8h_source.html | 107 - docs/build/html/compiled_8h.html | 131 - docs/build/html/compiled_8h_source.html | 195 - docs/build/html/conv_2loader_8h.html | 91 - docs/build/html/conv_2loader_8h_source.html | 100 - docs/build/html/conv_2params_8h.html | 111 - docs/build/html/conv_2params_8h_source.html | 202 - docs/build/html/conv_8h.html | 92 - docs/build/html/conv_8h_source.html | 108 - docs/build/html/cookie.js | 58 - docs/build/html/cpp/ops.html | 12 +- docs/build/html/defines_8h.html | 309 - docs/build/html/defines_8h_source.html | 119 - docs/build/html/dev/extensions.html | 12 +- docs/build/html/dev/metal_debugger.html | 12 +- docs/build/html/device_8h.html | 117 - docs/build/html/device_8h_source.html | 139 - .../dir_1683daa6c50d5a1449f58a10604f9f12.html | 93 - .../dir_1d446c9bd3c99228254c9484e0bc5c06.html | 97 - .../dir_2193406f5b2eae6fc53753d8a9a80df3.html | 95 - .../dir_47795aa8999234f6f402f7e89d34d08e.html | 99 - .../dir_6768c99e6145fb9510ccdb40db8ede25.html | 101 - .../dir_70a37effa88bcbd6b791977fa1e64356.html | 126 - .../dir_76215a6c54e2b67053e723fc2395583c.html | 100 - .../dir_86b95e7b1d0d6e25466bb9213752d32f.html | 93 - .../dir_938ab0ecf10b8b860ff766c820f665fd.html | 146 - .../dir_ad00dcd1517bfdbe01f68ec9b4eff877.html | 93 - .../dir_ba4426224ef60f409462a2a12fa18f06.html | 97 - .../dir_d0c977ea65824390717cdb7efc36c157.html | 116 - .../dir_df9494e83ef22ae6150a0e080d9709ed.html | 102 - .../dir_f149b24a1b5be11cd70151abe517e3f8.html | 117 - .../dir_f60cd69d27fd3faa641c79056fff0e2d.html | 97 - docs/build/html/doc.svg | 12 - docs/build/html/docd.svg | 12 - docs/build/html/doxygen.css | 2225 --- docs/build/html/doxygen.svg | 28 - docs/build/html/doxygen_crawl.html | 1137 -- docs/build/html/dtype_8h.html | 181 - docs/build/html/dtype_8h_source.html | 282 - docs/build/html/dynsections.js | 194 - docs/build/html/erf_8h.html | 135 - docs/build/html/erf_8h_source.html | 173 - docs/build/html/event_8h.html | 108 - docs/build/html/event_8h_source.html | 174 - .../html/examples/linear_regression.html | 12 +- docs/build/html/examples/llama-inference.html | 12 +- docs/build/html/examples/mlp.html | 12 +- docs/build/html/expm1f_8h.html | 139 - docs/build/html/expm1f_8h_source.html | 189 - docs/build/html/fast_8h.html | 116 - docs/build/html/fast_8h_source.html | 143 - docs/build/html/fast__primitives_8h.html | 120 - .../html/fast__primitives_8h_source.html | 396 - docs/build/html/fft_8h.html | 177 - docs/build/html/fft_8h_source.html | 281 - docs/build/html/files.html | 184 - docs/build/html/folderclosed.svg | 11 - docs/build/html/folderclosedd.svg | 11 - docs/build/html/folderopen.svg | 17 - docs/build/html/folderopend.svg | 12 - docs/build/html/fp16_8h.html | 741 - docs/build/html/fp16_8h_source.html | 369 - docs/build/html/functions.html | 86 - docs/build/html/functions_a.html | 128 - docs/build/html/functions_b.html | 113 - docs/build/html/functions_c.html | 122 - docs/build/html/functions_d.html | 111 - docs/build/html/functions_e.html | 104 - docs/build/html/functions_enum.html | 90 - docs/build/html/functions_eval.html | 100 - docs/build/html/functions_f.html | 102 - docs/build/html/functions_func.html | 86 - docs/build/html/functions_func_a.html | 115 - docs/build/html/functions_func_b.html | 95 - docs/build/html/functions_func_c.html | 114 - docs/build/html/functions_func_d.html | 103 - docs/build/html/functions_func_e.html | 102 - docs/build/html/functions_func_f.html | 92 - docs/build/html/functions_func_g.html | 102 - docs/build/html/functions_func_h.html | 85 - docs/build/html/functions_func_i.html | 101 - docs/build/html/functions_func_j.html | 85 - docs/build/html/functions_func_k.html | 85 - docs/build/html/functions_func_l.html | 105 - docs/build/html/functions_func_m.html | 97 - docs/build/html/functions_func_n.html | 96 - docs/build/html/functions_func_o.html | 104 - docs/build/html/functions_func_p.html | 97 - docs/build/html/functions_func_q.html | 87 - docs/build/html/functions_func_r.html | 107 - docs/build/html/functions_func_s.html | 146 - docs/build/html/functions_func_t.html | 98 - docs/build/html/functions_func_u.html | 87 - docs/build/html/functions_func_v.html | 89 - docs/build/html/functions_func_w.html | 87 - docs/build/html/functions_func_~.html | 98 - docs/build/html/functions_g.html | 107 - docs/build/html/functions_h.html | 85 - docs/build/html/functions_i.html | 112 - docs/build/html/functions_j.html | 88 - docs/build/html/functions_k.html | 89 - docs/build/html/functions_l.html | 112 - docs/build/html/functions_m.html | 110 - docs/build/html/functions_n.html | 103 - docs/build/html/functions_o.html | 112 - docs/build/html/functions_p.html | 100 - docs/build/html/functions_q.html | 89 - docs/build/html/functions_r.html | 119 - docs/build/html/functions_rela.html | 85 - docs/build/html/functions_s.html | 164 - docs/build/html/functions_t.html | 122 - docs/build/html/functions_type.html | 92 - docs/build/html/functions_u.html | 88 - docs/build/html/functions_v.html | 95 - docs/build/html/functions_vars.html | 91 - docs/build/html/functions_vars_b.html | 102 - docs/build/html/functions_vars_c.html | 91 - docs/build/html/functions_vars_d.html | 91 - docs/build/html/functions_vars_e.html | 85 - docs/build/html/functions_vars_f.html | 94 - docs/build/html/functions_vars_g.html | 89 - docs/build/html/functions_vars_i.html | 95 - docs/build/html/functions_vars_j.html | 87 - docs/build/html/functions_vars_k.html | 87 - docs/build/html/functions_vars_l.html | 88 - docs/build/html/functions_vars_m.html | 95 - docs/build/html/functions_vars_n.html | 91 - docs/build/html/functions_vars_o.html | 88 - docs/build/html/functions_vars_p.html | 86 - docs/build/html/functions_vars_q.html | 86 - docs/build/html/functions_vars_r.html | 93 - docs/build/html/functions_vars_s.html | 103 - docs/build/html/functions_vars_t.html | 106 - docs/build/html/functions_vars_v.html | 87 - docs/build/html/functions_vars_w.html | 91 - docs/build/html/functions_w.html | 94 - docs/build/html/functions_x.html | 85 - docs/build/html/functions_~.html | 98 - docs/build/html/gemm_2loader_8h.html | 108 - docs/build/html/gemm_2loader_8h_source.html | 247 - docs/build/html/gemm_2params_8h.html | 109 - docs/build/html/gemm_2params_8h_source.html | 195 - docs/build/html/genindex.html | 22 +- docs/build/html/gguf_8h.html | 112 - docs/build/html/gguf_8h_source.html | 119 - docs/build/html/globals.html | 88 - docs/build/html/globals_a.html | 85 - docs/build/html/globals_b.html | 97 - docs/build/html/globals_c.html | 91 - docs/build/html/globals_d.html | 89 - docs/build/html/globals_defs.html | 220 - docs/build/html/globals_e.html | 96 - docs/build/html/globals_f.html | 88 - docs/build/html/globals_func.html | 85 - docs/build/html/globals_func_c.html | 85 - docs/build/html/globals_func_e.html | 96 - docs/build/html/globals_func_f.html | 85 - docs/build/html/globals_func_g.html | 85 - docs/build/html/globals_func_l.html | 85 - docs/build/html/globals_func_m.html | 95 - docs/build/html/globals_func_o.html | 100 - docs/build/html/globals_func_s.html | 85 - docs/build/html/globals_g.html | 85 - docs/build/html/globals_h.html | 91 - docs/build/html/globals_i.html | 122 - docs/build/html/globals_l.html | 85 - docs/build/html/globals_m.html | 101 - docs/build/html/globals_n.html | 85 - docs/build/html/globals_o.html | 101 - docs/build/html/globals_p.html | 104 - docs/build/html/globals_r.html | 87 - docs/build/html/globals_s.html | 90 - docs/build/html/globals_type.html | 84 - docs/build/html/globals_u.html | 86 - docs/build/html/globals_vars.html | 102 - docs/build/html/graph__utils_8h.html | 120 - docs/build/html/graph__utils_8h_source.html | 136 - docs/build/html/group__ops.html | 9308 --------- docs/build/html/half__types_8h.html | 197 - docs/build/html/half__types_8h_source.html | 158 - docs/build/html/hierarchy.html | 443 - docs/build/html/index.html | 12 +- docs/build/html/indexing_8h.html | 594 - docs/build/html/indexing_8h_source.html | 155 - docs/build/html/install.html | 27 +- docs/build/html/io_8h.html | 144 - docs/build/html/io_8h_source.html | 161 - docs/build/html/jquery.js | 34 - .../html/kernels_2steel_2gemm_2gemm_8h.html | 112 - .../kernels_2steel_2gemm_2gemm_8h_source.html | 413 - docs/build/html/lapack__helper_8h.html | 116 - docs/build/html/lapack__helper_8h_source.html | 115 - docs/build/html/linalg_8h.html | 131 - docs/build/html/linalg_8h_source.html | 172 - docs/build/html/load_8h.html | 116 - docs/build/html/load_8h_source.html | 282 - docs/build/html/loader__channel__l_8h.html | 111 - .../html/loader__channel__l_8h_source.html | 653 - docs/build/html/loader__channel__n_8h.html | 119 - .../html/loader__channel__n_8h_source.html | 499 - docs/build/html/loader__general_8h.html | 109 - .../build/html/loader__general_8h_source.html | 465 - docs/build/html/matmul_8h.html | 115 - docs/build/html/matmul_8h_source.html | 154 - docs/build/html/menu.js | 134 - docs/build/html/menudata.js | 225 - .../html/metal_2compiled__preamble_8h.html | 107 - .../metal_2compiled__preamble_8h_source.html | 103 - docs/build/html/metal_2copy_8h.html | 116 - docs/build/html/metal_2copy_8h_source.html | 140 - .../build/html/metal_2kernels_2binary_8h.html | 147 - .../metal_2kernels_2binary_8h_source.html | 559 - ...metal_2kernels_2compiled__preamble_8h.html | 115 - ...kernels_2compiled__preamble_8h_source.html | 103 - .../html/metal_2kernels_2ternary_8h.html | 97 - .../metal_2kernels_2ternary_8h_source.html | 108 - docs/build/html/metal_2kernels_2unary_8h.html | 165 - .../html/metal_2kernels_2unary_8h_source.html | 811 - docs/build/html/metal_2reduce_8h.html | 112 - docs/build/html/metal_2reduce_8h_source.html | 145 - docs/build/html/metal_8h.html | 131 - docs/build/html/metal_8h_source.html | 177 - docs/build/html/metal__impl_8h.html | 121 - docs/build/html/metal__impl_8h_source.html | 124 - docs/build/html/minus.svg | 8 - docs/build/html/minusd.svg | 8 - docs/build/html/mlx_8h.html | 102 - docs/build/html/mlx_8h_source.html | 122 - docs/build/html/mma_8h.html | 110 - docs/build/html/mma_8h_source.html | 491 - docs/build/html/mps_2gemm_8h.html | 235 - docs/build/html/mps_2gemm_8h_source.html | 572 - docs/build/html/namespace_m_p_s.html | 160 - docs/build/html/namespace_m_t_l.html | 91 - .../html/namespace_m_t_l_1_1_private.html | 97 - ...namespace_m_t_l_1_1_private_1_1_class.html | 227 - ...espace_m_t_l_1_1_private_1_1_selector.html | 439 - docs/build/html/namespacemembers.html | 86 - docs/build/html/namespacemembers_a.html | 122 - docs/build/html/namespacemembers_b.html | 100 - docs/build/html/namespacemembers_c.html | 131 - docs/build/html/namespacemembers_d.html | 107 - docs/build/html/namespacemembers_e.html | 99 - docs/build/html/namespacemembers_enum.html | 86 - docs/build/html/namespacemembers_eval.html | 93 - docs/build/html/namespacemembers_f.html | 111 - docs/build/html/namespacemembers_func.html | 86 - docs/build/html/namespacemembers_func_a.html | 121 - docs/build/html/namespacemembers_func_b.html | 96 - docs/build/html/namespacemembers_func_c.html | 119 - docs/build/html/namespacemembers_func_d.html | 100 - docs/build/html/namespacemembers_func_e.html | 98 - docs/build/html/namespacemembers_func_f.html | 106 - docs/build/html/namespacemembers_func_g.html | 102 - docs/build/html/namespacemembers_func_i.html | 104 - docs/build/html/namespacemembers_func_j.html | 85 - docs/build/html/namespacemembers_func_k.html | 86 - docs/build/html/namespacemembers_func_l.html | 102 - docs/build/html/namespacemembers_func_m.html | 102 - docs/build/html/namespacemembers_func_n.html | 96 - docs/build/html/namespacemembers_func_o.html | 112 - docs/build/html/namespacemembers_func_p.html | 98 - docs/build/html/namespacemembers_func_q.html | 87 - docs/build/html/namespacemembers_func_r.html | 108 - docs/build/html/namespacemembers_func_s.html | 146 - docs/build/html/namespacemembers_func_t.html | 103 - docs/build/html/namespacemembers_func_u.html | 85 - docs/build/html/namespacemembers_func_v.html | 90 - docs/build/html/namespacemembers_func_w.html | 86 - docs/build/html/namespacemembers_func_z.html | 86 - docs/build/html/namespacemembers_g.html | 109 - docs/build/html/namespacemembers_i.html | 112 - docs/build/html/namespacemembers_j.html | 85 - docs/build/html/namespacemembers_k.html | 86 - docs/build/html/namespacemembers_l.html | 102 - docs/build/html/namespacemembers_m.html | 104 - docs/build/html/namespacemembers_n.html | 98 - docs/build/html/namespacemembers_o.html | 112 - docs/build/html/namespacemembers_p.html | 98 - docs/build/html/namespacemembers_q.html | 87 - docs/build/html/namespacemembers_r.html | 109 - docs/build/html/namespacemembers_s.html | 152 - docs/build/html/namespacemembers_t.html | 103 - docs/build/html/namespacemembers_type.html | 98 - docs/build/html/namespacemembers_u.html | 90 - docs/build/html/namespacemembers_v.html | 92 - docs/build/html/namespacemembers_vars.html | 156 - docs/build/html/namespacemembers_w.html | 86 - docs/build/html/namespacemembers_z.html | 86 - docs/build/html/namespacemetal.html | 1661 -- docs/build/html/namespacemetal_1_1fast.html | 1178 -- .../build/html/namespacemetal_1_1precise.html | 1178 -- docs/build/html/namespacemlx.html | 93 - docs/build/html/namespacemlx_1_1core.html | 16317 ---------------- .../namespacemlx_1_1core_1_1allocator.html | 180 - .../html/namespacemlx_1_1core_1_1detail.html | 439 - .../html/namespacemlx_1_1core_1_1fast.html | 277 - .../html/namespacemlx_1_1core_1_1fft.html | 1082 - .../html/namespacemlx_1_1core_1_1io.html | 101 - .../html/namespacemlx_1_1core_1_1linalg.html | 442 - .../html/namespacemlx_1_1core_1_1metal.html | 519 - .../html/namespacemlx_1_1core_1_1random.html | 1149 -- .../namespacemlx_1_1core_1_1scheduler.html | 255 - docs/build/html/namespacemlx_1_1steel.html | 147 - docs/build/html/namespacepocketfft.html | 91 - .../html/namespacepocketfft_1_1detail.html | 1725 -- ...spacepocketfft_1_1detail_1_1threading.html | 245 - docs/build/html/namespaces.html | 369 - docs/build/html/nav_f.png | Bin 153 -> 0 bytes docs/build/html/nav_fd.png | Bin 169 -> 0 bytes docs/build/html/nav_g.png | Bin 95 -> 0 bytes docs/build/html/nav_h.png | Bin 98 -> 0 bytes docs/build/html/nav_hd.png | Bin 114 -> 0 bytes docs/build/html/objects.inv | Bin 24021 -> 24081 bytes docs/build/html/open.png | Bin 123 -> 0 bytes docs/build/html/ops_8h.html | 885 - docs/build/html/ops_8h_source.html | 1455 -- docs/build/html/plus.svg | 9 - docs/build/html/plusd.svg | 9 - docs/build/html/pocketfft_8h.html | 1134 -- docs/build/html/pocketfft_8h_source.html | 4170 ---- docs/build/html/primitives_8h.html | 421 - docs/build/html/primitives_8h_source.html | 2932 --- .../python/_autosummary/mlx.core.Device.html | 12 +- .../python/_autosummary/mlx.core.Dtype.html | 12 +- .../_autosummary/mlx.core.DtypeCategory.html | 12 +- .../python/_autosummary/mlx.core.Stream.html | 12 +- .../python/_autosummary/mlx.core.abs.html | 12 +- .../python/_autosummary/mlx.core.add.html | 12 +- .../python/_autosummary/mlx.core.addmm.html | 12 +- .../python/_autosummary/mlx.core.all.html | 12 +- .../_autosummary/mlx.core.allclose.html | 12 +- .../python/_autosummary/mlx.core.any.html | 12 +- .../python/_autosummary/mlx.core.arange.html | 12 +- .../python/_autosummary/mlx.core.arccos.html | 12 +- .../python/_autosummary/mlx.core.arccosh.html | 12 +- .../python/_autosummary/mlx.core.arcsin.html | 12 +- .../python/_autosummary/mlx.core.arcsinh.html | 12 +- .../python/_autosummary/mlx.core.arctan.html | 12 +- .../python/_autosummary/mlx.core.arctan2.html | 12 +- .../python/_autosummary/mlx.core.arctanh.html | 12 +- .../python/_autosummary/mlx.core.argmax.html | 12 +- .../python/_autosummary/mlx.core.argmin.html | 12 +- .../_autosummary/mlx.core.argpartition.html | 12 +- .../python/_autosummary/mlx.core.argsort.html | 12 +- .../python/_autosummary/mlx.core.array.T.html | 12 +- .../_autosummary/mlx.core.array.abs.html | 12 +- .../_autosummary/mlx.core.array.all.html | 12 +- .../_autosummary/mlx.core.array.any.html | 12 +- .../_autosummary/mlx.core.array.argmax.html | 12 +- .../_autosummary/mlx.core.array.argmin.html | 12 +- .../_autosummary/mlx.core.array.astype.html | 12 +- .../_autosummary/mlx.core.array.at.html | 12 +- .../_autosummary/mlx.core.array.cos.html | 12 +- .../_autosummary/mlx.core.array.cummax.html | 12 +- .../_autosummary/mlx.core.array.cummin.html | 12 +- .../_autosummary/mlx.core.array.cumprod.html | 12 +- .../_autosummary/mlx.core.array.cumsum.html | 12 +- .../_autosummary/mlx.core.array.diag.html | 12 +- .../_autosummary/mlx.core.array.diagonal.html | 12 +- .../_autosummary/mlx.core.array.dtype.html | 12 +- .../_autosummary/mlx.core.array.exp.html | 12 +- .../_autosummary/mlx.core.array.flatten.html | 12 +- .../python/_autosummary/mlx.core.array.html | 12 +- .../_autosummary/mlx.core.array.item.html | 12 +- .../_autosummary/mlx.core.array.itemsize.html | 12 +- .../_autosummary/mlx.core.array.log.html | 12 +- .../_autosummary/mlx.core.array.log10.html | 12 +- .../_autosummary/mlx.core.array.log1p.html | 12 +- .../_autosummary/mlx.core.array.log2.html | 12 +- .../mlx.core.array.logsumexp.html | 12 +- .../_autosummary/mlx.core.array.max.html | 12 +- .../_autosummary/mlx.core.array.mean.html | 12 +- .../_autosummary/mlx.core.array.min.html | 12 +- .../_autosummary/mlx.core.array.moveaxis.html | 12 +- .../_autosummary/mlx.core.array.nbytes.html | 12 +- .../_autosummary/mlx.core.array.ndim.html | 12 +- .../_autosummary/mlx.core.array.prod.html | 12 +- .../mlx.core.array.reciprocal.html | 12 +- .../_autosummary/mlx.core.array.reshape.html | 12 +- .../_autosummary/mlx.core.array.round.html | 12 +- .../_autosummary/mlx.core.array.rsqrt.html | 12 +- .../_autosummary/mlx.core.array.shape.html | 12 +- .../_autosummary/mlx.core.array.sin.html | 12 +- .../_autosummary/mlx.core.array.size.html | 12 +- .../_autosummary/mlx.core.array.split.html | 12 +- .../_autosummary/mlx.core.array.sqrt.html | 12 +- .../_autosummary/mlx.core.array.square.html | 12 +- .../_autosummary/mlx.core.array.squeeze.html | 12 +- .../_autosummary/mlx.core.array.sum.html | 12 +- .../_autosummary/mlx.core.array.swapaxes.html | 12 +- .../_autosummary/mlx.core.array.tolist.html | 12 +- .../mlx.core.array.transpose.html | 12 +- .../_autosummary/mlx.core.array.var.html | 12 +- .../_autosummary/mlx.core.array_equal.html | 12 +- .../_autosummary/mlx.core.as_strided.html | 12 +- .../_autosummary/mlx.core.atleast_1d.html | 12 +- .../_autosummary/mlx.core.atleast_2d.html | 12 +- .../_autosummary/mlx.core.atleast_3d.html | 12 +- .../_autosummary/mlx.core.bitwise_and.html | 12 +- .../_autosummary/mlx.core.bitwise_or.html | 12 +- .../_autosummary/mlx.core.bitwise_xor.html | 12 +- .../mlx.core.block_masked_mm.html | 24 +- .../mlx.core.block_sparse_mm.html | 58 +- .../_autosummary/mlx.core.broadcast_to.html | 18 +- .../python/_autosummary/mlx.core.ceil.html | 12 +- .../python/_autosummary/mlx.core.clip.html | 12 +- .../python/_autosummary/mlx.core.compile.html | 12 +- .../_autosummary/mlx.core.concatenate.html | 12 +- .../python/_autosummary/mlx.core.conj.html | 12 +- .../_autosummary/mlx.core.conjugate.html | 12 +- .../python/_autosummary/mlx.core.conv1d.html | 12 +- .../python/_autosummary/mlx.core.conv2d.html | 12 +- .../_autosummary/mlx.core.conv_general.html | 12 +- .../_autosummary/mlx.core.convolve.html | 12 +- .../python/_autosummary/mlx.core.cos.html | 12 +- .../python/_autosummary/mlx.core.cosh.html | 12 +- .../python/_autosummary/mlx.core.cummax.html | 12 +- .../python/_autosummary/mlx.core.cummin.html | 12 +- .../python/_autosummary/mlx.core.cumprod.html | 12 +- .../python/_autosummary/mlx.core.cumsum.html | 12 +- .../_autosummary/mlx.core.default_device.html | 12 +- .../_autosummary/mlx.core.default_stream.html | 12 +- .../python/_autosummary/mlx.core.degrees.html | 12 +- .../_autosummary/mlx.core.dequantize.html | 12 +- .../python/_autosummary/mlx.core.diag.html | 12 +- .../_autosummary/mlx.core.diagonal.html | 12 +- .../mlx.core.disable_compile.html | 12 +- .../python/_autosummary/mlx.core.divide.html | 12 +- .../python/_autosummary/mlx.core.divmod.html | 12 +- .../_autosummary/mlx.core.enable_compile.html | 12 +- .../python/_autosummary/mlx.core.equal.html | 12 +- .../python/_autosummary/mlx.core.erf.html | 12 +- .../python/_autosummary/mlx.core.erfinv.html | 12 +- .../python/_autosummary/mlx.core.eval.html | 12 +- .../python/_autosummary/mlx.core.exp.html | 12 +- .../_autosummary/mlx.core.expand_dims.html | 12 +- .../python/_autosummary/mlx.core.expm1.html | 12 +- .../python/_autosummary/mlx.core.eye.html | 12 +- .../mlx.core.fast.layer_norm.html | 12 +- .../_autosummary/mlx.core.fast.rms_norm.html | 12 +- .../_autosummary/mlx.core.fast.rope.html | 12 +- ...ore.fast.scaled_dot_product_attention.html | 12 +- .../python/_autosummary/mlx.core.fft.fft.html | 12 +- .../_autosummary/mlx.core.fft.fft2.html | 12 +- .../_autosummary/mlx.core.fft.fftn.html | 12 +- .../_autosummary/mlx.core.fft.ifft.html | 12 +- .../_autosummary/mlx.core.fft.ifft2.html | 12 +- .../_autosummary/mlx.core.fft.ifftn.html | 12 +- .../_autosummary/mlx.core.fft.irfft.html | 12 +- .../_autosummary/mlx.core.fft.irfft2.html | 12 +- .../_autosummary/mlx.core.fft.irfftn.html | 12 +- .../_autosummary/mlx.core.fft.rfft.html | 12 +- .../_autosummary/mlx.core.fft.rfft2.html | 12 +- .../_autosummary/mlx.core.fft.rfftn.html | 12 +- .../python/_autosummary/mlx.core.flatten.html | 12 +- .../python/_autosummary/mlx.core.floor.html | 12 +- .../_autosummary/mlx.core.floor_divide.html | 12 +- .../python/_autosummary/mlx.core.full.html | 18 +- .../_autosummary/mlx.core.gather_mm.html | 943 + .../_autosummary/mlx.core.gather_qmm.html | 957 + .../python/_autosummary/mlx.core.grad.html | 12 +- .../python/_autosummary/mlx.core.greater.html | 18 +- .../_autosummary/mlx.core.greater_equal.html | 12 +- .../_autosummary/mlx.core.identity.html | 12 +- .../python/_autosummary/mlx.core.inner.html | 12 +- .../python/_autosummary/mlx.core.isclose.html | 12 +- .../python/_autosummary/mlx.core.isinf.html | 12 +- .../python/_autosummary/mlx.core.isnan.html | 12 +- .../_autosummary/mlx.core.isneginf.html | 12 +- .../_autosummary/mlx.core.isposinf.html | 12 +- .../_autosummary/mlx.core.issubdtype.html | 12 +- .../python/_autosummary/mlx.core.jvp.html | 12 +- .../_autosummary/mlx.core.left_shift.html | 12 +- .../python/_autosummary/mlx.core.less.html | 12 +- .../_autosummary/mlx.core.less_equal.html | 12 +- .../mlx.core.linalg.cholesky.html | 12 +- .../_autosummary/mlx.core.linalg.inv.html | 12 +- .../_autosummary/mlx.core.linalg.norm.html | 12 +- .../_autosummary/mlx.core.linalg.qr.html | 12 +- .../_autosummary/mlx.core.linalg.svd.html | 12 +- .../_autosummary/mlx.core.linspace.html | 12 +- .../python/_autosummary/mlx.core.load.html | 12 +- .../python/_autosummary/mlx.core.log.html | 12 +- .../python/_autosummary/mlx.core.log10.html | 12 +- .../python/_autosummary/mlx.core.log1p.html | 12 +- .../python/_autosummary/mlx.core.log2.html | 12 +- .../_autosummary/mlx.core.logaddexp.html | 12 +- .../_autosummary/mlx.core.logical_and.html | 12 +- .../_autosummary/mlx.core.logical_not.html | 12 +- .../_autosummary/mlx.core.logical_or.html | 12 +- .../_autosummary/mlx.core.logsumexp.html | 12 +- .../python/_autosummary/mlx.core.matmul.html | 12 +- .../python/_autosummary/mlx.core.max.html | 12 +- .../python/_autosummary/mlx.core.maximum.html | 12 +- .../python/_autosummary/mlx.core.mean.html | 12 +- .../_autosummary/mlx.core.meshgrid.html | 12 +- .../mlx.core.metal.clear_cache.html | 12 +- .../mlx.core.metal.device_info.html | 12 +- .../mlx.core.metal.get_active_memory.html | 12 +- .../mlx.core.metal.get_cache_memory.html | 12 +- .../mlx.core.metal.get_peak_memory.html | 12 +- .../mlx.core.metal.is_available.html | 12 +- .../mlx.core.metal.reset_peak_memory.html | 12 +- .../mlx.core.metal.set_cache_limit.html | 12 +- .../mlx.core.metal.set_memory_limit.html | 12 +- .../mlx.core.metal.start_capture.html | 12 +- .../mlx.core.metal.stop_capture.html | 12 +- .../python/_autosummary/mlx.core.min.html | 12 +- .../python/_autosummary/mlx.core.minimum.html | 12 +- .../_autosummary/mlx.core.moveaxis.html | 12 +- .../_autosummary/mlx.core.multiply.html | 12 +- .../_autosummary/mlx.core.negative.html | 12 +- .../_autosummary/mlx.core.new_stream.html | 12 +- .../_autosummary/mlx.core.not_equal.html | 12 +- .../python/_autosummary/mlx.core.ones.html | 12 +- .../_autosummary/mlx.core.ones_like.html | 12 +- .../python/_autosummary/mlx.core.outer.html | 12 +- .../python/_autosummary/mlx.core.pad.html | 12 +- .../_autosummary/mlx.core.partition.html | 12 +- .../python/_autosummary/mlx.core.power.html | 12 +- .../python/_autosummary/mlx.core.prod.html | 12 +- .../_autosummary/mlx.core.quantize.html | 12 +- .../mlx.core.quantized_matmul.html | 12 +- .../python/_autosummary/mlx.core.radians.html | 12 +- .../mlx.core.random.bernoulli.html | 12 +- .../mlx.core.random.categorical.html | 12 +- .../_autosummary/mlx.core.random.gumbel.html | 12 +- .../_autosummary/mlx.core.random.key.html | 12 +- .../mlx.core.random.multivariate_normal.html | 12 +- .../_autosummary/mlx.core.random.normal.html | 12 +- .../_autosummary/mlx.core.random.randint.html | 12 +- .../_autosummary/mlx.core.random.seed.html | 12 +- .../_autosummary/mlx.core.random.split.html | 12 +- .../mlx.core.random.truncated_normal.html | 12 +- .../_autosummary/mlx.core.random.uniform.html | 12 +- .../_autosummary/mlx.core.reciprocal.html | 12 +- .../_autosummary/mlx.core.remainder.html | 12 +- .../python/_autosummary/mlx.core.repeat.html | 12 +- .../python/_autosummary/mlx.core.reshape.html | 12 +- .../_autosummary/mlx.core.right_shift.html | 12 +- .../python/_autosummary/mlx.core.round.html | 12 +- .../python/_autosummary/mlx.core.rsqrt.html | 12 +- .../python/_autosummary/mlx.core.save.html | 12 +- .../_autosummary/mlx.core.save_gguf.html | 12 +- .../mlx.core.save_safetensors.html | 12 +- .../python/_autosummary/mlx.core.savez.html | 12 +- .../mlx.core.savez_compressed.html | 12 +- .../mlx.core.set_default_device.html | 12 +- .../mlx.core.set_default_stream.html | 12 +- .../python/_autosummary/mlx.core.sigmoid.html | 12 +- .../python/_autosummary/mlx.core.sign.html | 12 +- .../python/_autosummary/mlx.core.sin.html | 12 +- .../python/_autosummary/mlx.core.sinh.html | 12 +- .../python/_autosummary/mlx.core.softmax.html | 12 +- .../python/_autosummary/mlx.core.sort.html | 12 +- .../python/_autosummary/mlx.core.split.html | 12 +- .../python/_autosummary/mlx.core.sqrt.html | 12 +- .../python/_autosummary/mlx.core.square.html | 12 +- .../python/_autosummary/mlx.core.squeeze.html | 12 +- .../python/_autosummary/mlx.core.stack.html | 12 +- .../python/_autosummary/mlx.core.std.html | 12 +- .../_autosummary/mlx.core.stop_gradient.html | 12 +- .../_autosummary/mlx.core.subtract.html | 12 +- .../python/_autosummary/mlx.core.sum.html | 12 +- .../_autosummary/mlx.core.swapaxes.html | 12 +- .../_autosummary/mlx.core.synchronize.html | 12 +- .../python/_autosummary/mlx.core.take.html | 12 +- .../mlx.core.take_along_axis.html | 12 +- .../python/_autosummary/mlx.core.tan.html | 12 +- .../python/_autosummary/mlx.core.tanh.html | 12 +- .../_autosummary/mlx.core.tensordot.html | 12 +- .../python/_autosummary/mlx.core.tile.html | 12 +- .../python/_autosummary/mlx.core.topk.html | 18 +- .../python/_autosummary/mlx.core.trace.html | 943 + .../_autosummary/mlx.core.transpose.html | 18 +- .../python/_autosummary/mlx.core.tri.html | 12 +- .../python/_autosummary/mlx.core.tril.html | 12 +- .../python/_autosummary/mlx.core.triu.html | 12 +- .../_autosummary/mlx.core.value_and_grad.html | 12 +- .../python/_autosummary/mlx.core.var.html | 12 +- .../python/_autosummary/mlx.core.vjp.html | 12 +- .../python/_autosummary/mlx.core.vmap.html | 12 +- .../python/_autosummary/mlx.core.where.html | 12 +- .../python/_autosummary/mlx.core.zeros.html | 12 +- .../_autosummary/mlx.core.zeros_like.html | 12 +- .../python/_autosummary/mlx.nn.quantize.html | 12 +- .../_autosummary/mlx.nn.value_and_grad.html | 12 +- .../mlx.optimizers.clip_grad_norm.html | 12 +- .../_autosummary/mlx.utils.tree_flatten.html | 12 +- .../_autosummary/mlx.utils.tree_map.html | 12 +- .../mlx.utils.tree_map_with_path.html | 12 +- .../_autosummary/mlx.utils.tree_reduce.html | 12 +- .../mlx.utils.tree_unflatten.html | 12 +- .../python/_autosummary/stream_class.html | 12 +- docs/build/html/python/array.html | 12 +- docs/build/html/python/data_types.html | 12 +- .../html/python/devices_and_streams.html | 12 +- docs/build/html/python/fast.html | 12 +- docs/build/html/python/fft.html | 12 +- docs/build/html/python/linalg.html | 12 +- docs/build/html/python/metal.html | 12 +- docs/build/html/python/nn.html | 12 +- .../python/nn/_autosummary/mlx.nn.ALiBi.html | 12 +- .../nn/_autosummary/mlx.nn.AvgPool1d.html | 12 +- .../nn/_autosummary/mlx.nn.AvgPool2d.html | 12 +- .../nn/_autosummary/mlx.nn.BatchNorm.html | 12 +- .../python/nn/_autosummary/mlx.nn.Conv1d.html | 14 +- .../python/nn/_autosummary/mlx.nn.Conv2d.html | 12 +- .../python/nn/_autosummary/mlx.nn.Conv3d.html | 12 +- .../nn/_autosummary/mlx.nn.Dropout.html | 12 +- .../nn/_autosummary/mlx.nn.Dropout2d.html | 12 +- .../nn/_autosummary/mlx.nn.Dropout3d.html | 12 +- .../nn/_autosummary/mlx.nn.Embedding.html | 12 +- .../python/nn/_autosummary/mlx.nn.GELU.html | 12 +- .../python/nn/_autosummary/mlx.nn.GRU.html | 12 +- .../nn/_autosummary/mlx.nn.GroupNorm.html | 12 +- .../nn/_autosummary/mlx.nn.InstanceNorm.html | 12 +- .../python/nn/_autosummary/mlx.nn.LSTM.html | 12 +- .../nn/_autosummary/mlx.nn.LayerNorm.html | 12 +- .../python/nn/_autosummary/mlx.nn.Linear.html | 12 +- .../nn/_autosummary/mlx.nn.MaxPool1d.html | 12 +- .../nn/_autosummary/mlx.nn.MaxPool2d.html | 12 +- .../python/nn/_autosummary/mlx.nn.Mish.html | 12 +- .../nn/_autosummary/mlx.nn.Module.apply.html | 12 +- .../mlx.nn.Module.apply_to_modules.html | 12 +- .../_autosummary/mlx.nn.Module.children.html | 12 +- .../nn/_autosummary/mlx.nn.Module.eval.html | 12 +- .../mlx.nn.Module.filter_and_map.html | 12 +- .../nn/_autosummary/mlx.nn.Module.freeze.html | 12 +- .../mlx.nn.Module.leaf_modules.html | 12 +- .../mlx.nn.Module.load_weights.html | 12 +- .../_autosummary/mlx.nn.Module.modules.html | 12 +- .../mlx.nn.Module.named_modules.html | 12 +- .../mlx.nn.Module.parameters.html | 12 +- .../mlx.nn.Module.save_weights.html | 12 +- .../_autosummary/mlx.nn.Module.set_dtype.html | 12 +- .../nn/_autosummary/mlx.nn.Module.state.html | 12 +- .../nn/_autosummary/mlx.nn.Module.train.html | 12 +- .../mlx.nn.Module.trainable_parameters.html | 12 +- .../_autosummary/mlx.nn.Module.training.html | 12 +- .../_autosummary/mlx.nn.Module.unfreeze.html | 12 +- .../nn/_autosummary/mlx.nn.Module.update.html | 12 +- .../mlx.nn.Module.update_modules.html | 12 +- .../mlx.nn.MultiHeadAttention.html | 12 +- .../python/nn/_autosummary/mlx.nn.PReLU.html | 12 +- .../mlx.nn.QuantizedEmbedding.html | 12 +- .../_autosummary/mlx.nn.QuantizedLinear.html | 12 +- .../nn/_autosummary/mlx.nn.RMSNorm.html | 12 +- .../python/nn/_autosummary/mlx.nn.RNN.html | 12 +- .../python/nn/_autosummary/mlx.nn.ReLU.html | 12 +- .../python/nn/_autosummary/mlx.nn.RoPE.html | 12 +- .../python/nn/_autosummary/mlx.nn.SELU.html | 12 +- .../nn/_autosummary/mlx.nn.Sequential.html | 12 +- .../python/nn/_autosummary/mlx.nn.SiLU.html | 12 +- .../mlx.nn.SinusoidalPositionalEncoding.html | 12 +- .../nn/_autosummary/mlx.nn.Softshrink.html | 12 +- .../python/nn/_autosummary/mlx.nn.Step.html | 12 +- .../nn/_autosummary/mlx.nn.Transformer.html | 12 +- .../nn/_autosummary/mlx.nn.Upsample.html | 12 +- .../nn/_autosummary/mlx.nn.init.constant.html | 12 +- .../mlx.nn.init.glorot_normal.html | 12 +- .../mlx.nn.init.glorot_uniform.html | 12 +- .../_autosummary/mlx.nn.init.he_normal.html | 12 +- .../_autosummary/mlx.nn.init.he_uniform.html | 12 +- .../nn/_autosummary/mlx.nn.init.identity.html | 12 +- .../nn/_autosummary/mlx.nn.init.normal.html | 12 +- .../nn/_autosummary/mlx.nn.init.uniform.html | 12 +- .../nn/_autosummary_functions/mlx.nn.elu.html | 12 +- .../_autosummary_functions/mlx.nn.gelu.html | 12 +- .../mlx.nn.gelu_approx.html | 12 +- .../mlx.nn.gelu_fast_approx.html | 12 +- .../nn/_autosummary_functions/mlx.nn.glu.html | 12 +- .../mlx.nn.hardswish.html | 12 +- .../mlx.nn.leaky_relu.html | 12 +- .../mlx.nn.log_sigmoid.html | 12 +- .../mlx.nn.log_softmax.html | 12 +- .../mlx.nn.losses.binary_cross_entropy.html | 12 +- .../mlx.nn.losses.cosine_similarity_loss.html | 12 +- .../mlx.nn.losses.cross_entropy.html | 12 +- .../mlx.nn.losses.gaussian_nll_loss.html | 12 +- .../mlx.nn.losses.hinge_loss.html | 12 +- .../mlx.nn.losses.huber_loss.html | 12 +- .../mlx.nn.losses.kl_div_loss.html | 12 +- .../mlx.nn.losses.l1_loss.html | 12 +- .../mlx.nn.losses.log_cosh_loss.html | 12 +- .../mlx.nn.losses.margin_ranking_loss.html | 12 +- .../mlx.nn.losses.mse_loss.html | 12 +- .../mlx.nn.losses.nll_loss.html | 12 +- .../mlx.nn.losses.smooth_l1_loss.html | 12 +- .../mlx.nn.losses.triplet_loss.html | 12 +- .../_autosummary_functions/mlx.nn.mish.html | 12 +- .../_autosummary_functions/mlx.nn.prelu.html | 12 +- .../_autosummary_functions/mlx.nn.relu.html | 12 +- .../_autosummary_functions/mlx.nn.relu6.html | 12 +- .../_autosummary_functions/mlx.nn.selu.html | 12 +- .../mlx.nn.sigmoid.html | 12 +- .../_autosummary_functions/mlx.nn.silu.html | 12 +- .../mlx.nn.softmax.html | 12 +- .../mlx.nn.softplus.html | 12 +- .../mlx.nn.softshrink.html | 12 +- .../_autosummary_functions/mlx.nn.step.html | 12 +- .../_autosummary_functions/mlx.nn.tanh.html | 12 +- docs/build/html/python/nn/functions.html | 12 +- docs/build/html/python/nn/init.html | 12 +- docs/build/html/python/nn/layers.html | 12 +- docs/build/html/python/nn/losses.html | 12 +- docs/build/html/python/nn/module.html | 12 +- docs/build/html/python/ops.html | 250 +- docs/build/html/python/optimizers.html | 12 +- .../_autosummary/mlx.optimizers.AdaDelta.html | 12 +- .../mlx.optimizers.Adafactor.html | 12 +- .../_autosummary/mlx.optimizers.Adagrad.html | 12 +- .../_autosummary/mlx.optimizers.Adam.html | 12 +- .../_autosummary/mlx.optimizers.AdamW.html | 12 +- .../_autosummary/mlx.optimizers.Adamax.html | 12 +- .../_autosummary/mlx.optimizers.Lion.html | 12 +- ....optimizers.Optimizer.apply_gradients.html | 12 +- .../mlx.optimizers.Optimizer.init.html | 12 +- .../mlx.optimizers.Optimizer.state.html | 12 +- .../mlx.optimizers.Optimizer.update.html | 12 +- .../_autosummary/mlx.optimizers.RMSprop.html | 12 +- .../_autosummary/mlx.optimizers.SGD.html | 12 +- .../mlx.optimizers.cosine_decay.html | 12 +- .../mlx.optimizers.exponential_decay.html | 12 +- .../mlx.optimizers.join_schedules.html | 12 +- .../mlx.optimizers.linear_schedule.html | 12 +- .../mlx.optimizers.step_decay.html | 12 +- .../python/optimizers/common_optimizers.html | 12 +- .../html/python/optimizers/optimizer.html | 12 +- .../html/python/optimizers/schedulers.html | 12 +- docs/build/html/python/random.html | 12 +- docs/build/html/python/transforms.html | 12 +- docs/build/html/python/tree_utils.html | 12 +- docs/build/html/random_8h.html | 186 - docs/build/html/random_8h_source.html | 356 - docs/build/html/reduce__inst_8h.html | 357 - docs/build/html/reduce__inst_8h_source.html | 182 - ...d__dot__product__attention__params_8h.html | 97 - ..._product__attention__params_8h_source.html | 114 - docs/build/html/scheduler_8h.html | 135 - docs/build/html/scheduler_8h_source.html | 360 - docs/build/html/search.html | 12 +- docs/build/html/search/all_0.js | 12 - docs/build/html/search/all_1.js | 96 - docs/build/html/search/all_10.js | 61 - docs/build/html/search/all_11.js | 11 - docs/build/html/search/all_12.js | 71 - docs/build/html/search/all_13.js | 156 - docs/build/html/search/all_14.js | 66 - docs/build/html/search/all_15.js | 18 - docs/build/html/search/all_16.js | 24 - docs/build/html/search/all_17.js | 15 - docs/build/html/search/all_18.js | 4 - docs/build/html/search/all_19.js | 5 - docs/build/html/search/all_1a.js | 17 - docs/build/html/search/all_2.js | 71 - docs/build/html/search/all_3.js | 114 - docs/build/html/search/all_4.js | 61 - docs/build/html/search/all_5.js | 54 - docs/build/html/search/all_6.js | 54 - docs/build/html/search/all_7.js | 57 - docs/build/html/search/all_8.js | 12 - docs/build/html/search/all_9.js | 101 - docs/build/html/search/all_a.js | 7 - docs/build/html/search/all_b.js | 11 - docs/build/html/search/all_c.js | 72 - docs/build/html/search/all_d.js | 98 - docs/build/html/search/all_e.js | 36 - docs/build/html/search/all_f.js | 55 - docs/build/html/search/classes_0.js | 6 - docs/build/html/search/classes_1.js | 32 - docs/build/html/search/classes_10.js | 18 - docs/build/html/search/classes_11.js | 28 - docs/build/html/search/classes_12.js | 15 - docs/build/html/search/classes_13.js | 6 - docs/build/html/search/classes_14.js | 7 - docs/build/html/search/classes_15.js | 4 - docs/build/html/search/classes_2.js | 17 - docs/build/html/search/classes_3.js | 40 - docs/build/html/search/classes_4.js | 9 - docs/build/html/search/classes_5.js | 13 - docs/build/html/search/classes_6.js | 10 - docs/build/html/search/classes_7.js | 10 - docs/build/html/search/classes_8.js | 8 - docs/build/html/search/classes_9.js | 5 - docs/build/html/search/classes_a.js | 32 - docs/build/html/search/classes_b.js | 20 - docs/build/html/search/classes_c.js | 10 - docs/build/html/search/classes_d.js | 4 - docs/build/html/search/classes_e.js | 11 - docs/build/html/search/classes_f.js | 5 - docs/build/html/search/close.svg | 18 - docs/build/html/search/defines_0.js | 7 - docs/build/html/search/defines_1.js | 4 - docs/build/html/search/defines_2.js | 13 - docs/build/html/search/defines_3.js | 5 - docs/build/html/search/defines_4.js | 8 - docs/build/html/search/defines_5.js | 4 - docs/build/html/search/defines_6.js | 10 - docs/build/html/search/defines_7.js | 40 - docs/build/html/search/defines_8.js | 6 - docs/build/html/search/defines_9.js | 22 - docs/build/html/search/defines_a.js | 5 - docs/build/html/search/defines_b.js | 4 - docs/build/html/search/enums_0.js | 4 - docs/build/html/search/enums_1.js | 6 - docs/build/html/search/enums_2.js | 5 - docs/build/html/search/enums_3.js | 4 - docs/build/html/search/enums_4.js | 4 - docs/build/html/search/enums_5.js | 5 - docs/build/html/search/enums_6.js | 4 - docs/build/html/search/enums_7.js | 4 - docs/build/html/search/enumvalues_0.js | 7 - docs/build/html/search/enumvalues_1.js | 6 - docs/build/html/search/enumvalues_10.js | 10 - docs/build/html/search/enumvalues_11.js | 5 - docs/build/html/search/enumvalues_12.js | 4 - docs/build/html/search/enumvalues_2.js | 10 - docs/build/html/search/enumvalues_3.js | 9 - docs/build/html/search/enumvalues_4.js | 5 - docs/build/html/search/enumvalues_5.js | 7 - docs/build/html/search/enumvalues_6.js | 10 - docs/build/html/search/enumvalues_7.js | 10 - docs/build/html/search/enumvalues_8.js | 4 - docs/build/html/search/enumvalues_9.js | 5 - docs/build/html/search/enumvalues_a.js | 7 - docs/build/html/search/enumvalues_b.js | 4 - docs/build/html/search/enumvalues_c.js | 4 - docs/build/html/search/enumvalues_d.js | 4 - docs/build/html/search/enumvalues_e.js | 7 - docs/build/html/search/enumvalues_f.js | 5 - docs/build/html/search/files_0.js | 7 - docs/build/html/search/files_1.js | 7 - docs/build/html/search/files_10.js | 5 - docs/build/html/search/files_2.js | 10 - docs/build/html/search/files_3.js | 6 - docs/build/html/search/files_4.js | 6 - docs/build/html/search/files_5.js | 7 - docs/build/html/search/files_6.js | 6 - docs/build/html/search/files_7.js | 4 - docs/build/html/search/files_8.js | 5 - docs/build/html/search/files_9.js | 10 - docs/build/html/search/files_a.js | 8 - docs/build/html/search/files_b.js | 4 - docs/build/html/search/files_c.js | 6 - docs/build/html/search/files_d.js | 6 - docs/build/html/search/files_e.js | 6 - docs/build/html/search/files_f.js | 7 - docs/build/html/search/functions_0.js | 7 - docs/build/html/search/functions_1.js | 71 - docs/build/html/search/functions_10.js | 29 - docs/build/html/search/functions_11.js | 9 - docs/build/html/search/functions_12.js | 49 - docs/build/html/search/functions_13.js | 122 - docs/build/html/search/functions_14.js | 36 - docs/build/html/search/functions_15.js | 7 - docs/build/html/search/functions_16.js | 12 - docs/build/html/search/functions_17.js | 7 - docs/build/html/search/functions_18.js | 5 - docs/build/html/search/functions_19.js | 17 - docs/build/html/search/functions_2.js | 27 - docs/build/html/search/functions_3.js | 68 - docs/build/html/search/functions_4.js | 37 - docs/build/html/search/functions_5.js | 42 - docs/build/html/search/functions_6.js | 33 - docs/build/html/search/functions_7.js | 36 - docs/build/html/search/functions_8.js | 4 - docs/build/html/search/functions_9.js | 39 - docs/build/html/search/functions_a.js | 4 - docs/build/html/search/functions_b.js | 6 - docs/build/html/search/functions_c.js | 42 - docs/build/html/search/functions_d.js | 42 - docs/build/html/search/functions_e.js | 23 - docs/build/html/search/functions_f.js | 46 - docs/build/html/search/groups_0.js | 4 - docs/build/html/search/groups_1.js | 4 - docs/build/html/search/groups_2.js | 4 - docs/build/html/search/mag.svg | 24 - docs/build/html/search/mag_d.svg | 24 - docs/build/html/search/mag_sel.svg | 31 - docs/build/html/search/mag_seld.svg | 31 - docs/build/html/search/namespaces_0.js | 23 - docs/build/html/search/namespaces_1.js | 6 - docs/build/html/search/related_0.js | 4 - docs/build/html/search/related_1.js | 5 - docs/build/html/search/search.css | 291 - docs/build/html/search/search.js | 694 - docs/build/html/search/searchdata.js | 48 - docs/build/html/search/typedefs_0.js | 5 - docs/build/html/search/typedefs_1.js | 4 - docs/build/html/search/typedefs_2.js | 6 - docs/build/html/search/typedefs_3.js | 4 - docs/build/html/search/typedefs_4.js | 4 - docs/build/html/search/typedefs_5.js | 5 - docs/build/html/search/typedefs_6.js | 4 - docs/build/html/search/typedefs_7.js | 5 - docs/build/html/search/typedefs_8.js | 6 - docs/build/html/search/typedefs_9.js | 4 - docs/build/html/search/typedefs_a.js | 8 - docs/build/html/search/typedefs_b.js | 4 - docs/build/html/search/typedefs_c.js | 6 - docs/build/html/search/variables_0.js | 10 - docs/build/html/search/variables_1.js | 25 - docs/build/html/search/variables_10.js | 15 - docs/build/html/search/variables_11.js | 26 - docs/build/html/search/variables_12.js | 25 - docs/build/html/search/variables_13.js | 9 - docs/build/html/search/variables_14.js | 8 - docs/build/html/search/variables_15.js | 10 - docs/build/html/search/variables_2.js | 20 - docs/build/html/search/variables_3.js | 10 - docs/build/html/search/variables_4.js | 4 - docs/build/html/search/variables_5.js | 17 - docs/build/html/search/variables_6.js | 11 - docs/build/html/search/variables_7.js | 23 - docs/build/html/search/variables_8.js | 6 - docs/build/html/search/variables_9.js | 6 - docs/build/html/search/variables_a.js | 7 - docs/build/html/search/variables_b.js | 18 - docs/build/html/search/variables_c.js | 13 - docs/build/html/search/variables_d.js | 8 - docs/build/html/search/variables_e.js | 6 - docs/build/html/search/variables_f.js | 5 - docs/build/html/searchindex.js | 2 +- docs/build/html/splitbar.png | Bin 314 -> 0 bytes docs/build/html/splitbard.png | Bin 282 -> 0 bytes docs/build/html/stream_8h.html | 127 - docs/build/html/stream_8h_source.html | 146 - .../struct___m_l_x___b_float16-members.html | 101 - .../html/struct___m_l_x___b_float16.html | 534 - ...b_float16_1_1bits__to__bfloat__struct.html | 92 - docs/build/html/struct_abs-members.html | 93 - docs/build/html/struct_abs.html | 306 - docs/build/html/struct_add-members.html | 87 - docs/build/html/struct_add.html | 130 - docs/build/html/struct_and-members.html | 92 - docs/build/html/struct_and.html | 291 - docs/build/html/struct_arc_cos-members.html | 87 - docs/build/html/struct_arc_cos.html | 126 - docs/build/html/struct_arc_cosh-members.html | 87 - docs/build/html/struct_arc_cosh.html | 126 - docs/build/html/struct_arc_sin-members.html | 87 - docs/build/html/struct_arc_sin.html | 126 - docs/build/html/struct_arc_sinh-members.html | 87 - docs/build/html/struct_arc_sinh.html | 126 - docs/build/html/struct_arc_tan-members.html | 87 - docs/build/html/struct_arc_tan.html | 126 - docs/build/html/struct_arc_tan2-members.html | 87 - docs/build/html/struct_arc_tan2.html | 130 - docs/build/html/struct_arc_tanh-members.html | 87 - docs/build/html/struct_arc_tanh.html | 126 - .../html/struct_bitwise_and-members.html | 87 - docs/build/html/struct_bitwise_and.html | 130 - .../build/html/struct_bitwise_or-members.html | 87 - docs/build/html/struct_bitwise_or.html | 130 - .../html/struct_bitwise_xor-members.html | 87 - docs/build/html/struct_bitwise_xor.html | 130 - docs/build/html/struct_ceil-members.html | 96 - docs/build/html/struct_ceil.html | 396 - docs/build/html/struct_conjugate-members.html | 87 - docs/build/html/struct_conjugate.html | 123 - docs/build/html/struct_cos-members.html | 88 - docs/build/html/struct_cos.html | 156 - docs/build/html/struct_cosh-members.html | 88 - docs/build/html/struct_cosh.html | 156 - docs/build/html/struct_divide-members.html | 87 - docs/build/html/struct_divide.html | 130 - docs/build/html/struct_equal-members.html | 87 - docs/build/html/struct_equal.html | 130 - docs/build/html/struct_erf-members.html | 87 - docs/build/html/struct_erf.html | 126 - docs/build/html/struct_erf_inv-members.html | 87 - docs/build/html/struct_erf_inv.html | 126 - docs/build/html/struct_exp-members.html | 88 - docs/build/html/struct_exp.html | 156 - docs/build/html/struct_expm1-members.html | 87 - docs/build/html/struct_expm1.html | 126 - docs/build/html/struct_floor-members.html | 96 - docs/build/html/struct_floor.html | 396 - docs/build/html/struct_greater-members.html | 87 - docs/build/html/struct_greater.html | 130 - .../html/struct_greater_equal-members.html | 87 - docs/build/html/struct_greater_equal.html | 130 - docs/build/html/struct_indices-members.html | 90 - docs/build/html/struct_indices.html | 168 - .../build/html/struct_left_shift-members.html | 87 - docs/build/html/struct_left_shift.html | 130 - docs/build/html/struct_less-members.html | 87 - docs/build/html/struct_less.html | 130 - .../build/html/struct_less_equal-members.html | 87 - docs/build/html/struct_less_equal.html | 130 - docs/build/html/struct_limits-members.html | 90 - docs/build/html/struct_limits.html | 200 - ...t_limits_3_01bfloat16__t_01_4-members.html | 90 - .../struct_limits_3_01bfloat16__t_01_4.html | 192 - .../struct_limits_3_01bool_01_4-members.html | 88 - .../html/struct_limits_3_01bool_01_4.html | 144 - .../struct_limits_3_01float_01_4-members.html | 90 - .../html/struct_limits_3_01float_01_4.html | 192 - .../struct_limits_3_01half_01_4-members.html | 90 - .../html/struct_limits_3_01half_01_4.html | 192 - ...ruct_limits_3_01int16__t_01_4-members.html | 90 - .../html/struct_limits_3_01int16__t_01_4.html | 192 - ...ruct_limits_3_01int32__t_01_4-members.html | 90 - .../html/struct_limits_3_01int32__t_01_4.html | 192 - ...ruct_limits_3_01int64__t_01_4-members.html | 90 - .../html/struct_limits_3_01int64__t_01_4.html | 192 - ...truct_limits_3_01int8__t_01_4-members.html | 90 - .../html/struct_limits_3_01int8__t_01_4.html | 192 - ...uct_limits_3_01uint16__t_01_4-members.html | 90 - .../struct_limits_3_01uint16__t_01_4.html | 192 - ...uct_limits_3_01uint32__t_01_4-members.html | 90 - .../struct_limits_3_01uint32__t_01_4.html | 192 - ...uct_limits_3_01uint64__t_01_4-members.html | 90 - .../struct_limits_3_01uint64__t_01_4.html | 192 - ...ruct_limits_3_01uint8__t_01_4-members.html | 90 - .../html/struct_limits_3_01uint8__t_01_4.html | 192 - docs/build/html/struct_log-members.html | 87 - docs/build/html/struct_log.html | 126 - docs/build/html/struct_log10-members.html | 87 - docs/build/html/struct_log10.html | 126 - docs/build/html/struct_log1p-members.html | 87 - docs/build/html/struct_log1p.html | 126 - docs/build/html/struct_log2-members.html | 87 - docs/build/html/struct_log2.html | 126 - .../html/struct_log_add_exp-members.html | 87 - docs/build/html/struct_log_add_exp.html | 130 - .../html/struct_logical_and-members.html | 87 - docs/build/html/struct_logical_and.html | 130 - .../html/struct_logical_not-members.html | 87 - docs/build/html/struct_logical_not.html | 126 - .../build/html/struct_logical_or-members.html | 87 - docs/build/html/struct_logical_or.html | 130 - .../struct_m_l_x_conv_params-members.html | 101 - docs/build/html/struct_m_l_x_conv_params.html | 366 - ..._dot_product_attention_params-members.html | 91 - ...x_scaled_dot_product_attention_params.html | 176 - docs/build/html/struct_max-members.html | 90 - docs/build/html/struct_max.html | 233 - docs/build/html/struct_maximum-members.html | 89 - docs/build/html/struct_maximum.html | 198 - docs/build/html/struct_min-members.html | 90 - docs/build/html/struct_min.html | 233 - docs/build/html/struct_minimum-members.html | 89 - docs/build/html/struct_minimum.html | 198 - docs/build/html/struct_multiply-members.html | 87 - docs/build/html/struct_multiply.html | 130 - .../build/html/struct_na_n_equal-members.html | 88 - docs/build/html/struct_na_n_equal.html | 164 - docs/build/html/struct_negative-members.html | 87 - docs/build/html/struct_negative.html | 126 - docs/build/html/struct_none-members.html | 87 - docs/build/html/struct_none.html | 135 - docs/build/html/struct_not_equal-members.html | 88 - docs/build/html/struct_not_equal.html | 164 - docs/build/html/struct_or-members.html | 92 - docs/build/html/struct_or.html | 291 - docs/build/html/struct_power-members.html | 89 - docs/build/html/struct_power.html | 198 - docs/build/html/struct_prod-members.html | 90 - docs/build/html/struct_prod.html | 233 - docs/build/html/struct_remainder-members.html | 90 - docs/build/html/struct_remainder.html | 232 - .../html/struct_right_shift-members.html | 87 - docs/build/html/struct_right_shift.html | 130 - docs/build/html/struct_round-members.html | 88 - docs/build/html/struct_round.html | 156 - docs/build/html/struct_rsqrt-members.html | 87 - docs/build/html/struct_rsqrt.html | 126 - docs/build/html/struct_select-members.html | 87 - docs/build/html/struct_select.html | 135 - docs/build/html/struct_sigmoid-members.html | 87 - docs/build/html/struct_sigmoid.html | 126 - docs/build/html/struct_sign-members.html | 88 - docs/build/html/struct_sign.html | 156 - docs/build/html/struct_sin-members.html | 88 - docs/build/html/struct_sin.html | 156 - docs/build/html/struct_sinh-members.html | 88 - docs/build/html/struct_sinh.html | 156 - docs/build/html/struct_sqrt-members.html | 87 - docs/build/html/struct_sqrt.html | 126 - docs/build/html/struct_square-members.html | 87 - docs/build/html/struct_square.html | 126 - docs/build/html/struct_subtract-members.html | 87 - docs/build/html/struct_subtract.html | 130 - docs/build/html/struct_sum-members.html | 90 - docs/build/html/struct_sum.html | 233 - docs/build/html/struct_tan-members.html | 88 - docs/build/html/struct_tan.html | 156 - docs/build/html/struct_tanh-members.html | 88 - docs/build/html/struct_tanh.html | 156 - .../html/structcomplex64__t-members.html | 97 - docs/build/html/structcomplex64__t.html | 405 - ...ts__impl_3_01bfloat16__t_01_4-members.html | 107 - ...ic__limits__impl_3_01bfloat16__t_01_4.html | 546 - ...ric__limits__impl_3_01bfloat16__t_01_4.png | Bin 833 -> 0 bytes ...1core_1_1___m_l_x___b_float16-members.html | 97 - ...ctmlx_1_1core_1_1___m_l_x___b_float16.html | 284 - ...1_1core_1_1___m_l_x___float16-members.html | 97 - ...ructmlx_1_1core_1_1___m_l_x___float16.html | 284 - .../structmlx_1_1core_1_1_device-members.html | 96 - .../html/structmlx_1_1core_1_1_device.html | 255 - .../structmlx_1_1core_1_1_dtype-members.html | 97 - .../html/structmlx_1_1core_1_1_dtype.html | 344 - ...uctmlx_1_1core_1_1_node_namer-members.html | 92 - .../structmlx_1_1core_1_1_node_namer.html | 140 - ...x_1_1core_1_1_print_formatter-members.html | 102 - ...structmlx_1_1core_1_1_print_formatter.html | 462 - ...lx_1_1core_1_1_reduction_plan-members.html | 95 - .../structmlx_1_1core_1_1_reduction_plan.html | 216 - .../structmlx_1_1core_1_1_stream-members.html | 93 - .../html/structmlx_1_1core_1_1_stream.html | 168 - ...lx_1_1core_1_1_stream_context-members.html | 92 - .../structmlx_1_1core_1_1_stream_context.html | 154 - ...mlx_1_1core_1_1_type_to_dtype-members.html | 91 - .../structmlx_1_1core_1_1_type_to_dtype.html | 121 - ...e_1_1array_1_1_array_iterator-members.html | 100 - ...x_1_1core_1_1array_1_1_array_iterator.html | 341 - ...mlx_1_1core_1_1array_1_1_data-members.html | 96 - .../structmlx_1_1core_1_1array_1_1_data.html | 250 - ...lx_1_1core_1_1array_1_1_flags-members.html | 93 - .../structmlx_1_1core_1_1array_1_1_flags.html | 148 - ...tmlx_1_1core_1_1complex128__t-members.html | 94 - .../structmlx_1_1core_1_1complex128__t.html | 222 - .../structmlx_1_1core_1_1complex128__t.png | Bin 614 -> 0 bytes ...ctmlx_1_1core_1_1complex64__t-members.html | 94 - .../structmlx_1_1core_1_1complex64__t.html | 222 - .../structmlx_1_1core_1_1complex64__t.png | Bin 618 -> 0 bytes ...mlx_1_1core_1_1detail_1_1_abs-members.html | 96 - .../structmlx_1_1core_1_1detail_1_1_abs.html | 265 - ...mlx_1_1core_1_1detail_1_1_add-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_add.html | 134 - ...1_1core_1_1detail_1_1_arc_cos-members.html | 91 - ...ructmlx_1_1core_1_1detail_1_1_arc_cos.html | 130 - ..._1core_1_1detail_1_1_arc_cosh-members.html | 91 - ...uctmlx_1_1core_1_1detail_1_1_arc_cosh.html | 130 - ...1_1core_1_1detail_1_1_arc_sin-members.html | 91 - ...ructmlx_1_1core_1_1detail_1_1_arc_sin.html | 130 - ..._1core_1_1detail_1_1_arc_sinh-members.html | 91 - ...uctmlx_1_1core_1_1detail_1_1_arc_sinh.html | 130 - ...1_1core_1_1detail_1_1_arc_tan-members.html | 91 - ...ructmlx_1_1core_1_1detail_1_1_arc_tan.html | 130 - ..._1core_1_1detail_1_1_arc_tan2-members.html | 91 - ...uctmlx_1_1core_1_1detail_1_1_arc_tan2.html | 134 - ..._1core_1_1detail_1_1_arc_tanh-members.html | 91 - ...uctmlx_1_1core_1_1detail_1_1_arc_tanh.html | 130 - ...ore_1_1detail_1_1_bitwise_and-members.html | 91 - ...mlx_1_1core_1_1detail_1_1_bitwise_and.html | 134 - ...core_1_1detail_1_1_bitwise_or-members.html | 91 - ...tmlx_1_1core_1_1detail_1_1_bitwise_or.html | 134 - ...ore_1_1detail_1_1_bitwise_xor-members.html | 91 - ...mlx_1_1core_1_1detail_1_1_bitwise_xor.html | 134 - ...lx_1_1core_1_1detail_1_1_ceil-members.html | 100 - .../structmlx_1_1core_1_1detail_1_1_ceil.html | 373 - ...1core_1_1detail_1_1_conjugate-members.html | 91 - ...ctmlx_1_1core_1_1detail_1_1_conjugate.html | 127 - ...mlx_1_1core_1_1detail_1_1_cos-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_cos.html | 130 - ...lx_1_1core_1_1detail_1_1_cosh-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_cosh.html | 130 - ..._1_1core_1_1detail_1_1_divide-members.html | 91 - ...tructmlx_1_1core_1_1detail_1_1_divide.html | 134 - ...x_1_1core_1_1detail_1_1_equal-members.html | 91 - ...structmlx_1_1core_1_1detail_1_1_equal.html | 134 - ...mlx_1_1core_1_1detail_1_1_erf-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_erf.html | 130 - ...1_1core_1_1detail_1_1_erf_inv-members.html | 91 - ...ructmlx_1_1core_1_1detail_1_1_erf_inv.html | 130 - ...mlx_1_1core_1_1detail_1_1_exp-members.html | 92 - .../structmlx_1_1core_1_1detail_1_1_exp.html | 157 - ...x_1_1core_1_1detail_1_1_expm1-members.html | 91 - ...structmlx_1_1core_1_1detail_1_1_expm1.html | 130 - ...x_1_1core_1_1detail_1_1_floor-members.html | 100 - ...structmlx_1_1core_1_1detail_1_1_floor.html | 373 - ...1_1core_1_1detail_1_1_greater-members.html | 91 - ...ructmlx_1_1core_1_1detail_1_1_greater.html | 134 - ...e_1_1detail_1_1_greater_equal-members.html | 91 - ...x_1_1core_1_1detail_1_1_greater_equal.html | 134 - ...core_1_1detail_1_1_in_tracing-members.html | 93 - ...tmlx_1_1core_1_1detail_1_1_in_tracing.html | 186 - ...core_1_1detail_1_1_left_shift-members.html | 91 - ...tmlx_1_1core_1_1detail_1_1_left_shift.html | 134 - ...lx_1_1core_1_1detail_1_1_less-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_less.html | 134 - ...core_1_1detail_1_1_less_equal-members.html | 91 - ...tmlx_1_1core_1_1detail_1_1_less_equal.html | 134 - ...mlx_1_1core_1_1detail_1_1_log-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_log.html | 130 - ...x_1_1core_1_1detail_1_1_log10-members.html | 91 - ...structmlx_1_1core_1_1detail_1_1_log10.html | 130 - ...x_1_1core_1_1detail_1_1_log1p-members.html | 91 - ...structmlx_1_1core_1_1detail_1_1_log1p.html | 130 - ...lx_1_1core_1_1detail_1_1_log2-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_log2.html | 130 - ...ore_1_1detail_1_1_log_add_exp-members.html | 91 - ...mlx_1_1core_1_1detail_1_1_log_add_exp.html | 134 - ...ore_1_1detail_1_1_logical_and-members.html | 91 - ...mlx_1_1core_1_1detail_1_1_logical_and.html | 134 - ...ore_1_1detail_1_1_logical_not-members.html | 91 - ...mlx_1_1core_1_1detail_1_1_logical_not.html | 130 - ...core_1_1detail_1_1_logical_or-members.html | 91 - ...tmlx_1_1core_1_1detail_1_1_logical_or.html | 134 - ...1_1core_1_1detail_1_1_maximum-members.html | 92 - ...ructmlx_1_1core_1_1detail_1_1_maximum.html | 168 - ...1_1core_1_1detail_1_1_minimum-members.html | 92 - ...ructmlx_1_1core_1_1detail_1_1_minimum.html | 168 - ..._1core_1_1detail_1_1_multiply-members.html | 91 - ...uctmlx_1_1core_1_1detail_1_1_multiply.html | 134 - ...core_1_1detail_1_1_na_n_equal-members.html | 91 - ...tmlx_1_1core_1_1detail_1_1_na_n_equal.html | 134 - ..._1core_1_1detail_1_1_negative-members.html | 91 - ...uctmlx_1_1core_1_1detail_1_1_negative.html | 130 - ...1core_1_1detail_1_1_not_equal-members.html | 91 - ...ctmlx_1_1core_1_1detail_1_1_not_equal.html | 134 - ...x_1_1core_1_1detail_1_1_power-members.html | 92 - ...structmlx_1_1core_1_1detail_1_1_power.html | 168 - ...1core_1_1detail_1_1_remainder-members.html | 94 - ...ctmlx_1_1core_1_1detail_1_1_remainder.html | 233 - ...ore_1_1detail_1_1_right_shift-members.html | 91 - ...mlx_1_1core_1_1detail_1_1_right_shift.html | 134 - ...x_1_1core_1_1detail_1_1_round-members.html | 92 - ...structmlx_1_1core_1_1detail_1_1_round.html | 157 - ...x_1_1core_1_1detail_1_1_rsqrt-members.html | 91 - ...structmlx_1_1core_1_1detail_1_1_rsqrt.html | 130 - ..._1_1core_1_1detail_1_1_select-members.html | 91 - ...tructmlx_1_1core_1_1detail_1_1_select.html | 139 - ...1_1core_1_1detail_1_1_sigmoid-members.html | 91 - ...ructmlx_1_1core_1_1detail_1_1_sigmoid.html | 130 - ...lx_1_1core_1_1detail_1_1_sign-members.html | 95 - .../structmlx_1_1core_1_1detail_1_1_sign.html | 238 - ...mlx_1_1core_1_1detail_1_1_sin-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_sin.html | 130 - ...lx_1_1core_1_1detail_1_1_sinh-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_sinh.html | 130 - ...lx_1_1core_1_1detail_1_1_sqrt-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_sqrt.html | 130 - ..._1_1core_1_1detail_1_1_square-members.html | 91 - ...tructmlx_1_1core_1_1detail_1_1_square.html | 130 - ..._1core_1_1detail_1_1_subtract-members.html | 91 - ...uctmlx_1_1core_1_1detail_1_1_subtract.html | 134 - ...mlx_1_1core_1_1detail_1_1_tan-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_tan.html | 130 - ...lx_1_1core_1_1detail_1_1_tanh-members.html | 91 - .../structmlx_1_1core_1_1detail_1_1_tanh.html | 130 - ..._1_1metal_1_1_command_encoder-members.html | 100 - ..._1_1core_1_1metal_1_1_command_encoder.html | 387 - ...ncoder_1_1_concurrent_context-members.html | 92 - ...ommand_encoder_1_1_concurrent_context.html | 154 - ..._1scheduler_1_1_stream_thread-members.html | 100 - ..._1core_1_1scheduler_1_1_stream_thread.html | 313 - ...mlx_1_1steel_1_1_accum_helper-members.html | 91 - .../structmlx_1_1steel_1_1_accum_helper.html | 118 - ...mlx_1_1steel_1_1_block_loader-members.html | 103 - .../structmlx_1_1steel_1_1_block_loader.html | 409 - ..._block_loader_1_1_read_vector-members.html | 91 - ...teel_1_1_block_loader_1_1_read_vector.html | 118 - ...tmlx_1_1steel_1_1_block_m_m_a-members.html | 117 - .../structmlx_1_1steel_1_1_block_m_m_a.html | 801 - ...lx_1_1steel_1_1_block_swizzle-members.html | 91 - .../structmlx_1_1steel_1_1_block_swizzle.html | 131 - ...x_1_1steel_1_1_channel_helper-members.html | 93 - ...structmlx_1_1steel_1_1_channel_helper.html | 154 - ...1_1_channel_helper_3_011_01_4-members.html | 93 - ..._1steel_1_1_channel_helper_3_011_01_4.html | 148 - ...1_1_channel_helper_3_012_01_4-members.html | 93 - ..._1steel_1_1_channel_helper_3_012_01_4.html | 148 - ...1_1_channel_helper_3_013_01_4-members.html | 93 - ..._1steel_1_1_channel_helper_3_013_01_4.html | 148 - ...1_1_channel_helper_3_014_01_4-members.html | 93 - ..._1steel_1_1_channel_helper_3_014_01_4.html | 148 - ...1_1_conv2_d_general_base_info-members.html | 92 - ..._1steel_1_1_conv2_d_general_base_info.html | 132 - ...1_conv2_d_general_jump_params-members.html | 98 - ...steel_1_1_conv2_d_general_jump_params.html | 228 - ..._d_input_block_loader_general-members.html | 114 - ..._1_conv2_d_input_block_loader_general.html | 610 - ...put_block_loader_large_filter-members.html | 112 - ...nv2_d_input_block_loader_large_filter.html | 564 - ...t_block_loader_small_channels-members.html | 111 - ...2_d_input_block_loader_small_channels.html | 546 - ...put_block_loader_small_filter-members.html | 112 - ...nv2_d_input_block_loader_small_filter.html | 569 - ...1_conv2_d_weight_block_loader-members.html | 110 - ...steel_1_1_conv2_d_weight_block_loader.html | 532 - ...d_weight_block_loader_general-members.html | 113 - ...1_conv2_d_weight_block_loader_general.html | 596 - ...t_block_loader_small_channels-members.html | 110 - ..._d_weight_block_loader_small_channels.html | 528 - ...el_1_1_g_e_m_m_add_m_m_params-members.html | 95 - ...x_1_1steel_1_1_g_e_m_m_add_m_m_params.html | 180 - ...x_1_1steel_1_1_g_e_m_m_kernel-members.html | 101 - ...structmlx_1_1steel_1_1_g_e_m_m_kernel.html | 456 - ...x_1_1steel_1_1_g_e_m_m_params-members.html | 104 - ...structmlx_1_1steel_1_1_g_e_m_m_params.html | 324 - ...el_1_1_g_e_m_m_spilt_k_params-members.html | 102 - ...x_1_1steel_1_1_g_e_m_m_spilt_k_params.html | 292 - ..._implicit_gemm_conv2_d_params-members.html | 100 - ...teel_1_1_implicit_gemm_conv2_d_params.html | 260 - ...structmlx_1_1steel_1_1_loop_alignment.html | 92 - ...lx_1_1steel_1_1_transform_add-members.html | 93 - .../structmlx_1_1steel_1_1_transform_add.html | 200 - ..._1_1steel_1_1_transform_axpby-members.html | 95 - ...tructmlx_1_1steel_1_1_transform_axpby.html | 241 - ...x_1_1steel_1_1_transform_none-members.html | 92 - ...structmlx_1_1steel_1_1_transform_none.html | 162 - .../build/html/structmlx__atomic-members.html | 87 - docs/build/html/structmlx__atomic.html | 114 - ..._atomic_3_01_t_01_4_01_4_01_4-members.html | 87 - ...__metal__atomic_3_01_t_01_4_01_4_01_4.html | 114 - ...etfft_1_1detail_1_1_exec_c2_c-members.html | 92 - ...ructpocketfft_1_1detail_1_1_exec_c2_c.html | 175 - ...etfft_1_1detail_1_1_exec_dcst-members.html | 94 - ...ructpocketfft_1_1detail_1_1_exec_dcst.html | 207 - ...ft_1_1detail_1_1_exec_hartley-members.html | 91 - ...tpocketfft_1_1detail_1_1_exec_hartley.html | 154 - ...etfft_1_1detail_1_1_exec_r2_r-members.html | 93 - ...ructpocketfft_1_1detail_1_1_exec_r2_r.html | 191 - ...cketfft_1_1detail_1_1_v_l_e_n-members.html | 91 - ...structpocketfft_1_1detail_1_1_v_l_e_n.html | 126 - ...ructpocketfft_1_1detail_1_1_v_t_y_p_e.html | 92 - ...cketfft_1_1detail_1_1add__vec-members.html | 91 - ...structpocketfft_1_1detail_1_1add__vec.html | 118 - ...ec_3_01cmplx_3_01_t_01_4_01_4-members.html | 91 - ..._1add__vec_3_01cmplx_3_01_t_01_4_01_4.html | 118 - ...tpocketfft_1_1detail_1_1cmplx-members.html | 106 - .../structpocketfft_1_1detail_1_1cmplx.html | 588 - ...reading_1_1aligned__allocator-members.html | 95 - ...il_1_1threading_1_1aligned__allocator.html | 247 - ...ctpocketfft_1_1detail_1_1util-members.html | 99 - .../structpocketfft_1_1detail_1_1util.html | 409 - docs/build/html/sync_off.png | Bin 853 -> 0 bytes docs/build/html/sync_on.png | Bin 845 -> 0 bytes docs/build/html/tab_a.png | Bin 142 -> 0 bytes docs/build/html/tab_ad.png | Bin 135 -> 0 bytes docs/build/html/tab_b.png | Bin 169 -> 0 bytes docs/build/html/tab_bd.png | Bin 173 -> 0 bytes docs/build/html/tab_h.png | Bin 177 -> 0 bytes docs/build/html/tab_hd.png | Bin 180 -> 0 bytes docs/build/html/tab_s.png | Bin 184 -> 0 bytes docs/build/html/tab_sd.png | Bin 188 -> 0 bytes docs/build/html/tabs.css | 1 - docs/build/html/threefry_8h.html | 110 - docs/build/html/threefry_8h_source.html | 111 - docs/build/html/topics.html | 88 - docs/build/html/transforms_8h.html | 172 - docs/build/html/transforms_8h_source.html | 248 - docs/build/html/transforms__impl_8h.html | 123 - .../html/transforms__impl_8h_source.html | 158 - docs/build/html/types_2bf16_8h.html | 743 - docs/build/html/types_2bf16_8h_source.html | 322 - docs/build/html/types_2complex_8h.html | 256 - docs/build/html/types_2complex_8h_source.html | 249 - .../html/unionbool4__or__uint-members.html | 88 - docs/build/html/unionbool4__or__uint.html | 128 - ...re_1_1detail_1_1_int_or_float-members.html | 92 - ...lx_1_1core_1_1detail_1_1_int_or_float.html | 132 - docs/build/html/usage/compile.html | 12 +- .../build/html/usage/function_transforms.html | 12 +- docs/build/html/usage/indexing.html | 12 +- docs/build/html/usage/lazy_evaluation.html | 12 +- docs/build/html/usage/numpy.html | 12 +- docs/build/html/usage/quick_start.html | 12 +- docs/build/html/usage/saving_and_loading.html | 12 +- docs/build/html/usage/unified_memory.html | 12 +- docs/build/html/usage/using_streams.html | 12 +- docs/build/html/utils_8h.html | 172 - docs/build/html/utils_8h_source.html | 276 - 1837 files changed, 6038 insertions(+), 255894 deletions(-) create mode 100644 docs/build/html/_sources/python/_autosummary/mlx.core.gather_mm.rst create mode 100644 docs/build/html/_sources/python/_autosummary/mlx.core.gather_qmm.rst create mode 100644 docs/build/html/_sources/python/_autosummary/mlx.core.trace.rst delete mode 100644 docs/build/html/allocator_8h.html delete mode 100644 docs/build/html/allocator_8h_source.html delete mode 100644 docs/build/html/annotated.html delete mode 100644 docs/build/html/arange_8h.html delete mode 100644 docs/build/html/arange_8h_source.html delete mode 100644 docs/build/html/array_8h.html delete mode 100644 docs/build/html/array_8h_source.html delete mode 100644 docs/build/html/atomic_8h.html delete mode 100644 docs/build/html/atomic_8h_source.html delete mode 100644 docs/build/html/backend_2accelerate_2utils_8h.html delete mode 100644 docs/build/html/backend_2accelerate_2utils_8h_source.html delete mode 100644 docs/build/html/backend_2common_2ops_8h.html delete mode 100644 docs/build/html/backend_2common_2ops_8h_source.html delete mode 100644 docs/build/html/backend_2common_2utils_8h.html delete mode 100644 docs/build/html/backend_2common_2utils_8h_source.html delete mode 100644 docs/build/html/backend_2metal_2allocator_8h.html delete mode 100644 docs/build/html/backend_2metal_2allocator_8h_source.html delete mode 100644 docs/build/html/backend_2metal_2device_8h.html delete mode 100644 docs/build/html/backend_2metal_2device_8h_source.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2bf16_8h.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2bf16_8h_source.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2complex_8h.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2complex_8h_source.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2reduction_2ops_8h.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2reduction_2ops_8h_source.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2reduction_2utils_8h.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2reduction_2utils_8h_source.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2steel_2gemm_2transforms_8h.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2steel_2gemm_2transforms_8h_source.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2steel_2utils_8h.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2steel_2utils_8h_source.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2utils_8h.html delete mode 100644 docs/build/html/backend_2metal_2kernels_2utils_8h_source.html delete mode 100644 docs/build/html/backend_2metal_2utils_8h.html delete mode 100644 docs/build/html/backend_2metal_2utils_8h_source.html delete mode 100644 docs/build/html/bc_s.png delete mode 100644 docs/build/html/bc_sd.png delete mode 100644 docs/build/html/bf16__math_8h.html delete mode 100644 docs/build/html/bf16__math_8h_source.html delete mode 100644 docs/build/html/binary__two_8h.html delete mode 100644 docs/build/html/binary__two_8h_source.html delete mode 100644 docs/build/html/class_m_p_s_1_1_kernel-members.html delete mode 100644 docs/build/html/class_m_p_s_1_1_kernel.html delete mode 100644 docs/build/html/class_m_p_s_1_1_kernel.png delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix-members.html delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix.html delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix.png delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix_descriptor-members.html delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix_descriptor.html delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix_descriptor.png delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix_multiplication-members.html delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix_multiplication.html delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix_multiplication.png delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix_vector_multiplication-members.html delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix_vector_multiplication.html delete mode 100644 docs/build/html/class_m_p_s_1_1_matrix_vector_multiplication.png delete mode 100644 docs/build/html/class_m_p_s_1_1_vector-members.html delete mode 100644 docs/build/html/class_m_p_s_1_1_vector.html delete mode 100644 docs/build/html/class_m_p_s_1_1_vector.png delete mode 100644 docs/build/html/class_m_p_s_1_1_vector_descriptor-members.html delete mode 100644 docs/build/html/class_m_p_s_1_1_vector_descriptor.html delete mode 100644 docs/build/html/class_m_p_s_1_1_vector_descriptor.png delete mode 100644 docs/build/html/classes.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_abs-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_abs.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_abs.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_add-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_add.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_add.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_add_m_m-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_add_m_m.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_add_m_m.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arange-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arange.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arange.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_cos-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_cos.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_cos.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_cosh-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_cosh.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_cosh.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_sin-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_sin.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_sin.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_sinh-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_sinh.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_sinh.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_tan-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_tan.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_tan.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_tan2-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_tan2.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_tan2.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_tanh-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_tanh.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arc_tanh.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arg_partition-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arg_partition.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arg_partition.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arg_reduce-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arg_reduce.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arg_reduce.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arg_sort-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arg_sort.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_arg_sort.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_as_strided-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_as_strided.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_as_strided.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_as_type-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_as_type.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_as_type.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_bitwise_binary-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_bitwise_binary.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_bitwise_binary.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_block_masked_m_m-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_block_masked_m_m.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_block_masked_m_m.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_block_sparse_m_m-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_block_sparse_m_m.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_block_sparse_m_m.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_block_sparse_q_m_m-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_block_sparse_q_m_m.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_block_sparse_q_m_m.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_broadcast-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_broadcast.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_broadcast.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_ceil-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_ceil.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_ceil.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_cholesky-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_cholesky.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_cholesky.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_compiled-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_compiled.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_compiled.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_concatenate-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_concatenate.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_concatenate.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_conjugate-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_conjugate.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_conjugate.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_convolution-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_convolution.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_convolution.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_copy-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_copy.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_copy.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_cos-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_cos.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_cos.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_cosh-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_cosh.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_cosh.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_custom_v_j_p-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_custom_v_j_p.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_custom_v_j_p.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_depends-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_depends.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_depends.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_div_mod-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_div_mod.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_div_mod.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_divide-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_divide.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_divide.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_equal-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_equal.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_equal.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_erf-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_erf.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_erf.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_erf_inv-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_erf_inv.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_erf_inv.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_event-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_event.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_exp-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_exp.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_exp.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_expm1-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_expm1.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_expm1.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_f_f_t-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_f_f_t.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_f_f_t.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_floor-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_floor.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_floor.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_full-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_full.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_full.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_gather-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_gather.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_gather.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_greater-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_greater.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_greater.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_greater_equal-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_greater_equal.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_greater_equal.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_inverse-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_inverse.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_inverse.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_less-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_less.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_less.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_less_equal-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_less_equal.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_less_equal.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_load-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_load.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_load.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_log-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_log.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_log.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_log1p-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_log1p.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_log1p.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_log_add_exp-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_log_add_exp.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_log_add_exp.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_logical_and-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_logical_and.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_logical_and.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_logical_not-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_logical_not.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_logical_not.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_logical_or-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_logical_or.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_logical_or.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_matmul-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_matmul.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_matmul.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_maximum-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_maximum.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_maximum.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_minimum-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_minimum.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_minimum.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_multiply-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_multiply.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_multiply.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_negative-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_negative.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_negative.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_not_equal-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_not_equal.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_not_equal.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_number_of_elements-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_number_of_elements.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_number_of_elements.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_pad-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_pad.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_pad.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_partition-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_partition.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_partition.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_power-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_power.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_power.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_primitive-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_primitive.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_primitive.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_q_r_f-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_q_r_f.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_q_r_f.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_quantized_matmul-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_quantized_matmul.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_quantized_matmul.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_random_bits-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_random_bits.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_random_bits.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_reduce-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_reduce.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_reduce.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_remainder-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_remainder.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_remainder.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_reshape-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_reshape.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_reshape.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_round-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_round.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_round.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_s_v_d-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_s_v_d.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_s_v_d.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_scan-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_scan.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_scan.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_scatter-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_scatter.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_scatter.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_select-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_select.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_select.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sigmoid-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sigmoid.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sigmoid.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sign-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sign.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sign.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sin-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sin.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sin.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sinh-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sinh.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sinh.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_slice-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_slice.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_slice.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_slice_update-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_slice_update.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_slice_update.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_softmax-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_softmax.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_softmax.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sort-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sort.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sort.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_split-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_split.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_split.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sqrt-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sqrt.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_sqrt.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_square-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_square.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_square.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_stop_gradient-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_stop_gradient.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_stop_gradient.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_subtract-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_subtract.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_subtract.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_tan-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_tan.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_tan.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_tanh-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_tanh.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_tanh.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_transpose-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_transpose.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_transpose.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_unary_primitive-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_unary_primitive.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_unary_primitive.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1_uniform-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_uniform.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1_uniform.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1allocator_1_1_allocator-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1allocator_1_1_allocator.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1allocator_1_1_allocator.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1allocator_1_1_buffer-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1allocator_1_1_buffer.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1allocator_1_1_common_allocator-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1allocator_1_1_common_allocator.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1allocator_1_1_common_allocator.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1array-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1array.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_custom-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_custom.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_custom.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm_v_j_p-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm_v_j_p.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm_v_j_p.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm_v_j_p-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm_v_j_p.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm_v_j_p.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_ro_p_e-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_ro_p_e.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_ro_p_e.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_file_reader-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_file_reader.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_file_reader.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_file_writer-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_file_writer.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_file_writer.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_reader-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_reader.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_reader.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_writer-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_writer.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1io_1_1_writer.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1metal_1_1_device-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1metal_1_1_device.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1metal_1_1_metal_allocator-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1metal_1_1_metal_allocator.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1metal_1_1_metal_allocator.png delete mode 100644 docs/build/html/classmlx_1_1core_1_1random_1_1_key_sequence-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1random_1_1_key_sequence.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1scheduler_1_1_scheduler-members.html delete mode 100644 docs/build/html/classmlx_1_1core_1_1scheduler_1_1_scheduler.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1_t__dcst23-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1_t__dcst23.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1_t__dcst4-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1_t__dcst4.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1_t__dct1-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1_t__dct1.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1_t__dst1-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1_t__dst1.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1arr-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1arr.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1arr__info-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1arr__info.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1arr__info.png delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1cfftp-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1cfftp.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1cndarr-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1cndarr.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1cndarr.png delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1fftblue-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1fftblue.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1multi__iter-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1multi__iter.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1ndarr-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1ndarr.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1ndarr.png delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1pocketfft__c-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1pocketfft__c.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1pocketfft__r-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1pocketfft__r.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1rev__iter-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1rev__iter.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1rfftp-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1rfftp.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1simple__iter-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1simple__iter.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1sincos__2pibyn-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1sincos__2pibyn.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1threading_1_1concurrent__queue-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1threading_1_1concurrent__queue.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1threading_1_1latch-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1threading_1_1latch.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1threading_1_1thread__pool-members.html delete mode 100644 docs/build/html/classpocketfft_1_1detail_1_1threading_1_1thread__pool.html delete mode 100644 docs/build/html/clipboard.js delete mode 100644 docs/build/html/closed.png delete mode 100644 docs/build/html/common_2binary_8h.html delete mode 100644 docs/build/html/common_2binary_8h_source.html delete mode 100644 docs/build/html/common_2compiled__preamble_8h.html delete mode 100644 docs/build/html/common_2compiled__preamble_8h_source.html delete mode 100644 docs/build/html/common_2copy_8h.html delete mode 100644 docs/build/html/common_2copy_8h_source.html delete mode 100644 docs/build/html/common_2reduce_8h.html delete mode 100644 docs/build/html/common_2reduce_8h_source.html delete mode 100644 docs/build/html/common_2ternary_8h.html delete mode 100644 docs/build/html/common_2ternary_8h_source.html delete mode 100644 docs/build/html/common_2unary_8h.html delete mode 100644 docs/build/html/common_2unary_8h_source.html delete mode 100644 docs/build/html/compile_8h.html delete mode 100644 docs/build/html/compile_8h_source.html delete mode 100644 docs/build/html/compile__impl_8h.html delete mode 100644 docs/build/html/compile__impl_8h_source.html delete mode 100644 docs/build/html/compiled_8h.html delete mode 100644 docs/build/html/compiled_8h_source.html delete mode 100644 docs/build/html/conv_2loader_8h.html delete mode 100644 docs/build/html/conv_2loader_8h_source.html delete mode 100644 docs/build/html/conv_2params_8h.html delete mode 100644 docs/build/html/conv_2params_8h_source.html delete mode 100644 docs/build/html/conv_8h.html delete mode 100644 docs/build/html/conv_8h_source.html delete mode 100644 docs/build/html/cookie.js delete mode 100644 docs/build/html/defines_8h.html delete mode 100644 docs/build/html/defines_8h_source.html delete mode 100644 docs/build/html/device_8h.html delete mode 100644 docs/build/html/device_8h_source.html delete mode 100644 docs/build/html/dir_1683daa6c50d5a1449f58a10604f9f12.html delete mode 100644 docs/build/html/dir_1d446c9bd3c99228254c9484e0bc5c06.html delete mode 100644 docs/build/html/dir_2193406f5b2eae6fc53753d8a9a80df3.html delete mode 100644 docs/build/html/dir_47795aa8999234f6f402f7e89d34d08e.html delete mode 100644 docs/build/html/dir_6768c99e6145fb9510ccdb40db8ede25.html delete mode 100644 docs/build/html/dir_70a37effa88bcbd6b791977fa1e64356.html delete mode 100644 docs/build/html/dir_76215a6c54e2b67053e723fc2395583c.html delete mode 100644 docs/build/html/dir_86b95e7b1d0d6e25466bb9213752d32f.html delete mode 100644 docs/build/html/dir_938ab0ecf10b8b860ff766c820f665fd.html delete mode 100644 docs/build/html/dir_ad00dcd1517bfdbe01f68ec9b4eff877.html delete mode 100644 docs/build/html/dir_ba4426224ef60f409462a2a12fa18f06.html delete mode 100644 docs/build/html/dir_d0c977ea65824390717cdb7efc36c157.html delete mode 100644 docs/build/html/dir_df9494e83ef22ae6150a0e080d9709ed.html delete mode 100644 docs/build/html/dir_f149b24a1b5be11cd70151abe517e3f8.html delete mode 100644 docs/build/html/dir_f60cd69d27fd3faa641c79056fff0e2d.html delete mode 100644 docs/build/html/doc.svg delete mode 100644 docs/build/html/docd.svg delete mode 100644 docs/build/html/doxygen.css delete mode 100644 docs/build/html/doxygen.svg delete mode 100644 docs/build/html/doxygen_crawl.html delete mode 100644 docs/build/html/dtype_8h.html delete mode 100644 docs/build/html/dtype_8h_source.html delete mode 100644 docs/build/html/dynsections.js delete mode 100644 docs/build/html/erf_8h.html delete mode 100644 docs/build/html/erf_8h_source.html delete mode 100644 docs/build/html/event_8h.html delete mode 100644 docs/build/html/event_8h_source.html delete mode 100644 docs/build/html/expm1f_8h.html delete mode 100644 docs/build/html/expm1f_8h_source.html delete mode 100644 docs/build/html/fast_8h.html delete mode 100644 docs/build/html/fast_8h_source.html delete mode 100644 docs/build/html/fast__primitives_8h.html delete mode 100644 docs/build/html/fast__primitives_8h_source.html delete mode 100644 docs/build/html/fft_8h.html delete mode 100644 docs/build/html/fft_8h_source.html delete mode 100644 docs/build/html/files.html delete mode 100644 docs/build/html/folderclosed.svg delete mode 100644 docs/build/html/folderclosedd.svg delete mode 100644 docs/build/html/folderopen.svg delete mode 100644 docs/build/html/folderopend.svg delete mode 100644 docs/build/html/fp16_8h.html delete mode 100644 docs/build/html/fp16_8h_source.html delete mode 100644 docs/build/html/functions.html delete mode 100644 docs/build/html/functions_a.html delete mode 100644 docs/build/html/functions_b.html delete mode 100644 docs/build/html/functions_c.html delete mode 100644 docs/build/html/functions_d.html delete mode 100644 docs/build/html/functions_e.html delete mode 100644 docs/build/html/functions_enum.html delete mode 100644 docs/build/html/functions_eval.html delete mode 100644 docs/build/html/functions_f.html delete mode 100644 docs/build/html/functions_func.html delete mode 100644 docs/build/html/functions_func_a.html delete mode 100644 docs/build/html/functions_func_b.html delete mode 100644 docs/build/html/functions_func_c.html delete mode 100644 docs/build/html/functions_func_d.html delete mode 100644 docs/build/html/functions_func_e.html delete mode 100644 docs/build/html/functions_func_f.html delete mode 100644 docs/build/html/functions_func_g.html delete mode 100644 docs/build/html/functions_func_h.html delete mode 100644 docs/build/html/functions_func_i.html delete mode 100644 docs/build/html/functions_func_j.html delete mode 100644 docs/build/html/functions_func_k.html delete mode 100644 docs/build/html/functions_func_l.html delete mode 100644 docs/build/html/functions_func_m.html delete mode 100644 docs/build/html/functions_func_n.html delete mode 100644 docs/build/html/functions_func_o.html delete mode 100644 docs/build/html/functions_func_p.html delete mode 100644 docs/build/html/functions_func_q.html delete mode 100644 docs/build/html/functions_func_r.html delete mode 100644 docs/build/html/functions_func_s.html delete mode 100644 docs/build/html/functions_func_t.html delete mode 100644 docs/build/html/functions_func_u.html delete mode 100644 docs/build/html/functions_func_v.html delete mode 100644 docs/build/html/functions_func_w.html delete mode 100644 docs/build/html/functions_func_~.html delete mode 100644 docs/build/html/functions_g.html delete mode 100644 docs/build/html/functions_h.html delete mode 100644 docs/build/html/functions_i.html delete mode 100644 docs/build/html/functions_j.html delete mode 100644 docs/build/html/functions_k.html delete mode 100644 docs/build/html/functions_l.html delete mode 100644 docs/build/html/functions_m.html delete mode 100644 docs/build/html/functions_n.html delete mode 100644 docs/build/html/functions_o.html delete mode 100644 docs/build/html/functions_p.html delete mode 100644 docs/build/html/functions_q.html delete mode 100644 docs/build/html/functions_r.html delete mode 100644 docs/build/html/functions_rela.html delete mode 100644 docs/build/html/functions_s.html delete mode 100644 docs/build/html/functions_t.html delete mode 100644 docs/build/html/functions_type.html delete mode 100644 docs/build/html/functions_u.html delete mode 100644 docs/build/html/functions_v.html delete mode 100644 docs/build/html/functions_vars.html delete mode 100644 docs/build/html/functions_vars_b.html delete mode 100644 docs/build/html/functions_vars_c.html delete mode 100644 docs/build/html/functions_vars_d.html delete mode 100644 docs/build/html/functions_vars_e.html delete mode 100644 docs/build/html/functions_vars_f.html delete mode 100644 docs/build/html/functions_vars_g.html delete mode 100644 docs/build/html/functions_vars_i.html delete mode 100644 docs/build/html/functions_vars_j.html delete mode 100644 docs/build/html/functions_vars_k.html delete mode 100644 docs/build/html/functions_vars_l.html delete mode 100644 docs/build/html/functions_vars_m.html delete mode 100644 docs/build/html/functions_vars_n.html delete mode 100644 docs/build/html/functions_vars_o.html delete mode 100644 docs/build/html/functions_vars_p.html delete mode 100644 docs/build/html/functions_vars_q.html delete mode 100644 docs/build/html/functions_vars_r.html delete mode 100644 docs/build/html/functions_vars_s.html delete mode 100644 docs/build/html/functions_vars_t.html delete mode 100644 docs/build/html/functions_vars_v.html delete mode 100644 docs/build/html/functions_vars_w.html delete mode 100644 docs/build/html/functions_w.html delete mode 100644 docs/build/html/functions_x.html delete mode 100644 docs/build/html/functions_~.html delete mode 100644 docs/build/html/gemm_2loader_8h.html delete mode 100644 docs/build/html/gemm_2loader_8h_source.html delete mode 100644 docs/build/html/gemm_2params_8h.html delete mode 100644 docs/build/html/gemm_2params_8h_source.html delete mode 100644 docs/build/html/gguf_8h.html delete mode 100644 docs/build/html/gguf_8h_source.html delete mode 100644 docs/build/html/globals.html delete mode 100644 docs/build/html/globals_a.html delete mode 100644 docs/build/html/globals_b.html delete mode 100644 docs/build/html/globals_c.html delete mode 100644 docs/build/html/globals_d.html delete mode 100644 docs/build/html/globals_defs.html delete mode 100644 docs/build/html/globals_e.html delete mode 100644 docs/build/html/globals_f.html delete mode 100644 docs/build/html/globals_func.html delete mode 100644 docs/build/html/globals_func_c.html delete mode 100644 docs/build/html/globals_func_e.html delete mode 100644 docs/build/html/globals_func_f.html delete mode 100644 docs/build/html/globals_func_g.html delete mode 100644 docs/build/html/globals_func_l.html delete mode 100644 docs/build/html/globals_func_m.html delete mode 100644 docs/build/html/globals_func_o.html delete mode 100644 docs/build/html/globals_func_s.html delete mode 100644 docs/build/html/globals_g.html delete mode 100644 docs/build/html/globals_h.html delete mode 100644 docs/build/html/globals_i.html delete mode 100644 docs/build/html/globals_l.html delete mode 100644 docs/build/html/globals_m.html delete mode 100644 docs/build/html/globals_n.html delete mode 100644 docs/build/html/globals_o.html delete mode 100644 docs/build/html/globals_p.html delete mode 100644 docs/build/html/globals_r.html delete mode 100644 docs/build/html/globals_s.html delete mode 100644 docs/build/html/globals_type.html delete mode 100644 docs/build/html/globals_u.html delete mode 100644 docs/build/html/globals_vars.html delete mode 100644 docs/build/html/graph__utils_8h.html delete mode 100644 docs/build/html/graph__utils_8h_source.html delete mode 100644 docs/build/html/group__ops.html delete mode 100644 docs/build/html/half__types_8h.html delete mode 100644 docs/build/html/half__types_8h_source.html delete mode 100644 docs/build/html/hierarchy.html delete mode 100644 docs/build/html/indexing_8h.html delete mode 100644 docs/build/html/indexing_8h_source.html delete mode 100644 docs/build/html/io_8h.html delete mode 100644 docs/build/html/io_8h_source.html delete mode 100644 docs/build/html/jquery.js delete mode 100644 docs/build/html/kernels_2steel_2gemm_2gemm_8h.html delete mode 100644 docs/build/html/kernels_2steel_2gemm_2gemm_8h_source.html delete mode 100644 docs/build/html/lapack__helper_8h.html delete mode 100644 docs/build/html/lapack__helper_8h_source.html delete mode 100644 docs/build/html/linalg_8h.html delete mode 100644 docs/build/html/linalg_8h_source.html delete mode 100644 docs/build/html/load_8h.html delete mode 100644 docs/build/html/load_8h_source.html delete mode 100644 docs/build/html/loader__channel__l_8h.html delete mode 100644 docs/build/html/loader__channel__l_8h_source.html delete mode 100644 docs/build/html/loader__channel__n_8h.html delete mode 100644 docs/build/html/loader__channel__n_8h_source.html delete mode 100644 docs/build/html/loader__general_8h.html delete mode 100644 docs/build/html/loader__general_8h_source.html delete mode 100644 docs/build/html/matmul_8h.html delete mode 100644 docs/build/html/matmul_8h_source.html delete mode 100644 docs/build/html/menu.js delete mode 100644 docs/build/html/menudata.js delete mode 100644 docs/build/html/metal_2compiled__preamble_8h.html delete mode 100644 docs/build/html/metal_2compiled__preamble_8h_source.html delete mode 100644 docs/build/html/metal_2copy_8h.html delete mode 100644 docs/build/html/metal_2copy_8h_source.html delete mode 100644 docs/build/html/metal_2kernels_2binary_8h.html delete mode 100644 docs/build/html/metal_2kernels_2binary_8h_source.html delete mode 100644 docs/build/html/metal_2kernels_2compiled__preamble_8h.html delete mode 100644 docs/build/html/metal_2kernels_2compiled__preamble_8h_source.html delete mode 100644 docs/build/html/metal_2kernels_2ternary_8h.html delete mode 100644 docs/build/html/metal_2kernels_2ternary_8h_source.html delete mode 100644 docs/build/html/metal_2kernels_2unary_8h.html delete mode 100644 docs/build/html/metal_2kernels_2unary_8h_source.html delete mode 100644 docs/build/html/metal_2reduce_8h.html delete mode 100644 docs/build/html/metal_2reduce_8h_source.html delete mode 100644 docs/build/html/metal_8h.html delete mode 100644 docs/build/html/metal_8h_source.html delete mode 100644 docs/build/html/metal__impl_8h.html delete mode 100644 docs/build/html/metal__impl_8h_source.html delete mode 100644 docs/build/html/minus.svg delete mode 100644 docs/build/html/minusd.svg delete mode 100644 docs/build/html/mlx_8h.html delete mode 100644 docs/build/html/mlx_8h_source.html delete mode 100644 docs/build/html/mma_8h.html delete mode 100644 docs/build/html/mma_8h_source.html delete mode 100644 docs/build/html/mps_2gemm_8h.html delete mode 100644 docs/build/html/mps_2gemm_8h_source.html delete mode 100644 docs/build/html/namespace_m_p_s.html delete mode 100644 docs/build/html/namespace_m_t_l.html delete mode 100644 docs/build/html/namespace_m_t_l_1_1_private.html delete mode 100644 docs/build/html/namespace_m_t_l_1_1_private_1_1_class.html delete mode 100644 docs/build/html/namespace_m_t_l_1_1_private_1_1_selector.html delete mode 100644 docs/build/html/namespacemembers.html delete mode 100644 docs/build/html/namespacemembers_a.html delete mode 100644 docs/build/html/namespacemembers_b.html delete mode 100644 docs/build/html/namespacemembers_c.html delete mode 100644 docs/build/html/namespacemembers_d.html delete mode 100644 docs/build/html/namespacemembers_e.html delete mode 100644 docs/build/html/namespacemembers_enum.html delete mode 100644 docs/build/html/namespacemembers_eval.html delete mode 100644 docs/build/html/namespacemembers_f.html delete mode 100644 docs/build/html/namespacemembers_func.html delete mode 100644 docs/build/html/namespacemembers_func_a.html delete mode 100644 docs/build/html/namespacemembers_func_b.html delete mode 100644 docs/build/html/namespacemembers_func_c.html delete mode 100644 docs/build/html/namespacemembers_func_d.html delete mode 100644 docs/build/html/namespacemembers_func_e.html delete mode 100644 docs/build/html/namespacemembers_func_f.html delete mode 100644 docs/build/html/namespacemembers_func_g.html delete mode 100644 docs/build/html/namespacemembers_func_i.html delete mode 100644 docs/build/html/namespacemembers_func_j.html delete mode 100644 docs/build/html/namespacemembers_func_k.html delete mode 100644 docs/build/html/namespacemembers_func_l.html delete mode 100644 docs/build/html/namespacemembers_func_m.html delete mode 100644 docs/build/html/namespacemembers_func_n.html delete mode 100644 docs/build/html/namespacemembers_func_o.html delete mode 100644 docs/build/html/namespacemembers_func_p.html delete mode 100644 docs/build/html/namespacemembers_func_q.html delete mode 100644 docs/build/html/namespacemembers_func_r.html delete mode 100644 docs/build/html/namespacemembers_func_s.html delete mode 100644 docs/build/html/namespacemembers_func_t.html delete mode 100644 docs/build/html/namespacemembers_func_u.html delete mode 100644 docs/build/html/namespacemembers_func_v.html delete mode 100644 docs/build/html/namespacemembers_func_w.html delete mode 100644 docs/build/html/namespacemembers_func_z.html delete mode 100644 docs/build/html/namespacemembers_g.html delete mode 100644 docs/build/html/namespacemembers_i.html delete mode 100644 docs/build/html/namespacemembers_j.html delete mode 100644 docs/build/html/namespacemembers_k.html delete mode 100644 docs/build/html/namespacemembers_l.html delete mode 100644 docs/build/html/namespacemembers_m.html delete mode 100644 docs/build/html/namespacemembers_n.html delete mode 100644 docs/build/html/namespacemembers_o.html delete mode 100644 docs/build/html/namespacemembers_p.html delete mode 100644 docs/build/html/namespacemembers_q.html delete mode 100644 docs/build/html/namespacemembers_r.html delete mode 100644 docs/build/html/namespacemembers_s.html delete mode 100644 docs/build/html/namespacemembers_t.html delete mode 100644 docs/build/html/namespacemembers_type.html delete mode 100644 docs/build/html/namespacemembers_u.html delete mode 100644 docs/build/html/namespacemembers_v.html delete mode 100644 docs/build/html/namespacemembers_vars.html delete mode 100644 docs/build/html/namespacemembers_w.html delete mode 100644 docs/build/html/namespacemembers_z.html delete mode 100644 docs/build/html/namespacemetal.html delete mode 100644 docs/build/html/namespacemetal_1_1fast.html delete mode 100644 docs/build/html/namespacemetal_1_1precise.html delete mode 100644 docs/build/html/namespacemlx.html delete mode 100644 docs/build/html/namespacemlx_1_1core.html delete mode 100644 docs/build/html/namespacemlx_1_1core_1_1allocator.html delete mode 100644 docs/build/html/namespacemlx_1_1core_1_1detail.html delete mode 100644 docs/build/html/namespacemlx_1_1core_1_1fast.html delete mode 100644 docs/build/html/namespacemlx_1_1core_1_1fft.html delete mode 100644 docs/build/html/namespacemlx_1_1core_1_1io.html delete mode 100644 docs/build/html/namespacemlx_1_1core_1_1linalg.html delete mode 100644 docs/build/html/namespacemlx_1_1core_1_1metal.html delete mode 100644 docs/build/html/namespacemlx_1_1core_1_1random.html delete mode 100644 docs/build/html/namespacemlx_1_1core_1_1scheduler.html delete mode 100644 docs/build/html/namespacemlx_1_1steel.html delete mode 100644 docs/build/html/namespacepocketfft.html delete mode 100644 docs/build/html/namespacepocketfft_1_1detail.html delete mode 100644 docs/build/html/namespacepocketfft_1_1detail_1_1threading.html delete mode 100644 docs/build/html/namespaces.html delete mode 100644 docs/build/html/nav_f.png delete mode 100644 docs/build/html/nav_fd.png delete mode 100644 docs/build/html/nav_g.png delete mode 100644 docs/build/html/nav_h.png delete mode 100644 docs/build/html/nav_hd.png delete mode 100644 docs/build/html/open.png delete mode 100644 docs/build/html/ops_8h.html delete mode 100644 docs/build/html/ops_8h_source.html delete mode 100644 docs/build/html/plus.svg delete mode 100644 docs/build/html/plusd.svg delete mode 100644 docs/build/html/pocketfft_8h.html delete mode 100644 docs/build/html/pocketfft_8h_source.html delete mode 100644 docs/build/html/primitives_8h.html delete mode 100644 docs/build/html/primitives_8h_source.html create mode 100644 docs/build/html/python/_autosummary/mlx.core.gather_mm.html create mode 100644 docs/build/html/python/_autosummary/mlx.core.gather_qmm.html create mode 100644 docs/build/html/python/_autosummary/mlx.core.trace.html delete mode 100644 docs/build/html/random_8h.html delete mode 100644 docs/build/html/random_8h_source.html delete mode 100644 docs/build/html/reduce__inst_8h.html delete mode 100644 docs/build/html/reduce__inst_8h_source.html delete mode 100644 docs/build/html/scaled__dot__product__attention__params_8h.html delete mode 100644 docs/build/html/scaled__dot__product__attention__params_8h_source.html delete mode 100644 docs/build/html/scheduler_8h.html delete mode 100644 docs/build/html/scheduler_8h_source.html delete mode 100644 docs/build/html/search/all_0.js delete mode 100644 docs/build/html/search/all_1.js delete mode 100644 docs/build/html/search/all_10.js delete mode 100644 docs/build/html/search/all_11.js delete mode 100644 docs/build/html/search/all_12.js delete mode 100644 docs/build/html/search/all_13.js delete mode 100644 docs/build/html/search/all_14.js delete mode 100644 docs/build/html/search/all_15.js delete mode 100644 docs/build/html/search/all_16.js delete mode 100644 docs/build/html/search/all_17.js delete mode 100644 docs/build/html/search/all_18.js delete mode 100644 docs/build/html/search/all_19.js delete mode 100644 docs/build/html/search/all_1a.js delete mode 100644 docs/build/html/search/all_2.js delete mode 100644 docs/build/html/search/all_3.js delete mode 100644 docs/build/html/search/all_4.js delete mode 100644 docs/build/html/search/all_5.js delete mode 100644 docs/build/html/search/all_6.js delete mode 100644 docs/build/html/search/all_7.js delete mode 100644 docs/build/html/search/all_8.js delete mode 100644 docs/build/html/search/all_9.js delete mode 100644 docs/build/html/search/all_a.js delete mode 100644 docs/build/html/search/all_b.js delete mode 100644 docs/build/html/search/all_c.js delete mode 100644 docs/build/html/search/all_d.js delete mode 100644 docs/build/html/search/all_e.js delete mode 100644 docs/build/html/search/all_f.js delete mode 100644 docs/build/html/search/classes_0.js delete mode 100644 docs/build/html/search/classes_1.js delete mode 100644 docs/build/html/search/classes_10.js delete mode 100644 docs/build/html/search/classes_11.js delete mode 100644 docs/build/html/search/classes_12.js delete mode 100644 docs/build/html/search/classes_13.js delete mode 100644 docs/build/html/search/classes_14.js delete mode 100644 docs/build/html/search/classes_15.js delete mode 100644 docs/build/html/search/classes_2.js delete mode 100644 docs/build/html/search/classes_3.js delete mode 100644 docs/build/html/search/classes_4.js delete mode 100644 docs/build/html/search/classes_5.js delete mode 100644 docs/build/html/search/classes_6.js delete mode 100644 docs/build/html/search/classes_7.js delete mode 100644 docs/build/html/search/classes_8.js delete mode 100644 docs/build/html/search/classes_9.js delete mode 100644 docs/build/html/search/classes_a.js delete mode 100644 docs/build/html/search/classes_b.js delete mode 100644 docs/build/html/search/classes_c.js delete mode 100644 docs/build/html/search/classes_d.js delete mode 100644 docs/build/html/search/classes_e.js delete mode 100644 docs/build/html/search/classes_f.js delete mode 100644 docs/build/html/search/close.svg delete mode 100644 docs/build/html/search/defines_0.js delete mode 100644 docs/build/html/search/defines_1.js delete mode 100644 docs/build/html/search/defines_2.js delete mode 100644 docs/build/html/search/defines_3.js delete mode 100644 docs/build/html/search/defines_4.js delete mode 100644 docs/build/html/search/defines_5.js delete mode 100644 docs/build/html/search/defines_6.js delete mode 100644 docs/build/html/search/defines_7.js delete mode 100644 docs/build/html/search/defines_8.js delete mode 100644 docs/build/html/search/defines_9.js delete mode 100644 docs/build/html/search/defines_a.js delete mode 100644 docs/build/html/search/defines_b.js delete mode 100644 docs/build/html/search/enums_0.js delete mode 100644 docs/build/html/search/enums_1.js delete mode 100644 docs/build/html/search/enums_2.js delete mode 100644 docs/build/html/search/enums_3.js delete mode 100644 docs/build/html/search/enums_4.js delete mode 100644 docs/build/html/search/enums_5.js delete mode 100644 docs/build/html/search/enums_6.js delete mode 100644 docs/build/html/search/enums_7.js delete mode 100644 docs/build/html/search/enumvalues_0.js delete mode 100644 docs/build/html/search/enumvalues_1.js delete mode 100644 docs/build/html/search/enumvalues_10.js delete mode 100644 docs/build/html/search/enumvalues_11.js delete mode 100644 docs/build/html/search/enumvalues_12.js delete mode 100644 docs/build/html/search/enumvalues_2.js delete mode 100644 docs/build/html/search/enumvalues_3.js delete mode 100644 docs/build/html/search/enumvalues_4.js delete mode 100644 docs/build/html/search/enumvalues_5.js delete mode 100644 docs/build/html/search/enumvalues_6.js delete mode 100644 docs/build/html/search/enumvalues_7.js delete mode 100644 docs/build/html/search/enumvalues_8.js delete mode 100644 docs/build/html/search/enumvalues_9.js delete mode 100644 docs/build/html/search/enumvalues_a.js delete mode 100644 docs/build/html/search/enumvalues_b.js delete mode 100644 docs/build/html/search/enumvalues_c.js delete mode 100644 docs/build/html/search/enumvalues_d.js delete mode 100644 docs/build/html/search/enumvalues_e.js delete mode 100644 docs/build/html/search/enumvalues_f.js delete mode 100644 docs/build/html/search/files_0.js delete mode 100644 docs/build/html/search/files_1.js delete mode 100644 docs/build/html/search/files_10.js delete mode 100644 docs/build/html/search/files_2.js delete mode 100644 docs/build/html/search/files_3.js delete mode 100644 docs/build/html/search/files_4.js delete mode 100644 docs/build/html/search/files_5.js delete mode 100644 docs/build/html/search/files_6.js delete mode 100644 docs/build/html/search/files_7.js delete mode 100644 docs/build/html/search/files_8.js delete mode 100644 docs/build/html/search/files_9.js delete mode 100644 docs/build/html/search/files_a.js delete mode 100644 docs/build/html/search/files_b.js delete mode 100644 docs/build/html/search/files_c.js delete mode 100644 docs/build/html/search/files_d.js delete mode 100644 docs/build/html/search/files_e.js delete mode 100644 docs/build/html/search/files_f.js delete mode 100644 docs/build/html/search/functions_0.js delete mode 100644 docs/build/html/search/functions_1.js delete mode 100644 docs/build/html/search/functions_10.js delete mode 100644 docs/build/html/search/functions_11.js delete mode 100644 docs/build/html/search/functions_12.js delete mode 100644 docs/build/html/search/functions_13.js delete mode 100644 docs/build/html/search/functions_14.js delete mode 100644 docs/build/html/search/functions_15.js delete mode 100644 docs/build/html/search/functions_16.js delete mode 100644 docs/build/html/search/functions_17.js delete mode 100644 docs/build/html/search/functions_18.js delete mode 100644 docs/build/html/search/functions_19.js delete mode 100644 docs/build/html/search/functions_2.js delete mode 100644 docs/build/html/search/functions_3.js delete mode 100644 docs/build/html/search/functions_4.js delete mode 100644 docs/build/html/search/functions_5.js delete mode 100644 docs/build/html/search/functions_6.js delete mode 100644 docs/build/html/search/functions_7.js delete mode 100644 docs/build/html/search/functions_8.js delete mode 100644 docs/build/html/search/functions_9.js delete mode 100644 docs/build/html/search/functions_a.js delete mode 100644 docs/build/html/search/functions_b.js delete mode 100644 docs/build/html/search/functions_c.js delete mode 100644 docs/build/html/search/functions_d.js delete mode 100644 docs/build/html/search/functions_e.js delete mode 100644 docs/build/html/search/functions_f.js delete mode 100644 docs/build/html/search/groups_0.js delete mode 100644 docs/build/html/search/groups_1.js delete mode 100644 docs/build/html/search/groups_2.js delete mode 100644 docs/build/html/search/mag.svg delete mode 100644 docs/build/html/search/mag_d.svg delete mode 100644 docs/build/html/search/mag_sel.svg delete mode 100644 docs/build/html/search/mag_seld.svg delete mode 100644 docs/build/html/search/namespaces_0.js delete mode 100644 docs/build/html/search/namespaces_1.js delete mode 100644 docs/build/html/search/related_0.js delete mode 100644 docs/build/html/search/related_1.js delete mode 100644 docs/build/html/search/search.css delete mode 100644 docs/build/html/search/search.js delete mode 100644 docs/build/html/search/searchdata.js delete mode 100644 docs/build/html/search/typedefs_0.js delete mode 100644 docs/build/html/search/typedefs_1.js delete mode 100644 docs/build/html/search/typedefs_2.js delete mode 100644 docs/build/html/search/typedefs_3.js delete mode 100644 docs/build/html/search/typedefs_4.js delete mode 100644 docs/build/html/search/typedefs_5.js delete mode 100644 docs/build/html/search/typedefs_6.js delete mode 100644 docs/build/html/search/typedefs_7.js delete mode 100644 docs/build/html/search/typedefs_8.js delete mode 100644 docs/build/html/search/typedefs_9.js delete mode 100644 docs/build/html/search/typedefs_a.js delete mode 100644 docs/build/html/search/typedefs_b.js delete mode 100644 docs/build/html/search/typedefs_c.js delete mode 100644 docs/build/html/search/variables_0.js delete mode 100644 docs/build/html/search/variables_1.js delete mode 100644 docs/build/html/search/variables_10.js delete mode 100644 docs/build/html/search/variables_11.js delete mode 100644 docs/build/html/search/variables_12.js delete mode 100644 docs/build/html/search/variables_13.js delete mode 100644 docs/build/html/search/variables_14.js delete mode 100644 docs/build/html/search/variables_15.js delete mode 100644 docs/build/html/search/variables_2.js delete mode 100644 docs/build/html/search/variables_3.js delete mode 100644 docs/build/html/search/variables_4.js delete mode 100644 docs/build/html/search/variables_5.js delete mode 100644 docs/build/html/search/variables_6.js delete mode 100644 docs/build/html/search/variables_7.js delete mode 100644 docs/build/html/search/variables_8.js delete mode 100644 docs/build/html/search/variables_9.js delete mode 100644 docs/build/html/search/variables_a.js delete mode 100644 docs/build/html/search/variables_b.js delete mode 100644 docs/build/html/search/variables_c.js delete mode 100644 docs/build/html/search/variables_d.js delete mode 100644 docs/build/html/search/variables_e.js delete mode 100644 docs/build/html/search/variables_f.js delete mode 100644 docs/build/html/splitbar.png delete mode 100644 docs/build/html/splitbard.png delete mode 100644 docs/build/html/stream_8h.html delete mode 100644 docs/build/html/stream_8h_source.html delete mode 100644 docs/build/html/struct___m_l_x___b_float16-members.html delete mode 100644 docs/build/html/struct___m_l_x___b_float16.html delete mode 100644 docs/build/html/struct___m_l_x___b_float16_1_1bits__to__bfloat__struct.html delete mode 100644 docs/build/html/struct_abs-members.html delete mode 100644 docs/build/html/struct_abs.html delete mode 100644 docs/build/html/struct_add-members.html delete mode 100644 docs/build/html/struct_add.html delete mode 100644 docs/build/html/struct_and-members.html delete mode 100644 docs/build/html/struct_and.html delete mode 100644 docs/build/html/struct_arc_cos-members.html delete mode 100644 docs/build/html/struct_arc_cos.html delete mode 100644 docs/build/html/struct_arc_cosh-members.html delete mode 100644 docs/build/html/struct_arc_cosh.html delete mode 100644 docs/build/html/struct_arc_sin-members.html delete mode 100644 docs/build/html/struct_arc_sin.html delete mode 100644 docs/build/html/struct_arc_sinh-members.html delete mode 100644 docs/build/html/struct_arc_sinh.html delete mode 100644 docs/build/html/struct_arc_tan-members.html delete mode 100644 docs/build/html/struct_arc_tan.html delete mode 100644 docs/build/html/struct_arc_tan2-members.html delete mode 100644 docs/build/html/struct_arc_tan2.html delete mode 100644 docs/build/html/struct_arc_tanh-members.html delete mode 100644 docs/build/html/struct_arc_tanh.html delete mode 100644 docs/build/html/struct_bitwise_and-members.html delete mode 100644 docs/build/html/struct_bitwise_and.html delete mode 100644 docs/build/html/struct_bitwise_or-members.html delete mode 100644 docs/build/html/struct_bitwise_or.html delete mode 100644 docs/build/html/struct_bitwise_xor-members.html delete mode 100644 docs/build/html/struct_bitwise_xor.html delete mode 100644 docs/build/html/struct_ceil-members.html delete mode 100644 docs/build/html/struct_ceil.html delete mode 100644 docs/build/html/struct_conjugate-members.html delete mode 100644 docs/build/html/struct_conjugate.html delete mode 100644 docs/build/html/struct_cos-members.html delete mode 100644 docs/build/html/struct_cos.html delete mode 100644 docs/build/html/struct_cosh-members.html delete mode 100644 docs/build/html/struct_cosh.html delete mode 100644 docs/build/html/struct_divide-members.html delete mode 100644 docs/build/html/struct_divide.html delete mode 100644 docs/build/html/struct_equal-members.html delete mode 100644 docs/build/html/struct_equal.html delete mode 100644 docs/build/html/struct_erf-members.html delete mode 100644 docs/build/html/struct_erf.html delete mode 100644 docs/build/html/struct_erf_inv-members.html delete mode 100644 docs/build/html/struct_erf_inv.html delete mode 100644 docs/build/html/struct_exp-members.html delete mode 100644 docs/build/html/struct_exp.html delete mode 100644 docs/build/html/struct_expm1-members.html delete mode 100644 docs/build/html/struct_expm1.html delete mode 100644 docs/build/html/struct_floor-members.html delete mode 100644 docs/build/html/struct_floor.html delete mode 100644 docs/build/html/struct_greater-members.html delete mode 100644 docs/build/html/struct_greater.html delete mode 100644 docs/build/html/struct_greater_equal-members.html delete mode 100644 docs/build/html/struct_greater_equal.html delete mode 100644 docs/build/html/struct_indices-members.html delete mode 100644 docs/build/html/struct_indices.html delete mode 100644 docs/build/html/struct_left_shift-members.html delete mode 100644 docs/build/html/struct_left_shift.html delete mode 100644 docs/build/html/struct_less-members.html delete mode 100644 docs/build/html/struct_less.html delete mode 100644 docs/build/html/struct_less_equal-members.html delete mode 100644 docs/build/html/struct_less_equal.html delete mode 100644 docs/build/html/struct_limits-members.html delete mode 100644 docs/build/html/struct_limits.html delete mode 100644 docs/build/html/struct_limits_3_01bfloat16__t_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01bfloat16__t_01_4.html delete mode 100644 docs/build/html/struct_limits_3_01bool_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01bool_01_4.html delete mode 100644 docs/build/html/struct_limits_3_01float_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01float_01_4.html delete mode 100644 docs/build/html/struct_limits_3_01half_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01half_01_4.html delete mode 100644 docs/build/html/struct_limits_3_01int16__t_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01int16__t_01_4.html delete mode 100644 docs/build/html/struct_limits_3_01int32__t_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01int32__t_01_4.html delete mode 100644 docs/build/html/struct_limits_3_01int64__t_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01int64__t_01_4.html delete mode 100644 docs/build/html/struct_limits_3_01int8__t_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01int8__t_01_4.html delete mode 100644 docs/build/html/struct_limits_3_01uint16__t_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01uint16__t_01_4.html delete mode 100644 docs/build/html/struct_limits_3_01uint32__t_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01uint32__t_01_4.html delete mode 100644 docs/build/html/struct_limits_3_01uint64__t_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01uint64__t_01_4.html delete mode 100644 docs/build/html/struct_limits_3_01uint8__t_01_4-members.html delete mode 100644 docs/build/html/struct_limits_3_01uint8__t_01_4.html delete mode 100644 docs/build/html/struct_log-members.html delete mode 100644 docs/build/html/struct_log.html delete mode 100644 docs/build/html/struct_log10-members.html delete mode 100644 docs/build/html/struct_log10.html delete mode 100644 docs/build/html/struct_log1p-members.html delete mode 100644 docs/build/html/struct_log1p.html delete mode 100644 docs/build/html/struct_log2-members.html delete mode 100644 docs/build/html/struct_log2.html delete mode 100644 docs/build/html/struct_log_add_exp-members.html delete mode 100644 docs/build/html/struct_log_add_exp.html delete mode 100644 docs/build/html/struct_logical_and-members.html delete mode 100644 docs/build/html/struct_logical_and.html delete mode 100644 docs/build/html/struct_logical_not-members.html delete mode 100644 docs/build/html/struct_logical_not.html delete mode 100644 docs/build/html/struct_logical_or-members.html delete mode 100644 docs/build/html/struct_logical_or.html delete mode 100644 docs/build/html/struct_m_l_x_conv_params-members.html delete mode 100644 docs/build/html/struct_m_l_x_conv_params.html delete mode 100644 docs/build/html/struct_m_l_x_scaled_dot_product_attention_params-members.html delete mode 100644 docs/build/html/struct_m_l_x_scaled_dot_product_attention_params.html delete mode 100644 docs/build/html/struct_max-members.html delete mode 100644 docs/build/html/struct_max.html delete mode 100644 docs/build/html/struct_maximum-members.html delete mode 100644 docs/build/html/struct_maximum.html delete mode 100644 docs/build/html/struct_min-members.html delete mode 100644 docs/build/html/struct_min.html delete mode 100644 docs/build/html/struct_minimum-members.html delete mode 100644 docs/build/html/struct_minimum.html delete mode 100644 docs/build/html/struct_multiply-members.html delete mode 100644 docs/build/html/struct_multiply.html delete mode 100644 docs/build/html/struct_na_n_equal-members.html delete mode 100644 docs/build/html/struct_na_n_equal.html delete mode 100644 docs/build/html/struct_negative-members.html delete mode 100644 docs/build/html/struct_negative.html delete mode 100644 docs/build/html/struct_none-members.html delete mode 100644 docs/build/html/struct_none.html delete mode 100644 docs/build/html/struct_not_equal-members.html delete mode 100644 docs/build/html/struct_not_equal.html delete mode 100644 docs/build/html/struct_or-members.html delete mode 100644 docs/build/html/struct_or.html delete mode 100644 docs/build/html/struct_power-members.html delete mode 100644 docs/build/html/struct_power.html delete mode 100644 docs/build/html/struct_prod-members.html delete mode 100644 docs/build/html/struct_prod.html delete mode 100644 docs/build/html/struct_remainder-members.html delete mode 100644 docs/build/html/struct_remainder.html delete mode 100644 docs/build/html/struct_right_shift-members.html delete mode 100644 docs/build/html/struct_right_shift.html delete mode 100644 docs/build/html/struct_round-members.html delete mode 100644 docs/build/html/struct_round.html delete mode 100644 docs/build/html/struct_rsqrt-members.html delete mode 100644 docs/build/html/struct_rsqrt.html delete mode 100644 docs/build/html/struct_select-members.html delete mode 100644 docs/build/html/struct_select.html delete mode 100644 docs/build/html/struct_sigmoid-members.html delete mode 100644 docs/build/html/struct_sigmoid.html delete mode 100644 docs/build/html/struct_sign-members.html delete mode 100644 docs/build/html/struct_sign.html delete mode 100644 docs/build/html/struct_sin-members.html delete mode 100644 docs/build/html/struct_sin.html delete mode 100644 docs/build/html/struct_sinh-members.html delete mode 100644 docs/build/html/struct_sinh.html delete mode 100644 docs/build/html/struct_sqrt-members.html delete mode 100644 docs/build/html/struct_sqrt.html delete mode 100644 docs/build/html/struct_square-members.html delete mode 100644 docs/build/html/struct_square.html delete mode 100644 docs/build/html/struct_subtract-members.html delete mode 100644 docs/build/html/struct_subtract.html delete mode 100644 docs/build/html/struct_sum-members.html delete mode 100644 docs/build/html/struct_sum.html delete mode 100644 docs/build/html/struct_tan-members.html delete mode 100644 docs/build/html/struct_tan.html delete mode 100644 docs/build/html/struct_tanh-members.html delete mode 100644 docs/build/html/struct_tanh.html delete mode 100644 docs/build/html/structcomplex64__t-members.html delete mode 100644 docs/build/html/structcomplex64__t.html delete mode 100644 docs/build/html/structmetal_1_1__numeric__limits__impl_3_01bfloat16__t_01_4-members.html delete mode 100644 docs/build/html/structmetal_1_1__numeric__limits__impl_3_01bfloat16__t_01_4.html delete mode 100644 docs/build/html/structmetal_1_1__numeric__limits__impl_3_01bfloat16__t_01_4.png delete mode 100644 docs/build/html/structmlx_1_1core_1_1___m_l_x___b_float16-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1___m_l_x___b_float16.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1___m_l_x___float16-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1___m_l_x___float16.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_device-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_device.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_dtype-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_dtype.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_node_namer-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_node_namer.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_print_formatter-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_print_formatter.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_reduction_plan-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_reduction_plan.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_stream-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_stream.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_stream_context-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_stream_context.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_type_to_dtype-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1_type_to_dtype.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1array_1_1_array_iterator-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1array_1_1_array_iterator.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1array_1_1_data-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1array_1_1_data.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1array_1_1_flags-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1array_1_1_flags.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1complex128__t-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1complex128__t.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1complex128__t.png delete mode 100644 docs/build/html/structmlx_1_1core_1_1complex64__t-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1complex64__t.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1complex64__t.png delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_abs-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_abs.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_add-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_add.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_cos-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_cos.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_cosh-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_cosh.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_sin-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_sin.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_sinh-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_sinh.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_tan-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_tan.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_tan2-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_tan2.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_tanh-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_arc_tanh.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_bitwise_and-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_bitwise_and.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_bitwise_or-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_bitwise_or.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_bitwise_xor-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_bitwise_xor.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_ceil-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_ceil.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_conjugate-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_conjugate.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_cos-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_cos.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_cosh-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_cosh.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_divide-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_divide.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_equal-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_equal.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_erf-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_erf.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_erf_inv-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_erf_inv.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_exp-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_exp.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_expm1-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_expm1.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_floor-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_floor.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_greater-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_greater.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_greater_equal-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_greater_equal.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_in_tracing-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_in_tracing.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_left_shift-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_left_shift.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_less-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_less.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_less_equal-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_less_equal.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_log-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_log.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_log10-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_log10.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_log1p-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_log1p.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_log2-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_log2.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_log_add_exp-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_log_add_exp.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_logical_and-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_logical_and.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_logical_not-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_logical_not.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_logical_or-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_logical_or.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_maximum-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_maximum.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_minimum-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_minimum.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_multiply-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_multiply.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_na_n_equal-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_na_n_equal.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_negative-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_negative.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_not_equal-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_not_equal.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_power-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_power.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_remainder-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_remainder.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_right_shift-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_right_shift.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_round-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_round.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_rsqrt-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_rsqrt.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_select-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_select.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_sigmoid-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_sigmoid.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_sign-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_sign.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_sin-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_sin.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_sinh-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_sinh.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_sqrt-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_sqrt.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_square-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_square.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_subtract-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_subtract.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_tan-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_tan.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_tanh-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1detail_1_1_tanh.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1metal_1_1_command_encoder-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1metal_1_1_command_encoder.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1metal_1_1_command_encoder_1_1_concurrent_context-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1metal_1_1_command_encoder_1_1_concurrent_context.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1scheduler_1_1_stream_thread-members.html delete mode 100644 docs/build/html/structmlx_1_1core_1_1scheduler_1_1_stream_thread.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_accum_helper-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_accum_helper.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_block_loader-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_block_loader.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_block_loader_1_1_read_vector-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_block_loader_1_1_read_vector.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_block_m_m_a-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_block_m_m_a.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_block_swizzle-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_block_swizzle.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_channel_helper-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_channel_helper.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_channel_helper_3_011_01_4-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_channel_helper_3_011_01_4.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_channel_helper_3_012_01_4-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_channel_helper_3_012_01_4.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_channel_helper_3_013_01_4-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_channel_helper_3_013_01_4.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_channel_helper_3_014_01_4-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_channel_helper_3_014_01_4.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_general_base_info-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_general_base_info.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_general_jump_params-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_general_jump_params.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_input_block_loader_general-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_input_block_loader_general.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_input_block_loader_large_filter-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_input_block_loader_large_filter.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_input_block_loader_small_channels-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_input_block_loader_small_channels.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_input_block_loader_small_filter-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_input_block_loader_small_filter.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_weight_block_loader-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_weight_block_loader.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_weight_block_loader_general-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_weight_block_loader_general.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_weight_block_loader_small_channels-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_conv2_d_weight_block_loader_small_channels.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_g_e_m_m_add_m_m_params-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_g_e_m_m_add_m_m_params.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_g_e_m_m_kernel-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_g_e_m_m_kernel.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_g_e_m_m_params-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_g_e_m_m_params.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_g_e_m_m_spilt_k_params-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_g_e_m_m_spilt_k_params.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_implicit_gemm_conv2_d_params-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_implicit_gemm_conv2_d_params.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_loop_alignment.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_transform_add-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_transform_add.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_transform_axpby-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_transform_axpby.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_transform_none-members.html delete mode 100644 docs/build/html/structmlx_1_1steel_1_1_transform_none.html delete mode 100644 docs/build/html/structmlx__atomic-members.html delete mode 100644 docs/build/html/structmlx__atomic.html delete mode 100644 docs/build/html/structmlx__atomic_3_01_t_00_01enable__if__t_3_01is__metal__atomic_3_01_t_01_4_01_4_01_4-members.html delete mode 100644 docs/build/html/structmlx__atomic_3_01_t_00_01enable__if__t_3_01is__metal__atomic_3_01_t_01_4_01_4_01_4.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1_exec_c2_c-members.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1_exec_c2_c.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1_exec_dcst-members.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1_exec_dcst.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1_exec_hartley-members.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1_exec_hartley.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1_exec_r2_r-members.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1_exec_r2_r.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1_v_l_e_n-members.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1_v_l_e_n.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1_v_t_y_p_e.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1add__vec-members.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1add__vec.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1add__vec_3_01cmplx_3_01_t_01_4_01_4-members.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1add__vec_3_01cmplx_3_01_t_01_4_01_4.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1cmplx-members.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1cmplx.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1threading_1_1aligned__allocator-members.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1threading_1_1aligned__allocator.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1util-members.html delete mode 100644 docs/build/html/structpocketfft_1_1detail_1_1util.html delete mode 100644 docs/build/html/sync_off.png delete mode 100644 docs/build/html/sync_on.png delete mode 100644 docs/build/html/tab_a.png delete mode 100644 docs/build/html/tab_ad.png delete mode 100644 docs/build/html/tab_b.png delete mode 100644 docs/build/html/tab_bd.png delete mode 100644 docs/build/html/tab_h.png delete mode 100644 docs/build/html/tab_hd.png delete mode 100644 docs/build/html/tab_s.png delete mode 100644 docs/build/html/tab_sd.png delete mode 100644 docs/build/html/tabs.css delete mode 100644 docs/build/html/threefry_8h.html delete mode 100644 docs/build/html/threefry_8h_source.html delete mode 100644 docs/build/html/topics.html delete mode 100644 docs/build/html/transforms_8h.html delete mode 100644 docs/build/html/transforms_8h_source.html delete mode 100644 docs/build/html/transforms__impl_8h.html delete mode 100644 docs/build/html/transforms__impl_8h_source.html delete mode 100644 docs/build/html/types_2bf16_8h.html delete mode 100644 docs/build/html/types_2bf16_8h_source.html delete mode 100644 docs/build/html/types_2complex_8h.html delete mode 100644 docs/build/html/types_2complex_8h_source.html delete mode 100644 docs/build/html/unionbool4__or__uint-members.html delete mode 100644 docs/build/html/unionbool4__or__uint.html delete mode 100644 docs/build/html/unionmlx_1_1core_1_1detail_1_1_int_or_float-members.html delete mode 100644 docs/build/html/unionmlx_1_1core_1_1detail_1_1_int_or_float.html delete mode 100644 docs/build/html/utils_8h.html delete mode 100644 docs/build/html/utils_8h_source.html diff --git a/docs/build/html/.buildinfo b/docs/build/html/.buildinfo index e0cff859d..8f162be1e 100644 --- a/docs/build/html/.buildinfo +++ b/docs/build/html/.buildinfo @@ -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: c0e0bb3fe4816a1bf9a98909252329c4 +config: 32ccb60ed1f11b1a97dddf5c324c5115 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/build/html/_sources/install.rst b/docs/build/html/_sources/install.rst index 693385e2c..bdad740ea 100644 --- a/docs/build/html/_sources/install.rst +++ b/docs/build/html/_sources/install.rst @@ -163,6 +163,8 @@ should point to the path to the built metal library. - ON * - MLX_BUILD_GGUF - ON + * - MLX_METAL_JIT + - OFF .. note:: @@ -196,9 +198,18 @@ GGUF, you can do: cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel \ -DBUILD_SHARED_LIBS=ON \ - -DMLX_BUILD_CPU=ON \ + -DMLX_BUILD_CPU=OFF \ -DMLX_BUILD_SAFETENSORS=OFF \ - -DMLX_BUILD_GGUF=OFF + -DMLX_BUILD_GGUF=OFF \ + -DMLX_METAL_JIT=ON + +THE `MLX_METAL_JIT` flag minimizes the size of the MLX Metal library which +contains pre-built GPU kernels. This substantially reduces the size of the +Metal library by run-time compiling kernels the first time they are used in MLX +on a given machine. Note run-time compilation incurs a cold-start cost which can +be anwywhere from a few hundred millisecond to a few seconds depending on the +application. Once a kernel is compiled, it will be cached by the system. The +Metal kernel cache persists accross reboots. Troubleshooting ^^^^^^^^^^^^^^^ diff --git a/docs/build/html/_sources/python/_autosummary/mlx.core.gather_mm.rst b/docs/build/html/_sources/python/_autosummary/mlx.core.gather_mm.rst new file mode 100644 index 000000000..de38ebc0f --- /dev/null +++ b/docs/build/html/_sources/python/_autosummary/mlx.core.gather_mm.rst @@ -0,0 +1,6 @@ +mlx.core.gather\_mm +=================== + +.. currentmodule:: mlx.core + +.. autofunction:: gather_mm \ No newline at end of file diff --git a/docs/build/html/_sources/python/_autosummary/mlx.core.gather_qmm.rst b/docs/build/html/_sources/python/_autosummary/mlx.core.gather_qmm.rst new file mode 100644 index 000000000..6141db7f6 --- /dev/null +++ b/docs/build/html/_sources/python/_autosummary/mlx.core.gather_qmm.rst @@ -0,0 +1,6 @@ +mlx.core.gather\_qmm +==================== + +.. currentmodule:: mlx.core + +.. autofunction:: gather_qmm \ No newline at end of file diff --git a/docs/build/html/_sources/python/_autosummary/mlx.core.trace.rst b/docs/build/html/_sources/python/_autosummary/mlx.core.trace.rst new file mode 100644 index 000000000..7ba68a761 --- /dev/null +++ b/docs/build/html/_sources/python/_autosummary/mlx.core.trace.rst @@ -0,0 +1,6 @@ +mlx.core.trace +============== + +.. currentmodule:: mlx.core + +.. autofunction:: trace \ No newline at end of file diff --git a/docs/build/html/_sources/python/ops.rst b/docs/build/html/_sources/python/ops.rst index c88885101..745d12d50 100644 --- a/docs/build/html/_sources/python/ops.rst +++ b/docs/build/html/_sources/python/ops.rst @@ -35,7 +35,6 @@ Operations bitwise_or bitwise_xor block_masked_mm - block_sparse_mm broadcast_to ceil clip @@ -69,6 +68,8 @@ Operations floor floor_divide full + gather_mm + gather_qmm greater greater_equal identity @@ -149,6 +150,7 @@ Operations tensordot tile topk + trace transpose tri tril diff --git a/docs/build/html/_static/documentation_options.js b/docs/build/html/_static/documentation_options.js index 4b6f897c5..4d757c4b0 100644 --- a/docs/build/html/_static/documentation_options.js +++ b/docs/build/html/_static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: '0.13.1', + VERSION: '0.14.0', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/build/html/allocator_8h.html b/docs/build/html/allocator_8h.html deleted file mode 100644 index 8e3b1e763..000000000 --- a/docs/build/html/allocator_8h.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - -MLX: mlx/allocator.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
allocator.h File Reference
-
-
-
#include <cstdlib>
-
-

Go to the source code of this file.

- - - - - - - - -

-Classes

class  mlx::core::allocator::Buffer
 
class  mlx::core::allocator::Allocator
 
class  mlx::core::allocator::CommonAllocator
 
- - - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
namespace  mlx::core::allocator
 
- - - - - - - - - -

-Functions

Buffer mlx::core::allocator::malloc (size_t size)
 
void mlx::core::allocator::free (Buffer buffer)
 
Buffer mlx::core::allocator::malloc_or_wait (size_t size)
 
Allocatormlx::core::allocator::allocator ()
 
-
- - - - diff --git a/docs/build/html/allocator_8h_source.html b/docs/build/html/allocator_8h_source.html deleted file mode 100644 index 917df829b..000000000 --- a/docs/build/html/allocator_8h_source.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - -MLX: mlx/allocator.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
allocator.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <cstdlib>
-
6
-
- -
8
-
9// Simple wrapper around buffer pointers
-
10// WARNING: Only Buffer objects constructed from and those that wrap
-
11// raw pointers from mlx::allocator are supported.
-
-
12class Buffer {
-
13 private:
-
14 void* ptr_;
-
15
-
16 public:
-
17 Buffer(void* ptr) : ptr_(ptr) {};
-
18
-
19 // Get the raw data pointer from the buffer
-
20 void* raw_ptr();
-
21
-
22 // Get the buffer pointer from the buffer
-
-
23 const void* ptr() const {
-
24 return ptr_;
-
25 };
-
-
-
26 void* ptr() {
-
27 return ptr_;
-
28 };
-
-
29};
-
-
30
-
31Buffer malloc(size_t size);
-
32
-
33void free(Buffer buffer);
-
34
-
35// Wait for running tasks to finish and free up memory
-
36// if allocation fails
- -
38
-
-
39class Allocator {
-
41 public:
-
42 virtual Buffer malloc(size_t size, bool allow_swap = false) = 0;
-
43 virtual void free(Buffer buffer) = 0;
-
44
-
45 Allocator() = default;
-
46 Allocator(const Allocator& other) = delete;
-
47 Allocator(Allocator&& other) = delete;
-
48 Allocator& operator=(const Allocator& other) = delete;
-
49 Allocator& operator=(Allocator&& other) = delete;
-
50 virtual ~Allocator() = default;
-
51};
-
-
52
- -
54
-
-
55class CommonAllocator : public Allocator {
-
57 public:
-
58 virtual Buffer malloc(size_t size, bool allow_swap = false) override;
-
59 virtual void free(Buffer buffer) override;
-
60
-
61 private:
-
62 CommonAllocator() = default;
- -
64};
-
-
65
-
66} // namespace mlx::core::allocator
-
-
Definition allocator.h:39
-
Allocator & operator=(const Allocator &other)=delete
-
Allocator & operator=(Allocator &&other)=delete
- -
Allocator(Allocator &&other)=delete
- -
virtual Buffer malloc(size_t size, bool allow_swap=false)=0
Abstract base class for a memory allocator.
-
Allocator(const Allocator &other)=delete
-
virtual void free(Buffer buffer)=0
-
Definition allocator.h:12
- -
const void * ptr() const
Definition allocator.h:23
-
Buffer(void *ptr)
Definition allocator.h:17
-
void * ptr()
Definition allocator.h:26
-
Definition allocator.h:55
-
virtual Buffer malloc(size_t size, bool allow_swap=false) override
A general CPU allocator.
-
virtual void free(Buffer buffer) override
- -
Definition allocator.h:7
-
Buffer malloc(size_t size)
-
void free(Buffer buffer)
-
Buffer malloc_or_wait(size_t size)
-
Allocator & allocator()
-
- - - - diff --git a/docs/build/html/annotated.html b/docs/build/html/annotated.html deleted file mode 100644 index d2c356c14..000000000 --- a/docs/build/html/annotated.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - -MLX: Class List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Class List
-
-
-
Here are the classes, structs, unions and interfaces with brief descriptions:
-
[detail level 12345]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Nmetal
 Nmlx
 NMPS
 Npocketfft
 C_MLX_BFloat16
 CAbs
 CAdd
 CAnd
 CArcCos
 CArcCosh
 CArcSin
 CArcSinh
 CArcTan
 CArcTan2
 CArcTanh
 CBitwiseAnd
 CBitwiseOr
 CBitwiseXor
 Cbool4_or_uint
 CCeil
 Ccomplex64_t
 CConjugate
 CCos
 CCosh
 CDivide
 CEqual
 CErf
 CErfInv
 CExp
 CExpm1
 CFloor
 CGreater
 CGreaterEqual
 CIndices
 CLeftShift
 CLess
 CLessEqual
 CLimits
 CLimits< bfloat16_t >
 CLimits< bool >
 CLimits< float >
 CLimits< half >
 CLimits< int16_t >
 CLimits< int32_t >
 CLimits< int64_t >
 CLimits< int8_t >
 CLimits< uint16_t >
 CLimits< uint32_t >
 CLimits< uint64_t >
 CLimits< uint8_t >
 CLog
 CLog10
 CLog1p
 CLog2
 CLogAddExp
 CLogicalAnd
 CLogicalNot
 CLogicalOr
 CMax
 CMaximum
 CMin
 CMinimum
 Cmlx_atomic
 Cmlx_atomic< T, enable_if_t< is_metal_atomic< T > > >
 CMLXConvParams
 CMLXScaledDotProductAttentionParams
 CMultiply
 CNaNEqual
 CNegative
 CNone
 CNotEqual
 COr
 CPower
 CProd
 CRemainder
 CRightShift
 CRound
 CRsqrt
 CSelect
 CSigmoid
 CSign
 CSin
 CSinh
 CSqrt
 CSquare
 CSubtract
 CSum
 CTan
 CTanh
-
-
- - - - diff --git a/docs/build/html/arange_8h.html b/docs/build/html/arange_8h.html deleted file mode 100644 index 804fdf88e..000000000 --- a/docs/build/html/arange_8h.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/arange.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
arange.h File Reference
-
-
-
#include "mlx/allocator.h"
-#include "mlx/array.h"
-
-

Go to the source code of this file.

- - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
- - - -

-Functions

void mlx::core::arange (const std::vector< array > &inputs, array &out, double start, double step)
 
-
- - - - diff --git a/docs/build/html/arange_8h_source.html b/docs/build/html/arange_8h_source.html deleted file mode 100644 index 2f042106a..000000000 --- a/docs/build/html/arange_8h_source.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/arange.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
arange.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include "mlx/allocator.h"
-
6#include "mlx/array.h"
-
7
-
8namespace mlx::core {
-
9
-
10namespace {
-
11
-
12template <typename T>
-
13void arange(T start, T next, array& out, size_t size) {
-
14 auto ptr = out.data<T>();
-
15 auto step_size = next - start;
-
16 for (int i = 0; i < size; ++i) {
-
17 ptr[i] = start;
-
18 start += step_size;
-
19 }
-
20}
-
21
-
22} // namespace
-
23
-
-
24void arange(
-
25 const std::vector<array>& inputs,
-
26 array& out,
-
27 double start,
-
28 double step) {
-
29 assert(inputs.size() == 0);
- -
31 switch (out.dtype()) {
-
32 case bool_:
-
33 throw std::runtime_error("Bool type unsupported for arange.");
-
34 break;
-
35 case uint8:
-
36 arange<uint8_t>(start, start + step, out, out.size());
-
37 break;
-
38 case uint16:
-
39 arange<uint16_t>(start, start + step, out, out.size());
-
40 break;
-
41 case uint32:
-
42 arange<uint32_t>(start, start + step, out, out.size());
-
43 break;
-
44 case uint64:
-
45 arange<uint64_t>(start, start + step, out, out.size());
-
46 break;
-
47 case int8:
-
48 arange<int8_t>(start, start + step, out, out.size());
-
49 break;
-
50 case int16:
-
51 arange<int16_t>(start, start + step, out, out.size());
-
52 break;
-
53 case int32:
-
54 arange<int32_t>(start, start + step, out, out.size());
-
55 break;
-
56 case int64:
-
57 arange<int64_t>(start, start + step, out, out.size());
-
58 break;
-
59 case float16:
-
60 arange<float16_t>(start, start + step, out, out.size());
-
61 break;
-
62 case float32:
-
63 arange<float>(start, start + step, out, out.size());
-
64 break;
-
65 case bfloat16:
-
66 arange<bfloat16_t>(start, start + step, out, out.size());
-
67 break;
-
68 case complex64:
-
69 arange<complex64_t>(start, start + step, out, out.size());
-
70 break;
-
71 }
-
72}
-
-
73
-
74} // namespace mlx::core
- - -
BufferHolder * next
Definition allocator.h:37
-
Definition array.h:20
-
size_t nbytes() const
The number of bytes in the array.
Definition array.h:89
-
size_t size() const
The number of elements in the array.
Definition array.h:84
-
void set_data(allocator::Buffer buffer, deleter_t d=allocator::free)
-
Dtype dtype() const
Get the arrays data type.
Definition array.h:127
-
Buffer malloc_or_wait(size_t size)
-
Definition allocator.h:7
-
constexpr Dtype bool_
Definition dtype.h:60
-
constexpr Dtype uint64
Definition dtype.h:65
-
constexpr Dtype uint16
Definition dtype.h:63
-
void arange(const std::vector< array > &inputs, array &out, double start, double step)
Definition arange.h:24
-
constexpr Dtype bfloat16
Definition dtype.h:74
-
constexpr Dtype int32
Definition dtype.h:69
-
constexpr Dtype float32
Definition dtype.h:73
-
constexpr Dtype int16
Definition dtype.h:68
-
constexpr Dtype int8
Definition dtype.h:67
-
constexpr Dtype int64
Definition dtype.h:70
-
constexpr Dtype uint8
Definition dtype.h:62
-
constexpr Dtype float16
Definition dtype.h:72
-
constexpr Dtype uint32
Definition dtype.h:64
-
constexpr Dtype complex64
Definition dtype.h:75
-
- - - - diff --git a/docs/build/html/array_8h.html b/docs/build/html/array_8h.html deleted file mode 100644 index bdfcf22d8..000000000 --- a/docs/build/html/array_8h.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - -MLX: mlx/array.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
array.h File Reference
-
-
-
#include <algorithm>
-#include <cstdint>
-#include <functional>
-#include <memory>
-#include <vector>
-#include "mlx/allocator.h"
-#include "mlx/dtype.h"
-#include "mlx/event.h"
-
-

Go to the source code of this file.

- - - - - - - - - - -

-Classes

class  mlx::core::array
 
struct  mlx::core::array::ArrayIterator
 
struct  mlx::core::array::Data
 
struct  mlx::core::array::Flags
 
- - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
- - - - - - -

-Typedefs

using mlx::core::deleter_t = std::function<void(allocator::Buffer)>
 
template<typename... T>
using mlx::core::enable_for_arrays_t = typename std::enable_if_t<is_arrays_v<T...>>
 
- - - - - - - -

-Variables

template<typename T >
constexpr bool mlx::core::is_array_v
 
template<typename... T>
constexpr bool mlx::core::is_arrays_v = (is_array_v<T> && ...)
 
-
- - - - diff --git a/docs/build/html/array_8h_source.html b/docs/build/html/array_8h_source.html deleted file mode 100644 index 4b15bc560..000000000 --- a/docs/build/html/array_8h_source.html +++ /dev/null @@ -1,842 +0,0 @@ - - - - - - - -MLX: mlx/array.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
array.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2#pragma once
-
3
-
4#include <algorithm>
-
5#include <cstdint>
-
6#include <functional>
-
7#include <memory>
-
8#include <vector>
-
9
-
10#include "mlx/allocator.h"
-
11#include "mlx/dtype.h"
-
12#include "mlx/event.h"
-
13
-
14namespace mlx::core {
-
15
-
16// Forward declaration
-
17class Primitive;
-
18using deleter_t = std::function<void(allocator::Buffer)>;
-
19
-
-
20class array {
-
21 /* An array is really a node in a graph. It contains a shared ArrayDesc
-
22 * object */
-
23
-
24 public:
-
26 template <typename T>
-
27 explicit array(T val, Dtype dtype = TypeToDtype<T>());
-
28
-
29 /* Special case since std::complex can't be implicitly converted to other
-
30 * types. */
-
31 explicit array(const std::complex<float>& val, Dtype dtype = complex64);
-
32
-
33 template <typename It>
-
34 array(
-
35 It data,
-
36 std::vector<int> shape,
-
37 Dtype dtype =
-
38 TypeToDtype<typename std::iterator_traits<It>::value_type>());
-
39
-
40 template <typename T>
-
41 array(std::initializer_list<T> data, Dtype dtype = TypeToDtype<T>());
-
42
-
43 /* Special case so empty lists default to float32. */
-
44 array(std::initializer_list<float> data);
-
45
-
46 /* Special case so array({}, type) is an empty array. */
-
47 array(std::initializer_list<int> data, Dtype dtype);
-
48
-
49 template <typename T>
-
50 array(
-
51 std::initializer_list<T> data,
-
52 std::vector<int> shape,
- -
54
-
55 /* Build an array from a buffer */
- - -
58 std::vector<int> shape,
- -
60 deleter_t deleter = allocator::free);
-
61
-
63 array& operator=(const array& other) && = delete;
-
64 array& operator=(array&& other) && = delete;
-
65
-
67 array& operator=(array&& other) & = default;
-
68 array(const array& other) = default;
-
69 array(array&& other) = default;
-
70
-
-
71 array& operator=(const array& other) & {
-
72 if (this->id() != other.id()) {
-
73 this->array_desc_ = other.array_desc_;
-
74 }
-
75 return *this;
-
76 };
-
-
77
-
-
79 size_t itemsize() const {
-
80 return size_of(dtype());
-
81 };
-
-
82
-
-
84 size_t size() const {
-
85 return array_desc_->size;
-
86 };
-
-
87
-
-
89 size_t nbytes() const {
-
90 return size() * itemsize();
-
91 };
-
-
92
-
-
94 size_t ndim() const {
-
95 return array_desc_->shape.size();
-
96 };
-
-
97
-
-
99 const std::vector<int>& shape() const {
-
100 return array_desc_->shape;
-
101 };
-
-
102
-
-
108 int shape(int dim) const {
-
109 return shape().at(dim < 0 ? dim + ndim() : dim);
-
110 };
-
-
111
-
-
113 const std::vector<size_t>& strides() const {
-
114 return array_desc_->strides;
-
115 };
-
-
116
-
-
122 size_t strides(int dim) const {
-
123 return strides().at(dim < 0 ? dim + ndim() : dim);
-
124 };
-
-
125
-
-
127 Dtype dtype() const {
-
128 return array_desc_->dtype;
-
129 };
-
-
130
-
132 void eval();
-
133
-
135 template <typename T>
-
136 T item();
-
137
-
138 template <typename T>
-
139 T item() const;
-
140
-
- -
142 using iterator_category = std::random_access_iterator_tag;
-
143 using difference_type = size_t;
-
144 using value_type = const array;
- -
146
-
147 explicit ArrayIterator(const array& arr, int idx = 0);
-
148
- -
150
-
- -
152 idx += diff;
-
153 return *this;
-
154 }
-
-
155
-
- -
157 idx++;
-
158 return *this;
-
159 }
-
-
160
-
-
161 friend bool operator==(const ArrayIterator& a, const ArrayIterator& b) {
-
162 return a.arr.id() == b.arr.id() && a.idx == b.idx;
-
163 };
-
-
-
164 friend bool operator!=(const ArrayIterator& a, const ArrayIterator& b) {
-
165 return !(a == b);
-
166 };
-
-
167
-
168 private:
-
169 const array& arr;
-
170 int idx;
-
171 };
-
-
172
-
- -
174 return ArrayIterator(*this);
-
175 }
-
-
- -
177 return ArrayIterator(*this, shape(0));
-
178 }
-
-
179
- -
187 std::vector<int> shape,
-
188 Dtype dtype,
-
189 std::shared_ptr<Primitive> primitive,
-
190 std::vector<array> inputs);
-
191
-
192 static std::vector<array> make_arrays(
-
193 std::vector<std::vector<int>> shapes,
-
194 const std::vector<Dtype>& dtypes,
-
195 const std::shared_ptr<Primitive>& primitive,
-
196 const std::vector<array>& inputs);
-
197
-
-
199 std::uintptr_t id() const {
-
200 return reinterpret_cast<std::uintptr_t>(array_desc_.get());
-
201 }
-
-
202
-
-
204 std::uintptr_t primitive_id() const {
-
205 return reinterpret_cast<std::uintptr_t>(array_desc_->primitive.get());
-
206 }
-
-
207
-
-
208 struct Data {
- - - -
213 // Not copyable
-
214 Data(const Data& d) = delete;
-
215 Data& operator=(const Data& d) = delete;
-
- -
217 d(buffer);
-
218 }
-
-
219 };
-
-
220
-
-
221 struct Flags {
-
222 // True if there are no gaps in the underlying data. Each item
-
223 // in the underlying data buffer belongs to at least one index.
-
224 bool contiguous : 1;
-
225
- - -
228 };
-
-
229
-
- -
232 return *(array_desc_->primitive);
-
233 };
-
-
234
-
-
236 std::shared_ptr<Primitive>& primitive_ptr() const {
-
237 return array_desc_->primitive;
-
238 };
-
-
239
-
-
241 bool has_primitive() const {
-
242 return array_desc_->primitive != nullptr;
-
243 };
-
-
244
-
-
246 const std::vector<array>& inputs() const {
-
247 return array_desc_->inputs;
-
248 };
-
-
249
-
-
250 std::vector<array>& inputs() {
-
251 return array_desc_->inputs;
-
252 }
-
-
253
-
-
255 bool is_donatable() const {
-
256 return array_desc_.use_count() == 1 && (array_desc_->data.use_count() == 1);
-
257 }
-
-
258
-
-
260 const std::vector<array>& siblings() const {
-
261 return array_desc_->siblings;
-
262 };
-
-
263
-
-
265 std::vector<array>& siblings() {
-
266 return array_desc_->siblings;
-
267 };
-
-
268
-
-
269 void set_siblings(std::vector<array> siblings, uint16_t position) {
-
270 array_desc_->siblings = std::move(siblings);
-
271 array_desc_->position = position;
-
272 }
-
-
273
-
-
276 std::vector<array> outputs() const {
-
277 auto idx = array_desc_->position;
-
278 std::vector<array> outputs;
-
279 outputs.reserve(siblings().size() + 1);
-
280 outputs.insert(outputs.end(), siblings().begin(), siblings().begin() + idx);
-
281 outputs.push_back(*this);
-
282 outputs.insert(outputs.end(), siblings().begin() + idx, siblings().end());
-
283 return outputs;
-
284 };
-
-
285
-
287 void detach();
-
288
-
-
290 const Flags& flags() const {
-
291 return array_desc_->flags;
-
292 };
-
-
293
-
-
295 size_t data_size() const {
-
296 return array_desc_->data_size;
-
297 };
-
-
298
-
- -
300 return array_desc_->data->buffer;
-
301 };
-
-
-
302 const allocator::Buffer& buffer() const {
-
303 return array_desc_->data->buffer;
-
304 };
-
-
305
-
306 // Return a copy of the shared pointer
-
307 // to the array::Data struct
-
-
308 std::shared_ptr<Data> data_shared_ptr() const {
-
309 return array_desc_->data;
-
310 }
-
-
311 // Return a raw pointer to the arrays data
-
312 template <typename T>
-
-
313 T* data() {
-
314 return static_cast<T*>(array_desc_->data_ptr);
-
315 };
-
-
316
-
317 template <typename T>
-
-
318 const T* data() const {
-
319 return static_cast<T*>(array_desc_->data_ptr);
-
320 };
-
-
321
- -
323
-
-
324 bool is_available() const {
-
325 return status() == Status::available;
-
326 }
-
-
-
327 const Status status() const {
-
328 return array_desc_->status;
-
329 }
-
-
330
-
-
331 void set_status(Status s) const {
-
332 array_desc_->status = s;
-
333 }
-
-
334
-
335 // Get the array's shared event
-
-
336 Event& event() const {
-
337 return array_desc_->event;
-
338 }
-
-
339
-
340 // Attach an event to a not yet evaluated array
-
-
341 void attach_event(Event e) const {
-
342 array_desc_->event = std::move(e);
-
343 }
-
-
344
-
345 // Mark the array as a tracer array (true) or not.
-
- -
347 array_desc_->is_tracer = is_tracer;
-
348 }
-
-
349 // Check if the array is a tracer array
-
350 bool is_tracer() const;
-
351
- -
353
- - -
356 size_t data_size,
-
357 std::vector<size_t> strides,
-
358 Flags flags,
- -
360
- -
362 const array& other,
-
363 const std::vector<size_t>& strides,
-
364 Flags flags,
-
365 size_t data_size,
-
366 size_t offset = 0);
-
367
-
368 void copy_shared_buffer(const array& other);
-
369
- -
371 array other,
-
372 const std::vector<size_t>& strides,
-
373 Flags flags,
-
374 size_t data_size,
-
375 size_t offset = 0);
-
376
- -
378
-
-
379 void overwrite_descriptor(const array& other) {
-
380 array_desc_ = other.array_desc_;
-
381 }
-
-
382
- -
384
-
385 private:
-
386 // Initialize the arrays data
-
387 template <typename It>
-
388 void init(const It src);
-
389
-
390 struct ArrayDesc {
-
391 std::vector<int> shape;
-
392 std::vector<size_t> strides;
-
393 size_t size;
-
394 Dtype dtype;
-
395 std::shared_ptr<Primitive> primitive;
-
396
-
397 Status status;
-
398
-
399 // An event on the array used for synchronization
-
400 Event event;
-
401
-
402 // Indicates an array is being used in a graph transform
-
403 // and should not be detached from the graph
-
404 bool is_tracer{false};
-
405
-
406 // This is a shared pointer so that *different* arrays
-
407 // can share the underlying data buffer.
-
408 std::shared_ptr<Data> data;
-
409
-
410 // Properly offset data pointer
-
411 void* data_ptr{nullptr};
-
412
-
413 // The size in elements of the data buffer the array accesses
-
414 // This can be different than the actual size of the array if it
-
415 // has been broadcast or irregularly strided.
-
416 size_t data_size;
-
417
-
418 // Contains useful meta data about the array
-
419 Flags flags;
-
420
-
421 std::vector<array> inputs;
-
422 // An array to keep track of the siblings from a multi-output
-
423 // primitive.
-
424 std::vector<array> siblings;
-
425 // The arrays position in the output list
-
426 uint32_t position{0};
-
427
-
428 explicit ArrayDesc(std::vector<int> shape, Dtype dtype);
-
429
-
430 explicit ArrayDesc(
-
431 std::vector<int> shape,
-
432 Dtype dtype,
-
433 std::shared_ptr<Primitive> primitive,
-
434 std::vector<array> inputs);
-
435
-
436 ~ArrayDesc();
-
437
-
438 private:
-
439 // Initialize size, strides, and other metadata
-
440 void init();
-
441 };
-
442
-
443 // The ArrayDesc contains the details of the materialized array including the
-
444 // shape, strides, the data type. It also includes
-
445 // the primitive which knows how to compute the array's data from its inputs
-
446 // and the list of array's inputs for the primitive.
-
447 std::shared_ptr<ArrayDesc> array_desc_;
-
448};
-
-
449
-
450template <typename T>
-
-
451array::array(T val, Dtype dtype /* = TypeToDtype<T>() */)
-
452 : array_desc_(std::make_shared<ArrayDesc>(std::vector<int>{}, dtype)) {
-
453 init(&val);
-
454}
-
-
455
-
456template <typename It>
-
- -
458 It data,
-
459 std::vector<int> shape,
-
460 Dtype dtype /* = TypeToDtype<typename std::iterator_traits<It>::value_type>() */) :
-
461 array_desc_(std::make_shared<ArrayDesc>(std::move(shape), dtype)) {
-
462 init(data);
-
463}
-
-
464
-
465template <typename T>
-
- -
467 std::initializer_list<T> data,
-
468 Dtype dtype /* = TypeToDtype<T>() */)
-
469 : array_desc_(std::make_shared<ArrayDesc>(
-
470 std::vector<int>{static_cast<int>(data.size())},
-
471 dtype)) {
-
472 init(data.begin());
-
473}
-
-
474
-
475template <typename T>
-
- -
477 std::initializer_list<T> data,
-
478 std::vector<int> shape,
-
479 Dtype dtype /* = TypeToDtype<T>() */)
-
480 : array_desc_(std::make_shared<ArrayDesc>(std::move(shape), dtype)) {
-
481 if (data.size() != size()) {
-
482 throw std::invalid_argument(
-
483 "Data size and provided shape mismatch in array construction.");
-
484 }
-
485 init(data.begin());
-
486}
-
-
487
-
488template <typename T>
-
- -
490 if (size() != 1) {
-
491 throw std::invalid_argument("item can only be called on arrays of size 1.");
-
492 }
-
493 eval();
-
494 return *data<T>();
-
495}
-
-
496
-
497template <typename T>
-
-
498T array::item() const {
-
499 if (size() != 1) {
-
500 throw std::invalid_argument("item can only be called on arrays of size 1.");
-
501 }
-
502 if (status() == Status::unscheduled) {
-
503 throw std::invalid_argument(
-
504 "item() const can only be called on evaled arrays");
-
505 }
-
506 const_cast<array*>(this)->eval();
-
507 return *data<T>();
-
508}
-
-
509
-
510template <typename It>
-
511void array::init(It src) {
- -
513 switch (dtype()) {
-
514 case bool_:
-
515 std::copy(src, src + size(), data<bool>());
-
516 break;
-
517 case uint8:
-
518 std::copy(src, src + size(), data<uint8_t>());
-
519 break;
-
520 case uint16:
-
521 std::copy(src, src + size(), data<uint16_t>());
-
522 break;
-
523 case uint32:
-
524 std::copy(src, src + size(), data<uint32_t>());
-
525 break;
-
526 case uint64:
-
527 std::copy(src, src + size(), data<uint64_t>());
-
528 break;
-
529 case int8:
-
530 std::copy(src, src + size(), data<int8_t>());
-
531 break;
-
532 case int16:
-
533 std::copy(src, src + size(), data<int16_t>());
-
534 break;
-
535 case int32:
-
536 std::copy(src, src + size(), data<int32_t>());
-
537 break;
-
538 case int64:
-
539 std::copy(src, src + size(), data<int64_t>());
-
540 break;
-
541 case float16:
-
542 std::copy(src, src + size(), data<float16_t>());
-
543 break;
-
544 case float32:
-
545 std::copy(src, src + size(), data<float>());
-
546 break;
-
547 case bfloat16:
-
548 std::copy(src, src + size(), data<bfloat16_t>());
-
549 break;
-
550 case complex64:
-
551 std::copy(src, src + size(), data<complex64_t>());
-
552 break;
-
553 }
-
554}
-
555
-
556/* Utilities for determining whether a template parameter is array. */
-
557template <typename T>
-
558inline constexpr bool is_array_v =
-
559 std::is_same_v<std::remove_cv_t<std::remove_reference_t<T>>, array>;
-
560
-
561template <typename... T>
-
562inline constexpr bool is_arrays_v = (is_array_v<T> && ...);
-
563
-
564template <typename... T>
-
565using enable_for_arrays_t = typename std::enable_if_t<is_arrays_v<T...>>;
-
566
-
567} // namespace mlx::core
- -
Definition event.h:11
-
Definition primitives.h:48
-
Definition allocator.h:12
-
Definition array.h:20
-
void attach_event(Event e) const
Definition array.h:341
-
const Flags & flags() const
Get the Flags bit-field.
Definition array.h:290
-
Event & event() const
Definition array.h:336
-
static std::vector< array > make_arrays(std::vector< std::vector< int > > shapes, const std::vector< Dtype > &dtypes, const std::shared_ptr< Primitive > &primitive, const std::vector< array > &inputs)
-
const std::vector< size_t > & strides() const
The strides of the array.
Definition array.h:113
-
Status
Definition array.h:322
-
@ available
Definition array.h:322
-
@ unscheduled
Definition array.h:322
-
@ scheduled
Definition array.h:322
-
void set_data(allocator::Buffer buffer, size_t data_size, std::vector< size_t > strides, Flags flags, deleter_t d=allocator::free)
-
void eval()
Evaluate the array.
-
void copy_shared_buffer(const array &other, const std::vector< size_t > &strides, Flags flags, size_t data_size, size_t offset=0)
-
const std::vector< array > & inputs() const
The array's inputs.
Definition array.h:246
-
array(const array &other)=default
-
std::vector< array > outputs() const
The outputs of the array's primitive (i.e.
Definition array.h:276
- -
size_t nbytes() const
The number of bytes in the array.
Definition array.h:89
-
void move_shared_buffer(array other)
-
array(std::initializer_list< float > data)
-
bool is_donatable() const
True indicates the arrays buffer is safe to reuse.
Definition array.h:255
-
const std::vector< int > & shape() const
The shape of the array as a vector of integers.
Definition array.h:99
-
std::shared_ptr< Primitive > & primitive_ptr() const
A shared pointer to the array's primitive.
Definition array.h:236
-
int shape(int dim) const
Get the size of the corresponding dimension.
Definition array.h:108
-
size_t ndim() const
The number of dimensions of the array.
Definition array.h:94
-
size_t size() const
The number of elements in the array.
Definition array.h:84
-
array(allocator::Buffer data, std::vector< int > shape, Dtype dtype, deleter_t deleter=allocator::free)
-
array & operator=(array &&other) &&=delete
-
array & operator=(const array &other) &
Definition array.h:71
-
ArrayIterator end() const
Definition array.h:176
-
array(std::initializer_list< int > data, Dtype dtype)
-
void set_data(allocator::Buffer buffer, deleter_t d=allocator::free)
-
const allocator::Buffer & buffer() const
Definition array.h:302
-
void set_status(Status s) const
Definition array.h:331
-
array(const std::complex< float > &val, Dtype dtype=complex64)
-
std::vector< array > & siblings()
The array's siblings.
Definition array.h:265
-
T * data()
Definition array.h:313
-
array(T val, Dtype dtype=TypeToDtype< T >())
Construct a scalar array with zero dimensions.
Definition array.h:451
-
ArrayIterator begin() const
Definition array.h:173
-
Primitive & primitive() const
The array's primitive.
Definition array.h:231
-
void detach()
Detach the array from the graph.
-
array & operator=(const array &other) &&=delete
Assignment to rvalue does not compile.
-
void set_siblings(std::vector< array > siblings, uint16_t position)
Definition array.h:269
-
T item()
Get the value from a scalar array.
Definition array.h:489
-
size_t strides(int dim) const
Get the stride of the corresponding dimension.
Definition array.h:122
-
void copy_shared_buffer(const array &other)
-
void overwrite_descriptor(const array &other)
Definition array.h:379
-
const T * data() const
Definition array.h:318
-
bool has_primitive() const
Check if the array has an attached primitive or is a leaf node.
Definition array.h:241
-
allocator::Buffer & buffer()
Definition array.h:299
-
array(array &&other)=default
-
std::shared_ptr< Data > data_shared_ptr() const
Definition array.h:308
-
void move_shared_buffer(array other, const std::vector< size_t > &strides, Flags flags, size_t data_size, size_t offset=0)
-
const std::vector< array > & siblings() const
The array's siblings.
Definition array.h:260
-
std::vector< array > & inputs()
Definition array.h:250
-
array & operator=(array &&other) &=default
Default copy and move constructors otherwise.
-
array(std::vector< int > shape, Dtype dtype, std::shared_ptr< Primitive > primitive, std::vector< array > inputs)
The following methods should be used with caution.
-
const Status status() const
Definition array.h:327
-
std::uintptr_t id() const
A unique identifier for an array.
Definition array.h:199
-
Dtype dtype() const
Get the arrays data type.
Definition array.h:127
-
bool is_available() const
Definition array.h:324
-
void set_tracer(bool is_tracer)
Definition array.h:346
-
size_t itemsize() const
The size of the array's datatype in bytes.
Definition array.h:79
-
std::uintptr_t primitive_id() const
A unique identifier for an arrays primitive.
Definition array.h:204
-
bool is_tracer() const
-
size_t data_size() const
The size (in elements) of the underlying buffer the array points to.
Definition array.h:295
- - -
array std(const array &a, bool keepdims, int ddof=0, StreamOrDevice s={})
Computes the standard deviation of the elements of an array.
-
Buffer malloc(size_t size)
-
void free(Buffer buffer)
-
Definition allocator.h:7
-
constexpr bool is_array_v
Definition array.h:558
-
constexpr Dtype bool_
Definition dtype.h:60
-
std::function< void(allocator::Buffer)> deleter_t
Definition array.h:18
-
constexpr Dtype uint64
Definition dtype.h:65
-
constexpr Dtype uint16
Definition dtype.h:63
-
constexpr Dtype bfloat16
Definition dtype.h:74
-
constexpr Dtype int32
Definition dtype.h:69
-
constexpr Dtype float32
Definition dtype.h:73
-
constexpr Dtype int16
Definition dtype.h:68
-
constexpr Dtype int8
Definition dtype.h:67
-
constexpr Dtype int64
Definition dtype.h:70
-
constexpr bool is_arrays_v
Definition array.h:562
-
constexpr Dtype uint8
Definition dtype.h:62
-
constexpr Dtype float16
Definition dtype.h:72
-
constexpr Dtype uint32
Definition dtype.h:64
-
uint8_t size_of(const Dtype &t)
Definition dtype.h:95
-
typename std::enable_if_t< is_arrays_v< T... > > enable_for_arrays_t
Definition array.h:565
-
constexpr Dtype complex64
Definition dtype.h:75
-
Definition dtype.h:15
-
Definition dtype.h:102
-
Definition array.h:141
- -
friend bool operator==(const ArrayIterator &a, const ArrayIterator &b)
Definition array.h:161
-
std::random_access_iterator_tag iterator_category
Definition array.h:142
-
ArrayIterator & operator++()
Definition array.h:156
-
friend bool operator!=(const ArrayIterator &a, const ArrayIterator &b)
Definition array.h:164
-
ArrayIterator(const array &arr, int idx=0)
-
size_t difference_type
Definition array.h:143
-
const array value_type
Definition array.h:144
-
ArrayIterator & operator+(difference_type diff)
Definition array.h:151
-
Definition array.h:208
-
~Data()
Definition array.h:216
-
deleter_t d
Definition array.h:210
-
Data(const Data &d)=delete
-
Data & operator=(const Data &d)=delete
-
Data(allocator::Buffer buffer, deleter_t d=allocator::free)
Definition array.h:211
-
allocator::Buffer buffer
Definition array.h:209
-
Definition array.h:221
-
bool row_contiguous
Definition array.h:226
-
bool col_contiguous
Definition array.h:227
-
bool contiguous
Definition array.h:224
-
- - - - diff --git a/docs/build/html/atomic_8h.html b/docs/build/html/atomic_8h.html deleted file mode 100644 index f9df80082..000000000 --- a/docs/build/html/atomic_8h.html +++ /dev/null @@ -1,521 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/atomic.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
atomic.h File Reference
-
-
-
#include <metal_atomic>
-#include <metal_stdlib>
-#include "mlx/backend/metal/kernels/bf16.h"
-
-

Go to the source code of this file.

- - - - - - -

-Classes

struct  mlx_atomic< T, typename >
 
struct  mlx_atomic< T, enable_if_t< is_metal_atomic< T > > >
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
METAL_FUNC T mlx_atomic_load_explicit (device mlx_atomic< T > *object, uint offset)
 
template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
METAL_FUNC void mlx_atomic_store_explicit (device mlx_atomic< T > *object, T val, uint offset)
 
template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
METAL_FUNC void mlx_atomic_fetch_and_explicit (device mlx_atomic< T > *object, T val, uint offset)
 
template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
METAL_FUNC void mlx_atomic_fetch_or_explicit (device mlx_atomic< T > *object, T val, uint offset)
 
template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
METAL_FUNC void mlx_atomic_fetch_min_explicit (device mlx_atomic< T > *object, T val, uint offset)
 
template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
METAL_FUNC void mlx_atomic_fetch_max_explicit (device mlx_atomic< T > *object, T val, uint offset)
 
template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
METAL_FUNC void mlx_atomic_fetch_add_explicit (device mlx_atomic< T > *object, T val, uint offset)
 
template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
METAL_FUNC void mlx_atomic_fetch_mul_explicit (device mlx_atomic< T > *object, T val, uint offset)
 
template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
METAL_FUNC bool mlx_atomic_compare_exchange_weak_explicit (device mlx_atomic< T > *object, thread T *expected, T val, uint offset)
 
template<>
METAL_FUNC void mlx_atomic_fetch_min_explicit< float > (device mlx_atomic< float > *object, float val, uint offset)
 
template<>
METAL_FUNC void mlx_atomic_fetch_max_explicit< float > (device mlx_atomic< float > *object, float val, uint offset)
 
template<typename T , enable_if_t<!is_metal_atomic< T >, bool > = true>
METAL_FUNC bool mlx_atomic_compare_exchange_weak_explicit (device mlx_atomic< T > *object, thread uint *expected, uint val, uint offset)
 
- - - - -

-Variables

template<typename T >
constexpr constant bool is_metal_atomic
 
-

Function Documentation

- -

◆ mlx_atomic_compare_exchange_weak_explicit() [1/2]

- -
-
-
-template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
- - - - - - - - - - - - - - - - - - - - - -
METAL_FUNC bool mlx_atomic_compare_exchange_weak_explicit (device mlx_atomic< T > * object,
thread T * expected,
T val,
uint offset )
-
- -
-
- -

◆ mlx_atomic_compare_exchange_weak_explicit() [2/2]

- -
-
-
-template<typename T , enable_if_t<!is_metal_atomic< T >, bool > = true>
- - - - - - - - - - - - - - - - - - - - - -
METAL_FUNC bool mlx_atomic_compare_exchange_weak_explicit (device mlx_atomic< T > * object,
thread uint * expected,
uint val,
uint offset )
-
- -
-
- -

◆ mlx_atomic_fetch_add_explicit()

- -
-
-
-template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
- - - - - - - - - - - - - - - - -
METAL_FUNC void mlx_atomic_fetch_add_explicit (device mlx_atomic< T > * object,
T val,
uint offset )
-
- -
-
- -

◆ mlx_atomic_fetch_and_explicit()

- -
-
-
-template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
- - - - - - - - - - - - - - - - -
METAL_FUNC void mlx_atomic_fetch_and_explicit (device mlx_atomic< T > * object,
T val,
uint offset )
-
- -
-
- -

◆ mlx_atomic_fetch_max_explicit()

- -
-
-
-template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
- - - - - - - - - - - - - - - - -
METAL_FUNC void mlx_atomic_fetch_max_explicit (device mlx_atomic< T > * object,
T val,
uint offset )
-
- -
-
- -

◆ mlx_atomic_fetch_max_explicit< float >()

- -
-
-
-template<>
- - - - - - - - - - - - - - - - -
METAL_FUNC void mlx_atomic_fetch_max_explicit< float > (device mlx_atomic< float > * object,
float val,
uint offset )
-
- -
-
- -

◆ mlx_atomic_fetch_min_explicit()

- -
-
-
-template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
- - - - - - - - - - - - - - - - -
METAL_FUNC void mlx_atomic_fetch_min_explicit (device mlx_atomic< T > * object,
T val,
uint offset )
-
- -
-
- -

◆ mlx_atomic_fetch_min_explicit< float >()

- -
-
-
-template<>
- - - - - - - - - - - - - - - - -
METAL_FUNC void mlx_atomic_fetch_min_explicit< float > (device mlx_atomic< float > * object,
float val,
uint offset )
-
- -
-
- -

◆ mlx_atomic_fetch_mul_explicit()

- -
-
-
-template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
- - - - - - - - - - - - - - - - -
METAL_FUNC void mlx_atomic_fetch_mul_explicit (device mlx_atomic< T > * object,
T val,
uint offset )
-
- -
-
- -

◆ mlx_atomic_fetch_or_explicit()

- -
-
-
-template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
- - - - - - - - - - - - - - - - -
METAL_FUNC void mlx_atomic_fetch_or_explicit (device mlx_atomic< T > * object,
T val,
uint offset )
-
- -
-
- -

◆ mlx_atomic_load_explicit()

- -
-
-
-template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
- - - - - - - - - - - -
METAL_FUNC T mlx_atomic_load_explicit (device mlx_atomic< T > * object,
uint offset )
-
- -
-
- -

◆ mlx_atomic_store_explicit()

- -
-
-
-template<typename T , enable_if_t< is_metal_atomic< T >, bool > = true>
- - - - - - - - - - - - - - - - -
METAL_FUNC void mlx_atomic_store_explicit (device mlx_atomic< T > * object,
T val,
uint offset )
-
- -
-
-

Variable Documentation

- -

◆ is_metal_atomic

- -
-
-
-template<typename T >
- - - - - -
- - - - -
constexpr constant bool is_metal_atomic
-
-constexpr
-
-Initial value:
= _disjunction<
-
is_same<T, int>,
-
is_same<T, uint>,
-
is_same<T, ulong>,
-
is_same<T, float>>::value
-
-
-
-
- - - - diff --git a/docs/build/html/atomic_8h_source.html b/docs/build/html/atomic_8h_source.html deleted file mode 100644 index b1e920a46..000000000 --- a/docs/build/html/atomic_8h_source.html +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/atomic.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
atomic.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <metal_atomic>
-
6#include <metal_stdlib>
- -
8
-
9using namespace metal;
-
10
-
12// Atomic utils
-
14
-
15#pragma METAL internals : enable
-
16template <typename T>
-
17constexpr constant bool is_metal_atomic = _disjunction<
-
18 is_same<T, int>,
-
19 is_same<T, uint>,
-
20 is_same<T, ulong>,
-
21 is_same<T, float>>::value;
-
22
-
23#pragma METAL internals : disable
-
24
-
25template <typename T, typename = void>
-
-
26struct mlx_atomic {
-
27 atomic<uint> val;
-
28};
-
-
29
-
30template <typename T>
-
-
31struct mlx_atomic<T, enable_if_t<is_metal_atomic<T>>> {
-
32 atomic<T> val;
-
33};
-
-
34
-
36// Native metal atomics
-
38
-
39template <typename T, enable_if_t<is_metal_atomic<T>, bool> = true>
-
40METAL_FUNC T
-
-
41mlx_atomic_load_explicit(device mlx_atomic<T>* object, uint offset) {
-
42 return atomic_load_explicit(&(object[offset].val), memory_order_relaxed);
-
43}
-
-
44
-
45template <typename T, enable_if_t<is_metal_atomic<T>, bool> = true>
-
46METAL_FUNC void
-
-
47mlx_atomic_store_explicit(device mlx_atomic<T>* object, T val, uint offset) {
-
48 atomic_store_explicit(&(object[offset].val), val, memory_order_relaxed);
-
49}
-
-
50
-
51template <typename T, enable_if_t<is_metal_atomic<T>, bool> = true>
-
- -
53 device mlx_atomic<T>* object,
-
54 T val,
-
55 uint offset) {
-
56 atomic_fetch_and_explicit(&(object[offset].val), val, memory_order_relaxed);
-
57}
-
-
58
-
59template <typename T, enable_if_t<is_metal_atomic<T>, bool> = true>
-
60METAL_FUNC void
-
-
61mlx_atomic_fetch_or_explicit(device mlx_atomic<T>* object, T val, uint offset) {
-
62 atomic_fetch_or_explicit(&(object[offset].val), val, memory_order_relaxed);
-
63}
-
-
64
-
65template <typename T, enable_if_t<is_metal_atomic<T>, bool> = true>
-
- -
67 device mlx_atomic<T>* object,
-
68 T val,
-
69 uint offset) {
-
70 atomic_fetch_min_explicit(&(object[offset].val), val, memory_order_relaxed);
-
71}
-
-
72
-
73template <typename T, enable_if_t<is_metal_atomic<T>, bool> = true>
-
- -
75 device mlx_atomic<T>* object,
-
76 T val,
-
77 uint offset) {
-
78 atomic_fetch_max_explicit(&(object[offset].val), val, memory_order_relaxed);
-
79}
-
-
80
-
81template <typename T, enable_if_t<is_metal_atomic<T>, bool> = true>
-
- -
83 device mlx_atomic<T>* object,
-
84 T val,
-
85 uint offset) {
-
86 atomic_fetch_add_explicit(&(object[offset].val), val, memory_order_relaxed);
-
87}
-
-
88
-
89template <typename T, enable_if_t<is_metal_atomic<T>, bool> = true>
-
- -
91 device mlx_atomic<T>* object,
-
92 T val,
-
93 uint offset) {
-
94 T expected = mlx_atomic_load_explicit(object, offset);
- -
96 object, &expected, val * expected, offset)) {
-
97 }
-
98}
-
-
99
-
100template <typename T, enable_if_t<is_metal_atomic<T>, bool> = true>
-
- -
102 device mlx_atomic<T>* object,
-
103 thread T* expected,
-
104 T val,
-
105 uint offset) {
-
106 return atomic_compare_exchange_weak_explicit(
-
107 &(object[offset].val),
-
108 expected,
-
109 val,
-
110 memory_order_relaxed,
-
111 memory_order_relaxed);
-
112}
-
-
113
-
114// Specialization for float since it does not atomic_fetch_min_explicit
-
115template <>
-
- -
117 device mlx_atomic<float>* object,
-
118 float val,
-
119 uint offset) {
-
120 float expected = mlx_atomic_load_explicit(object, offset);
-
121 while (val < expected) {
- -
123 object, &expected, val, offset)) {
-
124 return;
-
125 }
-
126 }
-
127}
-
-
128
-
129// Specialization for float since it does not atomic_fetch_max_explicit
-
130template <>
-
- -
132 device mlx_atomic<float>* object,
-
133 float val,
-
134 uint offset) {
-
135 float expected = mlx_atomic_load_explicit(object, offset);
-
136 while (val > expected) {
- -
138 object, &expected, val, offset)) {
-
139 return;
-
140 }
-
141 }
-
142}
-
-
143
-
145// Custom atomics
-
147
-
148namespace {
-
149
-
150template <typename T>
-
151constexpr constant uint packing_size = sizeof(uint) / sizeof(T);
-
152
-
153template <typename T>
-
154union uint_or_packed {
-
155 T val[packing_size<T>];
-
156 uint bits;
-
157};
-
158
-
159template <typename T, typename Op>
-
160struct mlx_atomic_update_helper {
-
161 uint operator()(uint_or_packed<T> init, T update, uint elem_offset) {
-
162 Op op;
-
163 init.val[elem_offset] = op(update, init.val[elem_offset]);
-
164 return init.bits;
-
165 }
-
166};
-
167
-
168template <typename T, typename Op>
-
169METAL_FUNC void mlx_atomic_update_and_store(
-
170 device mlx_atomic<T>* object,
-
171 T update,
-
172 uint offset) {
-
173 uint pack_offset = offset / packing_size<T>;
-
174 uint elem_offset = offset % packing_size<T>;
-
175
-
176 mlx_atomic_update_helper<T, Op> helper;
-
177 uint_or_packed<T> expected;
-
178 expected.bits =
-
179 atomic_load_explicit(&(object[pack_offset].val), memory_order_relaxed);
-
180
-
181 while (Op::condition(update, expected.val[elem_offset]) &&
- -
183 object,
-
184 &(expected.bits),
-
185 helper(expected, update, elem_offset),
-
186 pack_offset)) {
-
187 }
-
188}
-
189
-
190template <typename T>
-
191struct __None {
-
192 static bool condition(T a, T b) {
-
193#pragma unused(a)
-
194#pragma unused(b)
-
195 return true;
-
196 }
-
197
-
198 T operator()(T a, T b) {
-
199#pragma unused(b)
-
200 return a;
-
201 }
-
202};
-
203
-
204template <typename T>
-
205struct __Add {
-
206 static bool condition(T a, T b) {
-
207#pragma unused(a)
-
208#pragma unused(b)
-
209 return true;
-
210 }
-
211
-
212 T operator()(T a, T b) {
-
213 return a + b;
-
214 }
-
215};
-
216
-
217template <typename T>
-
218struct __Mul {
-
219 static bool condition(T a, T b) {
-
220#pragma unused(a)
-
221 return b != 0;
-
222 }
-
223
-
224 T operator()(T a, T b) {
-
225 return a * b;
-
226 }
-
227};
-
228
-
229template <typename T>
-
230struct __Max {
-
231 static bool condition(T a, T b) {
-
232 return a > b;
-
233 }
-
234
-
235 T operator()(T a, T b) {
-
236 return max(a, b);
-
237 }
-
238};
-
239
-
240template <typename T>
-
241struct __Min {
-
242 static bool condition(T a, T b) {
-
243 return a < b;
-
244 }
-
245
-
246 T operator()(T a, T b) {
-
247 return min(a, b);
-
248 }
-
249};
-
250
-
251} // namespace
-
252
-
253template <typename T, enable_if_t<!is_metal_atomic<T>, bool> = true>
-
254METAL_FUNC T
-
255mlx_atomic_load_explicit(device mlx_atomic<T>* object, uint offset) {
-
256 uint pack_offset = offset / sizeof(T);
-
257 uint elem_offset = offset % sizeof(T);
-
258 uint_or_packed<T> packed_val;
-
259 packed_val.bits =
-
260 atomic_load_explicit(&(object[pack_offset].val), memory_order_relaxed);
-
261 return packed_val.val[elem_offset];
-
262}
-
263
-
264template <typename T, enable_if_t<!is_metal_atomic<T>, bool> = true>
-
265METAL_FUNC void
-
266mlx_atomic_store_explicit(device mlx_atomic<T>* object, T val, uint offset) {
-
267 mlx_atomic_update_and_store<T, __None<T>>(object, val, offset);
-
268}
-
269
-
270template <typename T, enable_if_t<!is_metal_atomic<T>, bool> = true>
-
271METAL_FUNC void mlx_atomic_fetch_and_explicit(
-
272 device mlx_atomic<T>* object,
-
273 T val,
-
274 uint offset) {
-
275 uint pack_offset = offset / packing_size<T>;
-
276 uint elem_offset = offset % packing_size<T>;
-
277 uint_or_packed<T> identity;
-
278 identity.bits = __UINT32_MAX__;
-
279 identity.val[elem_offset] = val;
-
280
-
281 atomic_fetch_and_explicit(
-
282 &(object[pack_offset].val), identity.bits, memory_order_relaxed);
-
283}
-
284
-
285template <typename T, enable_if_t<!is_metal_atomic<T>, bool> = true>
-
286METAL_FUNC void
-
287mlx_atomic_fetch_or_explicit(device mlx_atomic<T>* object, T val, uint offset) {
-
288 uint pack_offset = offset / packing_size<T>;
-
289 uint elem_offset = offset % packing_size<T>;
-
290 uint_or_packed<T> identity;
-
291 identity.bits = 0;
-
292 identity.val[elem_offset] = val;
-
293
-
294 atomic_fetch_or_explicit(
-
295 &(object[pack_offset].val), identity.bits, memory_order_relaxed);
-
296}
-
297
-
298template <typename T, enable_if_t<!is_metal_atomic<T>, bool> = true>
-
299METAL_FUNC void mlx_atomic_fetch_min_explicit(
-
300 device mlx_atomic<T>* object,
-
301 T val,
-
302 uint offset) {
-
303 mlx_atomic_update_and_store<T, __Min<T>>(object, val, offset);
-
304}
-
305
-
306template <typename T, enable_if_t<!is_metal_atomic<T>, bool> = true>
-
307METAL_FUNC void mlx_atomic_fetch_max_explicit(
-
308 device mlx_atomic<T>* object,
-
309 T val,
-
310 uint offset) {
-
311 mlx_atomic_update_and_store<T, __Max<T>>(object, val, offset);
-
312}
-
313
-
314template <typename T, enable_if_t<!is_metal_atomic<T>, bool> = true>
-
315METAL_FUNC void mlx_atomic_fetch_add_explicit(
-
316 device mlx_atomic<T>* object,
-
317 T val,
-
318 uint offset) {
-
319 mlx_atomic_update_and_store<T, __Add<T>>(object, val, offset);
-
320}
-
321
-
322template <typename T, enable_if_t<!is_metal_atomic<T>, bool> = true>
-
323METAL_FUNC void mlx_atomic_fetch_mul_explicit(
-
324 device mlx_atomic<T>* object,
-
325 T val,
-
326 uint offset) {
-
327 mlx_atomic_update_and_store<T, __Mul<T>>(object, val, offset);
-
328}
-
329
-
330template <typename T, enable_if_t<!is_metal_atomic<T>, bool> = true>
-
- -
332 device mlx_atomic<T>* object,
-
333 thread uint* expected,
-
334 uint val,
-
335 uint offset) {
-
336 return atomic_compare_exchange_weak_explicit(
-
337 &(object[offset].val),
-
338 expected,
-
339 val,
-
340 memory_order_relaxed,
-
341 memory_order_relaxed);
-
342}
-
-
METAL_FUNC void mlx_atomic_fetch_add_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:82
-
METAL_FUNC void mlx_atomic_fetch_max_explicit< float >(device mlx_atomic< float > *object, float val, uint offset)
Definition atomic.h:131
-
METAL_FUNC void mlx_atomic_fetch_and_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:52
-
METAL_FUNC T mlx_atomic_load_explicit(device mlx_atomic< T > *object, uint offset)
Definition atomic.h:41
-
METAL_FUNC void mlx_atomic_store_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:47
-
constexpr constant bool is_metal_atomic
Definition atomic.h:17
-
METAL_FUNC void mlx_atomic_fetch_or_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:61
-
METAL_FUNC void mlx_atomic_fetch_min_explicit< float >(device mlx_atomic< float > *object, float val, uint offset)
Definition atomic.h:116
-
METAL_FUNC void mlx_atomic_fetch_max_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:74
-
METAL_FUNC void mlx_atomic_fetch_min_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:66
-
METAL_FUNC void mlx_atomic_fetch_mul_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:90
-
METAL_FUNC bool mlx_atomic_compare_exchange_weak_explicit(device mlx_atomic< T > *object, thread T *expected, T val, uint offset)
Definition atomic.h:101
- -
Op op
Definition binary.h:139
-
array identity(int n, Dtype dtype, StreamOrDevice s={})
Create a square matrix of shape (n,n) of zeros, and ones in the major diagonal.
-
Definition bf16.h:265
-
METAL_FUNC bfloat16_t min(bfloat16_t x, bfloat16_t y)
Definition bf16_math.h:234
-
METAL_FUNC bfloat16_t max(bfloat16_t x, bfloat16_t y)
Definition bf16_math.h:234
-
array bits(const std::vector< int > &shape, int width, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
Generate an array with type uint32 filled with random bits.
- -
Definition atomic.h:26
-
atomic< uint > val
Definition atomic.h:27
-
- - - - diff --git a/docs/build/html/backend_2accelerate_2utils_8h.html b/docs/build/html/backend_2accelerate_2utils_8h.html deleted file mode 100644 index 60d5dacd1..000000000 --- a/docs/build/html/backend_2accelerate_2utils_8h.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: mlx/backend/accelerate/utils.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
utils.h File Reference
-
-
-
#include <vecLib/BNNS/bnns.h>
-#include "mlx/dtype.h"
-
-

Go to the source code of this file.

- - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
- - - -

-Functions

BNNSDataType mlx::core::to_bnns_dtype (Dtype mlx_dtype)
 
-
- - - - diff --git a/docs/build/html/backend_2accelerate_2utils_8h_source.html b/docs/build/html/backend_2accelerate_2utils_8h_source.html deleted file mode 100644 index 02e8f28ac..000000000 --- a/docs/build/html/backend_2accelerate_2utils_8h_source.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - -MLX: mlx/backend/accelerate/utils.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
utils.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <vecLib/BNNS/bnns.h>
-
6#include "mlx/dtype.h"
-
7
-
8namespace mlx::core {
-
9
-
-
10BNNSDataType to_bnns_dtype(Dtype mlx_dtype) {
-
11 uint32_t size_bits = size_of(mlx_dtype) * 8;
-
12 switch (kindof(mlx_dtype)) {
-
13 case Dtype::Kind::b:
-
14 return BNNSDataTypeBoolean;
-
15 case Dtype::Kind::u:
-
16 return BNNSDataType(BNNSDataTypeUIntBit | size_bits);
-
17 case Dtype::Kind::i:
-
18 return BNNSDataType(BNNSDataTypeIntBit | size_bits);
-
19 case Dtype::Kind::f:
-
20 return BNNSDataType(BNNSDataTypeFloatBit | size_bits);
-
21 case Dtype::Kind::V:
-
22 return BNNSDataTypeBFloat16;
-
23 case Dtype::Kind::c:
-
24 throw std::invalid_argument("BNNS does not support complex types");
-
25 }
-
26}
-
-
27
-
28} // namespace mlx::core
- -
Definition allocator.h:7
-
BNNSDataType to_bnns_dtype(Dtype mlx_dtype)
Definition utils.h:10
-
Dtype::Kind kindof(const Dtype &t)
-
uint8_t size_of(const Dtype &t)
Definition dtype.h:95
-
Definition dtype.h:15
- - - - - - -
- - - - diff --git a/docs/build/html/backend_2common_2ops_8h.html b/docs/build/html/backend_2common_2ops_8h.html deleted file mode 100644 index c976bb466..000000000 --- a/docs/build/html/backend_2common_2ops_8h.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/ops.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
ops.h File Reference
-
-
-
#include <stdint.h>
-#include <cmath>
-#include <complex>
-
-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Classes

union  mlx::core::detail::IntOrFloat
 
struct  mlx::core::detail::Abs
 
struct  mlx::core::detail::ArcCos
 
struct  mlx::core::detail::ArcCosh
 
struct  mlx::core::detail::ArcSin
 
struct  mlx::core::detail::ArcSinh
 
struct  mlx::core::detail::ArcTan
 
struct  mlx::core::detail::ArcTan2
 
struct  mlx::core::detail::ArcTanh
 
struct  mlx::core::detail::Ceil
 
struct  mlx::core::detail::Conjugate
 
struct  mlx::core::detail::Cos
 
struct  mlx::core::detail::Cosh
 
struct  mlx::core::detail::Erf
 
struct  mlx::core::detail::ErfInv
 
struct  mlx::core::detail::Exp
 
struct  mlx::core::detail::Expm1
 
struct  mlx::core::detail::Floor
 
struct  mlx::core::detail::Log
 
struct  mlx::core::detail::Log2
 
struct  mlx::core::detail::Log10
 
struct  mlx::core::detail::Log1p
 
struct  mlx::core::detail::LogicalNot
 
struct  mlx::core::detail::Negative
 
struct  mlx::core::detail::Round
 
struct  mlx::core::detail::Sigmoid
 
struct  mlx::core::detail::Sign
 
struct  mlx::core::detail::Sin
 
struct  mlx::core::detail::Sinh
 
struct  mlx::core::detail::Square
 
struct  mlx::core::detail::Sqrt
 
struct  mlx::core::detail::Rsqrt
 
struct  mlx::core::detail::Tan
 
struct  mlx::core::detail::Tanh
 
struct  mlx::core::detail::Add
 
struct  mlx::core::detail::Divide
 
struct  mlx::core::detail::Remainder
 
struct  mlx::core::detail::Equal
 
struct  mlx::core::detail::NaNEqual
 
struct  mlx::core::detail::Greater
 
struct  mlx::core::detail::GreaterEqual
 
struct  mlx::core::detail::Less
 
struct  mlx::core::detail::LessEqual
 
struct  mlx::core::detail::Maximum
 
struct  mlx::core::detail::Minimum
 
struct  mlx::core::detail::LogAddExp
 
struct  mlx::core::detail::Multiply
 
struct  mlx::core::detail::NotEqual
 
struct  mlx::core::detail::Power
 
struct  mlx::core::detail::Subtract
 
struct  mlx::core::detail::LogicalAnd
 
struct  mlx::core::detail::LogicalOr
 
struct  mlx::core::detail::Select
 
struct  mlx::core::detail::BitwiseAnd
 
struct  mlx::core::detail::BitwiseOr
 
struct  mlx::core::detail::BitwiseXor
 
struct  mlx::core::detail::LeftShift
 
struct  mlx::core::detail::RightShift
 
- - - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
namespace  mlx::core::detail
 
- - - - - - - -

-Functions

float mlx::core::detail::fast_exp (float x)
 
float mlx::core::detail::fast_erf (float a)
 
float mlx::core::detail::fast_erfinv (float a)
 
-
- - - - diff --git a/docs/build/html/backend_2common_2ops_8h_source.html b/docs/build/html/backend_2common_2ops_8h_source.html deleted file mode 100644 index 1b6cebe96..000000000 --- a/docs/build/html/backend_2common_2ops_8h_source.html +++ /dev/null @@ -1,1218 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/ops.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
ops.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
-
2
-
3#pragma once
-
4#include <stdint.h>
-
5#include <cmath>
-
6#include <complex>
-
7
-
- -
9
-
10namespace {
-
11constexpr float inf = std::numeric_limits<float>::infinity();
-
12} // namespace
-
13
-
-
14typedef union {
-
15 int i;
-
16 float f;
- -
-
18
-
-
19inline float fast_exp(float x) {
-
20 if (x == -std::numeric_limits<float>::infinity()) {
-
21 return 0.0f;
-
22 } else if (x == std::numeric_limits<float>::infinity() || std::isnan(x)) {
-
23 return x;
-
24 }
-
25 x *= 1.442695; // multiply with log_2(e)
-
26 float ipart, fpart;
-
27 IntOrFloat epart;
-
28 x = std::max(-80.f, std::min(x, 80.f));
-
29 ipart = std::floor(x + 0.5);
-
30 fpart = x - ipart;
-
31
-
32 x = 1.535336188319500e-4f;
-
33 x = x * fpart + 1.339887440266574e-3f;
-
34 x = x * fpart + 9.618437357674640e-3f;
-
35 x = x * fpart + 5.550332471162809e-2f;
-
36 x = x * fpart + 2.402264791363012e-1f;
-
37 x = x * fpart + 6.931472028550421e-1f;
-
38 x = x * fpart + 1.000000000000000f;
-
39
-
40 // generate 2**ipart in the floating point representation using integer
-
41 // bitshifting
-
42 epart.i = (int(ipart) + 127) << 23;
-
43
-
44 return epart.f * x;
-
45}
-
-
46
-
-
47inline float fast_erf(float a) {
-
48 float r, s, t, u;
-
49 t = std::abs(a);
-
50 s = a * a;
-
51 if (t > 0.927734375f) {
-
52 // maximum error 0.99527 ulp
-
53 r = std::fma(
-
54 -1.72853470e-5f, t, 3.83197126e-4f); // -0x1.220000p-16,0x1.91cfb2p-12
-
55 u = std::fma(
-
56 -3.88396438e-3f, t, 2.42546219e-2f); // -0x1.fd1438p-9, 0x1.8d6342p-6
-
57 r = std::fma(r, s, u);
-
58 r = std::fma(r, t, -1.06777877e-1f); // -0x1.b55cb8p-4
-
59 r = std::fma(r, t, -6.34846687e-1f); // -0x1.450aa0p-1
-
60 r = std::fma(r, t, -1.28717512e-1f); // -0x1.079d0cp-3
-
61 r = std::fma(r, t, -t);
-
62 // TODO, replace with expm1 when implemented
-
63 r = 1.0f - std::exp(r);
-
64 r = std::copysign(r, a);
-
65 } else {
-
66 // maximum error 0.98929 ulp
-
67 r = -5.96761703e-4f; // -0x1.38e000p-11
-
68 r = std::fma(r, s, 4.99119423e-3f); // 0x1.471a58p-8
-
69 r = std::fma(r, s, -2.67681349e-2f); // -0x1.b691b2p-6
-
70 r = std::fma(r, s, 1.12819925e-1f); // 0x1.ce1c44p-4
-
71 r = std::fma(r, s, -3.76125336e-1f); // -0x1.812700p-2
-
72 r = std::fma(r, s, 1.28379166e-1f); // 0x1.06eba8p-3
-
73 r = std::fma(r, a, a);
-
74 }
-
75 return r;
-
76}
-
-
77
-
-
78inline float fast_erfinv(float a) {
-
79 auto t = std::fma(a, 0.0f - a, 1.0f);
-
80 t = std::log(t);
-
81 float p;
-
82 if (std::abs(t) > 6.125f) { // maximum ulp error = 2.35793
-
83 p = 3.03697567e-10f; // 0x1.4deb44p-32
-
84 p = std::fma(p, t, 2.93243101e-8f); // 0x1.f7c9aep-26
-
85 p = std::fma(p, t, 1.22150334e-6f); // 0x1.47e512p-20
-
86 p = std::fma(p, t, 2.84108955e-5f); // 0x1.dca7dep-16
-
87 p = std::fma(p, t, 3.93552968e-4f); // 0x1.9cab92p-12
-
88 p = std::fma(p, t, 3.02698812e-3f); // 0x1.8cc0dep-9
-
89 p = std::fma(p, t, 4.83185798e-3f); // 0x1.3ca920p-8
-
90 p = std::fma(p, t, -2.64646143e-1f); // -0x1.0eff66p-2
-
91 p = std::fma(p, t, 8.40016484e-1f); // 0x1.ae16a4p-1
-
92 } else { // maximum ulp error = 2.35002
-
93 p = 5.43877832e-9f; // 0x1.75c000p-28
-
94 p = std::fma(p, t, 1.43285448e-7f); // 0x1.33b402p-23
-
95 p = std::fma(p, t, 1.22774793e-6f); // 0x1.499232p-20
-
96 p = std::fma(p, t, 1.12963626e-7f); // 0x1.e52cd2p-24
-
97 p = std::fma(p, t, -5.61530760e-5f); // -0x1.d70bd0p-15
-
98 p = std::fma(p, t, -1.47697632e-4f); // -0x1.35be90p-13
-
99 p = std::fma(p, t, 2.31468678e-3f); // 0x1.2f6400p-9
-
100 p = std::fma(p, t, 1.15392581e-2f); // 0x1.7a1e50p-7
-
101 p = std::fma(p, t, -2.32015476e-1f); // -0x1.db2aeep-3
-
102 p = std::fma(p, t, 8.86226892e-1f); // 0x1.c5bf88p-1
-
103 }
-
104 return a * p;
-
105}
-
-
106
-
-
107struct Abs {
-
108 template <typename T>
-
-
109 T operator()(T x) {
-
110 return std::abs(x);
-
111 };
-
-
-
112 uint8_t operator()(uint8_t x) {
-
113 return x;
-
114 };
-
-
-
115 uint16_t operator()(uint16_t x) {
-
116 return x;
-
117 };
-
-
-
118 uint32_t operator()(uint32_t x) {
-
119 return x;
-
120 };
-
-
-
121 uint64_t operator()(uint64_t x) {
-
122 return x;
-
123 };
-
-
-
124 bool operator()(bool x) {
-
125 return x;
-
126 };
-
-
127};
-
-
128
-
-
129struct ArcCos {
-
130 template <typename T>
-
-
131 T operator()(T x) {
-
132 return std::acos(x);
-
133 };
-
-
134};
-
-
135
-
-
136struct ArcCosh {
-
137 template <typename T>
-
-
138 T operator()(T x) {
-
139 return std::acosh(x);
-
140 };
-
-
141};
-
-
142
-
-
143struct ArcSin {
-
144 template <typename T>
-
-
145 T operator()(T x) {
-
146 return std::asin(x);
-
147 };
-
-
148};
-
-
149
-
-
150struct ArcSinh {
-
151 template <typename T>
-
-
152 T operator()(T x) {
-
153 return std::asinh(x);
-
154 };
-
-
155};
-
-
156
-
-
157struct ArcTan {
-
158 template <typename T>
-
-
159 T operator()(T x) {
-
160 return std::atan(x);
-
161 };
-
-
162};
-
-
163
-
-
164struct ArcTan2 {
-
165 template <typename T>
-
-
166 T operator()(T y, T x) {
-
167 return std::atan2(y, x);
-
168 };
-
-
169};
-
-
170
-
-
171struct ArcTanh {
-
172 template <typename T>
-
-
173 T operator()(T x) {
-
174 return std::atanh(x);
-
175 };
-
-
176};
-
-
177
-
-
178struct Ceil {
-
179 template <typename T>
-
-
180 T operator()(T x) {
-
181 return std::ceil(x);
-
182 };
-
-
-
183 int8_t operator()(int8_t x) {
-
184 return x;
-
185 };
-
-
-
186 int16_t operator()(int16_t x) {
-
187 return x;
-
188 };
-
-
-
189 int32_t operator()(int32_t x) {
-
190 return x;
-
191 };
-
-
-
192 int64_t operator()(int64_t x) {
-
193 return x;
-
194 };
-
-
-
195 uint8_t operator()(uint8_t x) {
-
196 return x;
-
197 };
-
-
-
198 uint16_t operator()(uint16_t x) {
-
199 return x;
-
200 };
-
-
-
201 uint32_t operator()(uint32_t x) {
-
202 return x;
-
203 };
-
-
-
204 uint64_t operator()(uint64_t x) {
-
205 return x;
-
206 };
-
-
-
207 bool operator()(bool x) {
-
208 return x;
-
209 };
-
-
210};
-
-
211
-
-
212struct Conjugate {
-
- -
214 return std::conj(x);
-
215 }
-
-
216};
-
-
217
-
-
218struct Cos {
-
219 template <typename T>
-
-
220 T operator()(T x) {
-
221 return std::cos(x);
-
222 };
-
-
223};
-
-
224
-
-
225struct Cosh {
-
226 template <typename T>
-
-
227 T operator()(T x) {
-
228 return std::cosh(x);
-
229 };
-
-
230};
-
-
231
-
-
232struct Erf {
-
233 template <typename T>
-
-
234 T operator()(T x) {
-
235 return static_cast<T>(fast_erf(static_cast<float>(x)));
-
236 };
-
-
237};
-
-
238
-
-
239struct ErfInv {
-
240 template <typename T>
-
-
241 T operator()(T x) {
-
242 return static_cast<T>(fast_erfinv(static_cast<float>(x)));
-
243 };
-
-
244};
-
-
245
-
-
246struct Exp {
-
247 template <typename T>
-
-
248 T operator()(T x) {
-
249 return fast_exp(x);
-
250 };
-
-
251
-
- -
253 return std::exp(x);
-
254 }
-
-
255};
-
-
256
-
-
257struct Expm1 {
-
258 template <typename T>
-
-
259 T operator()(T x) {
-
260 return expm1(x);
-
261 };
-
-
262};
-
-
263
-
-
264struct Floor {
-
265 template <typename T>
-
-
266 T operator()(T x) {
-
267 return std::floor(x);
-
268 };
-
-
-
269 int8_t operator()(int8_t x) {
-
270 return x;
-
271 };
-
-
-
272 int16_t operator()(int16_t x) {
-
273 return x;
-
274 };
-
-
-
275 int32_t operator()(int32_t x) {
-
276 return x;
-
277 };
-
-
-
278 int64_t operator()(int64_t x) {
-
279 return x;
-
280 };
-
-
-
281 uint8_t operator()(uint8_t x) {
-
282 return x;
-
283 };
-
-
-
284 uint16_t operator()(uint16_t x) {
-
285 return x;
-
286 };
-
-
-
287 uint32_t operator()(uint32_t x) {
-
288 return x;
-
289 };
-
-
-
290 uint64_t operator()(uint64_t x) {
-
291 return x;
-
292 };
-
-
-
293 bool operator()(bool x) {
-
294 return x;
-
295 };
-
-
296};
-
-
297
-
-
298struct Log {
-
299 template <typename T>
-
-
300 T operator()(T x) {
-
301 return std::log(x);
-
302 };
-
-
303};
-
-
304
-
-
305struct Log2 {
-
306 template <typename T>
-
-
307 T operator()(T x) {
-
308 return std::log2(x);
-
309 };
-
-
310};
-
-
311
-
-
312struct Log10 {
-
313 template <typename T>
-
-
314 T operator()(T x) {
-
315 return std::log10(x);
-
316 };
-
-
317};
-
-
318
-
-
319struct Log1p {
-
320 template <typename T>
-
-
321 T operator()(T x) {
-
322 return log1p(x);
-
323 };
-
-
324};
-
-
325
-
- -
327 template <typename T>
-
-
328 T operator()(T x) {
-
329 return !x;
-
330 };
-
-
331};
-
-
332
-
-
333struct Negative {
-
334 template <typename T>
-
-
335 T operator()(T x) {
-
336 return -x;
-
337 };
-
-
338};
-
-
339
-
-
340struct Round {
-
341 template <typename T>
-
-
342 T operator()(T x) {
-
343 return std::rint(x);
-
344 }
-
-
345
-
- -
347 return {std::rint(x.real()), std::rint(x.imag())};
-
348 }
-
-
349};
-
-
350
-
-
351struct Sigmoid {
-
352 template <typename T>
-
-
353 T operator()(T x) {
-
354 auto one = static_cast<decltype(x)>(1.0);
-
355 return one / (one + fast_exp(-x));
-
356 }
-
-
357};
-
-
358
-
-
359struct Sign {
-
360 template <typename T>
-
-
361 T operator()(T x) {
-
362 return (x > T(0)) - (x < T(0));
-
363 }
-
-
-
364 uint8_t operator()(uint8_t x) {
-
365 return x != 0;
-
366 }
-
-
-
367 uint16_t operator()(uint16_t x) {
-
368 return x != 0;
-
369 }
-
-
-
370 uint32_t operator()(uint32_t x) {
-
371 return x != 0;
-
372 }
-
-
-
373 uint64_t operator()(uint64_t x) {
-
374 return x != 0;
-
375 }
-
-
376};
-
-
377
-
-
378struct Sin {
-
379 template <typename T>
-
-
380 T operator()(T x) {
-
381 return std::sin(x);
-
382 };
-
-
383};
-
-
384
-
-
385struct Sinh {
-
386 template <typename T>
-
-
387 T operator()(T x) {
-
388 return std::sinh(x);
-
389 };
-
-
390};
-
-
391
-
-
392struct Square {
-
393 template <typename T>
-
-
394 T operator()(T x) {
-
395 return x * x;
-
396 };
-
-
397};
-
-
398
-
-
399struct Sqrt {
-
400 template <typename T>
-
-
401 T operator()(T x) {
-
402 return std::sqrt(x);
-
403 };
-
-
404};
-
-
405
-
-
406struct Rsqrt {
-
407 template <typename T>
-
-
408 T operator()(T x) {
-
409 return static_cast<decltype(x)>(1.0) / std::sqrt(x);
-
410 };
-
-
411};
-
-
412
-
-
413struct Tan {
-
414 template <typename T>
-
-
415 T operator()(T x) {
-
416 return std::tan(x);
-
417 };
-
-
418};
-
-
419
-
-
420struct Tanh {
-
421 template <typename T>
-
-
422 T operator()(T x) {
-
423 return std::tanh(x);
-
424 };
-
-
425};
-
-
426
-
-
427struct Add {
-
428 template <typename T>
-
-
429 T operator()(T x, T y) {
-
430 return x + y;
-
431 }
-
-
432};
-
-
433
-
-
434struct Divide {
-
435 template <typename T>
-
-
436 T operator()(T x, T y) {
-
437 return x / y;
-
438 }
-
-
439};
-
-
440
-
-
441struct Remainder {
-
442 template <typename T>
-
-
443 std::enable_if_t<std::is_integral_v<T> & !std::is_signed_v<T>, T> operator()(
-
444 T numerator,
-
445 T denominator) {
-
446 return numerator % denominator;
-
447 }
-
-
448
-
449 template <typename T>
-
-
450 std::enable_if_t<std::is_integral_v<T> & std::is_signed_v<T>, T> operator()(
-
451 T numerator,
-
452 T denominator) {
-
453 auto r = numerator % denominator;
-
454 if (r != 0 && (r < 0 != denominator < 0))
-
455 r += denominator;
-
456 return r;
-
457 }
-
-
458
-
459 template <typename T>
-
-
460 std::enable_if_t<!std::is_integral_v<T>, T> operator()(
-
461 T numerator,
-
462 T denominator) {
-
463 auto r = std::fmod(numerator, denominator);
-
464 if (r != 0 && (r < 0 != denominator < 0)) {
-
465 r += denominator;
-
466 }
-
467 return r;
-
468 }
-
-
469
-
- -
471 return numerator % denominator;
-
472 }
-
-
473};
-
-
474
-
-
475struct Equal {
-
476 template <typename T>
-
-
477 bool operator()(T x, T y) {
-
478 return x == y;
-
479 }
-
-
480};
-
-
481
-
-
482struct NaNEqual {
-
483 template <typename T>
-
-
484 bool operator()(T x, T y) {
-
485 return x == y || (std::isnan(x) && std::isnan(y));
-
486 }
-
-
487};
-
-
488
-
-
489struct Greater {
-
490 template <typename T>
-
-
491 bool operator()(T x, T y) {
-
492 return x > y;
-
493 }
-
-
494};
-
-
495
-
- -
497 template <typename T>
-
-
498 bool operator()(T x, T y) {
-
499 return x >= y;
-
500 }
-
-
501};
-
-
502
-
-
503struct Less {
-
504 template <typename T>
-
-
505 bool operator()(T x, T y) {
-
506 return x < y;
-
507 }
-
-
508};
-
-
509
-
-
510struct LessEqual {
-
511 template <typename T>
-
-
512 bool operator()(T x, T y) {
-
513 return x <= y;
-
514 }
-
-
515};
-
-
516
-
-
517struct Maximum {
-
518 template <typename T>
-
-
519 std::enable_if_t<std::is_integral_v<T>, T> operator()(T x, T y) {
-
520 return (x > y) ? x : y;
-
521 }
-
-
522
-
523 template <typename T>
-
-
524 std::enable_if_t<!std::is_integral_v<T>, T> operator()(T x, T y) {
-
525 if (std::isnan(x)) {
-
526 return x;
-
527 }
-
528 return (x > y) ? x : y;
-
529 }
-
-
530};
-
-
531
-
-
532struct Minimum {
-
533 template <typename T>
-
-
534 std::enable_if_t<std::is_integral_v<T>, T> operator()(T x, T y) {
-
535 return x < y ? x : y;
-
536 }
-
-
537
-
538 template <typename T>
-
-
539 std::enable_if_t<!std::is_integral_v<T>, T> operator()(T x, T y) {
-
540 if (std::isnan(x)) {
-
541 return x;
-
542 }
-
543 return x < y ? x : y;
-
544 }
-
-
545};
-
-
546
-
-
547struct LogAddExp {
-
548 template <typename T>
-
-
549 T operator()(T x, T y) {
-
550 constexpr float inf = std::numeric_limits<float>::infinity();
-
551 auto maxval = Maximum()(x, y);
-
552 auto minval = Minimum()(x, y);
-
553 return (minval == -inf || maxval == inf)
-
554 ? maxval
-
555 : static_cast<decltype(x)>(
-
556 maxval + std::log1p(fast_exp(minval - maxval)));
-
557 };
-
-
558};
-
-
559
-
-
560struct Multiply {
-
561 template <typename T>
-
-
562 T operator()(T x, T y) {
-
563 return x * y;
-
564 }
-
-
565};
-
-
566
-
-
567struct NotEqual {
-
568 template <typename T>
-
-
569 bool operator()(T x, T y) {
-
570 return x != y;
-
571 }
-
-
572};
-
-
573
-
-
574struct Power {
-
575 template <typename T>
-
-
576 std::enable_if_t<!std::is_integral_v<T>, T> operator()(T base, T exp) {
-
577 return std::pow(base, exp);
-
578 }
-
-
579
-
580 template <typename T>
-
-
581 std::enable_if_t<std::is_integral_v<T>, T> operator()(T base, T exp) {
-
582 T res = 1;
-
583 while (exp) {
-
584 if (exp & 1) {
-
585 res *= base;
-
586 }
-
587 exp >>= 1;
-
588 base *= base;
-
589 }
-
590 return res;
-
591 }
-
-
592};
-
-
593
-
-
594struct Subtract {
-
595 template <typename T>
-
-
596 T operator()(T x, T y) {
-
597 return x - y;
-
598 }
-
-
599};
-
-
600
-
- -
602 template <typename T>
-
-
603 T operator()(T x, T y) {
-
604 return x && y;
-
605 };
-
-
606};
-
-
607
-
-
608struct LogicalOr {
-
609 template <typename T>
-
-
610 T operator()(T x, T y) {
-
611 return x || y;
-
612 };
-
-
613};
-
-
614
-
-
615struct Select {
-
616 template <typename T>
-
-
617 T operator()(bool condition, T x, T y) {
-
618 return condition ? x : y;
-
619 }
-
-
620};
-
-
621
-
- -
623 template <typename T>
-
-
624 T operator()(T x, T y) {
-
625 return x & y;
-
626 };
-
-
627};
-
-
628
-
-
629struct BitwiseOr {
-
630 template <typename T>
-
-
631 T operator()(T x, T y) {
-
632 return x | y;
-
633 };
-
-
634};
-
-
635
-
- -
637 template <typename T>
-
-
638 T operator()(T x, T y) {
-
639 return x ^ y;
-
640 };
-
-
641};
-
-
642
-
-
643struct LeftShift {
-
644 template <typename T>
-
-
645 T operator()(T x, T y) {
-
646 return x << y;
-
647 };
-
-
648};
-
-
649
-
- -
651 template <typename T>
-
-
652 T operator()(T x, T y) {
-
653 return x >> y;
-
654 };
-
-
655};
-
-
656
-
657} // namespace mlx::core::detail
-
-
array log1p(const array &a, StreamOrDevice s={})
Natural logarithm of one plus elements in the array: log(1 + a).
-
array expm1(const array &a, StreamOrDevice s={})
Computes the expm1 function of the elements of an array.
-
array exp(const array &a, StreamOrDevice s={})
Exponential of the elements of an array.
-
Definition ops.h:8
-
float fast_exp(float x)
Definition ops.h:19
-
float fast_erf(float a)
Definition ops.h:47
-
float fast_erfinv(float a)
Definition ops.h:78
-
Definition complex.h:34
-
Definition ops.h:107
-
T operator()(T x)
Definition ops.h:109
-
uint8_t operator()(uint8_t x)
Definition ops.h:112
-
uint64_t operator()(uint64_t x)
Definition ops.h:121
-
uint16_t operator()(uint16_t x)
Definition ops.h:115
-
bool operator()(bool x)
Definition ops.h:124
-
uint32_t operator()(uint32_t x)
Definition ops.h:118
-
Definition ops.h:427
-
T operator()(T x, T y)
Definition ops.h:429
-
Definition ops.h:129
-
T operator()(T x)
Definition ops.h:131
-
Definition ops.h:136
-
T operator()(T x)
Definition ops.h:138
-
Definition ops.h:143
-
T operator()(T x)
Definition ops.h:145
-
Definition ops.h:150
-
T operator()(T x)
Definition ops.h:152
-
Definition ops.h:164
-
T operator()(T y, T x)
Definition ops.h:166
-
Definition ops.h:157
-
T operator()(T x)
Definition ops.h:159
-
Definition ops.h:171
-
T operator()(T x)
Definition ops.h:173
-
Definition ops.h:622
-
T operator()(T x, T y)
Definition ops.h:624
-
Definition ops.h:629
-
T operator()(T x, T y)
Definition ops.h:631
-
Definition ops.h:636
-
T operator()(T x, T y)
Definition ops.h:638
-
Definition ops.h:178
-
uint8_t operator()(uint8_t x)
Definition ops.h:195
-
T operator()(T x)
Definition ops.h:180
-
uint32_t operator()(uint32_t x)
Definition ops.h:201
-
int8_t operator()(int8_t x)
Definition ops.h:183
-
int16_t operator()(int16_t x)
Definition ops.h:186
-
bool operator()(bool x)
Definition ops.h:207
-
uint16_t operator()(uint16_t x)
Definition ops.h:198
-
uint64_t operator()(uint64_t x)
Definition ops.h:204
-
int32_t operator()(int32_t x)
Definition ops.h:189
-
int64_t operator()(int64_t x)
Definition ops.h:192
-
Definition ops.h:212
-
complex64_t operator()(complex64_t x)
Definition ops.h:213
-
Definition ops.h:218
-
T operator()(T x)
Definition ops.h:220
-
Definition ops.h:225
-
T operator()(T x)
Definition ops.h:227
-
Definition ops.h:434
-
T operator()(T x, T y)
Definition ops.h:436
-
Definition ops.h:475
-
bool operator()(T x, T y)
Definition ops.h:477
-
Definition ops.h:232
-
T operator()(T x)
Definition ops.h:234
-
Definition ops.h:239
-
T operator()(T x)
Definition ops.h:241
-
Definition ops.h:246
-
T operator()(T x)
Definition ops.h:248
-
complex64_t operator()(complex64_t x)
Definition ops.h:252
-
Definition ops.h:257
-
T operator()(T x)
Definition ops.h:259
-
Definition ops.h:264
-
T operator()(T x)
Definition ops.h:266
-
uint32_t operator()(uint32_t x)
Definition ops.h:287
-
uint16_t operator()(uint16_t x)
Definition ops.h:284
-
uint8_t operator()(uint8_t x)
Definition ops.h:281
-
int32_t operator()(int32_t x)
Definition ops.h:275
-
int64_t operator()(int64_t x)
Definition ops.h:278
-
bool operator()(bool x)
Definition ops.h:293
-
int8_t operator()(int8_t x)
Definition ops.h:269
-
uint64_t operator()(uint64_t x)
Definition ops.h:290
-
int16_t operator()(int16_t x)
Definition ops.h:272
- -
bool operator()(T x, T y)
Definition ops.h:498
-
Definition ops.h:489
-
bool operator()(T x, T y)
Definition ops.h:491
-
Definition ops.h:643
-
T operator()(T x, T y)
Definition ops.h:645
-
Definition ops.h:510
-
bool operator()(T x, T y)
Definition ops.h:512
-
Definition ops.h:503
-
bool operator()(T x, T y)
Definition ops.h:505
-
Definition ops.h:312
-
T operator()(T x)
Definition ops.h:314
-
Definition ops.h:319
-
T operator()(T x)
Definition ops.h:321
-
Definition ops.h:305
-
T operator()(T x)
Definition ops.h:307
-
Definition ops.h:547
-
T operator()(T x, T y)
Definition ops.h:549
-
Definition ops.h:298
-
T operator()(T x)
Definition ops.h:300
-
Definition ops.h:601
-
T operator()(T x, T y)
Definition ops.h:603
-
Definition ops.h:326
-
T operator()(T x)
Definition ops.h:328
-
Definition ops.h:608
-
T operator()(T x, T y)
Definition ops.h:610
-
Definition ops.h:517
-
std::enable_if_t< std::is_integral_v< T >, T > operator()(T x, T y)
Definition ops.h:519
-
std::enable_if_t<!std::is_integral_v< T >, T > operator()(T x, T y)
Definition ops.h:524
-
Definition ops.h:532
-
std::enable_if_t<!std::is_integral_v< T >, T > operator()(T x, T y)
Definition ops.h:539
-
std::enable_if_t< std::is_integral_v< T >, T > operator()(T x, T y)
Definition ops.h:534
-
Definition ops.h:560
-
T operator()(T x, T y)
Definition ops.h:562
-
Definition ops.h:482
-
bool operator()(T x, T y)
Definition ops.h:484
-
Definition ops.h:333
-
T operator()(T x)
Definition ops.h:335
-
Definition ops.h:567
-
bool operator()(T x, T y)
Definition ops.h:569
-
Definition ops.h:574
-
std::enable_if_t<!std::is_integral_v< T >, T > operator()(T base, T exp)
Definition ops.h:576
-
std::enable_if_t< std::is_integral_v< T >, T > operator()(T base, T exp)
Definition ops.h:581
-
Definition ops.h:441
-
std::enable_if_t<!std::is_integral_v< T >, T > operator()(T numerator, T denominator)
Definition ops.h:460
-
std::enable_if_t< std::is_integral_v< T > &!std::is_signed_v< T >, T > operator()(T numerator, T denominator)
Definition ops.h:443
-
std::enable_if_t< std::is_integral_v< T > &std::is_signed_v< T >, T > operator()(T numerator, T denominator)
Definition ops.h:450
-
complex64_t operator()(complex64_t numerator, complex64_t denominator)
Definition ops.h:470
-
Definition ops.h:650
-
T operator()(T x, T y)
Definition ops.h:652
-
Definition ops.h:340
-
T operator()(T x)
Definition ops.h:342
-
complex64_t operator()(complex64_t x)
Definition ops.h:346
-
Definition ops.h:406
-
T operator()(T x)
Definition ops.h:408
-
Definition ops.h:615
-
T operator()(bool condition, T x, T y)
Definition ops.h:617
-
Definition ops.h:351
-
T operator()(T x)
Definition ops.h:353
-
Definition ops.h:359
-
uint64_t operator()(uint64_t x)
Definition ops.h:373
-
T operator()(T x)
Definition ops.h:361
-
uint8_t operator()(uint8_t x)
Definition ops.h:364
-
uint16_t operator()(uint16_t x)
Definition ops.h:367
-
uint32_t operator()(uint32_t x)
Definition ops.h:370
-
Definition ops.h:378
-
T operator()(T x)
Definition ops.h:380
-
Definition ops.h:385
-
T operator()(T x)
Definition ops.h:387
-
Definition ops.h:399
-
T operator()(T x)
Definition ops.h:401
-
Definition ops.h:392
-
T operator()(T x)
Definition ops.h:394
-
Definition ops.h:594
-
T operator()(T x, T y)
Definition ops.h:596
-
Definition ops.h:413
-
T operator()(T x)
Definition ops.h:415
-
Definition ops.h:420
-
T operator()(T x)
Definition ops.h:422
-
uint32_t u
Definition bf16.h:17
- -
float f
Definition ops.h:16
-
int i
Definition ops.h:15
-
- - - - diff --git a/docs/build/html/backend_2common_2utils_8h.html b/docs/build/html/backend_2common_2utils_8h.html deleted file mode 100644 index 8789ebdcf..000000000 --- a/docs/build/html/backend_2common_2utils_8h.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/utils.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
utils.h File Reference
-
-
-
#include <vector>
-#include "mlx/array.h"
-
-

Go to the source code of this file.

- - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
- - - - - - - - - - - - - - - - - -

-Functions

template<typename stride_t >
stride_t mlx::core::elem_to_loc (int elem, const std::vector< int > &shape, const std::vector< stride_t > &strides)
 
size_t mlx::core::elem_to_loc (int elem, const array &a)
 
template<typename stride_t >
std::tuple< std::vector< int >, std::vector< std::vector< stride_t > > > mlx::core::collapse_contiguous_dims (const std::vector< int > &shape, const std::vector< std::vector< stride_t > > strides)
 
std::tuple< std::vector< int >, std::vector< std::vector< size_t > > > mlx::core::collapse_contiguous_dims (const std::vector< array > &xs)
 
template<typename... Arrays, typename = enable_for_arrays_t<Arrays...>>
auto mlx::core::collapse_contiguous_dims (Arrays &&... xs)
 
template<typename stride_t >
auto mlx::core::check_contiguity (const std::vector< int > &shape, const std::vector< stride_t > &strides)
 
-
- - - - diff --git a/docs/build/html/backend_2common_2utils_8h_source.html b/docs/build/html/backend_2common_2utils_8h_source.html deleted file mode 100644 index b2b4439da..000000000 --- a/docs/build/html/backend_2common_2utils_8h_source.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/utils.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
utils.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <vector>
-
6
-
7#include "mlx/array.h"
-
8
-
9namespace mlx::core {
-
10
-
11template <typename stride_t>
-
-
12inline stride_t elem_to_loc(
-
13 int elem,
-
14 const std::vector<int>& shape,
-
15 const std::vector<stride_t>& strides) {
-
16 stride_t loc = 0;
-
17 for (int i = shape.size() - 1; i >= 0; --i) {
-
18 auto q_and_r = ldiv(elem, shape[i]);
-
19 loc += q_and_r.rem * strides[i];
-
20 elem = q_and_r.quot;
-
21 }
-
22 return loc;
-
23}
-
-
24
-
-
25inline size_t elem_to_loc(int elem, const array& a) {
-
26 if (a.flags().row_contiguous) {
-
27 return elem;
-
28 }
-
29 return elem_to_loc(elem, a.shape(), a.strides());
-
30}
-
-
31
-
32// Collapse dims that are contiguous to possibly route to a better kernel
-
33// e.g. for x = transpose(array({0, 1, 2, 3, 4, 5, 6, 7}, {2, 2, 2}), {2, 0, 1})
-
34// should return {{2, 4}, {{1, 2}}}.
-
35//
-
36// When multiple arrays are passed they should all have the same shape. The
-
37// collapsed axes are also the same so one shape is returned.
-
38template <typename stride_t>
-
39inline std::tuple<std::vector<int>, std::vector<std::vector<stride_t>>>
-
- -
41 const std::vector<int>& shape,
-
42 const std::vector<std::vector<stride_t>> strides) {
-
43 // Make a vector that has axes separated with -1. Collapse all axes between
-
44 // -1.
-
45 std::vector<int> to_collapse;
-
46 if (shape.size() > 0) {
-
47 to_collapse.push_back(0);
-
48 for (int i = 1; i < shape.size(); i++) {
-
49 bool contiguous = true;
-
50 for (const std::vector<stride_t>& st : strides) {
-
51 if (st[i] * shape[i] != st[i - 1]) {
-
52 contiguous = false;
-
53 }
-
54 if (!contiguous) {
-
55 break;
-
56 }
-
57 }
-
58 if (!contiguous) {
-
59 to_collapse.push_back(-1);
-
60 }
-
61 to_collapse.push_back(i);
-
62 }
-
63 to_collapse.push_back(-1);
-
64 }
-
65
-
66 std::vector<int> out_shape;
-
67 std::vector<std::vector<stride_t>> out_strides(strides.size());
-
68 for (int i = 0; i < to_collapse.size(); i++) {
-
69 int current_shape = shape[to_collapse[i]];
-
70 while (to_collapse[++i] != -1) {
-
71 current_shape *= shape[to_collapse[i]];
-
72 }
-
73 out_shape.push_back(current_shape);
-
74 for (int j = 0; j < strides.size(); j++) {
-
75 const std::vector<stride_t>& st = strides[j];
-
76 out_strides[j].push_back(st[to_collapse[i - 1]]);
-
77 }
-
78 }
-
79
-
80 return std::make_tuple(out_shape, out_strides);
-
81}
-
-
82
-
83inline std::tuple<std::vector<int>, std::vector<std::vector<size_t>>>
-
-
84collapse_contiguous_dims(const std::vector<array>& xs) {
-
85 std::vector<std::vector<size_t>> strides;
-
86 for (auto& x : xs) {
-
87 strides.emplace_back(x.strides());
-
88 }
-
89 return collapse_contiguous_dims(xs[0].shape(), strides);
-
90}
-
-
91
-
92template <typename... Arrays, typename = enable_for_arrays_t<Arrays...>>
-
-
93inline auto collapse_contiguous_dims(Arrays&&... xs) {
- -
95 std::vector<array>{std::forward<Arrays>(xs)...});
-
96}
-
-
97
-
98template <typename stride_t>
-
-
99inline auto check_contiguity(
-
100 const std::vector<int>& shape,
-
101 const std::vector<stride_t>& strides) {
-
102 size_t data_size = 1;
-
103 size_t f_stride = 1;
-
104 size_t b_stride = 1;
-
105 bool is_row_contiguous = true;
-
106 bool is_col_contiguous = true;
-
107
-
108 for (int i = 0, ri = shape.size() - 1; ri >= 0; i++, ri--) {
-
109 is_row_contiguous &= strides[i] == f_stride || shape[i] == 1;
-
110 is_col_contiguous &= strides[ri] == b_stride || shape[ri] == 1;
-
111 f_stride *= shape[i];
-
112 b_stride *= shape[ri];
-
113 if (strides[i] > 0) {
-
114 data_size *= shape[i];
-
115 }
-
116 }
-
117
-
118 return std::make_tuple(data_size, is_row_contiguous, is_col_contiguous);
-
119}
-
-
120
-
121} // namespace mlx::core
- -
Definition array.h:20
-
const Flags & flags() const
Get the Flags bit-field.
Definition array.h:290
-
const std::vector< size_t > & strides() const
The strides of the array.
Definition array.h:113
-
const std::vector< int > & shape() const
The shape of the array as a vector of integers.
Definition array.h:99
-
Definition allocator.h:7
-
stride_t elem_to_loc(int elem, const std::vector< int > &shape, const std::vector< stride_t > &strides)
Definition utils.h:12
-
auto check_contiguity(const std::vector< int > &shape, const std::vector< stride_t > &strides)
Definition utils.h:99
-
std::tuple< std::vector< int >, std::vector< std::vector< stride_t > > > collapse_contiguous_dims(const std::vector< int > &shape, const std::vector< std::vector< stride_t > > strides)
Definition utils.h:40
-
typename std::enable_if_t< is_arrays_v< T... > > enable_for_arrays_t
Definition array.h:565
-
bool row_contiguous
Definition array.h:226
-
- - - - diff --git a/docs/build/html/backend_2metal_2allocator_8h.html b/docs/build/html/backend_2metal_2allocator_8h.html deleted file mode 100644 index a8d38c66a..000000000 --- a/docs/build/html/backend_2metal_2allocator_8h.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/allocator.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
allocator.h File Reference
-
-
-
#include <map>
-#include <mutex>
-#include <vector>
-#include "mlx/allocator.h"
-#include "mlx/backend/metal/device.h"
-
-

Go to the source code of this file.

- - - - -

-Classes

class  mlx::core::metal::MetalAllocator
 
- - - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
namespace  mlx::core::metal
 
- - - -

-Functions

MetalAllocatormlx::core::metal::allocator ()
 
-

Variable Documentation

- -

◆ buf

- -
-
- - - - -
MTL::Buffer* buf
-
- -
-
- -

◆ next

- -
-
- - - - -
BufferHolder* next
-
- -
-
- -

◆ prev

- -
-
- - - - -
BufferHolder* prev
-
- -
-
-
- - - - diff --git a/docs/build/html/backend_2metal_2allocator_8h_source.html b/docs/build/html/backend_2metal_2allocator_8h_source.html deleted file mode 100644 index 6588aac61..000000000 --- a/docs/build/html/backend_2metal_2allocator_8h_source.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/allocator.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
allocator.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <map>
-
6#include <mutex>
-
7#include <vector>
-
8
-
9#include "mlx/allocator.h"
- -
11
-
- -
13
- -
15
-
16namespace {
-
17
-
18class BufferCache {
-
19 public:
-
20 BufferCache(MTL::Device* device);
-
21 ~BufferCache();
-
22
-
23 MTL::Buffer* reuse_from_cache(size_t size);
-
24 void recycle_to_cache(MTL::Buffer* buf);
-
25 void release_cached_buffers(size_t min_bytes_to_free);
-
26 size_t cache_size() {
-
27 return pool_size_;
-
28 }
-
29 void clear();
-
30
-
31 private:
-
32 struct BufferHolder {
-
33 public:
-
34 BufferHolder(MTL::Buffer* buf_) : buf(buf_), prev(nullptr), next(nullptr) {}
-
35
-
36 BufferHolder* prev;
-
37 BufferHolder* next;
-
38 MTL::Buffer* buf;
-
39 };
-
40
-
41 void add_at_head(BufferHolder* to_add);
-
42 void remove_from_list(BufferHolder* to_remove);
-
43
-
44 MTL::Device* device_;
-
45
-
46 std::multimap<size_t, BufferHolder*> buffer_pool_;
-
47 BufferHolder* head_;
-
48 BufferHolder* tail_;
-
49 size_t pool_size_;
-
50};
-
51
-
52} // namespace
-
53
-
- -
56 public:
-
57 virtual Buffer malloc(size_t size, bool allow_swap = false) override;
-
58 virtual void free(Buffer buffer) override;
-
- -
60 return active_memory_;
-
61 };
-
-
-
62 size_t get_peak_memory() {
-
63 return peak_memory_;
-
64 };
-
-
- -
66 std::unique_lock lk(mutex_);
-
67 peak_memory_ = 0;
-
68 };
-
-
- -
70 return buffer_cache_.cache_size();
-
71 };
-
-
72 size_t set_cache_limit(size_t limit);
-
73 size_t set_memory_limit(size_t limit, bool relaxed);
- -
75
-
76 private:
-
77 MTL::Device* device_;
- - -
80
-
81 // Caching allocator
-
82 BufferCache buffer_cache_;
-
83
-
84 // Allocation stats
-
85 size_t block_limit_;
-
86 size_t gc_limit_;
-
87 size_t active_memory_{0};
-
88 size_t peak_memory_{0};
-
89 size_t max_pool_size_;
-
90 bool relaxed_{true};
-
91
-
92 std::mutex mutex_;
-
93};
-
-
94
- -
96
-
97} // namespace mlx::core::metal
-
- -
MTL::Buffer * buf
Definition allocator.h:38
-
BufferHolder * prev
Definition allocator.h:36
-
BufferHolder * next
Definition allocator.h:37
- -
Definition allocator.h:39
-
Definition allocator.h:12
-
Definition allocator.h:54
-
virtual void free(Buffer buffer) override
-
size_t set_memory_limit(size_t limit, bool relaxed)
-
void reset_peak_memory()
Definition allocator.h:65
- -
virtual Buffer malloc(size_t size, bool allow_swap=false) override
Allocator for Metal GPUs.
-
size_t get_active_memory()
Definition allocator.h:59
-
size_t get_peak_memory()
Definition allocator.h:62
-
size_t get_cache_memory()
Definition allocator.h:69
-
size_t set_cache_limit(size_t limit)
-
friend MetalAllocator & allocator()
-
Definition allocator.h:12
-
MetalAllocator & allocator()
-
Device & device(mlx::core::Device)
-
- - - - diff --git a/docs/build/html/backend_2metal_2device_8h.html b/docs/build/html/backend_2metal_2device_8h.html deleted file mode 100644 index 573f61f73..000000000 --- a/docs/build/html/backend_2metal_2device_8h.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/device.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
device.h File Reference
-
-
-
#include <Metal/Metal.hpp>
-#include <functional>
-#include <mutex>
-#include <string>
-#include <unordered_map>
-#include <unordered_set>
-#include <dlfcn.h>
-#include <filesystem>
-#include "mlx/array.h"
-#include "mlx/device.h"
-
-

Go to the source code of this file.

- - - - - - - - -

-Classes

struct  mlx::core::metal::CommandEncoder
 
struct  mlx::core::metal::CommandEncoder::ConcurrentContext
 
class  mlx::core::metal::Device
 
- - - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
namespace  mlx::core::metal
 
- - - -

-Typedefs

using mlx::core::metal::MTLFCList
 
- - - - - -

-Functions

std::string mlx::core::metal::get_colocated_mtllib_path (const std::string &lib_name)
 
Devicemlx::core::metal::device (mlx::core::Device)
 
-
- - - - diff --git a/docs/build/html/backend_2metal_2device_8h_source.html b/docs/build/html/backend_2metal_2device_8h_source.html deleted file mode 100644 index cac1cfce8..000000000 --- a/docs/build/html/backend_2metal_2device_8h_source.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/device.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
device.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <Metal/Metal.hpp>
-
6#include <functional>
-
7#include <mutex>
-
8#include <string>
-
9#include <unordered_map>
-
10#include <unordered_set>
-
11
-
12#include <dlfcn.h>
-
13#include <filesystem>
-
14
-
15#include "mlx/array.h"
-
16#include "mlx/device.h"
-
17
-
18namespace fs = std::filesystem;
-
19
-
20namespace mlx::core::metal {
-
21
-
-
22inline std::string get_colocated_mtllib_path(const std::string& lib_name) {
-
23 Dl_info info;
-
24 std::string mtllib_path;
-
25 std::string lib_ext = lib_name + ".metallib";
-
26
-
27 int success = dladdr((void*)get_colocated_mtllib_path, &info);
-
28 if (success) {
-
29 auto mtllib = fs::path(info.dli_fname).remove_filename() / lib_ext;
-
30 mtllib_path = mtllib.c_str();
-
31 }
-
32
-
33 return mtllib_path;
-
34}
-
-
35
-
36using MTLFCList =
-
37 std::vector<std::tuple<const void*, MTL::DataType, NS::UInteger>>;
-
38
-
- -
-
40 CommandEncoder(MTL::CommandBuffer* cbuf) : cbuf(cbuf) {
-
41 enc = cbuf->computeCommandEncoder(MTL::DispatchTypeConcurrent);
-
42 enc->retain();
-
43 };
-
- - -
46
-
- -
- -
49 enc.concurrent = true;
-
50 }
-
-
- -
52 enc.concurrent = false;
-
53 enc.outputs.insert(
-
54 enc.concurrent_outputs.begin(), enc.concurrent_outputs.end());
-
55 enc.concurrent_outputs.clear();
-
56 }
-
-
57
-
58 private:
-
59 CommandEncoder& enc;
-
60 };
-
-
61
-
-
62 MTL::ComputeCommandEncoder* operator->() {
-
63 return enc;
-
64 }
-
-
65
-
-
66 void set_input_array(const array& a, int idx, int offset = 0) {
-
67 auto r_buf =
-
68 static_cast<MTL::Resource*>(const_cast<void*>(a.buffer().ptr()));
-
69 if (auto it = outputs.find(r_buf); it != outputs.end()) {
-
70 // Insert a barrier
-
71 enc->memoryBarrier(&r_buf, 1);
-
72
-
73 // Remove the output
-
74 outputs.erase(it);
-
75 }
-
76 auto a_buf = static_cast<const MTL::Buffer*>(a.buffer().ptr());
-
77 auto base_offset = a.data<char>() -
-
78 static_cast<char*>(const_cast<MTL::Buffer*>(a_buf)->contents());
-
79 base_offset += offset;
-
80 enc->setBuffer(a_buf, base_offset, idx);
-
81 }
-
-
82
-
-
83 void set_output_array(array& a, int idx, int offset = 0) {
-
84 // Add barriers before adding the output to the output set
-
85 set_input_array(a, idx, offset);
-
86 auto buf = static_cast<MTL::Resource*>(a.buffer().ptr());
-
87 if (concurrent) {
-
88 concurrent_outputs.insert(buf);
-
89 } else {
-
90 outputs.insert(buf);
-
91 }
-
92 }
-
-
93
-
94 void dispatchThreadgroups(MTL::Size grid_dims, MTL::Size group_dims);
-
95 void dispatchThreads(MTL::Size grid_dims, MTL::Size group_dims);
-
96
-
- -
98 return ConcurrentContext(*this);
-
99 }
-
-
100
-
- -
102 enc->endEncoding();
-
103 enc->release();
-
104 }
-
-
105
-
106 private:
-
107 void maybe_split();
-
108
-
109 int num_dispatches{0};
-
110 MTL::CommandBuffer* cbuf;
-
111 MTL::ComputeCommandEncoder* enc;
-
112 bool concurrent{false};
-
113 std::unordered_set<MTL::Resource*> outputs;
-
114 std::unordered_set<MTL::Resource*> concurrent_outputs;
-
115};
-
-
116
-
-
117class Device {
-
118 public:
- -
120 Device(const Device&) = delete;
-
121 Device& operator=(const Device&) = delete;
- -
123
-
-
124 MTL::Device* mtl_device() {
-
125 return device_;
-
126 };
-
-
127
-
128 void new_queue(int index);
-
129 MTL::CommandBuffer* get_command_buffer(int index);
- - -
132 void commit_command_buffer(int index);
- -
134 void end_encoding(int index);
-
135
- -
137 const std::string& lib_name,
-
138 const std::string& lib_path);
- -
140 const std::string& lib_name,
-
141 const std::function<std::string(const std::string&)>& lib_path_func =
- -
143
-
144 MTL::Library* get_library(const std::string& name);
-
145
-
146 MTL::Library* get_library(
-
147 const std::string& name,
-
148 const std::string& source_string,
-
149 bool cache = true);
-
150
-
151 MTL::Library* get_library(
-
152 const std::string& name,
-
153 const MTL::StitchedLibraryDescriptor* desc,
-
154 bool cache = true);
-
155
-
156 MTL::Function* get_function(
-
157 const std::string& base_name,
-
158 MTL::Library* mtl_lib,
-
159 const std::string& specialized_name = "",
-
160 const MTLFCList& func_consts = {});
-
161
-
162 MTL::Function* get_function(
-
163 const std::string& base_name,
-
164 const std::string& lib_name = "mlx",
-
165 const std::string& specialized_name = "",
-
166 const MTLFCList& func_consts = {});
-
167
-
168 MTL::ComputePipelineState* get_kernel(
-
169 const std::string& base_name,
-
170 MTL::Library* mtl_lib,
-
171 const std::string& hash_name = "",
-
172 const MTLFCList& func_consts = {},
-
173 const std::vector<MTL::Function*>& linked_functions = {});
-
174
-
175 MTL::ComputePipelineState* get_kernel(
-
176 const std::string& base_name,
-
177 const std::string& lib_name = "mlx",
-
178 const std::string& hash_name = "",
-
179 const MTLFCList& func_consts = {},
-
180 const std::vector<MTL::Function*>& linked_functions = {});
-
181
-
182 MTL::ArgumentEncoder* argument_encoder(
-
183 const std::vector<MTL::ArgumentDescriptor*>& arg_descs) const;
-
184
-
185 private:
-
186 MTL::Library* get_library_cache_(const std::string& name);
-
187
-
188 MTL::Library* get_library_(const std::string& source_string);
-
189 MTL::Library* get_library_(const MTL::StitchedLibraryDescriptor* desc);
-
190
-
191 MTL::Function* get_function_(const std::string& name, MTL::Library* mtl_lib);
-
192
-
193 MTL::Function* get_function_(
-
194 const std::string& name,
-
195 const std::string& specialized_name,
-
196 const MTLFCList& func_consts,
-
197 MTL::Library* mtl_lib);
-
198
-
199 MTL::LinkedFunctions* get_linked_functions_(
-
200 const std::vector<MTL::Function*>& funcs);
-
201
-
202 MTL::ComputePipelineState* get_kernel_(
-
203 const std::string& name,
-
204 const MTL::Function* mtl_function);
-
205
-
206 MTL::ComputePipelineState* get_kernel_(
-
207 const std::string& name,
-
208 const MTL::Function* mtl_function,
-
209 const MTL::LinkedFunctions* linked_functions);
-
210
-
211 MTL::Device* device_;
-
212 std::unordered_map<int32_t, MTL::CommandQueue*> queue_map_;
-
213 std::unordered_map<int32_t, std::pair<int, MTL::CommandBuffer*>> buffer_map_;
-
214 std::unordered_map<int32_t, std::unique_ptr<CommandEncoder>> encoder_map_;
-
215 std::unordered_map<std::string, MTL::ComputePipelineState*> kernel_map_;
-
216 std::unordered_map<std::string, MTL::Library*> library_map_;
-
217 std::mutex mtx_;
-
218};
-
-
219
- -
221
-
222} // namespace mlx::core::metal
- -
MTL::Buffer * buf
Definition allocator.h:38
-
const void * ptr() const
Definition allocator.h:23
-
Definition array.h:20
-
T * data()
Definition array.h:313
-
allocator::Buffer & buffer()
Definition array.h:299
-
Definition device.h:117
-
int get_command_buffer_ops(int index)
-
MTL::Device * mtl_device()
Definition device.h:124
-
void register_library(const std::string &lib_name, const std::string &lib_path)
- -
MTL::CommandBuffer * get_command_buffer(int index)
-
void end_encoding(int index)
-
MTL::ComputePipelineState * get_kernel(const std::string &base_name, MTL::Library *mtl_lib, const std::string &hash_name="", const MTLFCList &func_consts={}, const std::vector< MTL::Function * > &linked_functions={})
-
void register_library(const std::string &lib_name, const std::function< std::string(const std::string &)> &lib_path_func=get_colocated_mtllib_path)
-
MTL::ArgumentEncoder * argument_encoder(const std::vector< MTL::ArgumentDescriptor * > &arg_descs) const
-
void increment_command_buffer_ops(int index)
-
void new_queue(int index)
-
MTL::Library * get_library(const std::string &name)
-
MTL::Library * get_library(const std::string &name, const MTL::StitchedLibraryDescriptor *desc, bool cache=true)
-
void commit_command_buffer(int index)
-
MTL::Library * get_library(const std::string &name, const std::string &source_string, bool cache=true)
-
MTL::Function * get_function(const std::string &base_name, MTL::Library *mtl_lib, const std::string &specialized_name="", const MTLFCList &func_consts={})
-
Device(const Device &)=delete
-
MTL::Function * get_function(const std::string &base_name, const std::string &lib_name="mlx", const std::string &specialized_name="", const MTLFCList &func_consts={})
-
Device & operator=(const Device &)=delete
- -
MTL::ComputePipelineState * get_kernel(const std::string &base_name, const std::string &lib_name="mlx", const std::string &hash_name="", const MTLFCList &func_consts={}, const std::vector< MTL::Function * > &linked_functions={})
-
CommandEncoder & get_command_encoder(int index)
- -
Definition allocator.h:12
-
std::string get_colocated_mtllib_path(const std::string &lib_name)
Definition device.h:22
-
std::vector< std::tuple< const void *, MTL::DataType, NS::UInteger > > MTLFCList
Definition device.h:36
-
Device & device(mlx::core::Device)
-
Definition device.h:7
- - -
ConcurrentContext(CommandEncoder &enc)
Definition device.h:48
-
Definition device.h:39
-
void dispatchThreads(MTL::Size grid_dims, MTL::Size group_dims)
-
CommandEncoder(MTL::CommandBuffer *cbuf)
Definition device.h:40
-
CommandEncoder & operator=(const CommandEncoder &)=delete
-
ConcurrentContext start_concurrent()
Definition device.h:97
-
void dispatchThreadgroups(MTL::Size grid_dims, MTL::Size group_dims)
-
void set_input_array(const array &a, int idx, int offset=0)
Definition device.h:66
-
~CommandEncoder()
Definition device.h:101
-
MTL::ComputeCommandEncoder * operator->()
Definition device.h:62
-
CommandEncoder(const CommandEncoder &)=delete
-
void set_output_array(array &a, int idx, int offset=0)
Definition device.h:83
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2bf16_8h.html b/docs/build/html/backend_2metal_2kernels_2bf16_8h.html deleted file mode 100644 index ccea11b13..000000000 --- a/docs/build/html/backend_2metal_2kernels_2bf16_8h.html +++ /dev/null @@ -1,10952 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/bf16.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
bf16.h File Reference
-
-
-
#include <metal_stdlib>
-#include "mlx/backend/metal/kernels/bf16_math.h"
-
-

Go to the source code of this file.

- - - - - - - - -

-Classes

struct  _MLX_BFloat16
 
struct  _MLX_BFloat16::bits_to_bfloat_struct
 
struct  metal::_numeric_limits_impl< bfloat16_t >
 
- - - -

-Namespaces

namespace  metal
 
- - - - - - - - - - - - - - - - - - - -

-Macros

#define bfloat_binop_base(__op__, __operator__, otype, atype, btype, ctype)
 
#define bfloat_binop_helper(__op__, __operator__, otype, itype, ctype)
 
#define bfloat_binop(_op_, _operator_)
 
#define bfloat_compop(__op__, __operator__)
 
#define bfloat_inplace_op_helper(__op__, __operator__, itype, addr_space)
 
#define bfloat_inplace_op_addr_space_helper(__op__, __operator__, itype)
 
#define bfloat_inplace_op(itype)
 
#define bfloat_inplace_op_helper(__op__, __operator__, addr_space)
 
#define bfloat_inplace_op_addr_space_helper(__op__, __operator__)
 
- - - -

-Typedefs

typedef struct _MLX_BFloat16 bfloat16_t
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

constexpr METAL_FUNC uint16_t float_to_bfloat_bits (float x)
 
constexpr METAL_FUNC float bfloat_bits_to_float (uint16_t x)
 
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 x)
 
constexpr METAL_FUNC _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC float operator+ (_MLX_BFloat16 lhs, float rhs)
 
constexpr METAL_FUNC float operator+ (float lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC float operator+ (_MLX_BFloat16 lhs, half rhs)
 
constexpr METAL_FUNC float operator+ (half lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs, int32_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator+ (int32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs, uint32_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator+ (uint32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs, int64_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator+ (int64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs, uint64_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator+ (uint64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC float operator- (_MLX_BFloat16 lhs, float rhs)
 
constexpr METAL_FUNC float operator- (float lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC float operator- (_MLX_BFloat16 lhs, half rhs)
 
constexpr METAL_FUNC float operator- (half lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 lhs, int32_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator- (int32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 lhs, uint32_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator- (uint32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 lhs, int64_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator- (int64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 lhs, uint64_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator- (uint64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator* (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC float operator* (_MLX_BFloat16 lhs, float rhs)
 
constexpr METAL_FUNC float operator* (float lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC float operator* (_MLX_BFloat16 lhs, half rhs)
 
constexpr METAL_FUNC float operator* (half lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator* (_MLX_BFloat16 lhs, int32_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator* (int32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator* (_MLX_BFloat16 lhs, uint32_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator* (uint32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator* (_MLX_BFloat16 lhs, int64_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator* (int64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator* (_MLX_BFloat16 lhs, uint64_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator* (uint64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC float operator/ (_MLX_BFloat16 lhs, float rhs)
 
constexpr METAL_FUNC float operator/ (float lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC float operator/ (_MLX_BFloat16 lhs, half rhs)
 
constexpr METAL_FUNC float operator/ (half lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs, int32_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator/ (int32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs, uint32_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator/ (uint32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs, int64_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator/ (int64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs, uint64_t rhs)
 
constexpr METAL_FUNC _MLX_BFloat16 operator/ (uint64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs, float rhs)
 
constexpr METAL_FUNC bool operator> (float lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs, half rhs)
 
constexpr METAL_FUNC bool operator> (half lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs, int32_t rhs)
 
constexpr METAL_FUNC bool operator> (int32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs, uint32_t rhs)
 
constexpr METAL_FUNC bool operator> (uint32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs, int64_t rhs)
 
constexpr METAL_FUNC bool operator> (int64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs, uint64_t rhs)
 
constexpr METAL_FUNC bool operator> (uint64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs, float rhs)
 
constexpr METAL_FUNC bool operator< (float lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs, half rhs)
 
constexpr METAL_FUNC bool operator< (half lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs, int32_t rhs)
 
constexpr METAL_FUNC bool operator< (int32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs, uint32_t rhs)
 
constexpr METAL_FUNC bool operator< (uint32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs, int64_t rhs)
 
constexpr METAL_FUNC bool operator< (int64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs, uint64_t rhs)
 
constexpr METAL_FUNC bool operator< (uint64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs, float rhs)
 
constexpr METAL_FUNC bool operator>= (float lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs, half rhs)
 
constexpr METAL_FUNC bool operator>= (half lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs, int32_t rhs)
 
constexpr METAL_FUNC bool operator>= (int32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs, uint32_t rhs)
 
constexpr METAL_FUNC bool operator>= (uint32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs, int64_t rhs)
 
constexpr METAL_FUNC bool operator>= (int64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs, uint64_t rhs)
 
constexpr METAL_FUNC bool operator>= (uint64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs, float rhs)
 
constexpr METAL_FUNC bool operator<= (float lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs, half rhs)
 
constexpr METAL_FUNC bool operator<= (half lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs, int32_t rhs)
 
constexpr METAL_FUNC bool operator<= (int32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs, uint32_t rhs)
 
constexpr METAL_FUNC bool operator<= (uint32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs, int64_t rhs)
 
constexpr METAL_FUNC bool operator<= (int64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs, uint64_t rhs)
 
constexpr METAL_FUNC bool operator<= (uint64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs, float rhs)
 
constexpr METAL_FUNC bool operator== (float lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs, half rhs)
 
constexpr METAL_FUNC bool operator== (half lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs, int32_t rhs)
 
constexpr METAL_FUNC bool operator== (int32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs, uint32_t rhs)
 
constexpr METAL_FUNC bool operator== (uint32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs, int64_t rhs)
 
constexpr METAL_FUNC bool operator== (int64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs, uint64_t rhs)
 
constexpr METAL_FUNC bool operator== (uint64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs, float rhs)
 
constexpr METAL_FUNC bool operator!= (float lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs, half rhs)
 
constexpr METAL_FUNC bool operator!= (half lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs, int32_t rhs)
 
constexpr METAL_FUNC bool operator!= (int32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs, uint32_t rhs)
 
constexpr METAL_FUNC bool operator!= (uint32_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs, int64_t rhs)
 
constexpr METAL_FUNC bool operator!= (int64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs, uint64_t rhs)
 
constexpr METAL_FUNC bool operator!= (uint64_t lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator+= (device _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC device float & operator+= (device float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator+= (thread _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC thread float & operator+= (thread float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator+= (threadgroup _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC threadgroup float & operator+= (threadgroup float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator-= (device _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC device float & operator-= (device float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator-= (thread _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC thread float & operator-= (thread float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator-= (threadgroup _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC threadgroup float & operator-= (threadgroup float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator*= (device _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC device float & operator*= (device float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator*= (thread _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC thread float & operator*= (thread float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator*= (threadgroup _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC threadgroup float & operator*= (threadgroup float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator/= (device _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC device float & operator/= (device float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator/= (thread _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC thread float & operator/= (thread float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator/= (threadgroup _MLX_BFloat16 &lhs, float rhs)
 
constexpr METAL_FUNC threadgroup float & operator/= (threadgroup float &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator+= (device _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC device half & operator+= (device half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator+= (thread _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC thread half & operator+= (thread half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator+= (threadgroup _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC threadgroup half & operator+= (threadgroup half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator-= (device _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC device half & operator-= (device half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator-= (thread _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC thread half & operator-= (thread half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator-= (threadgroup _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC threadgroup half & operator-= (threadgroup half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator*= (device _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC device half & operator*= (device half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator*= (thread _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC thread half & operator*= (thread half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator*= (threadgroup _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC threadgroup half & operator*= (threadgroup half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator/= (device _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC device half & operator/= (device half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator/= (thread _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC thread half & operator/= (thread half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator/= (threadgroup _MLX_BFloat16 &lhs, half rhs)
 
constexpr METAL_FUNC threadgroup half & operator/= (threadgroup half &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator+= (device _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC device int16_t & operator+= (device int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator+= (thread _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC thread int16_t & operator+= (thread int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator+= (threadgroup _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC threadgroup int16_t & operator+= (threadgroup int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator-= (device _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC device int16_t & operator-= (device int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator-= (thread _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC thread int16_t & operator-= (thread int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator-= (threadgroup _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC threadgroup int16_t & operator-= (threadgroup int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator*= (device _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC device int16_t & operator*= (device int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator*= (thread _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC thread int16_t & operator*= (thread int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator*= (threadgroup _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC threadgroup int16_t & operator*= (threadgroup int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator/= (device _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC device int16_t & operator/= (device int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator/= (thread _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC thread int16_t & operator/= (thread int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator/= (threadgroup _MLX_BFloat16 &lhs, int16_t rhs)
 
constexpr METAL_FUNC threadgroup int16_t & operator/= (threadgroup int16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator+= (device _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC device int32_t & operator+= (device int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator+= (thread _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC thread int32_t & operator+= (thread int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator+= (threadgroup _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC threadgroup int32_t & operator+= (threadgroup int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator-= (device _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC device int32_t & operator-= (device int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator-= (thread _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC thread int32_t & operator-= (thread int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator-= (threadgroup _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC threadgroup int32_t & operator-= (threadgroup int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator*= (device _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC device int32_t & operator*= (device int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator*= (thread _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC thread int32_t & operator*= (thread int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator*= (threadgroup _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC threadgroup int32_t & operator*= (threadgroup int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator/= (device _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC device int32_t & operator/= (device int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator/= (thread _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC thread int32_t & operator/= (thread int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator/= (threadgroup _MLX_BFloat16 &lhs, int32_t rhs)
 
constexpr METAL_FUNC threadgroup int32_t & operator/= (threadgroup int32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator+= (device _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC device int64_t & operator+= (device int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator+= (thread _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC thread int64_t & operator+= (thread int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator+= (threadgroup _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC threadgroup int64_t & operator+= (threadgroup int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator-= (device _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC device int64_t & operator-= (device int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator-= (thread _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC thread int64_t & operator-= (thread int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator-= (threadgroup _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC threadgroup int64_t & operator-= (threadgroup int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator*= (device _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC device int64_t & operator*= (device int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator*= (thread _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC thread int64_t & operator*= (thread int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator*= (threadgroup _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC threadgroup int64_t & operator*= (threadgroup int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator/= (device _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC device int64_t & operator/= (device int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator/= (thread _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC thread int64_t & operator/= (thread int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator/= (threadgroup _MLX_BFloat16 &lhs, int64_t rhs)
 
constexpr METAL_FUNC threadgroup int64_t & operator/= (threadgroup int64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator+= (device _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC device uint16_t & operator+= (device uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator+= (thread _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC thread uint16_t & operator+= (thread uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator+= (threadgroup _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC threadgroup uint16_t & operator+= (threadgroup uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator-= (device _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC device uint16_t & operator-= (device uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator-= (thread _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC thread uint16_t & operator-= (thread uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator-= (threadgroup _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC threadgroup uint16_t & operator-= (threadgroup uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator*= (device _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC device uint16_t & operator*= (device uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator*= (thread _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC thread uint16_t & operator*= (thread uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator*= (threadgroup _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC threadgroup uint16_t & operator*= (threadgroup uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator/= (device _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC device uint16_t & operator/= (device uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator/= (thread _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC thread uint16_t & operator/= (thread uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator/= (threadgroup _MLX_BFloat16 &lhs, uint16_t rhs)
 
constexpr METAL_FUNC threadgroup uint16_t & operator/= (threadgroup uint16_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator+= (device _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC device uint32_t & operator+= (device uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator+= (thread _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC thread uint32_t & operator+= (thread uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator+= (threadgroup _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC threadgroup uint32_t & operator+= (threadgroup uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator-= (device _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC device uint32_t & operator-= (device uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator-= (thread _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC thread uint32_t & operator-= (thread uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator-= (threadgroup _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC threadgroup uint32_t & operator-= (threadgroup uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator*= (device _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC device uint32_t & operator*= (device uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator*= (thread _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC thread uint32_t & operator*= (thread uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator*= (threadgroup _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC threadgroup uint32_t & operator*= (threadgroup uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator/= (device _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC device uint32_t & operator/= (device uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator/= (thread _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC thread uint32_t & operator/= (thread uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator/= (threadgroup _MLX_BFloat16 &lhs, uint32_t rhs)
 
constexpr METAL_FUNC threadgroup uint32_t & operator/= (threadgroup uint32_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator+= (device _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC device uint64_t & operator+= (device uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator+= (thread _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC thread uint64_t & operator+= (thread uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator+= (threadgroup _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC threadgroup uint64_t & operator+= (threadgroup uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator-= (device _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC device uint64_t & operator-= (device uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator-= (thread _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC thread uint64_t & operator-= (thread uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator-= (threadgroup _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC threadgroup uint64_t & operator-= (threadgroup uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator*= (device _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC device uint64_t & operator*= (device uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator*= (thread _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC thread uint64_t & operator*= (thread uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator*= (threadgroup _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC threadgroup uint64_t & operator*= (threadgroup uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator/= (device _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC device uint64_t & operator/= (device uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator/= (thread _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC thread uint64_t & operator/= (thread uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator/= (threadgroup _MLX_BFloat16 &lhs, uint64_t rhs)
 
constexpr METAL_FUNC threadgroup uint64_t & operator/= (threadgroup uint64_t &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator+= (device _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator+= (thread _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator+= (threadgroup _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator-= (device _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator-= (thread _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator-= (threadgroup _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator*= (device _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator*= (thread _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator*= (threadgroup _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC device _MLX_BFloat16operator/= (device _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC thread _MLX_BFloat16operator/= (thread _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
constexpr METAL_FUNC threadgroup _MLX_BFloat16operator/= (threadgroup _MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
 
METAL_FUNC bool metal::isnan (_MLX_BFloat16 x)
 
- - - - - - - -

-Variables

template<typename T >
static constexpr constant bool can_convert_to_bfloat
 
template<typename T >
static constexpr constant bool can_convert_from_bfloat
 
-

Macro Definition Documentation

- -

◆ bfloat_binop

- -
-
- - - - - - - - - - - -
#define bfloat_binop( _op_,
_operator_ )
-
-Value:
-
_op_, _operator_, _MLX_BFloat16, _MLX_BFloat16, _MLX_BFloat16, float); \
-
bfloat_binop_helper(_op_, _operator_, float, float, float); \
-
bfloat_binop_helper(_op_, _operator_, float, half, float); \
-
bfloat_binop_helper(_op_, _operator_, _MLX_BFloat16, int32_t, float); \
-
bfloat_binop_helper(_op_, _operator_, _MLX_BFloat16, uint32_t, float); \
-
bfloat_binop_helper(_op_, _operator_, _MLX_BFloat16, int64_t, float); \
-
bfloat_binop_helper(_op_, _operator_, _MLX_BFloat16, uint64_t, float);
-
#define bfloat_binop_base(__op__, __operator__, otype, atype, btype, ctype)
Definition bf16.h:141
-
Definition bf16.h:54
-
-
-
- -

◆ bfloat_binop_base

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define bfloat_binop_base( __op__,
__operator__,
otype,
atype,
btype,
ctype )
-
-Value:
constexpr METAL_FUNC otype __operator__(atype lhs, btype rhs) { \
-
return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
-
}
-
-
-
- -

◆ bfloat_binop_helper

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#define bfloat_binop_helper( __op__,
__operator__,
otype,
itype,
ctype )
-
-Value:
constexpr METAL_FUNC otype __operator__(_MLX_BFloat16 lhs, itype rhs) { \
-
return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
-
} \
-
constexpr METAL_FUNC otype __operator__(itype lhs, _MLX_BFloat16 rhs) { \
-
return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
-
}
-
-
-
- -

◆ bfloat_compop

- -
-
- - - - - - - - - - - -
#define bfloat_compop( __op__,
__operator__ )
-
-Value:
-
__op__, __operator__, bool, _MLX_BFloat16, _MLX_BFloat16, float); \
-
bfloat_binop_helper(__op__, __operator__, bool, float, float); \
-
bfloat_binop_helper(__op__, __operator__, bool, half, float); \
-
bfloat_binop_helper(__op__, __operator__, bool, int32_t, float); \
-
bfloat_binop_helper(__op__, __operator__, bool, uint32_t, float); \
-
bfloat_binop_helper(__op__, __operator__, bool, int64_t, float); \
-
bfloat_binop_helper(__op__, __operator__, bool, uint64_t, float);
-
-
-
- -

◆ bfloat_inplace_op

- -
-
- - - - - - - -
#define bfloat_inplace_op( itype)
-
-Value:
bfloat_inplace_op_addr_space_helper(+, operator+=, itype); \
-
bfloat_inplace_op_addr_space_helper(-, operator-=, itype); \
-
bfloat_inplace_op_addr_space_helper(*, operator*=, itype); \
-
bfloat_inplace_op_addr_space_helper(/, operator/=, itype);
-
#define bfloat_inplace_op_addr_space_helper(__op__, __operator__, itype)
Definition bf16.h:209
-
-
-
- -

◆ bfloat_inplace_op_addr_space_helper [1/2]

- -
-
- - - - - - - - - - - -
#define bfloat_inplace_op_addr_space_helper( __op__,
__operator__ )
-
-Value:
bfloat_inplace_op_helper(__op__, __operator__, device); \
-
bfloat_inplace_op_helper(__op__, __operator__, thread); \
-
bfloat_inplace_op_helper(__op__, __operator__, threadgroup);
-
#define bfloat_inplace_op_helper(__op__, __operator__, itype, addr_space)
Definition bf16.h:197
-
-
-
- -

◆ bfloat_inplace_op_addr_space_helper [2/2]

- -
-
- - - - - - - - - - - - - - - - -
#define bfloat_inplace_op_addr_space_helper( __op__,
__operator__,
itype )
-
-Value:
bfloat_inplace_op_helper(__op__, __operator__, itype, device); \
-
bfloat_inplace_op_helper(__op__, __operator__, itype, thread); \
-
bfloat_inplace_op_helper(__op__, __operator__, itype, threadgroup);
-
-
-
- -

◆ bfloat_inplace_op_helper [1/2]

- -
-
- - - - - - - - - - - - - - - - -
#define bfloat_inplace_op_helper( __op__,
__operator__,
addr_space )
-
-Value:
constexpr METAL_FUNC addr_space _MLX_BFloat16& __operator__( \
-
addr_space _MLX_BFloat16& lhs, _MLX_BFloat16 rhs) { \
-
lhs = static_cast<float>(lhs) __op__ static_cast<float>(rhs); \
-
return lhs; \
-
}
-
-
-
- -

◆ bfloat_inplace_op_helper [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - -
#define bfloat_inplace_op_helper( __op__,
__operator__,
itype,
addr_space )
-
-Value:
constexpr METAL_FUNC addr_space _MLX_BFloat16& __operator__( \
-
addr_space _MLX_BFloat16& lhs, itype rhs) { \
-
lhs = static_cast<float>(lhs) __op__ static_cast<float>(rhs); \
-
return lhs; \
-
} \
-
constexpr METAL_FUNC addr_space itype& __operator__( \
-
addr_space itype& lhs, _MLX_BFloat16 rhs) { \
-
lhs = static_cast<float>(lhs) __op__ static_cast<float>(rhs); \
-
return lhs; \
-
}
-
-
-
-

Typedef Documentation

- -

◆ bfloat16_t

- -
-
- - - - -
typedef struct _MLX_BFloat16 bfloat16_t
-
- -
-
-

Function Documentation

- -

◆ bfloat_bits_to_float()

- -
-
- - - - - -
- - - - - - - -
constexpr METAL_FUNC float bfloat_bits_to_float (uint16_t x)
-
-constexpr
-
- -
-
- -

◆ float_to_bfloat_bits()

- -
-
- - - - - -
- - - - - - - -
constexpr METAL_FUNC uint16_t float_to_bfloat_bits (float x)
-
-constexpr
-
- -
-
- -

◆ operator!=() [1/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [2/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [3/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [4/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [5/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [6/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [7/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (_MLX_BFloat16 lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [8/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (float lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [9/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (half lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [10/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (int32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [11/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (int64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [12/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (uint32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator!=() [13/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator!= (uint64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [1/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator* (_MLX_BFloat16 lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [2/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator* (_MLX_BFloat16 lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [3/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator* (_MLX_BFloat16 lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [4/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator* (_MLX_BFloat16 lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [5/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator* (_MLX_BFloat16 lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [6/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator* (_MLX_BFloat16 lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [7/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator* (_MLX_BFloat16 lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [8/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator* (float lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [9/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator* (half lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [10/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator* (int32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [11/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator* (int64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [12/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator* (uint32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*() [13/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator* (uint64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [1/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator*= (device _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [2/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator*= (device _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [3/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator*= (device _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [4/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator*= (device _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [5/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator*= (device _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [6/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator*= (device _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [7/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator*= (device _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [8/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator*= (device _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [9/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator*= (device _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [10/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device float & operator*= (device float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [11/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device half & operator*= (device half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [12/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int16_t & operator*= (device int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [13/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int32_t & operator*= (device int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [14/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int64_t & operator*= (device int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [15/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint16_t & operator*= (device uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [16/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint32_t & operator*= (device uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [17/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint64_t & operator*= (device uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [18/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator*= (thread _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [19/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator*= (thread _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [20/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator*= (thread _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [21/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator*= (thread _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [22/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator*= (thread _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [23/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator*= (thread _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [24/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator*= (thread _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [25/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator*= (thread _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [26/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator*= (thread _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [27/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread float & operator*= (thread float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [28/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread half & operator*= (thread half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [29/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int16_t & operator*= (thread int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [30/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int32_t & operator*= (thread int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [31/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int64_t & operator*= (thread int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [32/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint16_t & operator*= (thread uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [33/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint32_t & operator*= (thread uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [34/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint64_t & operator*= (thread uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [35/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator*= (threadgroup _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [36/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator*= (threadgroup _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [37/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator*= (threadgroup _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [38/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator*= (threadgroup _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [39/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator*= (threadgroup _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [40/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator*= (threadgroup _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [41/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator*= (threadgroup _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [42/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator*= (threadgroup _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [43/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator*= (threadgroup _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [44/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup float & operator*= (threadgroup float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [45/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup half & operator*= (threadgroup half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [46/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int16_t & operator*= (threadgroup int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [47/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int32_t & operator*= (threadgroup int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [48/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int64_t & operator*= (threadgroup int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [49/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint16_t & operator*= (threadgroup uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [50/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint32_t & operator*= (threadgroup uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator*=() [51/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint64_t & operator*= (threadgroup uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [1/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [2/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator+ (_MLX_BFloat16 lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [3/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator+ (_MLX_BFloat16 lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [4/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [5/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [6/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [7/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [8/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator+ (float lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [9/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator+ (half lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [10/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator+ (int32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [11/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator+ (int64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [12/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator+ (uint32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+() [13/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator+ (uint64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [1/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator+= (device _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [2/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator+= (device _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [3/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator+= (device _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [4/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator+= (device _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [5/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator+= (device _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [6/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator+= (device _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [7/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator+= (device _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [8/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator+= (device _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [9/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator+= (device _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [10/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device float & operator+= (device float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [11/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device half & operator+= (device half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [12/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int16_t & operator+= (device int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [13/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int32_t & operator+= (device int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [14/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int64_t & operator+= (device int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [15/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint16_t & operator+= (device uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [16/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint32_t & operator+= (device uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [17/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint64_t & operator+= (device uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [18/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator+= (thread _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [19/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator+= (thread _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [20/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator+= (thread _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [21/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator+= (thread _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [22/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator+= (thread _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [23/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator+= (thread _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [24/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator+= (thread _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [25/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator+= (thread _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [26/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator+= (thread _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [27/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread float & operator+= (thread float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [28/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread half & operator+= (thread half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [29/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int16_t & operator+= (thread int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [30/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int32_t & operator+= (thread int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [31/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int64_t & operator+= (thread int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [32/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint16_t & operator+= (thread uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [33/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint32_t & operator+= (thread uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [34/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint64_t & operator+= (thread uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [35/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator+= (threadgroup _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [36/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator+= (threadgroup _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [37/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator+= (threadgroup _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [38/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator+= (threadgroup _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [39/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator+= (threadgroup _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [40/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator+= (threadgroup _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [41/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator+= (threadgroup _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [42/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator+= (threadgroup _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [43/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator+= (threadgroup _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [44/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup float & operator+= (threadgroup float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [45/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup half & operator+= (threadgroup half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [46/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int16_t & operator+= (threadgroup int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [47/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int32_t & operator+= (threadgroup int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [48/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int64_t & operator+= (threadgroup int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [49/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint16_t & operator+= (threadgroup uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [50/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint32_t & operator+= (threadgroup uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator+=() [51/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint64_t & operator+= (threadgroup uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [1/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [2/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator- (_MLX_BFloat16 lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [3/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator- (_MLX_BFloat16 lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [4/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [5/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [6/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [7/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [8/14]

- -
-
- - - - - -
- - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator- (_MLX_BFloat16 x)
-
-constexpr
-
- -
-
- -

◆ operator-() [9/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator- (float lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [10/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator- (half lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [11/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator- (int32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [12/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator- (int64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [13/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator- (uint32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-() [14/14]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator- (uint64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [1/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator-= (device _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [2/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator-= (device _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [3/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator-= (device _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [4/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator-= (device _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [5/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator-= (device _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [6/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator-= (device _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [7/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator-= (device _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [8/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator-= (device _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [9/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator-= (device _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [10/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device float & operator-= (device float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [11/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device half & operator-= (device half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [12/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int16_t & operator-= (device int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [13/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int32_t & operator-= (device int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [14/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int64_t & operator-= (device int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [15/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint16_t & operator-= (device uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [16/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint32_t & operator-= (device uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [17/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint64_t & operator-= (device uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [18/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator-= (thread _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [19/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator-= (thread _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [20/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator-= (thread _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [21/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator-= (thread _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [22/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator-= (thread _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [23/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator-= (thread _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [24/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator-= (thread _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [25/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator-= (thread _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [26/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator-= (thread _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [27/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread float & operator-= (thread float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [28/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread half & operator-= (thread half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [29/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int16_t & operator-= (thread int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [30/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int32_t & operator-= (thread int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [31/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int64_t & operator-= (thread int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [32/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint16_t & operator-= (thread uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [33/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint32_t & operator-= (thread uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [34/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint64_t & operator-= (thread uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [35/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator-= (threadgroup _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [36/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator-= (threadgroup _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [37/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator-= (threadgroup _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [38/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator-= (threadgroup _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [39/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator-= (threadgroup _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [40/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator-= (threadgroup _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [41/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator-= (threadgroup _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [42/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator-= (threadgroup _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [43/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator-= (threadgroup _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [44/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup float & operator-= (threadgroup float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [45/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup half & operator-= (threadgroup half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [46/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int16_t & operator-= (threadgroup int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [47/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int32_t & operator-= (threadgroup int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [48/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int64_t & operator-= (threadgroup int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [49/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint16_t & operator-= (threadgroup uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [50/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint32_t & operator-= (threadgroup uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator-=() [51/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint64_t & operator-= (threadgroup uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [1/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [2/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator/ (_MLX_BFloat16 lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [3/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator/ (_MLX_BFloat16 lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [4/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [5/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [6/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [7/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [8/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator/ (float lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [9/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC float operator/ (half lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [10/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator/ (int32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [11/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator/ (int64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [12/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator/ (uint32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/() [13/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC _MLX_BFloat16 operator/ (uint64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [1/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator/= (device _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [2/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator/= (device _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [3/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator/= (device _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [4/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator/= (device _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [5/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator/= (device _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [6/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator/= (device _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [7/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator/= (device _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [8/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator/= (device _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [9/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device _MLX_BFloat16 & operator/= (device _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [10/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device float & operator/= (device float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [11/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device half & operator/= (device half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [12/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int16_t & operator/= (device int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [13/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int32_t & operator/= (device int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [14/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device int64_t & operator/= (device int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [15/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint16_t & operator/= (device uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [16/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint32_t & operator/= (device uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [17/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC device uint64_t & operator/= (device uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [18/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator/= (thread _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [19/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator/= (thread _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [20/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator/= (thread _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [21/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator/= (thread _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [22/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator/= (thread _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [23/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator/= (thread _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [24/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator/= (thread _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [25/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator/= (thread _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [26/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread _MLX_BFloat16 & operator/= (thread _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [27/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread float & operator/= (thread float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [28/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread half & operator/= (thread half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [29/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int16_t & operator/= (thread int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [30/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int32_t & operator/= (thread int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [31/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread int64_t & operator/= (thread int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [32/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint16_t & operator/= (thread uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [33/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint32_t & operator/= (thread uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [34/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC thread uint64_t & operator/= (thread uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [35/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator/= (threadgroup _MLX_BFloat16 & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [36/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator/= (threadgroup _MLX_BFloat16 & lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [37/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator/= (threadgroup _MLX_BFloat16 & lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [38/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator/= (threadgroup _MLX_BFloat16 & lhs,
int16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [39/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator/= (threadgroup _MLX_BFloat16 & lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [40/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator/= (threadgroup _MLX_BFloat16 & lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [41/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator/= (threadgroup _MLX_BFloat16 & lhs,
uint16_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [42/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator/= (threadgroup _MLX_BFloat16 & lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [43/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup _MLX_BFloat16 & operator/= (threadgroup _MLX_BFloat16 & lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [44/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup float & operator/= (threadgroup float & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [45/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup half & operator/= (threadgroup half & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [46/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int16_t & operator/= (threadgroup int16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [47/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int32_t & operator/= (threadgroup int32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [48/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup int64_t & operator/= (threadgroup int64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [49/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint16_t & operator/= (threadgroup uint16_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [50/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint32_t & operator/= (threadgroup uint32_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator/=() [51/51]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC threadgroup uint64_t & operator/= (threadgroup uint64_t & lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [1/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [2/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [3/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [4/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [5/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [6/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [7/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (_MLX_BFloat16 lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [8/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (float lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [9/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (half lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [10/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (int32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [11/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (int64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [12/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (uint32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<() [13/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator< (uint64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [1/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [2/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [3/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [4/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [5/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [6/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [7/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (_MLX_BFloat16 lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [8/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (float lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [9/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (half lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [10/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (int32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [11/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (int64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [12/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (uint32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator<=() [13/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator<= (uint64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [1/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [2/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [3/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [4/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [5/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [6/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [7/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (_MLX_BFloat16 lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [8/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (float lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [9/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (half lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [10/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (int32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [11/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (int64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [12/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (uint32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator==() [13/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator== (uint64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [1/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [2/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [3/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [4/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [5/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [6/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [7/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (_MLX_BFloat16 lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [8/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (float lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [9/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (half lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [10/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (int32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [11/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (int64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [12/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (uint32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>() [13/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator> (uint64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [1/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [2/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs,
float rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [3/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs,
half rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [4/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs,
int32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [5/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs,
int64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [6/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs,
uint32_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [7/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (_MLX_BFloat16 lhs,
uint64_t rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [8/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (float lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [9/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (half lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [10/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (int32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [11/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (int64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [12/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (uint32_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
- -

◆ operator>=() [13/13]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr METAL_FUNC bool operator>= (uint64_t lhs,
_MLX_BFloat16 rhs )
-
-constexpr
-
- -
-
-

Variable Documentation

- -

◆ can_convert_from_bfloat

- -
-
-
-template<typename T >
- - - - - -
- - - - -
constexpr constant bool can_convert_from_bfloat
-
-staticconstexpr
-
-Initial value:
=
-
!is_same_v<T, _MLX_BFloat16> && is_convertible_v<float, T>
-
-
-
- -

◆ can_convert_to_bfloat

- -
-
-
-template<typename T >
- - - - - -
- - - - -
constexpr constant bool can_convert_to_bfloat
-
-staticconstexpr
-
-Initial value:
=
-
!is_same_v<T, _MLX_BFloat16> && is_convertible_v<T, float>
-
-
-
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2bf16_8h_source.html b/docs/build/html/backend_2metal_2kernels_2bf16_8h_source.html deleted file mode 100644 index a266656b8..000000000 --- a/docs/build/html/backend_2metal_2kernels_2bf16_8h_source.html +++ /dev/null @@ -1,489 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/bf16.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
bf16.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <metal_stdlib>
-
6
-
7using namespace metal;
-
8
-
9#if defined METAL_3_1 || (__METAL_VERSION__ >= 310)
-
10
-
11typedef bfloat bfloat16_t;
-
12
-
13#else
-
14
-
16// Helpers
-
18
-
-
19constexpr METAL_FUNC uint16_t float_to_bfloat_bits(float x) {
-
20 // Check for nan
-
21 if ((as_type<uint32_t>(x) & ~_fp_encoding_traits<float>::sign_mask) >
-
22 _fp_encoding_traits<float>::inf_mask) {
-
23 return uint16_t(as_type<uint32_t>(0x7FC0));
-
24 }
-
25 // Take bits
-
26 uint32_t float_bits = as_type<uint32_t>(x);
-
27
-
28 // Round to nearest even
-
29 float_bits += ((float_bits >> 16) & 1) + as_type<uint32_t>(0x7FFF);
-
30
-
31 // Take upper 16 bits
-
32 return float_bits >> 16;
-
33}
-
-
34
-
-
35constexpr METAL_FUNC float bfloat_bits_to_float(uint16_t x) {
-
36 // Upper 16 bits are the data and lower 16 bits are 0s
-
37 return as_type<float>((uint32_t)x << 16);
-
38}
-
-
39
-
40struct _MLX_BFloat16;
-
41
-
42template <typename T>
-
43static constexpr constant bool can_convert_to_bfloat =
-
44 !is_same_v<T, _MLX_BFloat16> && is_convertible_v<T, float>;
-
45
-
46template <typename T>
-
47static constexpr constant bool can_convert_from_bfloat =
-
48 !is_same_v<T, _MLX_BFloat16> && is_convertible_v<float, T>;
-
49
-
51// Bfloat struct
-
53
-
- -
56 // Constructors
-
57 uint16_t bits_;
-
58 _MLX_BFloat16() thread = default;
-
59 _MLX_BFloat16() threadgroup = default;
-
60 _MLX_BFloat16() device = default;
-
61 _MLX_BFloat16() constant = default;
-
62
- -
-
64 static constexpr METAL_FUNC bits_to_bfloat_struct bits_to_bfloat() {
-
65 return bits_to_bfloat_struct();
-
66 }
-
-
-
67 constexpr METAL_FUNC _MLX_BFloat16(uint16_t bits, bits_to_bfloat_struct)
-
68 : bits_(bits) {}
-
-
69
-
71 // Conversions to bfloat
-
72
-
73 template <
-
74 typename T,
-
75 typename = typename enable_if<can_convert_to_bfloat<T>>::type>
-
-
76 constexpr METAL_FUNC _MLX_BFloat16(T x) thread
-
77 : bits_(float_to_bfloat_bits(static_cast<float>(x))) {}
-
-
78
-
79 template <
-
80 typename T,
-
81 typename = typename enable_if<can_convert_to_bfloat<T>>::type>
-
-
82 constexpr METAL_FUNC _MLX_BFloat16(T x) threadgroup
-
83 : bits_(float_to_bfloat_bits(static_cast<float>(x))) {}
-
-
84
-
85 template <
-
86 typename T,
-
87 typename = typename enable_if<can_convert_to_bfloat<T>>::type>
-
-
88 constexpr METAL_FUNC _MLX_BFloat16(T x) device
-
89 : bits_(float_to_bfloat_bits(static_cast<float>(x))) {}
-
-
90
-
91 template <
-
92 typename T,
-
93 typename = typename enable_if<can_convert_to_bfloat<T>>::type>
-
-
94 constexpr METAL_FUNC _MLX_BFloat16(T x) constant
-
95 : bits_(float_to_bfloat_bits(static_cast<float>(x))) {}
-
-
96
-
98 // Conversions from bfloat
-
99
-
100 template <
-
101 typename T,
-
102 typename = typename enable_if<can_convert_from_bfloat<T>>::type>
-
-
103 constexpr METAL_FUNC operator T() const thread {
-
104 return static_cast<T>(bfloat_bits_to_float(bits_));
-
105 }
-
-
106
-
107 template <
-
108 typename T,
-
109 typename = typename enable_if<can_convert_from_bfloat<T>>::type>
-
-
110 constexpr METAL_FUNC operator T() const threadgroup {
-
111 return static_cast<T>(bfloat_bits_to_float(bits_));
-
112 }
-
-
113
-
114 template <
-
115 typename T,
-
116 typename = typename enable_if<can_convert_from_bfloat<T>>::type>
-
-
117 constexpr METAL_FUNC operator T() const device {
-
118 return static_cast<T>(bfloat_bits_to_float(bits_));
-
119 }
-
-
120
-
121 template <
-
122 typename T,
-
123 typename = typename enable_if<can_convert_from_bfloat<T>>::type>
-
-
124 constexpr METAL_FUNC operator T() const constant {
-
125 return static_cast<T>(bfloat_bits_to_float(bits_));
-
126 }
-
-
127};
-
-
128
-
130// Bfloat operators
-
132
-
134// Unary ops
-
-
135constexpr METAL_FUNC _MLX_BFloat16 operator-(_MLX_BFloat16 x) {
-
136 return -static_cast<float>(x);
-
137}
-
-
138
-
140// Binary operators
-
-
141#define bfloat_binop_base(__op__, __operator__, otype, atype, btype, ctype) \
-
142 constexpr METAL_FUNC otype __operator__(atype lhs, btype rhs) { \
-
143 return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
-
144 }
-
-
145
-
-
146#define bfloat_binop_helper(__op__, __operator__, otype, itype, ctype) \
-
147 constexpr METAL_FUNC otype __operator__(_MLX_BFloat16 lhs, itype rhs) { \
-
148 return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
-
149 } \
-
150 constexpr METAL_FUNC otype __operator__(itype lhs, _MLX_BFloat16 rhs) { \
-
151 return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
-
152 }
-
-
153
-
155// Arithmetic Operators
-
-
156#define bfloat_binop(_op_, _operator_) \
-
157 bfloat_binop_base( \
-
158 _op_, _operator_, _MLX_BFloat16, _MLX_BFloat16, _MLX_BFloat16, float); \
-
159 bfloat_binop_helper(_op_, _operator_, float, float, float); \
-
160 bfloat_binop_helper(_op_, _operator_, float, half, float); \
-
161 bfloat_binop_helper(_op_, _operator_, _MLX_BFloat16, int32_t, float); \
-
162 bfloat_binop_helper(_op_, _operator_, _MLX_BFloat16, uint32_t, float); \
-
163 bfloat_binop_helper(_op_, _operator_, _MLX_BFloat16, int64_t, float); \
-
164 bfloat_binop_helper(_op_, _operator_, _MLX_BFloat16, uint64_t, float);
-
-
165
-
166bfloat_binop(+, operator+);
-
167bfloat_binop(-, operator-);
-
168bfloat_binop(*, operator*);
-
169bfloat_binop(/, operator/);
-
170
-
172// Comparison ops
-
-
173#define bfloat_compop(__op__, __operator__) \
-
174 bfloat_binop_base( \
-
175 __op__, __operator__, bool, _MLX_BFloat16, _MLX_BFloat16, float); \
-
176 bfloat_binop_helper(__op__, __operator__, bool, float, float); \
-
177 bfloat_binop_helper(__op__, __operator__, bool, half, float); \
-
178 bfloat_binop_helper(__op__, __operator__, bool, int32_t, float); \
-
179 bfloat_binop_helper(__op__, __operator__, bool, uint32_t, float); \
-
180 bfloat_binop_helper(__op__, __operator__, bool, int64_t, float); \
-
181 bfloat_binop_helper(__op__, __operator__, bool, uint64_t, float);
-
-
182
-
183bfloat_compop(>, operator>);
-
184bfloat_compop(<, operator<);
-
185bfloat_compop(>=, operator>=);
-
186bfloat_compop(<=, operator<=);
-
187bfloat_compop(==, operator==);
-
188bfloat_compop(!=, operator!=);
-
189
-
190#undef bfloat_compop
-
191#undef bfloat_binop_base
-
192#undef bfloat_binop_helper
-
193#undef bfloat_binop
-
194
-
196// Inplace Operators
-
-
197#define bfloat_inplace_op_helper(__op__, __operator__, itype, addr_space) \
-
198 constexpr METAL_FUNC addr_space _MLX_BFloat16& __operator__( \
-
199 addr_space _MLX_BFloat16& lhs, itype rhs) { \
-
200 lhs = static_cast<float>(lhs) __op__ static_cast<float>(rhs); \
-
201 return lhs; \
-
202 } \
-
203 constexpr METAL_FUNC addr_space itype& __operator__( \
-
204 addr_space itype& lhs, _MLX_BFloat16 rhs) { \
-
205 lhs = static_cast<float>(lhs) __op__ static_cast<float>(rhs); \
-
206 return lhs; \
-
207 }
-
-
208
-
-
209#define bfloat_inplace_op_addr_space_helper(__op__, __operator__, itype) \
-
210 bfloat_inplace_op_helper(__op__, __operator__, itype, device); \
-
211 bfloat_inplace_op_helper(__op__, __operator__, itype, thread); \
-
212 bfloat_inplace_op_helper(__op__, __operator__, itype, threadgroup);
-
-
213
-
-
214#define bfloat_inplace_op(itype) \
-
215 bfloat_inplace_op_addr_space_helper(+, operator+=, itype); \
-
216 bfloat_inplace_op_addr_space_helper(-, operator-=, itype); \
-
217 bfloat_inplace_op_addr_space_helper(*, operator*=, itype); \
-
218 bfloat_inplace_op_addr_space_helper(/, operator/=, itype);
-
-
219
- - - - - - - - -
228
-
229#undef bfloat_inplace_op_helper
-
230#undef bfloat_inplace_op_addr_space_helper
-
231#undef bfloat_inplace_op
-
232
-
233#define bfloat_inplace_op_helper(__op__, __operator__, addr_space) \
-
234 constexpr METAL_FUNC addr_space _MLX_BFloat16& __operator__( \
-
235 addr_space _MLX_BFloat16& lhs, _MLX_BFloat16 rhs) { \
-
236 lhs = static_cast<float>(lhs) __op__ static_cast<float>(rhs); \
-
237 return lhs; \
-
238 }
-
239
-
240#define bfloat_inplace_op_addr_space_helper(__op__, __operator__) \
-
241 bfloat_inplace_op_helper(__op__, __operator__, device); \
-
242 bfloat_inplace_op_helper(__op__, __operator__, thread); \
-
243 bfloat_inplace_op_helper(__op__, __operator__, threadgroup);
-
244
- - - - -
249
-
250#undef bfloat_inplace_op_helper
-
251#undef bfloat_inplace_op_addr_space_helper
-
252
-
254// Bfloat typedef
-
256
- -
258
-
260// Bfloat numeric limits
-
262
-
263#pragma METAL internals : enable
-
264
-
-
265namespace metal {
-
266
-
267template <>
-
-
268struct _numeric_limits_impl<bfloat16_t> : _fp_numeric_limits_impl_base {
-
269 static constexpr constant int digits = 8;
-
270 static constexpr constant int digits10 = 2;
-
271 static constexpr constant int max_digits10 = 4;
-
272 static constexpr constant int radix = 2;
-
273 static constexpr constant int min_exponent = -125;
-
274 static constexpr constant int min_exponent10 = -37;
-
275 static constexpr constant int max_exponent = 128;
-
276 static constexpr constant int max_exponent10 = 38;
-
277
-
-
278 static constexpr bfloat16_t min() {
- -
280 }
-
-
-
281 static constexpr bfloat16_t lowest() {
- -
283 }
-
-
-
284 static constexpr bfloat16_t max() {
- -
286 }
-
-
-
287 static constexpr bfloat16_t epsilon() {
- -
289 }
-
-
-
290 static constexpr bfloat16_t round_error() {
- -
292 }
-
-
-
293 static constexpr bfloat16_t infinity() {
- -
295 }
-
-
-
296 static constexpr bfloat16_t quiet_NaN() {
- -
298 }
-
-
-
299 static constexpr bfloat16_t signaling_NaN() {
- -
301 }
-
-
-
302 static constexpr bfloat16_t denorm_min() {
- -
304 }
-
-
305};
-
-
306
-
-
307METAL_FUNC bool isnan(_MLX_BFloat16 x) {
-
308 return x != x;
-
309}
-
-
310
-
311} // namespace metal
-
-
312
-
313#pragma METAL internals : disable
-
314
-
315#endif
-
316
- -
constexpr METAL_FUNC uint16_t float_to_bfloat_bits(float x)
Definition bf16.h:19
-
#define bfloat_compop(__op__, __operator__)
Definition bf16.h:173
-
constexpr METAL_FUNC float bfloat_bits_to_float(uint16_t x)
Definition bf16.h:35
-
#define bfloat_inplace_op(itype)
Definition bf16.h:214
-
constexpr METAL_FUNC _MLX_BFloat16 operator-(_MLX_BFloat16 x)
Definition bf16.h:135
-
#define bfloat_binop(_op_, _operator_)
Definition bf16.h:156
-
struct _MLX_BFloat16 bfloat16_t
Definition bf16.h:257
-
static constexpr constant bool can_convert_from_bfloat
Definition bf16.h:47
-
static constexpr constant bool can_convert_to_bfloat
Definition bf16.h:43
-
#define bfloat_inplace_op_addr_space_helper(__op__, __operator__, itype)
Definition bf16.h:209
- -
Definition bf16.h:265
-
METAL_FUNC bool isnan(_MLX_BFloat16 x)
Definition bf16.h:307
- -
Definition bf16.h:54
-
constexpr METAL_FUNC _MLX_BFloat16(T x) thread
Definition bf16.h:76
-
uint16_t bits_
Definition bf16.h:57
-
constexpr METAL_FUNC _MLX_BFloat16(uint16_t bits, bits_to_bfloat_struct)
Definition bf16.h:67
-
static constexpr METAL_FUNC bits_to_bfloat_struct bits_to_bfloat()
Definition bf16.h:64
-
_MLX_BFloat16() thread=default
-
constexpr METAL_FUNC _MLX_BFloat16(T x) device
Definition bf16.h:88
-
constexpr METAL_FUNC _MLX_BFloat16(T x) threadgroup
Definition bf16.h:82
-
constexpr METAL_FUNC _MLX_BFloat16(T x) const ant
Definition bf16.h:94
-
static constexpr bfloat16_t infinity()
Definition bf16.h:293
-
static constexpr bfloat16_t denorm_min()
Definition bf16.h:302
-
static constexpr bfloat16_t max()
Definition bf16.h:284
-
static constexpr bfloat16_t epsilon()
Definition bf16.h:287
-
static constexpr bfloat16_t signaling_NaN()
Definition bf16.h:299
-
static constexpr bfloat16_t min()
Definition bf16.h:278
-
static constexpr bfloat16_t lowest()
Definition bf16.h:281
-
static constexpr bfloat16_t quiet_NaN()
Definition bf16.h:296
-
static constexpr bfloat16_t round_error()
Definition bf16.h:290
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2complex_8h.html b/docs/build/html/backend_2metal_2kernels_2complex_8h.html deleted file mode 100644 index f45ed8b0a..000000000 --- a/docs/build/html/backend_2metal_2kernels_2complex_8h.html +++ /dev/null @@ -1,504 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/complex.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
complex.h File Reference
-
-
-
#include <metal_stdlib>
-
-

Go to the source code of this file.

- - - - -

-Classes

struct  complex64_t
 
- - - - - - - - - - - - - - - - - - - - - - - -

-Functions

constexpr complex64_t operator- (complex64_t x)
 
constexpr bool operator>= (complex64_t a, complex64_t b)
 
constexpr bool operator> (complex64_t a, complex64_t b)
 
constexpr bool operator<= (complex64_t a, complex64_t b)
 
constexpr bool operator< (complex64_t a, complex64_t b)
 
constexpr bool operator== (complex64_t a, complex64_t b)
 
constexpr complex64_t operator+ (complex64_t a, complex64_t b)
 
constexpr complex64_t operator- (complex64_t a, complex64_t b)
 
constexpr complex64_t operator* (complex64_t a, complex64_t b)
 
constexpr complex64_t operator/ (complex64_t a, complex64_t b)
 
constexpr complex64_t operator% (complex64_t a, complex64_t b)
 
- - - - - - - -

-Variables

template<typename T >
static constexpr constant bool can_convert_to_complex64
 
template<typename T >
static constexpr constant bool can_convert_from_complex64
 
-

Function Documentation

- -

◆ operator%()

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr complex64_t operator% (complex64_t a,
complex64_t b )
-
-constexpr
-
- -
-
- -

◆ operator*()

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr complex64_t operator* (complex64_t a,
complex64_t b )
-
-constexpr
-
- -
-
- -

◆ operator+()

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr complex64_t operator+ (complex64_t a,
complex64_t b )
-
-constexpr
-
- -
-
- -

◆ operator-() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr complex64_t operator- (complex64_t a,
complex64_t b )
-
-constexpr
-
- -
-
- -

◆ operator-() [2/2]

- -
-
- - - - - -
- - - - - - - -
constexpr complex64_t operator- (complex64_t x)
-
-constexpr
-
- -
-
- -

◆ operator/()

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr complex64_t operator/ (complex64_t a,
complex64_t b )
-
-constexpr
-
- -
-
- -

◆ operator<()

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr bool operator< (complex64_t a,
complex64_t b )
-
-constexpr
-
- -
-
- -

◆ operator<=()

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr bool operator<= (complex64_t a,
complex64_t b )
-
-constexpr
-
- -
-
- -

◆ operator==()

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr bool operator== (complex64_t a,
complex64_t b )
-
-constexpr
-
- -
-
- -

◆ operator>()

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr bool operator> (complex64_t a,
complex64_t b )
-
-constexpr
-
- -
-
- -

◆ operator>=()

- -
-
- - - - - -
- - - - - - - - - - - -
constexpr bool operator>= (complex64_t a,
complex64_t b )
-
-constexpr
-
- -
-
-

Variable Documentation

- -

◆ can_convert_from_complex64

- -
-
-
-template<typename T >
- - - - - -
- - - - -
constexpr constant bool can_convert_from_complex64
-
-staticconstexpr
-
-Initial value:
=
-
!is_same_v<T, complex64_t> &&
-
(is_convertible_v<float, T> || is_convertible_v<bfloat16_t, T>)
-
-
-
- -

◆ can_convert_to_complex64

- -
-
-
-template<typename T >
- - - - - -
- - - - -
constexpr constant bool can_convert_to_complex64
-
-staticconstexpr
-
-Initial value:
=
-
!is_same_v<T, complex64_t> && is_convertible_v<T, float>
-
-
-
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2complex_8h_source.html b/docs/build/html/backend_2metal_2kernels_2complex_8h_source.html deleted file mode 100644 index c47bbd109..000000000 --- a/docs/build/html/backend_2metal_2kernels_2complex_8h_source.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/complex.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
complex.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <metal_stdlib>
-
6
-
7using namespace metal;
-
8
-
9struct complex64_t;
-
10
-
11template <typename T>
-
12static constexpr constant bool can_convert_to_complex64 =
-
13 !is_same_v<T, complex64_t> && is_convertible_v<T, float>;
-
14
-
15template <typename T>
-
16static constexpr constant bool can_convert_from_complex64 =
-
17 !is_same_v<T, complex64_t> &&
-
18 (is_convertible_v<float, T> || is_convertible_v<bfloat16_t, T>);
-
19
-
- -
21 float real;
-
22 float imag;
-
23
-
24 // Constructors
-
25 constexpr complex64_t(float real, float imag) : real(real), imag(imag) {};
-
26
-
27 // Conversions to complex64_t
-
28 template <
-
29 typename T,
-
30 typename = typename enable_if<can_convert_to_complex64<T>>::type>
-
31 constexpr complex64_t(T x) thread : real(x), imag(0) {}
-
32
-
33 template <
-
34 typename T,
-
35 typename = typename enable_if<can_convert_to_complex64<T>>::type>
-
36 constexpr complex64_t(T x) threadgroup : real(x), imag(0) {}
-
37
-
38 template <
-
39 typename T,
-
40 typename = typename enable_if<can_convert_to_complex64<T>>::type>
-
41 constexpr complex64_t(T x) device : real(x), imag(0) {}
-
42
-
43 template <
-
44 typename T,
-
45 typename = typename enable_if<can_convert_to_complex64<T>>::type>
-
46 constexpr complex64_t(T x) constant : real(x), imag(0) {}
-
47
-
48 // Conversions from complex64_t
-
49 template <
-
50 typename T,
-
51 typename = typename enable_if<can_convert_from_complex64<T>>::type>
-
-
52 constexpr operator T() const thread {
-
53 return static_cast<T>(real);
-
54 }
-
-
55
-
56 template <
-
57 typename T,
-
58 typename = typename enable_if<can_convert_from_complex64<T>>::type>
-
-
59 constexpr operator T() const threadgroup {
-
60 return static_cast<T>(real);
-
61 }
-
-
62
-
63 template <
-
64 typename T,
-
65 typename = typename enable_if<can_convert_from_complex64<T>>::type>
-
-
66 constexpr operator T() const device {
-
67 return static_cast<T>(real);
-
68 }
-
-
69
-
70 template <
-
71 typename T,
-
72 typename = typename enable_if<can_convert_from_complex64<T>>::type>
-
-
73 constexpr operator T() const constant {
-
74 return static_cast<T>(real);
-
75 }
-
-
76};
-
-
77
-
- -
79 return {-x.real, -x.imag};
-
80}
-
-
81
-
-
82constexpr bool operator>=(complex64_t a, complex64_t b) {
-
83 return (a.real > b.real) || (a.real == b.real && a.imag >= b.imag);
-
84}
-
-
85
-
-
86constexpr bool operator>(complex64_t a, complex64_t b) {
-
87 return (a.real > b.real) || (a.real == b.real && a.imag > b.imag);
-
88}
-
-
89
-
-
90constexpr bool operator<=(complex64_t a, complex64_t b) {
-
91 return operator>=(b, a);
-
92}
-
-
93
-
-
94constexpr bool operator<(complex64_t a, complex64_t b) {
-
95 return operator>(b, a);
-
96}
-
-
97
-
-
98constexpr bool operator==(complex64_t a, complex64_t b) {
-
99 return a.real == b.real && a.imag == b.imag;
-
100}
-
-
101
-
- -
103 return {a.real + b.real, a.imag + b.imag};
-
104}
-
-
105
-
- -
107 return {a.real - b.real, a.imag - b.imag};
-
108}
-
-
109
-
- -
111 return {a.real * b.real - a.imag * b.imag, a.real * b.imag + a.imag * b.real};
-
112}
-
-
113
-
- -
115 auto denom = b.real * b.real + b.imag * b.imag;
-
116 auto x = a.real * b.real + a.imag * b.imag;
-
117 auto y = a.imag * b.real - a.real * b.imag;
-
118 return {x / denom, y / denom};
-
119}
-
-
120
-
- -
122 auto real = a.real - (b.real * static_cast<int64_t>(a.real / b.real));
-
123 auto imag = a.imag - (b.imag * static_cast<int64_t>(a.imag / b.imag));
-
124 if (real != 0 && (real < 0 != b.real < 0)) {
-
125 real += b.real;
-
126 }
-
127 if (imag != 0 && (imag < 0 != b.imag < 0)) {
-
128 imag += b.imag;
-
129 }
-
130 return {real, imag};
-
131}
-
-
constexpr bool operator>(complex64_t a, complex64_t b)
Definition complex.h:86
-
constexpr complex64_t operator-(complex64_t x)
Definition complex.h:78
-
static constexpr constant bool can_convert_to_complex64
Definition complex.h:12
-
constexpr bool operator<(complex64_t a, complex64_t b)
Definition complex.h:94
-
constexpr complex64_t operator*(complex64_t a, complex64_t b)
Definition complex.h:110
-
constexpr complex64_t operator%(complex64_t a, complex64_t b)
Definition complex.h:121
-
constexpr bool operator>=(complex64_t a, complex64_t b)
Definition complex.h:82
-
static constexpr constant bool can_convert_from_complex64
Definition complex.h:16
-
constexpr bool operator==(complex64_t a, complex64_t b)
Definition complex.h:98
-
constexpr complex64_t operator+(complex64_t a, complex64_t b)
Definition complex.h:102
-
constexpr complex64_t operator/(complex64_t a, complex64_t b)
Definition complex.h:114
-
constexpr bool operator<=(complex64_t a, complex64_t b)
Definition complex.h:90
-
Definition bf16.h:265
-
Definition complex.h:20
-
constexpr complex64_t(T x) const ant
Definition complex.h:46
-
constexpr complex64_t(T x) thread
Definition complex.h:31
-
constexpr complex64_t(T x) threadgroup
Definition complex.h:36
-
float imag
Definition complex.h:22
-
float real
Definition complex.h:21
-
constexpr complex64_t(T x) device
Definition complex.h:41
-
constexpr complex64_t(float real, float imag)
Definition complex.h:25
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2reduction_2ops_8h.html b/docs/build/html/backend_2metal_2kernels_2reduction_2ops_8h.html deleted file mode 100644 index d991b9612..000000000 --- a/docs/build/html/backend_2metal_2kernels_2reduction_2ops_8h.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/reduction/ops.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
ops.h File Reference
-
-
-
#include <metal_atomic>
-#include <metal_simdgroup>
-#include "mlx/backend/metal/kernels/atomic.h"
-#include "mlx/backend/metal/kernels/bf16.h"
-#include "mlx/backend/metal/kernels/utils.h"
-
-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - -

-Classes

union  bool4_or_uint
 
struct  None
 
struct  And
 
struct  Or
 
struct  Sum< U >
 
struct  Prod< U >
 
struct  Min< U >
 
struct  Max< U >
 
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2reduction_2ops_8h_source.html b/docs/build/html/backend_2metal_2kernels_2reduction_2ops_8h_source.html deleted file mode 100644 index 58bc01ea0..000000000 --- a/docs/build/html/backend_2metal_2kernels_2reduction_2ops_8h_source.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/reduction/ops.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
ops.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <metal_atomic>
-
6#include <metal_simdgroup>
-
7
- - - -
11
-
- -
13 bool4 b;
-
14 unsigned int i;
-
15};
-
-
16
-
-
17struct None {
-
18 template <typename T>
-
-
19 void atomic_update(device mlx_atomic<T>* out, T val, uint offset = 0) {
-
20 mlx_atomic_store_explicit(out, val, offset);
-
21 }
-
-
22};
-
-
23
-
-
24struct And {
-
-
25 bool simd_reduce(bool val) {
-
26 return simd_all(val);
-
27 };
-
-
28
-
29 static constexpr constant bool init = true;
-
30
-
- -
32 device mlx_atomic<unsigned int>* out,
-
33 bool val,
-
34 int elem_idx,
-
35 int offset = 0) {
-
36 if (!val) {
- -
38 update.b = {true, true, true, true};
-
39 update.b[elem_idx] = false;
- -
41 }
-
42 }
-
-
43
-
-
44 void atomic_update(device mlx_atomic<bool>* out, bool val, uint offset = 0) {
-
45 if (!val) {
-
46 mlx_atomic_store_explicit(out, val, offset);
-
47 }
-
48 }
-
-
49
-
50 // Non atomic update
-
-
51 void update(device bool* out, bool val) {
-
52 *out &= val;
-
53 }
-
-
54
-
55 // Operator
-
-
56 bool operator()(bool a, bool b) {
-
57 return a && b;
-
58 }
-
-
59};
-
-
60
-
-
61struct Or {
-
-
62 bool simd_reduce(bool val) {
-
63 return simd_any(val);
-
64 };
-
-
65
-
66 static constexpr constant bool init = false;
-
67
-
- -
69 device mlx_atomic<unsigned int>* out,
-
70 bool val,
-
71 uint elem_idx,
-
72 uint offset = 0) {
-
73 if (val) {
- -
75 update.b = {false, false, false, false};
-
76 update.b[elem_idx] = true;
- -
78 }
-
79 }
-
-
80
-
-
81 void atomic_update(device mlx_atomic<bool>* out, bool val, uint offset = 0) {
-
82 if (val) {
-
83 mlx_atomic_store_explicit(out, val, offset);
-
84 }
-
85 }
-
-
86
-
87 // Non atomic update
-
-
88 void update(device bool* out, bool val) {
-
89 *out |= val;
-
90 }
-
-
91
-
92 // Operator
-
-
93 bool operator()(bool a, bool b) {
-
94 return a || b;
-
95 }
-
-
96};
-
-
97
-
98template <typename U>
-
-
99struct Sum {
-
100 template <typename T>
-
-
101 T simd_reduce(T val) {
-
102 return simd_sum(val);
-
103 };
-
-
104
-
105 static constexpr constant U init = U(0);
-
106
-
107 template <typename T>
-
-
108 void atomic_update(device mlx_atomic<T>* out, T val, uint offset = 0) {
-
109 mlx_atomic_fetch_add_explicit(out, val, offset);
-
110 }
-
-
111
-
112 // Operator
-
-
113 U operator()(U a, U b) {
-
114 return a + b;
-
115 }
-
-
116};
-
-
117
-
118template <typename U>
-
-
119struct Prod {
-
120 template <typename T>
-
-
121 T simd_reduce(T val) {
-
122 return simd_product(val);
-
123 };
-
-
124
-
125 static constexpr constant U init = U(1);
-
126
-
127 template <typename T>
-
-
128 void atomic_update(device mlx_atomic<T>* out, T val, uint offset = 0) {
-
129 mlx_atomic_fetch_mul_explicit(out, val, offset);
-
130 }
-
-
131
-
132 // Operator
-
-
133 U operator()(U a, U b) {
-
134 return a * b;
-
135 }
-
-
136};
-
-
137
-
138template <typename U>
-
-
139struct Min {
-
140 template <typename T>
-
-
141 T simd_reduce(T val) {
-
142 return simd_min(val);
-
143 };
-
-
144
-
145 static constexpr constant U init = Limits<U>::max;
-
146
-
147 template <typename T>
-
-
148 void atomic_update(device mlx_atomic<T>* out, T val, uint offset = 0) {
-
149 mlx_atomic_fetch_min_explicit(out, val, offset);
-
150 }
-
-
151
-
152 // Operator
-
-
153 U operator()(U a, U b) {
-
154 return a < b ? a : b;
-
155 }
-
-
156};
-
-
157
-
158template <typename U>
-
-
159struct Max {
-
160 template <typename T>
-
-
161 T simd_reduce(T val) {
-
162 return simd_max(val);
-
163 };
-
-
164
-
165 static constexpr constant U init = Limits<U>::min;
-
166
-
167 template <typename T>
-
-
168 void atomic_update(device mlx_atomic<T>* out, T val, uint offset = 0) {
-
169 mlx_atomic_fetch_max_explicit(out, val, offset);
-
170 }
-
-
171
-
172 // Operator
-
-
173 U operator()(U a, U b) {
-
174 return a > b ? a : b;
-
175 }
-
-
176};
-
- -
METAL_FUNC void mlx_atomic_fetch_add_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:82
-
METAL_FUNC void mlx_atomic_fetch_and_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:52
-
METAL_FUNC void mlx_atomic_store_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:47
-
METAL_FUNC void mlx_atomic_fetch_or_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:61
-
METAL_FUNC void mlx_atomic_fetch_max_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:74
-
METAL_FUNC void mlx_atomic_fetch_min_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:66
-
METAL_FUNC void mlx_atomic_fetch_mul_explicit(device mlx_atomic< T > *object, T val, uint offset)
Definition atomic.h:90
- - -
METAL_FUNC bfloat16_t simd_max(bfloat16_t data)
Definition bf16_math.h:392
-
METAL_FUNC bfloat16_t simd_sum(bfloat16_t data)
Definition bf16_math.h:392
-
METAL_FUNC bfloat16_t simd_product(bfloat16_t data)
Definition bf16_math.h:392
-
METAL_FUNC bfloat16_t simd_min(bfloat16_t data)
Definition bf16_math.h:392
-
Definition ops.h:24
-
void atomic_update(device mlx_atomic< bool > *out, bool val, uint offset=0)
Definition ops.h:44
-
bool operator()(bool a, bool b)
Definition ops.h:56
-
bool simd_reduce(bool val)
Definition ops.h:25
-
static constexpr constant bool init
Definition ops.h:29
-
void atomic_update(device mlx_atomic< unsigned int > *out, bool val, int elem_idx, int offset=0)
Definition ops.h:31
-
void update(device bool *out, bool val)
Definition ops.h:51
-
Definition utils.h:14
-
Definition ops.h:159
-
T simd_reduce(T val)
Definition ops.h:161
-
U operator()(U a, U b)
Definition ops.h:173
-
static constexpr constant U init
Definition ops.h:165
-
void atomic_update(device mlx_atomic< T > *out, T val, uint offset=0)
Definition ops.h:168
-
Definition ops.h:139
-
void atomic_update(device mlx_atomic< T > *out, T val, uint offset=0)
Definition ops.h:148
-
U operator()(U a, U b)
Definition ops.h:153
-
static constexpr constant U init
Definition ops.h:145
-
T simd_reduce(T val)
Definition ops.h:141
-
Definition ops.h:17
-
void atomic_update(device mlx_atomic< T > *out, T val, uint offset=0)
Definition ops.h:19
-
Definition ops.h:61
-
void atomic_update(device mlx_atomic< bool > *out, bool val, uint offset=0)
Definition ops.h:81
-
bool operator()(bool a, bool b)
Definition ops.h:93
-
void atomic_update(device mlx_atomic< unsigned int > *out, bool val, uint elem_idx, uint offset=0)
Definition ops.h:68
-
void update(device bool *out, bool val)
Definition ops.h:88
-
bool simd_reduce(bool val)
Definition ops.h:62
-
static constexpr constant bool init
Definition ops.h:66
-
Definition ops.h:119
-
U operator()(U a, U b)
Definition ops.h:133
-
void atomic_update(device mlx_atomic< T > *out, T val, uint offset=0)
Definition ops.h:128
-
T simd_reduce(T val)
Definition ops.h:121
-
static constexpr constant U init
Definition ops.h:125
-
Definition ops.h:99
-
void atomic_update(device mlx_atomic< T > *out, T val, uint offset=0)
Definition ops.h:108
-
static constexpr constant U init
Definition ops.h:105
-
T simd_reduce(T val)
Definition ops.h:101
-
U operator()(U a, U b)
Definition ops.h:113
-
Definition atomic.h:26
-
Definition ops.h:12
-
bool4 b
Definition ops.h:13
-
unsigned int i
Definition ops.h:14
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2reduction_2utils_8h.html b/docs/build/html/backend_2metal_2kernels_2reduction_2utils_8h.html deleted file mode 100644 index 2c79e0cea..000000000 --- a/docs/build/html/backend_2metal_2kernels_2reduction_2utils_8h.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/reduction/utils.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
utils.h File Reference
-
-
-
#include <metal_atomic>
-#include <metal_simdgroup>
-#include "mlx/backend/metal/kernels/defines.h"
-#include "mlx/backend/metal/kernels/steel/utils.h"
-#include "mlx/backend/metal/kernels/utils.h"
-#include "mlx/backend/metal/kernels/reduction/ops.h"
-
-

Go to the source code of this file.

- - - - -

-Variables

static constant constexpr const uint8_t simd_size = 32
 
-

Variable Documentation

- -

◆ simd_size

- -
-
- - - - - -
- - - - -
constant constexpr const uint8_t simd_size = 32
-
-staticconstexpr
-
- -
-
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2reduction_2utils_8h_source.html b/docs/build/html/backend_2metal_2kernels_2reduction_2utils_8h_source.html deleted file mode 100644 index c20c0da98..000000000 --- a/docs/build/html/backend_2metal_2kernels_2reduction_2utils_8h_source.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/reduction/utils.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
utils.h
-
-
-Go to the documentation of this file.
1// Copyright © 2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <metal_atomic>
-
6#include <metal_simdgroup>
-
7
- - - -
11
- -
13
-
14static constant constexpr const uint8_t simd_size = 32;
- -
static constant constexpr const uint8_t simd_size
Definition utils.h:14
- - - -
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2steel_2gemm_2transforms_8h.html b/docs/build/html/backend_2metal_2kernels_2steel_2gemm_2transforms_8h.html deleted file mode 100644 index 2f5a4eaa4..000000000 --- a/docs/build/html/backend_2metal_2kernels_2steel_2gemm_2transforms_8h.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/gemm/transforms.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
transforms.h File Reference
-
-
- -

Go to the source code of this file.

- - - - - - - - - - - - -

-Classes

struct  mlx::steel::TransformNone< OutT, InT >
 
struct  mlx::steel::TransformAdd< OutT, InT >
 
struct  mlx::steel::TransformAxpby< OutT, InT >
 
struct  mlx::steel::AccumHelper< T >
 
struct  mlx::steel::BlockSwizzle
 
- - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::steel
 
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2steel_2gemm_2transforms_8h_source.html b/docs/build/html/backend_2metal_2kernels_2steel_2gemm_2transforms_8h_source.html deleted file mode 100644 index 13d88e7f2..000000000 --- a/docs/build/html/backend_2metal_2kernels_2steel_2gemm_2transforms_8h_source.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/gemm/transforms.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
transforms.h
-
-
-Go to the documentation of this file.
1// Copyright © 2024 Apple Inc.
-
2
-
3#pragma once
-
4
- -
6
-
8// Transforms and Epilogues
-
10
-
11namespace mlx {
-
12namespace steel {
-
13
-
14template <typename OutT, typename InT>
-
- -
-
16 static METAL_FUNC OutT apply(InT x) {
-
17 return static_cast<OutT>(x);
-
18 }
-
-
19
-
-
20 static METAL_FUNC OutT apply(InT x, OutT) {
-
21 return static_cast<OutT>(x);
-
22 }
-
-
23};
-
-
24
-
25template <typename OutT, typename InT>
-
- -
27 TransformAdd(const float, const float) {}
-
28
-
-
29 static METAL_FUNC OutT apply(InT x) {
-
30 return static_cast<OutT>(x);
-
31 }
-
-
32
-
-
33 static METAL_FUNC OutT apply(InT x, OutT c) {
-
34 return static_cast<OutT>(x) + c;
-
35 }
-
-
36};
-
-
37
-
38template <typename OutT, typename InT>
-
- -
40 const float alpha;
-
41 const float beta;
-
42
-
-
43 TransformAxpby(const float alpha_, const float beta_)
-
44 : alpha(alpha_), beta(beta_) {}
-
-
45
-
-
46 static METAL_FUNC OutT apply(InT x) {
-
47 return static_cast<OutT>(x);
-
48 }
-
-
49
-
-
50 METAL_FUNC OutT apply(InT x, OutT c) const {
-
51 return static_cast<OutT>(x * alpha + (beta * c));
-
52 }
-
-
53};
-
-
54
-
55template <typename T>
-
- -
57 typedef float accum_type;
-
58};
-
-
59
-
- -
61 static METAL_FUNC int2
-
-
62 swizzle(uint3 tid [[threadgroup_position_in_grid]], const int swizzle_log) {
-
63 const int tid_x = (tid.x) >> swizzle_log;
-
64 const int tid_y =
-
65 ((tid.y) << swizzle_log) + ((tid.x) & ((1 << swizzle_log) - 1));
-
66 return int2(tid_x, tid_y);
-
67 }
-
-
68};
-
-
69
-
70} // namespace steel
-
71} // namespace mlx
- -
Definition allocator.h:7
-
Definition transforms.h:56
-
float accum_type
Definition transforms.h:57
-
Definition transforms.h:60
-
static METAL_FUNC int2 swizzle(uint3 tid, const int swizzle_log)
Definition transforms.h:62
-
Definition transforms.h:26
-
static METAL_FUNC OutT apply(InT x, OutT c)
Definition transforms.h:33
-
TransformAdd(const float, const float)
Definition transforms.h:27
-
static METAL_FUNC OutT apply(InT x)
Definition transforms.h:29
-
Definition transforms.h:39
-
static METAL_FUNC OutT apply(InT x)
Definition transforms.h:46
-
const float beta
Definition transforms.h:41
-
METAL_FUNC OutT apply(InT x, OutT c) const
Definition transforms.h:50
-
const float alpha
Definition transforms.h:40
-
TransformAxpby(const float alpha_, const float beta_)
Definition transforms.h:43
-
Definition transforms.h:15
-
static METAL_FUNC OutT apply(InT x)
Definition transforms.h:16
-
static METAL_FUNC OutT apply(InT x, OutT)
Definition transforms.h:20
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2steel_2utils_8h.html b/docs/build/html/backend_2metal_2kernels_2steel_2utils_8h.html deleted file mode 100644 index 31eb63250..000000000 --- a/docs/build/html/backend_2metal_2kernels_2steel_2utils_8h.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/utils.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
utils.h File Reference
-
-
-
#include <metal_stdlib>
-
-

Go to the source code of this file.

- - - - - - -

-Macros

#define STEEL_CONST   static constant constexpr const
 
#define STEEL_PRAGMA_UNROLL   _Pragma("clang loop unroll(full)")
 
- - - - - -

-Functions

METAL_FUNC ulong2 elem_to_loc_broadcast (uint elem, constant const int *shape, constant const size_t *a_strides, constant const size_t *b_strides, int ndim)
 
METAL_FUNC ulong3 elem_to_loc_broadcast (uint elem, constant const int *shape, constant const size_t *a_strides, constant const size_t *b_strides, constant const size_t *c_strides, int ndim)
 
-

Macro Definition Documentation

- -

◆ STEEL_CONST

- -
-
- - - - -
#define STEEL_CONST   static constant constexpr const
-
- -
-
- -

◆ STEEL_PRAGMA_UNROLL

- -
-
- - - - -
#define STEEL_PRAGMA_UNROLL   _Pragma("clang loop unroll(full)")
-
- -
-
-

Function Documentation

- -

◆ elem_to_loc_broadcast() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
METAL_FUNC ulong3 elem_to_loc_broadcast (uint elem,
constant const int * shape,
constant const size_t * a_strides,
constant const size_t * b_strides,
constant const size_t * c_strides,
int ndim )
-
- -
-
- -

◆ elem_to_loc_broadcast() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
METAL_FUNC ulong2 elem_to_loc_broadcast (uint elem,
constant const int * shape,
constant const size_t * a_strides,
constant const size_t * b_strides,
int ndim )
-
- -
-
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2steel_2utils_8h_source.html b/docs/build/html/backend_2metal_2kernels_2steel_2utils_8h_source.html deleted file mode 100644 index 1621ac55e..000000000 --- a/docs/build/html/backend_2metal_2kernels_2steel_2utils_8h_source.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/utils.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
utils.h
-
-
-Go to the documentation of this file.
1// Copyright © 2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <metal_stdlib>
-
6
-
7#define STEEL_CONST static constant constexpr const
-
8#define STEEL_PRAGMA_UNROLL _Pragma("clang loop unroll(full)")
-
9
-
-
10METAL_FUNC ulong2 elem_to_loc_broadcast(
-
11 uint elem,
-
12 constant const int* shape,
-
13 constant const size_t* a_strides,
-
14 constant const size_t* b_strides,
-
15 int ndim) {
-
16 ulong loc_a{0};
-
17 ulong loc_b{0};
-
18 for (int i = ndim - 1; i >= 0 && elem > 0; --i) {
-
19 int pos_in_dim = (elem % shape[i]);
-
20 elem /= shape[i];
-
21 loc_a += pos_in_dim * a_strides[i];
-
22 loc_b += pos_in_dim * b_strides[i];
-
23 }
-
24 return ulong2(loc_a, loc_b);
-
25}
-
-
26
-
-
27METAL_FUNC ulong3 elem_to_loc_broadcast(
-
28 uint elem,
-
29 constant const int* shape,
-
30 constant const size_t* a_strides,
-
31 constant const size_t* b_strides,
-
32 constant const size_t* c_strides,
-
33 int ndim) {
-
34 ulong loc_a{0};
-
35 ulong loc_b{0};
-
36 ulong loc_c{0};
-
37 for (int i = ndim - 1; i >= 0 && elem > 0; --i) {
-
38 int pos_in_dim = (elem % shape[i]);
-
39 elem /= shape[i];
-
40 loc_a += pos_in_dim * a_strides[i];
-
41 loc_b += pos_in_dim * b_strides[i];
-
42 loc_c += pos_in_dim * c_strides[i];
-
43 }
-
44 return ulong3(loc_a, loc_b, loc_c);
-
45}
-
-
METAL_FUNC ulong2 elem_to_loc_broadcast(uint elem, constant const int *shape, constant const size_t *a_strides, constant const size_t *b_strides, int ndim)
Definition utils.h:10
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2utils_8h.html b/docs/build/html/backend_2metal_2kernels_2utils_8h.html deleted file mode 100644 index bce4b00aa..000000000 --- a/docs/build/html/backend_2metal_2kernels_2utils_8h.html +++ /dev/null @@ -1,862 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/utils.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
utils.h File Reference
-
-
-
#include <metal_math>
-#include "mlx/backend/metal/kernels/bf16.h"
-#include "mlx/backend/metal/kernels/complex.h"
-
-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Classes

struct  Limits< U >
 
struct  Limits< uint8_t >
 
struct  Limits< uint16_t >
 
struct  Limits< uint32_t >
 
struct  Limits< uint64_t >
 
struct  Limits< int8_t >
 
struct  Limits< int16_t >
 
struct  Limits< int32_t >
 
struct  Limits< int64_t >
 
struct  Limits< half >
 
struct  Limits< float >
 
struct  Limits< bfloat16_t >
 
struct  Limits< bool >
 
- - - - - - - -

-Macros

#define instantiate_default_limit(type)
 
#define instantiate_float_limit(type)
 
#define MLX_MTL_PRAGMA_UNROLL   _Pragma("clang loop unroll(full)")
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

template<typename stride_t >
METAL_FUNC stride_t elem_to_loc (uint elem, device const int *shape, device const stride_t *strides, int ndim)
 
template<typename stride_t >
METAL_FUNC stride_t elem_to_loc (uint elem, constant const int *shape, constant const stride_t *strides, int ndim)
 
template<typename stride_t >
METAL_FUNC stride_t elem_to_loc (uint3 elem, constant const int *shape, constant const stride_t *strides, int ndim)
 
template<typename stride_t >
METAL_FUNC stride_t elem_to_loc_1 (uint elem, constant const stride_t &stride)
 
template<typename stride_t >
METAL_FUNC stride_t elem_to_loc_2 (uint2 elem, constant const stride_t strides[2])
 
template<typename stride_t >
METAL_FUNC stride_t elem_to_loc_3 (uint3 elem, constant const stride_t strides[3])
 
template<int NDIM>
METAL_FUNC size_t elem_to_loc_nd (uint elem, device const int *shape, device const size_t *strides)
 
template<int NDIM>
METAL_FUNC size_t elem_to_loc_nd (uint3 elem, constant const int shape[NDIM], constant const size_t strides[NDIM])
 
template<int NDIM>
METAL_FUNC int64_t elem_to_loc_nd (uint elem, constant const int shape[NDIM], constant const int64_t strides[NDIM])
 
template<int NDIM>
METAL_FUNC int64_t elem_to_loc_nd (uint3 elem, constant const int shape[NDIM], constant const int64_t strides[NDIM])
 
METAL_FUNC uint2 elem_to_loc_2_nd (uint3 elem, constant const int *shape, constant const size_t *a_strides, constant const size_t *b_strides, int ndim)
 
METAL_FUNC uint3 elem_to_loc_3_nd (uint3 elem, constant const int *shape, constant const size_t *a_strides, constant const size_t *b_strides, constant const size_t *c_strides, int ndim)
 
template<int NDIM>
METAL_FUNC uint2 elem_to_loc_2_nd (uint3 elem, constant const int shape[NDIM], constant const size_t a_strides[NDIM], constant const size_t b_strides[NDIM])
 
template<int NDIM>
METAL_FUNC uint3 elem_to_loc_3_nd (uint3 elem, constant const int shape[NDIM], constant const size_t a_strides[NDIM], constant const size_t b_strides[NDIM], constant const size_t c_strides[NDIM])
 
size_t ceildiv (size_t N, size_t M)
 Compute ceil((float)N/(float)M)
 
float log1p (float x)
 
bfloat16_t log1p (bfloat16_t x)
 
uint64_t simd_shuffle_down (uint64_t data, uint16_t delta)
 
int64_t simd_shuffle_down (int64_t data, uint16_t delta)
 
bool simd_shuffle_down (bool data, uint16_t delta)
 
-

Macro Definition Documentation

- -

◆ instantiate_default_limit

- -
-
- - - - - - - -
#define instantiate_default_limit( type)
-
-Value:
template <> \
-
struct Limits<type> { \
-
static constexpr constant type max = metal::numeric_limits<type>::max(); \
-
static constexpr constant type min = metal::numeric_limits<type>::min(); \
-
static constexpr constant type finite_max = \
-
metal::numeric_limits<type>::max(); \
-
static constexpr constant type finite_min = \
-
metal::numeric_limits<type>::min(); \
-
};
-
Definition utils.h:14
-
static const constant U max
Definition utils.h:15
-
static const constant U finite_max
Definition utils.h:17
-
static const constant U min
Definition utils.h:16
-
static const constant U finite_min
Definition utils.h:18
-
-
-
- -

◆ instantiate_float_limit

- -
-
- - - - - - - -
#define instantiate_float_limit( type)
-
-Value:
template <> \
-
struct Limits<type> { \
-
static constexpr constant type max = \
-
metal::numeric_limits<type>::infinity(); \
-
static constexpr constant type min = \
-
-metal::numeric_limits<type>::infinity(); \
-
static constexpr constant type finite_max = \
-
metal::numeric_limits<type>::max(); \
-
static constexpr constant type finite_min = \
-
-metal::numeric_limits<type>::max(); \
-
};
-
-
-
- -

◆ MLX_MTL_PRAGMA_UNROLL

- -
-
- - - - -
#define MLX_MTL_PRAGMA_UNROLL   _Pragma("clang loop unroll(full)")
-
- -
-
-

Function Documentation

- -

◆ ceildiv()

- -
-
- - - - - -
- - - - - - - - - - - -
size_t ceildiv (size_t N,
size_t M )
-
-inline
-
- -

Compute ceil((float)N/(float)M)

- -
-
- -

◆ elem_to_loc() [1/3]

- -
-
-
-template<typename stride_t >
- - - - - - - - - - - - - - - - - - - - - -
METAL_FUNC stride_t elem_to_loc (uint elem,
constant const int * shape,
constant const stride_t * strides,
int ndim )
-
- -
-
- -

◆ elem_to_loc() [2/3]

- -
-
-
-template<typename stride_t >
- - - - - - - - - - - - - - - - - - - - - -
METAL_FUNC stride_t elem_to_loc (uint elem,
device const int * shape,
device const stride_t * strides,
int ndim )
-
- -
-
- -

◆ elem_to_loc() [3/3]

- -
-
-
-template<typename stride_t >
- - - - - - - - - - - - - - - - - - - - - -
METAL_FUNC stride_t elem_to_loc (uint3 elem,
constant const int * shape,
constant const stride_t * strides,
int ndim )
-
- -
-
- -

◆ elem_to_loc_1()

- -
-
-
-template<typename stride_t >
- - - - - - - - - - - -
METAL_FUNC stride_t elem_to_loc_1 (uint elem,
constant const stride_t & stride )
-
- -
-
- -

◆ elem_to_loc_2()

- -
-
-
-template<typename stride_t >
- - - - - - - - - - - -
METAL_FUNC stride_t elem_to_loc_2 (uint2 elem,
constant const stride_t strides[2] )
-
- -
-
- -

◆ elem_to_loc_2_nd() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
METAL_FUNC uint2 elem_to_loc_2_nd (uint3 elem,
constant const int * shape,
constant const size_t * a_strides,
constant const size_t * b_strides,
int ndim )
-
- -
-
- -

◆ elem_to_loc_2_nd() [2/2]

- -
-
-
-template<int NDIM>
- - - - - - - - - - - - - - - - - - - - - -
METAL_FUNC uint2 elem_to_loc_2_nd (uint3 elem,
constant const int shape[NDIM],
constant const size_t a_strides[NDIM],
constant const size_t b_strides[NDIM] )
-
- -
-
- -

◆ elem_to_loc_3()

- -
-
-
-template<typename stride_t >
- - - - - - - - - - - -
METAL_FUNC stride_t elem_to_loc_3 (uint3 elem,
constant const stride_t strides[3] )
-
- -
-
- -

◆ elem_to_loc_3_nd() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
METAL_FUNC uint3 elem_to_loc_3_nd (uint3 elem,
constant const int * shape,
constant const size_t * a_strides,
constant const size_t * b_strides,
constant const size_t * c_strides,
int ndim )
-
- -
-
- -

◆ elem_to_loc_3_nd() [2/2]

- -
-
-
-template<int NDIM>
- - - - - - - - - - - - - - - - - - - - - - - - - - -
METAL_FUNC uint3 elem_to_loc_3_nd (uint3 elem,
constant const int shape[NDIM],
constant const size_t a_strides[NDIM],
constant const size_t b_strides[NDIM],
constant const size_t c_strides[NDIM] )
-
- -
-
- -

◆ elem_to_loc_nd() [1/4]

- -
-
-
-template<int NDIM>
- - - - - - - - - - - - - - - - -
METAL_FUNC int64_t elem_to_loc_nd (uint elem,
constant const int shape[NDIM],
constant const int64_t strides[NDIM] )
-
- -
-
- -

◆ elem_to_loc_nd() [2/4]

- -
-
-
-template<int NDIM>
- - - - - - - - - - - - - - - - -
METAL_FUNC size_t elem_to_loc_nd (uint elem,
device const int * shape,
device const size_t * strides )
-
- -
-
- -

◆ elem_to_loc_nd() [3/4]

- -
-
-
-template<int NDIM>
- - - - - - - - - - - - - - - - -
METAL_FUNC int64_t elem_to_loc_nd (uint3 elem,
constant const int shape[NDIM],
constant const int64_t strides[NDIM] )
-
- -
-
- -

◆ elem_to_loc_nd() [4/4]

- -
-
-
-template<int NDIM>
- - - - - - - - - - - - - - - - -
METAL_FUNC size_t elem_to_loc_nd (uint3 elem,
constant const int shape[NDIM],
constant const size_t strides[NDIM] )
-
- -
-
- -

◆ log1p() [1/2]

- -
-
- - - - - -
- - - - - - - -
bfloat16_t log1p (bfloat16_t x)
-
-inline
-
- -
-
- -

◆ log1p() [2/2]

- -
-
- - - - - -
- - - - - - - -
float log1p (float x)
-
-inline
-
- -
-
- -

◆ simd_shuffle_down() [1/3]

- -
-
- - - - - -
- - - - - - - - - - - -
bool simd_shuffle_down (bool data,
uint16_t delta )
-
-inline
-
- -
-
- -

◆ simd_shuffle_down() [2/3]

- -
-
- - - - - -
- - - - - - - - - - - -
int64_t simd_shuffle_down (int64_t data,
uint16_t delta )
-
-inline
-
- -
-
- -

◆ simd_shuffle_down() [3/3]

- -
-
- - - - - -
- - - - - - - - - - - -
uint64_t simd_shuffle_down (uint64_t data,
uint16_t delta )
-
-inline
-
- -
-
-
- - - - diff --git a/docs/build/html/backend_2metal_2kernels_2utils_8h_source.html b/docs/build/html/backend_2metal_2kernels_2utils_8h_source.html deleted file mode 100644 index 32aeb0750..000000000 --- a/docs/build/html/backend_2metal_2kernels_2utils_8h_source.html +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/utils.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
utils.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include <metal_math>
- - -
8
-
10// Type limits utils
-
12
-
13template <typename U>
-
-
14struct Limits {
-
15 static const constant U max = metal::numeric_limits<U>::max();
-
16 static const constant U min = metal::numeric_limits<U>::min();
-
17 static const constant U finite_max = metal::numeric_limits<U>::max();
-
18 static const constant U finite_min = metal::numeric_limits<U>::min();
-
19};
-
-
20
-
-
21#define instantiate_default_limit(type) \
-
22 template <> \
-
23 struct Limits<type> { \
-
24 static constexpr constant type max = metal::numeric_limits<type>::max(); \
-
25 static constexpr constant type min = metal::numeric_limits<type>::min(); \
-
26 static constexpr constant type finite_max = \
-
27 metal::numeric_limits<type>::max(); \
-
28 static constexpr constant type finite_min = \
-
29 metal::numeric_limits<type>::min(); \
-
30 };
-
-
31
- - - - - - - - -
40
-
-
41#define instantiate_float_limit(type) \
-
42 template <> \
-
43 struct Limits<type> { \
-
44 static constexpr constant type max = \
-
45 metal::numeric_limits<type>::infinity(); \
-
46 static constexpr constant type min = \
-
47 -metal::numeric_limits<type>::infinity(); \
-
48 static constexpr constant type finite_max = \
-
49 metal::numeric_limits<type>::max(); \
-
50 static constexpr constant type finite_min = \
-
51 -metal::numeric_limits<type>::max(); \
-
52 };
-
-
53
- - - -
57
-
58template <>
-
-
59struct Limits<bool> {
-
60 static constexpr constant bool max = true;
-
61 static constexpr constant bool min = false;
-
62};
-
-
63
-
65// Indexing utils
-
67
-
68#define MLX_MTL_PRAGMA_UNROLL _Pragma("clang loop unroll(full)")
-
69
-
71// Single Array with generic dims
-
72
-
73template <typename stride_t>
-
-
74METAL_FUNC stride_t elem_to_loc(
-
75 uint elem,
-
76 device const int* shape,
-
77 device const stride_t* strides,
-
78 int ndim) {
-
79 stride_t loc = 0;
-
80 for (int i = ndim - 1; i >= 0 && elem > 0; --i) {
-
81 loc += (elem % shape[i]) * strides[i];
-
82 elem /= shape[i];
-
83 }
-
84 return loc;
-
85}
-
-
86
-
87template <typename stride_t>
-
-
88METAL_FUNC stride_t elem_to_loc(
-
89 uint elem,
-
90 constant const int* shape,
-
91 constant const stride_t* strides,
-
92 int ndim) {
-
93 stride_t loc = 0;
-
94 for (int i = ndim - 1; i >= 0 && elem > 0; --i) {
-
95 loc += (elem % shape[i]) * strides[i];
-
96 elem /= shape[i];
-
97 }
-
98 return loc;
-
99}
-
-
100
-
101// Non templated version to handle arbitrary dims
-
102template <typename stride_t>
-
-
103METAL_FUNC stride_t elem_to_loc(
-
104 uint3 elem,
-
105 constant const int* shape,
-
106 constant const stride_t* strides,
-
107 int ndim) {
-
108 stride_t loc = elem.x * strides[ndim - 1] + elem.y * strides[ndim - 2];
-
109 for (int d = ndim - 3; d >= 0; --d) {
-
110 loc += (elem.z % shape[d]) * strides[d];
-
111 elem.z /= shape[d];
-
112 }
-
113 return loc;
-
114}
-
-
115
-
117// Single Array with fixed N dims
-
118
-
119template <typename stride_t>
-
-
120METAL_FUNC stride_t elem_to_loc_1(uint elem, constant const stride_t& stride) {
-
121 return elem * stride;
-
122}
-
-
123
-
124template <typename stride_t>
-
125METAL_FUNC stride_t
-
-
126elem_to_loc_2(uint2 elem, constant const stride_t strides[2]) {
-
127 return elem.x * strides[1] + elem.y * strides[0];
-
128}
-
-
129
-
130template <typename stride_t>
-
131METAL_FUNC stride_t
-
-
132elem_to_loc_3(uint3 elem, constant const stride_t strides[3]) {
-
133 return elem.x * strides[2] + elem.y * strides[1] + elem.z * strides[0];
-
134}
-
-
135
-
136template <int NDIM>
-
-
137METAL_FUNC size_t elem_to_loc_nd(
-
138 uint elem,
-
139 device const int* shape,
-
140 device const size_t* strides) {
-
141 size_t loc = (elem % shape[NDIM - 1]) * strides[NDIM - 1];
-
142
- -
144 for (int d = NDIM - 2; d >= 0; --d) {
-
145 elem /= shape[d + 1];
-
146 loc += (elem % shape[d]) * strides[d];
-
147 }
-
148
-
149 return loc;
-
150}
-
-
151
-
152template <int NDIM>
-
-
153METAL_FUNC size_t elem_to_loc_nd(
-
154 uint3 elem,
-
155 constant const int shape[NDIM],
-
156 constant const size_t strides[NDIM]) {
-
157 size_t loc = elem.x * strides[NDIM - 1] + elem.y * strides[NDIM - 2];
-
158 for (int d = NDIM - 3; d >= 0; --d) {
-
159 loc += (elem.z % shape[d]) * strides[d];
-
160 elem.z /= shape[d];
-
161 }
-
162 return loc;
-
163}
-
-
164
-
165template <int NDIM>
-
-
166METAL_FUNC int64_t elem_to_loc_nd(
-
167 uint elem,
-
168 constant const int shape[NDIM],
-
169 constant const int64_t strides[NDIM]) {
-
170 int64_t loc = (elem % shape[NDIM - 1]) * strides[NDIM - 1];
-
171
- -
173 for (int d = NDIM - 2; d >= 0; --d) {
-
174 elem /= shape[d + 1];
-
175 loc += (elem % shape[d]) * strides[d];
-
176 }
-
177
-
178 return loc;
-
179}
-
-
180
-
181template <int NDIM>
-
-
182METAL_FUNC int64_t elem_to_loc_nd(
-
183 uint3 elem,
-
184 constant const int shape[NDIM],
-
185 constant const int64_t strides[NDIM]) {
-
186 int64_t loc = elem.x * strides[NDIM - 1] + elem.y * strides[NDIM - 2];
-
187 for (int d = NDIM - 3; d >= 0; --d) {
-
188 loc += (elem.z % shape[d]) * strides[d];
-
189 elem.z /= shape[d];
-
190 }
-
191 return loc;
-
192}
-
-
193
-
195// Multiple Arrays with generic dims
-
196
-
-
197METAL_FUNC uint2 elem_to_loc_2_nd(
-
198 uint3 elem,
-
199 constant const int* shape,
-
200 constant const size_t* a_strides,
-
201 constant const size_t* b_strides,
-
202 int ndim) {
-
203 uint2 loc = {
-
204 static_cast<uint>(
-
205 elem.x * a_strides[ndim - 1] + elem.y * a_strides[ndim - 2]),
-
206 static_cast<uint>(
-
207 elem.x * b_strides[ndim - 1] + elem.y * b_strides[ndim - 2])};
-
208 for (int d = ndim - 3; d >= 0; --d) {
-
209 uint l = elem.z % shape[d];
-
210 loc.x += l * a_strides[d];
-
211 loc.y += l * b_strides[d];
-
212 elem.z /= shape[d];
-
213 }
-
214 return loc;
-
215}
-
-
216
-
-
217METAL_FUNC uint3 elem_to_loc_3_nd(
-
218 uint3 elem,
-
219 constant const int* shape,
-
220 constant const size_t* a_strides,
-
221 constant const size_t* b_strides,
-
222 constant const size_t* c_strides,
-
223 int ndim) {
-
224 uint3 loc = {
-
225 static_cast<uint>(
-
226 elem.x * a_strides[ndim - 1] + elem.y * a_strides[ndim - 2]),
-
227 static_cast<uint>(
-
228 elem.x * b_strides[ndim - 1] + elem.y * b_strides[ndim - 2]),
-
229 static_cast<uint>(
-
230 elem.x * c_strides[ndim - 1] + elem.y * c_strides[ndim - 2])};
-
231 for (int d = ndim - 3; d >= 0; --d) {
-
232 uint l = elem.z % shape[d];
-
233 loc.x += l * a_strides[d];
-
234 loc.y += l * b_strides[d];
-
235 loc.z += l * c_strides[d];
-
236 elem.z /= shape[d];
-
237 }
-
238 return loc;
-
239}
-
-
240
-
242// Multiple Arrays with fixed N dims
-
243
-
244template <int NDIM>
-
-
245METAL_FUNC uint2 elem_to_loc_2_nd(
-
246 uint3 elem,
-
247 constant const int shape[NDIM],
-
248 constant const size_t a_strides[NDIM],
-
249 constant const size_t b_strides[NDIM]) {
-
250 uint2 loc = {
-
251 static_cast<uint>(
-
252 elem.x * a_strides[NDIM - 1] + elem.y * a_strides[NDIM - 2]),
-
253 static_cast<uint>(
-
254 elem.x * b_strides[NDIM - 1] + elem.y * b_strides[NDIM - 2])};
-
255 for (int d = NDIM - 3; d >= 0; --d) {
-
256 uint l = elem.z % shape[d];
-
257 loc.x += l * a_strides[d];
-
258 loc.y += l * b_strides[d];
-
259 elem.z /= shape[d];
-
260 }
-
261 return loc;
-
262}
-
-
263
-
264template <int NDIM>
-
-
265METAL_FUNC uint3 elem_to_loc_3_nd(
-
266 uint3 elem,
-
267 constant const int shape[NDIM],
-
268 constant const size_t a_strides[NDIM],
-
269 constant const size_t b_strides[NDIM],
-
270 constant const size_t c_strides[NDIM]) {
-
271 uint3 loc = {
-
272 static_cast<uint>(
-
273 elem.x * a_strides[NDIM - 1] + elem.y * a_strides[NDIM - 2]),
-
274 static_cast<uint>(
-
275 elem.x * b_strides[NDIM - 1] + elem.y * b_strides[NDIM - 2]),
-
276 static_cast<uint>(
-
277 elem.x * c_strides[NDIM - 1] + elem.y * c_strides[NDIM - 2])};
-
278 for (int d = NDIM - 3; d >= 0; --d) {
-
279 uint l = elem.z % shape[d];
-
280 loc.x += l * a_strides[d];
-
281 loc.y += l * b_strides[d];
-
282 loc.z += l * c_strides[d];
-
283 elem.z /= shape[d];
-
284 }
-
285 return loc;
-
286}
-
-
287
-
289// Calculation utils
-
291
-
-
293inline size_t ceildiv(size_t N, size_t M) {
-
294 return (N + M - 1) / M;
-
295}
-
-
296
-
297// https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html#1202
-
-
298inline float log1p(float x) {
-
299 float xp1 = 1.0f + x;
-
300 if (xp1 == Limits<float>::max) {
-
301 return Limits<float>::max;
-
302 }
-
303 if (xp1 == 1.0f) {
-
304 return x;
-
305 }
-
306
-
307 return x * (metal::log(xp1) / (xp1 - 1.0f));
-
308}
-
-
309
-
- -
311 float xp1 = 1.0f + static_cast<float>(x);
-
312 if (xp1 == Limits<float>::max) {
- -
314 }
-
315 if (xp1 == 1.0f) {
-
316 return x;
-
317 }
-
318
-
319 return bfloat16_t(x * (metal::log(xp1) / (xp1 - 1.0f)));
-
320}
-
-
321
-
323// SIMD shuffle ops
-
325
-
-
326inline uint64_t simd_shuffle_down(uint64_t data, uint16_t delta) {
-
327 return as_type<uint64_t>(
-
328 metal::simd_shuffle_down(as_type<uint2>(data), delta));
-
329}
-
-
330
-
-
331inline int64_t simd_shuffle_down(int64_t data, uint16_t delta) {
-
332 return as_type<int64_t>(
-
333 metal::simd_shuffle_down(as_type<uint2>(data), delta));
-
334}
-
-
335
-
-
336inline bool simd_shuffle_down(bool data, uint16_t delta) {
-
337 return simd_shuffle_down(static_cast<uint32_t>(data), delta);
-
338}
-
- -
struct _MLX_BFloat16 bfloat16_t
Definition bf16.h:257
- -
#define MLX_MTL_PRAGMA_UNROLL
Definition utils.h:68
-
METAL_FUNC stride_t elem_to_loc_1(uint elem, constant const stride_t &stride)
Definition utils.h:120
-
#define instantiate_float_limit(type)
Definition utils.h:41
-
float log1p(float x)
Definition utils.h:298
-
METAL_FUNC stride_t elem_to_loc_3(uint3 elem, constant const stride_t strides[3])
Definition utils.h:132
-
METAL_FUNC stride_t elem_to_loc(uint elem, device const int *shape, device const stride_t *strides, int ndim)
Definition utils.h:74
-
METAL_FUNC uint2 elem_to_loc_2_nd(uint3 elem, constant const int *shape, constant const size_t *a_strides, constant const size_t *b_strides, int ndim)
Definition utils.h:197
-
size_t ceildiv(size_t N, size_t M)
Compute ceil((float)N/(float)M)
Definition utils.h:293
-
METAL_FUNC uint3 elem_to_loc_3_nd(uint3 elem, constant const int *shape, constant const size_t *a_strides, constant const size_t *b_strides, constant const size_t *c_strides, int ndim)
Definition utils.h:217
-
METAL_FUNC size_t elem_to_loc_nd(uint elem, device const int *shape, device const size_t *strides)
Definition utils.h:137
-
#define instantiate_default_limit(type)
Definition utils.h:21
-
METAL_FUNC stride_t elem_to_loc_2(uint2 elem, constant const stride_t strides[2])
Definition utils.h:126
-
METAL_FUNC bfloat16_t log(bfloat16_t x)
Definition bf16_math.h:234
-
METAL_FUNC bfloat16_t simd_shuffle_down(bfloat16_t data, ushort delta)
Definition bf16_math.h:391
-
Definition bf16.h:54
-
Definition utils.h:14
-
static const constant U max
Definition utils.h:15
-
static const constant U finite_max
Definition utils.h:17
-
static const constant U min
Definition utils.h:16
-
static const constant U finite_min
Definition utils.h:18
-
- - - - diff --git a/docs/build/html/backend_2metal_2utils_8h.html b/docs/build/html/backend_2metal_2utils_8h.html deleted file mode 100644 index 9a2da99d3..000000000 --- a/docs/build/html/backend_2metal_2utils_8h.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/utils.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
utils.h File Reference
-
-
-
#include "mlx/array.h"
-#include "mlx/backend/metal/device.h"
-#include "mlx/primitives.h"
-
-

Go to the source code of this file.

- - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
-
- - - - diff --git a/docs/build/html/backend_2metal_2utils_8h_source.html b/docs/build/html/backend_2metal_2utils_8h_source.html deleted file mode 100644 index 5bfd2bb38..000000000 --- a/docs/build/html/backend_2metal_2utils_8h_source.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/utils.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
utils.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include "mlx/array.h"
- -
7#include "mlx/primitives.h"
-
8
-
9namespace mlx::core {
-
10
-
11namespace {
-
12
-
13using metal::CommandEncoder;
-
14
-
15template <typename T>
-
16inline void set_vector_bytes(
-
17 CommandEncoder& enc,
-
18 const std::vector<T>& vec,
-
19 size_t nelems,
-
20 int idx) {
-
21 enc->setBytes(vec.data(), nelems * sizeof(T), idx);
-
22}
-
23
-
24template <typename T>
-
25inline void
-
26set_vector_bytes(CommandEncoder& enc, const std::vector<T>& vec, int idx) {
-
27 return set_vector_bytes(enc, vec, vec.size(), idx);
-
28}
-
29
-
30std::string type_to_name(const array& a) {
-
31 std::string tname;
-
32 switch (a.dtype()) {
-
33 case bool_:
-
34 tname = "bool_";
-
35 break;
-
36 case uint8:
-
37 tname = "uint8";
-
38 break;
-
39 case uint16:
-
40 tname = "uint16";
-
41 break;
-
42 case uint32:
-
43 tname = "uint32";
-
44 break;
-
45 case uint64:
-
46 tname = "uint64";
-
47 break;
-
48 case int8:
-
49 tname = "int8";
-
50 break;
-
51 case int16:
-
52 tname = "int16";
-
53 break;
-
54 case int32:
-
55 tname = "int32";
-
56 break;
-
57 case int64:
-
58 tname = "int64";
-
59 break;
-
60 case float16:
-
61 tname = "float16";
-
62 break;
-
63 case float32:
-
64 tname = "float32";
-
65 break;
-
66 case bfloat16:
-
67 tname = "bfloat16";
-
68 break;
-
69 case complex64:
-
70 tname = "complex64";
-
71 break;
-
72 }
-
73 return tname;
-
74}
-
75
-
76MTL::Size get_block_dims(int dim0, int dim1, int dim2) {
-
77 int pows[3] = {0, 0, 0};
-
78 int sum = 0;
-
79 while (true) {
-
80 int presum = sum;
-
81 // Check all the pows
-
82 if (dim0 >= (1 << (pows[0] + 1))) {
-
83 pows[0]++;
-
84 sum++;
-
85 }
-
86 if (sum == 10) {
-
87 break;
-
88 }
-
89 if (dim1 >= (1 << (pows[1] + 1))) {
-
90 pows[1]++;
-
91 sum++;
-
92 }
-
93 if (sum == 10) {
-
94 break;
-
95 }
-
96 if (dim2 >= (1 << (pows[2] + 1))) {
-
97 pows[2]++;
-
98 sum++;
-
99 }
-
100 if (sum == presum || sum == 10) {
-
101 break;
-
102 }
-
103 }
-
104 return MTL::Size{1ul << pows[0], 1ul << pows[1], 1ul << pows[2]};
-
105}
-
106
-
107inline NS::String* make_string(std::ostringstream& os) {
-
108 std::string string = os.str();
-
109 return NS::String::string(string.c_str(), NS::UTF8StringEncoding);
-
110}
-
111
-
112inline void debug_set_stream_queue_label(MTL::CommandQueue* queue, int index) {
-
113#ifdef MLX_METAL_DEBUG
-
114 std::ostringstream label;
-
115 label << "Stream " << index;
-
116 queue->setLabel(make_string(label));
-
117#endif
-
118}
-
119
-
120inline void debug_set_primitive_buffer_label(
-
121 MTL::CommandBuffer* command_buffer,
-
122 Primitive& primitive) {
-
123#ifdef MLX_METAL_DEBUG
-
124 std::ostringstream label;
-
125 if (auto cbuf_label = command_buffer->label(); cbuf_label) {
-
126 label << cbuf_label->utf8String();
-
127 }
-
128 primitive.print(label);
-
129 command_buffer->setLabel(make_string(label));
-
130#endif
-
131}
-
132
-
133bool is_power_of_2(int n) {
-
134 return ((n & (n - 1)) == 0) && n != 0;
-
135}
-
136
-
137} // namespace
-
138
-
139} // namespace mlx::core
- - -
array sum(const array &a, bool keepdims, StreamOrDevice s={})
Sums the elements of an array.
-
Definition allocator.h:7
-
constexpr Dtype bool_
Definition dtype.h:60
-
constexpr Dtype uint64
Definition dtype.h:65
-
constexpr Dtype uint16
Definition dtype.h:63
-
constexpr Dtype bfloat16
Definition dtype.h:74
-
constexpr Dtype int32
Definition dtype.h:69
-
constexpr Dtype float32
Definition dtype.h:73
-
constexpr Dtype int16
Definition dtype.h:68
-
constexpr Dtype int8
Definition dtype.h:67
-
constexpr Dtype int64
Definition dtype.h:70
-
constexpr Dtype uint8
Definition dtype.h:62
-
constexpr Dtype float16
Definition dtype.h:72
-
constexpr Dtype uint32
Definition dtype.h:64
-
constexpr Dtype complex64
Definition dtype.h:75
- -
- - - - diff --git a/docs/build/html/bc_s.png b/docs/build/html/bc_s.png deleted file mode 100644 index 224b29aa9847d5a4b3902efd602b7ddf7d33e6c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 676 zcmV;V0$crwP)y__>=_9%My z{n931IS})GlGUF8K#6VIbs%684A^L3@%PlP2>_sk`UWPq@f;rU*V%rPy_ekbhXT&s z(GN{DxFv}*vZp`F>S!r||M`I*nOwwKX+BC~3P5N3-)Y{65c;ywYiAh-1*hZcToLHK ztpl1xomJ+Yb}K(cfbJr2=GNOnT!UFA7Vy~fBz8?J>XHsbZoDad^8PxfSa0GDgENZS zuLCEqzb*xWX2CG*b&5IiO#NzrW*;`VC9455M`o1NBh+(k8~`XCEEoC1Ybwf;vr4K3 zg|EB<07?SOqHp9DhLpS&bzgo70I+ghB_#)K7H%AMU3v}xuyQq9&Bm~++VYhF09a+U zl7>n7Jjm$K#b*FONz~fj;I->Bf;ule1prFN9FovcDGBkpg>)O*-}eLnC{6oZHZ$o% zXKW$;0_{8hxHQ>l;_*HATI(`7t#^{$(zLe}h*mqwOc*nRY9=?Sx4OOeVIfI|0V(V2 zBrW#G7Ss9wvzr@>H*`r>zE z+e8bOBgqIgldUJlG(YUDviMB`9+DH8n-s9SXRLyJHO1!=wY^79WYZMTa(wiZ!zP66 zA~!21vmF3H2{ngD;+`6j#~6j;$*f*G_2ZD1E;9(yaw7d-QnSCpK(cR1zU3qU0000< KMNUMnLSTYoA~SLT diff --git a/docs/build/html/bc_sd.png b/docs/build/html/bc_sd.png deleted file mode 100644 index 31ca888dc71049713b35c351933a8d0f36180bf1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 635 zcmV->0)+jEP)Jwi0r1~gdSq#w{Bu1q z`craw(p2!hu$4C_$Oc3X(sI6e=9QSTwPt{G) z=htT&^~&c~L2~e{r5_5SYe7#Is-$ln>~Kd%$F#tC65?{LvQ}8O`A~RBB0N~`2M+waajO;5>3B&-viHGJeEK2TQOiPRa zfDKyqwMc4wfaEh4jt>H`nW_Zidwk@Bowp`}(VUaj-pSI(-1L>FJVsX}Yl9~JsqgsZ zUD9(rMwf23Gez6KPa|wwInZodP-2}9@fK0Ga_9{8SOjU&4l`pH4@qlQp83>>HT$xW zER^U>)MyV%t(Lu=`d=Y?{k1@}&r7ZGkFQ%z%N+sE9BtYjovzxyxCPxN6&@wLK{soQ zSmkj$aLI}miuE^p@~4}mg9OjDfGEkgY4~^XzLRUBB*O{+&vq<3v(E%+k_i%=`~j%{ Vj14gnt9}3g002ovPDHLkV1n!oC4m3{ diff --git a/docs/build/html/bf16__math_8h.html b/docs/build/html/bf16__math_8h.html deleted file mode 100644 index 78e4d59e8..000000000 --- a/docs/build/html/bf16__math_8h.html +++ /dev/null @@ -1,594 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/bf16_math.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
bf16_math.h File Reference
-
-
- -

Go to the source code of this file.

- - - - - - - - -

-Namespaces

namespace  metal
 
namespace  metal::fast
 
namespace  metal::precise
 
- - - - - - - - - - - -

-Macros

#define instantiate_metal_math_funcs(itype, otype, ctype, mfast)
 
#define instantiate_metal_simd_comm_funcs( itype, otype, ctype, itype_to_ctype, ctype_to_otype)
 
#define instantiate_metal_simd_reduction_funcs(itype, otype, ctype)
 
#define bfloat16_to_uint16(x)   x.bits_
 
#define uint16_to_bfloat16(x)   _MLX_BFloat16(x, _MLX_BFloat16::bits_to_bfloat())
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

METAL_FUNC bfloat16_t metal::abs (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::acos (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::acosh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::asin (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::asinh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::atan (bfloat16_t y_over_x)
 
METAL_FUNC bfloat16_t metal::atan2 (bfloat16_t y, bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::atanh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::ceil (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::cos (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::cosh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::cospi (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::divide (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::exp (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::exp10 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::exp2 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fabs (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fdim (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::floor (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fma (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::fmax (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fmax3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::fmedian3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::fmin (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fmin3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::fmod (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fract (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::frexp (bfloat16_t x, thread int &exp)
 
METAL_FUNC bfloat16_t metal::ldexp (bfloat16_t x, int k)
 
METAL_FUNC bfloat16_t metal::log (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::log10 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::log2 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::max (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::max3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::median3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::min (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::min3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::nextafter (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::pow (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::powr (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::rint (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::round (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::rsqrt (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::sin (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::sinh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::sinpi (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::sqrt (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::tan (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::tanh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::tanpi (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::trunc (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::abs (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::acos (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::acosh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::asin (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::asinh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::atan (bfloat16_t y_over_x)
 
METAL_FUNC bfloat16_t metal::fast::atan2 (bfloat16_t y, bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::atanh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::ceil (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::cos (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::cosh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::cospi (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::divide (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fast::exp (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::exp10 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::exp2 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::fabs (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::fdim (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fast::floor (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::fma (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::fast::fmax (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fast::fmax3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::fast::fmedian3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::fast::fmin (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fast::fmin3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::fast::fmod (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fast::fract (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::frexp (bfloat16_t x, thread int &exp)
 
METAL_FUNC bfloat16_t metal::fast::ldexp (bfloat16_t x, int k)
 
METAL_FUNC bfloat16_t metal::fast::log (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::log10 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::log2 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::max (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fast::max3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::fast::median3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::fast::min (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fast::min3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::fast::nextafter (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fast::pow (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fast::powr (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::fast::rint (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::round (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::rsqrt (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::sin (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::sinh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::sinpi (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::sqrt (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::tan (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::tanh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::tanpi (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::fast::trunc (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::abs (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::acos (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::acosh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::asin (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::asinh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::atan (bfloat16_t y_over_x)
 
METAL_FUNC bfloat16_t metal::precise::atan2 (bfloat16_t y, bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::atanh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::ceil (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::cos (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::cosh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::cospi (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::divide (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::precise::exp (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::exp10 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::exp2 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::fabs (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::fdim (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::precise::floor (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::fma (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::precise::fmax (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::precise::fmax3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::precise::fmedian3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::precise::fmin (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::precise::fmin3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::precise::fmod (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::precise::fract (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::frexp (bfloat16_t x, thread int &exp)
 
METAL_FUNC bfloat16_t metal::precise::ldexp (bfloat16_t x, int k)
 
METAL_FUNC bfloat16_t metal::precise::log (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::log10 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::log2 (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::max (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::precise::max3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::precise::median3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::precise::min (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::precise::min3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
 
METAL_FUNC bfloat16_t metal::precise::nextafter (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::precise::pow (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::precise::powr (bfloat16_t x, bfloat16_t y)
 
METAL_FUNC bfloat16_t metal::precise::rint (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::round (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::rsqrt (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::sin (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::sinh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::sinpi (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::sqrt (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::tan (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::tanh (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::tanpi (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::precise::trunc (bfloat16_t x)
 
METAL_FUNC bfloat16_t metal::simd_broadcast (bfloat16_t data, ushort broadcast_lane_id)
 
METAL_FUNC bfloat16_t metal::simd_shuffle (bfloat16_t data, ushort simd_lane_id)
 
METAL_FUNC bfloat16_t metal::simd_shuffle_and_fill_down (bfloat16_t data, bfloat16_t filling_data, ushort delta, ushort modulo)
 
METAL_FUNC bfloat16_t metal::simd_shuffle_and_fill_down (bfloat16_t data, bfloat16_t filling_data, ushort delta)
 
METAL_FUNC bfloat16_t metal::simd_shuffle_and_fill_up (bfloat16_t data, bfloat16_t filling_data, ushort delta, ushort modulo)
 
METAL_FUNC bfloat16_t metal::simd_shuffle_and_fill_up (bfloat16_t data, bfloat16_t filling_data, ushort delta)
 
METAL_FUNC bfloat16_t metal::simd_shuffle_down (bfloat16_t data, ushort delta)
 
METAL_FUNC bfloat16_t metal::simd_shuffle_rotate_down (bfloat16_t data, ushort delta)
 
METAL_FUNC bfloat16_t metal::simd_shuffle_rotate_up (bfloat16_t data, ushort delta)
 
METAL_FUNC bfloat16_t metal::simd_shuffle_up (bfloat16_t data, ushort delta)
 
METAL_FUNC bfloat16_t metal::simd_shuffle_xor (bfloat16_t data, ushort mask)
 
METAL_FUNC bfloat16_t metal::simd_max (bfloat16_t data)
 
METAL_FUNC bfloat16_t metal::simd_min (bfloat16_t data)
 
METAL_FUNC bfloat16_t metal::simd_prefix_exclusive_product (bfloat16_t data)
 
METAL_FUNC bfloat16_t metal::simd_prefix_exclusive_sum (bfloat16_t data)
 
METAL_FUNC bfloat16_t metal::simd_prefix_inclusive_product (bfloat16_t data)
 
METAL_FUNC bfloat16_t metal::simd_prefix_inclusive_sum (bfloat16_t data)
 
METAL_FUNC bfloat16_t metal::simd_product (bfloat16_t data)
 
METAL_FUNC bfloat16_t metal::simd_sum (bfloat16_t data)
 
METAL_FUNC bfloat16_t metal::simd_xor (bfloat16_t data)
 
-

Macro Definition Documentation

- -

◆ bfloat16_to_uint16

- -
-
- - - - - - - -
#define bfloat16_to_uint16( x)   x.bits_
-
- -
-
- -

◆ instantiate_metal_math_funcs

- -
-
- - - - - - - - - - - - - - - - - - - - - -
#define instantiate_metal_math_funcs( itype,
otype,
ctype,
mfast )
-
- -
-
- -

◆ instantiate_metal_simd_comm_funcs

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
#define instantiate_metal_simd_comm_funcs( itype,
otype,
ctype,
itype_to_ctype,
ctype_to_otype )
-
- -
-
- -

◆ instantiate_metal_simd_reduction_funcs

- -
-
- - - - - - - - - - - - - - - - -
#define instantiate_metal_simd_reduction_funcs( itype,
otype,
ctype )
-
- -
-
- -

◆ uint16_to_bfloat16

- -
-
- - - - - - - -
#define uint16_to_bfloat16( x)   _MLX_BFloat16(x, _MLX_BFloat16::bits_to_bfloat())
-
- -
-
-
- - - - diff --git a/docs/build/html/bf16__math_8h_source.html b/docs/build/html/bf16__math_8h_source.html deleted file mode 100644 index f8c7bfe2d..000000000 --- a/docs/build/html/bf16__math_8h_source.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/bf16_math.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
bf16_math.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4
- -
6
-
8// Metal math for bfloat16
-
10
-
11/*
-
12
-
13Following the Metal Shading Language Specification (Metal 3.1)
-
14
-
15"bfloat is an extended itypeing point type that only allows implicit conversion
-
16 to a type of greater itypeing point rank. While bfloat can be implicitly
-
17 converted to itype, it cannot be implicitly converted to half, and neither
-
18 itype nor half can be implicitly converted to bfloat."
-
19
-
20Further, as far as I can tell, the stdlib math/simd functions are not defined
-
21for bfloat and calling with an argument of type bfloat will result in that
-
22argument getting implicitly converted to itype which then returns an output
-
23that is (likely) a itype which cannot be implicitly converted into a bfloat
-
24
-
25This leads to situations where
-
26bfloat a = 5.0bf;
-
27bfloat b = metal::abs(a); // this will throw an error since abs return itype
-
28bfloat c = static_cast<bfloat>(metal::abs(a)); // this is fine
-
29
-
30For the moment, I will be adding overloaded instantiations of the math
-
31functions to accordingly automatically handle the casting
-
32
-
33*/
-
34
-
-
35#define instantiate_metal_math_funcs(itype, otype, ctype, mfast) \
-
36 \
-
37 METAL_FUNC otype abs(itype x) { \
-
38 return static_cast<otype>(__metal_fabs(static_cast<ctype>(x), mfast)); \
-
39 } \
-
40 METAL_FUNC otype acos(itype x) { \
-
41 return static_cast<otype>(__metal_acos(static_cast<ctype>(x), mfast)); \
-
42 } \
-
43 METAL_FUNC otype acosh(itype x) { \
-
44 return static_cast<otype>(__metal_acosh(static_cast<ctype>(x), mfast)); \
-
45 } \
-
46 METAL_FUNC otype asin(itype x) { \
-
47 return static_cast<otype>(__metal_asin(static_cast<ctype>(x), mfast)); \
-
48 } \
-
49 METAL_FUNC otype asinh(itype x) { \
-
50 return static_cast<otype>(__metal_asinh(static_cast<ctype>(x), mfast)); \
-
51 } \
-
52 METAL_FUNC otype atan(itype y_over_x) { \
-
53 return static_cast<otype>( \
-
54 __metal_atan(static_cast<ctype>(y_over_x), mfast)); \
-
55 } \
-
56 METAL_FUNC otype atan2(itype y, itype x) { \
-
57 return static_cast<otype>( \
-
58 __metal_atan2(static_cast<ctype>(y), static_cast<ctype>(x), mfast)); \
-
59 } \
-
60 METAL_FUNC otype atanh(itype x) { \
-
61 return static_cast<otype>(__metal_atanh(static_cast<ctype>(x), mfast)); \
-
62 } \
-
63 METAL_FUNC otype ceil(itype x) { \
-
64 return static_cast<otype>(__metal_ceil(static_cast<ctype>(x), mfast)); \
-
65 } \
-
66 METAL_FUNC otype cos(itype x) { \
-
67 return static_cast<otype>(__metal_cos(static_cast<ctype>(x), mfast)); \
-
68 } \
-
69 METAL_FUNC otype cosh(itype x) { \
-
70 return static_cast<otype>(__metal_cosh(static_cast<ctype>(x), mfast)); \
-
71 } \
-
72 METAL_FUNC otype cospi(itype x) { \
-
73 return static_cast<otype>(__metal_cospi(static_cast<ctype>(x), mfast)); \
-
74 } \
-
75 METAL_FUNC otype divide(itype x, itype y) { \
-
76 return static_cast<otype>( \
-
77 __metal_divide(static_cast<ctype>(x), static_cast<ctype>(y), mfast)); \
-
78 } \
-
79 METAL_FUNC otype exp(itype x) { \
-
80 return static_cast<otype>(__metal_exp(static_cast<ctype>(x), mfast)); \
-
81 } \
-
82 METAL_FUNC otype exp10(itype x) { \
-
83 return static_cast<otype>(__metal_exp10(static_cast<ctype>(x), mfast)); \
-
84 } \
-
85 METAL_FUNC otype exp2(itype x) { \
-
86 return static_cast<otype>(__metal_exp2(static_cast<ctype>(x), mfast)); \
-
87 } \
-
88 METAL_FUNC otype fabs(itype x) { \
-
89 return static_cast<otype>(__metal_fabs(static_cast<ctype>(x), mfast)); \
-
90 } \
-
91 METAL_FUNC otype fdim(itype x, itype y) { \
-
92 ctype t = static_cast<ctype>(x - y); \
-
93 return static_cast<otype>(select(t, ctype(0), t < ctype(0) || x == y)); \
-
94 } \
-
95 METAL_FUNC otype floor(itype x) { \
-
96 return static_cast<otype>(__metal_floor(static_cast<ctype>(x), mfast)); \
-
97 } \
-
98 METAL_FUNC otype fma(itype x, itype y, itype z) { \
-
99 return static_cast<otype>(__metal_fma( \
-
100 static_cast<ctype>(x), static_cast<ctype>(y), static_cast<ctype>(z))); \
-
101 } \
-
102 METAL_FUNC otype fmax(itype x, itype y) { \
-
103 return static_cast<otype>( \
-
104 __metal_fmax(static_cast<ctype>(x), static_cast<ctype>(y), mfast)); \
-
105 } \
-
106 METAL_FUNC otype fmax3(itype x, itype y, itype z) { \
-
107 return static_cast<otype>(__metal_fmax3( \
-
108 static_cast<ctype>(x), \
-
109 static_cast<ctype>(y), \
-
110 static_cast<ctype>(z), \
-
111 mfast)); \
-
112 } \
-
113 METAL_FUNC otype fmedian3(itype x, itype y, itype z) { \
-
114 return static_cast<otype>(__metal_fmedian3( \
-
115 static_cast<ctype>(x), \
-
116 static_cast<ctype>(y), \
-
117 static_cast<ctype>(z), \
-
118 mfast)); \
-
119 } \
-
120 METAL_FUNC otype fmin(itype x, itype y) { \
-
121 return static_cast<otype>( \
-
122 __metal_fmin(static_cast<ctype>(x), static_cast<ctype>(y), mfast)); \
-
123 } \
-
124 METAL_FUNC otype fmin3(itype x, itype y, itype z) { \
-
125 return static_cast<otype>(__metal_fmin3( \
-
126 static_cast<ctype>(x), \
-
127 static_cast<ctype>(y), \
-
128 static_cast<ctype>(z), \
-
129 mfast)); \
-
130 } \
-
131 METAL_FUNC otype fmod(itype x, itype y) { \
-
132 return static_cast<otype>( \
-
133 __metal_fmod(static_cast<ctype>(x), static_cast<ctype>(y), mfast)); \
-
134 } \
-
135 METAL_FUNC otype fract(itype x) { \
-
136 return static_cast<otype>(__metal_fract(static_cast<ctype>(x), mfast)); \
-
137 } \
-
138 METAL_FUNC otype frexp(itype x, thread int& exp) { \
-
139 return static_cast<otype>(__metal_frexp(static_cast<ctype>(x), &exp)); \
-
140 } \
-
141 METAL_FUNC otype ldexp(itype x, int k) { \
-
142 return static_cast<otype>(__metal_ldexp(static_cast<ctype>(x), k, mfast)); \
-
143 } \
-
144 METAL_FUNC otype log(itype x) { \
-
145 return static_cast<otype>(__metal_log(static_cast<ctype>(x), mfast)); \
-
146 } \
-
147 METAL_FUNC otype log10(itype x) { \
-
148 return static_cast<otype>(__metal_log10(static_cast<ctype>(x), mfast)); \
-
149 } \
-
150 METAL_FUNC otype log2(itype x) { \
-
151 return static_cast<otype>(__metal_log2(static_cast<ctype>(x), mfast)); \
-
152 } \
-
153 METAL_FUNC otype max(itype x, itype y) { \
-
154 return static_cast<otype>( \
-
155 __metal_fmax(static_cast<ctype>(x), static_cast<ctype>(y), mfast)); \
-
156 } \
-
157 METAL_FUNC otype max3(itype x, itype y, itype z) { \
-
158 return static_cast<otype>(__metal_fmax3( \
-
159 static_cast<ctype>(x), \
-
160 static_cast<ctype>(y), \
-
161 static_cast<ctype>(z), \
-
162 mfast)); \
-
163 } \
-
164 METAL_FUNC otype median3(itype x, itype y, itype z) { \
-
165 return static_cast<otype>(__metal_fmedian3( \
-
166 static_cast<ctype>(x), \
-
167 static_cast<ctype>(y), \
-
168 static_cast<ctype>(z), \
-
169 mfast)); \
-
170 } \
-
171 METAL_FUNC otype min(itype x, itype y) { \
-
172 return static_cast<otype>( \
-
173 __metal_fmin(static_cast<ctype>(x), static_cast<ctype>(y), mfast)); \
-
174 } \
-
175 METAL_FUNC otype min3(itype x, itype y, itype z) { \
-
176 return static_cast<otype>(__metal_fmin3( \
-
177 static_cast<ctype>(x), \
-
178 static_cast<ctype>(y), \
-
179 static_cast<ctype>(z), \
-
180 mfast)); \
-
181 } \
-
182 METAL_FUNC otype nextafter(itype x, itype y) { \
-
183 return static_cast<otype>( \
-
184 __metal_nextafter(static_cast<ctype>(x), static_cast<ctype>(y))); \
-
185 } \
-
186 METAL_FUNC otype pow(itype x, itype y) { \
-
187 return static_cast<otype>( \
-
188 __metal_pow(static_cast<ctype>(x), static_cast<ctype>(y), mfast)); \
-
189 } \
-
190 METAL_FUNC otype powr(itype x, itype y) { \
-
191 return static_cast<otype>( \
-
192 __metal_powr(static_cast<ctype>(x), static_cast<ctype>(y), mfast)); \
-
193 } \
-
194 METAL_FUNC otype rint(itype x) { \
-
195 return static_cast<otype>(__metal_rint(static_cast<ctype>(x), mfast)); \
-
196 } \
-
197 METAL_FUNC otype round(itype x) { \
-
198 return static_cast<otype>(__metal_round(static_cast<ctype>(x), mfast)); \
-
199 } \
-
200 METAL_FUNC otype rsqrt(itype x) { \
-
201 return static_cast<otype>(__metal_rsqrt(static_cast<ctype>(x), mfast)); \
-
202 } \
-
203 METAL_FUNC otype sin(itype x) { \
-
204 return static_cast<otype>(__metal_sin(static_cast<ctype>(x), mfast)); \
-
205 } \
-
206 METAL_FUNC otype sinh(itype x) { \
-
207 return static_cast<otype>(__metal_sinh(static_cast<ctype>(x), mfast)); \
-
208 } \
-
209 METAL_FUNC otype sinpi(itype x) { \
-
210 return static_cast<otype>(__metal_sinpi(static_cast<ctype>(x), mfast)); \
-
211 } \
-
212 METAL_FUNC otype sqrt(itype x) { \
-
213 return static_cast<otype>(__metal_sqrt(static_cast<ctype>(x), mfast)); \
-
214 } \
-
215 METAL_FUNC otype tan(itype x) { \
-
216 return static_cast<otype>(__metal_tan(static_cast<ctype>(x), mfast)); \
-
217 } \
-
218 METAL_FUNC otype tanh(itype x) { \
-
219 return static_cast<otype>(__metal_tanh(static_cast<ctype>(x), mfast)); \
-
220 } \
-
221 METAL_FUNC otype tanpi(itype x) { \
-
222 return static_cast<otype>(__metal_tanpi(static_cast<ctype>(x), mfast)); \
-
223 } \
-
224 METAL_FUNC otype trunc(itype x) { \
-
225 return static_cast<otype>(__metal_trunc(static_cast<ctype>(x), mfast)); \
-
226 }
-
-
227
-
228namespace metal {
-
229
- - - -
233 float,
-
234 __METAL_MAYBE_FAST_MATH__);
-
235
-
-
236namespace fast {
-
237
- - - -
241 float,
-
242 __METAL_FAST_MATH__);
-
243
-
244} // namespace fast
-
-
245
-
-
246namespace precise {
-
247
- - - -
251 float,
-
252 __METAL_PRECISE_MATH__);
-
253
-
254} // namespace precise
-
-
255
-
256} // namespace metal
-
257
-
259// Metal simd for bfloat16
-
261
-
262#define instantiate_metal_simd_comm_funcs( \
-
263 itype, otype, ctype, itype_to_ctype, ctype_to_otype) \
-
264 \
-
265 METAL_FUNC otype simd_broadcast(itype data, ushort broadcast_lane_id) { \
-
266 return ctype_to_otype( \
-
267 __metal_simd_broadcast(itype_to_ctype(data), broadcast_lane_id)); \
-
268 } \
-
269 \
-
270 METAL_FUNC otype simd_shuffle(itype data, ushort simd_lane_id) { \
-
271 return ctype_to_otype( \
-
272 __metal_simd_shuffle(itype_to_ctype(data), simd_lane_id)); \
-
273 } \
-
274 \
-
275 METAL_FUNC otype simd_shuffle_and_fill_down( \
-
276 itype data, itype filling_data, ushort delta, ushort modulo) { \
-
277 return ctype_to_otype(__metal_simd_shuffle_and_fill_down( \
-
278 itype_to_ctype(data), itype_to_ctype(filling_data), delta, modulo)); \
-
279 } \
-
280 \
-
281 METAL_FUNC otype simd_shuffle_and_fill_down( \
-
282 itype data, itype filling_data, ushort delta) { \
-
283 return ctype_to_otype(__metal_simd_shuffle_and_fill_down( \
-
284 itype_to_ctype(data), \
-
285 itype_to_ctype(filling_data), \
-
286 delta, \
-
287 __metal_get_simdgroup_size(ushort()))); \
-
288 } \
-
289 \
-
290 METAL_FUNC otype simd_shuffle_and_fill_up( \
-
291 itype data, itype filling_data, ushort delta, ushort modulo) { \
-
292 return ctype_to_otype(__metal_simd_shuffle_and_fill_up( \
-
293 itype_to_ctype(data), itype_to_ctype(filling_data), delta, modulo)); \
-
294 } \
-
295 \
-
296 METAL_FUNC otype simd_shuffle_and_fill_up( \
-
297 itype data, itype filling_data, ushort delta) { \
-
298 return ctype_to_otype(__metal_simd_shuffle_and_fill_up( \
-
299 itype_to_ctype(data), \
-
300 itype_to_ctype(filling_data), \
-
301 delta, \
-
302 __metal_get_simdgroup_size(ushort()))); \
-
303 } \
-
304 \
-
305 METAL_FUNC otype simd_shuffle_down(itype data, ushort delta) { \
-
306 return ctype_to_otype( \
-
307 __metal_simd_shuffle_down(itype_to_ctype(data), delta)); \
-
308 } \
-
309 \
-
310 METAL_FUNC otype simd_shuffle_rotate_down(itype data, ushort delta) { \
-
311 return ctype_to_otype( \
-
312 __metal_simd_shuffle_rotate_down(itype_to_ctype(data), delta)); \
-
313 } \
-
314 \
-
315 METAL_FUNC otype simd_shuffle_rotate_up(itype data, ushort delta) { \
-
316 return ctype_to_otype( \
-
317 __metal_simd_shuffle_rotate_up(itype_to_ctype(data), delta)); \
-
318 } \
-
319 \
-
320 METAL_FUNC otype simd_shuffle_up(itype data, ushort delta) { \
-
321 return ctype_to_otype( \
-
322 __metal_simd_shuffle_up(itype_to_ctype(data), delta)); \
-
323 } \
-
324 \
-
325 METAL_FUNC otype simd_shuffle_xor(itype data, ushort mask) { \
-
326 return ctype_to_otype( \
-
327 __metal_simd_shuffle_xor(itype_to_ctype(data), mask)); \
-
328 }
-
329
-
-
330#define instantiate_metal_simd_reduction_funcs(itype, otype, ctype) \
-
331 \
-
332 METAL_FUNC otype simd_max(itype data) { \
-
333 return static_cast<otype>(__metal_simd_max(static_cast<ctype>(data))); \
-
334 } \
-
335 \
-
336 METAL_FUNC otype simd_min(itype data) { \
-
337 return static_cast<otype>(__metal_simd_min(static_cast<ctype>(data))); \
-
338 } \
-
339 \
-
340 METAL_FUNC otype simd_prefix_exclusive_product(itype data) { \
-
341 return static_cast<otype>( \
-
342 __metal_simd_prefix_exclusive_product(static_cast<ctype>(data))); \
-
343 } \
-
344 \
-
345 METAL_FUNC otype simd_prefix_exclusive_sum(itype data) { \
-
346 return static_cast<otype>( \
-
347 __metal_simd_prefix_exclusive_sum(static_cast<ctype>(data))); \
-
348 } \
-
349 \
-
350 METAL_FUNC otype simd_prefix_inclusive_product(itype data) { \
-
351 return static_cast<otype>( \
-
352 __metal_simd_prefix_inclusive_product(static_cast<ctype>(data))); \
-
353 } \
-
354 \
-
355 METAL_FUNC otype simd_prefix_inclusive_sum(itype data) { \
-
356 return static_cast<otype>( \
-
357 __metal_simd_prefix_inclusive_sum(static_cast<ctype>(data))); \
-
358 } \
-
359 \
-
360 METAL_FUNC otype simd_product(itype data) { \
-
361 return static_cast<otype>(__metal_simd_product(static_cast<ctype>(data))); \
-
362 } \
-
363 \
-
364 METAL_FUNC otype simd_sum(itype data) { \
-
365 return static_cast<otype>(__metal_simd_sum(static_cast<ctype>(data))); \
-
366 } \
-
367 \
-
368 METAL_FUNC otype simd_xor(itype data) { \
-
369 return static_cast<otype>(__metal_simd_xor(static_cast<ctype>(data))); \
-
370 }
-
-
371
-
372#if defined METAL_3_1 || (__METAL_VERSION__ >= 310)
-
373
-
374#define bfloat16_to_uint16(x) as_type<uint16_t>(x)
-
375#define uint16_to_bfloat16(x) as_type<bfloat16_t>(x)
-
376
-
377#else
-
378
-
379#define bfloat16_to_uint16(x) x.bits_
-
380#define uint16_to_bfloat16(x) _MLX_BFloat16(x, _MLX_BFloat16::bits_to_bfloat())
-
381
-
382#endif
-
383
-
384namespace metal {
-
385
- - - -
389 uint16_t,
- - - -
393
-
394} // namespace metal
- -
#define uint16_to_bfloat16(x)
Definition bf16_math.h:380
-
#define instantiate_metal_simd_reduction_funcs(itype, otype, ctype)
Definition bf16_math.h:330
-
#define bfloat16_to_uint16(x)
Definition bf16_math.h:379
-
#define instantiate_metal_math_funcs(itype, otype, ctype, mfast)
Definition bf16_math.h:35
-
#define instantiate_metal_simd_comm_funcs( itype, otype, ctype, itype_to_ctype, ctype_to_otype)
Definition bf16_math.h:262
-
Definition bf16.h:265
-
Definition bf16.h:54
-
- - - - diff --git a/docs/build/html/binary__two_8h.html b/docs/build/html/binary__two_8h.html deleted file mode 100644 index 9e8fa3dee..000000000 --- a/docs/build/html/binary__two_8h.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/binary_two.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
binary_two.h File Reference
-
-
- -

Go to the source code of this file.

- - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
-
- - - - diff --git a/docs/build/html/binary__two_8h_source.html b/docs/build/html/binary__two_8h_source.html deleted file mode 100644 index f6d72e878..000000000 --- a/docs/build/html/binary__two_8h_source.html +++ /dev/null @@ -1,646 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/binary_two.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
binary_two.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4
- - -
7
-
8namespace mlx::core {
-
9
-
10namespace {
-
11
-
12template <typename T, typename U, typename Op>
-
13void binary_op_dims1(
-
14 const array& a,
-
15 const array& b,
-
16 array& out_a,
-
17 array& out_b,
-
18 Op op) {
-
19 const T* a_ptr = a.data<T>();
-
20 const T* b_ptr = b.data<T>();
-
21 U* dst_a = out_a.data<U>();
-
22 U* dst_b = out_b.data<U>();
-
23 size_t a_idx = 0;
-
24 size_t b_idx = 0;
-
25 for (size_t i = 0; i < out_a.size(); ++i) {
-
26 auto dst = op(a_ptr[a_idx], b_ptr[b_idx]);
-
27 dst_a[i] = dst.first;
-
28 dst_b[i] = dst.second;
-
29 a_idx += a.strides()[0];
-
30 b_idx += b.strides()[0];
-
31 }
-
32}
-
33
-
34template <typename T, typename U, typename Op>
-
35void binary_op_dims1(
-
36 const array& a,
-
37 const array& b,
-
38 array& out_a,
-
39 array& out_b,
-
40 Op op,
-
41 int stride) {
-
42 const T* a_ptr = a.data<T>();
-
43 const T* b_ptr = b.data<T>();
-
44 U* dst_a = out_a.data<U>();
-
45 U* dst_b = out_b.data<U>();
-
46 size_t a_idx = 0;
-
47 size_t b_idx = 0;
-
48 for (size_t i = 0; i < a.shape()[0]; i++) {
-
49 op(a_ptr + a_idx, b_ptr + b_idx, dst_a, dst_b, stride);
-
50 a_idx += a.strides()[0];
-
51 b_idx += b.strides()[0];
-
52 dst_a += stride;
-
53 dst_b += stride;
-
54 }
-
55}
-
56
-
57template <typename T, typename U, typename Op>
-
58void binary_op_dims2(
-
59 const array& a,
-
60 const array& b,
-
61 array& out_a,
-
62 array& out_b,
-
63 Op op) {
-
64 const T* a_ptr = a.data<T>();
-
65 const T* b_ptr = b.data<T>();
-
66 U* dst_a = out_a.data<U>();
-
67 U* dst_b = out_b.data<U>();
-
68 size_t a_idx = 0;
-
69 size_t b_idx = 0;
-
70 size_t out_idx = 0;
-
71 for (size_t i = 0; i < a.shape()[0]; ++i) {
-
72 for (size_t j = 0; j < a.shape()[1]; ++j) {
-
73 auto dst = op(a_ptr[a_idx], b_ptr[b_idx]);
-
74 dst_a[out_idx] = dst.first;
-
75 dst_b[out_idx++] = dst.second;
-
76 a_idx += a.strides()[1];
-
77 b_idx += b.strides()[1];
-
78 }
-
79 a_idx += a.strides()[0] - a.strides()[1] * a.shape()[1];
-
80 b_idx += b.strides()[0] - b.strides()[1] * b.shape()[1];
-
81 }
-
82}
-
83
-
84template <typename T, typename U, typename Op>
-
85void binary_op_dims2(
-
86 const array& a,
-
87 const array& b,
-
88 array& out_a,
-
89 array& out_b,
-
90 Op op,
-
91 int stride) {
-
92 const T* a_ptr = a.data<T>();
-
93 const T* b_ptr = b.data<T>();
-
94 U* dst_a = out_a.data<U>();
-
95 U* dst_b = out_b.data<U>();
-
96 size_t a_idx = 0;
-
97 size_t b_idx = 0;
-
98 for (size_t i = 0; i < a.shape()[0]; ++i) {
-
99 for (size_t j = 0; j < a.shape()[1]; ++j) {
-
100 op(a_ptr + a_idx, b_ptr + b_idx, dst_a, dst_b, stride);
-
101 a_idx += a.strides()[1];
-
102 b_idx += b.strides()[1];
-
103 dst_a += stride;
-
104 dst_b += stride;
-
105 }
-
106 a_idx += a.strides()[0] - a.strides()[1] * a.shape()[1];
-
107 b_idx += b.strides()[0] - b.strides()[1] * b.shape()[1];
-
108 }
-
109}
-
110
-
111template <typename T, typename U, typename Op>
-
112void binary_op_dims3(
-
113 const array& a,
-
114 const array& b,
-
115 array& out_a,
-
116 array& out_b,
-
117 Op op) {
-
118 const T* a_ptr = a.data<T>();
-
119 const T* b_ptr = b.data<T>();
-
120 U* dst_a = out_a.data<U>();
-
121 U* dst_b = out_b.data<U>();
-
122 size_t a_idx = 0;
-
123 size_t b_idx = 0;
-
124 size_t out_idx = 0;
-
125 for (size_t i = 0; i < a.shape()[0]; ++i) {
-
126 for (size_t j = 0; j < a.shape()[1]; ++j) {
-
127 for (size_t k = 0; k < a.shape()[2]; ++k) {
-
128 auto dst = op(a_ptr[a_idx], b_ptr[b_idx]);
-
129 dst_a[out_idx] = dst.first;
-
130 dst_b[out_idx++] = dst.second;
-
131 a_idx += a.strides()[2];
-
132 b_idx += b.strides()[2];
-
133 }
-
134 a_idx += a.strides()[1] - a.strides()[2] * a.shape()[2];
-
135 b_idx += b.strides()[1] - b.strides()[2] * b.shape()[2];
-
136 }
-
137 a_idx += a.strides()[0] - a.strides()[1] * a.shape()[1];
-
138 b_idx += b.strides()[0] - b.strides()[1] * b.shape()[1];
-
139 }
-
140}
-
141
-
142template <typename T, typename U, typename Op>
-
143void binary_op_dims4(
-
144 const array& a,
-
145 const array& b,
-
146 array& out_a,
-
147 array& out_b,
-
148 Op op) {
-
149 const T* a_ptr = a.data<T>();
-
150 const T* b_ptr = b.data<T>();
-
151 U* dst_a = out_a.data<U>();
-
152 U* dst_b = out_b.data<U>();
-
153 size_t a_idx = 0;
-
154 size_t b_idx = 0;
-
155 size_t out_idx = 0;
-
156 for (size_t i = 0; i < a.shape()[0]; ++i) {
-
157 for (size_t j = 0; j < a.shape()[1]; ++j) {
-
158 for (size_t k = 0; k < a.shape()[2]; ++k) {
-
159 for (size_t ii = 0; ii < a.shape()[3]; ++ii) {
-
160 auto dst = op(a_ptr[a_idx], b_ptr[b_idx]);
-
161 dst_a[out_idx] = dst.first;
-
162 dst_b[out_idx++] = dst.second;
-
163 a_idx += a.strides()[3];
-
164 b_idx += b.strides()[3];
-
165 }
-
166 a_idx += a.strides()[2] - a.strides()[3] * a.shape()[3];
-
167 b_idx += b.strides()[2] - b.strides()[3] * b.shape()[3];
-
168 }
-
169 a_idx += a.strides()[1] - a.strides()[2] * a.shape()[2];
-
170 b_idx += b.strides()[1] - b.strides()[2] * b.shape()[2];
-
171 }
-
172 a_idx += a.strides()[0] - a.strides()[1] * a.shape()[1];
-
173 b_idx += b.strides()[0] - b.strides()[1] * b.shape()[1];
-
174 }
-
175}
-
176
-
177template <typename T, typename U, typename Op>
-
178void binary_op_dispatch_dims(
-
179 const array& a,
-
180 const array& b,
-
181 array& out_a,
-
182 array& out_b,
-
183 Op op) {
-
184 switch (out_a.ndim()) {
-
185 case 1:
-
186 binary_op_dims1<T, U, Op>(a, b, out_a, out_b, op);
-
187 return;
-
188 case 2:
-
189 binary_op_dims2<T, U, Op>(a, b, out_a, out_b, op);
-
190 return;
-
191 case 3:
-
192 binary_op_dims3<T, U, Op>(a, b, out_a, out_b, op);
-
193 return;
-
194 case 4:
-
195 binary_op_dims4<T, U, Op>(a, b, out_a, out_b, op);
-
196 return;
-
197 }
-
198
-
199 const T* a_ptr = a.data<T>();
-
200 const T* b_ptr = b.data<T>();
-
201 U* dst_a = out_a.data<U>();
-
202 U* dst_b = out_b.data<U>();
-
203 for (size_t i = 0; i < out_a.size(); i++) {
-
204 int a_idx = elem_to_loc(i, a.shape(), a.strides());
-
205 int b_idx = elem_to_loc(i, b.shape(), b.strides());
-
206 std::tie(dst_a[i], dst_b[i]) = op(a_ptr[a_idx], b_ptr[b_idx]);
-
207 }
-
208}
-
209
-
210template <typename T, typename U, typename Op>
-
211void binary_op_dispatch_dims(
-
212 const array& a,
-
213 const array& b,
-
214 array& out_a,
-
215 array& out_b,
-
216 Op op,
-
217 int dim,
-
218 int stride) {
-
219 // Number of dimensions to loop over for vectorized ops
-
220 switch (dim) {
-
221 case 1:
-
222 binary_op_dims1<T, U, Op>(a, b, out_a, out_b, op, stride);
-
223 return;
-
224 case 2:
-
225 binary_op_dims2<T, U, Op>(a, b, out_a, out_b, op, stride);
-
226 return;
-
227 }
-
228
-
229 const T* a_ptr = a.data<T>();
-
230 const T* b_ptr = b.data<T>();
-
231 U* dst_a = out_a.data<U>();
-
232 U* dst_b = out_b.data<U>();
-
233 for (size_t i = 0; i < out_a.size(); i += stride) {
-
234 int a_idx = elem_to_loc(i, a.shape(), a.strides());
-
235 int b_idx = elem_to_loc(i, b.shape(), b.strides());
-
236 op(a_ptr + a_idx, b_ptr + b_idx, dst_a, dst_b, stride);
-
237 dst_a += stride;
-
238 dst_b += stride;
-
239 }
-
240}
-
241
-
242template <
-
243 typename T,
-
244 typename U,
-
245 typename Op,
-
246 typename OpSV,
-
247 typename OpVS,
-
248 typename OpVV>
-
249void binary_op(
-
250 const array& a,
-
251 const array& b,
-
252 array& out_a,
-
253 array& out_b,
-
254 Op op,
-
255 OpSV opsv,
-
256 OpVS opvs,
-
257 OpVV opvv) {
-
258 auto bopt = get_binary_op_type(a, b);
-
259 set_binary_op_output_data(a, b, out_a, bopt);
-
260 set_binary_op_output_data(a, b, out_b, bopt);
-
261
-
262 // The full computation is scalar scalar so call the base op once
-
263 if (bopt == BinaryOpType::ScalarScalar) {
-
264 std::tie(*(out_a.data<U>()), *(out_b.data<U>())) =
-
265 op(*a.data<T>(), *b.data<T>());
-
266 return;
-
267 }
-
268
-
269 // The full computation is scalar vector so delegate to the op
-
270 if (bopt == BinaryOpType::ScalarVector) {
-
271 opsv(
-
272 a.data<T>(),
-
273 b.data<T>(),
-
274 out_a.data<U>(),
-
275 out_b.data<U>(),
-
276 b.data_size());
-
277 return;
-
278 }
-
279
-
280 // The full computation is vector scalar so delegate to the op
-
281 if (bopt == BinaryOpType::VectorScalar) {
-
282 opvs(
-
283 a.data<T>(),
-
284 b.data<T>(),
-
285 out_a.data<U>(),
-
286 out_b.data<U>(),
-
287 a.data_size());
-
288 return;
-
289 }
-
290
-
291 // The full computation is vector vector so delegate to the op
-
292 if (bopt == BinaryOpType::VectorVector) {
-
293 opvv(
-
294 a.data<T>(),
-
295 b.data<T>(),
-
296 out_a.data<U>(),
-
297 out_b.data<U>(),
-
298 out_a.size());
-
299 return;
-
300 }
-
301
-
302 // General computation so let's try to optimize
-
303
-
304 // Get the left-most dim such that the array is row contiguous after
-
305 auto& strides = out_a.strides();
-
306 auto leftmost_rc_dim = [&strides](const array& arr) {
-
307 int d = arr.ndim() - 1;
-
308 for (; d >= 0 && arr.strides()[d] == strides[d]; d--) {
-
309 }
-
310 return d + 1;
-
311 };
-
312 auto a_rc_dim = leftmost_rc_dim(a);
-
313 auto b_rc_dim = leftmost_rc_dim(b);
-
314
-
315 // Get the left-most dim such that the array is a broadcasted "scalar" after
-
316 auto leftmost_s_dim = [](const array& arr) {
-
317 int d = arr.ndim() - 1;
-
318 for (; d >= 0 && arr.strides()[d] == 0; d--) {
-
319 }
-
320 return d + 1;
-
321 };
-
322 auto a_s_dim = leftmost_s_dim(a);
-
323 auto b_s_dim = leftmost_s_dim(b);
-
324
-
325 auto ndim = out_a.ndim();
-
326
-
327 // Case 1: LxM and FxM where L and F are broadcastable and M is row contiguous
-
328 int dim = ndim;
-
329 if (int d = std::max(a_rc_dim, b_rc_dim); d < ndim) {
-
330 bopt = BinaryOpType::VectorVector;
-
331 dim = d;
-
332 // Case 2: LxM and Fx1 where L and F are broadcastable and M is row
-
333 // contiguous
-
334 } else if (int d = std::max(a_rc_dim, b_s_dim); d < ndim) {
-
335 bopt = BinaryOpType::VectorScalar;
-
336 dim = d;
-
337 // Case 3: Lx1 and FxM where L and F are broadcastable and M is row
-
338 // contiguous
-
339 } else if (int d = std::max(a_s_dim, b_rc_dim); d < ndim) {
-
340 bopt = BinaryOpType::ScalarVector;
-
341 dim = d;
-
342 }
-
343
-
344 // Can be sure dim > 0 since otherwise we would have used one of the fully
-
345 // contiguous methods above. Except for the case that the flags do not
-
346 // correspond to the underlying contiguity.
-
347 size_t stride;
-
348 if (dim == 0 || strides[dim - 1] < 16) {
-
349 stride = 1;
-
350 bopt = BinaryOpType::General;
-
351 dim = ndim;
-
352 } else {
-
353 stride = strides[dim - 1];
-
354 }
-
355
-
356 switch (bopt) {
-
357 case BinaryOpType::VectorVector:
-
358 binary_op_dispatch_dims<T, U>(a, b, out_a, out_b, opvv, dim, stride);
-
359 break;
-
360 case BinaryOpType::VectorScalar:
-
361 binary_op_dispatch_dims<T, U>(a, b, out_a, out_b, opvs, dim, stride);
-
362 break;
-
363 case BinaryOpType::ScalarVector:
-
364 binary_op_dispatch_dims<T, U>(a, b, out_a, out_b, opsv, dim, stride);
-
365 break;
-
366 default:
-
367 binary_op_dispatch_dims<T, U>(a, b, out_a, out_b, op);
-
368 break;
-
369 }
-
370}
-
371
-
372template <typename T, typename Op, typename OpSV, typename OpVS, typename OpVV>
-
373void binary_op(
-
374 const array& a,
-
375 const array& b,
-
376 std::vector<array>& outputs,
-
377 Op op,
-
378 OpSV opsv,
-
379 OpVS opvs,
-
380 OpVV opvv) {
-
381 // TODO: The following mess of constexpr evaluations can probably be achieved
-
382 // with template specializations and overloading. Would it be simpler?
-
383
-
384 if (std::is_same<decltype(opsv), UseDefaultBinaryOp>::value) {
-
385 if (std::is_same<decltype(opvs), UseDefaultBinaryOp>::value) {
-
386 if (std::is_same<decltype(opvv), UseDefaultBinaryOp>::value) {
-
387 // All ops are UseDefaultBinaryOp (why oh why would someone call that?)
-
388 binary_op<T, T>(
-
389 a,
-
390 b,
-
391 outputs[0],
-
392 outputs[1],
-
393 op,
-
394 DefaultScalarVector<T, T, Op>(op),
-
395 DefaultVectorScalar<T, T, Op>(op),
-
396 DefaultVectorVector<T, T, Op>(op));
-
397 } else {
-
398 // opsv and opvs were UseDefaultBinaryOp
-
399 binary_op<T, T>(
-
400 a,
-
401 b,
-
402 outputs[0],
-
403 outputs[1],
-
404 op,
-
405 DefaultScalarVector<T, T, Op>(op),
-
406 DefaultVectorScalar<T, T, Op>(op),
-
407 opvv);
-
408 }
-
409 } else if (std::is_same<decltype(opvv), UseDefaultBinaryOp>::value) {
-
410 // opsv and opvv were UseDefaultBinaryOp
-
411 binary_op<T, T>(
-
412 a,
-
413 b,
-
414 outputs[0],
-
415 outputs[1],
-
416 op,
-
417 DefaultScalarVector<T, T, Op>(op),
-
418 opvs,
-
419 DefaultVectorVector<T, T, Op>(op));
-
420 } else {
-
421 // opsv was UseDefaultBinaryOp
-
422 binary_op<T, T>(
-
423 a,
-
424 b,
-
425 outputs[0],
-
426 outputs[1],
-
427 op,
-
428 DefaultScalarVector<T, T, Op>(op),
-
429 opvs,
-
430 opvv);
-
431 }
-
432 } else if (std::is_same<decltype(opvs), UseDefaultBinaryOp>::value) {
-
433 if (std::is_same<decltype(opvv), UseDefaultBinaryOp>::value) {
-
434 // opvs and opvv were UseDefaultBinaryOp
-
435 binary_op<T, T>(
-
436 a,
-
437 b,
-
438 outputs[0],
-
439 outputs[1],
-
440 op,
-
441 opsv,
-
442 DefaultVectorScalar<T, T, Op>(op),
-
443 DefaultVectorVector<T, T, Op>(op));
-
444 } else {
-
445 // opvs was UseDefaultBinaryOp
-
446 binary_op<T, T>(
-
447 a,
-
448 b,
-
449 outputs[0],
-
450 outputs[1],
-
451 op,
-
452 opsv,
-
453 DefaultVectorScalar<T, T, Op>(op),
-
454 opvv);
-
455 }
-
456 } else if (std::is_same<decltype(opvv), UseDefaultBinaryOp>::value) {
-
457 // opvv was UseDefaultBinaryOp
-
458 binary_op<T, T>(
-
459 a,
-
460 b,
-
461 outputs[0],
-
462 outputs[1],
-
463 op,
-
464 opsv,
-
465 opvs,
-
466 DefaultVectorVector<T, T, Op>(op));
-
467 } else {
-
468 // All ops provided
-
469 binary_op<T, T>(a, b, outputs[0], outputs[1], op, opsv, opvs, opvv);
-
470 }
-
471}
-
472
-
473template <typename T, typename Op>
-
474void binary_op(
-
475 const array& a,
-
476 const array& b,
-
477 std::vector<array>& outputs,
-
478 Op op) {
-
479 DefaultScalarVector<T, T, Op> opsv(op);
-
480 DefaultVectorScalar<T, T, Op> opvs(op);
-
481 DefaultVectorVector<T, T, Op> opvv(op);
-
482 binary_op<T, T>(a, b, outputs[0], outputs[1], op, opsv, opvs, opvv);
-
483}
-
484
-
485template <typename... Ops>
-
486void binary(
-
487 const array& a,
-
488 const array& b,
-
489 std::vector<array>& outputs,
-
490 Ops... ops) {
-
491 switch (outputs[0].dtype()) {
-
492 case bool_:
-
493 binary_op<bool>(a, b, outputs, ops...);
-
494 break;
-
495 case uint8:
-
496 binary_op<uint8_t>(a, b, outputs, ops...);
-
497 break;
-
498 case uint16:
-
499 binary_op<uint16_t>(a, b, outputs, ops...);
-
500 break;
-
501 case uint32:
-
502 binary_op<uint32_t>(a, b, outputs, ops...);
-
503 break;
-
504 case uint64:
-
505 binary_op<uint64_t>(a, b, outputs, ops...);
-
506 break;
-
507 case int8:
-
508 binary_op<int8_t>(a, b, outputs, ops...);
-
509 break;
-
510 case int16:
-
511 binary_op<int16_t>(a, b, outputs, ops...);
-
512 break;
-
513 case int32:
-
514 binary_op<int32_t>(a, b, outputs, ops...);
-
515 break;
-
516 case int64:
-
517 binary_op<int64_t>(a, b, outputs, ops...);
-
518 break;
-
519 case float16:
-
520 binary_op<float16_t>(a, b, outputs, ops...);
-
521 break;
-
522 case float32:
-
523 binary_op<float>(a, b, outputs, ops...);
-
524 break;
-
525 case bfloat16:
-
526 binary_op<bfloat16_t>(a, b, outputs, ops...);
-
527 break;
-
528 case complex64:
-
529 binary_op<complex64_t>(a, b, outputs, ops...);
-
530 break;
-
531 }
-
532}
-
533
-
534} // namespace
-
535
-
536} // namespace mlx::core
- - -
Op op
Definition binary.h:139
-
Definition allocator.h:7
-
constexpr Dtype bool_
Definition dtype.h:60
-
constexpr Dtype uint64
Definition dtype.h:65
-
constexpr Dtype uint16
Definition dtype.h:63
-
stride_t elem_to_loc(int elem, const std::vector< int > &shape, const std::vector< stride_t > &strides)
Definition utils.h:12
-
constexpr Dtype bfloat16
Definition dtype.h:74
-
constexpr Dtype int32
Definition dtype.h:69
-
constexpr Dtype float32
Definition dtype.h:73
-
constexpr Dtype int16
Definition dtype.h:68
-
constexpr Dtype int8
Definition dtype.h:67
-
constexpr Dtype int64
Definition dtype.h:70
-
constexpr Dtype uint8
Definition dtype.h:62
-
constexpr Dtype float16
Definition dtype.h:72
-
constexpr Dtype uint32
Definition dtype.h:64
-
constexpr Dtype complex64
Definition dtype.h:75
-
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_kernel-members.html b/docs/build/html/class_m_p_s_1_1_kernel-members.html deleted file mode 100644 index f12b0a050..000000000 --- a/docs/build/html/class_m_p_s_1_1_kernel-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
MPS::Kernel Member List
-
-
- -

This is the complete list of members for MPS::Kernel, including all inherited members.

- - - -
device() constMPS::Kernel
label() constMPS::Kernel
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_kernel.html b/docs/build/html/class_m_p_s_1_1_kernel.html deleted file mode 100644 index de2a0c584..000000000 --- a/docs/build/html/class_m_p_s_1_1_kernel.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - -MLX: MPS::Kernel Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
MPS::Kernel Class Reference
-
-
- -

#include <gemm.h>

-
-Inheritance diagram for MPS::Kernel:
-
-
- -
- - - - - - -

-Public Member Functions

NS::String * label () const
 
MTL::Device * device () const
 
-

Member Function Documentation

- -

◆ device()

- -
-
- - - - - - - -
_MTL_INLINE MTL::Device * MPS::Kernel::device () const
-
- -
-
- -

◆ label()

- -
-
- - - - - - - -
_MTL_INLINE NS::String * MPS::Kernel::label () const
-
- -
-
-
The documentation for this class was generated from the following file:
    -
  • mlx/backend/metal/mps/gemm.h
  • -
-
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_kernel.png b/docs/build/html/class_m_p_s_1_1_kernel.png deleted file mode 100644 index 0ed62c014d946e0ba1bb07f7be8739e94bc15dbd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmV;B0&o3^P)vTJr#LVva2S`&=-}Ys|Ns9r%~qrU000SeQchC<|NsC0|NsC0Hv*f~0006T zNkl3iy_{@y)J&m?)QLzDUCYYUR*>Xdc4ce8T(_rT9_Ajw@FQr7j}s8P-# zUE*4zJFh4+^^oPsOsqF;I~Xs+a+2;EDQi*}cQ(R(Xm)kF8<)E_QN7i@E4K5pUcN3a zTbJgTLtSoB4%5z+Gj|R><(?OJG}}ErJ+3ZmOI1e}+)VFM`u3~&@y9RKQ=P3iN6PK) zaaP0qJF(pH;`ca;Wh=F9${%HXt3rKU?t1!JUHack-#xbfT6el>XJmpn_IS(hP@gY* zoFqS@2>+j@eEkznlCSmQSo*(LlKhoEpK+4>tCEr=W0aI68KWnqh{)9i0Ks|yz~yxd z%E#jln75#OLf!!L9+cVR01&051b`SNB>==IDFGlxNeKWkN=g8TQBndxjFJ)nVw98s z5Tm37fEXnu0K_OM0U$>IFQtgcI_bIFWbDZ06zAs}pIQ05< zV17ZlESQGM{Si04qQGdEJ2^nNYl!)`sdy}?b7+fF*E$5mC&R#K{} q#waOORb!Nts;V)%4W)?4)%6eBqshFLMxG!50000 - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
MPS::Matrix Member List
-
-
- -

This is the complete list of members for MPS::Matrix, including all inherited members.

- - - - -
alloc()MPS::Matrixstatic
init(MTL::Buffer *buffer, MatrixDescriptor *descriptor)MPS::Matrix
init(const MTL::Buffer *buffer, MatrixDescriptor *descriptor)MPS::Matrix
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_matrix.html b/docs/build/html/class_m_p_s_1_1_matrix.html deleted file mode 100644 index 8fc4607bd..000000000 --- a/docs/build/html/class_m_p_s_1_1_matrix.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - -MLX: MPS::Matrix Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
- -
- -

#include <gemm.h>

-
-Inheritance diagram for MPS::Matrix:
-
-
- -
- - - - - - -

-Public Member Functions

Matrixinit (MTL::Buffer *buffer, MatrixDescriptor *descriptor)
 
Matrixinit (const MTL::Buffer *buffer, MatrixDescriptor *descriptor)
 
- - - -

-Static Public Member Functions

static class Matrixalloc ()
 
-

Member Function Documentation

- -

◆ alloc()

- -
-
- - - - - -
- - - - - - - -
_MTL_INLINE Matrix * MPS::Matrix::alloc ()
-
-static
-
- -
-
- -

◆ init() [1/2]

- -
-
- - - - - - - - - - - -
_MTL_INLINE Matrix * MPS::Matrix::init (const MTL::Buffer * buffer,
MatrixDescriptor * descriptor )
-
- -
-
- -

◆ init() [2/2]

- -
-
- - - - - - - - - - - -
_MTL_INLINE Matrix * MPS::Matrix::init (MTL::Buffer * buffer,
MatrixDescriptor * descriptor )
-
- -
-
-
The documentation for this class was generated from the following file:
    -
  • mlx/backend/metal/mps/gemm.h
  • -
-
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_matrix.png b/docs/build/html/class_m_p_s_1_1_matrix.png deleted file mode 100644 index a14d0bf98ab9ec89bc7677aba5189d2cf8871b16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 665 zcmeAS@N?(olHy`uVBq!ia0vp^i-9~~^1IA5 zhU?xxts81ouD^b!S0}pqk9E7%mFer hwYP+;%euAlbBm9?DLuGqJ1`M3c)I$ztaD0e0swvcJA42D diff --git a/docs/build/html/class_m_p_s_1_1_matrix_descriptor-members.html b/docs/build/html/class_m_p_s_1_1_matrix_descriptor-members.html deleted file mode 100644 index dee3102ef..000000000 --- a/docs/build/html/class_m_p_s_1_1_matrix_descriptor-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
MPS::MatrixDescriptor Member List
-
-
- -

This is the complete list of members for MPS::MatrixDescriptor, including all inherited members.

- - - - -
matrixDescriptor(NS::UInteger rows, NS::UInteger columns, NS::UInteger rowBytes, NS::UInteger dataType)MPS::MatrixDescriptorstatic
matrixDescriptor(NS::UInteger rows, NS::UInteger columns, NS::UInteger matrices, NS::UInteger rowBytes, NS::UInteger matrixBytes, NS::UInteger dataType)MPS::MatrixDescriptorstatic
rows() constMPS::MatrixDescriptor
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_matrix_descriptor.html b/docs/build/html/class_m_p_s_1_1_matrix_descriptor.html deleted file mode 100644 index 1b88da36a..000000000 --- a/docs/build/html/class_m_p_s_1_1_matrix_descriptor.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - -MLX: MPS::MatrixDescriptor Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
MPS::MatrixDescriptor Class Reference
-
-
- -

#include <gemm.h>

-
-Inheritance diagram for MPS::MatrixDescriptor:
-
-
- -
- - - - -

-Public Member Functions

NS::UInteger rows () const
 
- - - - - -

-Static Public Member Functions

static class MatrixDescriptormatrixDescriptor (NS::UInteger rows, NS::UInteger columns, NS::UInteger rowBytes, NS::UInteger dataType)
 
static class MatrixDescriptormatrixDescriptor (NS::UInteger rows, NS::UInteger columns, NS::UInteger matrices, NS::UInteger rowBytes, NS::UInteger matrixBytes, NS::UInteger dataType)
 
-

Member Function Documentation

- -

◆ matrixDescriptor() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_MTL_INLINE MatrixDescriptor * MPS::MatrixDescriptor::matrixDescriptor (NS::UInteger rows,
NS::UInteger columns,
NS::UInteger matrices,
NS::UInteger rowBytes,
NS::UInteger matrixBytes,
NS::UInteger dataType )
-
-static
-
- -
-
- -

◆ matrixDescriptor() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
_MTL_INLINE MatrixDescriptor * MPS::MatrixDescriptor::matrixDescriptor (NS::UInteger rows,
NS::UInteger columns,
NS::UInteger rowBytes,
NS::UInteger dataType )
-
-static
-
- -
-
- -

◆ rows()

- -
-
- - - - - - - -
_MTL_INLINE NS::UInteger MPS::MatrixDescriptor::rows () const
-
- -
-
-
The documentation for this class was generated from the following file:
    -
  • mlx/backend/metal/mps/gemm.h
  • -
-
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_matrix_descriptor.png b/docs/build/html/class_m_p_s_1_1_matrix_descriptor.png deleted file mode 100644 index 661b7f470ecb13762aefc4337df516e94f33e8bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 813 zcmeAS@N?(olHy`uVBq!ia0vp^CxAGBgBeI>Z$8xoq@)9ULR|m<{|{uoc=NTi|Il&^ z1I+@7>1SR%c<=xyZhAIs2~du+B*-tA0mugfbEer>7#Ns#c)B=-R4~4sdwbey1p$}t z=^=mri}wfW-EHW6Jo8Lq#F`~42idAGi^mH(aTs$ns{G$4#^Kqwgw<)1vSzc);m^Nv z7_S}ruNt{epI`B=j@#KY_wqbGg}hCg^kzlFo5y9Ii(~7xvo5+m&fI*q+-yHjk;~$^ zggrNGZ=G2byQNq7eD+rj?oIl3dLJjt&%AsBCzIL~p3;TYkSMb+v@$H>5*ZO8c?Mk^jwQbBF--#XO^9c3Yn|`xGL@oM_ zYRb9)(|7MWSk5WkHzRDh!p2u;-$$@A5!SRK#n zC8AF@RPnL9NJ=*w$NypSw7R~&`3uiH_xXAsH?QvyJE^eNv!1W}?IiK((v!ZpO%Kj4 zKj5nLQ*Qq`1zyKZ@x{l_MO}W!>shr}T0!+{tWqlT`@F(s%t2FwcxS45=9lcfaXHia zcaXA~jNw{8$47xPZvN*C65Vb7p|2$9H0!%^#~Qa1hp70RT~8mbaSPf~C#$m8-RfV? z=Z(KDCd9=2T{rd6EbskyCM+?RdV99+_H0%qPx%Wb3X@8_;r`mv*dlO< - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
MPS::MatrixMultiplication Member List
-
-
- -

This is the complete list of members for MPS::MatrixMultiplication, including all inherited members.

- - - - - - - - - -
alloc()MPS::MatrixMultiplicationstatic
encodeToCommandBuffer(MTL::CommandBuffer *commandBuffer, Matrix *leftMatrix, Matrix *rightMatrix, Matrix *resultMatrix)MPS::MatrixMultiplication
init(MTL::Device *device, bool transposeLeft, bool transposeRight, NS::UInteger resultRows, NS::UInteger resultColumns, NS::UInteger interiorColumns, double alpha, double beta)MPS::MatrixMultiplication
setBatchSize(NS::UInteger batchSize)MPS::MatrixMultiplication
setBatchStart(NS::UInteger batchStart)MPS::MatrixMultiplication
setLeftMatrixOrigin(MTL::Origin origin)MPS::MatrixMultiplication
setResultMatrixOrigin(MTL::Origin origin)MPS::MatrixMultiplication
setRightMatrixOrigin(MTL::Origin origin)MPS::MatrixMultiplication
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_matrix_multiplication.html b/docs/build/html/class_m_p_s_1_1_matrix_multiplication.html deleted file mode 100644 index f751a2bd4..000000000 --- a/docs/build/html/class_m_p_s_1_1_matrix_multiplication.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - -MLX: MPS::MatrixMultiplication Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
MPS::MatrixMultiplication Class Reference
-
-
- -

#include <gemm.h>

-
-Inheritance diagram for MPS::MatrixMultiplication:
-
-
- -
- - - - - - - - - - - - - - - - -

-Public Member Functions

MatrixMultiplicationinit (MTL::Device *device, bool transposeLeft, bool transposeRight, NS::UInteger resultRows, NS::UInteger resultColumns, NS::UInteger interiorColumns, double alpha, double beta)
 
void encodeToCommandBuffer (MTL::CommandBuffer *commandBuffer, Matrix *leftMatrix, Matrix *rightMatrix, Matrix *resultMatrix)
 
void setLeftMatrixOrigin (MTL::Origin origin)
 
void setRightMatrixOrigin (MTL::Origin origin)
 
void setResultMatrixOrigin (MTL::Origin origin)
 
void setBatchStart (NS::UInteger batchStart)
 
void setBatchSize (NS::UInteger batchSize)
 
- - - -

-Static Public Member Functions

static class MatrixMultiplicationalloc ()
 
-

Member Function Documentation

- -

◆ alloc()

- -
-
- - - - - -
- - - - - - - -
_MTL_INLINE MatrixMultiplication * MPS::MatrixMultiplication::alloc ()
-
-static
-
- -
-
- -

◆ encodeToCommandBuffer()

- -
-
- - - - - - - - - - - - - - - - - - - - - -
_MTL_INLINE void MPS::MatrixMultiplication::encodeToCommandBuffer (MTL::CommandBuffer * commandBuffer,
Matrix * leftMatrix,
Matrix * rightMatrix,
Matrix * resultMatrix )
-
- -
-
- -

◆ init()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_MTL_INLINE MatrixMultiplication * MPS::MatrixMultiplication::init (MTL::Device * device,
bool transposeLeft,
bool transposeRight,
NS::UInteger resultRows,
NS::UInteger resultColumns,
NS::UInteger interiorColumns,
double alpha,
double beta )
-
- -
-
- -

◆ setBatchSize()

- -
-
- - - - - - - -
_MTL_INLINE void MPS::MatrixMultiplication::setBatchSize (NS::UInteger batchSize)
-
- -
-
- -

◆ setBatchStart()

- -
-
- - - - - - - -
_MTL_INLINE void MPS::MatrixMultiplication::setBatchStart (NS::UInteger batchStart)
-
- -
-
- -

◆ setLeftMatrixOrigin()

- -
-
- - - - - - - -
_MTL_INLINE void MPS::MatrixMultiplication::setLeftMatrixOrigin (MTL::Origin origin)
-
- -
-
- -

◆ setResultMatrixOrigin()

- -
-
- - - - - - - -
_MTL_INLINE void MPS::MatrixMultiplication::setResultMatrixOrigin (MTL::Origin origin)
-
- -
-
- -

◆ setRightMatrixOrigin()

- -
-
- - - - - - - -
_MTL_INLINE void MPS::MatrixMultiplication::setRightMatrixOrigin (MTL::Origin origin)
-
- -
-
-
The documentation for this class was generated from the following file:
    -
  • mlx/backend/metal/mps/gemm.h
  • -
-
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_matrix_multiplication.png b/docs/build/html/class_m_p_s_1_1_matrix_multiplication.png deleted file mode 100644 index 7da3f69a96ea78b09a467274e22e6f2ac0159a49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1041 zcmeAS@N?(olHy`uVBq!ia0y~yV3Y>312~w0q@1)O2au8u@CkAK|NlRb`Qpvj(*8rs zEetdZB&MHv@!-J&pt$MTuq8k_&XOR%U-KE zqV+HT{U2W=Y!G3_JNstKUgOYJA0?Xv582&#Bq}KA>T-mU#ZyehGBD5MQZN$UygQQr z{QvV@ch~c$pD&)Y=b2H;?iq51-)~IV%KKa;xVZMQah%lj(#?16md%{BZ~uu|ch<~* zav|r0z|*#m$7ja(|Gjj!?7zg8-I3GI?`pf{745=Ea1F5R(qH~aSZ>f?JjwmtW;Z1y?Z zBJ=57vefTo)A#IMl=!Ay=W~|tSGAM2SEQdmyI{LS>d@zJH`MKpeLJ9SzPWv;f-k?{ zWr@3UdTT3scZz-IHMlZ+t;6@JcS@JO3pP(SJiqyzdAfP^3GcjbCgOS9WDWMc3KQj9 zy{6M<$H%P|9aew-UE5_SY|a-~p8WmF#a`LpGoEJM{gRt?ch8pPF;695pFJ77QmkK? zZ_{>#V(Yc$$IhPo5x?3zbG}Sg;kswlYvp&fFW8ds?EMvyeR(^L&2^lQv>X&2%6>;k{Wu6D|L$nFs5Z!D5=fbn@}^ zyE5Fa_tJ0oeNt6ha>wuWS^dJx*Zx@i_&a-3UEsMpHu~?v*6j;E-TG(luf{x;mu~<1 z1E)!QewqTrf5glueOa$*KIsWEuG|3*pR|9>7oUfRF0!cC17= diff --git a/docs/build/html/class_m_p_s_1_1_matrix_vector_multiplication-members.html b/docs/build/html/class_m_p_s_1_1_matrix_vector_multiplication-members.html deleted file mode 100644 index abb569f03..000000000 --- a/docs/build/html/class_m_p_s_1_1_matrix_vector_multiplication-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
MPS::MatrixVectorMultiplication Member List
-
-
- -

This is the complete list of members for MPS::MatrixVectorMultiplication, including all inherited members.

- - - - -
alloc()MPS::MatrixVectorMultiplicationstatic
encodeToCommandBuffer(MTL::CommandBuffer *commandBuffer, Matrix *inputMatrix, Vector *inputVector, Vector *resultVector)MPS::MatrixVectorMultiplication
init(MTL::Device *device, bool transpose, NS::UInteger rows, NS::UInteger columns, double alpha, double beta)MPS::MatrixVectorMultiplication
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_matrix_vector_multiplication.html b/docs/build/html/class_m_p_s_1_1_matrix_vector_multiplication.html deleted file mode 100644 index 074f379d7..000000000 --- a/docs/build/html/class_m_p_s_1_1_matrix_vector_multiplication.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - -MLX: MPS::MatrixVectorMultiplication Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
MPS::MatrixVectorMultiplication Class Reference
-
-
- -

#include <gemm.h>

-
-Inheritance diagram for MPS::MatrixVectorMultiplication:
-
-
- -
- - - - - - -

-Public Member Functions

MatrixVectorMultiplicationinit (MTL::Device *device, bool transpose, NS::UInteger rows, NS::UInteger columns, double alpha, double beta)
 
void encodeToCommandBuffer (MTL::CommandBuffer *commandBuffer, Matrix *inputMatrix, Vector *inputVector, Vector *resultVector)
 
- - - -

-Static Public Member Functions

static class MatrixVectorMultiplicationalloc ()
 
-

Member Function Documentation

- -

◆ alloc()

- -
-
- - - - - -
- - - - - - - -
_MTL_INLINE MatrixVectorMultiplication * MPS::MatrixVectorMultiplication::alloc ()
-
-static
-
- -
-
- -

◆ encodeToCommandBuffer()

- -
-
- - - - - - - - - - - - - - - - - - - - - -
_MTL_INLINE void MPS::MatrixVectorMultiplication::encodeToCommandBuffer (MTL::CommandBuffer * commandBuffer,
Matrix * inputMatrix,
Vector * inputVector,
Vector * resultVector )
-
- -
-
- -

◆ init()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_MTL_INLINE MatrixVectorMultiplication * MPS::MatrixVectorMultiplication::init (MTL::Device * device,
bool transpose,
NS::UInteger rows,
NS::UInteger columns,
double alpha,
double beta )
-
- -
-
-
The documentation for this class was generated from the following file:
    -
  • mlx/backend/metal/mps/gemm.h
  • -
-
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_matrix_vector_multiplication.png b/docs/build/html/class_m_p_s_1_1_matrix_vector_multiplication.png deleted file mode 100644 index 10e54c8bd6ac07f8af73d45b3c9f0584059b3703..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1145 zcmeAS@N?(olHy`uVBq!ia0y~yU~~ks12~w0#Rfbr z?&fnV|Eu3qkjV{JttOS37aa?B-}!(4xA*_rie2`TpKR6h{U(1`=(Ep#u9J4lIxk!_YfGP$=Tf}* z^zt%!p*!*NcYXXmGv2mq{O_UC{!!)NiHixsx!=~;tn;t%EU2$HvEs0ED(pTkHnrdU z)|r2dwqLi=EH zwzJDGS2O*s2q z^@vvqE(TVQISb}z9Y46d<8@o(_l%##O~z|?2Ke1BZkOepH@AR;^S)=*Dc;h8e0^JO zs}S>AuYw%ce^>rJHT?JeOkv`tx&wDF2D9+Ti?dXJ{E&Eg)m5R5x$C(P?wHIIcKYw~ zBm;{dQ&y}~>6^}S(4afK=^>}Pez@TcZfB1VD|Py`9!0SG-;>(FdsF1f!J`)=e)W8L zyoHaA<$qN7`d151pIJKjM_ftCs>CXTqJ!q&ADyi6{xsvk1-Izfey-H$wB+)u-SYN5 z%V#F%oxho}{`%e-D)$$a|5iWgIX~8D>(TE*Ha~Mze)`oGoxH<$U#3}C*5i}(*R|RE z?7KZb)rSeHob2gR@JtI~@ibbj?UFc>GEYsyQYvSW@?PDm_xucOekhx5 zuYbFK|3>%sg)jfl`nluMvnSuKwWvS`Q7m^Y{xZgh5TMk zPyTc!P+IM$;7to_Pp{XyEY*LdgWej7uV_&^>BWQKMY|?h#0jw+*7>)TW%-k6&UH&q zrf)O0U*Fulc;lCuPmX8G{&DBn_NP<9#wz*zlbOIoV7_}pz`c5_8?j#>9p~RC{@l!c#7$uXYTQ6XH62@)9zAV; R7Fb9yc)I$ztaD0e0swr#1StRj diff --git a/docs/build/html/class_m_p_s_1_1_vector-members.html b/docs/build/html/class_m_p_s_1_1_vector-members.html deleted file mode 100644 index 31e25f93d..000000000 --- a/docs/build/html/class_m_p_s_1_1_vector-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
MPS::Vector Member List
-
-
- -

This is the complete list of members for MPS::Vector, including all inherited members.

- - - - -
alloc()MPS::Vectorstatic
init(MTL::Buffer *buffer, VectorDescriptor *descriptor)MPS::Vector
init(const MTL::Buffer *buffer, VectorDescriptor *descriptor)MPS::Vector
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_vector.html b/docs/build/html/class_m_p_s_1_1_vector.html deleted file mode 100644 index 9e1039ead..000000000 --- a/docs/build/html/class_m_p_s_1_1_vector.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - -MLX: MPS::Vector Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
- -
- -

#include <gemm.h>

-
-Inheritance diagram for MPS::Vector:
-
-
- -
- - - - - - -

-Public Member Functions

Vectorinit (MTL::Buffer *buffer, VectorDescriptor *descriptor)
 
Vectorinit (const MTL::Buffer *buffer, VectorDescriptor *descriptor)
 
- - - -

-Static Public Member Functions

static class Vectoralloc ()
 
-

Member Function Documentation

- -

◆ alloc()

- -
-
- - - - - -
- - - - - - - -
_MTL_INLINE Vector * MPS::Vector::alloc ()
-
-static
-
- -
-
- -

◆ init() [1/2]

- -
-
- - - - - - - - - - - -
_MTL_INLINE Vector * MPS::Vector::init (const MTL::Buffer * buffer,
VectorDescriptor * descriptor )
-
- -
-
- -

◆ init() [2/2]

- -
-
- - - - - - - - - - - -
_MTL_INLINE Vector * MPS::Vector::init (MTL::Buffer * buffer,
VectorDescriptor * descriptor )
-
- -
-
-
The documentation for this class was generated from the following file:
    -
  • mlx/backend/metal/mps/gemm.h
  • -
-
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_vector.png b/docs/build/html/class_m_p_s_1_1_vector.png deleted file mode 100644 index e7adea3626eca42f23064dae57f6cb4ab2cb040c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 658 zcmeAS@N?(olHy`uVBq!ia0vp^%YZn5gBeIJnfuQXNJ$6ygt-3y{~ySF@#br3|Doj; z2ATyD)6cwk@ZbSZ-1KbN5}+JsNswPK1CS2}=1jA%FfcI5db&7&J22n3nwf4dWEupw+8Nc>45vby~w`%)Bcv;dyWF6_t}3L6cP$ub36Rxo&;y z)w=iZu2oO^GgH2OORdMY^YPPiXPqzmskL_YyEUGlgu+d?d+hUDG3)$-yoq-o|DLn) z`;_H(-p3qQ*wCMG`bz8HT`GUmujoAACHY%o`?5amySX3gLak3_-Ti5CXHMOJy@NG* z*8=>CikDg5etkB0=MSG{ecAiF%2cl$vbFoY?6qF|yX~{|Q@6i=v~1tioOZ*EbKWbY zO=ILc)2_Z@DpHwcdiU9^{Z?Nhr}_2$U4CcIpPzgG-+$x1LUiNm6YF+MKRINfd3)Bk zJl6P^DmOp>+#Yb^*Ziw8T1_hFKRnF%mLE0A=J<2|xhndTXQ@cKW=%>F>0UPT=3B;w z3^|5^`hCuyKmOo4|NcUZ&i;d+y-hY>VpQn6!qT7-B+RhL!?bc3Xc^;B+76wJYbgD_8q&e!Ap-lGDZu-8p$xgiMxmkbV zvYS8uSD&5!SjHrF - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
MPS::VectorDescriptor Member List
-
-
- -

This is the complete list of members for MPS::VectorDescriptor, including all inherited members.

- - - -
vectorDescriptor(NS::UInteger length, NS::UInteger dataType)MPS::VectorDescriptorstatic
vectorDescriptor(NS::UInteger length, NS::UInteger vectors, NS::UInteger vectorBytes, NS::UInteger dataType)MPS::VectorDescriptorstatic
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_vector_descriptor.html b/docs/build/html/class_m_p_s_1_1_vector_descriptor.html deleted file mode 100644 index 681f3428e..000000000 --- a/docs/build/html/class_m_p_s_1_1_vector_descriptor.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - -MLX: MPS::VectorDescriptor Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
MPS::VectorDescriptor Class Reference
-
-
- -

#include <gemm.h>

-
-Inheritance diagram for MPS::VectorDescriptor:
-
-
- -
- - - - - - -

-Static Public Member Functions

static class VectorDescriptorvectorDescriptor (NS::UInteger length, NS::UInteger dataType)
 
static class VectorDescriptorvectorDescriptor (NS::UInteger length, NS::UInteger vectors, NS::UInteger vectorBytes, NS::UInteger dataType)
 
-

Member Function Documentation

- -

◆ vectorDescriptor() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - -
_MTL_INLINE VectorDescriptor * MPS::VectorDescriptor::vectorDescriptor (NS::UInteger length,
NS::UInteger dataType )
-
-static
-
- -
-
- -

◆ vectorDescriptor() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
_MTL_INLINE VectorDescriptor * MPS::VectorDescriptor::vectorDescriptor (NS::UInteger length,
NS::UInteger vectors,
NS::UInteger vectorBytes,
NS::UInteger dataType )
-
-static
-
- -
-
-
The documentation for this class was generated from the following file:
    -
  • mlx/backend/metal/mps/gemm.h
  • -
-
- - - - diff --git a/docs/build/html/class_m_p_s_1_1_vector_descriptor.png b/docs/build/html/class_m_p_s_1_1_vector_descriptor.png deleted file mode 100644 index 00b2efd0e245b4a7485a5d74f370f82473449fd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 794 zcmV+#1LgdQP)vTJr#LVva2S`&=-}Ys|Ns9r%~qrU000SeQchC<|NsC0|NsC0Hv*f~0007| zNklN4wz)Gb z=|vn@4=FdvjE-X)pDT-E61&K9I+HKib0b7g3$o5nbC3*HW+J27QJ(gC8_JAp<$gXm zgYed?>8dO~{2l3i$8r>b6vMqNIU-IhHW@EiY%jhLPky(|1@%(yJy5N&3@dAxVE)SV9P43<1FR z^#XuFG!V<{H4e-`EDOpoFe9A8ZG@+ zF}B}FUl^QxRWH(5NouP0C`rBQWjWTmvP32`VJFK6i~Ko@ojM*@>Tp}3v?_<} z7E99@DoHo$jj8SNfn`k<=BwD`R^=s9!C}f`R-hd#cx@v=sDMR1eb#!yMRk;8lc@q#9cBz;XIu}IP*O%_S=r^zBo{ - - - - - - -MLX: Class Index - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Class Index
-
-
-
A | B | C | D | E | F | G | I | K | L | M | N | O | P | Q | R | S | T | U | V | W | _
-
-
-
A
-
Abs
Abs (mlx::core)
Abs (mlx::core::detail)
AccumHelper (mlx::steel)
Add
Add (mlx::core)
Add (mlx::core::detail)
add_vec (pocketfft::detail)
add_vec< cmplx< T > > (pocketfft::detail)
AddMM (mlx::core)
aligned_allocator (pocketfft::detail::threading)
Allocator (mlx::core::allocator)
And
Arange (mlx::core)
ArcCos
ArcCos (mlx::core)
ArcCos (mlx::core::detail)
ArcCosh
ArcCosh (mlx::core)
ArcCosh (mlx::core::detail)
ArcSin
ArcSin (mlx::core)
ArcSin (mlx::core::detail)
ArcSinh
ArcSinh (mlx::core)
ArcSinh (mlx::core::detail)
ArcTan
ArcTan (mlx::core)
ArcTan (mlx::core::detail)
ArcTan2
ArcTan2 (mlx::core)
ArcTan2 (mlx::core::detail)
ArcTanh
ArcTanh (mlx::core)
ArcTanh (mlx::core::detail)
ArgPartition (mlx::core)
ArgReduce (mlx::core)
ArgSort (mlx::core)
arr (pocketfft::detail)
arr_info (pocketfft::detail)
array (mlx::core)
array::ArrayIterator (mlx::core)
AsStrided (mlx::core)
AsType (mlx::core)
-
-
B
-
_MLX_BFloat16::bits_to_bfloat_struct
BitwiseAnd
BitwiseAnd (mlx::core::detail)
BitwiseBinary (mlx::core)
BitwiseOr
BitwiseOr (mlx::core::detail)
BitwiseXor
BitwiseXor (mlx::core::detail)
BlockLoader (mlx::steel)
BlockMaskedMM (mlx::core)
BlockMMA (mlx::steel)
BlockSparseMM (mlx::core)
BlockSparseQMM (mlx::core)
BlockSwizzle (mlx::steel)
bool4_or_uint
Broadcast (mlx::core)
Buffer (mlx::core::allocator)
-
-
C
-
Ceil
Ceil (mlx::core)
Ceil (mlx::core::detail)
cfftp (pocketfft::detail)
ChannelHelper (mlx::steel)
ChannelHelper< 1 > (mlx::steel)
ChannelHelper< 2 > (mlx::steel)
ChannelHelper< 3 > (mlx::steel)
ChannelHelper< 4 > (mlx::steel)
Cholesky (mlx::core)
cmplx (pocketfft::detail)
cndarr (pocketfft::detail)
CommandEncoder (mlx::core::metal)
CommonAllocator (mlx::core::allocator)
Compiled (mlx::core)
complex128_t (mlx::core)
complex64_t
complex64_t (mlx::core)
Concatenate (mlx::core)
concurrent_queue (pocketfft::detail::threading)
CommandEncoder::ConcurrentContext (mlx::core::metal)
Conjugate
Conjugate (mlx::core)
Conjugate (mlx::core::detail)
Conv2DGeneralBaseInfo (mlx::steel)
Conv2DGeneralJumpParams (mlx::steel)
Conv2DInputBlockLoaderGeneral (mlx::steel)
Conv2DInputBlockLoaderLargeFilter (mlx::steel)
Conv2DInputBlockLoaderSmallChannels (mlx::steel)
Conv2DInputBlockLoaderSmallFilter (mlx::steel)
Conv2DWeightBlockLoader (mlx::steel)
Conv2DWeightBlockLoaderGeneral (mlx::steel)
Conv2DWeightBlockLoaderSmallChannels (mlx::steel)
Convolution (mlx::core)
Copy (mlx::core)
Cos
Cos (mlx::core)
Cos (mlx::core::detail)
Cosh
Cosh (mlx::core)
Cosh (mlx::core::detail)
Custom (mlx::core::fast)
CustomVJP (mlx::core)
-
-
D
-
array::Data (mlx::core)
Depends (mlx::core)
Device (mlx::core)
Device (mlx::core::metal)
Divide
Divide (mlx::core::detail)
Divide (mlx::core)
DivMod (mlx::core)
Dtype (mlx::core)
-
-
E
-
Equal
Equal (mlx::core::detail)
Equal (mlx::core)
Erf
Erf (mlx::core::detail)
Erf (mlx::core)
ErfInv
ErfInv (mlx::core::detail)
ErfInv (mlx::core)
Event (mlx::core)
ExecC2C (pocketfft::detail)
ExecDcst (pocketfft::detail)
ExecHartley (pocketfft::detail)
ExecR2R (pocketfft::detail)
Exp
Exp (mlx::core::detail)
Exp (mlx::core)
Expm1
Expm1 (mlx::core::detail)
Expm1 (mlx::core)
-
-
F
-
FFT (mlx::core)
fftblue (pocketfft::detail)
FileReader (mlx::core::io)
FileWriter (mlx::core::io)
array::Flags (mlx::core)
Floor
Floor (mlx::core::detail)
Floor (mlx::core)
Full (mlx::core)
-
-
G
-
Gather (mlx::core)
GEMMAddMMParams (mlx::steel)
GEMMKernel (mlx::steel)
GEMMParams (mlx::steel)
GEMMSpiltKParams (mlx::steel)
Greater
Greater (mlx::core::detail)
Greater (mlx::core)
GreaterEqual
GreaterEqual (mlx::core::detail)
GreaterEqual (mlx::core)
-
-
I
-
ImplicitGemmConv2DParams (mlx::steel)
Indices
IntOrFloat (mlx::core::detail)
InTracing (mlx::core::detail)
Inverse (mlx::core)
-
-
K
-
Kernel (MPS)
KeySequence (mlx::core::random)
-
-
L
-
latch (pocketfft::detail::threading)
LayerNorm (mlx::core::fast)
LayerNormVJP (mlx::core::fast)
LeftShift
LeftShift (mlx::core::detail)
Less
Less (mlx::core::detail)
Less (mlx::core)
LessEqual
LessEqual (mlx::core::detail)
LessEqual (mlx::core)
Limits
Limits< bfloat16_t >
Limits< bool >
Limits< float >
Limits< half >
Limits< int16_t >
Limits< int32_t >
Limits< int64_t >
Limits< int8_t >
Limits< uint16_t >
Limits< uint32_t >
Limits< uint64_t >
Limits< uint8_t >
Load (mlx::core)
Log
Log (mlx::core::detail)
Log (mlx::core)
Log10
Log10 (mlx::core::detail)
Log1p
Log1p (mlx::core::detail)
Log1p (mlx::core)
Log2
Log2 (mlx::core::detail)
LogAddExp
LogAddExp (mlx::core::detail)
LogAddExp (mlx::core)
LogicalAnd
LogicalAnd (mlx::core::detail)
LogicalAnd (mlx::core)
LogicalNot
LogicalNot (mlx::core::detail)
LogicalNot (mlx::core)
LogicalOr
LogicalOr (mlx::core::detail)
LogicalOr (mlx::core)
LoopAlignment (mlx::steel)
-
-
M
-
Matmul (mlx::core)
Matrix (MPS)
MatrixDescriptor (MPS)
MatrixMultiplication (MPS)
MatrixVectorMultiplication (MPS)
Max
Maximum
Maximum (mlx::core::detail)
Maximum (mlx::core)
MetalAllocator (mlx::core::metal)
Min
Minimum
Minimum (mlx::core::detail)
Minimum (mlx::core)
mlx_atomic
mlx_atomic< T, enable_if_t< is_metal_atomic< T > > >
MLXConvParams
MLXScaledDotProductAttentionParams
multi_iter (pocketfft::detail)
Multiply (mlx::core::detail)
Multiply (mlx::core)
Multiply
-
-
N
-
NaNEqual (mlx::core::detail)
NaNEqual
ndarr (pocketfft::detail)
Negative (mlx::core::detail)
Negative (mlx::core)
Negative
NodeNamer (mlx::core)
None
NotEqual (mlx::core::detail)
NotEqual (mlx::core)
NotEqual
NumberOfElements (mlx::core)
-
-
O
-
Or
-
-
P
-
Pad (mlx::core)
Partition (mlx::core)
pocketfft_c (pocketfft::detail)
pocketfft_r (pocketfft::detail)
Power (mlx::core::detail)
Power (mlx::core)
Power
Primitive (mlx::core)
PrintFormatter (mlx::core)
Prod
-
-
Q
-
QRF (mlx::core)
QuantizedMatmul (mlx::core)
-
-
R
-
RandomBits (mlx::core)
Reader (mlx::core::io)
BlockLoader::ReadVector (mlx::steel)
Reduce (mlx::core)
ReductionPlan (mlx::core)
Remainder (mlx::core::detail)
Remainder (mlx::core)
Remainder
Reshape (mlx::core)
rev_iter (pocketfft::detail)
rfftp (pocketfft::detail)
RightShift (mlx::core::detail)
RightShift
RMSNorm (mlx::core::fast)
RMSNormVJP (mlx::core::fast)
RoPE (mlx::core::fast)
Round (mlx::core::detail)
Round (mlx::core)
Round
Rsqrt (mlx::core::detail)
Rsqrt
-
-
S
-
ScaledDotProductAttention (mlx::core::fast)
Scan (mlx::core)
Scatter (mlx::core)
Scheduler (mlx::core::scheduler)
Select (mlx::core::detail)
Select (mlx::core)
Select
Sigmoid (mlx::core::detail)
Sigmoid (mlx::core)
Sigmoid
Sign (mlx::core::detail)
Sign (mlx::core)
Sign
simple_iter (pocketfft::detail)
Sin (mlx::core::detail)
Sin (mlx::core)
Sin
sincos_2pibyn (pocketfft::detail)
Sinh (mlx::core::detail)
Sinh (mlx::core)
Sinh
Slice (mlx::core)
SliceUpdate (mlx::core)
Softmax (mlx::core)
Sort (mlx::core)
Split (mlx::core)
Sqrt (mlx::core::detail)
Sqrt (mlx::core)
Sqrt
Square (mlx::core::detail)
Square (mlx::core)
Square
StopGradient (mlx::core)
Stream (mlx::core)
StreamContext (mlx::core)
StreamThread (mlx::core::scheduler)
Subtract (mlx::core::detail)
Subtract (mlx::core)
Subtract
Sum
SVD (mlx::core)
-
-
T
-
T_dcst23 (pocketfft::detail)
T_dcst4 (pocketfft::detail)
T_dct1 (pocketfft::detail)
T_dst1 (pocketfft::detail)
Tan (mlx::core::detail)
Tan (mlx::core)
Tan
Tanh (mlx::core::detail)
Tanh (mlx::core)
Tanh
thread_pool (pocketfft::detail::threading)
TransformAdd (mlx::steel)
TransformAxpby (mlx::steel)
TransformNone (mlx::steel)
Transpose (mlx::core)
TypeToDtype (mlx::core)
-
-
U
-
UnaryPrimitive (mlx::core)
Uniform (mlx::core)
util (pocketfft::detail)
-
-
V
-
Vector (MPS)
VectorDescriptor (MPS)
VLEN (pocketfft::detail)
VTYPE (pocketfft::detail)
-
-
W
-
Writer (mlx::core::io)
-
-
_
-
_MLX_BFloat16
_MLX_BFloat16 (mlx::core)
_MLX_Float16 (mlx::core)
_numeric_limits_impl< bfloat16_t > (metal)
-
-
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_abs-members.html b/docs/build/html/classmlx_1_1core_1_1_abs-members.html deleted file mode 100644 index c4d6a962b..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_abs-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Abs Member List
-
-
- -

This is the complete list of members for mlx::core::Abs, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Abs(Stream stream)mlx::core::Absinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Absvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Absvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Absinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Absvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Absinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Absinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Absvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Absvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_abs.html b/docs/build/html/classmlx_1_1core_1_1_abs.html deleted file mode 100644 index a78741814..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_abs.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Abs Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Abs Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Abs:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Abs (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Abs()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Abs::Abs (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Abs::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Abs::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Abs::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Abs::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Abs::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Abs::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Abs::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Abs::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_abs.png b/docs/build/html/classmlx_1_1core_1_1_abs.png deleted file mode 100644 index ee6584fe99fc35e9877aa595ed31186df27fcc95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 872 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-4JzX3_Dj46+ec1O(LBNe) zzH{dH`bW{XZ!s;klG=UxY~RBr5eXJN3+hi=KL4oTeJP`5no1?7uIHym7rZ7tQNL@y zcVlp^=A!p& z_Q0U!S2msw?~m1r+EsXpW73sRI?<_9)TDzhP5hO!b(8)2tF}*Q zNA;Ula<8XHO)6>fUTyX1?M9T7nri-pGh$<9j{L>=VF#Q74 z2cam2I4AA{-WiM)oVpD93t1niZeiGiB>Ar)?3`skd*mcHxao_-CaKsLe_x(_>F?!k zyQ|ZcJWcHveqD0><^f-A+cVF-3=?8sJvJ=A9lpPGp46>6?=7}>eyy96`D#zC=Hqu! z#dlO>y=^zug!=3<`|>;V{VwCF$**&!*3QcD@N}P*GxzJ=b78yZYWpdAWnWGDuJqYIW`pkhacV3oVtHn8YwuWc?^RxF4$p8BM^Tw;7wddFVo4-HH^H-^p_oO{NtEU#9JIwe& zH;>`5;j(LQ&6ZrB5jFX0M_hB(QD2r1!i0hb8g4(CqcoSA$f+1_zR00#Y^=X9HSO8c z*tOrqH}+H%-+3C9DOuEeP3F(N&2v+Kb!y5NZ(n*Z%hqbv%)Lieo3{I=9S^d3=J`GR z_U*l?wb^OkM9R0FTKP>eTX$xp_x7W^r;BIYwRfF0JwNr@nKN-88pC$Jn4BZK{^7l% zi)vx+`)s4v-db1s^`_RknCEJFUoRy}mLK#rG5+o8bo$I0?~IuXS - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Add Member List
-
-
- -

This is the complete list of members for mlx::core::Add, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Add(Stream stream)mlx::core::Addinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Addvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Addvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Addinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Addvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Addinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Addinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Addvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Addvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_add.html b/docs/build/html/classmlx_1_1core_1_1_add.html deleted file mode 100644 index a5a7ad12b..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_add.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Add Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Add Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Add:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Add (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Add()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Add::Add (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Add::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Add::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Add::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Add::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Add::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Add::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Add::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Add::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_add.png b/docs/build/html/classmlx_1_1core_1_1_add.png deleted file mode 100644 index 39bba292a843ebf0497a42bb6bc0289f5598f73a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 874 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B+PJzX3_Dj46+eb~2JLBNe) z-qZN~|0CC@K9ZN2pQ_A@`hBF|%=jr?za+U&c}ex`Fy;j+xvzI(lbZu)I` zmpJ80X6c)v7dyR=PR^TS)TFX?PU`BOODWD?w}P*SY5%TWn>STHOE)!e?W7R1`C*k! ze4DoFzn0&s@{(bCSm>wR+_z>Q)7O5A@VGQDe9JZ7wf>K8y9T7nri-pGh$<9f{L>=VF#Q742cam2I4AA{ z-WiM)oVpD93t1niZeiGiB>Ar)?3`skd*mcHtz3%3+p_45C`Ggv3W?rY`D<+<_u{pQJS`7C#FTfymwpUW~oRRtfryXDyq z&s*E8QY}OFlvG}rAKqJfKV;q7&7tQqHz}&V&D>OKQoeTWx8ilzZe1&_1FbxU z$A-(Uy)|2MeMZ#es~vI8Sw}rtJ_r*E8fduvWRB8YY9gm%y!j%BuCcNH!ql{9PhHnu z-=7%0@k@-N-P)}CcmfqBgzp6WZ+PlfW7S6oMcs=`Wz3VLb^7+@J7R^sxeevG=Z8L9b z>Su?l-oF;MIxMSp+qN#{>z19_`+c$tS=QTjrlrNJZaH&iPs_BKGpAoLGX89|F3d}l b_qcsu>)e>BKaalz<_ZQ+S3j3^P6 - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::AddMM Member List
-
-
- -

This is the complete list of members for mlx::core::AddMM, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
AddMM(Stream stream, float alpha, float beta)mlx::core::AddMMinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::AddMMvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::AddMMvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::AddMMvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::AddMMinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::AddMMvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::AddMMvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_add_m_m.html b/docs/build/html/classmlx_1_1core_1_1_add_m_m.html deleted file mode 100644 index 16d98170e..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_add_m_m.html +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - -MLX: mlx::core::AddMM Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::AddMM Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::AddMM:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 AddMM (Stream stream, float alpha, float beta)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ AddMM()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::AddMM::AddMM (Stream stream,
float alpha,
float beta )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::AddMM::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::AddMM::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::AddMM::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::AddMM::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::AddMM::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::AddMM::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_add_m_m.png b/docs/build/html/classmlx_1_1core_1_1_add_m_m.png deleted file mode 100644 index 5e054780b6598dd29eb1019067f39135616a7ba2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 905 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GU7o-U3d6^w7^zV3Uiz{A$g zzw*;>`;VT*iW4TRi{2XBcTIHh1(q{MW_;7Pd~PF`;wja8VUmjeLRHT=nJCXmf0q1S zZeIRM-*-~o1Li3HXFHr@vzNZT`^-Sp*I$MGTzV}^?5vJw>F3O= z>MxX{pKtmX=siiVAk$Q}e$Cp;YX8=R%5!^KeeMandEuMNv^w>*o>@_!yY%O}c>XeV z@}9J(WtvJQr>^HGqjh2DEcw|F?B2oHb9_eB_S+NUlCylnl&g4GiK+`8@XuhZ;M8T% zUEbqm9u7O{ru7nnW>MKQ!VaUbwTNIvDycsl2E#RSz%6PW3i*{YtOjQQ&=)bHBw zeGy!rIqAwL-nHz?>(s>7Zkc(0Zq}h+t8S;tZQEZfX=7{A7rp51!)w)Fy)Hlaw6t$` z_SwS8C3$bp{0iIp;@1NEbvv)euAFx}ZM9tSiMA;v&nB#0y>aQbzV)B;)&}!#mk!jH zy|3W;d|U1hx$Ub%=l6H#lxD5os@?jdC2ac>?`*Gqo9`_4t?^xLCuW~Hl{eQv;^q7E z{MLKYe-|vXj`9_=XNzAg@dtkF>PKf>CK{aZabtoauId zUHP&0*sa-mxA$(#PP_I{IVy90P^RwP-%DT3nps-0z?6NzeQfy6=~0hzr>CB^IZbJhFnsiTu3oxgkTtcid9 zZ{?*uHP%^EH?7!}mL@wVs#SR^{7j9lKTm$tq5uE@ diff --git a/docs/build/html/classmlx_1_1core_1_1_arange-members.html b/docs/build/html/classmlx_1_1core_1_1_arange-members.html deleted file mode 100644 index 3d8271ae2..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arange-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Arange Member List
-
-
- -

This is the complete list of members for mlx::core::Arange, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Arange(Stream stream, double start, double stop, double step)mlx::core::Arangeinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Arangevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Arangevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Arangevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Arangeinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arange.html b/docs/build/html/classmlx_1_1core_1_1_arange.html deleted file mode 100644 index 936235fe3..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arange.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - - -MLX: mlx::core::Arange Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Arange Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Arange:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Arange (Stream stream, double start, double stop, double step)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Arange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::Arange::Arange (Stream stream,
double start,
double stop,
double step )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Arange::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Arange::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Arange::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Arange::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arange.png b/docs/build/html/classmlx_1_1core_1_1_arange.png deleted file mode 100644 index b5f5fd908820b268b6341df21e452a303bedbbab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 907 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GU-o-U3d6^w7^zPG_njp7fpP6*%XcBiqh9{YD_-ukQ{-{o%){4ytvPsoqUF(9>0H|Jw<0IKDqB?Q zyLidmYtPo@-wj_Wb@Oa+`h+F(HfLRp+?D0w8GUQ-)zfwH+2zyavvhASnyI=n&u;B6 z7TJ*O-D~BuJTEcotxY@qy*hhyNB`DW$%>xQ^Db&}-_g{q!$PTrID^sJs*eC{yg2R%K8$A-(UJvCZ#eMZ#es~vI8Sw}rtJ_tuK#5r*v z@XlbY;M8T%UEbqm9u7O{ru7nnW>AtZnDZz(!gX>($di4@G_oUM~oe$G7X|9r{o zbp78~_M3WU{cOADdF0}eMN{8BD_%Zp!=6`vjoR1d$2To+w0k!#*LVA!)$>hQr|XyA z3(Y<^dr59~`nBz=+Vz-!7oOdFSN&@7?X0VYv8GFw=*DjCOFDh;Rs8e2QL}CD=(()D zvfpviwzvBpWZ#Qj`>RGKBs)ESYgwwY-NLQApL%C+`*ZH`IkAtXYkx)9Tml8ihD-6s zcZr=9sh zYz)J(WS_OCQ$5xjZdF??xR>o}*JO?d>R7`AGq66%XDpp^sba#JGr%Nr=FFa!X)|Yv z&%gHhm3_@k{>-KFRdch>o?QRLNWB285 znN?xDnQi;ENgvll%`G$Evvss^G-&?chuD`ecLwIi5w@|0kXU?475v94*M5dm>f^&}InjWt& Qz-+_d>FVdQ&MBb@07Wm)i~s-t diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_cos-members.html b/docs/build/html/classmlx_1_1core_1_1_arc_cos-members.html deleted file mode 100644 index 233f33000..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arc_cos-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::ArcCos Member List
-
-
- -

This is the complete list of members for mlx::core::ArcCos, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArcCos(Stream stream)mlx::core::ArcCosinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcCosvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcCosvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::ArcCosinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::ArcCosvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::ArcCosinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::ArcCosinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::ArcCosvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::ArcCosvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_cos.html b/docs/build/html/classmlx_1_1core_1_1_arc_cos.html deleted file mode 100644 index b465b208b..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arc_cos.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::ArcCos Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::ArcCos Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::ArcCos:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ArcCos (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ ArcCos()

- -
-
- - - - - -
- - - - - - - -
mlx::core::ArcCos::ArcCos (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcCos::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcCos::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::ArcCos::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcCos::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::ArcCos::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::ArcCos::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcCos::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::ArcCos::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_cos.png b/docs/build/html/classmlx_1_1core_1_1_arc_cos.png deleted file mode 100644 index 2daeb8d48a2150ddda1796400d1dd81551bf6b6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 897 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GUXo-U3d6^w7^=Jr2U;9+ZL zU-{|(|D)5>q?uZlRz`TsM0K-K~lG z%4>D<+Qv2Wvpg?x>aAV&AnPaR+HT2o?(VQ# zXRfzr9efG$fpVvoCs+$XnN9u*pl%QGslV;w`X_+>2=JX3j#-ATus=8aV!m(>ycHNeQIk7;S4-V$Kb>W~Sy*rDv=y_Xj8;c~ z-Foc)Zm;*-N=VGY)^eG!Kgn}`AdzKov7U=XodxlAK=KuDVFa~B822WQ%mvv4FO#pv+!N&jq diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_cosh-members.html b/docs/build/html/classmlx_1_1core_1_1_arc_cosh-members.html deleted file mode 100644 index 29d5b9722..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arc_cosh-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::ArcCosh Member List
-
-
- -

This is the complete list of members for mlx::core::ArcCosh, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArcCosh(Stream stream)mlx::core::ArcCoshinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcCoshvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcCoshvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::ArcCoshinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::ArcCoshvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::ArcCoshinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::ArcCoshinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::ArcCoshvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::ArcCoshvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_cosh.html b/docs/build/html/classmlx_1_1core_1_1_arc_cosh.html deleted file mode 100644 index 54a745725..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arc_cosh.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::ArcCosh Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::ArcCosh Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::ArcCosh:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ArcCosh (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ ArcCosh()

- -
-
- - - - - -
- - - - - - - -
mlx::core::ArcCosh::ArcCosh (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcCosh::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcCosh::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::ArcCosh::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcCosh::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::ArcCosh::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::ArcCosh::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcCosh::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::ArcCosh::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_cosh.png b/docs/build/html/classmlx_1_1core_1_1_arc_cosh.png deleted file mode 100644 index 2242caeb7f52244dab16af18cfd137121009a01e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 909 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GT?o-U3d6^w7^=Jr2U;9+ZL zU-{|(|D)HJaWXmu<*(m;`elq^)~Rk|iOs*K&MBV9ze(k+TZZSP=@%xc=<}^r@vOV_ z*f^@XzRt|E>Y#Z>?3%)MtLt93?@ephdNQl$ZT8G<&(r7sk%)A9Q~2)kss6I5OLoO( z*dEfzym0GA>Gd+Nt0xTnWF03}t=kmp{&JI|s%&QV>gj(g*CtM#pS3pi;+jbz=JUg9 zoBcMG>b#yFHL0Y@d$s1zecSlje?+a`CpM|%iFVXehugCw=CNn`23?+|yRTGO_2qRA zUC&QKQInpiZc#aTdQX()a~oNP`H$EPYTU_cxNzH zaOyJXFJyh7x`km+i&(?-3rrt`q8Q?kB>y*towGd89yuvZ8EC3EC=3>dO;WKx{pGaj z%a4+-`|a&#t8D$#a_wl(=2lnj+-Ikqw4~y|6i~_(@uttlZjVPk!Heb+s?*>&k6gzY4A` zTJY9a=X`0@>Rs{HyHelFEt+}ry - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::ArcSin Member List
-
-
- -

This is the complete list of members for mlx::core::ArcSin, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArcSin(Stream stream)mlx::core::ArcSininlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcSinvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcSinvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::ArcSininlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::ArcSinvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::ArcSininlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::ArcSininlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::ArcSinvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::ArcSinvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_sin.html b/docs/build/html/classmlx_1_1core_1_1_arc_sin.html deleted file mode 100644 index 8f35ffa70..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arc_sin.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::ArcSin Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::ArcSin Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::ArcSin:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ArcSin (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ ArcSin()

- -
-
- - - - - -
- - - - - - - -
mlx::core::ArcSin::ArcSin (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcSin::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcSin::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::ArcSin::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcSin::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::ArcSin::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::ArcSin::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcSin::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::ArcSin::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_sin.png b/docs/build/html/classmlx_1_1core_1_1_arc_sin.png deleted file mode 100644 index 644ab73d9f61e878574c75e7c990b56da38092c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 895 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GU%o-U3d6^w7^zRr8CAi&nn zuX*cx{iDeiW^6r^eWz@ZDb;pc7IW=zRp$Rm#pgadPFr%5L)Y_@P}HO+M;A_2IqARa zZ_l^5-`~|d{eLuFYqotC@H{Hh`u3%jPU}wIkUPD}*8caS+h>H5`io=3>N3kcSKVe_ z8!e&A8zsG4?$*8_Q{$ds_X$hpx!+v1xa8)9Nqt+kUOoM9&$SJw{I_1)lu_onYPSFC zeU9okt)_hq*7dYHxb*6jn)vAU{vR=`_lZp^c_O;@ljH5#5x<(ZsIAOAD|mlb=cF&$ zEz?vgIiaphjaxgXcphJae<93=#yRs|l>=&{=P~F0?r$ww` z`UR#BLQxEHPTU8)GZ-s4bs6-LB<&YWMf3mD6+r)=-}L9Es6OmfKmYx{5A)u>^W)z#ONA$I zkxK0x@&9c9F4)iCzINZLuluh4|GYkGQr+AOlT`FSXFZ+sxrCvni~B&$nU$qGeO{U_ zzjigtZN2B#M`}zz&;kNyDE(nvJ0)lq|D>5Wb6Td&oH_l1k@4q8SE}yTZg^aFc+SRs zOQ-flPh(79a6HQU!*9;p3%(amKfdYBz4u#It<0_Bys2YmoL#wS>l^>H<6*Yb%HKGr zmh@iGi4I@8I4#Y2Uh3+)tNV)Hsv5t}O#k)poefaTZuwTRFL8I7*V-)v^8Q4X-t*sd zHM2Z;_A~dbvnIXIUL9_omD~PnQrOQ0Z+&(CTCEMeo8N!_%Cwm`*9%0YrNud&K6A!9 lW9H1tnc> - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::ArcSinh Member List
-
-
- -

This is the complete list of members for mlx::core::ArcSinh, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArcSinh(Stream stream)mlx::core::ArcSinhinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcSinhvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcSinhvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::ArcSinhinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::ArcSinhvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::ArcSinhinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::ArcSinhinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::ArcSinhvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::ArcSinhvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_sinh.html b/docs/build/html/classmlx_1_1core_1_1_arc_sinh.html deleted file mode 100644 index 3c5272e30..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arc_sinh.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::ArcSinh Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::ArcSinh Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::ArcSinh:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ArcSinh (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ ArcSinh()

- -
-
- - - - - -
- - - - - - - -
mlx::core::ArcSinh::ArcSinh (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcSinh::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcSinh::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::ArcSinh::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcSinh::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::ArcSinh::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::ArcSinh::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcSinh::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::ArcSinh::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_sinh.png b/docs/build/html/classmlx_1_1core_1_1_arc_sinh.png deleted file mode 100644 index 728cb98d33b26311eb475e6419bdc830d42310fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 901 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GTyo-U3d6^w7^zRr8CAi&nn zuX*cx{iDeiW^6robEj;PDb;o>+qtGaHS_dWge z7piViIeB_dl;v|9S%&wI*bL;0v+m{vSDjs1x_#Eg?4Y$fIvMJmxDR+|FjjEtGUzX4 zeW1F9VNZ)#!}JSGAB3V9;*cck9kid%dETt!xmghCcd*HU+Mbi&p*G*ZuqL zXRB=e({k--&*oNF?c8Uly|*UZef2G3+1uUvlixG{-IKn>_Rg*F`j>V){{$VsyLH+Q zPpfTZsdqzbOJpU^Xa8!8Uv+)k%~j7!ZcdogS8~&8c68S2`{#CVYZFgSzc%I1gW~Y^AG5-0b@yG;V!w57!>4`ya?G4gpE={5F>_|+$Bf$e znhlQ%_s*JldWHN&uj8uT?w5bBx+e5z=V7xK#rL0X^r_xg9(DDC*`Ah|>RF~~VOzD= zrY0I$Z+o?o<^FE3_fiXIZaWv1zOFefja_eZX#J}Ik&|btZcW^``>wxrMp|k0fdh_ z{<$+}{uNu8n)Xa}%b7EKTBgmM2@HiGuS~0djHcV?XnfiG<}fhBFnGH9xvX - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::ArcTan Member List
-
-
- -

This is the complete list of members for mlx::core::ArcTan, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArcTan(Stream stream)mlx::core::ArcTaninlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcTanvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcTanvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::ArcTaninlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::ArcTanvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::ArcTaninlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::ArcTaninlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::ArcTanvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::ArcTanvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_tan.html b/docs/build/html/classmlx_1_1core_1_1_arc_tan.html deleted file mode 100644 index 52bf53085..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arc_tan.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::ArcTan Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::ArcTan Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::ArcTan:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ArcTan (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ ArcTan()

- -
-
- - - - - -
- - - - - - - -
mlx::core::ArcTan::ArcTan (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcTan::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcTan::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::ArcTan::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcTan::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::ArcTan::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::ArcTan::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcTan::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::ArcTan::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_tan.png b/docs/build/html/classmlx_1_1core_1_1_arc_tan.png deleted file mode 100644 index 61bf8d991ceab8d3da11e185d62fa8119883f9aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 895 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GU%o-U3d6^w7^zRr8CAi&nn zuX*cx{iDYg`xuU$Q}c@I+a(&D%>4S}rY-d+EuVi>@V=DMGEJqDQ`hs;qYGY>o~Ylg zugYHjZ?Wek;e88AHy)FH6{EfOzFB$K1aG5jr)_f2pSSyIXViYaLdk)u>a8qEuJr*scA< zGB@RQ#5Mn|Dlb{4hlPI1&6PF#xHGI$N9E-S?Wo&r*VGGNmtUH-WL4<=AJ;smEQwd% zqH@wZ!*kN~3zJmzA7?$C^SOYbrc3%jMbFC8-MlYNmt9LSU37gxRG|>#pBAx(=@*zj z2t_f(IdLEG&S0$I)Me0L$ofEa3&S2H$$t%D=Pdi#BPY4ROzk`+DEXnCSG?b1s8|;Zn-$oOfZ-Z=cshy$(41)oqH`TXB__ zH?HyCe_Xcp)aSxUYyEPsmPIS>TX0qP=h{%!`;~XEs_k1ID%YJ34v?JJ?;oG#dw(FP z)7ZH9gX-EV(Vv{Ac(1kmQCm}a+N|{Fo3BRxtBp2hg*u;p|1(c&$EH2kW{InBPS)1@ z%>B*%_GMM4!p;9?h3aqqt`hxp^|wxM{h5*8wn6rK)?aIkH+S`ChJM|1w{(k~^ZZL% zlj|m}b^C1)lKUuq%c@EF*{@Y}-(L8>WgG8W|D?hL-?oUA-k*2GeNXw;GiU1BFBlnr s7K%zsi*q`C=FI6GQJPClWd1YU37^xvZR(>Pz^uaH>FVdQ&MBb@09$FjhyVZp diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_tan2-members.html b/docs/build/html/classmlx_1_1core_1_1_arc_tan2-members.html deleted file mode 100644 index 0fc8af254..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arc_tan2-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::ArcTan2 Member List
-
-
- -

This is the complete list of members for mlx::core::ArcTan2, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArcTan2(Stream stream)mlx::core::ArcTan2inlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcTan2virtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcTan2virtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::ArcTan2inlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::ArcTan2virtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::ArcTan2inlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::ArcTan2inlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::ArcTan2virtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::ArcTan2virtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_tan2.html b/docs/build/html/classmlx_1_1core_1_1_arc_tan2.html deleted file mode 100644 index 2e293234e..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arc_tan2.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::ArcTan2 Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::ArcTan2 Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::ArcTan2:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ArcTan2 (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ ArcTan2()

- -
-
- - - - - -
- - - - - - - -
mlx::core::ArcTan2::ArcTan2 (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcTan2::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcTan2::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::ArcTan2::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcTan2::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::ArcTan2::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::ArcTan2::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcTan2::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::ArcTan2::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_tan2.png b/docs/build/html/classmlx_1_1core_1_1_arc_tan2.png deleted file mode 100644 index ff2449809de9c29a3400c3f1f7091052e7e901da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 913 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GUNo-U3d6^w7^zRr8CAi&nn zuX*cx{iDZLW^6r^eWz@bDb-$fFy`7}rjzkS=PK<^Ofr#PsOlN#jM;^ZtUb34PXAwuarhzAbFkglMC0{iQc1&QJajeqQQP$7UXF{J?i$xj5Nee{WjlJ}O@OE6U^2%dWgK zx}Kkeq9#32-J){x^qwfo=Qgqo^B=Jp$QNhb%?qwNyK-y9*%ziO!|u2+*e_&#pt^-& zPm5T?^b1TMgrXSYoVX8oXE0W9>N4mfN!l-%T72%a1$VSe46w1^v^BVUh-_04%Ggt z?Qv=68|k_uvRPNZKURuv-hB1e)aD;e*FKz>eo5x%!Pj!RkE)}-Zmn1rYPMx>;?lY= z<<>PRyLVq^UaQ90JX^z4{`t}O2jqW!ti1gydh5OIzv}B&0Yi!t7*a;-!_HayvmaQ# zgYnGqIZ@khPl+qe(hW1N@?9lrE_lEnGc2$M)KmV9rBg1|OgM8UO?k_iGkaR5&73*? zdDQys`Dr=ZPoJ4(l<~`Lt;wvSizT9eg0gw*=I`v&IK0jDo&4(!X*YL=UEcaPe*Uz+ z+CQ(OUO!1G)4O{7SJUE^Tk-@~wQJc|A8(#pF=6em(Bli%PCK(^`R&=ucCOp9E-g*n zZqd~_&p(-5*i}AvdQ#f82bZ)w_n!+}Ui&J`?BfpuW9f$%vxM%=U)#OqOYHsSprGlz z%4!`KHuv{GwR?~6>c4y{9{%UYjG2|3y2i%(3scjcse;_D6Q#M-MD{;JiRv8T77yEP Qz|6zo>FVdQ&MBb@0Lo~`?EnA( diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_tanh-members.html b/docs/build/html/classmlx_1_1core_1_1_arc_tanh-members.html deleted file mode 100644 index 64caf5fc1..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arc_tanh-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::ArcTanh Member List
-
-
- -

This is the complete list of members for mlx::core::ArcTanh, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArcTanh(Stream stream)mlx::core::ArcTanhinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcTanhvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArcTanhvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::ArcTanhinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::ArcTanhvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::ArcTanhinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::ArcTanhinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::ArcTanhvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::ArcTanhvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_tanh.html b/docs/build/html/classmlx_1_1core_1_1_arc_tanh.html deleted file mode 100644 index 9b55347cc..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arc_tanh.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::ArcTanh Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::ArcTanh Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::ArcTanh:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ArcTanh (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ ArcTanh()

- -
-
- - - - - -
- - - - - - - -
mlx::core::ArcTanh::ArcTanh (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcTanh::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArcTanh::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::ArcTanh::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcTanh::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::ArcTanh::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::ArcTanh::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ArcTanh::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::ArcTanh::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arc_tanh.png b/docs/build/html/classmlx_1_1core_1_1_arc_tanh.png deleted file mode 100644 index 59f4ba4f4fc80b3ffcab15b8c7002012d6b8c63c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 901 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GTyo-U3d6^w7^zRr8CAi&nn zuX*cx{iDYg`xuU$Q}c@I+a(&DtoJ&x@teNoa~ru7PpRGulT`E5d?Qou(y|gs9cqzwDmE_tphrj)K)BN7HxWo3GNlx|3bWg3*t=DXO zCRr`*i#1!jJLF5r<0*nFE1zmbr%q9m4!Sh)SI*W=_Uo_OK3yJldgF>TPpxkM)q5P( zZ(7N{ULG~6q{(}=)u*>Nt#Td}ul*F|acN@smTkOi^B;x1Ut;PRx^mi&Yra#K#4B%6 zIq99@IcYk`rH`|o&iP!xP}3!SprU7G>2BVarpvCSm@c}$AgWN9@lT6b!}JSGAB3V9 z;+(h-cxNzHaOyJXFJyh7x`km6lH|XJuydCE?2(h);HEDQo1|j@`NL_;m;Wwz+g+7+ zos?DQ^g8Lt%_F|rYo8S_ov}fu6chwk^P89VmEBRkC6||}z2AiQUfii2yRXTZdmaxu zuQR)=Ur+XLVQBPs@27XHqMyzH2ZLI4dh+(oSM{D>j%qiK$#+?KWu1cO@lAO@{mhk<{TI-J*ug!ISExqmP_kU^a-*e2%cP$Q8 zU05uv`ttFfALbw0|NY#P`!#g!_qG4#*I%9V<#o$6l}gEQ?dNmanI8n-VK|oTv-Wnb z$9lu9YO4kJvR&<(&GA4TH6UskhGITRZ1pT-8@oz0L2^rLtQ8?AsT9sfmf__-7ZsyFL3y$M<#9X5M@c mccyp7%$cBISURQcu{^WL9M;_u7u|pvhQZU-&t;ucLK6Vpv$(AQ diff --git a/docs/build/html/classmlx_1_1core_1_1_arg_partition-members.html b/docs/build/html/classmlx_1_1core_1_1_arg_partition-members.html deleted file mode 100644 index b3ae98b73..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arg_partition-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::ArgPartition Member List
-
-
- -

This is the complete list of members for mlx::core::ArgPartition, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgPartition(Stream stream, int kth, int axis)mlx::core::ArgPartitioninlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArgPartitionvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArgPartitionvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::ArgPartitionvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::ArgPartitioninlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::ArgPartitioninlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::ArgPartitionvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arg_partition.html b/docs/build/html/classmlx_1_1core_1_1_arg_partition.html deleted file mode 100644 index ecdce6668..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arg_partition.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - -MLX: mlx::core::ArgPartition Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::ArgPartition Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::ArgPartition:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ArgPartition (Stream stream, int kth, int axis)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ ArgPartition()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::ArgPartition::ArgPartition (Stream stream,
int kth,
int axis )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArgPartition::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArgPartition::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::ArgPartition::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::ArgPartition::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::ArgPartition::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::ArgPartition::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arg_partition.png b/docs/build/html/classmlx_1_1core_1_1_arg_partition.png deleted file mode 100644 index 8dcfb003d24a60c695b8e610cc069a2949a22060..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 936 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GW1o-U3d6^w7^zRhbk;Bn2* zTXO3C|0B&JLeHBYm2Ej|;%~|HDUq*l^FP-f!*lFPp6A-KCoU1auH>oBw$@=%*`Z(N zQM>Qlm-d|Zfo&~&_L+r!TMzxqed*SEXVS*_OIs$*H>#BNRP>sY8dbL%w{l{ljBKMyv|OsUd*&ubwr^LqUOiP8mmTr6Jt{gfWVOeuw9A*&UnoS^ zM$XTg_=Hhy?W!lYZ@n`67~?I^J?TxQn|6LitJTdp-rx^r(1yK(k%Z`6j`S9PA3PhEe0^0b5Xd%3kOw|{+^J?-RA$K$$D znt2Mp!`5GkeYN!Vfr_}R<~5V!qSL+4gG0jPrq!(3*{lD~S-o|a)H-t~?XB?wC-%LS zj(fzn^~+C-6W11O%i0~&;h(|lZMS{Z6ZZAhTRPWgzDzD$Hr0HKUEL0Y%)x>S9T7B(xSpD8P`-^fLA@t=;xzlF_!itb&;<-M>s& zr+c^d!&>poP}aHgUwxl`@bs2d2Oj6}YE>?{TK?Z@wbsvV+oHDmd5fR1-twvKntI^e z#gimrzn@iGb?AipRu_xQLV`Qn;*Zw$UwiP|)#c3|&FH`VeH|Th_kRo4Rr+Kb - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::ArgReduce Member List
-
-
- -

This is the complete list of members for mlx::core::ArgReduce, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgMax enum valuemlx::core::ArgReduce
ArgMin enum valuemlx::core::ArgReduce
ArgReduce(Stream stream, ReduceType reduce_type, int axis)mlx::core::ArgReduceinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArgReducevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArgReducevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::ArgReducevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::ArgReducevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::ArgReduceinlinevirtual
ReduceType enum namemlx::core::ArgReduce
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::ArgReducevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arg_reduce.html b/docs/build/html/classmlx_1_1core_1_1_arg_reduce.html deleted file mode 100644 index 1600965aa..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arg_reduce.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - - -MLX: mlx::core::ArgReduce Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::ArgReduce Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::ArgReduce:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - -

-Public Types

enum  ReduceType { ArgMin -, ArgMax - }
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ArgReduce (Stream stream, ReduceType reduce_type, int axis)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Member Enumeration Documentation

- -

◆ ReduceType

- -
-
- - - -
Enumerator
ArgMin 
ArgMax 
- -
-
-

Constructor & Destructor Documentation

- -

◆ ArgReduce()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::ArgReduce::ArgReduce (Stream stream,
ReduceType reduce_type,
int axis )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArgReduce::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArgReduce::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::ArgReduce::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::ArgReduce::output_shapes (const std::vector< array > & inputs)
-
-overridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::ArgReduce::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::ArgReduce::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arg_reduce.png b/docs/build/html/classmlx_1_1core_1_1_arg_reduce.png deleted file mode 100644 index ac897a69d7edec8e1e8739c3ee6c241cd955b53e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 932 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GWro-U3d6^w7^=Jr2U;9+ZL zU-{|(|D)HJaWXmu<*(m;`sJRaD^tYN4Jv+5ol`uIf0N2tw+zoo(=SX?(dS#M;#qg; zasHNX|Ni7m`qGqtVOPXszS4D5x9!#C4?STjdHc9g?)md}KMgmv+<1Iv`BeS4TAro5 zFI2SzURtnqvToILE3<b^^<&R$lR?yZgc_IzvG_CF!nd&SNI)ql>s zDq1pW?c=R=D^)$!cWjxZegFR2!;1T^tvc;AsjtR$wM<5I=hMmw*Hlc`-h322Rl{>X z+=UBOJ>#BTJ!Sd)CBqL9^M;=@f?t=-zLf2^cK6kuxXD?rs!TsPbs6**vOZAV!my`B ztYP{ErVm0<3~^4}2fQ;FE084rut!-ww~(Uvm7u#;?CW zZ>p?(s=h@pZH}%^RHkvf+$z@BVcYvtZ|(bS^waLb`D(Y@hu7AAo&9d|>FHMQ)@?oF zduiiV?bqvGEq#5UBJQ$zP4M1rXTxllpKhB{vgGu&n|F$~|9V>!^}3+_cJqpS zJ*V8%_CnSqgB32GzbxYa$p3J*x66;NU489$*#C3>TUGvAQ8$D%mzv0{7;nDGp=)fc zzc4lJ*;A+2ulF4n^$wjGc{L`{e&y6Y?`eJ8zWc6K{js>X)>|_E``%ie%d|1n r=f8F4&3wVAv@~Ec^3q)T@&~iT?OBsH9FJcG%ufuSu6{1-oD!M - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::ArgSort Member List
-
-
- -

This is the complete list of members for mlx::core::ArgSort, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgSort(Stream stream, int axis)mlx::core::ArgSortinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArgSortvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::ArgSortvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::ArgSortvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::ArgSortinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::ArgSortinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::ArgSortvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arg_sort.html b/docs/build/html/classmlx_1_1core_1_1_arg_sort.html deleted file mode 100644 index 510709ed7..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_arg_sort.html +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - - -MLX: mlx::core::ArgSort Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::ArgSort Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::ArgSort:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ArgSort (Stream stream, int axis)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ ArgSort()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::ArgSort::ArgSort (Stream stream,
int axis )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArgSort::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ArgSort::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::ArgSort::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::ArgSort::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::ArgSort::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::ArgSort::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_arg_sort.png b/docs/build/html/classmlx_1_1core_1_1_arg_sort.png deleted file mode 100644 index 523bf16a1f393ec78f0cd6f3df8783e4a793ab99..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 919 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GUlo-U3d6^w7^zMk}0i-&D? z|EekX{&)I6+Gv>YCa`FdPV{Qcsy77_Z#${fpR|1bQ^EUEPRlfvN={wRPmeBmO?skk z`_C=={darcNp%mIqr|iCEIhaM(zm?RzM@6G$I2p?z5RJp-QI1QK=qv8TRts}Rb81U z9@TH)CAGz@?C#dLL8eAM!R`~5%v+svHE>ssho}3kTdz|0uQy%uDR}KxomruiUOl_K z%Kw7rw!YNAtEZ{VeQ+tuYv1~{ht>YA3zg^gwEEN&cJsnFm1(~nqb6V3@=P?|s&mqp z;~YTO2}MnMqPj)pwao;`9>nljK-?+njL(-((LQn5e% z<+SO`kLF!<`~PQ7y7Gy4ZMS4PcX!yWGt*~h9sITGcIwP+`)g;`$iI00*X8!%wY6U- zzngrz-Rj-Ctw($>ZQQE;dflsquMbqjT{f=?+Pm#+nC)}3i-?;rlu-`AfV`+nNYn+^IYuOCHUK9h6e{-5C7v~RIar_Y=LCLGPB dCbIt-S9s0-$L+{}2bhHzJYD@<);T3K0RRE?)z1I` diff --git a/docs/build/html/classmlx_1_1core_1_1_as_strided-members.html b/docs/build/html/classmlx_1_1core_1_1_as_strided-members.html deleted file mode 100644 index 63e99012a..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_as_strided-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::AsStrided Member List
-
-
- -

This is the complete list of members for mlx::core::AsStrided, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
AsStrided(Stream stream, std::vector< int > shape, std::vector< size_t > strides, size_t offset)mlx::core::AsStridedinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::AsStridedvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::AsStridedvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::AsStridedvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::AsStridedvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::AsStridedinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::AsStridedvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_as_strided.html b/docs/build/html/classmlx_1_1core_1_1_as_strided.html deleted file mode 100644 index d9002ed44..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_as_strided.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - -MLX: mlx::core::AsStrided Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::AsStrided Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::AsStrided:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 AsStrided (Stream stream, std::vector< int > shape, std::vector< size_t > strides, size_t offset)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ AsStrided()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::AsStrided::AsStrided (Stream stream,
std::vector< int > shape,
std::vector< size_t > strides,
size_t offset )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::AsStrided::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::AsStrided::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::AsStrided::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::AsStrided::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::AsStrided::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::AsStrided::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_as_strided.png b/docs/build/html/classmlx_1_1core_1_1_as_strided.png deleted file mode 100644 index 7224d5d45d763d83f5d9719c6855149d687d13b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 917 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GT)o-U3d6^w7^KAf~#OMq>5 z|Eeo{{tL$^i!d6_eDdT?(QBWszBPQw%!i-pTRyjuPw|}9dts7_{z6sHIGHHVNq?67 zPB$rgX+KM4?*sh|Tgk_MrE8~t+qrhG*3)egzf*awuRZ73XCE0XQ#ozJCwFVFpu6)j z?q1f&ym0Hz*R{3NSE(PiDP{9~RkYR*fA@BMPYdo`}jF0yFEmHX_ z1#+E}_oO{7(^M*FhHF2cvz+-s^c{w0$$o2Z=X$NT+$y$OaLe#-uBsgroeG*0G7L-7xVxvaf% zUcvMEw)`Ix%U6WX@9(}UbtNo2oa-a++QgI7uTA;$p!B@iN8`1>BKBO;lD;)>!zKH9 z<<>Q8%F36qN1avT0R~F#T=W0z|1R{OKOR;e`nq`a|MUJ^RsLFmLh9MoQSQ_;uOrOWA&Fk7l{8_uTqOh3N-oSYQvRKg>~@OHJfej5pup&^0#JUznQq>}l(@ z-{;PD{GPe$UG8GIf5&r_vT3$jgB?_a-`dHP&-?X_QC zxuNcP1w!8YMofDzj$()dD$Kb<3GEz+^LX=Jd*~L0*|w|CpKNW*aYS TeZ3W!ffzhp{an^LB{Ts5 - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::AsType Member List
-
-
- -

This is the complete list of members for mlx::core::AsType, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
AsType(Stream stream, Dtype dtype)mlx::core::AsTypeinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::AsTypevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::AsTypevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::AsTypevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::AsTypevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::AsTypeinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::AsTypeinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::AsTypevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::AsTypevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_as_type.html b/docs/build/html/classmlx_1_1core_1_1_as_type.html deleted file mode 100644 index 00bb61d5a..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_as_type.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - -MLX: mlx::core::AsType Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::AsType Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::AsType:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 AsType (Stream stream, Dtype dtype)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ AsType()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::AsType::AsType (Stream stream,
Dtype dtype )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::AsType::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::AsType::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::AsType::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::AsType::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::AsType::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::AsType::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::AsType::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::AsType::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_as_type.png b/docs/build/html/classmlx_1_1core_1_1_as_type.png deleted file mode 100644 index 4b919c285526347e6d43cb082353c9bcdff54692..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 918 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GVQo-U3d6^w7^KFoWqz~ja* zAN2Hl{iEAyoQzIJ+h18Nd)>MC(h&>wV{7V9T0Z}&;C(5lWtvJQr>^IxM;E*%JyEy) z=a&8c^Ljfz;8 z{ueyA_T~OvJ56QogG*Ua``)iTtX8)^RG!<@>QhhH%?saDru|&7#xu+9bC>>H7tdd& zPTrIDz+7pxKJ1*OKl_2*I~dO#pA)tH_LR8dth;N|zRU{I_ETz@e}Um4)7We-?wQYIy`m6rC*r)54-iysX zIeW?DjPPsISGBJ*KUR2l>%+;fw&reqHDjGr(4~p%qS7}m-Tv!(<@Rd}+i&--nEK1y z<5FRc^uFh^Sy!JwUJ})OFYB$BvfV<{oS#Osrpep9%My;iysH0bc~q+NZQ-zIzyId7 zf6ppUuUc?bB(Xq9_2pZepY|V|?d|lV|E{?9I;{Tr@~BC5b1zI%(f^$Fbk64zhCSWV z2Wrl&EZyz<(scQ?yIF4QJ-0qmVfukHNYKLT4||m6QWJR<oa_vhQj7Spdcwp{B@{W@uVWKNpdgP?5B ziD&v2|B8^?9IqAreL>i2USnhFg4ngc0;}&>d8b_~-c!8hn)=pR>-6sL@?EpKqLyb* z)a|;Mkkyyp-O9?|QB{2Q%rT3tv!=bTULCIO%Fw! zqM0|XGyk8SF>~%G$F<9f($d6h{8r!dG~Vp}@00)5nK#opK_2*=wRFm*l0VG4*XEe9 Tf9Kl_%s~vEu6{1-oD!M<4;agi diff --git a/docs/build/html/classmlx_1_1core_1_1_bitwise_binary-members.html b/docs/build/html/classmlx_1_1core_1_1_bitwise_binary-members.html deleted file mode 100644 index f6c72e0c0..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_bitwise_binary-members.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::BitwiseBinary Member List
-
-
- -

This is the complete list of members for mlx::core::BitwiseBinary, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
And enum valuemlx::core::BitwiseBinary
BitwiseBinary(Stream stream, Op op)mlx::core::BitwiseBinaryinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::BitwiseBinaryvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::BitwiseBinaryvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::BitwiseBinaryvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
LeftShift enum valuemlx::core::BitwiseBinary
Op enum namemlx::core::BitwiseBinary
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
Or enum valuemlx::core::BitwiseBinary
output_shapes(const std::vector< array > &inputs) overridemlx::core::BitwiseBinaryinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::BitwiseBinaryvirtual
RightShift enum valuemlx::core::BitwiseBinary
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::BitwiseBinaryvirtual
Xor enum valuemlx::core::BitwiseBinary
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_bitwise_binary.html b/docs/build/html/classmlx_1_1core_1_1_bitwise_binary.html deleted file mode 100644 index d0a522c28..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_bitwise_binary.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - - -MLX: mlx::core::BitwiseBinary Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::BitwiseBinary Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::BitwiseBinary:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - -

-Public Types

enum  Op {
-  And -, Or -, Xor -, LeftShift -,
-  RightShift -
- }
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 BitwiseBinary (Stream stream, Op op)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
void print (std::ostream &os) override
 Print the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Member Enumeration Documentation

- -

◆ Op

- -
-
- - - - - - -
Enumerator
And 
Or 
Xor 
LeftShift 
RightShift 
- -
-
-

Constructor & Destructor Documentation

- -

◆ BitwiseBinary()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::BitwiseBinary::BitwiseBinary (Stream stream,
Op op )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::BitwiseBinary::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::BitwiseBinary::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::BitwiseBinary::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::BitwiseBinary::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::BitwiseBinary::print (std::ostream & os)
-
-overridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::BitwiseBinary::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_bitwise_binary.png b/docs/build/html/classmlx_1_1core_1_1_bitwise_binary.png deleted file mode 100644 index 0e74367fc64baff8773ceeb39e1af8c7c8b01490..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 937 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GUBo-U3d6^w7^zU_Ohz{ASV zzVg#=`;We#8Oe_ZlZIk{diO68?0 z)P>V4w-%kNv|@M=dxs&x?%9=Hcb9#c6`Z|s*2V0gwHBQW57f6X9PrLyY?yw5i9vrM zD?^+UH^ZJ5F@_3GU4{=rQ49}MkrmWCXrl$e^f>K_OXi#YDe~P_?{;(gPcx58pE%cc zcWiET)s}ts+C}$9{MR2*hhN>E{@|&b^!C)%FTZ8~^7JnF>HK_cRQ5fWZ->`inSRCj zyYyp=;@lr9d#{CgA2+$GAY45wYwpo$_p;)j-;IjpzukMm>#elPCi&xS*Y`N<*4p{4 zGJT<&9WM2eb8X`3>4{NwA9k$vt?~7i?{<$$b$-jK{kdxY&4*EMpZV}_@eyQGpQv*G z+~ohv_Fo=<-gLD;Yj57y>bg~)pI*0!c~;E~2YPBbGsC^3ybRBh{np;j^;&PaRcy87 zUbU-TlQ|gb@CFHbn0;d366BR>H^IdvO?iup%bu2L9UapbUYoq^^~IahUQW#w6ID|x zIvKs?)vVQ1wR~Kj2(6vk_dQl!>*%*>PqTS%KYLbrx;Ls{w>>W6@U;_ai`Oo`7`1q^ zhy9i7vo^+Am94Y!&n|u4ul=m;oW+`H=Prjht9YJYuzga8oav6tgOk_%U%u6T(M=c6 zq+`=k`L`vi_I|Q^tqbI(Ze`nB`X>2h(A*W*jc$Hx+jqrC*WM$^yfC0`-H-QIw4xKw z_u9qyUfz;rwd4KT->jFLg#S&SAAEY-Yn`aD$L4=Sx;tv7Ul0=fXtX}eOVjtb{TYp! V{aa^=9R+4822WQ%mvv4FO#pZu!9xH5 diff --git a/docs/build/html/classmlx_1_1core_1_1_block_masked_m_m-members.html b/docs/build/html/classmlx_1_1core_1_1_block_masked_m_m-members.html deleted file mode 100644 index a2891b770..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_block_masked_m_m-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::BlockMaskedMM Member List
-
-
- -

This is the complete list of members for mlx::core::BlockMaskedMM, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
BlockMaskedMM(Stream stream, int block_size)mlx::core::BlockMaskedMMinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::BlockMaskedMMvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::BlockMaskedMMvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::BlockMaskedMMvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::BlockMaskedMMinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::BlockMaskedMMvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_block_masked_m_m.html b/docs/build/html/classmlx_1_1core_1_1_block_masked_m_m.html deleted file mode 100644 index f447b19b8..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_block_masked_m_m.html +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - - -MLX: mlx::core::BlockMaskedMM Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::BlockMaskedMM Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::BlockMaskedMM:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 BlockMaskedMM (Stream stream, int block_size)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ BlockMaskedMM()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::BlockMaskedMM::BlockMaskedMM (Stream stream,
int block_size )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::BlockMaskedMM::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::BlockMaskedMM::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::BlockMaskedMM::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::BlockMaskedMM::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::BlockMaskedMM::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_block_masked_m_m.png b/docs/build/html/classmlx_1_1core_1_1_block_masked_m_m.png deleted file mode 100644 index 8e5e7a8a40ca12f5d3e6d44b574fc1deea89beea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 966 zcmeAS@N?(olHy`uVBq!ia0vp^OM$q9gBeI}JboKUGDrvbgt-3y{~ySF@#br3|Doj; z2ATyD)6cwk@ZbSZ-1KbN5}+JsNswPK1CS2}=1jA%FfcF&db&7H?n-Zba|%S+OyN{ze?bk-}oi}$(+w`9o0_G7M`Z^(m7(%68`JD!k%&J zd;fiX)_4B1>m>1?wx^pd^Ox;Pn0ZZqzT6cq@0HhXi-fHXZ;sDjCSrPCBJAIW%^sT$ z?|iDQEo?nK){B2_^s0L$pI`8(>^$BY^=gUl+7m}~zr}2OSD$w?cSh{#r#v$wRc=1i z^}ajXdh4CC6Dw6c=Y8l~`f}d4n7pz-cY?|#Jl}n0KE3Jpw&SOZm%r#Vnf^1WUrzm` zy}FL)rS=Ufp7Mt#snk~Vq@J_9FUwGn#?Wy4Gso$~il%4EI_@XgGwcoOh8p|=|Kd;2Dc)y$LZz}8WITuWq%VorjV3-RUH0Ly<;$<@r`OiZ z)1UO_v+L>Rj?G7-PH(BZ{$;^4{nm*5;E1)poO1D73X8YR%9FgT-FxsU|LpSPMNw)K zZ=Y7XYv%{B1(Huk<$gDJR};oyRx# zJ1_w5`RQ6ezjSJv^Pe_V&nP|}-|r=1_P0LHk9@_a9J#(26g1_hi)-)8wC@r>yWaKq zr7KVN9QV95*Sx;k^U^2Y)BURZ6Myb}QeHMk#a;;(Xl@|?Su;F1!@#ipx!|)2T-+= zl3kAO{VnsNHkjwiMYQ{eOR|UL7{4t(t(KpinWsL@blc1@oy)tfd|7bm%u=oGma(xe z(X%d8`sjzpm8ZpQm0=FQtg=YIbarqEdvd1p^Yx+s%`bZ$`(&yXCVJ*d(E6)ayi`t3 z`xdh*`s78ubpJ!|$}1!ElHT@x*9}#i{(hyl&didjxm){nN{!!K*;KA4?H#OCnlVdu zyLA2COC|o*dgj*q>h)$R8-{H>U4Coii!?yEmu$&bJdL`@X%Ob>Pd7ol84T vP|oyp^>bP0l+XkKxcbb4 diff --git a/docs/build/html/classmlx_1_1core_1_1_block_sparse_m_m-members.html b/docs/build/html/classmlx_1_1core_1_1_block_sparse_m_m-members.html deleted file mode 100644 index 2cee30d11..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_block_sparse_m_m-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::BlockSparseMM Member List
-
-
- -

This is the complete list of members for mlx::core::BlockSparseMM, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
BlockSparseMM(Stream stream)mlx::core::BlockSparseMMinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::BlockSparseMMvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::BlockSparseMMvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::BlockSparseMMinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::BlockSparseMMinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::BlockSparseMMvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_block_sparse_m_m.html b/docs/build/html/classmlx_1_1core_1_1_block_sparse_m_m.html deleted file mode 100644 index 3941e4915..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_block_sparse_m_m.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - -MLX: mlx::core::BlockSparseMM Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::BlockSparseMM Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::BlockSparseMM:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 BlockSparseMM (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ BlockSparseMM()

- -
-
- - - - - -
- - - - - - - -
mlx::core::BlockSparseMM::BlockSparseMM (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::BlockSparseMM::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::BlockSparseMM::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::BlockSparseMM::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::BlockSparseMM::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::BlockSparseMM::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_block_sparse_m_m.png b/docs/build/html/classmlx_1_1core_1_1_block_sparse_m_m.png deleted file mode 100644 index a9ca56c7b6c18830703f1680ec3a3af4f6770faa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 952 zcmeAS@N?(olHy`uVBq!ia0vp^3xT+UgBeKf(5bEhQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GW9o-U3d6^w7^zU^CWz{BeA zx8&6O|3{_=F_qb6th{}9&ARX&kAsD5>i6!SuzbGKQSD?Wr}LyQf^8}YS(^N&))pXU6)D9deZN#^QtT5%e&@!6wh4$^_!9BKchsC zNp^=OsMNM7dj9$$+-CXQ#+czlU><{k>1FAAd7HKU@^^6ft+Uvl_{E5!g43DdgJ2uO z17#k@1MU(`4gCfz4DyK_40eYE7;0J+8GdjeDLDQ=V@C10;AWpm!ot81Q0DQxbo_w9 z#3!%UJX~IU>F@gKwUYLFliqwxZc`V0-W_>3WM8`Mik;Dnr*e6%vo^8o>%ZFJzD@b= zH=p%eSl-*`-0OR|%SGw-X|;>}SAN~@uA5VNE!OkA?6rXQa8o7W=v7jEN#Bbj>Tink z&R(2f?sfaB{NxkgwA7uR+nQgIHCvJRTqf$`-wSaDDw*pRE_^xV+^O{4f95TGw~V{( zci(NfyT_0Je#IeE9q>2&g~Y6?Ip2*u>*jR-kM^AP`gfb(!S~Wtto2FLJuf**Oj^=! zpyDatop{djJP$+76ln&ZvtQb_-+t3|Sz51Yvi7-riM>1wao9oxXOMlgms&RE(iMfy z4j&(ht`1-@3JS`vedzjl>)oo$+t_bs3r;llI#U#W_`F0|$i7vOi@5*U@`E}|-+cf=9Z}ZGoFMJ(D zPhAP{Uzw#cX$dfKyjoWL=J=M$ucF(2efge!BS?b%l#MFu- zWqjUucV6f5U0xD&J63MKbFt6rVv8A9es^t5T<>`L+X~Su`>yVdxfi~7PxtnV>1|3% u@lXDS9{TVe=#@S0aQ}2CdTE|LW53#NiSH-Q&Z)pW#^CAd=d#Wzp$PzvKf)mZ diff --git a/docs/build/html/classmlx_1_1core_1_1_block_sparse_q_m_m-members.html b/docs/build/html/classmlx_1_1core_1_1_block_sparse_q_m_m-members.html deleted file mode 100644 index 342d7880e..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_block_sparse_q_m_m-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::BlockSparseQMM Member List
-
-
- -

This is the complete list of members for mlx::core::BlockSparseQMM, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
BlockSparseQMM(Stream stream, int group_size, int bits, bool transpose)mlx::core::BlockSparseQMMinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::BlockSparseQMMvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::BlockSparseQMMvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::BlockSparseQMMvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::BlockSparseQMMvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::BlockSparseQMMinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::BlockSparseQMMvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::BlockSparseQMMvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_block_sparse_q_m_m.html b/docs/build/html/classmlx_1_1core_1_1_block_sparse_q_m_m.html deleted file mode 100644 index 1cbeda629..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_block_sparse_q_m_m.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - -MLX: mlx::core::BlockSparseQMM Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::BlockSparseQMM Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::BlockSparseQMM:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 BlockSparseQMM (Stream stream, int group_size, int bits, bool transpose)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ BlockSparseQMM()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::BlockSparseQMM::BlockSparseQMM (Stream stream,
int group_size,
int bits,
bool transpose )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::BlockSparseQMM::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::BlockSparseQMM::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::BlockSparseQMM::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::BlockSparseQMM::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::BlockSparseQMM::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::BlockSparseQMM::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::BlockSparseQMM::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_block_sparse_q_m_m.png b/docs/build/html/classmlx_1_1core_1_1_block_sparse_q_m_m.png deleted file mode 100644 index 3c033d8f85ff4fdaeda5dbdd9234fd18efac0e02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 981 zcmeAS@N?(olHy`uVBq!ia0vp^tAV(KgBeJ!=X<>wNJ$6ygt-3y{~ySF@#br3|Doj; z2ATyD)6cwk@ZbSZ-1KbN5}+JsNswPK1CS2}=1jA%FfcGDc)B=-R4~4so7ms1z|$5V zH)-kr|KjtDn{*dk-koPTNzZPg=9KoRA3bx5=dq+rn$uLE>REqis>Sb zx;OUL`fio=p98N?Hr(#2ziZi~)~ySl-Mkc*m%ZI~a`p4)vrUi4rN0dOeQOprSRVWJ zpY4h4{q^^DO?pzDw`dpUF3xv%}b)vtE>O*`>#)59;yshjpn zd^bMdX8dxa%2m@dtL1Jy>GgS&`Kjv4_G{U@kFDQPHv4Fu``ep(+7thVzH&Xj_tmQM z=Z+rq*J!ZY0l)aXH_x|ka`uid${>9D`PJNJN zRQy#&!LvMX-c^;GA63Kouj=pIwW4k>qM5{39UHH6>^ki;CbxO^$Fu!TLj?E=T6y z`?~D+E=Tvn+t_bs3r;NdI)15o=jvts*}~g9lb4ALS}rQPGws`+mCFi!Qx9!j_-Ojm zX`$;4zunxr`sJ^xZOhX{j(yQ<)Z4M{;v|pymAAE9%mUYK%Z}VUYZrGi`^&=FU0(A} zu9my=#8<`BKYIPyEv8G)O8owQd0o~1p3k?AUPykeA-d*gSnTHuq4`sr_w>Em>U&Y| z>hz%9*F#0`7v=W%l?g>NAOD(lYUj%9WfQE}k4>JpyU(orXGNCY*U;O=3-;unYuv>m z`{U|GF1eju9W?^|kswbQO - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Broadcast Member List
-
-
- -

This is the complete list of members for mlx::core::Broadcast, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Broadcast(Stream stream, const std::vector< int > &shape)mlx::core::Broadcastinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Broadcastvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Broadcastvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Broadcastvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Broadcastvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Broadcastinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Broadcastvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Broadcastvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_broadcast.html b/docs/build/html/classmlx_1_1core_1_1_broadcast.html deleted file mode 100644 index 4b455d2c2..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_broadcast.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - -MLX: mlx::core::Broadcast Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Broadcast Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Broadcast:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Broadcast (Stream stream, const std::vector< int > &shape)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Broadcast()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::Broadcast::Broadcast (Stream stream,
const std::vector< int > & shape )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Broadcast::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Broadcast::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Broadcast::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Broadcast::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Broadcast::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Broadcast::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Broadcast::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_broadcast.png b/docs/build/html/classmlx_1_1core_1_1_broadcast.png deleted file mode 100644 index 080f3c4554799abdfe0d910acad98ef3142ea320..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 905 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GU7o-U3d6^w7^zMk}0i-&D? z|EekX{&)62)=qe%ar2GNayQMYHw6=KJNf*ZRDABS zYsNj3tk(9$mgVja=_z?UMNnnsQ@!ZaDQeO|muBwT7Iky}^;cm(mtKn!yQ<}x`Z;r| z`U|D#=bP$Qs(Om=*s^L;e)j7vo$I%rN>=ntzjyJL`4+p*-?i#%Jy%72?UJAC;`uAR zWtvJQC)AaxF>B`(%keeje`Jv8H{2@MuekTvm04@tzDR{=`zbZdzrgfCD2gG@iTi+e z24e-ME`$C;)(5Iv81}S?HB3iHp4Pu`%JTU~1@B84Fw={!c};qfKCf=Knyvlb7nlED zQd#*-eM??ijP9MSm(uL+i*R2HzpM9o%j37-PhNJg&hIR1iT-^`-FNbL{nR_o*?qH@ z6t51S7JJnBdgH%6tJeQsQj|M)ZIRz(Ud@+2lh>}^S)IFe{pZ}Z!MxX{1GTp1PgqiX z+w4!r?Ws+u^W@e0SAE@i_5btbQIq~zE>!i5J9ZW5wTBEp#P}ON zN(8_DC~+ym-UWYAE_|?z!@fJ0rrP!?UW!X{z)@$0)uGg%;^`5j6WBx|GMl` zP1~6>zhZd4?%Kb)bpJE|t(S^lZLZ&^DYow94Pfvn+5di0l(Jt(IX7MOLF+Ygq2Un-ZtJ@rjK->+v?&_Q_t~FWFN=>w<2j&DnA-^t8P3 z=C)c4=w(!cl2yaZabtobk?>IkR%+mLRW8i+{{k9kV&-7S#6wGYx~MtDnm{r-UW| Dxv{?# diff --git a/docs/build/html/classmlx_1_1core_1_1_ceil-members.html b/docs/build/html/classmlx_1_1core_1_1_ceil-members.html deleted file mode 100644 index 2cce4f65c..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_ceil-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Ceil Member List
-
-
- -

This is the complete list of members for mlx::core::Ceil, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Ceil(Stream stream)mlx::core::Ceilinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Ceilvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Ceilvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Ceilinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Ceilvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Ceilinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Ceilinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Ceilvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Ceilvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_ceil.html b/docs/build/html/classmlx_1_1core_1_1_ceil.html deleted file mode 100644 index 4d11251f0..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_ceil.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Ceil Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Ceil Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Ceil:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Ceil (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Ceil()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Ceil::Ceil (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Ceil::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Ceil::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Ceil::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Ceil::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Ceil::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Ceil::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Ceil::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Ceil::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_ceil.png b/docs/build/html/classmlx_1_1core_1_1_ceil.png deleted file mode 100644 index 7894fb3ecc936689693918209af7312a1447a1cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 864 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-KJzX3_Dj46+eckt3frqV~ zf90p&_8&br?POTEGJ0!l-!;+2myTEnCzt)7RDABSt60m5zXsKIq}{%0_Q7N?AyG=;*(F}@BXT(ONwGL z&Sp-zB3b(G)1__RN9X3vGip}Z8WXzu%%u=#FRS41VcNfI*XB*Xe>Lj%qA1msGInb} zvD{sGZRc9~EYC}_F;StXx9=^zb>w)|(~T3B7@yC0D;+ieNbNn%>`AKv_dfDg51drj zdts7_{z6sHI4AE(dwNz+Ek1Xc@q=C-!(+o`*WQ{fxjrLm^3{&G=B%ThEFXlU7~-6` z4|r!VR&eSv=r3e_pt^-&Pm5T?^b1TMgby~LMm6GAw&*!u= zKZw13dZ7+iXtlQ^9AZt0Uu?_bxNz30xGtyAV-%KConOwi$-+xrgiXNKzD z|8~tYxBK4@H8J;f#X|n+dABe1&v7x{oG%1(fp^BtnIIo7oznJLUSDSwZtrvvi> NgQu&X%Q~loCID-}tP}tM diff --git a/docs/build/html/classmlx_1_1core_1_1_cholesky-members.html b/docs/build/html/classmlx_1_1core_1_1_cholesky-members.html deleted file mode 100644 index d95a1a5da..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_cholesky-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Cholesky Member List
-
-
- -

This is the complete list of members for mlx::core::Cholesky, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Cholesky(Stream stream, bool upper)mlx::core::Choleskyinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Choleskyvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Choleskyvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Choleskyinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Choleskyvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_cholesky.html b/docs/build/html/classmlx_1_1core_1_1_cholesky.html deleted file mode 100644 index ece661cf6..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_cholesky.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - -MLX: mlx::core::Cholesky Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Cholesky Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Cholesky:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Cholesky (Stream stream, bool upper)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Cholesky()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::Cholesky::Cholesky (Stream stream,
bool upper )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Cholesky::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Cholesky::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Cholesky::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Cholesky::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_cholesky.png b/docs/build/html/classmlx_1_1core_1_1_cholesky.png deleted file mode 100644 index f0f57d4b8bb439f6c553edaf191c18964559e36d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 909 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GT?o-U3d6^w7^KAiMQfya$s z-q`Qn|IYli)0mb@mB*w$Pix;C#{JMl<=6B%#q;<#shoAo@SHUL!Xy=azO^czb(g;8 zZz-j>xWS06WC zGwqqgwzxO8e#_jT(sYUCeF~no{hLDFUv5%VmCejvJ^k;VYa34aZ+(|~am}O<{`p~d z9o27IP5TuGgx>D4JU@zL$hHS0pRx2niix~`VVxZU}*YQi-Y)5VoX z>}e5en0|rjgHRMhoD=r}?+nHYB*{PQQI^kb@yrhhALeW^>fS^qO9Kl=Uv|KA^fZoCTLT9@~=yl$21%hxT_R4QkNYd@c}ocTd)48yZz zzqO}Rz1CZ96r<1bJoJd8DOn7K}1 zvhK1UcDZl%U3&lQ`(;x(($d(^Z4Py}PEnp2=|6vM@LHjd-2Axr$F ztaE8|)&}PCZVEkm&-?P3HOCi%QwjT4E8hOB)$i1eH;e5Lv%IiP_;uRtd!_C+?~brf z{rWZkr{z|^@Bda^`+2SY>+)M?-h6JEHgo3m%B?_eSp8%Cc5e2npZQ&&jKkpR>gTe~ HDWM4fy=K7t diff --git a/docs/build/html/classmlx_1_1core_1_1_compiled-members.html b/docs/build/html/classmlx_1_1core_1_1_compiled-members.html deleted file mode 100644 index bf0ad0373..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_compiled-members.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Compiled Member List
-
-
- -

This is the complete list of members for mlx::core::Compiled, including all inherited members.

- - - - - - - - - - - - - - - - - - - -
Compiled(Stream stream, std::vector< array > inputs, std::vector< array > outputs, std::vector< array > tape, std::unordered_set< uintptr_t > constant_ids)mlx::core::Compiledexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::Compiledvirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::Compiledvirtual
is_equivalent(const Primitive &other) const overridemlx::core::Compiledvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Compiledvirtual
lib_name() constmlx::core::Compiledinline
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Compiledvirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Compiledvirtual
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Compiledvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Compiledvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_compiled.html b/docs/build/html/classmlx_1_1core_1_1_compiled.html deleted file mode 100644 index 78b508b6e..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_compiled.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - - -MLX: mlx::core::Compiled Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Compiled Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Compiled:
-
-
- - -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Compiled (Stream stream, std::vector< array > inputs, std::vector< array > outputs, std::vector< array > tape, std::unordered_set< uintptr_t > constant_ids)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::string lib_name () const
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Compiled()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
mlx::core::Compiled::Compiled (Stream stream,
std::vector< array > inputs,
std::vector< array > outputs,
std::vector< array > tape,
std::unordered_set< uintptr_t > constant_ids )
-
-explicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Compiled::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Compiled::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Compiled::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Compiled::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ lib_name()

- -
-
- - - - - -
- - - - - - - -
std::string mlx::core::Compiled::lib_name () const
-
-inline
-
- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Compiled::output_shapes (const std::vector< array > & inputs)
-
-overridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Compiled::print (std::ostream & os)
-
-overridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Compiled::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Compiled::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_compiled.png b/docs/build/html/classmlx_1_1core_1_1_compiled.png deleted file mode 100644 index 4f12eb20e1be08551a228728beea4ff60e4b1282..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 546 zcmeAS@N?(olHy`uVBq!ia0vp^6+j%o!3-pyx;pL#QqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=E8GJzX3_Dj46+?d@w(;AvUz zylLk5`bWiqTmI~*sxIGfGI2)7jcjTQ)JnriANM8G=@ATV0tUF#V5B^YA8F`KK#_o?x9^Z19{vf#ct+H`=uyy9eQu$z^@@L~~=p@)^RL)Un-V3TK1z3&E<(u?ek`}a;39;{_kB!`&8@u zGE3JdPm<3JD}R%`s?R5A<(|hy)>psX`F5YR+WIcbdd=_$pIB5Q7yjzgw?4Ny`oWo) zr?TN6L}D9#KRrGsYyI0S=Ix)|^`Wb?=SHuawj}s`)iOMp)He6?s|g7Id?Urdr& W$?>H>(xQQ}$>8bg=d#Wzp$PzV007DW diff --git a/docs/build/html/classmlx_1_1core_1_1_concatenate-members.html b/docs/build/html/classmlx_1_1core_1_1_concatenate-members.html deleted file mode 100644 index 9847df5c1..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_concatenate-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Concatenate Member List
-
-
- -

This is the complete list of members for mlx::core::Concatenate, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Concatenate(Stream stream, int axis)mlx::core::Concatenateinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Concatenatevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Concatenatevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Concatenatevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Concatenatevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Concatenateinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Concatenatevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Concatenatevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_concatenate.html b/docs/build/html/classmlx_1_1core_1_1_concatenate.html deleted file mode 100644 index b96f54f64..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_concatenate.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - -MLX: mlx::core::Concatenate Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Concatenate Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Concatenate:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Concatenate (Stream stream, int axis)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Concatenate()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::Concatenate::Concatenate (Stream stream,
int axis )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Concatenate::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Concatenate::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Concatenate::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Concatenate::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Concatenate::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Concatenate::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Concatenate::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_concatenate.png b/docs/build/html/classmlx_1_1core_1_1_concatenate.png deleted file mode 100644 index 3404621456d96f7206bcf97da9f0f3e1ca5feacc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 914 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GV&o-U3d6^w7^=Jr2U;9+ZL zU-{|(|D)5F_#TRm+WzWoVbuB=+^moNcw+WXDn9qwaoUob9J-#LgrX)rIl6GF%1QsI z|8CjS|Lyg>#Qm@7+GNvrA=jfa>$k5BUQ#2HT%VJeUVH9AX_|N8v&chz{9m;^Q>zzk zT^4w0!PT9o7uHVinwdDys99yJ&FZk3OINl{xe`2oZP>TxTicfZ33^?qvnq7bsb`n9 z@-Mh<{gwPT$a|7rL1w7?KHKQKYWuEft#4KNx@U1|PDZV8|Gx!mJXb}1?UKLi;`uAR zWtvJQC)Aaxack!k&*N*zFJzw4Z@D#ZyXM|!SEAOWeVG-aou||={{qtop(utpC+-8@ z8H^R2x(xaYSs$owVc63m)-W9*d0PL%Da+?S6}&Iyz)ZiCt?Kz{bE|#qI)21ros@K4@Xl@P!Xz(;ID5UyTvaMsJ!kE=(tT^M&V5*=?6ve8@1!f+ zYY(5_ zGe7<17OB+EHUH25XQBN3{j{35E5GEpcKwVmF#`RDduOAPB) zZq@ZjtJRi^zEu3;PM%urWVGUPMW#(%GFmcyUz3;y}tF7^FOE8 za#iMhhx_Wg(#GDre{V`(y-Dew>Mv1`S#-8YaeoAdwy^2<6WDd zRQSBl|7*tXH+8>%y)3e+t2uM#p8A$EXZEyAn>lm(1ta6nn=+P8xm5CpG4J3kyH8d= R!ob|a;OXk;vd$@?2>{QQ($4?@ diff --git a/docs/build/html/classmlx_1_1core_1_1_conjugate-members.html b/docs/build/html/classmlx_1_1core_1_1_conjugate-members.html deleted file mode 100644 index 3439e670e..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_conjugate-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Conjugate Member List
-
-
- -

This is the complete list of members for mlx::core::Conjugate, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Conjugate(Stream stream)mlx::core::Conjugateinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Conjugatevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Conjugatevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Conjugateinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Conjugateinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Conjugateinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Conjugatevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_conjugate.html b/docs/build/html/classmlx_1_1core_1_1_conjugate.html deleted file mode 100644 index f7f0de1cf..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_conjugate.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - -MLX: mlx::core::Conjugate Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Conjugate Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Conjugate:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Conjugate (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Conjugate()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Conjugate::Conjugate (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Conjugate::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Conjugate::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Conjugate::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Conjugate::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Conjugate::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Conjugate::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_conjugate.png b/docs/build/html/classmlx_1_1core_1_1_conjugate.png deleted file mode 100644 index 08be44bd1fb347166935e0ebe48e2c691c15f1e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 929 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GUVo-U3d6^w7^zV3Uiz{A$g zzw*;>`;VTNVj3n~Te~YZ?6|g@C&!G=gSYoTne(|~f@-FTllP=OEz?vg3o}$bKTUqN z|K6RK|L&>0bviAx2Ubmx~je}v~$vz zY>?|Xbv-``MNN8=8nbpzu^eB6e<8C(zv0%r?TUMkU75AU?Tb{1wwB-l{|v?oPF)85 zg{%)$w=nE!5o?%!f$4)#6hoX7_W^H&5~5n{AT^H zy14vz_2eb9@-u8D3QY^Id(Hk?6zmgWU%Ff8aNqj-?Ed<<3cqK#@7TINCR1vU{gguf zwW@iO&aIsnSti=OPXE{ARr}s~J-uTU{d5L67}TP}lfQ4iT6b>wR=@Ne_d0@B{%um3 zdwbhM_dDytBIU(zzM8Z4R-S!_enx5kpL?s6??=A7sJ3r;=(MB8YipffbKQR5|NShV z{LQ?qU5i6i7X|}Er7-S~{Ewyb^S7_93wd3;djIEOUC;e~8J?4-7j7*&S82guca%55 z=Gc{8ciX;51!r%Px|kiXc7+RrJ)xk1h1-7z?WI$WHK(MRNi9rGd#1YO%$Yql*Qz2b z^^}Y^cdgdoUsNBKE%|=lmsMf2($D-o?Q2+n_GnpTo9Ii;chl}=9{9V7ZT9c$r_DA` zzw5nLHO|O-ds^?J?AjZDrH*zSmlYkQQtkk z+rD}CD0ppI{uv$9Ip?nluibV3%$lb&!%Cmr&bM2cySV!F`=39L+|=?~7u@N3_N{+u zexb-LuRYUWYER8b`{wvcH0E_}`0K3mXU=HtTM(*OurWO?O|<^g@>^%#gmdT`8|y#L gS~}%Y!5`-3e`kFOIJL?Qn3)(nUHx3vIVCg!05urS_W%F@ diff --git a/docs/build/html/classmlx_1_1core_1_1_convolution-members.html b/docs/build/html/classmlx_1_1core_1_1_convolution-members.html deleted file mode 100644 index c09690551..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_convolution-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Convolution Member List
-
-
- -

This is the complete list of members for mlx::core::Convolution, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Convolution(Stream stream, const std::vector< int > &kernel_strides, const std::vector< int > &padding, const std::vector< int > &kernel_dilation, const std::vector< int > &input_dilation, const int groups=1, const bool flip=false)mlx::core::Convolutioninlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Convolutionvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Convolutionvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Convolutionvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Convolutioninlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Convolutionvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_convolution.html b/docs/build/html/classmlx_1_1core_1_1_convolution.html deleted file mode 100644 index ac64adff4..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_convolution.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - -MLX: mlx::core::Convolution Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Convolution Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Convolution:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Convolution (Stream stream, const std::vector< int > &kernel_strides, const std::vector< int > &padding, const std::vector< int > &kernel_dilation, const std::vector< int > &input_dilation, const int groups=1, const bool flip=false)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Convolution()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mlx::core::Convolution::Convolution (Stream stream,
const std::vector< int > & kernel_strides,
const std::vector< int > & padding,
const std::vector< int > & kernel_dilation,
const std::vector< int > & input_dilation,
const int groups = 1,
const bool flip = false )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Convolution::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Convolution::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Convolution::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Convolution::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Convolution::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_convolution.png b/docs/build/html/classmlx_1_1core_1_1_convolution.png deleted file mode 100644 index 853ab7ab4adc387b35aedf2bb0fa2701addada34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 907 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GU-o-U3d6^w7^KAf~#OMq>5 z|Eeo{{tL$^i!fe1^X}xkhu3C`>=lwZR@U$)zUW+~-HAyi(hF5RK z`STg?F4dcQRvqTgxO=8>`L1hTzjv>ltMxRj=kKOA*{_yO^UJS^xX)8vQBO2YSz`S5-mBF5`0O30^|x-zy?AC)i23}m z+9thKrT4DoZ&i88G(Bwd)8BhbqmF!!`nqw#665%bTHLqh9l0bw#njU`JMLq&df=pg zQZN^`OjD_x8Ls_&&T{4l!8Q!flKs{mPxe}Gxm9enj4k ztoEPyw!ZpY7`XP}y{xyV-2OCOD>yy2#qv+ie|`>~>| zd>MO`uOJ&RQ0&f$*E83@oPU1%+PaX}zr+5|ufIC!%XLm&&re3{!_HayvmaPq!EomI zoT&ceQ{sxVbi<6Rd{>F83m)*t8XlN|^;G_Xm*&!+3NvS(b<3DJvyxNS*jRshRQ$Hu zdGf}arTcz+zc>4l9F_fNwrB6OnKxDUhTV!!c^mS1d(@lhrfanPuSUC1Z@8YC{D0g1 z>ZSQf`CG5eNGZ#^ntHaF=c@On{=Q|sYO))@UtP6)&Z>!L)+}Fp&GX2@(zvVk7gw48 zY`wNk+-}v?^}REf_IG|`nrQcrs+kL9N`?LOxsjRvFN%eb9y$_RIdw;dm z9lpY9hx?f`XZkw8ow_hJ?OAHv+9^S^`u;O`B+NP``}?gOFxxPAy85}Sb4q9e065IR AzyJUM diff --git a/docs/build/html/classmlx_1_1core_1_1_copy-members.html b/docs/build/html/classmlx_1_1core_1_1_copy-members.html deleted file mode 100644 index 3cb46c818..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_copy-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Copy Member List
-
-
- -

This is the complete list of members for mlx::core::Copy, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Copy(Stream stream)mlx::core::Copyinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Copyvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Copyvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Copyinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Copyvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Copyinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Copyinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Copyvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Copyvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_copy.html b/docs/build/html/classmlx_1_1core_1_1_copy.html deleted file mode 100644 index f233d09c2..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_copy.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Copy Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Copy Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Copy:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Copy (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Copy()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Copy::Copy (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Copy::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Copy::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Copy::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Copy::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Copy::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Copy::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Copy::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Copy::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_copy.png b/docs/build/html/classmlx_1_1core_1_1_copy.png deleted file mode 100644 index 2f4f36d04325b9a6ebae742f7adc17e52b2dfca0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 892 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GWdo-U3d6^w7^zCQQLiicHQ zTjpoLRM4}0ZhUIR($cvrA0LP>I#+3PVv>o}LRHT=C+|snEVfKi`RRGx z|NYIEf6P=~GRj}r^|{CT>dvsJ`?+?SL3&3c_=|7E&A0tgmF~Ck`OHJx^uGpAI#uZY zdX}5#+`#90`fFE*+)ixuos)vf`iLjcS)$C%z~o z>%M~L@r`;v=51dc`mTR+R%zAhZMUU9a<0ugoxeEi=ed&aVjoS{7Dd}!x+S*dUgGVa zb^9Y9?!9$(-n)!Y*B5VGJgcnz|FPA*JpVj(b${00ys!6vuAa7JzA#lo$V+qSM}?U) zd)+c-&ICq)v9bR74BNj<*L73VzS+#bGV5{t=c0_I*{`y%)CBo#xsqgiCegLBYxB=n zA_dkKF}6{~`%=nejwa44-oK^h=AX2uTKCSp5eeVw)$eRNY39}|S6BV5Ul?lkbLX|k zb=5(uW2KF~d5_=A3jh5!D)h8`TK3gzFLrIWTfS8{W3O-4za{5bpL(fU6d zU!FPh>yN`}k3#(e(E|8LdVGy7aX&Xf$-UOJ`ivAog5xnetnXMpk$gQu&X%Q~lo FCIFzmxAp)4 diff --git a/docs/build/html/classmlx_1_1core_1_1_cos-members.html b/docs/build/html/classmlx_1_1core_1_1_cos-members.html deleted file mode 100644 index f07b0309e..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_cos-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - - -
-
mlx::core::Cos Member List
-
-
- -

This is the complete list of members for mlx::core::Cos, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Cos(Stream stream)mlx::core::Cosinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Cosvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Cosvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Cosinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Cosvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Cosinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Cosinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Cosvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Cosvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_cos.html b/docs/build/html/classmlx_1_1core_1_1_cos.html deleted file mode 100644 index 1d2e6907d..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_cos.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Cos Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Cos Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Cos:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Cos (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Cos()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Cos::Cos (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Cos::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Cos::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Cos::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Cos::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Cos::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Cos::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Cos::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Cos::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_cos.png b/docs/build/html/classmlx_1_1core_1_1_cos.png deleted file mode 100644 index 4724c19a70821cc52ec8dfdb5cc6b7a30befd5a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 875 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-)JY5_^Dj46+eK={g0*@QN zyz$&U|ApgUhq1cMF3Xy3J)1Ax%k)Sx$L{)*md`&bcwfqBnWj?7sq6Xa(FLzbPt@<) z@7;R&PrAn?VZ94hk&pdK*G!#OK3m=Ol)K@y^_DrS&x_UUH(q|@lTYI7{;H`LruW%JCkTpc!Z>B_b#Tb93D8}{vY)LlLMD^*)uw|WIx)9JN?VMsc{!J>qaMP>Ts(98t`*7Lx<-eDy z^Pkx}Ps-Z2uvDmUOTksI?w>ZAVm5K5KW81@wmrUixpeLw|82T=A4mOMqFM1b@Y&rh z&-QrU>aR+zTv_qrv77z6UDs-Zc5Yi2CV4r;+3VKjkk=YzZ`Xb+wOhOO^}{M6AixpwZw`c9%Dj0v^)wVxYtERoTd6y%6|FTy9QRB6x&aZ{Ho!kEV zEMNZBymKY)tF@e-t9V^HUimTq!SsJW_vDtYy!Jcn|M~q{p1(?+yeIAHSv|G*++oHK znt2S54VPVeYqsS2jHt<1JK~zNj(W0u5XKrFn1S_^IZAV>iJXe@=8GJ<#>V;!Q`4S3 z4P84u{!!hUGiTx+XRWpTSE|1}Y}fLA?&l^ya_o=Ni7$=_oR_qXW!6mFqpMAA3j)2< zo@(rS)}A+A&OU7avq>{=3ckylDz`gJ#W;KA>d+svXWBkyTD$3F^jiP?MUktHXKwwr zckA7q8N#cl}P?&Hvjt~%*yV*FbTXU^ - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Cosh Member List
-
-
- -

This is the complete list of members for mlx::core::Cosh, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Cosh(Stream stream)mlx::core::Coshinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Coshvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Coshvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Coshinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Coshvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Coshinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Coshinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Coshvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Coshvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_cosh.html b/docs/build/html/classmlx_1_1core_1_1_cosh.html deleted file mode 100644 index 385f8d6d8..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_cosh.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Cosh Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Cosh Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Cosh:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Cosh (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Cosh()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Cosh::Cosh (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Cosh::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Cosh::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Cosh::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Cosh::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Cosh::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Cosh::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Cosh::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Cosh::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_cosh.png b/docs/build/html/classmlx_1_1core_1_1_cosh.png deleted file mode 100644 index 69fffddab9dd68ef284091892a88bda3d72302eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 888 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GW7o-U3d6^w7^KAiMQfya$s z-q`Qn|IYQ-rZFweE4lLY+_8r}H`>0KwA|hQWX|WB396Z9PTrIDv`kZ}EX+{#{4_al z{>59b|JbR#WVc)JHKEt~>dvrR_i|^3XkJgsiTAz{H{bS0S-R)O=R4b`%D>g}{93V~ z)O+!ggBiuwr*Dg0^^WKB6-kwq&jYu<(up-)vP3yI|Ldmv*QLsSuDo_j>?~0Ihs>+$ zFP20d-}W!idy-#4rm61z@7EHA>#wcqZ&i`4bX%R1Q7v@3Cg7Ti>EgKO-f<;-yH=W~`bKZuQCc$Vz9_H?S(ddscr!i=kYSBa_%9`Mg#tl-pT&|k>#e^$uRr*-_}uPn-O9-&GH*})3i^8C>oJRU zJI!i>_HJ7nCVM&5*~{uu=xd#AU&8)dy}xGlrC_(<)}a4vo>qOihrjP}Ui+(NPDu8J z=(Vw#N7T2p>BhTV{?vTj_STW>TV5r9oE&!Z!nc;GKkN42ez^D6-I;P3rmhlmTs*6+ z{r~a)xnw_o`dYhHUw2*o|9O4Xq`J8mCaLIu&I0A0{`y0=> V?i_Oq#DRH)!PC{xWt~$(6992>z`_6k diff --git a/docs/build/html/classmlx_1_1core_1_1_custom_v_j_p-members.html b/docs/build/html/classmlx_1_1core_1_1_custom_v_j_p-members.html deleted file mode 100644 index eee5452e6..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_custom_v_j_p-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::CustomVJP Member List
-
-
- -

This is the complete list of members for mlx::core::CustomVJP, including all inherited members.

- - - - - - - - - - - - - - - - - - -
CustomVJP(Stream stream, std::function< std::vector< array >(const std::vector< array > &, const std::vector< array > &, const std::vector< array > &)> fun)mlx::core::CustomVJPinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::CustomVJPvirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::CustomVJPvirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::CustomVJPinlinevirtual
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotan, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::CustomVJPvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_custom_v_j_p.html b/docs/build/html/classmlx_1_1core_1_1_custom_v_j_p.html deleted file mode 100644 index 8ed54c2a1..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_custom_v_j_p.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - - -MLX: mlx::core::CustomVJP Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::CustomVJP Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::CustomVJP:
-
-
- - -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 CustomVJP (Stream stream, std::function< std::vector< array >(const std::vector< array > &, const std::vector< array > &, const std::vector< array > &)> fun)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotan, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ CustomVJP()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::CustomVJP::CustomVJP (Stream stream,
std::function< std::vector< array >(const std::vector< array > &, const std::vector< array > &, const std::vector< array > &)> fun )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::CustomVJP::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::CustomVJP::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::CustomVJP::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::CustomVJP::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_custom_v_j_p.png b/docs/build/html/classmlx_1_1core_1_1_custom_v_j_p.png deleted file mode 100644 index 32bf6e7e9d196669ef036904122ec5e2bbe1cd42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 575 zcmeAS@N?(olHy`uVBq!ia0vp^tw0>W!3-oBzPn8VlF|V_A+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=E8?JY5_^Dj46+eZB680!K@` z;mr^K{A;Q%Gu_HHe}3s%3$Ji4>#xoo`vbi+w{y3uK^O*)0`?KJi;ai`i zrOr5>X0fuBm#bQ}b#G0)%eMIC5@t^nkCq+Nd&SlI_HA?27ugCg$4QRwHDbz-?R(+( zWX_>71J7h}jax5&SYLY9yomGVnYS-a$ts?-4+pzP^(eEZm*&$v#slVGnHp|?<>VH5-#~rpIDCFY`c&&E!EE%LVHk8I}W zZAYIa`W?A5(PN|j6Z;*jvI2rsT32O-1X*wiPTc*Kwcjpp#!0D3pr~f>boFyt=akR{ E0N$Gk-2eap diff --git a/docs/build/html/classmlx_1_1core_1_1_depends-members.html b/docs/build/html/classmlx_1_1core_1_1_depends-members.html deleted file mode 100644 index 8cb2e5547..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_depends-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Depends Member List
-
-
- -

This is the complete list of members for mlx::core::Depends, including all inherited members.

- - - - - - - - - - - - - - - - - - -
Depends(Stream stream)mlx::core::Dependsinlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::Dependsvirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::Dependsvirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Dependsinlinevirtual
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotan, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Dependsvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_depends.html b/docs/build/html/classmlx_1_1core_1_1_depends.html deleted file mode 100644 index 45bef7a88..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_depends.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - - -MLX: mlx::core::Depends Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Depends Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Depends:
-
-
- - -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Depends (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotan, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Depends()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Depends::Depends (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Depends::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Depends::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Depends::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Depends::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_depends.png b/docs/build/html/classmlx_1_1core_1_1_depends.png deleted file mode 100644 index 8c1a6319a8271ffeaf01b756e6339b70e85d5ae0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 548 zcmeAS@N?(olHy`uVBq!ia0vp^Wk4Lj!3-pS_Y`sfDd_;85ZC|z{{xvX-h3_XKeXJ! zK(jz%`k5CG9y|bwo1P6@0+iz{3GxeO0P?}WoN4wI1_s9Uo-U3d6^w7^^7g$};AuJD z9P;y@dL5^4^V#!iyLAIz1{!h&%;ukM$>7A1xJSUFXp7i173Ytrcsef+9}s&#jwzK6$lXR#JcZ=E%}Dr3s5~T{4?~qiyNAhdNXD=U#l0 zy=LoO({DLD%0F4I-{R_F9>W=`KKY4(u8wEfwL_Cq($5}l6F5}Bcp&~OL&L{e&9yem z3Z5sJzv6kP@}~aTlUCM-dr=V#FV+AV=ddz%C<{*f*tB9*-?c-lR+U}5o={)e`@%c) zs`kzW-#3;Qzlyl|{d?t{87mggxUSwd^Vhu1GbGBlGYHQQbN6WM6_qnq(^L4}y zhxyYU{x$NC@}OtiOL}%{Sk0&6V@_9oy3-+Lu?GU5i^2nEP{^-G&%dVUrE# zf_~Pn_BGpm^Y*gI`uDFzYzopr0NBh9mjD0& diff --git a/docs/build/html/classmlx_1_1core_1_1_div_mod-members.html b/docs/build/html/classmlx_1_1core_1_1_div_mod-members.html deleted file mode 100644 index bd2f77317..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_div_mod-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::DivMod Member List
-
-
- -

This is the complete list of members for mlx::core::DivMod, including all inherited members.

- - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
DivMod(Stream stream)mlx::core::DivModinlineexplicit
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::DivModvirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::DivModvirtual
is_equivalent(const Primitive &other) const overridemlx::core::DivModinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::DivModvirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::DivModinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::DivModinlinevirtual
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::DivModvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::DivModvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_div_mod.html b/docs/build/html/classmlx_1_1core_1_1_div_mod.html deleted file mode 100644 index d4455f3ed..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_div_mod.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - -MLX: mlx::core::DivMod Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::DivMod Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::DivMod:
-
-
- - -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 DivMod (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ DivMod()

- -
-
- - - - - -
- - - - - - - -
mlx::core::DivMod::DivMod (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::DivMod::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::DivMod::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::DivMod::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::DivMod::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::DivMod::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::DivMod::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::DivMod::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::DivMod::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_div_mod.png b/docs/build/html/classmlx_1_1core_1_1_div_mod.png deleted file mode 100644 index 11583cfa1c44bbfd64b891036eb337407e399283..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 536 zcmV+z0_XjSP)vTJr#LVva2S`&=-}Ys|Ns9r%~qrU000SeQchC<|NsC0|NsC0Hv*f~0004_ zNkle^^81qci+rc~bC6`K-$P&coP{!|)O#%x=ddPHe~a0c+h#nUEFrcylbJ2N*9M)9 zC=5pH>9^|pxsx!CkI-i7ZFZTE!lT-n?yvG`XxKZa(6wOBD}?&4JIVCeESJ!*k!&=L zw6E#md9R_q*{-1W)NS|LJa`fzo6#f?bT3JcQbI|xn-WTr-EK)LDIi7k8^dEI^LII$k5()s_lu!WZri21OHzgDRx+$Rm&`k*ifNn}C09;5! zWV9fvs$-Q0#Gtf7$vGil>S7&V`TYUl=gnusA-z%uhyYp(9c$+nmn$K+J;;n!> zp2r*1ykqFJUBRO2hx;v&wykw>u(iuO(>PP_c_@&m>RzXrM$nVz{XVqz&K_zwBfbH( zS3A!%tm$u{O(X4V8a}V>G^@92>e@8uUYplo%}G#-7u~C>Iz|aqRqdvPs;YL=T~HB` a!TJIyfM8qPkUH}K0000 - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Divide Member List
-
-
- -

This is the complete list of members for mlx::core::Divide, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
Divide(Stream stream)mlx::core::Divideinlineexplicit
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Dividevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Dividevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Divideinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Dividevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Divideinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Divideinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Dividevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Dividevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_divide.html b/docs/build/html/classmlx_1_1core_1_1_divide.html deleted file mode 100644 index be3840b28..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_divide.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Divide Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Divide Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Divide:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Divide (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Divide()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Divide::Divide (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Divide::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Divide::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Divide::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Divide::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Divide::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Divide::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Divide::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Divide::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_divide.png b/docs/build/html/classmlx_1_1core_1_1_divide.png deleted file mode 100644 index f3946b16d3cb369fc9a6e0c8ad4f458ae0854192..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 897 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GUXo-U3d6^w7^zRmlrz~jcx zAN2J1{zvBb8(Ws-UCrAwOZ}Xe@Z&iWoByglpYyv}$8)b>)TAe>TU1VVJ8OGRns4%N z%Qe2wl^&Ob_bn*hd~EKkDDAcH&3wD2cpF~p*UVXeUe4y;%%C@wZ5!Tt@AV3@%-eFz z#4D@Es=PAu?$Sqo#{M%MC-vP4U45o#Mcb5;W$)H5esezCboZa2?9A@0sY{A}Y&j)d z61cWF+WzXKCEPJlp{M1mUvKF=zx7nIqGx*C#am`u>^g7n3B0Bfy144-cE3d`f29_x zdd4|xc2ioyO|#Z+c5lE?7#N-V(;~KTiI62?X|kvHJRgq`WA*gEn*GR zFED)&ieiX!;y&P=!C1km%b>rI^?@ov@)P@(qH{a#PfWTZ4Ksbt)=4TqXCBJGzU1Tb zskJlCJ5S20b9$}zDC^;}sbQZpgLER|O8?F{^lkh7rgrJ$J1lR{%i9@dm&tK&-;~Po zwVL^p&Ml6MjMI|abtmI^==E9tTGy{#)k@~OI$_c|nN_8tyT4xhSZcSn^wq;EWv``= zrBzrRil-F8hqXZHK= z{MLKIe-|v1jtUi&QV*PDcdomhx&Foc^S8s|uU6fE_5WwMuIGNg49`i^>$U>DX3b!C zlzD;uuPaqHyS}^%&ff6q;_BeF7M%=rIKu=j!0H{emrnWBoRW4;dSPnXGu16;&g|K- zHEzrNzTmxiGj|Hr`o1nY>%QgEj5MB^YOa^IN@V*U+fW&2Qxj*cKi~eDN$QfBH#?U{ zInN8#ojG;!4~gV1@6*$Z-#pp3-pDxn^PZ^GcWH}dcCNhkF!jutTQx!1Z$B-*c8Q@i zOfoaA?2+i&-28Q`ufAEkdD_gIy80QRy7h0?K2ysJzZQT0#o9+FO#L32#m|qsdsD@} zMCk09y2cAe#-D|v($eCbPM - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Equal Member List
-
-
- -

This is the complete list of members for mlx::core::Equal, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
Equal(Stream stream, bool equal_nan=false)mlx::core::Equalinlineexplicit
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Equalvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Equalvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Equalinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Equalvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Equalinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Equalinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Equalvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Equalvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_equal.html b/docs/build/html/classmlx_1_1core_1_1_equal.html deleted file mode 100644 index 0ed4a5122..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_equal.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - -MLX: mlx::core::Equal Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Equal Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Equal:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Equal (Stream stream, bool equal_nan=false)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
void print (std::ostream &os) override
 Print the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Equal()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::Equal::Equal (Stream stream,
bool equal_nan = false )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Equal::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Equal::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Equal::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Equal::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Equal::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Equal::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Equal::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Equal::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_equal.png b/docs/build/html/classmlx_1_1core_1_1_equal.png deleted file mode 100644 index 7c77a8836e38f9537adaf24606d4538ed3e10cbd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 893 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GU1o-U3d6^w7^#_~Nf;9*mb zS9$V#e#OEs$33GBIBu-Drm=Y1wZi3n%Z zcV7Sed%_a+8pqcM=M=0eUb|_}?UF}9=Z;431>Xppulu7c-D~61oo#F5Z$(b}Q?a1b zd-0;?i_gAIpB7qF&iDBT&!j7#S47!)hx4w?@V_0s_s#pQe7paIWao9KO;fQ?imGFu z8*E`O@ce=GKJ=d}A`leRn;U0dpSd+v^T@>8~YoXv>)xOT3FXMOLL zNlP?Vs(J>3T-vibG<)q~#t)i$437<$U3+S@r)J+Rp)n!5eTGOpDL3?XZ}= zBWvo>8mmI#XW_BHAo%tz`@>f^`SSDImd;-PQ$4o%y1w1}Wu{McFV$@^{;T@^!p~!c zF~x5`c-G}b>&jmab=JCdIrOzo+1s`MO6}Heef_XZaZk{HHrHGIsRy_3X^*O_pA+(W z!S<-#TLt4USmpdIHPNmAu*1Fk$2?$|oZoVdHMjgm)xNv$!zxynZC}p6WtNi68yC-C z7W)6#{=GQ=Ja_f_tiAbP-~S2qz7(&%RYmjEj;O8ItYjGGKVmYFOU{bbbFS)LS-Mr~ zVs^mVJDm)LIKu=j!2UOeX)f(yKYAv|BEpbwuPN=i2OZu4`xfe8{(5qCE4T(d)a<%O?Xh zbcUR+ezPj@%$nsd*RH*AyGK6zr&{^dEb)(@qwF4gZY|q;HKR6FaQ3wK)!ExSYV)_= zO;0O3XC3vrX`A)M_nUvOo3mdp==2iHi8F6X?*BQp{-@;1)HJcD_y4apGyW|KVyDKe e4f2xgv-c{QGlQv#-wl{i7(8A5T-G@yGywo^{j~f5 diff --git a/docs/build/html/classmlx_1_1core_1_1_erf-members.html b/docs/build/html/classmlx_1_1core_1_1_erf-members.html deleted file mode 100644 index 896816975..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_erf-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Erf Member List
-
-
- -

This is the complete list of members for mlx::core::Erf, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
Erf(Stream stream)mlx::core::Erfinlineexplicit
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Erfvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Erfvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Erfinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Erfvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Erfinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Erfinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Erfvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Erfvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_erf.html b/docs/build/html/classmlx_1_1core_1_1_erf.html deleted file mode 100644 index 07e13bab9..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_erf.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Erf Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Erf Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Erf:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Erf (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Erf()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Erf::Erf (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Erf::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Erf::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Erf::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Erf::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Erf::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Erf::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Erf::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Erf::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_erf.png b/docs/build/html/classmlx_1_1core_1_1_erf.png deleted file mode 100644 index d21c1648a4e4c8f7a9b66bd2dd232bd7351a90a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 861 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B*!JY5_^Dj46+eK={g0*@QN zyz$&U|ApgUN3pohF3Xy3J)1Ax%k)Sx$L{)*md`&bcwfqBnWj?7sq6Xa(FLzbPt@<) z@7;R&PrAn?VZ94hk&pdK*G!drZ|1*hinpO$eDRH_`KCYW()~6*n|bI|f7#R}RdX`# zUe;J?eCy8FrN{L`%Xd}2;+eGN>6)n0X}+dQme}Uz=cevofA#Gr=e0|9XN69B_3-j4 z{|k;=zvcc7@t(w2kZG#B|LxklYIfIG^|z|Lt#n%XYPEGRFh;Eev~F#2Thw zVEP~w#SrJjeZV_|v4T^VL4P6Z1673NC-yBx=PGSZOfrF+{$}eWm7g;Y`(I!3d-?R* zS^s%FvwpT+^E`6#(4whw&pt1S+OX%<<7~d@`}JKQO;q;v!*AWLc-=Pl zxKw9jR&)0D)m7(@J8rewd-c{-w;IRQw?Czt=-#iqb5m{K@=*Ei^r%$l+rnYbUjIGI zxBlwAIWPOdf?LjcPFd3b`O*CY`hP!H-hLId_WRm@^Xsop`tq8(Ar$15Y2%TWwpcJK zEiKOJ^qDiKUq|U5`!BQR>-3p7i`QMR%3d3-eYf~t@^jCxElb7v*ITa9IwfT;e(ubf z#`xFsu1zX+`)d0BQdQ>9z;ExnvaZVQ&QdYHed$|R@zpbLdc3#HQd_TnJFVdQ&MBb@0Lg}~zW@LL diff --git a/docs/build/html/classmlx_1_1core_1_1_erf_inv-members.html b/docs/build/html/classmlx_1_1core_1_1_erf_inv-members.html deleted file mode 100644 index 1b4e58ece..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_erf_inv-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::ErfInv Member List
-
-
- -

This is the complete list of members for mlx::core::ErfInv, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
ErfInv(Stream stream)mlx::core::ErfInvinlineexplicit
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::ErfInvvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::ErfInvvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::ErfInvinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::ErfInvvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::ErfInvinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::ErfInvinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::ErfInvvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::ErfInvvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_erf_inv.html b/docs/build/html/classmlx_1_1core_1_1_erf_inv.html deleted file mode 100644 index 92b8c6bf2..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_erf_inv.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::ErfInv Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::ErfInv Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::ErfInv:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ErfInv (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ ErfInv()

- -
-
- - - - - -
- - - - - - - -
mlx::core::ErfInv::ErfInv (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ErfInv::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::ErfInv::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::ErfInv::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ErfInv::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::ErfInv::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::ErfInv::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::ErfInv::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::ErfInv::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_erf_inv.png b/docs/build/html/classmlx_1_1core_1_1_erf_inv.png deleted file mode 100644 index 2ed64aaf6fd6957d8b3f8aa8ecdc8419a58274fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 880 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-aJzX3_Dj46+eckt3frqV~ zf90p&_8&7ZPhn8(jo!LjX05i{PRaD7GwetK@d zpYiVNA3K$oE&3U@Gavhvu9+%#f7_f8&Fe`veBL+0=Ij3Wmg2eb>CU#P-DT63RM}kI zwKVWj!j_${qx(Zw&ExreMN(zu^T@5QbYe}HEV0ea|GLS3z3H1z&TF^o&WfD$>fz;8 z4OkL@+WhY<#QYP6wg_`Fq6MUc~1JH^U(kKlH2)H z{#Mn=PrC9+ILcqCPfcv?7lU}eRh+Mv+W~{%+gH^ezZUfGPQQI=?e|yavCXGl=ayfN z`lOa=e{1H~wXc@GZZ3=|&i}EjDldAi)w0!XQ?@K$eJwEO<=TJ6c5Ao3epsfMwe%nN zq%HFOtoJ|hZGH8(Fkr1?{?@Xkg7Fumw$(`bp5~AHo+Ehw@~Z7eXNE;yC~Kek`EBL) zL%`^>wY`wlWpJZ&(wD-xKhi&(|JU5x_G{I(-(mmH@6Yo5RSJs7GpnZ-pS#TXK~s<6 zv*GeV&4+vm1*aZmbO_iDlIL}>GYX1-SMwo z|Nd^fwJvVq;rp>7?DCV^_^V58bGJ<2GHa`3 zc=na(_-k2Fb>ElO3C_=$`~H;qmQzjJtT)bC|M2+UubjHZo9C- - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Event Member List
-
-
- -

This is the complete list of members for mlx::core::Event, including all inherited members.

- - - - - - - - - - -
Event()mlx::core::Eventinline
Event(const Stream &steam)mlx::core::Event
raw_event()mlx::core::Eventinline
set_value(uint64_t v)mlx::core::Eventinline
signal()mlx::core::Event
stream()mlx::core::Eventinline
valid()mlx::core::Eventinline
value()mlx::core::Eventinline
wait()mlx::core::Event
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_event.html b/docs/build/html/classmlx_1_1core_1_1_event.html deleted file mode 100644 index 0b8a08aa0..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_event.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - - -MLX: mlx::core::Event Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Event Class Reference
-
-
- -

#include <event.h>

- - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Event ()
 
 Event (const Stream &steam)
 
void wait ()
 
void signal ()
 
bool valid ()
 
uint64_t value ()
 
void set_value (uint64_t v)
 
const Streamstream ()
 
const std::shared_ptr< void > & raw_event ()
 
-

Constructor & Destructor Documentation

- -

◆ Event() [1/2]

- -
-
- - - - - -
- - - - - - - -
mlx::core::Event::Event ()
-
-inline
-
- -
-
- -

◆ Event() [2/2]

- -
-
- - - - - - - -
mlx::core::Event::Event (const Stream & steam)
-
- -
-
-

Member Function Documentation

- -

◆ raw_event()

- -
-
- - - - - -
- - - - - - - -
const std::shared_ptr< void > & mlx::core::Event::raw_event ()
-
-inline
-
- -
-
- -

◆ set_value()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Event::set_value (uint64_t v)
-
-inline
-
- -
-
- -

◆ signal()

- -
-
- - - - - - - -
void mlx::core::Event::signal ()
-
- -
-
- -

◆ stream()

- -
-
- - - - - -
- - - - - - - -
const Stream & mlx::core::Event::stream ()
-
-inline
-
- -
-
- -

◆ valid()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Event::valid ()
-
-inline
-
- -
-
- -

◆ value()

- -
-
- - - - - -
- - - - - - - -
uint64_t mlx::core::Event::value ()
-
-inline
-
- -
-
- -

◆ wait()

- -
-
- - - - - - - -
void mlx::core::Event::wait ()
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_exp-members.html b/docs/build/html/classmlx_1_1core_1_1_exp-members.html deleted file mode 100644 index ff9c86910..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_exp-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Exp Member List
-
-
- -

This is the complete list of members for mlx::core::Exp, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Expvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Expvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
Exp(Stream stream)mlx::core::Expinlineexplicit
is_equivalent(const Primitive &other) const overridemlx::core::Expinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Expvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Expinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Expinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Expvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Expvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_exp.html b/docs/build/html/classmlx_1_1core_1_1_exp.html deleted file mode 100644 index 7a5acdfdf..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_exp.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Exp Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Exp Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Exp:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Exp (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Exp()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Exp::Exp (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Exp::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Exp::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Exp::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Exp::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Exp::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Exp::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Exp::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Exp::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_exp.png b/docs/build/html/classmlx_1_1core_1_1_exp.png deleted file mode 100644 index 5072482beda1fdef29a6eb7ae79e18a80c2ce713..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 875 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-)JY5_^Dj46+eK={cf&km> z{#94@{1={Y*tKAWPf=n2>bW9&g<2QNww;YHI#+3PVv>o}LRHT=C+|snEVfKi`RV!H zKmXm8dK1s8gRD{h&vrP^&0hNT?lV8pBF|%0Guv~2-ekK!|BT``i_056EuE{nGS7d@ zyTmD1GIQVjy0**v>g2pRR!u5zE2pisI;AHabZO$YZQnN8ufMwXQ}EiQIMJj)d zL9T0=rc%kN>-ouOUD!EGe)a>~cQE!GpAohF_Jp|PEZ;EYD&AG1>VgOSGZ-s4bs6** zvOZAV!my`BtYP{ErVm0<3~^4}2fPuIPsKBy&iPz1K{e9^X1ZmTs^=$T{(39*yY_ou z1pmLNvhu0=mU%rEvm>@#%Cak8#d&)5y6KfSzI{vm@Fl_ionS8a_B*S?XR%G!FTLZN z-8Xwla(4Q)?Wf*E?p>UuVRcEm@+xJ7;dM?$)jKbMv!hvv%C=h|2uW z=4rL9^zil_v1@!JpcC|36nwTT<_r;W=q~;Z|VOS}^Q8 z%9~(w?8>gYZC|8Q{8gr%$_}~ zzdrM}>6<$9W_8Tk)Ul?XAVLdu?-bZU61q{*`I%t`pk(S8sha*W%>0g->Sdnj2Ri{2k?c z@_qK}4V}3s<0GQ4PJBJ*$ffx1ntPX4`z@Mz^Zw&_tu1X=jf_7FMx~|2Ih{Up=Jb-O eL0*SHvdc2hO - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Expm1 Member List
-
-
- -

This is the complete list of members for mlx::core::Expm1, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Expm1virtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Expm1virtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
Expm1(Stream stream)mlx::core::Expm1inlineexplicit
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Expm1virtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Expm1inlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Expm1inlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Expm1virtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Expm1virtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_expm1.html b/docs/build/html/classmlx_1_1core_1_1_expm1.html deleted file mode 100644 index 7254a12ad..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_expm1.html +++ /dev/null @@ -1,434 +0,0 @@ - - - - - - - -MLX: mlx::core::Expm1 Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Expm1 Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Expm1:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Expm1 (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Expm1()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Expm1::Expm1 (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Expm1::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Expm1::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Expm1::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Expm1::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Expm1::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Expm1::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Expm1::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_expm1.png b/docs/build/html/classmlx_1_1core_1_1_expm1.png deleted file mode 100644 index da566929f85f62750ede4d52a3cd0d93330543f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 883 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B;FJY5_^Dj46+eK_fr0*@QN zys_WC|DE}3bz7%pm0V4Ie(a&o#?}I=Nxa=@mwqzHR*}!7L}9T&f1=n=9m2a z^33mV^yDS%H4d-O$&{}sUb|)A?K>--^iD?Tf8L;LfBV7f$(BdN(xt-oZP~1H^=;oZ z)1FCIYkOnwN0qOvy3`x&K4FRN_f4VhH&dOxtS()<7WeIU)Lkw6t5K&G%~V~PXSenj z%iNUL5!d*)s=Q>G9v1xR_bscON6Bk{MR;7An7-vy+cx!$U#v5IgD%esuX(BBb!k1! zh29ySlcpDLEjm|e!Eo;=Yl6+OE4yOazDNaUZ<4y09kAA-lcCOu`+#=_V+E%!gZ@I+ z2dY~b_OysKOuxYNK`4qL4oUKVW7s*%e)h;oZpuKvgH2u>Hc7?)^M~EVm%d)^w)>jz zJ1J`4!qW63H;*iu8uoc-ux~_M>E1Jkw{6#NUe5lzaC=7dj;C>ZFPZG9S@}3Gs`!qI zY_#>}eWAL$Y+m$dzbg%2^?cjSRmb0KQdE__nff{>XXVy+mU$6sF6e^hzxriE`gwg0~Tnb*EO z=l!`7_tlRagAT_?2n`)7w%7f)O3 zeDeMFKYycqchu&}nr+nmnG&|0KVvFyu7A?Y^;d24U;b0s=Y9Ijo98zBT|ln+`MCaS oT3WoymNRGe^sJs5FVdQ&MBb@0R70a)Bpeg diff --git a/docs/build/html/classmlx_1_1core_1_1_f_f_t-members.html b/docs/build/html/classmlx_1_1core_1_1_f_f_t-members.html deleted file mode 100644 index 1b6c9e55c..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_f_f_t-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::FFT Member List
-
-
- -

This is the complete list of members for mlx::core::FFT, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::FFTvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::FFTvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
FFT(Stream stream, const std::vector< size_t > &axes, bool inverse, bool real)mlx::core::FFTinlineexplicit
is_equivalent(const Primitive &other) const overridemlx::core::FFTvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::FFTvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::FFTinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::FFTvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::FFTvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_f_f_t.html b/docs/build/html/classmlx_1_1core_1_1_f_f_t.html deleted file mode 100644 index de279f0ed..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_f_f_t.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - -MLX: mlx::core::FFT Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::FFT Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::FFT:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 FFT (Stream stream, const std::vector< size_t > &axes, bool inverse, bool real)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ FFT()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::FFT::FFT (Stream stream,
const std::vector< size_t > & axes,
bool inverse,
bool real )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::FFT::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::FFT::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::FFT::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::FFT::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::FFT::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::FFT::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::FFT::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_f_f_t.png b/docs/build/html/classmlx_1_1core_1_1_f_f_t.png deleted file mode 100644 index aa05d735a5e91509583bd17df54ff4448f9e0141..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 847 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-SJY5_^Dj46+O+5cffya%X zzw_n)|3}NuolHoM>h;UJC*{{BUD6)(MceYZja-VSRPTjJD*6jmJ>z7eJSY8G@_M;> z`K$Z0RBRt|NAW+~;VhfI^!Kf2exgO5$Nn1eM}OYTx6f{-^P0kCiBG+)y@T$`WyBuV zSb6!@jjwBe>xKI7DtyH;Y0J~VZLc(D=XiKl-@0|{)V%dq*M4$dyHsaZ6F0b;x z;JEEu>faFWNqhyFrmFkbuDz>fcYRfVtIFF-*VQ>0)k5C;Ctp)BT^so*T0L-5om+ic7fD{q_E~!}%VoXe)<-H#KR9(6^cS)|P~F0?r$ww` z`UR#BLQxEHPTU8)GZ-t7B>yn3ol`8wze%MRZhG}v70Pz-@Pxj8uo&Gs?MG<<0evc)9+(x%Hm3>f&YAQNBV} zz)-O}*S)_{{qN5`xnD!qeqZ}<{{Ae_UzVVFq+SS336kQUH1lRg%e0v@r(ZBK{`_gt zweIX4b5|9``pukqQ+VH+t+Su;Jh(hdtg73heAR=~x86^$jF{S&pB-y{U{YyR>CV2D zdAjlYX05%I{C!eNTJ*JBtJc|HS=IgPNKR;V@szcnz4mQc_GJ6kt+$VC-g>HSoBGBt z{+gA>n}a!Zjg9perlvhp-E!v4o}SfHgS-xZ - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Floor Member List
-
-
- -

This is the complete list of members for mlx::core::Floor, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Floorvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Floorvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
Floor(Stream stream)mlx::core::Floorinlineexplicit
is_equivalent(const Primitive &other) const overridemlx::core::Floorinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Floorvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Floorinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Floorinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Floorvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Floorvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_floor.html b/docs/build/html/classmlx_1_1core_1_1_floor.html deleted file mode 100644 index 60f7e423d..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_floor.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Floor Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Floor Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Floor:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Floor (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Floor()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Floor::Floor (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Floor::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Floor::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Floor::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Floor::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Floor::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Floor::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Floor::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Floor::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_floor.png b/docs/build/html/classmlx_1_1core_1_1_floor.png deleted file mode 100644 index 2b602e649d0743547bceab9a20478cbbb48a191f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 866 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B+fJzX3_Dj46+eK={g0*@QN zyz$&U|AphXiaK8Owa%SxJ)1B6R944vfo=6CEuVi>@V=DMGEJqDQ`hs;qYGY>o~WOl zfA3aio&2OP%<>m@MLhN^T{rbwd9+&SDR;wb>s51BpBJ;a9~qQWxopEH_uXDWwt8Eh znRvbGF)Odlyu0+3pSk~B$4TE}LRX*Lw7P9d$&$Bg_rCeQbysZNs;?Q{X;YU}{n+wK zxFl$8a`gWds-EgQw#=G#|NFH>;reT<`dd|GE8SM-WK;{C-V=OH#dLAy(dmARRQ^gW zRP~H=@}9H@AMnm#tl-pT&|k>umdS?O*A=wWTi}mMLc~{VT2V z(&8HL{ZD0EUwtkNTI-j;wQQ;2{0pzP)kylDE|)9c+POaS>hVYFYd0-?%c=eO?Z3SC z?OE^7mAJ3gbb7Ahb?J8Hr}_ue>uTb*{aSJDb=d#&{##Z4T7g39*ws^(&mS^Wh?_Tj zln8!ZCVeT}XYI)>m-UWYAE_|?zzhrQ0riJ*?UW!X{z)@$0#nG$nbR*A8GruNb8WJI zfqjs_{_h>vvQO`c%Jj2w*PZ;z&|7!gdet{}_8Fy4XV3V3%-?t1*2hEF-g+F+o03+&?cS^GnKNTQrLAp0Sto42HdKDi - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Full Member List
-
-
- -

This is the complete list of members for mlx::core::Full, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Fullvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Fullvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
Full(Stream stream)mlx::core::Fullinlineexplicit
is_equivalent(const Primitive &other) const overridemlx::core::Fullinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Fullvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Fullinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Fullvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Fullvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_full.html b/docs/build/html/classmlx_1_1core_1_1_full.html deleted file mode 100644 index 7ad00b10e..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_full.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - -MLX: mlx::core::Full Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Full Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Full:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Full (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Full()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Full::Full (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Full::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Full::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Full::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Full::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Full::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Full::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Full::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_full.png b/docs/build/html/classmlx_1_1core_1_1_full.png deleted file mode 100644 index 51e2557809e41495c77b03b62b452248d0b92381..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 852 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B;7JzX3_Dj46+eK_fr0*@QN zys_WC|DE}3r!g&+D!=md+_8r~k!c@rY2nYXjd<)=x^C*W@@VzYQ`LssPD^dOp3cATUS#l_%4r)ux$pK0vX#q- zy{wUGaO=+3@Y{N!ydtV}+B&JAOB1(kue$j@n|Jr0kk|Lb&T4sn{g8Q8 z{l$`~RQJ`MxXD>ZJy|{oM=``XaUbx` zV65QOWzb*9`apFH!=4tghUpiWJ_sQse=@ z=KVI6tu@ZC9go~Rv}mf?=h7hE9s6IEMIQdPUH{>+xyD)sINaQR$g1MJ!Z|StZysH1G@!Cxb-*Rey{#&>G zaP`*R#Bjsr-ET=-QCi&%^$o_us1W*9sI$&#s=beEyQ5LR`Gz z=ZxUjMKdpD`>j2i<+k2)>mwDWA9#ZWN%9Zl+9^S^_$ST0nbR_D=FI6AjEp~jT6L{k zztB4DYgT-dfA-8s(|c>DZtHoy#H()oQDD&A`ZVRWF3_3N*z>YZu93U?RO+%+P1Nd- z79q+rBhTN9F3z~>`|oJh)t&yUzHYsD%l-1F+I(5FjZyzaLB90V`Mht<)kZ_(YNtOx yX3VVQ)HOENUznQqOm)kdGkbKRG?$vl{%5#yYVH*6l@CC - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Gather Member List
-
-
- -

This is the complete list of members for mlx::core::Gather, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Gathervirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Gathervirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
Gather(Stream stream, const std::vector< int > &axes, const std::vector< int > &slice_sizes)mlx::core::Gatherinlineexplicit
is_equivalent(const Primitive &other) const overridemlx::core::Gathervirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Gathervirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Gatherinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Gathervirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Gathervirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_gather.html b/docs/build/html/classmlx_1_1core_1_1_gather.html deleted file mode 100644 index 09cb2f1de..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_gather.html +++ /dev/null @@ -1,442 +0,0 @@ - - - - - - - -MLX: mlx::core::Gather Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Gather Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Gather:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Gather (Stream stream, const std::vector< int > &axes, const std::vector< int > &slice_sizes)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Gather()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::Gather::Gather (Stream stream,
const std::vector< int > & axes,
const std::vector< int > & slice_sizes )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Gather::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Gather::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Gather::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Gather::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Gather::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Gather::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Gather::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_gather.png b/docs/build/html/classmlx_1_1core_1_1_gather.png deleted file mode 100644 index 7840ba3e82ac51e0cf4e3a1471222031e98cc0e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 893 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GU1o-U3d6^w7^<`zFz;9;BI zKC|cFe|@{-AGs6eXjm?P`fSQ3(}PZN+!^~P6`y)tzBc_jBKgXiiUBGu<+0{du{X{l?30eD+DaJ-uq$l1;W3 zcP$SLT7Grs>4l|JyR7fpq_TNtRferK@($+JeCe@wd(_SO*I&K+6udSyI%KoT)U(S& z=Pj6=CAdBQsCcGETW!q?@eW-VD2y8g#S&nZjd zmA9yz^v>{{H2uOP75&FqPv?9tV2C-&n_zS7%C5U@U!;PwH%VR04p?i^$x!FSeZV_| zv4T^VL4P6Z1Jx}Ids@UAre9$CAQZ(Aha~yGG3=aWKYQdPH@NAG!zQWN7yr0y`SRb( z)cL>q)jUn@7k*WFl=EoW)UeMxgMA|6O81^g{CzwB;N@PkcN25{xA#o-pVhQoKlNU0 z_PNu6;M{e$>{d*8SDnI_76iJ^pCwwQUQ&a^C*+ z`)^w7_bl`DU5i6S7ZwYtzAU=;NBW2J{~Eh(zgAs)9`^s-{w&X5rB2?H_VlctT72#> zV}Yo7!$*nW*JaX|vVGQ`%yL=pxb=|=(+`3{0}Z!7>`|IaP2^OJHv^N1v9bQb)U;=KWu6uZ&kT*;w^?axRQd7RWWjFb>z19-^|~h>e-Lfo5b - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Greater Member List
-
-
- -

This is the complete list of members for mlx::core::Greater, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Greatervirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Greatervirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
Greater(Stream stream)mlx::core::Greaterinlineexplicit
is_equivalent(const Primitive &other) const overridemlx::core::Greaterinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Greatervirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Greaterinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Greaterinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Greatervirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Greatervirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_greater.html b/docs/build/html/classmlx_1_1core_1_1_greater.html deleted file mode 100644 index 4e738bd6d..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_greater.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Greater Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Greater Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Greater:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Greater (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Greater()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Greater::Greater (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Greater::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Greater::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Greater::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Greater::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Greater::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Greater::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Greater::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Greater::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_greater.png b/docs/build/html/classmlx_1_1core_1_1_greater.png deleted file mode 100644 index ed485df38fc62e9ab723449fd9db6bac6392be4e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 910 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GVYo-U3d6^w7^zU^CVz~h>q zx8&8n|HAqK9Ou}t$d;yUlIky-<{(pCFzIdllR2Mj6ed5(X%X|R;?$k=<lg3z{(sZs6YKp2rN+nSzKYV8y}zy0=hR+_wCz^?Tcjw252JE>HEp z;JWo!?%$wp75#$D(CB@4qwgy1ySC|glS=iyi(1@K^N(DTpJF;ObhX__Z}o{P^}QFA zJoOj4PKtBtR@r-I_0-~Xml+x6KVoF~Y`FZ|W5cD_=R|d1?TMS5b<~rE!G0ktL!1*g z!=4r~h6+wyh7Uqf3=dSdFdXpCU~HIvfr&vMS;0@{D9h(I@+VX*rC}C)iRx7OoAYpc z@ugqpr}llB->Z^c=k!|bQC8ALulAqU428e>+v-K%`1w_}LNep=yqo7rejEQ@rn=+K zjXle+O*5ZZyE^@r`?ICL4_K_LGOL+9H#+?EF_Wtb!qu~~VvkPSd$sP|@~yjUWAs}> zv-T@YthE;VbH@70rst0rMK$jYy*;(}N87c6)6>Ipe;$1OPV8fL)VGK|mq3BC;gbFF z*`ju<@6LJI7#7-c&{O4P|L14_8|}Y5{+zlx|LU(@SO0$w_MNofFJt18>6KfH&Q)45 zJP5X7NU(c$rOIa6ms!Et8)se24q9u`$?!lOSBPK@vU&&YrBj|UdrnGI-lB5SJHvC5 z`1EVHpS_Npv_vj_RsO|WkB(2aTQK#S%Igo;3^l(;$xPQhGv)ZVa|_=V{R`gY6?A;< zHKUIK-ji~lZ8|o?{kQMQ3ohoLRWgs%Zp~S=PRcXrwB?4Q=FYv-RAN79>h3-{e{R`} z%F1<#h0~S@#_8@h6Th0Z<+qn@SX$kke%b<{P***PKY~|+8 zd*=d7{U@;<>F-ym2BosC2i7L>&rx#5P^1A$y|Nrti!rG^&TLN - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::GreaterEqual Member List
-
-
- -

This is the complete list of members for mlx::core::GreaterEqual, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::GreaterEqualvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::GreaterEqualvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
GreaterEqual(Stream stream)mlx::core::GreaterEqualinlineexplicit
is_equivalent(const Primitive &other) const overridemlx::core::GreaterEqualinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::GreaterEqualvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::GreaterEqualinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::GreaterEqualinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::GreaterEqualvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::GreaterEqualvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_greater_equal.html b/docs/build/html/classmlx_1_1core_1_1_greater_equal.html deleted file mode 100644 index 16aec8e67..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_greater_equal.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::GreaterEqual Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::GreaterEqual Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::GreaterEqual:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 GreaterEqual (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ GreaterEqual()

- -
-
- - - - - -
- - - - - - - -
mlx::core::GreaterEqual::GreaterEqual (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::GreaterEqual::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::GreaterEqual::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::GreaterEqual::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::GreaterEqual::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::GreaterEqual::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::GreaterEqual::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::GreaterEqual::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::GreaterEqual::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_greater_equal.png b/docs/build/html/classmlx_1_1core_1_1_greater_equal.png deleted file mode 100644 index 3b6862e595a2eaaf7272cbf9f62d73d8e0bfd547..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 945 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GURo-U3d6^w7^-p+fYz~gEz zo%!Vd|3{N2u$<9-JkvOL<*Tl%F$U+De13OHB**Z(Op4*XuH>n`&UI24PgJAI+m^rS zCS|+rr9AB(a&O5yHY51#)n@B9iin&qwCDR05!Lfz)8tSp`(SIrF8kN#xpn zYvyN7e8Mt0Ec8=uZt3hFG2ZgrlipOiYUgLv3Vr^Y5Xl_5HLELsuFIr9hB4hLYj=ow zMiuH#+Ola~SdXC|J3~zuJHwjev!eQsPm0UV$_>-5(p~jbU6A3;4l#y^LS2RpkD?e7 zj&5Z*(3Q>DAbOpNL3n^Ev=1$sMjX6^8ujAFP zY>)a?;}e!05WO{4?}+%8Hr4sjp`V)1-_3ng9rY{1=JF}&sQDXe;(yJS)mwdc&dbKI ztsKphJtoONKf1s1{+IL5b64wMt-Al}`=8ZnC*_ZC^|*9uSCrwg9Wo3bH02mJ$Yp2Q z%6V6~MRQm;@P8_cr6_hqfty5J>I=a=xWlhi4xUjqY z{T&|upMP1TD=FE&`kKBa=ubt!YE>np#ATx2=KZz2yJAOi({m6oq}Uz)1-^!mk> zLG%1OMGUUqV$$ELuxR$KH-@jS{+wWJaCfYUD13 zSHo^j*7~x4YsphN^W5-%b#)7u1!ap~O^>q5*%Z}Vwm-;s-pXmU!mB6cXRi)Ey?V98 zm9V*=bRL&)`P6nzJ@9%^-KqG{i!XUz7XEx6Hf`6Z)xp0u*FVkQ_a;h7Nwhnwv%{xA nS5QzJbP0l+XkKR(`(x diff --git a/docs/build/html/classmlx_1_1core_1_1_inverse-members.html b/docs/build/html/classmlx_1_1core_1_1_inverse-members.html deleted file mode 100644 index 1fb2c948d..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_inverse-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Inverse Member List
-
-
- -

This is the complete list of members for mlx::core::Inverse, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &output) overridemlx::core::Inversevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &output) overridemlx::core::Inversevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
Inverse(Stream stream)mlx::core::Inverseinlineexplicit
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Inverseinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Inversevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_inverse.html b/docs/build/html/classmlx_1_1core_1_1_inverse.html deleted file mode 100644 index ec23a1051..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_inverse.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - - -MLX: mlx::core::Inverse Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Inverse Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Inverse:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Inverse (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &output) override
 
void eval_gpu (const std::vector< array > &inputs, array &output) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Inverse()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Inverse::Inverse (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Inverse::eval_cpu (const std::vector< array > & inputs,
array & output )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Inverse::eval_gpu (const std::vector< array > & inputs,
array & output )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Inverse::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Inverse::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_inverse.png b/docs/build/html/classmlx_1_1core_1_1_inverse.png deleted file mode 100644 index c59ec21c0952e25cd20892230ab773cbd6e43350..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 884 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B;FJzX3_Dj46+y<60*AmGL? zZ#=X1zxq0) zbe-xJm6P5Xo|C56Z7n*t)0*MlQQigizpm`MyX(uV;Oq^rF0KwcNxes^+UA%M>gA20gpGW!WB2 zt8G;&m8)lz)LrOX{mwL9>-e?Rp~v2YIeS@cie9_<#@21$)_=}h>&$yyI#BEFeFe|s z+j4$P+rBb%UjO8)Sy#exw~IXzjygLjK05SM@5^;&A5GVOim!>Ho2VvBJz!^$E*`qXV;!Q`4RuUH)~+ zukZK2=w~f0Z2I`~ismxux`npAD@7vuwv*y@ZQ~%PfQM(J5 zUQ2w?9Q^R=DzASj*-@*v{?)9A&lP1~StxY<-^L}+gH|c+uM|3armp>hk@07tsI;^= ir_*Q7c<%=}S2q6W-8p&9o(-UU#o+1c=d#Wzp$P!vbGG^b diff --git a/docs/build/html/classmlx_1_1core_1_1_less-members.html b/docs/build/html/classmlx_1_1core_1_1_less-members.html deleted file mode 100644 index e3f748124..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_less-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Less Member List
-
-
- -

This is the complete list of members for mlx::core::Less, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Lessvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Lessvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Lessinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Lessvirtual
Less(Stream stream)mlx::core::Lessinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Lessinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Lessinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Lessvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Lessvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_less.html b/docs/build/html/classmlx_1_1core_1_1_less.html deleted file mode 100644 index 076e7bfb9..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_less.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Less Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Less Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Less:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Less (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Less()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Less::Less (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Less::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Less::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Less::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Less::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Less::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Less::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Less::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Less::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_less.png b/docs/build/html/classmlx_1_1core_1_1_less.png deleted file mode 100644 index 5fde4667de943f1ce94b7377e7b1d10bf4c4687d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 867 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-~JY5_^Dj46+eb{$ML4d8j z|Hzx)_8+g_3d-2H&dpYDdz)ouWJ1Hy-`?je``IHWxhZc^Iq99@IZ3=dY?6xo%U>_Q z&V99A$&>#_!!=L&?*ZSpUfQ*7XAtksoMXRC+jDE}v7y;(4ohTl80r-FGKU>f5q&>-4|-!pu*<&(h7j_+?Uv`24Wi z=67$d8LpMj^1LJ)6XkpAeevspj{dE$vK2ku=Uvodzjg0O(EFV1NwY5Ld|WzP!*jnI z(0S7@Oj6NbsOlMa?CL4Y=MNbw#KjvvN(8?ylDw4dv-V_`%X-JHkJOlcaOyJXFJyh7 zx`km+i&(?-3rrt`q8Q?wxDR+|FjgQ*{$XA_r&x}ElS(h#boaF?o^{VYT($!SLa*J` zeAh`)`xcf86|PUd=(YN1%t|XA@7Vp%HspR)t;o7@{I1*Ww&;6TjeQS3T_{(6dDd~? zOB=V?z7D^-#M{|^UFG$;E8pFI7bd&;Hm~N(6M5U;9i4XPmj3g*QSCB${ENbFtyl0o zzDe$fSzh?+ee&gHt0zaVjrBaDzGatYyw~JUb6=k0`)IoMSCq{qP{l=0%cH8CT z9vv@Qy{l;M?1)$16_$JZ@3 - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::LessEqual Member List
-
-
- -

This is the complete list of members for mlx::core::LessEqual, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::LessEqualvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::LessEqualvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::LessEqualinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::LessEqualvirtual
LessEqual(Stream stream)mlx::core::LessEqualinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::LessEqualinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::LessEqualinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::LessEqualvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::LessEqualvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_less_equal.html b/docs/build/html/classmlx_1_1core_1_1_less_equal.html deleted file mode 100644 index ea0474c76..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_less_equal.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::LessEqual Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::LessEqual Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::LessEqual:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 LessEqual (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ LessEqual()

- -
-
- - - - - -
- - - - - - - -
mlx::core::LessEqual::LessEqual (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::LessEqual::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::LessEqual::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::LessEqual::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::LessEqual::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::LessEqual::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::LessEqual::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::LessEqual::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::LessEqual::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_less_equal.png b/docs/build/html/classmlx_1_1core_1_1_less_equal.png deleted file mode 100644 index 861844408310aba3ff8e8f7c874c0ab2c3ded067..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 926 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GVgo-U3d6^w7^J}g>nz{7TZ ze!5ZBe|0;j12+K2ug-Ok#cljfKF zf4O$d2Z{aUwNNhrxxAp`I^jk`&&BqzVl}^x7h?o{JgYoQb@mg z)OQoFS3PFswb`~yvzERy-D z!(8Z{;W=q~;nt#al@<(kM|l%$j$PSxx9y8maP}sti`fBdU$`*XFJyh7x`km+i&(?- z3rrt`q8Q?wxDR+|FjjEtGUy{o{&&zu^Z)5UkpC_JyqpCLgVgz;Fo@c>@T ztAEx6>PEzs{+)4n+jjkfmyg)Jo0#jp{m$z7Calx-OYiw+pPRkpaYp#H?W@}Lg#Ye% z7Wdur>#efwuV&oM^YC;p+g&Oaot6FHYW_8=D+Sd8TQB|Nom3+8x-q|UcT{QpoHt?1 zw?*v^>d?<9_1@RB?1^=Mby>&z%&WPDOGEj#yxmZ=_w0MWira5v{mZw^@_kXVNTqg; z_G$fpVvoCs+)UZl8XN0tfzB67ckUxNgt@_Sy{T9_oeBwYbmCS zt}lqX*vU|bJv=Z2>wjaImu4^f$ul`7PN&bD@y?hzv$AsC*F~Qye=Od6=1kw0yn64` zXWp=E58Ks#@BMl4tB0QUUhlVDbF1a+s+OtuL)%ne`dF8*G+i5WbyB45s{Wsix7R*B zZIwRl)DqxY9)MjHE-t^Q{5#?5H6?cATow?F+J6n$GTXQTb1(CMG7_TPCeleBv4 z%2|=ddRt$Ws_(vfdENS3&Ud!_dn7P>(*5h#o+{3}9u_@4EsfW2ZP9{U^=o&(yg2pr z3*X!b*__aCOZCsLk=*|w{NCpS7o=i - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Load Member List
-
-
- -

This is the complete list of members for mlx::core::Load, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Loadvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Loadvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
Load(Stream stream, std::shared_ptr< io::Reader > reader, size_t offset, bool swap_endianness=false)mlx::core::Loadinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Loadinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_load.html b/docs/build/html/classmlx_1_1core_1_1_load.html deleted file mode 100644 index f37a2c781..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_load.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - -MLX: mlx::core::Load Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Load Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Load:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Load (Stream stream, std::shared_ptr< io::Reader > reader, size_t offset, bool swap_endianness=false)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
void print (std::ostream &os) override
 Print the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Load()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::Load::Load (Stream stream,
std::shared_ptr< io::Reader > reader,
size_t offset,
bool swap_endianness = false )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Load::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Load::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Load::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_load.png b/docs/build/html/classmlx_1_1core_1_1_load.png deleted file mode 100644 index cb43b85d486bc02ea789d571682796299adfc197..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 872 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-4JzX3_Dj46+eZ6kAf`FU2 zyr=Q||3}={iaX>i_uXx7ozA1Zi0AR6YyVWA&pF<#t>E)M(pnp|UgQ1#PzLX!h9z-}o2seNxCY_NZbh z)l#pyyKA$(=i&Sv-CaH_r0c$Nf8S0$44|r!VR&eSv=r3e_ zpt^-&Pm5T?^b1TMgrXSYkR<;%hMlwQXOEoZrVR8u*yPP&lT_@ze;l^U+*fsT`LDem zL1+ClY&&+m+L68VY|Tm$*=q~)wyVC8_$y~)x~1@Yj{B~!u|Jn;R@7^JmW%Sfr!v?3 z?&g}%nv&cX$3x%mir4ymZFA@`lg)~%b2HOkYn9!Pep_I-w)EEFuTE3E-f~PT(YxIw zU%5N#>CYWA)}Fh!>g~7QA5CH9r{6EV^=a;T+o&Vox137;=#w3P;aAJsuZ#CaK1|*= z+xYIqRcZ^1g;ZZY-t$BHhjYDMespc<>)O@(KZomj?)Rf^2zhDtvY$MYW8!rB%o*>D znKLUZJzpOcjA^q!|G9nZr8((*z=Uz_<@cp~bQ8ZMs^&-HbL*i>tQfFy5SPx7IX1{H^!p@-2N^cg|VM{Wk67*)!`Z z16SYr^!8rWo{sx>qK{5|J?F^YeYJJ9R)^jN$^W}+Wc*ta?h;O2V`KftSxcu}D)_@Z Ych_8PB@qu6V4h&`boFyt=akR{01ghOZvX%Q diff --git a/docs/build/html/classmlx_1_1core_1_1_log-members.html b/docs/build/html/classmlx_1_1core_1_1_log-members.html deleted file mode 100644 index b66e45b93..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_log-members.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Log Member List
-
-
- -

This is the complete list of members for mlx::core::Log, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Base enum namemlx::core::Log
device()mlx::core::Primitiveinline
e enum valuemlx::core::Log
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Logvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Logvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Loginlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Logvirtual
Log(Stream stream, Base base)mlx::core::Loginlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Loginlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Loginlinevirtual
stream()mlx::core::Primitiveinline
ten enum valuemlx::core::Log
two enum valuemlx::core::Log
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Logvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Logvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_log.html b/docs/build/html/classmlx_1_1core_1_1_log.html deleted file mode 100644 index 0728bb815..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_log.html +++ /dev/null @@ -1,496 +0,0 @@ - - - - - - - -MLX: mlx::core::Log Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Log Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Log:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - -

-Public Types

enum  Base { two -, ten -, e - }
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Log (Stream stream, Base base)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
void print (std::ostream &os) override
 Print the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Member Enumeration Documentation

- -

◆ Base

- -
-
- - - - -
enum mlx::core::Log::Base
-
- - - - -
Enumerator
two 
ten 
- -
-
-

Constructor & Destructor Documentation

- -

◆ Log()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::Log::Log (Stream stream,
Base base )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Log::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Log::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Log::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Log::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Log::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Log::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Log::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Log::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_log.png b/docs/build/html/classmlx_1_1core_1_1_log.png deleted file mode 100644 index cc9ba7d8505ae19adcd566c6d03b83559df66dd3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 866 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B+fJzX3_Dj46+eLHEh0*@O% zzwz8V|3&v_{be|6_V$L}?>wtH6TLdzIo`$>o!e=DV$v1qg{q!$PTrIDSZtZ3^3(J2 za?|n`_h+lvK4gyKf3_odZuZircbEB1EQ;%SYSfzhdNXUka&VXKd4X+pE7Lu-ZZoen z?42aF_FU|}sIrw3na?zhJuc02Umcoub8Xv{k|pcb?tSxp>#WeaRi@KjO}&F|)sqF%RC4Nie!8?i?3`se`+?9q48Iopuf4t2d%fLOw$*Zbt*&-W=6ImKg<(&NSi|%S zOdo`z7~-6`4|r!VR&eSv=r3e_po)+szdwW{mzHqxtj=23(D$Unw=1=NdJ1_E{mYfy; zmdC5A&#F%?etlIdxoowfs_f0R*CO9UMgP9OGwOA~;jeB}yndT|T-vBBz3*vm*3{>Z zQ?^QN4ZXd#^+!|K<|o&~rq(^J*pyY^Fr&1F!4Bxcu3-+%jI+pXQkcQ33GTUaQh z`m!kQ5AUB#^UvQ7lfPPZ|JChtgXJs2vrlYap}KjK=ybznJ51{%kG*>vwf5BG4N@o1d^0(= zTG4oOu-yXFx;lsK+p{lUwYvCkNm%Ho-?yrEb;_?^`{;zJ-=kacI?wXwTXv?UUB9sK z+S9G6X=RL0_1Dh4srmn8{MMN_#W{41jrIR#0o_*qhncN?Zg1;LNo` - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Log1p Member List
-
-
- -

This is the complete list of members for mlx::core::Log1p, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Log1pvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Log1pvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Log1pvirtual
Log1p(Stream stream)mlx::core::Log1pinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Log1pinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Log1pinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Log1pvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Log1pvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_log1p.html b/docs/build/html/classmlx_1_1core_1_1_log1p.html deleted file mode 100644 index 0eeaf6c9e..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_log1p.html +++ /dev/null @@ -1,434 +0,0 @@ - - - - - - - -MLX: mlx::core::Log1p Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Log1p Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Log1p:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Log1p (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Log1p()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Log1p::Log1p (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Log1p::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Log1p::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Log1p::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Log1p::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Log1p::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Log1p::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Log1p::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_log1p.png b/docs/build/html/classmlx_1_1core_1_1_log1p.png deleted file mode 100644 index fc2853680b27706d0125a21079bf0595a721d1e1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 884 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B;FJzX3_Dj46+eLZQlf&km> z{#94@{1=vgtksk>XUQa;^HGp{PkuQe)Nv9nRNKUdSxbZ@4vYyW-wsS7xno`yv&h?Wfc*{{qtop(utp zC+-8@8H^R2x(xaYSs$owVc63m)-W9*d0PI$Da+>{6}&HHz)UZ?;x*|>I$!+_^}F_a z-vs|%?h$m_e2bjRoKl^rOw;+=q3usYub-CLwzrmZp47KO`Y_sh1unsGPB!_&QNbE#PLw`>1O@2xGparmv%6|djs z9+x(*;okT3ZPwN2k5jf;Rj=NvE&Y*m?Yn9EOK*Of`%q5zQFheVjXN%Bao?J^A?W_C za_v25zrFJ*-!jYd#T*yUDr^6LY;`ZsKTloVpS3sd>;FHY-j~)3Q#FLVG?#uDqCZ0%pM-~((Zt5%DRxly3T8+Tdt8RT|0Hds^1~| zFYUfEt5{`o@=CqW7Pl8aP0RhQIrZALytHeNtF~qJAI?!RzI{1U-}mY3?x^qQ^)s#( z*BeEv-zopr0GOt*YXATM diff --git a/docs/build/html/classmlx_1_1core_1_1_log_add_exp-members.html b/docs/build/html/classmlx_1_1core_1_1_log_add_exp-members.html deleted file mode 100644 index 3c05b01b8..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_log_add_exp-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::LogAddExp Member List
-
-
- -

This is the complete list of members for mlx::core::LogAddExp, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::LogAddExpvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::LogAddExpvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::LogAddExpinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::LogAddExpvirtual
LogAddExp(Stream stream)mlx::core::LogAddExpinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::LogAddExpinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::LogAddExpinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::LogAddExpvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::LogAddExpvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_log_add_exp.html b/docs/build/html/classmlx_1_1core_1_1_log_add_exp.html deleted file mode 100644 index 1cc6326ec..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_log_add_exp.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::LogAddExp Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::LogAddExp Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::LogAddExp:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 LogAddExp (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ LogAddExp()

- -
-
- - - - - -
- - - - - - - -
mlx::core::LogAddExp::LogAddExp (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::LogAddExp::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::LogAddExp::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::LogAddExp::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::LogAddExp::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::LogAddExp::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::LogAddExp::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::LogAddExp::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::LogAddExp::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_log_add_exp.png b/docs/build/html/classmlx_1_1core_1_1_log_add_exp.png deleted file mode 100644 index 28cb8ab01bfe36d2661453a2d8e022c8cb461383..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 943 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GUxo-U3d6^w7^zFxQ5iib@- ze#xo#|Btj6adNV}T6g#A+{JITlr=2UJl=fMw|s6Rm*Oeadts7_{z6sHIGHHVNq?3+ zUv6G*72l?^_ksA9yk|RtW3!jOz58sk*3(@Qw-fnpUr*<+yEilVP35u;pO(&5T`6ZC zb>775RgYPDZRYKzul&sY=Q>X6yR$ZI?$ZrYL6>H3+t#<~{`FU3KbKyM5<9Eo`SnBQ zRoRk_QO`HktyJ|C-?3%ZB>QXEGKJ%_ujVRxrr*1$C4H+b$@0BU_M}-C_dM#i3Y_#$ z3gkK`?@4=Frm0j)hHF2c)6V=L*oNU)vd`M%$sX$sx2mlc+{<>g%a7%Qa1=wF6ZZk{ z48{shT?YMytPfPTFzjg&YnXn4>4OkL@+bS2qH~otCnlM|O`o%MlFHAShx4BU!(e(X zC=9mNIKNhVl$CVRYxd8YAm51iQtLB`zi&@}@bZ{p-pOstqt{>cpVf4Fy4Cx2rq6vZ zRc2&!WD2e!Ww+_0^2SSstG0e5*@EqqAQBu$q6(>T1Dm!L64*@=hv| zyWRG_a(7f|eaxD$<=dim2X*9UlzQ*$S@y)bfA{Sp^E0pJe)L+MlW{xoY0dun8xL!@ z^4s3Mm?gIGa_6Kkh4=pO{<$>&eE-_I(AUqy{?Ff^<@xJ1bwen~E7Qg!Ep4%2R9ae` z)9Ev3PH(+7d)NBQYtk<#W||pq)~<`zerv9!YrHwyFRFOn^R1>2=ap9Of4gDdSI^Zg zxtFI)zyAJo1GgUI^QqR^X9G{Zu~~I^PUikAc3FD^oVL$h&42aK)$qKq)!$x(wyADz zJNGvwO}6V{RCMpJ<6B-G+I!*Fy!%<9(Vv;usyWwh)!Q=r`FyVj8#?o|OjYYQTi34L zn=`tuCHTvzEG~0bE zuKu|+Yv$b#zCah-D{MJ)2AHB|&YbS4y>v?3WBc0svwWJbE!zOhS`419elF{r5}E+& C-_iyE diff --git a/docs/build/html/classmlx_1_1core_1_1_logical_and-members.html b/docs/build/html/classmlx_1_1core_1_1_logical_and-members.html deleted file mode 100644 index b96dfe648..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_logical_and-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::LogicalAnd Member List
-
-
- -

This is the complete list of members for mlx::core::LogicalAnd, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::LogicalAndvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::LogicalAndvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::LogicalAndinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::LogicalAndvirtual
LogicalAnd(Stream stream)mlx::core::LogicalAndinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::LogicalAndinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::LogicalAndinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::LogicalAndvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::LogicalAndvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_logical_and.html b/docs/build/html/classmlx_1_1core_1_1_logical_and.html deleted file mode 100644 index 1ea446dab..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_logical_and.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::LogicalAnd Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::LogicalAnd Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::LogicalAnd:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 LogicalAnd (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ LogicalAnd()

- -
-
- - - - - -
- - - - - - - -
mlx::core::LogicalAnd::LogicalAnd (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::LogicalAnd::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::LogicalAnd::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::LogicalAnd::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::LogicalAnd::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::LogicalAnd::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::LogicalAnd::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::LogicalAnd::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::LogicalAnd::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_logical_and.png b/docs/build/html/classmlx_1_1core_1_1_logical_and.png deleted file mode 100644 index 65d5f0bb4faeb52263141ede1bd0892ba0dcebdc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 930 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GV=o-U3d6^w7^KAiMQfya$s z-q`Qn|IYl}Z0^=;FLv#IbH`%N#!CYJiWm1kne(|~f@-FTllP=OEz?vg3o}$bKTUqO z{@$&ZRg#mwwB%pd74g`wblp_B^JeiPn%B=(>^YnG``?>`->r+gY|o2qt6dT9sdc>d znr-hStHtMH{cQbK?znt5IBmibsD=@=DO7@$g(CX zm3{7;u;^?4TUB1NOb-kFbo^Ep-^ZO{H^nAh`P6l-Y(c4d-u1b;zCos|+-p_~tG>L> zq3iicC~DFZ)h#L~Pw$Abd~PGdF#i#ofn0Ld-8|>2-j$}2y)R5xgq0{Y%)h|&K`4qL z&WZbgcLrkxr!Is3Le>YWTNw7Vh&4<{NS>}=FtzyHW5;PrF2YP-dev*vlXSlQF~Bg0 z`vwYwkk7(V;)3bi=4-zg%-8Q?eZAQ3-m?vVUv7W!@|a=X$!*J{pP$N~)wG>I^>wfz_y;ZgS)QrP<9-g}GcdfebX1)GlG5=at)(*RlpqD>b zJhP5JKJa}{?AlHCer2nJqqp7->(I|A^{$f+Jz2i*-7A6nm$hy`nh6S!_T1~g{~qRi zzq|Iu%f7I!oOAuAEb0IJDE|Tf-=BMOzpjmXAN_ak{w&X5rJ%^{Sq=2sVa5-dc?^#Y zmtA{nw&ePZsL5A5;+nHu)tP?a3=^~f`@VT(7pA5?d+PMs^?qK3 z@lKyPKL2M-n;CgjW@;3#v9|ka)Ac+3*L83IeR;j-PqTL2>!Htdb4~}Z)84vlyV8|2 z-!5L9wRm!*b=P*w$97xmD(*zP<=@>_M5nx8$Dzj{-&`mNq;g^O&%w*!;Q-bXuZj%>d5Dr0Y0wCm|otBr5gE!Cdx zFFtq2S=rssTkq={Z`S|VdglJptJ)IA#_IRCML*SFJM(7tpS}CDj5ps`+H&R$D2Rf* c4u9ltdo*k7_gVVvz}&>(>FVdQ&MBb@0JL(_#Q*>R diff --git a/docs/build/html/classmlx_1_1core_1_1_logical_not-members.html b/docs/build/html/classmlx_1_1core_1_1_logical_not-members.html deleted file mode 100644 index 1b749bde7..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_logical_not-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::LogicalNot Member List
-
-
- -

This is the complete list of members for mlx::core::LogicalNot, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::LogicalNotvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::LogicalNotvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::LogicalNotinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::LogicalNotvirtual
LogicalNot(Stream stream)mlx::core::LogicalNotinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::LogicalNotinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::LogicalNotinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::LogicalNotvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::LogicalNotvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_logical_not.html b/docs/build/html/classmlx_1_1core_1_1_logical_not.html deleted file mode 100644 index a4650332d..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_logical_not.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::LogicalNot Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::LogicalNot Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::LogicalNot:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 LogicalNot (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ LogicalNot()

- -
-
- - - - - -
- - - - - - - -
mlx::core::LogicalNot::LogicalNot (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::LogicalNot::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::LogicalNot::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::LogicalNot::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::LogicalNot::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::LogicalNot::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::LogicalNot::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::LogicalNot::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::LogicalNot::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_logical_not.png b/docs/build/html/classmlx_1_1core_1_1_logical_not.png deleted file mode 100644 index 51f652755cbd67a1549845fe366564f6d1c64051..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 918 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GVQo-U3d6^w7^zFzmpfQL;z zUggR6`bWB~QOkY16Cci5b4_D$Tg)BLM+f4w)|T3=m}DZgQq?ms$a~TvmMvW>M>Vhe z=f4ZtFX~x!NPLUmvleIB?5W3ZJ?rAGyx(&?S#I0A^Hx7@8Mj9~_BlLF|E-SazBw7O zhgYl!zI9{Y%R;Yp%cYOIPgtUxzWeFooHA#vTbG|*3;Xtb>#oSU6{Y^&Y135VlcN5y z$-cQ}w|0J(=OsqPwQ5hd@7!vANV>NaSsWED`| z%CKmOn8TDSOdXS=7y^U16}++-U63UIut#mZW+fNmDb))z`CF9hq(^5C`#+!ZdbxP* zs{36kTmQ6NJK3?gvpcME#(7cmhx@L8f?!>pq)lng@wlctdsjw$neiT+?g6-TcApwx~#E zyd3+!V{fy5{w~}QJ@-!5+i5N}j;m*X^3Dv}_j%W5=NkXh@!jcBryIAK=d4`+ceZd` zd3Et}>!`D8C3%ZfYUha8GuOX3|2%i~`mDYAU*G=;^}e)za?~V|)R?tV*|K~M{)LPZ z{f1lhrYr6}c4gKYw=Ys5+WATjb8v - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::LogicalOr Member List
-
-
- -

This is the complete list of members for mlx::core::LogicalOr, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::LogicalOrvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::LogicalOrvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::LogicalOrinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::LogicalOrvirtual
LogicalOr(Stream stream)mlx::core::LogicalOrinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::LogicalOrinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::LogicalOrinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::LogicalOrvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::LogicalOrvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_logical_or.html b/docs/build/html/classmlx_1_1core_1_1_logical_or.html deleted file mode 100644 index 205a8832d..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_logical_or.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::LogicalOr Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::LogicalOr Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::LogicalOr:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 LogicalOr (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ LogicalOr()

- -
-
- - - - - -
- - - - - - - -
mlx::core::LogicalOr::LogicalOr (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::LogicalOr::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::LogicalOr::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::LogicalOr::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::LogicalOr::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::LogicalOr::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::LogicalOr::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::LogicalOr::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::LogicalOr::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_logical_or.png b/docs/build/html/classmlx_1_1core_1_1_logical_or.png deleted file mode 100644 index 79dcbcb6f02248a88ec94f481a4bd7b3eafc9650..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 920 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GW5o-U3d6^w7^zV2IXz{92< zzvR^W|3}z0rn4}W?#?w|{W#QZ>4O=ak8}P{Dn9quaoUo59J-#LgrX)rIl6GF%1M8z z|53&5uYXTi!d~O>I;qe4>dvsJYi6+`n$MGTxQTp!FwN2hfC#TIbYF2r>b5+>P)No$SmmYVct8c!~Hr@RvBs;G=3#k6bmQ%td zL2Hwv?XOH)A{-MHdis6!>kXa#TTdk`db-cM7-hc2uJd*2;x(SD+_oN>?zc$guhc?S z&p0RVNqbtRsZ_oU*M2@{H}iwoI}E=T`>(yd)_c9(R<_l0d#$c^P3Cx@zJ*~=i&(?- z3rrt`q8Q?wxDR+|FjjEtGUzX4eV~ev{3M_8bWU;o1l5)1Fq18_R6Rc#x5l6Id>pU+ zyP#HnQpjiCwcQ%f^UsYP=>WY_t7RZL*&EB_iPIUO{o|~c0URIk{UyFQmEBg1-J<+c(9RBJy#p}1I z%1euBy!StuZ9Vn5Flen?{?)QeP1G{%H zesP~4wLN-zTx}L_m~B<*Dp7U81O8aU12eFm+F$U}T>4L8=FG2d88c^Aa_Slz>+^4! zSCZEzpXX~UJ!wP)N>X=$R#S7OheS>qY4-D~`A^Xs3Vg{Jpwu8H_sw6$$*<*CZg zdqX!Q7A!J7qNh1I(z2`HaM_Nn^|$ZtG|U&jA!4yI>}BB!H>1tAz0cXZwMw_nO$+Ot zpFMT&Z;#h$OU6`?o}?XZ>Xli8ym#&+pNs zqMN_fx12e1?{N1``<11)EYs4i*KCQJzF$8rZTX+G^RtXM-&X+2@A - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Matmul Member List
-
-
- -

This is the complete list of members for mlx::core::Matmul, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Matmulvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Matmulvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Matmulinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
Matmul(Stream stream)mlx::core::Matmulinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Matmulinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Matmulvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Matmulvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_matmul.html b/docs/build/html/classmlx_1_1core_1_1_matmul.html deleted file mode 100644 index 490ff158a..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_matmul.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - - -MLX: mlx::core::Matmul Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Matmul Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Matmul:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Matmul (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Matmul()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Matmul::Matmul (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Matmul::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Matmul::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Matmul::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Matmul::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Matmul::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Matmul::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_matmul.png b/docs/build/html/classmlx_1_1core_1_1_matmul.png deleted file mode 100644 index eddf94c6689334b6ca0636a6709feb8af328d0ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 885 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GT+o-U3d6^w7^KAiMQfya$s z-q`Qn|IYkq-PUPYC0C!GJN7W=rrDBqhF{a?6wC2%Qt5Te@SHUL!Xy=azO^czb(j9U z?4A4Tx|%2dkA`b=4c~=4kII~T`_jswdtDpjrfpbj7yaQ+is#0sGY_4zf2-kHx_hzd z^1z_wTX(*WeytVizpL^U&!jESxi*`4L#>3(bP*6Dxug_TdApLKVetFc$m-I}Pc zoK`EZ6-L`%nY2VWChF|8`|sBtRZh9W!Ih>ExA4;YVy^NxaO>*o-7}PqZs0xxDR+| zFjjEtGUzX4eW1F9VNZ)#!}JSGAA}H+KbfN}pWDc#cuK)d?~C%B^hf7m`SB$`FQ2yi zy54tE)V_tK>W^{~E_$v0d1)ovon^a#L6G}RwW4Z6|L(Ngm+rp1nm?=Qw0-G4-|UmK zmn3JqU)#QF`aQWXk7rfiHNTpCJL{?;I2g*VT6ODIXWP#$&zAjGuv=j3r8+iGt8JwR zx9^Ev`>SS7$m-48qjql+oPXg}-p@<3bnjQ*-RoN8yV_2yf6J++ZR%^jY=6F6^xmqy z)|X}1F5{RxS;I5``N{VO^#A_Ylk+uj?e(?)=FiXa{8dWb5Yk*~BBx@!`67p|v9bQb z)U;< zUzioN_U5F>yR*towoeOt7Ib(0q`v{HKU(N`8f~_Xo_bwq_EP8H^RE5LJT^6Pds3a- zYQK`8wPkniJyeFIipNUtk|#x8zPD!UTAyNInpo-1nd|Sj_4C;?RY&^!XU?2{!N~Zt qP*hr4oYUzuXHGAf8sv5OBfoR(?0+Hrs@H%Sgu&C*&t;ucLK6U3NwshQ diff --git a/docs/build/html/classmlx_1_1core_1_1_maximum-members.html b/docs/build/html/classmlx_1_1core_1_1_maximum-members.html deleted file mode 100644 index d185625c2..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_maximum-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Maximum Member List
-
-
- -

This is the complete list of members for mlx::core::Maximum, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Maximumvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Maximumvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Maximuminlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Maximumvirtual
Maximum(Stream stream)mlx::core::Maximuminlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Maximuminlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Maximuminlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Maximumvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Maximumvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_maximum.html b/docs/build/html/classmlx_1_1core_1_1_maximum.html deleted file mode 100644 index a2374f87c..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_maximum.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Maximum Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Maximum Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Maximum:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Maximum (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Maximum()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Maximum::Maximum (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Maximum::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Maximum::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Maximum::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Maximum::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Maximum::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Maximum::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Maximum::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Maximum::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_maximum.png b/docs/build/html/classmlx_1_1core_1_1_maximum.png deleted file mode 100644 index d888f70916cb45d503beaa60665bcbe9b4d8d205..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 901 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GTyo-U3d6^w7^KI~g;z{92< zzvR^W|3}o}N>$ImAn!?wShjSj9M$}O z{^FgNf3iI;aqn|{eR590s^Ybq_S~*{6lB-6QRdl(wRX`T{+^qYblSLeZTzjsNq;I9 zmHIDU)O_*Tx9QVDi^};v|KOQ)<@1^-JMVDbl^OoGqxZf!pDkPVbLF+gy0d`lJ2HRD zmISS>joyD{(h^~(DBsiH_il|oay_ap+T+r^@-5d`bITu9)dgHrGF@DGw7+bT%3rt( zmrPS}l?-2fEvlXQfmR;FW5Z?F-kL4BJ|k-K)sDF4tfzh~9h0LN0)w~}ys{WwJarp1 zR`sM9g8z6{e0!2+5z!QCqKB$%S}I^#a|Y0Sbd}QLd97oq6d0e9G_V8ox{a znX0UOs=j5O%N*aBt*4Ug=I`L_50B+5zVYo__J@+i{l8CbTUs6S*?(5kb$z?{%S@l^ zUaH$-{8#n+h2y=CcRaiGaPpr!+oJ52t!@k1vV8Tm$Tzp5|Gth{yY=jm4Rc5fBDf59r}XQ_#9{f8at-9KhdyDzpL93VHU_T7CSR!yMFrz!^%XZ)*3jR2Z%f>v z-aNBqSzCVz72;@vuBph$?}~% zt@7xZezof2%*wFj4ZPDg{me_dRv4%I{^6>PvQ^u(^i|6?ch8g$%aKk?lMT8)hl{qCpz?N)|azyI-4Jljou+6PRHbJYD@<);T3K0RS1%zPbPa diff --git a/docs/build/html/classmlx_1_1core_1_1_minimum-members.html b/docs/build/html/classmlx_1_1core_1_1_minimum-members.html deleted file mode 100644 index 34236c406..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_minimum-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Minimum Member List
-
-
- -

This is the complete list of members for mlx::core::Minimum, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Minimumvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Minimumvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Minimuminlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Minimumvirtual
Minimum(Stream stream)mlx::core::Minimuminlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Minimuminlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Minimuminlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Minimumvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Minimumvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_minimum.html b/docs/build/html/classmlx_1_1core_1_1_minimum.html deleted file mode 100644 index 3407dff49..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_minimum.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Minimum Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Minimum Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Minimum:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Minimum (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Minimum()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Minimum::Minimum (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Minimum::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Minimum::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Minimum::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Minimum::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Minimum::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Minimum::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Minimum::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Minimum::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_minimum.png b/docs/build/html/classmlx_1_1core_1_1_minimum.png deleted file mode 100644 index 46ca64b2d779f71310a4c06ab7a53f43090b24aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 892 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GWdo-U3d6^w7^zU}*@AmGN& z-#PR5{zu!xynkktnyfoLdv4q0OJZ%zJin&TDW1o_N#(3thUcW|7bdCb^Q~3!th@Bp z>ecQm`L2`ZePE8_|Fy$;ZuZjLyzHf1mGM1qx0&6(o}ORxcT?Mq$2wq}=mT^{v)OGcIFs&4<) zc8=<+O_zNQ*7dYHxb*6hn)%U()$FdX>Tgx)-LojvY>RE@(z*?6JhQxvk8bx{r1Dp4 zp{i$`llP=OEz?vgXNGG(pR=6#L2wMivt+-ur&GPwTW%FwExA|iYS(0r2kKiG_OysK zOuxYNK`4qL&WZbgcLrkxr!Is3Le>YW2+2?ETZ+zA+MSqWA`LUWC(3iupEYOYzj0sq zzN6B+^ljw+Rcw3fE%L7Kv6fl+?)JK{yUU_^H8Yn)uid;&b^EWEHBs3o9+oL*Ev;ko zlsdibVf7v7wZCfSthwfxx3x@FF#dv-&(EM)Q|u+)T~yn*JXF3rJu21tws6?1-{14v zzh8ZK?n`6XW)61sz)5!Jy7xE6|N2~c`<46Fd)t52|68T{@;axk=O?4}VdpIU*$*t= z!EomIoT%xir^FR!>4q6s`K}UG7d+sPH9Rl_>nVT6(kYi}CY(8wro83M8DQYgoH_k@ zlzvwJ+3COUeSW&KKJN9ke|5&j)$PG+x123s8&Y<<->WuycBs(QYf;ypN9T55x0^ka zcTV`eA?f;&?0IL;u*t0nduzDF(`fU&+NtGh^)4OMHs0LWpAox$ z+5MG=-M7B_r@s2?x8Gf1lRwqw_0GQ0n{%@5ljqt^3*UO`e06&gv)bM>Esgo(^W?N= ns&Lm`Ff#tU3FPXMKg_>NXZLNL%5(sjPZ&I1{an^LB{Ts5fF-&+ diff --git a/docs/build/html/classmlx_1_1core_1_1_multiply-members.html b/docs/build/html/classmlx_1_1core_1_1_multiply-members.html deleted file mode 100644 index 9754017cd..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_multiply-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Multiply Member List
-
-
- -

This is the complete list of members for mlx::core::Multiply, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Multiplyvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Multiplyvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Multiplyinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Multiplyvirtual
Multiply(Stream stream)mlx::core::Multiplyinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Multiplyinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Multiplyinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Multiplyvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Multiplyvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_multiply.html b/docs/build/html/classmlx_1_1core_1_1_multiply.html deleted file mode 100644 index 85362801c..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_multiply.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Multiply Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Multiply Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Multiply:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Multiply (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Multiply()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Multiply::Multiply (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Multiply::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Multiply::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Multiply::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Multiply::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Multiply::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Multiply::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Multiply::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Multiply::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_multiply.png b/docs/build/html/classmlx_1_1core_1_1_multiply.png deleted file mode 100644 index 518065cfbc82a3186a616f79145caccbddf2a3ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 909 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GT?o-U3d6^w7^KI~hqAmGL? z?`i!0|B>raq5)ej``%71UjA@NMEgUI=D*(OEc@9bC%GwaQ90?I;WK`)QtvEj07Z_SompAj|rYDZji)=^KE55iFlaZcO^ zyfYXpICUBH7qUK3-NLY^MXX`^1*Q)|2+5!PTZ+zA+MJkVA_X&9X6q!CpED2ZA7Ao& z`SjXX_On#B);PabdX)2E+0?MlJA-*6LeuJy~^S{ALiZ^2dFpKDE3@6UXfC0xHORK7bM93VNbr~lq9 ztG9Zu^<~+$X@XY3P`P)m`~3m^zd!%nc(pjne)})$`m2+^yl$DMQYjg({d`V4^Mlws z49Ajv*51zbSZ}yhZMEQDwyRx}IUcBE4G+w~`XryRbjqcQ31`j#lgODfds?Q=oGCv2 zTKBW;3Q4oCa%X3MP>$;V@pN^@-U%PPwAa3T<~KE`YWdTu#A@S%$xHzol=kTU056U`d{X;QWLA| zX=%25qDrStzM6I1_Hq>WwKH!zf+4BIeB(#Yw53q+hW@pyU;Br&s5^} ztM2 - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Negative Member List
-
-
- -

This is the complete list of members for mlx::core::Negative, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Negativevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Negativevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Negativeinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Negativevirtual
Negative(Stream stream)mlx::core::Negativeinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Negativeinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Negativeinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Negativevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Negativevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_negative.html b/docs/build/html/classmlx_1_1core_1_1_negative.html deleted file mode 100644 index 8d4d4cdb3..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_negative.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Negative Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Negative Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Negative:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Negative (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Negative()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Negative::Negative (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Negative::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Negative::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Negative::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Negative::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Negative::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Negative::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Negative::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Negative::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_negative.png b/docs/build/html/classmlx_1_1core_1_1_negative.png deleted file mode 100644 index f7a0d33a0efb549f57aef90f5e4447729e2f42d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 929 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GUVo-U3d6^w7^KHRj*ipMQ{ z|2d1w|LXfXm^4Lte($oiEq+v@=_DnVxvGBU)@vUZcwNd^GEK$RQ`fUg=z`WHk>z*d z_wKy>G1=o1cb((wBtMI*JHsO9<=Pc!&OaJq_iV#jyXX&pPt8d>ZQQyx{#N9qKRYh$ zS{@jfzGdg%m8nzjOwE&OmOOz7$Ko1xBHR+qkAi~IIF>aL#s)v9f-#@>_U4R!Z7 z`>iU?c|AR9Qi+qt>dc?D`Lbdkw@$k+HmT%^?AlVt+jDowm7j`Ql4jEXWAR)K&-$J# zla^?#RP_uD@}9J)XLV@y+QW<=H1il98!o%{)@;f38Bvq3cEmMjJ@sShm>k6r7{smM zmBr}dsoS8jl2t%;E5o8CVh&TTFm+5qNd9EslC`$fX2m2EDVWJJTf0<_&OEIDe9G_D z(`&8jcs#Rywq0{Qa`Q;&YMp1F8)tv0x$-ob@AkYp-g$a&9?RX_R&u`hpI`8YUq_$c z-STXYt5sjwGW(}_zxG_{&pucB{>k%gS3eo<&hl_|FS}~h9b29K-(vnXt1kt+1>!RQ zvjCN+9^AesR(HR>->R!G*IvuZJz~CPm+t<)WlycQ?~Xb$Kl5kqN3ZPI3uWzVkKg`! zmn;A3y|*v>!h&1Q`Au2U|M^+|gX#Zj>T$E?07xgBlPxL+O1Bb$Bu@^(!E!VjJqdArKJVN zW$#`2m&1Ox$z1-YzxP~|sb83y_H9z|+D$e$YaR&s*=zkv=Bt*;|177|czgTr+q1UK zO;5|4lkLknP3GvCezVQ?ru}9~(=3meSe`jk787#%`G>0!_TNgLnTqdUTU!6~_32Z) zjLyc-J(Dwe+sv0L2s?iW6L#_s6v?LSJ_iuU_b?LsKv^4cUTkEf;rNygn jJ#z+>h`clpf0RGoG}~Wnbx}MpGckC&`njxgN@xNA5{=7r diff --git a/docs/build/html/classmlx_1_1core_1_1_not_equal-members.html b/docs/build/html/classmlx_1_1core_1_1_not_equal-members.html deleted file mode 100644 index 93f8795dc..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_not_equal-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::NotEqual Member List
-
-
- -

This is the complete list of members for mlx::core::NotEqual, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::NotEqualvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::NotEqualvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::NotEqualinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::NotEqualvirtual
NotEqual(Stream stream)mlx::core::NotEqualinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::NotEqualinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::NotEqualinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::NotEqualvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::NotEqualvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_not_equal.html b/docs/build/html/classmlx_1_1core_1_1_not_equal.html deleted file mode 100644 index c394128dc..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_not_equal.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::NotEqual Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::NotEqual Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::NotEqual:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 NotEqual (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ NotEqual()

- -
-
- - - - - -
- - - - - - - -
mlx::core::NotEqual::NotEqual (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::NotEqual::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::NotEqual::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::NotEqual::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::NotEqual::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::NotEqual::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::NotEqual::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::NotEqual::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::NotEqual::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_not_equal.png b/docs/build/html/classmlx_1_1core_1_1_not_equal.png deleted file mode 100644 index 2067d9710fa43a18393232e768dc93f6d029c187..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 916 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GWjo-U3d6^w7^KI~g<#lxl^ zzvR^W|3{_=ad>j9-M#$w#Q zapyJLo=I$rdt>8om9N}o+!O3RVadGoo2wR=+?+7!+?K6ZPuIm~M?9S#6&+~;RDXDR zX!!-#ZRb+|26<1?E66ley?^~$rf_`r)m%l-^m`Yzq;HiaS;{Xl^*oyq_tAZ>hG%{6 zg-I&<3spViKrTJAdTQ~x%Zwj1^B6uGF2DBHZ0YqmQQcR2;wERgsx$rI)Me0L$ofEa z3&Wlkv4-gvm_7(aF~m7>AMnm#tU!|d!yIM#+(tgda~9n6b5Wj?{;at?f1T&|^BTX3 z{z*)_@`-n?y74+Ov9()fuUEg?^fvVSVXL^E!wZWuR3p+eq4EW>%+;fw&reoWf^O>WQlR?wsp^@-Fg-O{BqQCsXX&VVXy8h zcs}2l|3k2RMd z$=`feRkh%%O5%miNnZ-@{o(y{$$q|k^xsw2&aeGv|9_S0%k{!hlb)o;t({XmkFUYM zkaAl4cxf*EsW5ZqS+|UtGb=fDjg9r! zZ@qV=&c|L%H@*L!k+F4g>CeYeum6OdKJ%ujeCs8-0^60>^7Z%0Z!6jITJFyJd;dec zf8Tzet;<-pH6^V7)dscaJGS(dxlLVr^;6C5Gi#oEZp-RV3;yPOJ|Q+Z+WlR>!v2+^ z;U$&d45Htv{aYBe_m5I^?>6_>=gl{2{@k~XZMMaV9ox3ux}BD0o1Zb2H`jV&-l|V? zR$YC!cJte!iMR5@W3$q({`j_j&*#jArkkhDoY{QA$oR8RR9ae`*xD&Uv- - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::NumberOfElements Member List
-
-
- -

This is the complete list of members for mlx::core::NumberOfElements, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::NumberOfElementsvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::NumberOfElementsvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::NumberOfElementsvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
NumberOfElements(Stream stream, std::vector< int > axes, bool inverted, Dtype dtype)mlx::core::NumberOfElementsinlineexplicit
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::NumberOfElementsinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::NumberOfElementsinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::NumberOfElementsvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_number_of_elements.html b/docs/build/html/classmlx_1_1core_1_1_number_of_elements.html deleted file mode 100644 index 018531ce9..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_number_of_elements.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - -MLX: mlx::core::NumberOfElements Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::NumberOfElements Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::NumberOfElements:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 NumberOfElements (Stream stream, std::vector< int > axes, bool inverted, Dtype dtype)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ NumberOfElements()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::NumberOfElements::NumberOfElements (Stream stream,
std::vector< int > axes,
bool inverted,
Dtype dtype )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::NumberOfElements::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::NumberOfElements::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::NumberOfElements::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::NumberOfElements::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::NumberOfElements::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::NumberOfElements::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_number_of_elements.png b/docs/build/html/classmlx_1_1core_1_1_number_of_elements.png deleted file mode 100644 index 2364d3242ef674772f7577d13debc63a620692ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 991 zcmeAS@N?(olHy`uVBq!ia0vp^8-TcjgBeH`I80mvq@)9ULR|m<{|{uoc=NTi|Il&^ z1I+@7>1SR%c<=xyZhAIs2~du+B*-tA0mugfbEer>7#NtdJY5_^Dj46+eSPk=0uRe{ z*RDVR{A(_mG|Zh4y?>XL$2tj9@nkmkAH8#mWkJfo{#E=ghZ%A6j`Od1pZLT2`HU?}*iz+;w{+gSOZdN9^6W*W**i?nCPt zXWYmv3;DaErugf!+3x8ICxi3CBc9(6nc#CL`TB=4ssED;%IC{+t?xebMd_rnoxru- zzZV?(-CL^ZGpW2nFURa|8SndPN49RbH$$cJ;PFGHl{bPH#g*H+D)|~u{{KnSangTw zMW0FYS`0j^gbt~^JlS!`^0|!w!-GRC49bSHKA7;P+06Rz#(LVvf89$7#?_XFgK_Z5SSi+&a$7y$g|IxWAYMpkX11p>XY`I7pl9ZzPE1go6lc&Pkh2@ zFK*Yl!!#n^V(LvjajmOS^FD2F+1hpW!Ox>+@8+&u8a@Bz#Agqxl0V0B>np1j-Ous+ z>+y1p{;$Gkk>x6Pr!UEL7rnOETvSE)dyZC(NHj297VQ_l_g3k5lM| z=YFW_ycy2npbi>UO*@>G~Kh6XNPv%bTnCb0z|9;)I_x_sc-&)O{ z`?}wl^86w&jN+d^oar}7wod(z?EU+k^(Vhi_ij@8?+5eI8LEewmu4@^q>d97EgL#I z)D?A<9-WN)@sQ=-!?}KUZPw@Ri_^Kje)nlc-vjqsr~jCJ$aGsl_JMsLY#vWKuC>Ng zv)=ng)Usa-zM58Ulf50VYm@f}p^)F(ej7!}ZsgR@pL}B9%KhbSzgBR(Ixy?_m-Vu_ zR@JLzbGWYV42_U}#kI|-WZ!a?Oy5Z}(pr4iZC$nW((~H0R{uSA>qEY?AWZb zuJv}1@$A^QiPnGb&bwQ_=J|&--uFhcQm@#ny12M0w79z1a3%^0`a4Cq9GNWG8tj#+ b@Q*P)Wb?{5itP=+tjOT$>gTe~DWM4f - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Pad Member List
-
-
- -

This is the complete list of members for mlx::core::Pad, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Padvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Padvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Padvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Padvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Pad(Stream stream, const std::vector< int > &axes, const std::vector< int > &low_pad_size, const std::vector< int > &high_pad_size)mlx::core::Padinlineexplicit
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Padinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Padvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Padvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_pad.html b/docs/build/html/classmlx_1_1core_1_1_pad.html deleted file mode 100644 index 97fa86571..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_pad.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - -MLX: mlx::core::Pad Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Pad Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Pad:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Pad (Stream stream, const std::vector< int > &axes, const std::vector< int > &low_pad_size, const std::vector< int > &high_pad_size)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Pad()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::Pad::Pad (Stream stream,
const std::vector< int > & axes,
const std::vector< int > & low_pad_size,
const std::vector< int > & high_pad_size )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Pad::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Pad::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Pad::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Pad::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Pad::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Pad::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Pad::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_pad.png b/docs/build/html/classmlx_1_1core_1_1_pad.png deleted file mode 100644 index 13b64cbff9539015259689bb35502cdb3ba44dce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 874 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B+PJzX3_Dj46+eckuUfQL;z zUggR6`bWXLww&!v64+oFwYZ04?PEXL^zZtX&u!#WJZJS@n53e=P}MU|CdzZtpCzx; zx0KEN&*NEjfPIVKwH?8CuY29zy>_zF)3p+}uS=C(dCsx#USzOL<+Kfd-S>J0S^8~R zmpR2mqV(OTOWVAU&P|+W)U2{~PUz}0mqMJqUahQNJ@xOtYa33#&$@eSQIzUR8N0Qg zSnjS2yMK*;tIA70y|t^J-oE$B?Bm9;N*$Gz&n4H^I=`O0<2-w+Z;6KfH&Q)45+&jveVE63Gu9#(CW(8+&oOLlfXstyjL!A@%0q+dP z3Qk=H{e`R#RJSnfX%TCfeu3$OP!vNPl4QMu_VYQpki=Wav-8)+^rS0?UV%;8o7wDD8Z@)iy>L&et@>`Gc-C=f_ocHRdRPwJi z&7bruaJ`PcDF5EO630WYxA|*bzjjqCc~+K(r>*bScSqmty}Iw*?ybAz)|oE~$-1xL z`S*s|pA*(sw9X%&o5fqTdfRR3kDO~0PrqNB_4DB4b7mh+*M5qyxpd2Xi(TUHKRfQf z`4IT_nGgS#RZ2X5i&XZ`RsYXc_j3OE(_!*gtM0z~|1(_IbH5*TLul!gXU!>TX3`5& z)1IkrIdf)@&FZgDyw@y0b*Ag#sSlZJ>&{wly<~dZv}mr#&itb{fPu5fuKI)A_qesH zcb82&b1JYVHo41tyL@TP?&WD|w(qj0%K4g}ne??}Z|IBJGv|I{T)XMC_Wtu(xz)u% zYuD|ceb&s_`e`LJNo?%?9g;8Vo>w6By)ydR?as>go+ie>)!=SvnKpAKFf{~uWm^4X Z-12>HmaDA(T41hV@O1TaS?83{1OUy`u-E_q diff --git a/docs/build/html/classmlx_1_1core_1_1_partition-members.html b/docs/build/html/classmlx_1_1core_1_1_partition-members.html deleted file mode 100644 index 101ee7dc2..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_partition-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Partition Member List
-
-
- -

This is the complete list of members for mlx::core::Partition, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Partitionvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Partitionvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Partitionvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Partitionvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Partitioninlinevirtual
Partition(Stream stream, int kth, int axis)mlx::core::Partitioninlineexplicit
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Partitioninlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Partitionvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Partitionvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_partition.html b/docs/build/html/classmlx_1_1core_1_1_partition.html deleted file mode 100644 index 018687d23..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_partition.html +++ /dev/null @@ -1,472 +0,0 @@ - - - - - - - -MLX: mlx::core::Partition Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Partition Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Partition:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Partition (Stream stream, int kth, int axis)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Partition()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::Partition::Partition (Stream stream,
int kth,
int axis )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Partition::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Partition::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Partition::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Partition::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Partition::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Partition::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Partition::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Partition::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_partition.png b/docs/build/html/classmlx_1_1core_1_1_partition.png deleted file mode 100644 index 4259b6ba026b79860e910b79b230a581b9e7ee5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 888 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GW7o-U3d6^w7^zV3Uiz{A$g zzw*;>`;VEMc^e&qwrA~@S*z`~Q!+j2!@KyRbCq@{CYeYtRP~H=@}9KEV#_3zpPt+A zXT1CRC*9)`v)zJHqvLa5MQE?Rzim#4=KG@&{N6Xh=Ij3Wmg2eb>CU#P-DT63RL#k_ zdr2eH;MSe5YfGoDQa@}{%I0~iIBc!e>2*>;LH@h9f7^8by41T*&TD^f%SiKF)$YIg z-Gb(ZtD<=37XExkS`Dtxu%UbU-Tek>n^qZs0xxDR+|FjjEt zGUzX4eW1F9VNZ)#!}JSGAA}H+KbfN}pWDc%c+P^GUbR-mvu@gl%a$*{NvH0g_n*fz z>u1|F&m$L)ESehj`RS5b1^=&n-O!R7AK$c||68H`&21&$tG~`(ckt<=bGtKjD<@y+ zFH5UkUG?(sL5p=e&1-^fx33M8-MqSO%9YKluLb7ZjQ)MTa(meJ_S>y1rhbc`u%vDc z_r9mHSy%rS2CO}JFYE0ow;HGH9ZyeZZ2R+|G`;)BtgyRc{aa2oZIcZCOXRIl}xTi1mdSNX0Ioy+k+9cy@C2G%F`EkRzHb{=VIn+2oN(&C&>pE=X*{@U~7 z(#dDm$X$PJbmolQN6xhe=gjx6UnIPCOWoa~Al1F%$+kL)p|xHg#0spV`L6!Gy>;fz z3C3$vlZ;-wmqtv=-+rz174xp2>E2aQYpu?&lS(^TwQFyvt<5hTz^Hb4Ddy*m0xe)d$>T$a^~ntbhEru9ctUE|I7mA0HYv!`X+ o%$d_K7#V*yS|8@6>3iJ%!SmVsi{ckD0rLohr>mdKI;Vst05o;I;{X5v diff --git a/docs/build/html/classmlx_1_1core_1_1_power-members.html b/docs/build/html/classmlx_1_1core_1_1_power-members.html deleted file mode 100644 index 6bb8d6502..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_power-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Power Member List
-
-
- -

This is the complete list of members for mlx::core::Power, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Powervirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Powervirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Powerinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Powervirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Powerinlinevirtual
Power(Stream stream)mlx::core::Powerinlineexplicit
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Powerinlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Powervirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Powervirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_power.html b/docs/build/html/classmlx_1_1core_1_1_power.html deleted file mode 100644 index 7f1bd4ba4..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_power.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Power Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Power Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Power:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Power (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Power()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Power::Power (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Power::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Power::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Power::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Power::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Power::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Power::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Power::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Power::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_power.png b/docs/build/html/classmlx_1_1core_1_1_power.png deleted file mode 100644 index 7ae727a295912364d435a4d757bfc1ebac0c8d35..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 900 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GWto-U3d6^w7^zU^CVz~h>q zx8&8n|HAr9RW0O2g0~t+_NEtK5s@h_nDaLN$(+wM3X`AYw1|0Daq3R`^5}w>%1iaT z|J|~u|4g3ngfsp^)y89UUqxu=zTf8Ob1L0%Tfb?}`tx!%`!_GU@mVMFsrTNlC9?Wk z-eu0PkSNWo&b+N!oIc}tn!?Fx;a4|B&dQq5XI@-*QQ5@toFF|@bV`0 z7Ym|lqvvN$e8Q-=cGc6{_g^f8JG_sXe2kw0otv*quzW0KX zr~X3MNpViyDtphYo?3kFG9$zMM{EqA4VPbgYqs?IoT%=rJ#mw>j(V~%*e_&dh;!m* z*wZ4$P{FCo@Ifew;eqNFh6COij1AK-Ffr&OEBMJAW%=Aj{)CF9G|Yl8QJpG(*F4m} zzU23Pjo(J~Jd@V^W^CxlMj&CeJ&1!|s|v@O+^?aWyIt8@W|7&#b(*sV>-i zlI*j`a>;tO`>*6*IpZf+9i{vFVu-WXtCdx&OW!i7u6#Z@YTN1Up3759R9`k|N8P@+ zXGK`KQ`fb}@ujho_;xG^-CA=y`mWlwLa(5971@GVP?!jv-lO|k?t<=wC59g#D|^N{ tc~9EYGEJqDQ`hs;ri`UiE|vUYp160;?rBM1yn*?J!PC{xWt~$(699*qtVsX> diff --git a/docs/build/html/classmlx_1_1core_1_1_primitive-members.html b/docs/build/html/classmlx_1_1core_1_1_primitive-members.html deleted file mode 100644 index 0e781c800..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_primitive-members.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Primitive Member List
-
-
- -

This is the complete list of members for mlx::core::Primitive, including all inherited members.

- - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs)=0mlx::core::Primitivepure virtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs)=0mlx::core::Primitivepure virtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os)=0mlx::core::Primitivepure virtual
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_primitive.html b/docs/build/html/classmlx_1_1core_1_1_primitive.html deleted file mode 100644 index aa701ef61..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_primitive.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - - - - -MLX: mlx::core::Primitive Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Primitive Class Referenceabstract
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Primitive:
-
-
- - -mlx::core::Compiled -mlx::core::CustomVJP -mlx::core::Depends -mlx::core::DivMod -mlx::core::QRF -mlx::core::SVD -mlx::core::Split -mlx::core::UnaryPrimitive -mlx::core::fast::Custom - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs)=0
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
virtual void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs)=0
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual void print (std::ostream &os)=0
 Print the primitive.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Primitive() [1/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::Primitive::Primitive (Stream stream)
-
-inlineexplicit
-
- -
-
- -

◆ ~Primitive()

- -
-
- - - - - -
- - - - - - - -
virtual mlx::core::Primitive::~Primitive ()
-
-virtualdefault
-
- -
-
- -

◆ Primitive() [2/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::Primitive::Primitive (const Primitive & other)
-
-delete
-
- -
-
- -

◆ Primitive() [3/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::Primitive::Primitive (Primitive && other)
-
-delete
-
- -
-
-

Member Function Documentation

- -

◆ device()

- -
-
- - - - - -
- - - - - - - -
const Device & mlx::core::Primitive::device ()
-
-inline
-
- -

The device the primitive will run on.

- -
-
- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual void mlx::core::Primitive::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-pure virtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implemented in mlx::core::fast::RMSNorm, mlx::core::fast::RMSNormVJP, mlx::core::fast::LayerNorm, mlx::core::fast::LayerNormVJP, mlx::core::fast::RoPE, mlx::core::fast::ScaledDotProductAttention, mlx::core::UnaryPrimitive, mlx::core::Compiled, mlx::core::CustomVJP, mlx::core::Depends, mlx::core::DivMod, mlx::core::Split, mlx::core::QRF, and mlx::core::SVD.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual void mlx::core::Primitive::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-pure virtual
-
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
virtual bool mlx::core::Primitive::is_equivalent (const Primitive & other) const
-
-inlinevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented in mlx::core::fast::ScaledDotProductAttention, mlx::core::Abs, mlx::core::Add, mlx::core::AddMM, mlx::core::Arange, mlx::core::ArcCos, mlx::core::ArcCosh, mlx::core::ArcSin, mlx::core::ArcSinh, mlx::core::ArcTan, mlx::core::ArcTan2, mlx::core::ArcTanh, mlx::core::ArgPartition, mlx::core::ArgReduce, mlx::core::ArgSort, mlx::core::AsType, mlx::core::AsStrided, mlx::core::BitwiseBinary, mlx::core::BlockMaskedMM, mlx::core::BlockSparseMM, mlx::core::Broadcast, mlx::core::Ceil, mlx::core::Compiled, mlx::core::Concatenate, mlx::core::Conjugate, mlx::core::Convolution, mlx::core::Copy, mlx::core::Cos, mlx::core::Cosh, mlx::core::Divide, mlx::core::DivMod, mlx::core::Select, mlx::core::Remainder, mlx::core::Equal, mlx::core::Erf, mlx::core::ErfInv, mlx::core::Exp, mlx::core::FFT, mlx::core::Floor, mlx::core::Full, mlx::core::Gather, mlx::core::Greater, mlx::core::GreaterEqual, mlx::core::Less, mlx::core::LessEqual, mlx::core::Log, mlx::core::LogicalNot, mlx::core::LogicalAnd, mlx::core::LogicalOr, mlx::core::LogAddExp, mlx::core::Matmul, mlx::core::Maximum, mlx::core::Minimum, mlx::core::Multiply, mlx::core::Negative, mlx::core::NotEqual, mlx::core::NumberOfElements, mlx::core::Pad, mlx::core::Partition, mlx::core::Power, mlx::core::QuantizedMatmul, mlx::core::BlockSparseQMM, mlx::core::RandomBits, mlx::core::Reshape, mlx::core::Reduce, mlx::core::Round, mlx::core::Scan, mlx::core::Scatter, mlx::core::Sigmoid, mlx::core::Sign, mlx::core::Sin, mlx::core::Sinh, mlx::core::Slice, mlx::core::SliceUpdate, mlx::core::Softmax, mlx::core::Sort, mlx::core::Split, mlx::core::Square, mlx::core::Sqrt, mlx::core::StopGradient, mlx::core::Subtract, mlx::core::Tan, mlx::core::Tanh, mlx::core::Uniform, and mlx::core::Transpose.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
virtual std::vector< array > mlx::core::Primitive::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-virtual
-
-
- -

◆ operator=() [1/2]

- -
-
- - - - - -
- - - - - - - -
Primitive & mlx::core::Primitive::operator= (const Primitive & other)
-
-delete
-
- -
-
- -

◆ operator=() [2/2]

- -
-
- - - - - -
- - - - - - - -
Primitive & mlx::core::Primitive::operator= (Primitive && other)
-
-delete
-
- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
virtual std::vector< std::vector< int > > mlx::core::Primitive::output_shapes (const std::vector< array > & inputs)
-
-virtual
-
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
virtual void mlx::core::Primitive::print (std::ostream & os)
-
-pure virtual
-
- -

Print the primitive.

- -

Implemented in mlx::core::Abs, mlx::core::Add, mlx::core::AddMM, mlx::core::Arange, mlx::core::ArcCos, mlx::core::ArcCosh, mlx::core::ArcSin, mlx::core::ArcSinh, mlx::core::ArcTan, mlx::core::ArcTan2, mlx::core::ArcTanh, mlx::core::ArgPartition, mlx::core::ArgReduce, mlx::core::ArgSort, mlx::core::AsType, mlx::core::AsStrided, mlx::core::BitwiseBinary, mlx::core::BlockMaskedMM, mlx::core::BlockSparseMM, mlx::core::Broadcast, mlx::core::Ceil, mlx::core::Compiled, mlx::core::Concatenate, mlx::core::Conjugate, mlx::core::Convolution, mlx::core::Copy, mlx::core::Cos, mlx::core::Cosh, mlx::core::CustomVJP, mlx::core::Depends, mlx::core::Divide, mlx::core::DivMod, mlx::core::Select, mlx::core::Remainder, mlx::core::Equal, mlx::core::Erf, mlx::core::ErfInv, mlx::core::Exp, mlx::core::Expm1, mlx::core::FFT, mlx::core::Floor, mlx::core::Full, mlx::core::Gather, mlx::core::Greater, mlx::core::GreaterEqual, mlx::core::Less, mlx::core::LessEqual, mlx::core::Load, mlx::core::Log, mlx::core::Log1p, mlx::core::LogicalNot, mlx::core::LogicalAnd, mlx::core::LogicalOr, mlx::core::LogAddExp, mlx::core::Matmul, mlx::core::Maximum, mlx::core::Minimum, mlx::core::Multiply, mlx::core::Negative, mlx::core::NotEqual, mlx::core::NumberOfElements, mlx::core::Pad, mlx::core::Partition, mlx::core::Power, mlx::core::QuantizedMatmul, mlx::core::BlockSparseQMM, mlx::core::RandomBits, mlx::core::Reshape, mlx::core::Reduce, mlx::core::Round, mlx::core::Scan, mlx::core::Scatter, mlx::core::Sigmoid, mlx::core::Sign, mlx::core::Sin, mlx::core::Sinh, mlx::core::Slice, mlx::core::SliceUpdate, mlx::core::Softmax, mlx::core::Sort, mlx::core::Split, mlx::core::Square, mlx::core::Sqrt, mlx::core::StopGradient, mlx::core::Subtract, mlx::core::Tan, mlx::core::Tanh, mlx::core::Uniform, mlx::core::Transpose, mlx::core::QRF, mlx::core::SVD, mlx::core::Inverse, and mlx::core::Cholesky.

- -
-
- -

◆ stream()

- -
-
- - - - - -
- - - - - - - -
const Stream & mlx::core::Primitive::stream ()
-
-inline
-
- -

The stream the primitive will run on.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
virtual std::vector< array > mlx::core::Primitive::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-virtual
-
- -

The vector-Jacobian product.

- -

Reimplemented in mlx::core::CustomVJP, mlx::core::Depends, mlx::core::fast::Custom, mlx::core::fast::RMSNorm, mlx::core::fast::LayerNorm, mlx::core::fast::RoPE, mlx::core::Abs, mlx::core::Add, mlx::core::AddMM, mlx::core::ArcCos, mlx::core::ArcCosh, mlx::core::ArcSin, mlx::core::ArcSinh, mlx::core::ArcTan, mlx::core::ArcTan2, mlx::core::ArcTanh, mlx::core::AsType, mlx::core::AsStrided, mlx::core::BlockMaskedMM, mlx::core::BlockSparseMM, mlx::core::Broadcast, mlx::core::Ceil, mlx::core::Compiled, mlx::core::Concatenate, mlx::core::Convolution, mlx::core::Copy, mlx::core::Cos, mlx::core::Cosh, mlx::core::Divide, mlx::core::DivMod, mlx::core::Select, mlx::core::Remainder, mlx::core::Equal, mlx::core::Erf, mlx::core::ErfInv, mlx::core::Exp, mlx::core::Expm1, mlx::core::FFT, mlx::core::Floor, mlx::core::Full, mlx::core::Gather, mlx::core::Greater, mlx::core::GreaterEqual, mlx::core::Less, mlx::core::LessEqual, mlx::core::Log, mlx::core::Log1p, mlx::core::LogicalNot, mlx::core::LogicalAnd, mlx::core::LogicalOr, mlx::core::LogAddExp, mlx::core::Matmul, mlx::core::Maximum, mlx::core::Minimum, mlx::core::Multiply, mlx::core::Negative, mlx::core::NotEqual, mlx::core::Pad, mlx::core::Partition, mlx::core::Power, mlx::core::QuantizedMatmul, mlx::core::BlockSparseQMM, mlx::core::Reshape, mlx::core::Reduce, mlx::core::Round, mlx::core::Scan, mlx::core::Scatter, mlx::core::Sigmoid, mlx::core::Sign, mlx::core::Sin, mlx::core::Sinh, mlx::core::Slice, mlx::core::SliceUpdate, mlx::core::Softmax, mlx::core::Sort, mlx::core::Split, mlx::core::Square, mlx::core::Sqrt, mlx::core::Subtract, mlx::core::Tan, mlx::core::Tanh, and mlx::core::Transpose.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Primitive::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-virtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented in mlx::core::fast::Custom, mlx::core::Abs, mlx::core::Add, mlx::core::AddMM, mlx::core::ArcCos, mlx::core::ArcCosh, mlx::core::ArcSin, mlx::core::ArcSinh, mlx::core::ArcTan, mlx::core::ArcTan2, mlx::core::ArcTanh, mlx::core::ArgPartition, mlx::core::ArgReduce, mlx::core::ArgSort, mlx::core::AsType, mlx::core::BitwiseBinary, mlx::core::Broadcast, mlx::core::Ceil, mlx::core::Compiled, mlx::core::Concatenate, mlx::core::Conjugate, mlx::core::Copy, mlx::core::Cos, mlx::core::Cosh, mlx::core::Divide, mlx::core::DivMod, mlx::core::Select, mlx::core::Remainder, mlx::core::Equal, mlx::core::Erf, mlx::core::ErfInv, mlx::core::Exp, mlx::core::Expm1, mlx::core::FFT, mlx::core::Floor, mlx::core::Full, mlx::core::Gather, mlx::core::Greater, mlx::core::GreaterEqual, mlx::core::Less, mlx::core::LessEqual, mlx::core::Log, mlx::core::Log1p, mlx::core::LogicalNot, mlx::core::LogicalAnd, mlx::core::LogicalOr, mlx::core::LogAddExp, mlx::core::Matmul, mlx::core::Maximum, mlx::core::Minimum, mlx::core::Multiply, mlx::core::Negative, mlx::core::NotEqual, mlx::core::NumberOfElements, mlx::core::Pad, mlx::core::Partition, mlx::core::Power, mlx::core::QuantizedMatmul, mlx::core::BlockSparseQMM, mlx::core::RandomBits, mlx::core::Reshape, mlx::core::Reduce, mlx::core::Round, mlx::core::Scan, mlx::core::Sigmoid, mlx::core::Sign, mlx::core::Sin, mlx::core::Sinh, mlx::core::Slice, mlx::core::SliceUpdate, mlx::core::Softmax, mlx::core::Sort, mlx::core::Split, mlx::core::Square, mlx::core::Sqrt, mlx::core::StopGradient, mlx::core::Subtract, mlx::core::Tan, mlx::core::Tanh, mlx::core::Uniform, mlx::core::Transpose, mlx::core::SVD, mlx::core::Inverse, and mlx::core::Cholesky.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_primitive.png b/docs/build/html/classmlx_1_1core_1_1_primitive.png deleted file mode 100644 index 515b36a662977995aa06baedae2bf65ed90237d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3642 zcmdT{YgAKL8Vzc35RuN8>R>Cd*EP*S0L577y?6FuZ@a@(EuW&nERiXgC6XUOK#16g`5+yc7KC?uZO4P5*dG znQXRG*c_`1M<|Y*8i%8Y3@okj7kh#VZ1j4USXf~kqLbVCh z9DNvA<63?WZe#FnQ<*Wn9^;wD&T2hVsU$o-nD3&Nl_o`S7K4_;oU>sQw}%qGnyoa3vnHi4eca;nnKtt?p06p z(%HCJKlJEjBa!cWAe!nr*p@kEKxezLGbf~bp&6U>vV^eu${=XNi5y`Y4zFKF76m_M zlL_nv966_bC`lWUZr2pabOekP$SDY_s~{xQR&q{h>H+;zt=tdX%@&DR(1!5Qiv_7W z;!9YXIcC4gF7AM|h*}(^J3@3WQV$+NN&RrIE~O2Xt9+JZrQiyyt(vKC6vNkil-I&5 z7CnboeY`Q{JP%*K(y2l$qL$yVho%=ads<_J)By?KPFv>awZT4h<9e-nXV}~>LN9Z( zfAQ0_9z%<2{n4`;rC~J4F}2a<5aFLHyjJ2KL3QZXGxmd0<>X$;eNO3(jz-k0-N*_m0HNY=-32h9OQ&it3lyk4$JTVuyXT+*`dad&A@OEr=!qH9GsPA~ZO6BQ}8%`g%bhj?}7GI(Lq$2vE zhn5JAen#va?@-^?5!u@O@`@_j@B=WlFL&GO{<_ToX^?{B8V61SKDN=ambsD~xw`k* zb?#)-GVD@Dc49tEaWe#>lPwc7e~sv$T~h{lZY6h!r0i6Fx)u;B3?r?;+3niSkfuvp z9Vp6rk8y*B-c=Bx+rY5Mai*&0yLD0{kI=q?{iKcTZnC43TUJz>11hWce?#?#G^PJE z;Mg%ey`tfuJ|>(|`)W;FW!BO`FS@ysS5)7VK5uTJ{6c+eY(kZw>m#?TPB74Y$+6QH zw4WDtJW?gt{%8GzX8NX<>S7-AAegthXxtj_c2@deSTHdgn?6~*3of+ICk=!onl z4fKF|PD3O-9IWZ8Y0KBFrJ{_hm-U2)8jCX|*WyiJz$#>0rBV826vhUkKvMQ>bG&Y% ztK~Vsw1ENzXkUmF%>|qyMsq$e;I*=TDrR1VP76#Y0sVv4=2pvhnj~+>#1ggmxt|HQ4-smt z6iwu1JNvA@j8Jdv^+uyBdcGvXxR3PhHZ;% zBmGhT|J}MUd27)?GhhQXR$oIOd9|ivaf_p=S4|e_xZ5T$1 z1o+q}@rsI}XFSPn9^eB&O zYKw$oeTf#?31@*;E}5(6z1+f!NS0(R%G3}nQ|U1)Gc<1?N&PM)75F7pc868j2_=OC z?+aO3swoc$Gch_Otme393qqMP$`57SH+|fCpKTn-U!v_m3Ef4`+D@V!bSn(ji<->WS0F|2{qtcUBnuX4R8I^PO2SRZF3)xoE) z>bzLN2Q3^vnHv);k7!3fg1M}_27jEZWqp6fa3B%bad)?mp1dO-QeyG0tOk>?+VnU@ z(YKkk102$RjV>LB18}qCn*ulhyJe4&wDj&7*~kx#hNt6K3FMT~Qo^tOIWErDfllB5xgh#)2dHCKlxw24>$Y( diff --git a/docs/build/html/classmlx_1_1core_1_1_q_r_f-members.html b/docs/build/html/classmlx_1_1core_1_1_q_r_f-members.html deleted file mode 100644 index b7b810ed1..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_q_r_f-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::QRF Member List
-
-
- -

This is the complete list of members for mlx::core::QRF, including all inherited members.

- - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::QRFvirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::QRFvirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::QRFinlinevirtual
QRF(Stream stream)mlx::core::QRFinlineexplicit
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_q_r_f.html b/docs/build/html/classmlx_1_1core_1_1_q_r_f.html deleted file mode 100644 index f65f45b1e..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_q_r_f.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - -MLX: mlx::core::QRF Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::QRF Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::QRF:
-
-
- - -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 QRF (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
void print (std::ostream &os) override
 Print the primitive.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ QRF()

- -
-
- - - - - -
- - - - - - - -
mlx::core::QRF::QRF (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::QRF::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::QRF::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::QRF::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_q_r_f.png b/docs/build/html/classmlx_1_1core_1_1_q_r_f.png deleted file mode 100644 index 29056e86a6af766743e90c1c5ee33e33ffd857c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 520 zcmeAS@N?(olHy`uVBq!ia0vp^B|sd&!3-q-S1vRKQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=E8uJzX3_Dj46+W$asRz~gdU zc;&3$^M43OHSs3ioTj$sOK@rncVGOQGmI00y!N)bOsX|qpmNivo+V4=XLaPitKa-S z7EesMQu>0wy3b2=h3@lN%-bJcJ@IMAJqy#`@+gQOlBwbzn`#tceU$>fRx5o zzm%X0+k)$tPZB8=eYLu6+v7@=ouzDFjjdjkyk30zF|XULdoTHF&hCxQkSs09@ANMI u`96KFS5PqT3Ki4KAgk}Pni{`eQ~x$2aas_w<8@%1F?hQAxvX - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::QuantizedMatmul Member List
-
-
- -

This is the complete list of members for mlx::core::QuantizedMatmul, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::QuantizedMatmulvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::QuantizedMatmulvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::QuantizedMatmulvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::QuantizedMatmulvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::QuantizedMatmulinlinevirtual
QuantizedMatmul(Stream stream, int group_size, int bits, bool transpose)mlx::core::QuantizedMatmulinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::QuantizedMatmulvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::QuantizedMatmulvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_quantized_matmul.html b/docs/build/html/classmlx_1_1core_1_1_quantized_matmul.html deleted file mode 100644 index dcd295798..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_quantized_matmul.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - -MLX: mlx::core::QuantizedMatmul Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::QuantizedMatmul Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::QuantizedMatmul:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 QuantizedMatmul (Stream stream, int group_size, int bits, bool transpose)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ QuantizedMatmul()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::QuantizedMatmul::QuantizedMatmul (Stream stream,
int group_size,
int bits,
bool transpose )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::QuantizedMatmul::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::QuantizedMatmul::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::QuantizedMatmul::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::QuantizedMatmul::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::QuantizedMatmul::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::QuantizedMatmul::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::QuantizedMatmul::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_quantized_matmul.png b/docs/build/html/classmlx_1_1core_1_1_quantized_matmul.png deleted file mode 100644 index 6b7d0c3461c419ee15f44d7df60a7ff9e16ef71b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 975 zcmeAS@N?(olHy`uVBq!ia0vp^OM$q9gBeI}JboKUGDrvbgt-3y{~ySF@#br3|Doj; z2ATyD)6cwk@ZbSZ-1KbN5}+JsNswPK1CS2}=1jA%FfcGjdAc};R4~4s`@e6C0*|Zy z^ps2A>mQw;e}k!S*X6laYwi{-;%4n@J$L_v<@4LkK9kJVbv!S%Z&2}+KNqbw$;Mym ze^qh&_ni};c-Ec&baqa+_uLIWuc!O#XSJ(_zE0-4y=gmZzw%|F+g8pIKaZbNI>~o@ z+T&F|Z%lSieHYaq(pz%Ne^3p97ob>|6Ws(>>2BC12zCH-V2;em-we z_539;P35I?#H1zs{Tt6%KHtsEaBdI7gKsv6K7FlfdZw(yev&=I?yymo48tA{Z-x(w zI*bR}H?T0s9};4y!7uPH{`8#UeYPi5DvJ+IQmN(ep7bU0y3xcZmCHVCFTV8SdUS2Y zd}+^bKNmfn-Ld#=*6A&E*S{=!rr#MMAADolY#|$-D}|r4ZWnpazn96O_y0y|xz6%j zp_^vAC%g;dJMCb9?n`O;rQ-X~g8Wy4f+J+-oo?OloBr*J-XkaFl>slk57C0CHL*L@40(+@!gIL z*)JyRJ$dqDDRs|sy?@^(EqN+EP2Rii@TcOF@8?)}*13QJE75b39nUn&=QZUF2WE;h z+?nSdu`ka5LQTt4g`W&((<9t^nH$6tIT`F)R2hB-I61eIXm=1Y}Q<>B2FE_ zvU^`NEDf2DF3Qf_QnhoEO45y!sf$C->hqTtDXq+$AN8tgquJ|%_4RX?yPv94`}$m` zH1XY&O?vab9kHJFw*0D>I4}gSeBWevl|3t1)pJ|g*IQDaN~PARJLk5oEDSw*+i~6Z zl(`$?b_JcEE495m<6oe`^mWOaN=4C!f?STYZx9jusHo%WQd7~B>ZN&iZoNL=3a_tE RjgNt{sHdx+%Q~loCIA&l&Po6P diff --git a/docs/build/html/classmlx_1_1core_1_1_random_bits-members.html b/docs/build/html/classmlx_1_1core_1_1_random_bits-members.html deleted file mode 100644 index fbd98bb2c..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_random_bits-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::RandomBits Member List
-
-
- -

This is the complete list of members for mlx::core::RandomBits, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::RandomBitsvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::RandomBitsvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::RandomBitsvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::RandomBitsinlinevirtual
RandomBits(Stream stream, const std::vector< int > &shape, int width)mlx::core::RandomBitsinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::RandomBitsvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_random_bits.html b/docs/build/html/classmlx_1_1core_1_1_random_bits.html deleted file mode 100644 index 08a208df6..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_random_bits.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - -MLX: mlx::core::RandomBits Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::RandomBits Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::RandomBits:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 RandomBits (Stream stream, const std::vector< int > &shape, int width)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ RandomBits()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::RandomBits::RandomBits (Stream stream,
const std::vector< int > & shape,
int width )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::RandomBits::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::RandomBits::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::RandomBits::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::RandomBits::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::RandomBits::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_random_bits.png b/docs/build/html/classmlx_1_1core_1_1_random_bits.png deleted file mode 100644 index 59b478af106299b15f4fc209fce70504a5768320..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 920 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GW5o-U3d6^w7^zRmlrz~jcx zAN2J1{zvA%pBWpMK2ug-Ok#cljfKF z|MJc6dcUHl{|~mc-L~%no=0WYZvVN6W2Z{;-&xb&{=6xE|NR-oZx)v~y>;K~9b~Du zGE0U#ein45%KJqj7lXRTa7n8cWr|3l6lq*5kuLXX4zI9h<-KwoqT(<(%*F>eV z&rMma`+9lQq>?7@)mlH3b4}ZS#H`NY_ROku&9=UXW$NTT zX-~^El}b)s&re3{!p>RpvmaQ#gR$rMjHvCmC&VRZ`GzT1@vah`%ke;c3&Wlkv4-gv zm_7(aF~m7>AMnm#tl-pT&|k>I$At!3V%TY>L&mUp%5ng4pdYUjJjr}ma^J7wCQo-=pt-K^I?tma?K%GzPq z5%ls0n`hSXst46~)`i`aSHJn{N?7i8(MQ}-cPHI<3;i_rc&zNB>ZsIco6EQOw!GW$ zwrYR9#Y5ZM?epGcgnGUxS)@`sNBlqAzYF&Bx3Aq7`nq=Y|L5^rRsLFmJag>oDa+>% z8GeYEH++-`eqAPgDcfi5$t;)kj$0QAGyWkactBzIuOZA!vzPtknH&?R(`U|jXUv>g zX?eXWu>768@#eO3Z+2BYN;!Xgi{JMzTfS8;4~vRV+^4Zk_hiKWXQ{4r+m2?-U3>cV ziBz@k)tbe=#j8!(ebU})G@rY;ZRJ;ku9JV=Om`kN^ZshExwd3eXqC*S#A$1mu3Y;} zw@*Lddf59Z`xk|V{j4+VFWz}=)x0NGE}KL8Pv@9!Eq#`Ja#f)HgQ?DIy#7T*pH-Zf z`E}I?@2#O*VwMYc|I?ap;;;AidRfx)Z8dW<(!Tv}nKpCg^b1DDpM|2*(trWurMdLs a4|dzqSq3|FZ=V9@AqG!ZKbLh*2~7aXhR6p1 diff --git a/docs/build/html/classmlx_1_1core_1_1_reduce-members.html b/docs/build/html/classmlx_1_1core_1_1_reduce-members.html deleted file mode 100644 index 0d81bee6f..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_reduce-members.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Reduce Member List
-
-
- -

This is the complete list of members for mlx::core::Reduce, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
And enum valuemlx::core::Reduce
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Reducevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Reducevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Reducevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
Max enum valuemlx::core::Reduce
Min enum valuemlx::core::Reduce
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
Or enum valuemlx::core::Reduce
output_shapes(const std::vector< array > &inputs) overridemlx::core::Reducevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Reduceinlinevirtual
Prod enum valuemlx::core::Reduce
Reduce(Stream stream, ReduceType reduce_type, const std::vector< int > &axes)mlx::core::Reduceinlineexplicit
ReduceType enum namemlx::core::Reduce
stream()mlx::core::Primitiveinline
Sum enum valuemlx::core::Reduce
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Reducevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Reducevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_reduce.html b/docs/build/html/classmlx_1_1core_1_1_reduce.html deleted file mode 100644 index 40838cb85..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_reduce.html +++ /dev/null @@ -1,472 +0,0 @@ - - - - - - - -MLX: mlx::core::Reduce Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Reduce Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Reduce:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - -

-Public Types

enum  ReduceType {
-  And -, Or -, Sum -, Prod -,
-  Min -, Max -
- }
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Reduce (Stream stream, ReduceType reduce_type, const std::vector< int > &axes)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Member Enumeration Documentation

- -

◆ ReduceType

- -
-
- - - - - - - -
Enumerator
And 
Or 
Sum 
Prod 
Min 
Max 
- -
-
-

Constructor & Destructor Documentation

- -

◆ Reduce()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::Reduce::Reduce (Stream stream,
ReduceType reduce_type,
const std::vector< int > & axes )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Reduce::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Reduce::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Reduce::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Reduce::output_shapes (const std::vector< array > & inputs)
-
-overridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Reduce::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Reduce::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Reduce::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_reduce.png b/docs/build/html/classmlx_1_1core_1_1_reduce.png deleted file mode 100644 index 3c46700dbf54fb2d8ebfbe8738d00178b38a3c6c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 895 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GU%o-U3d6^w7^=Jqc(;9*nu zUvldIe{uO#?kBvjzU|s=Id^r>tfpkP<2V0$owGd89yuvZd5g+P?+njL;_YFRRP0~= zlUy77EZ%w2ybrul;@Njrp4)oqTi)v>9zQjXecRe5`_;1Pefc#J_j#&0{{z=g3hCos zTP>x^>o#}yo-J>K3e#sSKcnEO8-7)5v&q#7ld4|b%Sx?}%f9h+c~t+l6=9xQ?f$E6 z9M!MBy8UbAG?lpzF0G2%_jYZb@citl$DJls#a+B*zQwNdcTK=GmC(giN4NVeQu!;j zP}MWe$$QeCmT4-LGsCr?&som=Aovc$vt+-uw{yMLTW%FwExA|iYS(0r2kKiG_OysK zOuxYNK`4qL&WZbgcLrkxr!Is3Le>YW2+2?K8BgbYu9={kX$CX-<PhC`YCnYgTMQY z-Y?wx%s0sX)zqg;A1&;ce!Sz=tq-10Z|#ao^$F(HT)BMZwa7R3qTjx*iCX>oVU@Di z(r>(zuJq>~?%(6Q_EXKAkn9W5TkqcM(9htFu9FWv%`aEJwex-E)Z>q4UfZ|uE9dR! z$N#3a_h*@>S1kw?O)L;neffCL5AzT0|9L-*>i2l`Lg|c{krb-C*{OvM+DBdt?0KF+S+~g3|mZ= z?#pdGC)db)Ek5PlFJBrX8>DAuEL{-0_R`{&ZIPSit=itEbT-L&GvoYATD$k`w7B-F z|EP78`=QHOrF%nIs(RbD6eGQAZHr_0_KJ%?~)chm0aocNZh5Fa; ux9Lnv+wTH*;KJ0jXQ^>(rv%OFvu~81!@5YVf*qJu7(8A5T-G@yGywqcmb0e- diff --git a/docs/build/html/classmlx_1_1core_1_1_remainder-members.html b/docs/build/html/classmlx_1_1core_1_1_remainder-members.html deleted file mode 100644 index e2fefec65..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_remainder-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Remainder Member List
-
-
- -

This is the complete list of members for mlx::core::Remainder, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Remaindervirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Remaindervirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Remainderinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Remaindervirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Remainderinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Remainderinlinevirtual
Remainder(Stream stream)mlx::core::Remainderinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Remaindervirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Remaindervirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_remainder.html b/docs/build/html/classmlx_1_1core_1_1_remainder.html deleted file mode 100644 index f0fc852ce..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_remainder.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Remainder Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Remainder Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Remainder:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Remainder (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Remainder()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Remainder::Remainder (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Remainder::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Remainder::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Remainder::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Remainder::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Remainder::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Remainder::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Remainder::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Remainder::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_remainder.png b/docs/build/html/classmlx_1_1core_1_1_remainder.png deleted file mode 100644 index 898cd6373753c3bfca950f19c754d686cb8c04dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 917 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GT)o-U3d6^w7^KAf~!fyY&U z`b@uj|2yrsa&azLHaBm2zM1u$K*2|fEpOwW%=uiSF!@PNir|zULk1lwryi{LX zzj){AzndpM;k92-YIt1sRgAW5_U*io6Sk7aQ>DW`2eYrw-zH#s&S;IzjYyT!-4~(` z8x&s1$+=tlW>S@L&tl~XDW^lXl}u5SPD$!tyEg3G@2JCC_E&G6K6FNDwNQT9^U}Df;$jT7s z#Lcj$MU0_>QB5 zzs$S#-LaSUjM}%b)bLSG(nYWKpJj{H-gw*U-QKY4mr+IK#lC8{)epbf{au<`PftcH+o9wdnL@@7%4Ye{Km2KU}7~C1`h( z%eS{TK1h|XSbF}r=Qg&jsc*d$_bo8h`FY9bB)?tx*3S2tFOv(GhniiPx1lKhzPWYG z=DTxVHcsmN+7tGT!BSK!+3YyZukpEc=EsZ+Pg-ZQJG7N5J!$T0sA zBg1FI<<}k?F1V zYu(3g3knHJCdbDf|F`0rc5&Qwuh(<7R__iJ{FWj!J$J?_f5|^@bP`W}zO}V{Md9)E zysg`AdM?R-wW)StnP}^+m4{@MU)@lf(DB0T+_Y~Qn-nK4IesPVy;WR<_=Do8U8iRI z$u72=U2-k8qa&|8s&w!2o3FA~`%X9+S8TcRpR{i9r{+7ieRHy2d!4>At)t`U@=)`` zb6l!V{F=Pt`O8P|{T6j}DAv`uxa?^G%1*x^B=}JX#} diff --git a/docs/build/html/classmlx_1_1core_1_1_reshape-members.html b/docs/build/html/classmlx_1_1core_1_1_reshape-members.html deleted file mode 100644 index 77ec832ed..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_reshape-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Reshape Member List
-
-
- -

This is the complete list of members for mlx::core::Reshape, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Reshapevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Reshapevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Reshapevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Reshapevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Reshapeinlinevirtual
Reshape(Stream stream, const std::vector< int > &shape)mlx::core::Reshapeinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Reshapevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Reshapevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_reshape.html b/docs/build/html/classmlx_1_1core_1_1_reshape.html deleted file mode 100644 index c495d9df9..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_reshape.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - -MLX: mlx::core::Reshape Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Reshape Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Reshape:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Reshape (Stream stream, const std::vector< int > &shape)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Reshape()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::Reshape::Reshape (Stream stream,
const std::vector< int > & shape )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Reshape::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Reshape::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Reshape::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Reshape::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Reshape::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Reshape::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Reshape::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_reshape.png b/docs/build/html/classmlx_1_1core_1_1_reshape.png deleted file mode 100644 index 1c30abb02f8afafc67a857ffd76cf9025c6a10e6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 910 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GVYo-U3d6^w7^UhI3Uz~ibf zzVg%m`j5*@6wM|aS$jz`>~Un@Bmrl>V>$5?i_d*-^qI6-FiPd6>K2bn-Okz*m(2h2 zN4humU3{;K{*R_>Cndgz9FNM3j@}sSZ{xKtITt+ZiYQAVhk0W zx(pwLq8J{iZecj!ox#{J{Q?t%{z6uUIAjH%*tZm&tF)WoS!4#Yb~iZs)d^m|MOF#B zp3I)S - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Round Member List
-
-
- -

This is the complete list of members for mlx::core::Round, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Roundvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Roundvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Roundinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Roundvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Roundinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Roundinlinevirtual
Round(Stream stream)mlx::core::Roundinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Roundvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Roundvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_round.html b/docs/build/html/classmlx_1_1core_1_1_round.html deleted file mode 100644 index 61f17205c..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_round.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Round Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Round Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Round:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Round (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Round()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Round::Round (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Round::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Round::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Round::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Round::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Round::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Round::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Round::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Round::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_round.png b/docs/build/html/classmlx_1_1core_1_1_round.png deleted file mode 100644 index b24499cb7318ebbba97ad65dbc2da147727e43fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 881 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B+vJY5_^Dj46+eckuUfQL;z zUggR6`bWWD`kqw>H?*F;D3$7xAzS{+Vt4&X%jf?Tyo2&vrm0kN>Uw^9bir%V6ZO0H z)!FSolRYj8+bt;FbZqXc2<@})&HTEi1RFkEZZ zZBWnSx$0-zHP0g#54mceefD@sgu&ide@xrf=I>|WH@~&ReVggslC?FL1or&V_`EJE z`JPIy``%4^LTpNQZIlm>yx@)(-6zmmT8uXjZ z^HyKw;p=;LM?L*%vErIv{?#&X<$Vjb-u`rYMO5AM!t~ic=7m-2%*)i3j+(zAb>F@G zvWm53#mmaKtWtV2$HjBk9P$5bbuZ_iza1ujwd($>|3AZZJ@@-%cutyLw-x9$Yld}? z*e=M|X5Gz;t@^ssG~(-vt1H9ixG>nG1_bU-*YoD-6D2Vr*>vpmM8M|1znxliNb}Ud_0wpPaVs{M4w_>E`R^Uzzp&*^;Q)_kQgO zyZR|NKi8~q@zpK&uST72yQaR;ro{F1`ogoEJ72t?HuL6p4qano{e`J%&s4XZIkV@> fYM@i^e&m1pVNOldgTe~DWM4f6qmMw diff --git a/docs/build/html/classmlx_1_1core_1_1_s_v_d-members.html b/docs/build/html/classmlx_1_1core_1_1_s_v_d-members.html deleted file mode 100644 index 034664345..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_s_v_d-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::SVD Member List
-
-
- -

This is the complete list of members for mlx::core::SVD, including all inherited members.

- - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::SVDvirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::SVDvirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::SVDinlinevirtual
stream()mlx::core::Primitiveinline
SVD(Stream stream)mlx::core::SVDinlineexplicit
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::SVDvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_s_v_d.html b/docs/build/html/classmlx_1_1core_1_1_s_v_d.html deleted file mode 100644 index 86fe0bf9d..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_s_v_d.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - -MLX: mlx::core::SVD Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::SVD Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::SVD:
-
-
- - -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 SVD (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ SVD()

- -
-
- - - - - -
- - - - - - - -
mlx::core::SVD::SVD (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::SVD::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::SVD::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::SVD::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::SVD::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_s_v_d.png b/docs/build/html/classmlx_1_1core_1_1_s_v_d.png deleted file mode 100644 index 428bbfa87a55b0f396c4a0078a822bf30cd49d9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 520 zcmeAS@N?(olHy`uVBq!ia0vp^B|sd&!3-q-S1vRKQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=E8uJzX3_Dj46+P0Vjo;AvU! z{^{Aj|N8T+8k;P>?`rfucF1>Gu6$J9eL*LV#jOsLl1&$?-1Mzy$x``Qd-K=jQ?cLX zcdK~+mHFj*E^;Ny){1qxkA=RuJxb<2z4z&ZucyP5u16laByXqfd|g3Gdi9wv>mU8O zGd)c|wjE4$w|xO|#XesO)~JnZcpRBgSy&3O9q>Yt9$1 zzcPH~d~ry|zn0}!{~hav3>W-`xft%602#hm8RAC9(z-KLdat&41)2Y~eX;v_Wbe#N z)9%j>R$X~1-)Z}YsZ$rIyG8|cbKX9-^zHM${=G9FOD6B`)H}IetwdA&pxV!;a@jrA zqWAB#ZR2{HGdbk++;WC52~%x;{=V>}`?DXv+b_*620^vUO@A;{o!@I}(z~l9|JL*O xc~a*8{Z&`CtA$M3mFc9qa`wEYSu=UBv4?~t9-sSFI2IUZ44$rjF6*2UngEb^_ALMa diff --git a/docs/build/html/classmlx_1_1core_1_1_scan-members.html b/docs/build/html/classmlx_1_1core_1_1_scan-members.html deleted file mode 100644 index 55a51b51c..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_scan-members.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Scan Member List
-
-
- -

This is the complete list of members for mlx::core::Scan, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Scanvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Scanvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Scanvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Scanvirtual
Max enum valuemlx::core::Scan
Min enum valuemlx::core::Scan
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Scaninlinevirtual
Prod enum valuemlx::core::Scan
ReduceType enum namemlx::core::Scan
Scan(Stream stream, ReduceType reduce_type, int axis, bool reverse, bool inclusive)mlx::core::Scaninlineexplicit
stream()mlx::core::Primitiveinline
Sum enum valuemlx::core::Scan
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Scanvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Scanvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_scan.html b/docs/build/html/classmlx_1_1core_1_1_scan.html deleted file mode 100644 index 75ead8c56..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_scan.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - -MLX: mlx::core::Scan Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Scan Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Scan:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - -

-Public Types

enum  ReduceType { Max -, Min -, Sum -, Prod - }
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Scan (Stream stream, ReduceType reduce_type, int axis, bool reverse, bool inclusive)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Member Enumeration Documentation

- -

◆ ReduceType

- -
-
- - - - -
enum mlx::core::Scan::ReduceType
-
- - - - - -
Enumerator
Max 
Min 
Sum 
Prod 
- -
-
-

Constructor & Destructor Documentation

- -

◆ Scan()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
mlx::core::Scan::Scan (Stream stream,
ReduceType reduce_type,
int axis,
bool reverse,
bool inclusive )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Scan::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Scan::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Scan::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Scan::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Scan::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Scan::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Scan::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_scan.png b/docs/build/html/classmlx_1_1core_1_1_scan.png deleted file mode 100644 index 6926bd27e6b7ffb21fd93cf477c978b21d4846e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 884 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B;FJzX3_Dj46+eVg}Lfya%X zKj`W2{g2FjKQp$JK-sh`9IqcJU4r3Y3^s=iA9>ns%9Sk_Up~T@8-o_w&z8*{S7)lDWp$5 z>br^8s~)TJpBZ6SiF(X+C2H}6Z+W!F+n7hPWvRVc*xr$ww``UR#B zLQxEHPTU8)GZ-s4bs6**vOZAV!mtNP@?S&PIm>?b$VqN+(-((LQn4@oaoO_azsslX z?%KDhT&;0_?Rn(p5nt`K&p!JaCPuyj1;N$)gO|I_-c8K)-)^J5--I=P|CGw|wU+sl z`WDZNw9~TNwdck0(DS?EwVq$Qs+Bw|%fr)sR@U63d3&$wJ--{(F1OBnQAk$!ge8w7 z%xliyzN&TpxaU@@y`i^rdw(>AZGXBwaBI!;;`3%7XN6Vj)Lpt|w#6>-_TPW|Za&<5 z>+H;T8KJH(=D2uPS?mAf{d38F{^>CJtGn{P{{ORj+LCy6U`Un63z$;7mSQQ3q_@+#l>B$DrNjG zoSIhF$e(rgq4-{zsF(A8%bDI6iI3{q824<$BD=pkG|w!2b#a!l>gLB9dY`X(jc(yt8M{6^6e4v2u~r$um)1qM`ggTe~DWM4f-?Fg> diff --git a/docs/build/html/classmlx_1_1core_1_1_scatter-members.html b/docs/build/html/classmlx_1_1core_1_1_scatter-members.html deleted file mode 100644 index f6db8360d..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_scatter-members.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Scatter Member List
-
-
- -

This is the complete list of members for mlx::core::Scatter, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Scattervirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Scattervirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Scattervirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Scattervirtual
Max enum valuemlx::core::Scatter
Min enum valuemlx::core::Scatter
None enum valuemlx::core::Scatter
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Scatterinlinevirtual
Prod enum valuemlx::core::Scatter
ReduceType enum namemlx::core::Scatter
Scatter(Stream stream, ReduceType reduce_type, const std::vector< int > &axes)mlx::core::Scatterinlineexplicit
stream()mlx::core::Primitiveinline
Sum enum valuemlx::core::Scatter
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Scattervirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_scatter.html b/docs/build/html/classmlx_1_1core_1_1_scatter.html deleted file mode 100644 index a46a7ff99..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_scatter.html +++ /dev/null @@ -1,444 +0,0 @@ - - - - - - - -MLX: mlx::core::Scatter Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Scatter Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Scatter:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - -

-Public Types

enum  ReduceType {
-  Max -, Min -, Sum -, Prod -,
-  None -
- }
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Scatter (Stream stream, ReduceType reduce_type, const std::vector< int > &axes)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Member Enumeration Documentation

- -

◆ ReduceType

- -
-
- - - - - - -
Enumerator
Max 
Min 
Sum 
Prod 
None 
- -
-
-

Constructor & Destructor Documentation

- -

◆ Scatter()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::Scatter::Scatter (Stream stream,
ReduceType reduce_type,
const std::vector< int > & axes )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Scatter::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Scatter::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Scatter::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Scatter::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Scatter::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Scatter::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_scatter.png b/docs/build/html/classmlx_1_1core_1_1_scatter.png deleted file mode 100644 index bac72d5cb6bd37cdfaea676b634f7946db599a0c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 901 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GTyo-U3d6^w7^zV3Uiz{A$g zzw*;>`;VTNV;Ux0TYD+C@0#f1O`U~m$8!EpDn9qvaoUoL9J-#LgrX)rIl6GF%1QrS z^;Ox+etuiPH)bd8aXS=!_)oMy{y#wxYf6xE|2n#4q2@-_3-l0 zc?%|I$=?38behWC2bWew?R&fSu-d+BTK%mmvX$=Hw=eus$@}aVIXR^Fm8iW{=cF&$ zEz?vgIiaphjafUVSdOn@^$y0K<1?bR-<}YcoaGy)T*bReR9*0Ze+FX(r!Is3Le>YW zTNw7Vh&4>V!1O^ViXqO4`+zq>@+p7D(>b3jCa7kbIC)Rn1G2#~OV#s}al3u&C%69yo&nn`SjMVs8pX|Ud@*t!D~0)SiAk!^_@|#FC6~rHpT0$ zw8~41YrOYAmu)@uxiDz0U;fpyXyttiujc;D4bi<{d1tflAD`7WV(YhT<6Y~2!|eWh zbL&0fyDcxvu3g13cd~}(^v}=!ACUj`@#l?KtE1*e|FyTjI_b-6kUu2DwV%&vXMUiS z$MD#2*|oQ3ORmp|ntZh*t~u+dC(8$6jIh8SP(PWYG?$vlsTgktrVwLe{e`J%&yKGA zy6*R1gPAi!eZu!t?ptiyE`Kd%+0<(xpO>82C6fGi*5R&SC6DF)Pk7~;mS!85;hP=4 zH6^U?(QCQjn5gw@%x70WRWjbJw|-S=O-NvGN}BFb=}_^$sI;{7nB}D}J}sI$?QV6C z>IbE@n-cw3m1g|3TIW~P8+P?mZvNJ+rPng^XU?4aaox3T3%`2adG`CSR)U>HKXZt# zk@0Imd%Lu>IH%KR&Uk0coC!=UKnG6_^U~x!ZvSN895YGV+(=-CVeoYIb6Mw<&;$T$ C_q0#| diff --git a/docs/build/html/classmlx_1_1core_1_1_select-members.html b/docs/build/html/classmlx_1_1core_1_1_select-members.html deleted file mode 100644 index 3b6c6ecf1..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_select-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Select Member List
-
-
- -

This is the complete list of members for mlx::core::Select, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Selectvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Selectvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Selectinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Selectvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Selectinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Selectinlinevirtual
Select(Stream stream)mlx::core::Selectinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Selectvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Selectvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_select.html b/docs/build/html/classmlx_1_1core_1_1_select.html deleted file mode 100644 index 40727d22d..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_select.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Select Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Select Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Select:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Select (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Select()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Select::Select (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Select::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Select::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Select::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Select::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Select::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Select::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Select::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Select::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_select.png b/docs/build/html/classmlx_1_1core_1_1_select.png deleted file mode 100644 index 86b98868b90c6824ae0df2da65743272b576a954..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 884 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B;FJzX3_Dj46+eb~3yfQL;z ze#xo#|BtY5aS(EP{q04Z-)pVKX$K9PALsm^RDABSa=B2L6;`(+8%Xt{`FU7KUZE`th*|7(y51+ zwfrx5Ztctc8{|F7uOKs2_x`tQiNf*OQ;$1M>f5t;Yi>rZ(DusZYdlxEeeIH;>*Dz< zy=9t8B`4ICsWEHk6wC27tlq)cb9_eB_S+NUlCylnl&g4GiK+`8@XuhZ;M8T%UE zbqm9u7O{ru7nnW>MKQ!VaUbwTNIn(Mcsl2E#RSz%6DRLUdq6f=W~q99+T3CvJNcQv z{%@20{GO|Ra;{YuOy@RVyJeRCDFdu7pU{2OFt^ioZ0J^F>@v`0*sCI z^VXKXeg61M%Gd6a`2{?U31kP8>TNn{I_0pL&50_s1av)T9 z=G4VMW+iudzn=OvE&XVG`0F1l7D=5v6V+vIb#Ygc@ZYG?>Gopx^}{xIZ#{Kue#q+! zpQ>Zt7S9d4`YAVmYu3_h<<+Y#isnv^klR)2ecnImCVyI*?#IW;Y0p%*oH+xGxS2Dj lUobNMY?Qfl%B6xojNu#Sbk(`8p9;($44$rjF6*2UngHxev^f9( diff --git a/docs/build/html/classmlx_1_1core_1_1_sigmoid-members.html b/docs/build/html/classmlx_1_1core_1_1_sigmoid-members.html deleted file mode 100644 index e598387d7..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sigmoid-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Sigmoid Member List
-
-
- -

This is the complete list of members for mlx::core::Sigmoid, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Sigmoidvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Sigmoidvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Sigmoidinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Sigmoidvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Sigmoidinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Sigmoidinlinevirtual
Sigmoid(Stream stream)mlx::core::Sigmoidinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Sigmoidvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Sigmoidvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sigmoid.html b/docs/build/html/classmlx_1_1core_1_1_sigmoid.html deleted file mode 100644 index 66b45144b..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sigmoid.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Sigmoid Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Sigmoid Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Sigmoid:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Sigmoid (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Sigmoid()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Sigmoid::Sigmoid (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sigmoid::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sigmoid::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Sigmoid::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sigmoid::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Sigmoid::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Sigmoid::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sigmoid::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Sigmoid::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sigmoid.png b/docs/build/html/classmlx_1_1core_1_1_sigmoid.png deleted file mode 100644 index 31bcd54a18ee3d376419e36e2c1dbbb72cd30266..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 906 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GVoo-U3d6^w7^zV3Tvz{92< zukz%3{i9$neNU;bhYYi?N~OANFTLZLq+fs1^7%&v?@Jji(^M)sbv-{ly5KeGiF&O4 z-kq1f=6YOWwp&nYbbRisePL18&EiEgr=N}3|7=5T{kI3NCtDt!m(F$j-->ikt>c~7 zOnWC;Ej|}}FUo&q#ig^sX%m)A+k97Rv&n8nRoRu`z+nmz_XJ=_~wV* zbSy7>9dV6+tIA70y|t^J+`eTc^C)@kCS8@6Cyb+RH(r~&Ber~-spr)d(|!c0dtK@m zjGFXBb&JYL?+njL(+js2ovXB9xObE_!RFYNT`_H6q=K_INnOkiSo^|-!G0m@1Jx}I zds@UAre9$CAQZ(A=fr)$JA<);QNz#77)Z%lG9j7h1$N}`b5YUFFE2gTPJTFsc z1qy>VpfCtJYre%#>7DPLEtj(F;zfj~EnOF1d}H4)-HNIU$L?-=`*K?K)7i@&yzMu7 zzs~fz@1?>k#;2o?dQWHnyW>^dci*RXsz*(y_L^2M&4!R zm30c9$2ZFTn74g(=(po@@4mVcmb+c_k#N-AN%!4CKh3>9SN2hMRBE)%rCWSk-fehW zRex{Jhkdtw{mZwk@_kXVNM-L__5bX3FONS@UEQCxH}7k8-73|W$3gLEv@YzNB|rOt z-8&e1j?ajietJS&a+YtHaux3?(YYKC)QJflV9Q|>HO;5r8S|!lDbE`W{Gamt_rBhzZA7kIEI4UIl-;OW;;Viw`2T9*vuExd(ANL4 z;aVl@%$Z+*e#zU)o0azLf%*TC*)waWUobNM3=9h|P2S`7yk}?cU-r#@7BJT^c)I$z JtaD0e0swQ2z-j;h diff --git a/docs/build/html/classmlx_1_1core_1_1_sign-members.html b/docs/build/html/classmlx_1_1core_1_1_sign-members.html deleted file mode 100644 index 0bb890485..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sign-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Sign Member List
-
-
- -

This is the complete list of members for mlx::core::Sign, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Signvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Signvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Signinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Signvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Signinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Signinlinevirtual
Sign(Stream stream)mlx::core::Signinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Signvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Signvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sign.html b/docs/build/html/classmlx_1_1core_1_1_sign.html deleted file mode 100644 index bfa86de85..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sign.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Sign Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Sign Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Sign:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Sign (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Sign()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Sign::Sign (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sign::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sign::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Sign::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sign::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Sign::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Sign::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sign::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Sign::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sign.png b/docs/build/html/classmlx_1_1core_1_1_sign.png deleted file mode 100644 index 1489dbc9cae5c9fc8487cd6c2bbc13582559764e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 890 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GVyo-U3d6^w7^J`{SS#pA{= zZ|ryPe`omWr4E_BeY@`LF0=^FQM7GYP=C_$`A-G!OF1pmR4O@jJwH9V;5F%q`dz!l zJFoxS>v>6d--1%3)v$uDi-})+9(X%@4qL%cnc}FhEFERD>&7St-n&*@y``t1; zCr!UFNkxC5s%PA@tEViVzhw9!BHr+GM)2#RnU}Kt)~>$V6E`{Qs3*$@;V6bUC+-8@ z8H^R2x(xaYSs$owVc63m)-e47(+44h!KMz+mA z=ehm7#;>jQ`ID}E;$Ayh&|SDYEb8oZKhuXBuYBFab2}`aEnfc1<98Rg74%nsoxQI4 z^mMCt%eEfzy|izu@$2ZT-tzp%9?z;iY<{))cFxu0T{#|})w^S9zU3^Ja?q)>CcU)Hi=vUorEh;s5UaS;m{^3xHht?5daM(w9G&>uct!tZPj;0?Z{0p00i_ I>zopr00K6<`~Uy| diff --git a/docs/build/html/classmlx_1_1core_1_1_sin-members.html b/docs/build/html/classmlx_1_1core_1_1_sin-members.html deleted file mode 100644 index 44d282d97..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sin-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Sin Member List
-
-
- -

This is the complete list of members for mlx::core::Sin, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Sinvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Sinvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Sininlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Sinvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Sininlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Sininlinevirtual
Sin(Stream stream)mlx::core::Sininlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Sinvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Sinvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sin.html b/docs/build/html/classmlx_1_1core_1_1_sin.html deleted file mode 100644 index d4d021f32..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sin.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Sin Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Sin Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Sin:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Sin (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Sin()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Sin::Sin (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sin::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sin::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Sin::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sin::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Sin::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Sin::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sin::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Sin::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sin.png b/docs/build/html/classmlx_1_1core_1_1_sin.png deleted file mode 100644 index a532b6c8d31d753c5cce38bc268cc0c5dc6416ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 864 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-KJzX3_Dj46+ec1O(LBNe) zzH{dH`bW{(-V2vnnXW#4w(p_K5(8VF!|&pY&Q;o+m}DZgP}MWe$$Qcsi!GB>etLfQ z&wqQR-o&%&Ap4eiYYN+~u6w<{_smbU$n)4QQ~%qaHv8_gpXr=axGeLj`);qGyYn*c z9@bcS`PPlE7plCjPR^TS)ui&aa@ty}Q+m=tmnLr8_HEPs>#xFouDli`c2>)?^mFD_ z^A{@7$2ZljRP|Kfv1Qhz``52M6o}8hdfjPKU(7`<_FMOkTzbF6)YCV6+mCC$QoVy}**o zHRXq*x0RRgT6|SyVX?64%i}wLn1As8UvqEUuNBvRhy6dlKg;u1DJUL$R!=QHcbM@* z@EwL@$v$gu=X$I++^V)(a4*}{uGt(9)CmO*G~7P1Zwd0swDCwwTPzrrmKNu9`plWr zrE5=rUVi>*s{Hj?%j4|?w}ECp!=3-TJLrKtq7}?P`_z4<QU*L Qz`VfV>FVdQ&MBb@005o0xc~qF diff --git a/docs/build/html/classmlx_1_1core_1_1_sinh-members.html b/docs/build/html/classmlx_1_1core_1_1_sinh-members.html deleted file mode 100644 index 73748f4b1..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sinh-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Sinh Member List
-
-
- -

This is the complete list of members for mlx::core::Sinh, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Sinhvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Sinhvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Sinhinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Sinhvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Sinhinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Sinhinlinevirtual
Sinh(Stream stream)mlx::core::Sinhinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Sinhvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Sinhvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sinh.html b/docs/build/html/classmlx_1_1core_1_1_sinh.html deleted file mode 100644 index dbef15193..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sinh.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Sinh Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Sinh Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Sinh:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Sinh (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Sinh()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Sinh::Sinh (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sinh::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sinh::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Sinh::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sinh::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Sinh::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Sinh::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sinh::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Sinh::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sinh.png b/docs/build/html/classmlx_1_1core_1_1_sinh.png deleted file mode 100644 index dcfa33426314ef66a6ffe30706d9f8c1bcb34e96..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 870 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B*kJzX3_Dj46+ec1O(LBNe) zzH{dH`bVp`1})fPEmgYnrs13p)@AL9H~xB`vpmlpIVnwfi^@sw49`j8?O~Ht>|cJ9 zT)X$%d*4ZQ516CWv+peI+j=QE-+MXNPPNA$xBA@vwApuGua4q2i|d(B-FJHh-Syj& zmpH{FBlpd(i;t(QnwU7ps!8SRoYd8Qmr|X*Ze6|>rvJNkZQ@kjTv-40~F{8m3=h`XCg=5QijL@1XsB&hus+&&`4`ljF2KC(Td&^>S9p@18~R zzrU+_>fXO#HM4NbhK!}{KQFBmTN7PdqkDPV-RUQc<+a-&)pn){^ce`)weGFi8F^3FX_eH*x9y-g5Ol zsk?VyW?rkt**sgrGynO?{f+Uzo`2qS)qQK+_Fwh?LcK4o7Y6zzHE!*k;(2@x<%Nth z`YpHWP1oG}?8>gFvoB0nhTU;tu*VxLNRsvorUrR^b~G}c-Fv~v__I({T3Xz^%T;CE z+pVwad}jNx;+oOk$j@PGOSsGLm;GK=ZFK6o(c63ZD$}lJ-&>VvyqUQs%6m)7w*0Ht zKOK8}@$t!D3AH=;X3U)X@XWP;p`m7zW_}H^mU?^O%$uI=*=s}XBK`!f{UriS8QMS3 zXPc_tzaF;!Tj|=O1#f+I{^tH^-kO^BE!OGunKRxQGiO$E>KYsCf6iJu - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Slice Member List
-
-
- -

This is the complete list of members for mlx::core::Slice, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Slicevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Slicevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Slicevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Slicevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Sliceinlinevirtual
Slice(Stream stream, const std::vector< int > &start_indices, const std::vector< int > &end_indices, const std::vector< int > &strides)mlx::core::Sliceinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Slicevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Slicevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_slice.html b/docs/build/html/classmlx_1_1core_1_1_slice.html deleted file mode 100644 index 6f6c64555..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_slice.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - -MLX: mlx::core::Slice Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Slice Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Slice:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Slice (Stream stream, const std::vector< int > &start_indices, const std::vector< int > &end_indices, const std::vector< int > &strides)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Slice()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::Slice::Slice (Stream stream,
const std::vector< int > & start_indices,
const std::vector< int > & end_indices,
const std::vector< int > & strides )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Slice::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Slice::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Slice::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Slice::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Slice::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Slice::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Slice::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_slice.png b/docs/build/html/classmlx_1_1core_1_1_slice.png deleted file mode 100644 index 965022c8191a02cbad431215834a7a7780b45ed6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 884 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B;FJzX3_Dj46+eK={g0*@QN zyz$&U|AphTS2Hb=w$7byJ)1Ax%k+pd&+ht@md`&bcwfqBnWj?7sq6Xa(FLzbPt@<) z@7;R&kD=!vXq&KTuf3Az?FHdNG=Z6ZGh5a3lX3g}b)Mh-^?#ex^LVcM z*>=tI$i+jU+Pcp^FNyeY=hY|E_T1g^&C8{8?`5MHSyudF#G+ z)1DBUFO`es!((6Dt&E8dU)__rN>TM~=BiSW-QU7?&n?e>TeYK3aB0x)W|g zCwA?p8kvyQm!r4dz11PUWtZ;$zEw}H`>m@x*Jn;W{z!f8*Vb$5Idk*B&of diff --git a/docs/build/html/classmlx_1_1core_1_1_slice_update-members.html b/docs/build/html/classmlx_1_1core_1_1_slice_update-members.html deleted file mode 100644 index f4abb0ccf..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_slice_update-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::SliceUpdate Member List
-
-
- -

This is the complete list of members for mlx::core::SliceUpdate, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::SliceUpdatevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::SliceUpdatevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::SliceUpdatevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::SliceUpdatevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::SliceUpdateinlinevirtual
SliceUpdate(Stream stream, const std::vector< int > &start_indices, const std::vector< int > &end_indices, const std::vector< int > &strides)mlx::core::SliceUpdateinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::SliceUpdatevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::SliceUpdatevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_slice_update.html b/docs/build/html/classmlx_1_1core_1_1_slice_update.html deleted file mode 100644 index b2014c218..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_slice_update.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - -MLX: mlx::core::SliceUpdate Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::SliceUpdate Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::SliceUpdate:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 SliceUpdate (Stream stream, const std::vector< int > &start_indices, const std::vector< int > &end_indices, const std::vector< int > &strides)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ SliceUpdate()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::SliceUpdate::SliceUpdate (Stream stream,
const std::vector< int > & start_indices,
const std::vector< int > & end_indices,
const std::vector< int > & strides )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::SliceUpdate::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::SliceUpdate::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::SliceUpdate::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::SliceUpdate::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::SliceUpdate::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::SliceUpdate::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::SliceUpdate::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_slice_update.png b/docs/build/html/classmlx_1_1core_1_1_slice_update.png deleted file mode 100644 index 25254654e697a978d4225a1dc99bb0259c96b348..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 918 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GVQo-U3d6^w7^KAiMPfyb49 zx}^I1|3~82ZgW^DC42Yj?B2t7m3$8=s=SUbI#+2oQ8m+yb(%`0XvCx^Q<=3rC&j<~ zCHYhD^X&;s)PFHuW0o&pQM_i$+}yb#itkU}kXs#j(%*33zDVaO7Tq`hE&Vzvq@O+F zx`CHek6GE?Eq8;yrb#UCQ}A@RJrySVbONvD%JArD_Z#z%ONIT^ytY?IO5gMAhs3M0 zC6m_fTQfh&^HOI_gzriD?A5!EJdY@i_6S-ZzTq2pu65yj{!6o#q?x$atQJ;%d0hnP zxX=X8N#TvEo^fZprxu^P%=sXA7sHw5mK*h^Ywmn@Bx*(4lUX9#R)PoCA7J{RwSi#| zmkz^vChh~PadZDMgq^cIuf9p;?6L!sRMsaw_EG1n zR^IyZFDd8x8s73%wYPJwnziS6c<$x9X|?%o_Uno{{>i1Lcj8=nOKcn`{n{8?(P@2T z)$hkD(apEAUVd|`Va$&B^gF|=Zo}Qh-ZlKI^SaX`ez$Iu-FE);@58*)bL6Y48m_7& zUg(_krEu>L`w#7PHTRbN(z^CLJT)<-!M+moU!oFHVZp3obg_ zxi#SI2~*9m5~YUtM%D+R35*q@5e#vxVh!QAxqlhgObMFhuVTFUrbt9uS{&=NnKQ$e zN36dTcl-IXYnAJ`-)8+ZyZ1ae;`TM=?feN#b-!7y+>>|mhWzTAx%XV|@5z4Mv}di@ z>`%wfoO-b#?0(9%{#P51>3iSy+I_($@A!@T-`}N$_1Z=M4GT4!G*dQo?us%!v9GM# zMdAp60dM z_-=ENs`|CtyVnWld!M(yc;-!XRpRmkvqVpyIkWPBk@07(4QI~miP{k4m1*^t`Iz-A VO@F-`3cwu1;OXk;vd$@?2>=6_y-ffB diff --git a/docs/build/html/classmlx_1_1core_1_1_softmax-members.html b/docs/build/html/classmlx_1_1core_1_1_softmax-members.html deleted file mode 100644 index c3e37e9ff..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_softmax-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Softmax Member List
-
-
- -

This is the complete list of members for mlx::core::Softmax, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Softmaxvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Softmaxvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Softmaxvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Softmaxvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Softmaxinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Softmaxinlinevirtual
Softmax(Stream stream, bool precise)mlx::core::Softmaxinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Softmaxvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Softmaxvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_softmax.html b/docs/build/html/classmlx_1_1core_1_1_softmax.html deleted file mode 100644 index 5a96e8cbb..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_softmax.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - -MLX: mlx::core::Softmax Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Softmax Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Softmax:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Softmax (Stream stream, bool precise)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Softmax()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::Softmax::Softmax (Stream stream,
bool precise )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Softmax::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Softmax::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Softmax::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Softmax::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Softmax::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Softmax::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Softmax::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Softmax::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_softmax.png b/docs/build/html/classmlx_1_1core_1_1_softmax.png deleted file mode 100644 index 643fb0d3d4f172977271cbb763d23f17e0f6a592..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 894 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GVio-U3d6^w7^<`zFz;9;BI zKC|cFfBk(oK5{3#(X!nB^x2fe?4;&B92aX;pU*kotmC;@Fly2h)h#L~yPdT?C(Sph ztty`XH+=FE{U2;=yDi@ZJdetZy?sa1N$+HY{^t$0_P-yzJSmgZ|5;{R?aFjdt=p~F zMBF^*h8@?-U%NZR=H)R>WsjiKq1#Sr_?j(QqFkE0b(8)2t7|_6uU)FMDss}PXP347 zFL-Y2OZ~fan#$YB`(%keeru3+dnJ|n9C_=LFREZeniU!+2`{gfK!Utszm6vYtd z#C^a!gRz2BmqC9a>jTv-40~F{8m1#8PuDM)T72%YI25==9Yxms6a*tS+Uz&Uq6S{kG`cHLEKHdj*#U z?QT+$y}j#U^__KLm3DrcuC82rD^L4~`IcR(`?s!oV!eL%tt02RoJ#&U6%-(xw}1Wq zoYww5$2@)4;!xFv#X_nt%kKS=|KV(JCm&tA`r7lb|L6R-s{FNDsOlMa?CL4Y=MNcn zbh96*=vn!-g6E~_vTK*KT-G~oeWb$l1810^1=t_+sQh7<{_5^ZQ~gh(Tk0-P>iKHKul*^wfA+sKYc5W^J^l6GE3+O& zZt~OCyFBC3wW@Ug%T=0-M3c{+>5EB!{bN;9@5wV!U81sEye6wHni+XCHp+Ku`KGA0 zs>u5bLYMtfiEf`{e{ol#@M@;q?A4*gnSWhR%5V7=yTb3$we{th`y*xNKFz6HlbZI; wyJgzUnbR*A8GjavN=pNJ-%E4p!ynB0duHFhm)iIdm{S-$UHx3vIVCg!09NU_-T(jq diff --git a/docs/build/html/classmlx_1_1core_1_1_sort-members.html b/docs/build/html/classmlx_1_1core_1_1_sort-members.html deleted file mode 100644 index 67dcaa64c..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sort-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Sort Member List
-
-
- -

This is the complete list of members for mlx::core::Sort, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Sortvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Sortvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Sortvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Sortvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Sortinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Sortinlinevirtual
Sort(Stream stream, int axis)mlx::core::Sortinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Sortvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Sortvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sort.html b/docs/build/html/classmlx_1_1core_1_1_sort.html deleted file mode 100644 index 197d6fdce..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sort.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - -MLX: mlx::core::Sort Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Sort Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Sort:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Sort (Stream stream, int axis)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Sort()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::Sort::Sort (Stream stream,
int axis )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sort::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sort::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Sort::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sort::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Sort::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Sort::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sort::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Sort::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sort.png b/docs/build/html/classmlx_1_1core_1_1_sort.png deleted file mode 100644 index fa624d11082dcef9d7f30c9508a9e6a59d44ea82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 870 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B*kJzX3_Dj46+eK={g0*@QN zyz$&U|Ap_r3S)JdU6wQ5dNyCWm+6sYj@|VqEuVi>@V=DMGEJqDQ`hs;qYGY>o~ZlI zzjy2RpLCB)!gdQvHyxY%DneWLy_tX4l>Q{0_~IL3^K~nB885%_>CWM6@?W()pITg; zbxC8T@vA#em!?kdvc7AR%I2A6xjJm-(v@vfwk&_QHtgH)sJnXhSE{zSZuJVXtciNc zX|>|ozP0nSJTEcotzGr>_PtxVkBZlRitxBJFMP{2-nIUZtlm#C^}Mp+_9^tET2DQ*wH0@prU7G>2BVarpvC~&2m}qxb=|=(+^Hv2K|Ms z4^+1>>}e5en0|rjgHRMhoD=r}?+nHYB*{OFYv&Zp@o!S;g_~ZzR>iaK*@w%fnZLel zy8qnXc~aKCg{4A;TMDjvb^o-{6tjsd{W-g4Bp5GsQb)Q*& zdDdsOO#4?;pDum0uwVM`j#p9NJ)hp%6_x4}%&VE{AG~()jjh{nUEdj%ef{uPw<%t4 zrByQRr}5tZRJQfh=fZ%se)(6+vX%EOxSIR3G(`7)<(->q`<92wb*D$YZo8(QGdKVH zY}tFO?#_AH7Z%!b&U4C=)0H3dA58!Eb5HKqz_s7k{+nNab<&sDptzI_*M2^yo%w-Q z9>Zh9W!K)CExA4;s(iKJUbd@UlQ|x!6ABt=xP4;Z66BR>`T(aWK8kuz>^RLc2Jlj+}YpLc<5exsWE8qkY5ja0KW_?Xsny%kk&H1XYdmd$X zY3k{QPn+%9F!QG7y{xzLp&`mMBfUSmrJc+=bH;CHT=sU~R7?Biq3;emZY|UOUkOeU zS@Zvtt}S(bJ$c8u?Z0ymw5ne`^JaC+w3#!fUobNMECh1Uv8!I1OCSDV7u-L$aIKu~ Rb6}2O@O1TaS?83{1OWA;uay7* diff --git a/docs/build/html/classmlx_1_1core_1_1_split-members.html b/docs/build/html/classmlx_1_1core_1_1_split-members.html deleted file mode 100644 index 9c7cd09dd..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_split-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Split Member List
-
-
- -

This is the complete list of members for mlx::core::Split, including all inherited members.

- - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::Splitvirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::Splitvirtual
is_equivalent(const Primitive &other) const overridemlx::core::Splitvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Splitvirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Splitinlinevirtual
Split(Stream stream, const std::vector< int > &indices, int axis)mlx::core::Splitinlineexplicit
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Splitvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Splitvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_split.html b/docs/build/html/classmlx_1_1core_1_1_split.html deleted file mode 100644 index 2889694e8..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_split.html +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - - -MLX: mlx::core::Split Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Split Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Split:
-
-
- - -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Split (Stream stream, const std::vector< int > &indices, int axis)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Split()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::Split::Split (Stream stream,
const std::vector< int > & indices,
int axis )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Split::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Split::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Split::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Split::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Split::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Split::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Split::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_split.png b/docs/build/html/classmlx_1_1core_1_1_split.png deleted file mode 100644 index 5b7fd768bd10378cc696f15ae67363ff8e630223..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 527 zcmeAS@N?(olHy`uVBq!ia0vp^B|sd&!3-q-S1vRKQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=E93JY5_^Dj46+?d@w(;AvUz zylLk5`bWiqjau{G@mHMO`0~iQEj1#~83mj;_O?1qsx@7pa?_`tB}=6;_S>JURm*Gm zCVlxO^UM4E#W2pS*E^GfOmv#p^hZofKYjH4)E%z((zU$nPp#vr6}uS0c|USr)cf@j zE8hjbd!VkHZ8mwrvAuuH@5(*BePLBO-@?=E+PhX=xKzqM`Q6zfuC-E{t;UzW&3?D; zyG+!qw>-1f-P&#bbgH)DrB>+$kK!i1S<0w-GEFLAQqHp73lv)}L^6C>CdY6gy4*p& zUwTEkgL+#1E8PqAPwp|YHk3&PFk~zPGJxu_Ff1m{jLbi%vT{9J$fQ{>`JLizFI=9v zuA0wNZy#6h)1B$();ZmdKI;Vst E0I`_&mjD0& diff --git a/docs/build/html/classmlx_1_1core_1_1_sqrt-members.html b/docs/build/html/classmlx_1_1core_1_1_sqrt-members.html deleted file mode 100644 index 4a2e605ce..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sqrt-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Sqrt Member List
-
-
- -

This is the complete list of members for mlx::core::Sqrt, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Sqrtvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Sqrtvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Sqrtvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Sqrtvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Sqrtinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Sqrtinlinevirtual
Sqrt(Stream stream, bool recip=false)mlx::core::Sqrtinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Sqrtvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Sqrtvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sqrt.html b/docs/build/html/classmlx_1_1core_1_1_sqrt.html deleted file mode 100644 index c178fcb3d..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_sqrt.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - -MLX: mlx::core::Sqrt Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Sqrt Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Sqrt:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Sqrt (Stream stream, bool recip=false)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
void print (std::ostream &os) override
 Print the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Sqrt()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::Sqrt::Sqrt (Stream stream,
bool recip = false )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sqrt::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Sqrt::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Sqrt::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sqrt::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Sqrt::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Sqrt::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Sqrt::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Sqrt::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_sqrt.png b/docs/build/html/classmlx_1_1core_1_1_sqrt.png deleted file mode 100644 index f30bd2b340d1865b74d6e6fdcac5e73e736c2132..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 887 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GUno-U3d6^w7^zFxQ3fQL;z ze#xo#|BrCX=y7shS$k`9aO1YD^a%>%>t^oTU*2) z8?rk0_424mC5_&zvwjxmn|A+*S$#)r(v?qL*Y+*=>UZb7b*gWW>8kLWY;~_o@yc6N zPI_l}PMUsUl8XN0tfzB67ckUxu^*`DS^2es=cVbgYbmCSt}lq%D9re$MXX`^1*Q)| zQ4DcT+y}ff7%Mn+8T1#jK2Y7lum?%fq+;*=0#Hs!ljYillv?5WrMEEnZ{ zPi5=kd698ia=Y%mI39X^m%rBYYge_B{jN@!6ygvn2xAO9jh;P}YyT5lnmE?KBt}eL9h+O zv1FgM$CEwQ8*WuwEx4EMYS&zj2kNK+fisjo$!9E`a;aj%nKN$6Th5#TCXtylr-yHi ztL>}|pBZTwBe`$Q)|TtVb}Oeo%PD?R6!avnd!y{M4U6nt@A$WEt4d4bjazHEQ1x}s zBZK22)3<5AZsj%JoW5iARl8Ly+>ACGAC)%!m6o=>#&LDz@@=bttUU`u^^Ul1oi*+M zzObvGp5L=tEgI!|f9A})pSM9%MgQ;DNBy{G%>4TEX#CG`IgzO5teG<_IdzSV^%th5 iJxjghrMdLs59ZKabN!~@-6sIdA`G6celF{r5}E+9kG7}) diff --git a/docs/build/html/classmlx_1_1core_1_1_square-members.html b/docs/build/html/classmlx_1_1core_1_1_square-members.html deleted file mode 100644 index a447d33e6..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_square-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Square Member List
-
-
- -

This is the complete list of members for mlx::core::Square, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Squarevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Squarevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Squareinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Squarevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Squareinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Squareinlinevirtual
Square(Stream stream)mlx::core::Squareinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Squarevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Squarevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_square.html b/docs/build/html/classmlx_1_1core_1_1_square.html deleted file mode 100644 index 24c7cd1c6..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_square.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Square Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Square Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Square:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Square (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Square()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Square::Square (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Square::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Square::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Square::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Square::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Square::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Square::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Square::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Square::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_square.png b/docs/build/html/classmlx_1_1core_1_1_square.png deleted file mode 100644 index 06ae832b851a9a36af05257a13d4b81c8020b4da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 906 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GVoo-U3d6^w7^KFnKfz~kn> z&tvNS|DF1&0zw>D-tN-7Tsn1e+JhO*kJr?nw0!GWk1lvkdZK>U ze(%=Hf3iI;G1ob~PU^M3x-%^5e(t;w&FM*N;)`#D&DZ@=m+rUm>C8i?Tgw%t#n(RlTj^ndQb2*71PC)N2mKOQu!;j zP}MWe$$QcskV_@QwV%&vXMPZShv8VV&)VC$9_tOas;w5>%XYPEGRFh;Eev~F#2Thw zVEP~w#SrJjeZV_|v4T^VL4P6Z1673NC;5!0b3Rv0P|Y-fnQWP*>iNmIJ${|%cYpog zCjX@-UHQbhw!33EAon=S1&%8ufRH=8ivs&+l$| zw#U<|uPn88Wz~zK#q!rP>N4zUc{nnW^rx$0*%7=z3&%8PBRqrdO`D+Y}Uw^b)>pb23_x`pyZnGmz z|3sY*Ubm_= - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::StopGradient Member List
-
-
- -

This is the complete list of members for mlx::core::StopGradient, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::StopGradientvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::StopGradientvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::StopGradientinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::StopGradientinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::StopGradientinlinevirtual
StopGradient(Stream stream)mlx::core::StopGradientinlineexplicit
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::StopGradientvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_stop_gradient.html b/docs/build/html/classmlx_1_1core_1_1_stop_gradient.html deleted file mode 100644 index 2913a73b7..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_stop_gradient.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - -MLX: mlx::core::StopGradient Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::StopGradient Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::StopGradient:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 StopGradient (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ StopGradient()

- -
-
- - - - - -
- - - - - - - -
mlx::core::StopGradient::StopGradient (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::StopGradient::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::StopGradient::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::StopGradient::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::StopGradient::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::StopGradient::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::StopGradient::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_stop_gradient.png b/docs/build/html/classmlx_1_1core_1_1_stop_gradient.png deleted file mode 100644 index 082cc974a4636d84354974c7330b916159b316d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 934 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GVMo-U3d6^w7^KHT(5fv079 z>axk->mNmDFXX%+wO8)xna;yeT#7Xb9^?$|)7qeY>=iZRU;B&%(HWSFTB%Hb3cYW@6aHD`(r6YQIp4 zs*SQgqI6Pt=LVls+jm}#eUz*dE2eVuwd9(rh1-O(>jkd4%u4I~5u`fl$#szkm6xFj z6PJWHx=xBa+dZ}T++|LNdrMgvo?V_3aoR}r`kV;ut35H3lU!Aq8sZyS8RA&Q7%D^~ z7#@TsFgAqa6}T#Y;FRU_pDjL+Hfe>JYX4%z>F{VbLJ>p&iOb`JrO!+IuehCN(53?H;MFdSHoSKt+Y!qO?1YMg`wXZkj(Dm@BK=hGS88Qc0w4_7_VjhOv2W4V>G(lXmyR}z*!s(!6;`0oi|P_5K>vp09ek+q!j z<2Kh#ubr}ybM?_%Jd-@`UwQm)3Exz~J-vM=>mpl(ua;SaZ=P*$ z>ZivmT;>`*_41B;?X_qBEAKlCckQ_yS^p#aU;SLRX&oKm`(Le(a(S|vOGi);7*bxE dOJ9EBcS)YPleJR&ATUQUc)I$ztaD0e0swe`zn}mB diff --git a/docs/build/html/classmlx_1_1core_1_1_subtract-members.html b/docs/build/html/classmlx_1_1core_1_1_subtract-members.html deleted file mode 100644 index b6f161513..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_subtract-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Subtract Member List
-
-
- -

This is the complete list of members for mlx::core::Subtract, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Subtractvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Subtractvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Subtractinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Subtractvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Subtractinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Subtractinlinevirtual
stream()mlx::core::Primitiveinline
Subtract(Stream stream)mlx::core::Subtractinlineexplicit
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Subtractvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Subtractvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_subtract.html b/docs/build/html/classmlx_1_1core_1_1_subtract.html deleted file mode 100644 index d41645a17..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_subtract.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Subtract Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Subtract Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Subtract:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Subtract (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Subtract()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Subtract::Subtract (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Subtract::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Subtract::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Subtract::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Subtract::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Subtract::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Subtract::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Subtract::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Subtract::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_subtract.png b/docs/build/html/classmlx_1_1core_1_1_subtract.png deleted file mode 100644 index 9a227b3b310114e9007a93c332bf6a8201ca50a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 903 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GUdo-U3d6^w7^KI~g<#lxl^ zzvR^W|3|h5aB#A``c_a@TpE*lMMTEf;@rFVqH~otCnlLlEmZZ4bMl_F$70JQm7kuM zmv8@OS+3SxuBLO(dv`{2o6Y$RpBBfeu9Opx z3YJnWb(_6=-3-#`pr;hFRM%6uEl+OzI9h@-KwoyTsM0K+15mT z<+NIPZR6VeS)P|T_0}$X`h9QdjU(TqzHXebM0tM3RNh?wq?zTXW-UoGS^wjz=aeP! z%3D-UdS`e}ntoxDivHuQr*l3RFx)xHoM3b8N|jC97pdUanWl@bFNi7>V*Jx0)-e47 z(+8m_hBzng1Kt^o6`Z;Z`U_bfsBU4{gCzNnaqXO9IsQ#5y>2j*-Pfvk);;@h+BEam zmreH1*DHGJ+Ak~>EZnvsW9ikJc_G}>!ejS8+wk_S_lM8N?A}ey_1+${dj1z4J^NRC zW?!3Q?s@#;x;6Tt{IPjo9?#0Yt9~{6cGgwH-B})YG($kMDXIeQ#Y@t)1Vht1s7HTW9i!J?ic>{l%F-&plpe_R)InuZTUDwWM#&+hBD6 z-TShN)!*Lvly8}(RN}Wt}bvv&E_j=1Kmqn<1ugb4)=G~9l&Zwd0swDCwwTPzrrmKNu9`plVb z=hwmSUnK{ZF$ym@{Pr+_1B$GFa7GZ^y(u+ zRjv0HhhG1^B&vPd`|Pc|zo$p}p8h_6^X0g(cU7x*Z%s>Mx4Q@mk|V$%(HGx7IpS6= zpKkky?#UTx-?Ce#&73*?f|2oOA&`TQUG>sj`tS$8+1J@S_$6QL2WA-tPgg&ebxsLQ E0JKQK7XSbN diff --git a/docs/build/html/classmlx_1_1core_1_1_tan-members.html b/docs/build/html/classmlx_1_1core_1_1_tan-members.html deleted file mode 100644 index 92188e869..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_tan-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Tan Member List
-
-
- -

This is the complete list of members for mlx::core::Tan, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Tanvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Tanvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Taninlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Tanvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Taninlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Taninlinevirtual
stream()mlx::core::Primitiveinline
Tan(Stream stream)mlx::core::Taninlineexplicit
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Tanvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Tanvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_tan.html b/docs/build/html/classmlx_1_1core_1_1_tan.html deleted file mode 100644 index b8be27324..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_tan.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Tan Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Tan Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Tan:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Tan (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Tan()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Tan::Tan (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Tan::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Tan::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Tan::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Tan::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Tan::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Tan::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Tan::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Tan::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_tan.png b/docs/build/html/classmlx_1_1core_1_1_tan.png deleted file mode 100644 index 613c47aec160ab22a445a9fd7be7f45f490b37d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 875 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-)JY5_^Dj46+ec1O(LBNe) zzH{dH`bW{La~m(cyRzc+*}jJ^OAKsz4!?^pI#+3PVv>o}LRHT=C+|snEVfKi`RV!H zKmYBOdK1rIjrB+V!Tb8d|8}{vY)Lkw6D^=56w|WKLtciNc zYjxtT!v2!35AeJR^#?a3^c^^RK~sWJWF)Me0L$ofEa z3&Wlkv4-gvm_7(aF~m7>AMnm#tU!|d!?<=%u^j&z=(_o_*=>Ug{xJXG{l6w|+piVZUWffZzdy_KS1BkSdsa^^K6jY$gI*rPW5Z?F z-kL4BJ|k-K)sDF4tfRgxAB3@n2WDXXWRB8YY9gm%y!j%BuCcNH!ql{9Pgh+#db7WO z=1o(()n89FX-B=3`)61DPDH=@SrRa4LSI&Xkx#yyynJbRcHfLM-`4(^b$=Icu5`q) zX^zI5gYVqbvfZY7KF( - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Tanh Member List
-
-
- -

This is the complete list of members for mlx::core::Tanh, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Tanhvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Tanhvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Tanhinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Tanhvirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs) overridemlx::core::Tanhinlinevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Tanhinlinevirtual
stream()mlx::core::Primitiveinline
Tanh(Stream stream)mlx::core::Tanhinlineexplicit
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Tanhvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Tanhvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_tanh.html b/docs/build/html/classmlx_1_1core_1_1_tanh.html deleted file mode 100644 index d89fd4ce7..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_tanh.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - -MLX: mlx::core::Tanh Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Tanh Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Tanh:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Tanh (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs) override
 Get the output shapes of the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Tanh()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Tanh::Tanh (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Tanh::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Tanh::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Tanh::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Tanh::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ output_shapes()

- -
-
- - - - - -
- - - - - - - -
std::vector< std::vector< int > > mlx::core::Tanh::output_shapes (const std::vector< array > & inputs)
-
-inlineoverridevirtual
-
- -

Get the output shapes of the primitive.

-

This is not required to be implemented by derived classes, in which case it will throw.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Tanh::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Tanh::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Tanh::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_tanh.png b/docs/build/html/classmlx_1_1core_1_1_tanh.png deleted file mode 100644 index 8e330c32fba7d8c3f5289e90c42b1130d81805b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 879 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-aJY5_^Dj46+eVzAOL4d8D zU-Q=Y`bWvu`xuVBRPzez+a;@$AF3bF_|5eK~wR(YR zdtlJ=s~b-*d^@Gf{H{eRi)U8ll(j})lX*2?`ou=Bee-?muF$%bTc^2h^$NOK6ZMpL z*NJO8*VJE`w1hh*D)i*`t)*5+=5IZft>~FP@8T`~E&DpF_fNj261w)*BX9G-Np-y! zCaLHzRP~GlxwL2X)Z%l889(UdF+4V0cI~a%lIt^~CSUD{YtB0A%kn`uiXqO4`+#=_ zV+E%!gZ@I+2dY~b_OysKOuxYNK?ouFlR3)rxs6NP35cV3oVtHn8YwuWc^^OO4<<9|K>yy>d@*0}Az>i>m$Us^95HR(xe%-T7{a(oTt zh0GHDhFkNtEABmZW!4(EFH#}ec}flQQ3C>JD4mwS;HA0rqr%LYy>1yZXI66R8XN2T zXWDLW{^~a~@@9>p-HNO6AMDne9G|sZcdpW>S>3?ES$(Pa{r%(1t{**o<_)9XTGbFE z>+O#=*1VIjGTYF*_VI0NjP$NfdhR=8X6)y@wYyGycmA^_tdd3i zW>)szbU4i12%!q=yG&m@0ent#>E__xu*)U;=+Th5#TrrVh_rx$Jw d^2)UM$9ObM - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Transpose Member List
-
-
- -

This is the complete list of members for mlx::core::Transpose, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Transposevirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Transposevirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Transposevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::Transposevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Transposeinlinevirtual
stream()mlx::core::Primitiveinline
Transpose(Stream stream, const std::vector< int > &axes)mlx::core::Transposeinlineexplicit
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::Transposevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Transposevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_transpose.html b/docs/build/html/classmlx_1_1core_1_1_transpose.html deleted file mode 100644 index 839676ac3..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_transpose.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - -MLX: mlx::core::Transpose Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Transpose Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Transpose:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Transpose (Stream stream, const std::vector< int > &axes)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Transpose()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::Transpose::Transpose (Stream stream,
const std::vector< int > & axes )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Transpose::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Transpose::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Transpose::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Transpose::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Transpose::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::Transpose::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Transpose::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_transpose.png b/docs/build/html/classmlx_1_1core_1_1_transpose.png deleted file mode 100644 index 77c3b22881f393c2459b0d6d2f2a2bc43e59bdbd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 914 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GV&o-U3d6^w7^zRr8CAi&nn zuX*cx{iDYg`xuU$Q}d1P+abWO~gW7MRwH70d+&!rS+FRP&IVcNexN8Q!3zZ!LFQIzV+9J{rj z*yg6Zj=1K(Rplki^svxRxw*1@A9sdT>Z-gvp&fO*@tS$z>+(ypmaGbmu6eEIb!oj| z)TAe>TU1VZXLwGUUbwaBT%`qr-BI2In`2jY-EI3K6`Z|E>SA`l+8vz?bxzy|yfYXp zICUBH7qUK3-NLY^MXX`^1*Q)|Q4DcNlJySS&*vO(*6~~nGyQa+w&$ezmA{_OD*69q zk^f)!$xCL$Coel#zZcBq-)^IQ-^BM`-IT)e zwU&94`qsup+G)k@;`#DC^!%=Tt?SorYCSi(Ibl+t$xW--yRU}rp6j12o3+EPBWUGa z$4Py;wjXTs!dLH+SHJn{N?7i8(MQ}-cPHJC3jH+qdaUfD>Zqq%E0%4Q&8R)R?VsJf zIUnY|edbrbWtB=v-XfLSIpY7>{#~%2zkTh#(ATxA|38o4s`A%rp{i%xv8$&npFd>y zA!6R}Q6l(tne?S>pS35mT-G~oeWb?pgJ94=!|e~_+9^R&{F7$h%xIZ5bLR95M#i6u zR(_rJv8esbnSE#2x893PNV~Rp`P6q0-}gWF`?yI}{PlI4wO;2J$Mg8yP4)bmTz`#a z$CX*v)i)<=?|Zi4_u?exrw&H9qotQ|q@|_4PG23fxnF;8N}8_kwo?|fi#M-*HFIX@ z+tpE}6UC$Y8;v&a&DqYlC+haLbDOWOT-)rlp5xVnw6HDeQK2Wd@7`;5w&q4!PC{xWt~$(69C3N#i#%P diff --git a/docs/build/html/classmlx_1_1core_1_1_unary_primitive-members.html b/docs/build/html/classmlx_1_1core_1_1_unary_primitive-members.html deleted file mode 100644 index 494b399d9..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_unary_primitive-members.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::UnaryPrimitive Member List
-
-
- -

This is the complete list of members for mlx::core::UnaryPrimitive, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &output)=0mlx::core::UnaryPrimitivepure virtual
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &output)=0mlx::core::UnaryPrimitivepure virtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os)=0mlx::core::Primitivepure virtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes)mlx::core::Primitivevirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_unary_primitive.html b/docs/build/html/classmlx_1_1core_1_1_unary_primitive.html deleted file mode 100644 index 0e244a441..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_unary_primitive.html +++ /dev/null @@ -1,534 +0,0 @@ - - - - - - - -MLX: mlx::core::UnaryPrimitive Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::UnaryPrimitive Class Referenceabstract
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::UnaryPrimitive:
-
-
- - -mlx::core::Primitive -mlx::core::Abs -mlx::core::Add -mlx::core::AddMM -mlx::core::Arange -mlx::core::ArcCos -mlx::core::ArcCosh -mlx::core::ArcSin -mlx::core::ArcSinh -mlx::core::ArcTan -mlx::core::ArcTan2 -mlx::core::ArcTanh -mlx::core::ArgPartition -mlx::core::ArgReduce -mlx::core::ArgSort -mlx::core::AsStrided -mlx::core::AsType -mlx::core::BitwiseBinary -mlx::core::BlockMaskedMM -mlx::core::BlockSparseMM -mlx::core::BlockSparseQMM -mlx::core::Broadcast -mlx::core::Ceil -mlx::core::Cholesky -mlx::core::Concatenate -mlx::core::Conjugate -mlx::core::Convolution -mlx::core::Copy -mlx::core::Cos -mlx::core::Cosh -mlx::core::Divide -mlx::core::Equal -mlx::core::Erf -mlx::core::ErfInv -mlx::core::Exp -mlx::core::Expm1 -mlx::core::FFT -mlx::core::Floor -mlx::core::Full -mlx::core::Gather -mlx::core::Greater -mlx::core::GreaterEqual -mlx::core::Inverse -mlx::core::Less -mlx::core::LessEqual -mlx::core::Load -mlx::core::Log -mlx::core::Log1p -mlx::core::LogAddExp -mlx::core::LogicalAnd -mlx::core::LogicalNot -mlx::core::LogicalOr -mlx::core::Matmul -mlx::core::Maximum -mlx::core::Minimum -mlx::core::Multiply -mlx::core::Negative -mlx::core::NotEqual -mlx::core::NumberOfElements -mlx::core::Pad -mlx::core::Partition -mlx::core::Power -mlx::core::QuantizedMatmul -mlx::core::RandomBits -mlx::core::Reduce -mlx::core::Remainder -mlx::core::Reshape -mlx::core::Round -mlx::core::Scan -mlx::core::Scatter -mlx::core::Select -mlx::core::Sigmoid -mlx::core::Sign -mlx::core::Sin -mlx::core::Sinh -mlx::core::Slice -mlx::core::SliceUpdate -mlx::core::Softmax -mlx::core::Sort -mlx::core::Sqrt -mlx::core::Square -mlx::core::StopGradient -mlx::core::Subtract -mlx::core::Tan -mlx::core::Tanh -mlx::core::Transpose -mlx::core::Uniform - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
virtual void eval_cpu (const std::vector< array > &inputs, array &output)=0
 
virtual void eval_gpu (const std::vector< array > &inputs, array &output)=0
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes)
 The primitive must know how to vectorize itself across the given axes.
 
virtual void print (std::ostream &os)=0
 Print the primitive.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ UnaryPrimitive() [1/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::UnaryPrimitive::UnaryPrimitive (Stream stream)
-
-inlineexplicit
-
- -

An abstract base class for a primitive with a single output.

- -
-
- -

◆ ~UnaryPrimitive()

- -
-
- - - - - -
- - - - - - - -
virtual mlx::core::UnaryPrimitive::~UnaryPrimitive ()
-
-virtualdefault
-
- -
-
- -

◆ UnaryPrimitive() [2/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::UnaryPrimitive::UnaryPrimitive (const UnaryPrimitive & other)
-
-delete
-
- -
-
- -

◆ UnaryPrimitive() [3/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::UnaryPrimitive::UnaryPrimitive (UnaryPrimitive && other)
-
-delete
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - -
virtual void mlx::core::UnaryPrimitive::eval_cpu (const std::vector< array > & inputs,
array & output )
-
-pure virtual
-
- -

Implemented in mlx::core::Abs, mlx::core::Add, mlx::core::AddMM, mlx::core::Arange, mlx::core::ArcCos, mlx::core::ArcCosh, mlx::core::ArcSin, mlx::core::ArcSinh, mlx::core::ArcTan, mlx::core::ArcTan2, mlx::core::ArcTanh, mlx::core::ArgPartition, mlx::core::ArgReduce, mlx::core::ArgSort, mlx::core::AsType, mlx::core::AsStrided, mlx::core::BitwiseBinary, mlx::core::BlockMaskedMM, mlx::core::BlockSparseMM, mlx::core::Broadcast, mlx::core::Ceil, mlx::core::Concatenate, mlx::core::Conjugate, mlx::core::Convolution, mlx::core::Copy, mlx::core::Cos, mlx::core::Cosh, mlx::core::Divide, mlx::core::Select, mlx::core::Remainder, mlx::core::Equal, mlx::core::Erf, mlx::core::ErfInv, mlx::core::Exp, mlx::core::Expm1, mlx::core::FFT, mlx::core::Floor, mlx::core::Full, mlx::core::Gather, mlx::core::Greater, mlx::core::GreaterEqual, mlx::core::Less, mlx::core::LessEqual, mlx::core::Load, mlx::core::Log, mlx::core::Log1p, mlx::core::LogicalNot, mlx::core::LogicalAnd, mlx::core::LogicalOr, mlx::core::LogAddExp, mlx::core::Matmul, mlx::core::Maximum, mlx::core::Minimum, mlx::core::Multiply, mlx::core::Negative, mlx::core::NotEqual, mlx::core::NumberOfElements, mlx::core::Pad, mlx::core::Partition, mlx::core::Power, mlx::core::QuantizedMatmul, mlx::core::BlockSparseQMM, mlx::core::RandomBits, mlx::core::Reshape, mlx::core::Reduce, mlx::core::Round, mlx::core::Scan, mlx::core::Scatter, mlx::core::Sigmoid, mlx::core::Sign, mlx::core::Sin, mlx::core::Sinh, mlx::core::Slice, mlx::core::SliceUpdate, mlx::core::Softmax, mlx::core::Sort, mlx::core::Square, mlx::core::Sqrt, mlx::core::StopGradient, mlx::core::Subtract, mlx::core::Tan, mlx::core::Tanh, mlx::core::Uniform, mlx::core::Transpose, mlx::core::Cholesky, and mlx::core::Inverse.

- -
-
- -

◆ eval_cpu() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::UnaryPrimitive::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-inlineoverridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu() [1/2]

- -
-
- - - - - -
- - - - - - - - - - - -
virtual void mlx::core::UnaryPrimitive::eval_gpu (const std::vector< array > & inputs,
array & output )
-
-pure virtual
-
- -

Implemented in mlx::core::Abs, mlx::core::Add, mlx::core::AddMM, mlx::core::Arange, mlx::core::ArcCos, mlx::core::ArcCosh, mlx::core::ArcSin, mlx::core::ArcSinh, mlx::core::ArcTan, mlx::core::ArcTan2, mlx::core::ArcTanh, mlx::core::ArgPartition, mlx::core::ArgReduce, mlx::core::ArgSort, mlx::core::AsType, mlx::core::AsStrided, mlx::core::BitwiseBinary, mlx::core::BlockMaskedMM, mlx::core::BlockSparseMM, mlx::core::Broadcast, mlx::core::Ceil, mlx::core::Concatenate, mlx::core::Conjugate, mlx::core::Convolution, mlx::core::Copy, mlx::core::Cos, mlx::core::Cosh, mlx::core::Divide, mlx::core::Select, mlx::core::Remainder, mlx::core::Equal, mlx::core::Erf, mlx::core::ErfInv, mlx::core::Exp, mlx::core::Expm1, mlx::core::FFT, mlx::core::Floor, mlx::core::Full, mlx::core::Gather, mlx::core::Greater, mlx::core::GreaterEqual, mlx::core::Less, mlx::core::LessEqual, mlx::core::Load, mlx::core::Log, mlx::core::Log1p, mlx::core::LogicalNot, mlx::core::LogicalAnd, mlx::core::LogicalOr, mlx::core::LogAddExp, mlx::core::Matmul, mlx::core::Maximum, mlx::core::Minimum, mlx::core::Multiply, mlx::core::Negative, mlx::core::NotEqual, mlx::core::NumberOfElements, mlx::core::Pad, mlx::core::Partition, mlx::core::Power, mlx::core::QuantizedMatmul, mlx::core::BlockSparseQMM, mlx::core::RandomBits, mlx::core::Reshape, mlx::core::Reduce, mlx::core::Round, mlx::core::Scan, mlx::core::Scatter, mlx::core::Sigmoid, mlx::core::Sign, mlx::core::Sin, mlx::core::Sinh, mlx::core::Slice, mlx::core::SliceUpdate, mlx::core::Softmax, mlx::core::Sort, mlx::core::Square, mlx::core::Sqrt, mlx::core::StopGradient, mlx::core::Subtract, mlx::core::Tan, mlx::core::Tanh, mlx::core::Uniform, mlx::core::Transpose, mlx::core::Cholesky, and mlx::core::Inverse.

- -
-
- -

◆ eval_gpu() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::UnaryPrimitive::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-inlineoverridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ operator=() [1/2]

- -
-
- - - - - -
- - - - - - - -
UnaryPrimitive & mlx::core::UnaryPrimitive::operator= (const UnaryPrimitive & other)
-
-delete
-
- -
-
- -

◆ operator=() [2/2]

- -
-
- - - - - -
- - - - - - - -
UnaryPrimitive & mlx::core::UnaryPrimitive::operator= (UnaryPrimitive && other)
-
-delete
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_unary_primitive.png b/docs/build/html/classmlx_1_1core_1_1_unary_primitive.png deleted file mode 100644 index 162024de6b07d41c7496e57c09ced4339db4d3b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32408 zcmdVDdq7iX)-LX)%2-{b`$j|A``EO2}HqGga&$on5n>IaZ+O&C#|27l+B<7nf>%qr@;BDbs zEfx#-$LIZUM!~JJHJ>a=eV2Ck`O~LQ!OvHiXho%q62hx7tK67hl)6aiG24R=?#&Goa%e8Z}pVY3XnBBPniz!)X{`6$`sQ>ha zy_X?Xc#`Dv(#R9`k72a<2&8qQV{~fM8Z?oKVThTe3&*GjM3~fE2dMK?hq5EH+Sczw z@%BARaZ}8u;?BDr$ZoxTO_c}7Gx4y2f!VjPp^D8vTjsU&x2`|s%4PJ6`fJ|jBmw7J zDkQ&BRMlj|te;|F9Ojb1@R9LHGVaGn5+hd<8-jm$)S-%OfedG3;PV~dk>Qy3N(pb) zvuvn`6$Te}oYL2yE5axupN);S4!fsUvjsIC(gFpRttY+ucbN1I73d58rkkd(d|FdH zZT>I!&&*$Zzb`!b@P^XapAWwupM1D`>8cIon`UnLc-4k0q5sD}eqru>_gK`MPq!{G z8^^TDjE`YDhHBpO-+t(;#TcX8)y@L<(XoS?KKI+o0TK9LyM;q#4EOI3K`29txG~{a zpo8N#S^l`pwrjFw{JG}ZYl}#^PX-QX>v|N!%SZJ)P3?+pzR^xpb3eEG_aX6&G(jr0 z9cq^g_ho6ouZxsv3MI`{-JXZ$u@%P0-18Fr34WzS#wiyo!ZaNRRaSlm{#i6k!kui81Su5SIR= zNB+kDI`jYY!Cwh~@>Zkctb2!LnKSlI^NUJ4yrnFRJ$(l9Wb@M5(@%25(=NT~^mm4M z+7JH!10N^L+-@JpDV;WV$p*H5-I>vCk@J0RQR+7;u2xXbCbmjywBIx^O z7@j@()2VSx+faC{xPU9BeZ|D6TFO0`8+Ec>-WxlD;zb>mcM~J%8u=dhN6pn$?oLn* zFUov>T`0sU$535_bCuZU$87!SxmVD|L1nwcOd&@IHF;HJZNxH{(_V|21u=^`xO`bP zxtVfV9mCdd$%a(B(#-2Mgxdj9Ek(OkLWgl;rX~92dp_wM0Y4mmAnsms67|nt-d}`u zy65k7iupejy}vw>zC+M~g}1>ga%zT{$q9QIOAyir*`dx%43v30XISe8Qikl9%(FDo zR5_==ZSPs$pp#OhCCtx6cLY<5iq!afEVLv$g!;GmT8DT-zFc{(iJ^Ktb~mR+%*5B! z@Oef8FFSz}0-yIc&4QJpE@`K+k63CC=ojMw?T?x-QD#e{`D9Om6!O&lSf5-CaR(Tj z{5#+Q@)n`WEDg}IOr}T|2?84bngw)0$ap}n^NM2KnYmGn2#t3;Av&1uj3MQ3mT2@Q z@w`W6zb_+o`z(mhOuYS}?5Mu`S-NHY6){t%|7U%wbA7uDuSyP!;r^75@gylH{h1M!B*`{?qt_-5s#482O9ftEAisLuDSi67;*)`}Y_@#Ab0XZ! zdc_ zcP}y_a%S!=_`$$P(|<`cijrA^One7Y>^J4xXI zm|$!;F!*--`b{ve+uR#u@XEQvr_Wpl2fe|)Vqs}yVC1V-9mi&S~u&0jIw%!-PFG;`S%3Wy$8i&L}xA_E9KewljFEf2I ze6u^_z8AErWx*iw`5^MK+nUcjo=?h1$kNZPhE|**H#Lxz@fhEWW*?VRZGGwMR!cMs z(yM%nB!!$^2lx5OXFWs1P<3rQi`xzm%<%`+F&S+o0K(iw@nznrXx!Ug9VfKkwWLrR zXUs_5ivD6lT^4o)eu!8P2g5YU+>FZZ*0EmV8e;%s*f54w^#_akj(6Rqc|5k`kJH<^EN>QR4gn zZnKmpnpyI|42$RecF~Y>z3>{LtTGW*lz(6PT~4-m=s4tRGXF=cVKo}OJ>=z8w55N* zZ8M?f8AJ3idQe&0bw+O6#lnHkijJIj3Ilu~N!n$7x%UMLfF+sijx-H}w)9Uj+Y5FD z$NbCOKDpp4?O>W7We@rtBS4j;Og!gfw1peMvF>+Wgf87evfl zMd4lOLxoc!dcHVCwN%ztsQDZ=`15y`;K^L?r;DJ0-=a){nG9@MTi>H_`o4QDBdL)@ z!SR+-M@nKfR5NR6;)pl9MkGmmtd-LEfJd3B?Cu%HH!MK$K(3(@Up+Z5zfDo(VJnoa zAcu&cKebrTYRGiVroH9!2Qu)gMoQ6xdxcayfx3%HH%7vrsU`qQ}Vi4%` z{Y=H`=Xf26O6*PQHLIxF?_=}8jltHryIUG5-pujcJu zV<|V^3}xj?QZ;9(&x{`d7~*kn8L9e0nKHrKDYoU2BMdz-Du?^JZ?z49BKegq%mcPC zcQy7Dd}kSpHoH}k?~qQPFPNPn)BmX-9@^mxN}@l1500;`q^pDJDAR}b5Mx)4hgkg} zX?kBpByl{(_-%@T(oj|h5le~R)=TU7I&~c`$kN0c%h79CVu@&%UX)QHuXI`^hLsx z^hYWA@^6r`=!4lgxN~^{%C*FFV$6gDdxbUFd*ZhjAt5$;h?(_LKUVkwqXE~1U# z3n1yD&nfGQgKl5d2Tq`DFSg4mSr9Di*c-{oeauaUUE4_6;AH4zVR+ZmW2M~1MJH)( z)Ima=U>XKfO!ww5qNz@T@{kFR_#}k&S{(6|mq)yLpwEE@$d5*TY>7{4y@nfx-9evU z)&9<&mxYoQpryB!6*%S>L*2Q)@V}Qo&yDT>h%H0fnK}8+G|Wflo*?*ukQ#{^Bm7%? z{~{q4A5F)(?H71T@+KEhDWuue2tYz{ieoPT#r%WqI)${rU@;`C2+XLI`m~u@<$pNq^i9n)Fuex$7Kp zAurR}v}f&DH8}gJGtb!)&Cr81Hm=0nWeDR(F{CKIs;s(ipbP(n?c9@vRwPbQrjYW; z)cUHJJXwvsy*x>-n??iK{UtDrf2We!OzPeSwvVzGHK%5Wcas z%~N+$-x8v`q5tYm){^W?C8+q4 zs`{~xl~HotTrqv&+>XaCJkj#}Flm)`-k$!k0#iIwG3TZ4c`md>$GV% z;+D2@WU?b2lt`A@_ccRCnk`5>)r24;*d5RtsQC}MMog;)08GlKEoo8LvwlRlc1Z(2 zSmePWVMVd>3P5*l@V#y$Y19CJj;!7r$alM{k0&k%ESUGXvAw|{=>3Tqj0mae8#3I> z%YCwJar0yIk*J;tfbTtyKKGm#EPL8~bSwN_NAfrgM%fBzFjs`7DYU|ToSO@Z-*;%O z$(7aGC4H)Wzqv3%sB$Wgu(U)9=QFY34^F>%p_3^B|KNTzZfiLGwW$m(_IZ<1c9uk- z-+1>bsB<`Hj6(aowdoUy(r^?EJ#aw|j%T&|8`M{KD!b2g-aaa8@Wt%T>P~sIGEMuN zgVy97ik)HYZbR#f>nr9*HGT-I&CTZ}M|PA4GrFE8`Ct;<8r(7|ce{AO{I>CDWU!&8;%fbkV{uWYo+Be-R#^+`Z<0V^ zHu9uMJ03dzQQTK=_;3ll8&Z9mYGvGMwDy6vv)OA82_vZ`+dcc3yxjMzA?kKU#5~H9 zc#yNMb4ml)7yhFSDz)+~|8;otx{~=90c#oYe}%jR|3?o75$c}0 zfF$>{b)}Etp<j@{QiP z%UK$>WC0}kGQMJC;jAzDCyjpMX?Y_}6*#^N=q(7-$H?rCcCN1wok8m71uJp~lnS`8 ze^&;sLZZ6VOzRpLsvv*JZ$Ds39xE0zsaY@iiPvIIg1X`sPA85U>qxSkU4jaIdGomf zQ`a>yuha2j%Rw(%g!?M0JDu0msk!3jg=_ou>%@{X2rc*PwJSI$Upg=Fes)3h_qiU> zoZa_KHIIrt&z^FG;CszcHJ`Nm?(rd;-M8m-3lB!3ECYqntRse+WOx@h=l6^yLTz~{ zbu&LlBBx7uiOV$nj_N~?jvk`C`?GDXLX=sdmVg^cEGO>PRBUExb}YYcnU{2Uvmwp; z3Vjb=A!#z4v_w%M!MCR?Rfil9)Mcqr2)^op8n&~fn^Bv+=mcq{;+Ndv*kG31qu&GJ zJb-`!sz(L^sMmtE6XuhHDS}R|vLi+N-PjGN+iNE3GG-*dF;vv(x~x!HF&r+0)}@;F zph@|SiY>lz4OfrM5+&S-?`_|bYPgMJL~Rx+3G=iayCW~7oRJ~T?+AhFk>`Z#m)>Gr`}LS)_vc@m-1Yk zWyY)ha|_C>4~yr=H%ckiS4lR9yh6?a59{e_HRj6fH8-;nblkA}CT@cO$BGIV+r#eY zNH+vXY2Jzf6qxUPq$L^#7HqF<&94Tp_ovT>`Z5RfPRrbL+-gTmrDCQ-O-yworZ422E%x}hyiQFXy%7H$a5X`_-S3B{Fup~)FqY`5Y+p%u@j=QHv zZWJE#>>bQ_G4y8!NpQorj(ivr-~&y+rrFb8xr#B?SiF?RB4Gul3fvRI9`;;yEJsqf zG`U-Xe=zG=7SvOidOPR6>z7M3>nxY_<>QR2yN#p*>5cU8c++J9DRX)q!NzcVE_P<{ zB3Xnd2qM!eWyjaM<3G_wU6sE_)_xOBt=q&<8(Kgz3wh0wSs^m?-8VWKEjM?2fDx48 z>L9BSApDHR1T??_oUB#^kTtEuEeuQqJ%js5=Wt!$HJPmw36M&nCGNw7D)K&FVKtbP z`LaNtwheO$C-@u9v1NUaS$(FW-vD;5vGZy9%uDsVr~8lAE?Cz>(%RtrG5j1Q6a9Rk+&W-SsV*)+&C}foYClVp z+;2F%UKna2CrLJd(c|z>>5K@AsN}R)b<)*WQ3~xUBFVTkZEoM8q{ER(hr|D`u-XW3 ze%m^i3!Rqt&x?^1(1uQ)Oy_#rBJVD7pk$b2LY9~}sAvy|V4=QSVH(5I=eoS9E#iaT zI)7ionhUMDZ*4zeX_uR~<8eh%{5H*%lD~uS=gZ&7@L5Hzy?{+45n>mnpzv-L^%`0$ z)FY&LCp%=w$dQ^<61L-yv-&wuPyUMqkoKN--SyEEkBY%B8Ar0Z`PRv#p<3?+lP}eJ zLxY8bT+#S*KwZ{}Nm2;a%IfF~v^@x*biiMImN2WfMBcHQpQ?$&m4IKzxe{qIyh^!F z`ZhHmL&w+TVAB`KESSkD8R~BfVAt=PZy63OHLn~E9{uLrT$hhteF|$dy?K-pI*I0^ zF}akp2BN~SpMl=ugse+!>`X$hRcqSi!=`6uc@=rdb$gDHD(;vAK8CGnhJF>TNXKCW z_>B{j_H^0HJaFABz zC+w{@v|}L!$6a_K2FC9{F($rnsiP(o$Xv)@Evbf7DqtK*6cHSd$Y?U=qg&MGi{FdqGj89*JgtugiG6@11pP7@1}ON#G~UYi`|9u zS!Axl-`B)*K;DWk5BgNc&Gkyu$TKxpW!nKu_#~SD<)fA-8|5`65}$UDa$$6cziG_P zc#@3EGsoBylEIdcOfjYyq(f*&It0?!v6q^kdn(`p+35hF4Vrim?ZRaq(yC@n(t#o4 zZ&@{*+suwW8kqj1{3Yae3_3+4Py8Hk99KHK{a{OlnCV>jyT$RLX0vZj8s#`p6E;jP zsF>MBBn(Xb0J^gm=>!5#a>KNFtg+!$6~D94QlA#6bb#=1E>r_o;HVy8-mk!x(@?iK z3~Ftz`}mY6-Nxz(BZ*NLgx}78de1y)4>LIKa13aHZPNy;o(kV=b4t$%c!SzjFz05WBZ-twpiJzIiI%GqM^PUYL2}ZECR3ENc&7#%tqJ7F`539(7#eks-rEcZt z{DZ)-)XaKjQ&IViA7u*f!K^K?%H?ROJC7`P5r`n!q$=|QWQDEjSirr4q4DkHDA&H17=AkCHWyz)&_NZsady=xfIt8+x);N}`Bo>BK-x znQI-tR7yy$r&Q;g-Q!si!o3Lf-%3}?2S)!@U!QiA?lFpeSU|cIY2v(YkuE?Yy;C0| z*H!s}IBzUC24;TJ7jv}xRxDa}Zld5VCkQf<=7%In;_0C_R$sSv&w(WKC#UHeMf(+f z9C77%T8K=B2VA={{TLA>z%Y;fEAB1?&lvKykzx$Ajdtl^OO`@F9*nQvFiwO$u9T=G zaqyjvb5=3Eh$kCdZ@f_ycM0X);v7n0azS{hhWFU@Pe8}@rLA*x1$k_e+_Gn>} zm5YicOht8#+zKH8%K-%0m12At2lq|$5#dSuAU$uqp~(O}qi(!sjNJgDb=s<@G-h?k zPbxdX0mi>>GKB#kQ&29rN|%+O)UOre2lZhx{Bw)+vVL1>2NFtI26=4hi>jlB z@ea|$rkT_|goNi1sL*MJ3S`-=XVYQP6~*LZs;aIBbVkB!NN0$=w_%tTKY(Q_Em31m zj6Cd3EVpmR#x=VHil;AMvfU*svihU#?}-O%^Z z@t}5fR%9Su#9<_|>3#ZZtx1wV_bv3oxjY~{{Wr0!@}d+gm5=QNe8|ljzE3ijErqhy zsjfW&)7L%^akFdZEhFcujm4%gZL`sAPXetF{34#`;m9q(ZNWWUfzLnU#SNVx;Sfa7 zFuknj8Cf(0V3jlEca5n6xgpMWXro?>Osca^6VByU8no&>(SHH^L;NuX!Ejy63!!fN zqv}EWwP}UQ=ZGk8n=I5)q}S3Ezxv2_*=iL?7-g|C^;4j~OJU>s0r_@~9*n~0P)!xD zSS{+4Vd1AN+qC~b)2AWEnD;uGD*$ncyy+N0U`9M6!ad_X90aQk!qe>Jmlen- zS2gR3*n*h={PN_%j$nzB?4BgC08Qn%9bpnA1wSNDO+9EJ!&ZfQij zy!_jKow2{93K?7Zp5Pd?^T2C$(U~s_%#&MTC=0j-{n#lagqV~+gaAz2o@1E;*Pll zdQa~YLOCF)^PF6-^zG<^)Epz1w-q*Yd_$fwKV9gVIj?I#oc1QFwNhOq zj}Q*T?|~m=S_#I1TM0%J5mXC*ega_8MGmyKrBK!*#YVeuBz!`|Lp#&+!8(?trv`zW znu^)UYTnXAu78)HCiP3(+C^B}S2U6e3IYez85~fcr+uvsXfc3E^p!cra7x0UTAO(aQA}y`RP$C}_SP|SWwAgP-fAUPWJmWI zdmkJF?pJ^QjW{IKvH+z#%T$}|%v5A9wkH6c4T82rU8mnKRHjENN^Ri&q(L8h?RhJ( z|7|0FG0{4Gnux)~uX4Ryrt62$z{&zdQ^HHHS;V6dMJJdDg~+*UO>1A=xde*#>Jvh0 z8+hgOfl+wWD9tq=DLc|6q?CM%B#7nSG(T=Yn|kE-SXb8%+A_wzUt&Y3#%@$QsMbyD zgLe@sSN~1Rb01xcqIHb(WIaAZrYVvH6v-=qKA-C-{jRR|<|UvG;3|qG!IF4Q5I=`k z>|8^uyegfS&q)lVbVtc2o=EY8x>oeO<)Gk7u4dMkRfZ9N(SN@oPzb!j6OOe19Y{ZvfEXB;i+z+agu5tECBtXYwVObv&gpYVd%QjVM zFJMbSE1dIKXeLl`FNF(Ug4}VVn*jJUeH3fB^XqD(fXVD@@{9#Y;yEoJ5I6YFuUm5& z=&FE#>JwIU_T!Y;c2a?U9a9YLGRy&P%@Q(>>=mUf-R*;eH;xNA(f4hI6gu!}W>e5QSFgo3?+IqFjhZoheAX|1 zL%4=(XAiiJpG!eIXjO_geAF)ZDvP~_C_S_Ldb%;f@o&Jz35K;8Krm0@3MPr1rf4T& zo$w3X(4avx2uuM0{i~+~%OHOh{9;UG`6n0;y{o;82w?N?kk{7F<(caa-7?-|z^j16 zH3`urzZ&EUZgZ*jw0A+6>4w60ya!gtVW<}@MN&w{`7>odgMI}kP3Fm zaPxl*iUhidWd%SNbE4ky+qv8nYbsHAEyi;sstn*}>BvW1gvqxC7MznFj~={{)_(S6 z7Lbd7oFCPFlbW0)>DHf(j86gGriZ<$Yke)6IzObT6D%}0D#1b8S!!Mmzu2d}0~oR^ z$2vjQ3~X$@z4U&|wXr2k5ga6TUo)8^ORcM^2T&(_902kJ=3U|R3NeX+p$h8J@p@jl z-NHt+9&YMj#Qw7jBp%r!yVLu&^>7m>A(d0DbV6h6JrKqPuN&X^6T&yT&yA8tB}p{E z>QgWubj5O{EB>SiBeHfOTPcf1urCzf>l>fn@_n8b+mF7z3}JAjt+AkWxoM-pK$3ud zgbtq3FNH+(s7v++&bE9&pU?TZDh4jJj~&dJ)B6DQD1SM1$nQ7yeOgf!vkI8{ojJ*1 zYM-?z#I*4*^vx7?0P=u~Sfp!u;f@CSB}F=E^b>F@a~nOLc-%|Bwz%lA7YO5~p|tcx zHMOShQNL%JO}=$jN$?#t;BHduGCN$vToqF>vU+^%FwhFCN>%Qqk@4_65Kq_3c6OoC z$}X6iqV7kt^?{Dhtm+6V?{GSp;)t!rko^I-N|9*pU&V4=`UB+6p92PEZG_?|3KR4> zkI5Nc)lf)_3QR{VU9ZEdu7{CQMpMx`IOC+DHy%}3z9;n#=v7}~-9(zq0pwTtz7xFvW?@&Rk z4u%*?%O;GjOnT&$i-qoVYU$`BaqqlL$ZXX$)xonmPX;D4{}NMY;EPZHVtpz<5v;I7 zInY6o%7_K$@|YbOSJC+V*hdS&4rYJUXKnkLIuAhY=zt%axMP z&g!*zw5XwP$NS6ge&)*jA_bMXD3j7UB`e;#$AS!daW`V(mv|x8lEuO%dH^W+{Jnn!oeCB zA+iahonPi!wYvmHl!?jx8K^*4JV1Op_%D@M+D?+1R}zbhUKYxfhR}gk8h@7KOM`iJ*e38lzY%XoAg$YZm|3~XWy2fmckkP zY%j$K$}Xm+h{vBqtq_+U$>OGb)nK&|5?xPm9zspK1NfK5cc$e0P>hK`Ca=>B{n1>n z?FDRVkYY0vT?ynL*@O=f8E%9-Df)wOOTnx40(_gI^F7_qNMicbm?|EpU%U5S>v5#}pToOY(n>X7KlCV^;azp`)3j6`yFIe(>VV#~tQF-J znUqltU}E#H7YRJm>bTr@fVsIeG77MTU^|vBo>=H%QjAMkw%NEXisE54z&fne`I?AC zpj>o4HE?cYR4fBfU1b9Hn@VXfa_%|30~yct1NDb|n1Iy*t0i==nbZP67|_EfjE>Z} zqd((=pvYGh-4^*sEJA#cZ_a!w8K^A=J1Y>6xXZNwsL#0T(ZCO3QW3L2KOlDhyK6o$ zqWSO7fV#M${FHpZN;C@%Ns+_7>tRQxj39KP;g2@Sk9c`I5DTHp{*=PU`R{yL9b6=` zwAcq(1-5CR%An5AjAW^0%LGwB06QRl!|L5oaO!zl+pn8) z)+|K?&$If!CO^3KBPyu>r@PnQZRXaGbIDsbm(ZqaZU+WU!kv6V34jefdokK z+yw-2p@$skiE2Ypdq#H6imq@%jh9!u6`!JL4xYL23E0MD-Q%Hi{NuB>UqMB_jqC=p zQdLp4_%NcPhFM@30Mpkm{sQ0a3g{^cXM7M8PkJwxH_-jO!F1UHFouN2EMo&N#M0&< zm=34D4}41-8bKEgB>X#xVkHlgmy>hBnJ|n!E}RL!u>yGScdyu@QKxZ2=JqG@~?)QK>181}Xxf#JMHm+@ z0YxM4sk4nN_PwnL3Y3w5+ZBl&GBh)t4Pf)fK3>eV9S8eli{l_Jj)HBiw5T`wmdbynPSvpE)Y_yhm%+Rz{NFjl%=@+W9Y9#ciV=49;$pFYIbw4HZOZ{$qQ0i}nS`LoH!ia#yAXS}R+i=w%T-FN$j8oX|xL|cZhJ6wUw$5+f$ak@VJ(1D*)Sgl`uNc*ja>nX)H zN^Gd;f@4MVkJm1w@wkxr_k9VqC-BSW6?#;<6z>b(F@5@)o9AQTcV10jlfF&SnW~ja z>(u&zO?x?;z&LvEe1V`0s879f-lY5s;2}=d1FIcry~xSp{KmEVC%+b{SN(VDtT>I-nhk^8_RNa73!JcU=LA3vv=p8M$~u~ zs#+ePiFK@JrK2;>I$m$79eY6?zOH;+?zQs;7O=#-@igF9@eUk1xk;d*$GoJX22Q ze$uVj6NyUkMy%QFhY;IBxCnUzO)o!Z9&T=?IG?itK0h(Mu<@Au?0g(UWMQ|0or(rz z9*0=HTu#Aj9OR{7G955JnLgxWBF@b8E=S)l1h_!@nzc&8ljCLPK{8JGUXtWQY{Lk!58yYf$Ah%kQW?@CdsWzd;?W5f-skAPtRs z?^KQC2kQ>W9{z5iDK5$eDCI<9yOwBi%3LS#YNWd>6O?I<3GWLUp7r{86+EG2DPtq6 zjO(6DfrX&wb$eJPHl@2?hP1ef_N%+^pcGl1+V+B{YriZgrtSu7%_U$u(qvm}zRL~o zfbUf$jOw5DJfD+;x?6Rv$&CZOykxit>_7wJ0Aa;zrr|(TGs*>Ms<>&S(W5*c zaImDpV;l|eu}Piio9Lgn{dz0898(ZF>Oo_0URcK;4I*iRR>hI z)hC{aJZVL8Myeu-Ey(B9MFWbRzY8arLQYlC7k%)w0e;nVvod)23BU z)RB@<`a9@_=p|Q=9R2gG}1b2H>Y@zF#N*Mhq5 zYfs46e-5*9f#=KaTxUzNEe8BU^>ilbW4Pgs_SyS`yyyoE4HrhZoX=p^cttSP+bV7> zi#soCRkJrQvEvj_cmUC-k5H$Y^<`Bg=4Y_yhUpCUB+E8^!nx!9xcTjChdk9mxw$yO zVx_bP+6buXd@x11`YPOi`E81_mE22+8)4KK5+!q{UqU3p>cV40; ztnr|!+wL?y%T1fLcKqDicm9EMPg$$VYPj$M?B@E+ZnFWmDyU=lXlZo}f0Fo7CGARS zCr>}`c9Z-K)R^m24Q=%0r-8Aj#m1}Yqd?}FWPYEboDUD-e7wP?xm<~J37CMR3Xfsx z%fwL90(2lc8oUAbCcgo#l(!0z895XClU>X41|pa-9ME1H`yAXuF&Y0j!FtC~U{2JO z(}=fDSQP&DSyh~kCgw(xfYx4O-_**R^`##_x;21ZS@Uuz4kr(;CTLy2{yW8ASCrYy z>J*h99Rr}!c|JNf9Q?h(pdWzBohI~OL8YM^ea!TeWwHk^zBSIPBU5_`I?ZpZ=+JuZ z82~FQa{^fN@`<0pcMyfM?xVQ7o!V+)zTIZiXH(Rvt83k)U?{%TJ`^X`(Zq(*cwk>T zKY`Z=^hv)Ary&82dCgEdZakn-l%lb|gSMcmORSTP&hv9!LbX?{+X1q2NbSmPbe*&? zTsYucj#)nmr}y0L>FRwl^pQl9eL9-2jJ=EapGVI|f?aJ)Yy{+_RR`8?zo0zR-Ow`A z@}_;EsK=5( zpk@H$c?;z=BY}~GfZ01bnw6@oa(eXI8my?g0}v#nHo)`xr`BiW{$ae5)jn_>QDDLjzt7q??jfx& zsw-YYqCDtYTZ+5ex=6976gkGL6@QMzk{iykxNPy#-m$<#$~_KIGW=G1lw6L^7>fQ!=%;AR5hW-RbMvn$P#Peey03Ox%CvmH>JKOFz>hnZ$t&b z&^HsjU|ZT=NPNN8uX``PNS_?Ucly(H>xHg=J(zbrdQWR-*@Vgy)l5xU%EU%N2C=sA zMQaQ71G^EzdAyA60$$v(aW8I<7cAWH@>KGH2%Ke~QU3K~itcRs05GISz`Q`4g5ifD zgLulLl}1ZOE(+@G0$%3lt*1xok-Ma#6nA^nlD$C2>M^1BHY}_HOPs3E2NnPWH*xYC zKGf^;LAa0sG_gwWPFHWmqD%T~Vm);w$OTAX^X2$Fm?)Lf zT`ot^`%i!^Zp|+nu~$d$Q?xAu)5mi2#m;VJj!fO!_nW?dplu!%%aF)2I~zzq_)2ne z*Wq_^V<0fDTeu8iNxImYI%nStOR$nwr8J$Ycz_Y>Dvcd@h!04oGC%+ z!A5Wq_Z+fxY|zt_C^)g*%PaYDDCP@a;T&P@*y=7vNY!LIB5s=SjhJjGmk)4QBoTLB zm#N^tM+I#jSX#Lvt(jk@jxm9?qV|it08YR*-=`(h3Z%=GVFlpgJAXDgT;cgorVdf~ z+9oMx$!mofBHgLRH{cpD)+4mNkonRPhjjhEPfIR6B#&d?1~=W&ZJ$!u2uxHf z(_XaN)=mJ(5U6Y>4Bl+oE+HaU^niTPWJSN3;sANeya-_>01Yi5W%T3GkTK9WYy55v z+v;5srwLWgJ6v8F`?LbL3jx2Te`etG3mC+uzhrF`WVIyUN;+Cw9LL9%wdKcxJ#({x z{$cZL27RqJr~&93LX%%Pv*I`J@e>|ygTUQ$de5qhj65+e;K?dOod(Y-!o43o8uLG$RV|*J;(pf$J;-p?; z(Y0t?xDddR2n!I!P9EXD{5D0Chd0ncdj0`yVz4}e#Yj`Iqr z-@yet^d4qG_6i95ZwJkO+jVr!=f{5gP~r}Q?SvDFVnFb=M7b1>67yE=!Wh6Efa8l1 z?E4A9DFu%6vX}kCMO;NU6Z2d?aU-3gQskjo1_X)2$Q6G?480Y+MGm$+U{Sw}>J-)| zpzOelY4Hbt_MZW@u*c-`S8AcDcI+Vo^%+o=fi8IaD_w9-mp>)(CZyxvnRHN_@!z7< z!KRu};?qpxEyp*ugpGW=}zTcKZsh@eJib?8~=G)0Q9*VSUd{Ukq4 zA{uhi#*!KYyEr7fzE5b{%MO-<@ui0?`wAv;V+humn&<-9mTWLrM=a!k{dV2$>R}pn zAH%y*(-)8Yz%f@s5&l4~JrwAWPc^Pzg%pHR*;U>m4JG9;(Xq+a;dI@&Rc|B{<#)_;pS-8+`_Xz8HfpM4@Tt=^EubV_+U*3 z39pK0h;++5biLm|6BkTr?CVbXF76?kN;ch4Inmbnhzm<8oB7eK07{4ap-hD^6S)+8 zs}e>0Q=2`KDSD60Jt;DSZQCCpYGc}paJUQ<7M6c}(vIt<*+5UlesyFrMFj_WV6eCm zTsx&!8=SM$_d!41w$hl11$tfYoJ~0~+rTFD3CY32Vxp-b_q}Ti$>{4vW}v1JU*%)j(QD2BvJ*p^ zaYWrkf#5&yNAnSDu|}36I6l_e5C#GYMNkbC>fYg$V>6zu4A`NmioW z=^{#;*<)z(mKJEFG_Ey1h>2EM6&@#&k$co+v%VZW0dOX=vn}@@IM-9cAMG{LuJHhp z*62h~OU5-G)a!=<%U<^qWP=e&U;EfYU}9ju4BjM%D)`|P4W$O`8nlKI*mX((;7F`L zxEU;HNg5p<`!`UT#n|@WvG(Pl(R4#?!y~Y($|nT7-ioRJ1xyN*CA5RuvF24^IRFc2 zI{0f_kozuqG5x}K!Tl<5JOt;zs6T9E+p(O;hUK`)@RM3Zp*`+K+ch14oP#f~Z3Wx< z+v>DzP+eZTHEmyk;dOnd@v>e6rZ0gGYb*q)^K^e$%DU~-S`Q+tr`cBr#||Cn>`oOV zz@3={?KDZe@I3j`_pDnTBm?5EfN0#i!!;@HRfo<&Q6>neC~G%buMq`XnnZQE&V`($ zj3Bt#pCYJ_ndTx^IyNf~XA9qvIh3m>YNg6nE5R+$x5>omF_<{uyx(oTt|EGD@ASu> zE`YAEU6Y%Tvb}O%eqSAKL$ATr@ejSZ$3emY*F`h^hVSmWR1er746uj;ldwJtFmIDe z<`f+#`B=wEPC~ghYo+nUKcEyqxXD+GG1SBL?Hz~7qyN6p`|LB~8telrh0F!|0@q%i z$RK;6It}({fcsuqR^AP{pXDtNbIT%bC(VOpUHecfwkpC}Dg*)ibu4{+DGn=XdUI&g zt9^>5LPGUf^~-frjy2rX`V7~ - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::Uniform Member List
-
-
- -

This is the complete list of members for mlx::core::Uniform, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, array &out) overridemlx::core::Uniformvirtual
mlx::core::UnaryPrimitive::eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out) overridemlx::core::Uniformvirtual
mlx::core::UnaryPrimitive::eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::UnaryPrimitiveinlinevirtual
is_equivalent(const Primitive &other) const overridemlx::core::Uniforminlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)mlx::core::Primitivevirtual
operator=(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
operator=(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
mlx::core::Primitive::operator=(const Primitive &other)=deletemlx::core::Primitive
mlx::core::Primitive::operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os) overridemlx::core::Uniforminlinevirtual
stream()mlx::core::Primitiveinline
UnaryPrimitive(Stream stream)mlx::core::UnaryPrimitiveinlineexplicit
UnaryPrimitive(const UnaryPrimitive &other)=deletemlx::core::UnaryPrimitive
UnaryPrimitive(UnaryPrimitive &&other)=deletemlx::core::UnaryPrimitive
Uniform(Stream stream)mlx::core::Uniforminlineexplicit
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)mlx::core::Primitivevirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::Uniformvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
~UnaryPrimitive()=defaultmlx::core::UnaryPrimitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_uniform.html b/docs/build/html/classmlx_1_1core_1_1_uniform.html deleted file mode 100644 index 45442f1a6..000000000 --- a/docs/build/html/classmlx_1_1core_1_1_uniform.html +++ /dev/null @@ -1,352 +0,0 @@ - - - - - - - -MLX: mlx::core::Uniform Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::Uniform Class Reference
-
-
- -

#include <primitives.h>

-
-Inheritance diagram for mlx::core::Uniform:
-
-
- - -mlx::core::UnaryPrimitive -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Uniform (Stream stream)
 
void eval_cpu (const std::vector< array > &inputs, array &out) override
 
void eval_gpu (const std::vector< array > &inputs, array &out) override
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
void print (std::ostream &os) override
 Print the primitive.
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
- Public Member Functions inherited from mlx::core::UnaryPrimitive
 UnaryPrimitive (Stream stream)
 An abstract base class for a primitive with a single output.
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
virtual ~UnaryPrimitive ()=default
 
 UnaryPrimitive (const UnaryPrimitive &other)=delete
 
 UnaryPrimitive (UnaryPrimitive &&other)=delete
 
UnaryPrimitiveoperator= (const UnaryPrimitive &other)=delete
 
UnaryPrimitiveoperator= (UnaryPrimitive &&other)=delete
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
 The vector-Jacobian product.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Uniform()

- -
-
- - - - - -
- - - - - - - -
mlx::core::Uniform::Uniform (Stream stream)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Uniform::eval_cpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::Uniform::eval_gpu (const std::vector< array > & inputs,
array & out )
-
-overridevirtual
-
- -

Implements mlx::core::UnaryPrimitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::Uniform::is_equivalent (const Primitive & other) const
-
-inlineoverridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ print()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::Uniform::print (std::ostream & os)
-
-inlineoverridevirtual
-
- -

Print the primitive.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::Uniform::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1_uniform.png b/docs/build/html/classmlx_1_1core_1_1_uniform.png deleted file mode 100644 index 1fe539076e6fc06a10e3b315eb56c94130e41238..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 876 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{xgBeH~F+Z{fQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-)JzX3_Dj46+y(_fHfXB^$ z|2d1w|LSorjoUvu$>dw=psZ+bG@7koYd1hIz4x71jW!sc3%ipaH`}RBPuAcpsUE5tvy@M=kqMq_u zt+=*tt$dc}B}ToqtDfGzcT4wC^4g+kk4y8?w_IagTmGo(o@Vx>Re^gSd0Pigs&mWm zoHYHyBo+OIs-AJjuAZ`d{*a+UT)g3wi*4||m5a~ru7PpMv*$={+pC;d6|aCz~iua{5T z&As2Ia<#_!waTN6N2{iaeg3&*MnV16rv~l0`TN=Y&2R09-llu^Z`98vniYS8p55K@ zY>(%y{;IUfl@%}ky4kPWb*(nYa{Ib4$;%dHLUG zi{4vx_sz?`u+Wxsep8lg|NJEX!SsJMaoc{axb`~i|GD_BDu3sI{PH;K>7366412n{ z4^;H5EZxcT(sbFi6w^i57es9oX8eOUSdb+DF|VBxB*i~z=FNFVdQ&MBb@0Ax?K{{R30 diff --git a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_allocator-members.html b/docs/build/html/classmlx_1_1core_1_1allocator_1_1_allocator-members.html deleted file mode 100644 index b98657fd7..000000000 --- a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_allocator-members.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::allocator::Allocator Member List
-
-
- -

This is the complete list of members for mlx::core::allocator::Allocator, including all inherited members.

- - - - - - - - - -
Allocator()=defaultmlx::core::allocator::Allocator
Allocator(const Allocator &other)=deletemlx::core::allocator::Allocator
Allocator(Allocator &&other)=deletemlx::core::allocator::Allocator
free(Buffer buffer)=0mlx::core::allocator::Allocatorpure virtual
malloc(size_t size, bool allow_swap=false)=0mlx::core::allocator::Allocatorpure virtual
operator=(const Allocator &other)=deletemlx::core::allocator::Allocator
operator=(Allocator &&other)=deletemlx::core::allocator::Allocator
~Allocator()=defaultmlx::core::allocator::Allocatorvirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_allocator.html b/docs/build/html/classmlx_1_1core_1_1allocator_1_1_allocator.html deleted file mode 100644 index 4d6d58379..000000000 --- a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_allocator.html +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - - -MLX: mlx::core::allocator::Allocator Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::allocator::Allocator Class Referenceabstract
-
-
- -

#include <allocator.h>

-
-Inheritance diagram for mlx::core::allocator::Allocator:
-
-
- - -mlx::core::allocator::CommonAllocator -mlx::core::metal::MetalAllocator - -
- - - - - - - - - - - - - - - - - - - -

-Public Member Functions

virtual Buffer malloc (size_t size, bool allow_swap=false)=0
 Abstract base class for a memory allocator.
 
virtual void free (Buffer buffer)=0
 
 Allocator ()=default
 
 Allocator (const Allocator &other)=delete
 
 Allocator (Allocator &&other)=delete
 
Allocatoroperator= (const Allocator &other)=delete
 
Allocatoroperator= (Allocator &&other)=delete
 
virtual ~Allocator ()=default
 
-

Constructor & Destructor Documentation

- -

◆ Allocator() [1/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::allocator::Allocator::Allocator ()
-
-default
-
- -
-
- -

◆ Allocator() [2/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::allocator::Allocator::Allocator (const Allocator & other)
-
-delete
-
- -
-
- -

◆ Allocator() [3/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::allocator::Allocator::Allocator (Allocator && other)
-
-delete
-
- -
-
- -

◆ ~Allocator()

- -
-
- - - - - -
- - - - - - - -
virtual mlx::core::allocator::Allocator::~Allocator ()
-
-virtualdefault
-
- -
-
-

Member Function Documentation

- -

◆ free()

- -
-
- - - - - -
- - - - - - - -
virtual void mlx::core::allocator::Allocator::free (Buffer buffer)
-
-pure virtual
-
-
- -

◆ malloc()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual Buffer mlx::core::allocator::Allocator::malloc (size_t size,
bool allow_swap = false )
-
-pure virtual
-
- -

Abstract base class for a memory allocator.

- -

Implemented in mlx::core::allocator::CommonAllocator, and mlx::core::metal::MetalAllocator.

- -
-
- -

◆ operator=() [1/2]

- -
-
- - - - - -
- - - - - - - -
Allocator & mlx::core::allocator::Allocator::operator= (Allocator && other)
-
-delete
-
- -
-
- -

◆ operator=() [2/2]

- -
-
- - - - - -
- - - - - - - -
Allocator & mlx::core::allocator::Allocator::operator= (const Allocator & other)
-
-delete
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_allocator.png b/docs/build/html/classmlx_1_1core_1_1allocator_1_1_allocator.png deleted file mode 100644 index a57dd94719d8f701ff258f2887d9d6d2ee95036f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1087 zcmeAS@N?(olHy`uVBq!ia0y~yU_1t72XHV0$t_=0KLRP~0G|-o|Ns93nJ?aaE$u(F z+`>S!Kw|ot7Y`mh0E(NQ4O;?~<17jC3uXZF!N8np_7w&O=2M<7jv*C{Z|6Row8=_< z)w*5l^`8I2@vJQZP1-fl_oT{oqK=$V@tM`KpFw{4l%Rd$4fc*3-{z~D-YTmITAbUi zj>NbpbG_vL=02hL|MiL&w@C*retY(#W^ZbiM=!(s&xe=vZ2r{|xx742TF}Hs1TbY_Gad?rv36J+otn^>#0|vQ1jGzfZr+xAa@lO}0HgTiz-MJx&Xc zx#qTev*>MI_MNkj?cKiW{<>rHg>tLiv-T|b_;IEARps8&%YKjVoP6nW``$z;YpK_z zg&U-9hhE)$@uu|b<&T{f<-Ygqt?o^JvdLgpd9wBT=l6Q^GyVWw`hCeU=ibw7*0JZ8 ze=WaSCt_o2d+XYps;$>=|LE`BR_l_r`mp;BgHXeX zC2kEb?&Q4`RIpens9;sz4P=?E6nwz#(aG@8vzH*=f9h@7?!TN2`=;;TWE7ldEcL^e=khdK8=}W>-qKL{!E$ww#H$RK}?x*bY-*lgiKK})sZ^R zCvTa3{`9Jq{>c%0`<8X5e=_?~7`1=ezU@!X{QUYMRQ>zw=fct9f1WwK&)5@HS-kw} zhuGe`3%p%DgAT7MoU>l(ZT~Bidl!FQ|9EuW%5&@F_oZJjswtKK{B_p7vL8hYwwuPS z-Lv=d-xMF=dWn*a8lG7z!jk81xy{FY z-$noZd;O$muRgog%8xlu=b9(IKl=X>YgOSlmE1mYsq3xw`X5Wbt)82($AW9#tYx}O zXU?oVf1~W$oBXpnZ=~b-N@5>ZPksNcL~dVH{n@rVoV$X+p{e@vcZK_66<2jruOMJ1 sQ)$J)cqi4KD6wyv*JEHTU;iX;ll}6onX+dMFsn0oy85}Sb4q9e0E06ZWdHyG diff --git a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_buffer-members.html b/docs/build/html/classmlx_1_1core_1_1allocator_1_1_buffer-members.html deleted file mode 100644 index e3bb6d0e3..000000000 --- a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_buffer-members.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::allocator::Buffer Member List
-
-
- -

This is the complete list of members for mlx::core::allocator::Buffer, including all inherited members.

- - - - - -
Buffer(void *ptr)mlx::core::allocator::Bufferinline
ptr() constmlx::core::allocator::Bufferinline
ptr()mlx::core::allocator::Bufferinline
raw_ptr()mlx::core::allocator::Buffer
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_buffer.html b/docs/build/html/classmlx_1_1core_1_1allocator_1_1_buffer.html deleted file mode 100644 index 263092690..000000000 --- a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_buffer.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - -MLX: mlx::core::allocator::Buffer Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::allocator::Buffer Class Reference
-
-
- -

#include <allocator.h>

- - - - - - - - - - -

-Public Member Functions

 Buffer (void *ptr)
 
void * raw_ptr ()
 
const void * ptr () const
 
void * ptr ()
 
-

Constructor & Destructor Documentation

- -

◆ Buffer()

- -
-
- - - - - -
- - - - - - - -
mlx::core::allocator::Buffer::Buffer (void * ptr)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ ptr() [1/2]

- -
-
- - - - - -
- - - - - - - -
void * mlx::core::allocator::Buffer::ptr ()
-
-inline
-
- -
-
- -

◆ ptr() [2/2]

- -
-
- - - - - -
- - - - - - - -
const void * mlx::core::allocator::Buffer::ptr () const
-
-inline
-
- -
-
- -

◆ raw_ptr()

- -
-
- - - - - - - -
void * mlx::core::allocator::Buffer::raw_ptr ()
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_common_allocator-members.html b/docs/build/html/classmlx_1_1core_1_1allocator_1_1_common_allocator-members.html deleted file mode 100644 index 7a70d6422..000000000 --- a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_common_allocator-members.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::allocator::CommonAllocator Member List
-
-
- -

This is the complete list of members for mlx::core::allocator::CommonAllocator, including all inherited members.

- - - - - - - - - - -
allocatormlx::core::allocator::CommonAllocatorfriend
Allocator()=defaultmlx::core::allocator::Allocator
Allocator(const Allocator &other)=deletemlx::core::allocator::Allocator
Allocator(Allocator &&other)=deletemlx::core::allocator::Allocator
free(Buffer buffer) overridemlx::core::allocator::CommonAllocatorvirtual
malloc(size_t size, bool allow_swap=false) overridemlx::core::allocator::CommonAllocatorvirtual
operator=(const Allocator &other)=deletemlx::core::allocator::Allocator
operator=(Allocator &&other)=deletemlx::core::allocator::Allocator
~Allocator()=defaultmlx::core::allocator::Allocatorvirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_common_allocator.html b/docs/build/html/classmlx_1_1core_1_1allocator_1_1_common_allocator.html deleted file mode 100644 index 8d6363adb..000000000 --- a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_common_allocator.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - -MLX: mlx::core::allocator::CommonAllocator Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::allocator::CommonAllocator Class Reference
-
-
- -

#include <allocator.h>

-
-Inheritance diagram for mlx::core::allocator::CommonAllocator:
-
-
- - -mlx::core::allocator::Allocator - -
- - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

virtual Buffer malloc (size_t size, bool allow_swap=false) override
 A general CPU allocator.
 
virtual void free (Buffer buffer) override
 
- Public Member Functions inherited from mlx::core::allocator::Allocator
 Allocator ()=default
 
 Allocator (const Allocator &other)=delete
 
 Allocator (Allocator &&other)=delete
 
Allocatoroperator= (const Allocator &other)=delete
 
Allocatoroperator= (Allocator &&other)=delete
 
virtual ~Allocator ()=default
 
- - - -

-Friends

Allocatorallocator ()
 
-

Member Function Documentation

- -

◆ free()

- -
-
- - - - - -
- - - - - - - -
virtual void mlx::core::allocator::CommonAllocator::free (Buffer buffer)
-
-overridevirtual
-
-
- -

◆ malloc()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual Buffer mlx::core::allocator::CommonAllocator::malloc (size_t size,
bool allow_swap = false )
-
-overridevirtual
-
- -

A general CPU allocator.

- -

Implements mlx::core::allocator::Allocator.

- -
-
-

Friends And Related Symbol Documentation

- -

◆ allocator

- -
-
- - - - - -
- - - - - - - -
Allocator & allocator ()
-
-friend
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1allocator_1_1_common_allocator.png b/docs/build/html/classmlx_1_1core_1_1allocator_1_1_common_allocator.png deleted file mode 100644 index 8b609c844a056c54cc34351188ec30309feafcae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 724 zcmeAS@N?(olHy`uVBq!ia0vp^_kcKngBeIVGF$5cDd_;85ZC|z{{xvX-h3_XKeXJ! zK(jz%`k5CG9y|bwo1P6@0+iz{3GxeO0P?}WoN4wI1_q{hPZ!6K3dXl{U-!LM;Av@h zT=nOle@#*UPF2O|w{ptiGlQDgKdV0Y=h|b~r|mLHCbZ9eQrOc9mCVrdADKMMvWvF% zT>l;~;c0aFf4lg##`r_go6ZW)%iP|$;oJ5!&glBrAMeg#JAd|P>6zGruMH-ptgGIW z*(Pf^;aAXEnZpe5i?Ld*zhcBPssHpxKy<+XAO~+TIZa(cXX=&AmNtY(g-)j?p|7LYV zd9upMApH-oOxH%~L?3)TL9gNEy9>u3UIW?k|Gu(kagoiWEn3HwJy(Mmt3G~A>M4w1 zJdpp2nc;C(&Ytt>8T&SVRNFQ2C)@GQr#KnPo>nj^T^H=kxpGS&uber*U3B zU;FmWGn0zEbL*4erD*PsUmiZ$=kMRGnS0th{r05JQwWM%6nZ29=pFv-)Qdp zk|i7cf6H^>IJHyv=Jf^en@74X%1K}L^3%dIp$|G+9-Ueny63dZ`VW&{ZzRB%8wpzY(Q_(+(_eK|4 - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::array Member List
-
-
- -

This is the complete list of members for mlx::core::array, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
array(T val, Dtype dtype=TypeToDtype< T >())mlx::core::arrayexplicit
array(const std::complex< float > &val, Dtype dtype=complex64)mlx::core::arrayexplicit
array(It data, std::vector< int > shape, Dtype dtype=TypeToDtype< typename std::iterator_traits< It >::value_type >())mlx::core::array
array(std::initializer_list< T > data, Dtype dtype=TypeToDtype< T >())mlx::core::array
array(std::initializer_list< float > data)mlx::core::array
array(std::initializer_list< int > data, Dtype dtype)mlx::core::array
array(std::initializer_list< T > data, std::vector< int > shape, Dtype dtype=TypeToDtype< T >())mlx::core::array
array(allocator::Buffer data, std::vector< int > shape, Dtype dtype, deleter_t deleter=allocator::free)mlx::core::array
array(const array &other)=defaultmlx::core::array
array(array &&other)=defaultmlx::core::array
array(std::vector< int > shape, Dtype dtype, std::shared_ptr< Primitive > primitive, std::vector< array > inputs)mlx::core::array
attach_event(Event e) constmlx::core::arrayinline
available enum valuemlx::core::array
begin() constmlx::core::arrayinline
buffer()mlx::core::arrayinline
buffer() constmlx::core::arrayinline
copy_shared_buffer(const array &other, const std::vector< size_t > &strides, Flags flags, size_t data_size, size_t offset=0)mlx::core::array
copy_shared_buffer(const array &other)mlx::core::array
data()mlx::core::arrayinline
data() constmlx::core::arrayinline
data_shared_ptr() constmlx::core::arrayinline
data_size() constmlx::core::arrayinline
detach()mlx::core::array
dtype() constmlx::core::arrayinline
end() constmlx::core::arrayinline
eval()mlx::core::array
event() constmlx::core::arrayinline
flags() constmlx::core::arrayinline
has_primitive() constmlx::core::arrayinline
id() constmlx::core::arrayinline
inputs() constmlx::core::arrayinline
inputs()mlx::core::arrayinline
is_available() constmlx::core::arrayinline
is_donatable() constmlx::core::arrayinline
is_tracer() constmlx::core::array
item()mlx::core::array
item() constmlx::core::array
itemsize() constmlx::core::arrayinline
make_arrays(std::vector< std::vector< int > > shapes, const std::vector< Dtype > &dtypes, const std::shared_ptr< Primitive > &primitive, const std::vector< array > &inputs)mlx::core::arraystatic
move_shared_buffer(array other, const std::vector< size_t > &strides, Flags flags, size_t data_size, size_t offset=0)mlx::core::array
move_shared_buffer(array other)mlx::core::array
nbytes() constmlx::core::arrayinline
ndim() constmlx::core::arrayinline
operator=(const array &other) &&=deletemlx::core::array
operator=(array &&other) &&=deletemlx::core::array
operator=(array &&other) &=defaultmlx::core::array
operator=(const array &other) &mlx::core::arrayinline
outputs() constmlx::core::arrayinline
overwrite_descriptor(const array &other)mlx::core::arrayinline
primitive() constmlx::core::arrayinline
primitive_id() constmlx::core::arrayinline
primitive_ptr() constmlx::core::arrayinline
scheduled enum valuemlx::core::array
set_data(allocator::Buffer buffer, deleter_t d=allocator::free)mlx::core::array
set_data(allocator::Buffer buffer, size_t data_size, std::vector< size_t > strides, Flags flags, deleter_t d=allocator::free)mlx::core::array
set_siblings(std::vector< array > siblings, uint16_t position)mlx::core::arrayinline
set_status(Status s) constmlx::core::arrayinline
set_tracer(bool is_tracer)mlx::core::arrayinline
shape() constmlx::core::arrayinline
shape(int dim) constmlx::core::arrayinline
siblings() constmlx::core::arrayinline
siblings()mlx::core::arrayinline
size() constmlx::core::arrayinline
status() constmlx::core::arrayinline
Status enum namemlx::core::array
strides() constmlx::core::arrayinline
strides(int dim) constmlx::core::arrayinline
unscheduled enum valuemlx::core::array
~array()mlx::core::array
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1array.html b/docs/build/html/classmlx_1_1core_1_1array.html deleted file mode 100644 index 25f218b83..000000000 --- a/docs/build/html/classmlx_1_1core_1_1array.html +++ /dev/null @@ -1,2000 +0,0 @@ - - - - - - - -MLX: mlx::core::array Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
- -
- -

#include <array.h>

- - - - - - - - -

-Classes

struct  ArrayIterator
 
struct  Data
 
struct  Flags
 
- - - -

-Public Types

enum  Status { unscheduled -, scheduled -, available - }
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

template<typename T >
 array (T val, Dtype dtype=TypeToDtype< T >())
 Construct a scalar array with zero dimensions.
 
 array (const std::complex< float > &val, Dtype dtype=complex64)
 
template<typename It >
 array (It data, std::vector< int > shape, Dtype dtype=TypeToDtype< typename std::iterator_traits< It >::value_type >())
 
template<typename T >
 array (std::initializer_list< T > data, Dtype dtype=TypeToDtype< T >())
 
 array (std::initializer_list< float > data)
 
 array (std::initializer_list< int > data, Dtype dtype)
 
template<typename T >
 array (std::initializer_list< T > data, std::vector< int > shape, Dtype dtype=TypeToDtype< T >())
 
 array (allocator::Buffer data, std::vector< int > shape, Dtype dtype, deleter_t deleter=allocator::free)
 
arrayoperator= (const array &other) &&=delete
 Assignment to rvalue does not compile.
 
arrayoperator= (array &&other) &&=delete
 
arrayoperator= (array &&other) &=default
 Default copy and move constructors otherwise.
 
 array (const array &other)=default
 
 array (array &&other)=default
 
arrayoperator= (const array &other) &
 
size_t itemsize () const
 The size of the array's datatype in bytes.
 
size_t size () const
 The number of elements in the array.
 
size_t nbytes () const
 The number of bytes in the array.
 
size_t ndim () const
 The number of dimensions of the array.
 
const std::vector< int > & shape () const
 The shape of the array as a vector of integers.
 
int shape (int dim) const
 Get the size of the corresponding dimension.
 
const std::vector< size_t > & strides () const
 The strides of the array.
 
size_t strides (int dim) const
 Get the stride of the corresponding dimension.
 
Dtype dtype () const
 Get the arrays data type.
 
void eval ()
 Evaluate the array.
 
template<typename T >
item ()
 Get the value from a scalar array.
 
template<typename T >
item () const
 
ArrayIterator begin () const
 
ArrayIterator end () const
 
 array (std::vector< int > shape, Dtype dtype, std::shared_ptr< Primitive > primitive, std::vector< array > inputs)
 The following methods should be used with caution.
 
std::uintptr_t id () const
 A unique identifier for an array.
 
std::uintptr_t primitive_id () const
 A unique identifier for an arrays primitive.
 
Primitiveprimitive () const
 The array's primitive.
 
std::shared_ptr< Primitive > & primitive_ptr () const
 A shared pointer to the array's primitive.
 
bool has_primitive () const
 Check if the array has an attached primitive or is a leaf node.
 
const std::vector< array > & inputs () const
 The array's inputs.
 
std::vector< array > & inputs ()
 
bool is_donatable () const
 True indicates the arrays buffer is safe to reuse.
 
const std::vector< array > & siblings () const
 The array's siblings.
 
std::vector< array > & siblings ()
 The array's siblings.
 
void set_siblings (std::vector< array > siblings, uint16_t position)
 
std::vector< arrayoutputs () const
 The outputs of the array's primitive (i.e.
 
void detach ()
 Detach the array from the graph.
 
const Flagsflags () const
 Get the Flags bit-field.
 
size_t data_size () const
 The size (in elements) of the underlying buffer the array points to.
 
allocator::Bufferbuffer ()
 
const allocator::Bufferbuffer () const
 
std::shared_ptr< Datadata_shared_ptr () const
 
template<typename T >
T * data ()
 
template<typename T >
const T * data () const
 
bool is_available () const
 
const Status status () const
 
void set_status (Status s) const
 
Eventevent () const
 
void attach_event (Event e) const
 
void set_tracer (bool is_tracer)
 
bool is_tracer () const
 
void set_data (allocator::Buffer buffer, deleter_t d=allocator::free)
 
void set_data (allocator::Buffer buffer, size_t data_size, std::vector< size_t > strides, Flags flags, deleter_t d=allocator::free)
 
void copy_shared_buffer (const array &other, const std::vector< size_t > &strides, Flags flags, size_t data_size, size_t offset=0)
 
void copy_shared_buffer (const array &other)
 
void move_shared_buffer (array other, const std::vector< size_t > &strides, Flags flags, size_t data_size, size_t offset=0)
 
void move_shared_buffer (array other)
 
void overwrite_descriptor (const array &other)
 
 ~array ()
 
- - - -

-Static Public Member Functions

static std::vector< arraymake_arrays (std::vector< std::vector< int > > shapes, const std::vector< Dtype > &dtypes, const std::shared_ptr< Primitive > &primitive, const std::vector< array > &inputs)
 
-

Member Enumeration Documentation

- -

◆ Status

- -
-
- - - - -
enum mlx::core::array::Status
-
- - - - -
Enumerator
unscheduled 
scheduled 
available 
- -
-
-

Constructor & Destructor Documentation

- -

◆ array() [1/11]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - - - - -
mlx::core::array::array (T val,
Dtype dtype = TypeToDtype<T>() )
-
-explicit
-
- -

Construct a scalar array with zero dimensions.

- -
-
- -

◆ array() [2/11]

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::array::array (const std::complex< float > & val,
Dtype dtype = complex64 )
-
-explicit
-
- -
-
- -

◆ array() [3/11]

- -
-
-
-template<typename It >
- - - - - - - - - - - - - - - - -
mlx::core::array::array (It data,
std::vector< int > shape,
Dtype dtype = TypeToDtype<typename std::iterator_traits<It>::value_type>() )
-
- -
-
- -

◆ array() [4/11]

- -
-
-
-template<typename T >
- - - - - - - - - - - -
mlx::core::array::array (std::initializer_list< T > data,
Dtype dtype = TypeToDtype<T>() )
-
- -
-
- -

◆ array() [5/11]

- -
-
- - - - - - - -
mlx::core::array::array (std::initializer_list< float > data)
-
- -
-
- -

◆ array() [6/11]

- -
-
- - - - - - - - - - - -
mlx::core::array::array (std::initializer_list< int > data,
Dtype dtype )
-
- -
-
- -

◆ array() [7/11]

- -
-
-
-template<typename T >
- - - - - - - - - - - - - - - - -
mlx::core::array::array (std::initializer_list< T > data,
std::vector< int > shape,
Dtype dtype = TypeToDtype<T>() )
-
- -
-
- -

◆ array() [8/11]

- -
-
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::array::array (allocator::Buffer data,
std::vector< int > shape,
Dtype dtype,
deleter_t deleter = allocator::free )
-
- -
-
- -

◆ array() [9/11]

- -
-
- - - - - -
- - - - - - - -
mlx::core::array::array (const array & other)
-
-default
-
- -
-
- -

◆ array() [10/11]

- -
-
- - - - - -
- - - - - - - -
mlx::core::array::array (array && other)
-
-default
-
- -
-
- -

◆ array() [11/11]

- -
-
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::array::array (std::vector< int > shape,
Dtype dtype,
std::shared_ptr< Primitive > primitive,
std::vector< array > inputs )
-
- -

The following methods should be used with caution.

-

They are intended for use by the backend implementation and the API may change.

- -
-
- -

◆ ~array()

- -
-
- - - - - - - -
mlx::core::array::~array ()
-
- -
-
-

Member Function Documentation

- -

◆ attach_event()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::array::attach_event (Event e) const
-
-inline
-
- -
-
- -

◆ begin()

- -
-
- - - - - -
- - - - - - - -
ArrayIterator mlx::core::array::begin () const
-
-inline
-
- -
-
- -

◆ buffer() [1/2]

- -
-
- - - - - -
- - - - - - - -
allocator::Buffer & mlx::core::array::buffer ()
-
-inline
-
- -
-
- -

◆ buffer() [2/2]

- -
-
- - - - - -
- - - - - - - -
const allocator::Buffer & mlx::core::array::buffer () const
-
-inline
-
- -
-
- -

◆ copy_shared_buffer() [1/2]

- -
-
- - - - - - - -
void mlx::core::array::copy_shared_buffer (const array & other)
-
- -
-
- -

◆ copy_shared_buffer() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
void mlx::core::array::copy_shared_buffer (const array & other,
const std::vector< size_t > & strides,
Flags flags,
size_t data_size,
size_t offset = 0 )
-
- -
-
- -

◆ data() [1/2]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
T * mlx::core::array::data ()
-
-inline
-
- -
-
- -

◆ data() [2/2]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
const T * mlx::core::array::data () const
-
-inline
-
- -
-
- -

◆ data_shared_ptr()

- -
-
- - - - - -
- - - - - - - -
std::shared_ptr< Data > mlx::core::array::data_shared_ptr () const
-
-inline
-
- -
-
- -

◆ data_size()

- -
-
- - - - - -
- - - - - - - -
size_t mlx::core::array::data_size () const
-
-inline
-
- -

The size (in elements) of the underlying buffer the array points to.

- -
-
- -

◆ detach()

- -
-
- - - - - - - -
void mlx::core::array::detach ()
-
- -

Detach the array from the graph.

- -
-
- -

◆ dtype()

- -
-
- - - - - -
- - - - - - - -
Dtype mlx::core::array::dtype () const
-
-inline
-
- -

Get the arrays data type.

- -
-
- -

◆ end()

- -
-
- - - - - -
- - - - - - - -
ArrayIterator mlx::core::array::end () const
-
-inline
-
- -
-
- -

◆ eval()

- -
-
- - - - - - - -
void mlx::core::array::eval ()
-
- -

Evaluate the array.

- -
-
- -

◆ event()

- -
-
- - - - - -
- - - - - - - -
Event & mlx::core::array::event () const
-
-inline
-
- -
-
- -

◆ flags()

- -
-
- - - - - -
- - - - - - - -
const Flags & mlx::core::array::flags () const
-
-inline
-
- -

Get the Flags bit-field.

- -
-
- -

◆ has_primitive()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::array::has_primitive () const
-
-inline
-
- -

Check if the array has an attached primitive or is a leaf node.

- -
-
- -

◆ id()

- -
-
- - - - - -
- - - - - - - -
std::uintptr_t mlx::core::array::id () const
-
-inline
-
- -

A unique identifier for an array.

- -
-
- -

◆ inputs() [1/2]

- -
-
- - - - - -
- - - - - - - -
std::vector< array > & mlx::core::array::inputs ()
-
-inline
-
- -
-
- -

◆ inputs() [2/2]

- -
-
- - - - - -
- - - - - - - -
const std::vector< array > & mlx::core::array::inputs () const
-
-inline
-
- -

The array's inputs.

- -
-
- -

◆ is_available()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::array::is_available () const
-
-inline
-
- -
-
- -

◆ is_donatable()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::array::is_donatable () const
-
-inline
-
- -

True indicates the arrays buffer is safe to reuse.

- -
-
- -

◆ is_tracer()

- -
-
- - - - - - - -
bool mlx::core::array::is_tracer () const
-
- -
-
- -

◆ item() [1/2]

- -
-
-
-template<typename T >
- - - - - - - -
T mlx::core::array::item ()
-
- -

Get the value from a scalar array.

- -
-
- -

◆ item() [2/2]

- -
-
-
-template<typename T >
- - - - - - - -
T mlx::core::array::item () const
-
- -
-
- -

◆ itemsize()

- -
-
- - - - - -
- - - - - - - -
size_t mlx::core::array::itemsize () const
-
-inline
-
- -

The size of the array's datatype in bytes.

- -
-
- -

◆ make_arrays()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
static std::vector< array > mlx::core::array::make_arrays (std::vector< std::vector< int > > shapes,
const std::vector< Dtype > & dtypes,
const std::shared_ptr< Primitive > & primitive,
const std::vector< array > & inputs )
-
-static
-
- -
-
- -

◆ move_shared_buffer() [1/2]

- -
-
- - - - - - - -
void mlx::core::array::move_shared_buffer (array other)
-
- -
-
- -

◆ move_shared_buffer() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
void mlx::core::array::move_shared_buffer (array other,
const std::vector< size_t > & strides,
Flags flags,
size_t data_size,
size_t offset = 0 )
-
- -
-
- -

◆ nbytes()

- -
-
- - - - - -
- - - - - - - -
size_t mlx::core::array::nbytes () const
-
-inline
-
- -

The number of bytes in the array.

- -
-
- -

◆ ndim()

- -
-
- - - - - -
- - - - - - - -
size_t mlx::core::array::ndim () const
-
-inline
-
- -

The number of dimensions of the array.

- -
-
- -

◆ operator=() [1/4]

- -
-
- - - - - -
- - - - - - - -
array & mlx::core::array::operator= (array && other) &&
-
-delete
-
- -
-
- -

◆ operator=() [2/4]

- -
-
- - - - - -
- - - - - - - -
array & mlx::core::array::operator= (array && other) &
-
-default
-
- -

Default copy and move constructors otherwise.

- -
-
- -

◆ operator=() [3/4]

- -
-
- - - - - -
- - - - - - - -
array & mlx::core::array::operator= (const array & other) &
-
-inline
-
- -
-
- -

◆ operator=() [4/4]

- -
-
- - - - - -
- - - - - - - -
array & mlx::core::array::operator= (const array & other) &&
-
-delete
-
- -

Assignment to rvalue does not compile.

- -
-
- -

◆ outputs()

- -
-
- - - - - -
- - - - - - - -
std::vector< array > mlx::core::array::outputs () const
-
-inline
-
- -

The outputs of the array's primitive (i.e.

-

this array and its siblings) in the order the primitive expects.

- -
-
- -

◆ overwrite_descriptor()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::array::overwrite_descriptor (const array & other)
-
-inline
-
- -
-
- -

◆ primitive()

- -
-
- - - - - -
- - - - - - - -
Primitive & mlx::core::array::primitive () const
-
-inline
-
- -

The array's primitive.

- -
-
- -

◆ primitive_id()

- -
-
- - - - - -
- - - - - - - -
std::uintptr_t mlx::core::array::primitive_id () const
-
-inline
-
- -

A unique identifier for an arrays primitive.

- -
-
- -

◆ primitive_ptr()

- -
-
- - - - - -
- - - - - - - -
std::shared_ptr< Primitive > & mlx::core::array::primitive_ptr () const
-
-inline
-
- -

A shared pointer to the array's primitive.

- -
-
- -

◆ set_data() [1/2]

- -
-
- - - - - - - - - - - -
void mlx::core::array::set_data (allocator::Buffer buffer,
deleter_t d = allocator::free )
-
- -
-
- -

◆ set_data() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
void mlx::core::array::set_data (allocator::Buffer buffer,
size_t data_size,
std::vector< size_t > strides,
Flags flags,
deleter_t d = allocator::free )
-
- -
-
- -

◆ set_siblings()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::array::set_siblings (std::vector< array > siblings,
uint16_t position )
-
-inline
-
- -
-
- -

◆ set_status()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::array::set_status (Status s) const
-
-inline
-
- -
-
- -

◆ set_tracer()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::array::set_tracer (bool is_tracer)
-
-inline
-
- -
-
- -

◆ shape() [1/2]

- -
-
- - - - - -
- - - - - - - -
const std::vector< int > & mlx::core::array::shape () const
-
-inline
-
- -

The shape of the array as a vector of integers.

- -
-
- -

◆ shape() [2/2]

- -
-
- - - - - -
- - - - - - - -
int mlx::core::array::shape (int dim) const
-
-inline
-
- -

Get the size of the corresponding dimension.

-

This function supports negative indexing and provides bounds checking.

- -
-
- -

◆ siblings() [1/2]

- -
-
- - - - - -
- - - - - - - -
std::vector< array > & mlx::core::array::siblings ()
-
-inline
-
- -

The array's siblings.

- -
-
- -

◆ siblings() [2/2]

- -
-
- - - - - -
- - - - - - - -
const std::vector< array > & mlx::core::array::siblings () const
-
-inline
-
- -

The array's siblings.

- -
-
- -

◆ size()

- -
-
- - - - - -
- - - - - - - -
size_t mlx::core::array::size () const
-
-inline
-
- -

The number of elements in the array.

- -
-
- -

◆ status()

- -
-
- - - - - -
- - - - - - - -
const Status mlx::core::array::status () const
-
-inline
-
- -
-
- -

◆ strides() [1/2]

- -
-
- - - - - -
- - - - - - - -
const std::vector< size_t > & mlx::core::array::strides () const
-
-inline
-
- -

The strides of the array.

- -
-
- -

◆ strides() [2/2]

- -
-
- - - - - -
- - - - - - - -
size_t mlx::core::array::strides (int dim) const
-
-inline
-
- -

Get the stride of the corresponding dimension.

-

This function supports negative indexing and provides bounds checking.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_custom-members.html b/docs/build/html/classmlx_1_1core_1_1fast_1_1_custom-members.html deleted file mode 100644 index 2acd0e4fb..000000000 --- a/docs/build/html/classmlx_1_1core_1_1fast_1_1_custom-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::fast::Custom Member List
-
-
- -

This is the complete list of members for mlx::core::fast::Custom, including all inherited members.

- - - - - - - - - - - - - - - - - - -
Custom(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)mlx::core::fast::Custominlineexplicit
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs)=0mlx::core::Primitivepure virtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs)=0mlx::core::Primitivepure virtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::fast::Customvirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os)=0mlx::core::Primitivepure virtual
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::fast::Customvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::fast::Customvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_custom.html b/docs/build/html/classmlx_1_1core_1_1fast_1_1_custom.html deleted file mode 100644 index 35642a556..000000000 --- a/docs/build/html/classmlx_1_1core_1_1fast_1_1_custom.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - -MLX: mlx::core::fast::Custom Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::fast::Custom Class Reference
-
-
- -

#include <fast_primitives.h>

-
-Inheritance diagram for mlx::core::fast::Custom:
-
-
- - -mlx::core::Primitive -mlx::core::fast::LayerNorm -mlx::core::fast::LayerNormVJP -mlx::core::fast::RMSNorm -mlx::core::fast::RMSNormVJP -mlx::core::fast::RoPE -mlx::core::fast::ScaledDotProductAttention - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Custom (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs)=0
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
virtual void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs)=0
 
virtual void print (std::ostream &os)=0
 Print the primitive.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ Custom()

- -
-
- - - - - -
- - - - - - - - - - - -
mlx::core::fast::Custom::Custom (Stream stream,
std::function< std::vector< array >(std::vector< array >)> fallback )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ jvp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
virtual std::vector< array > mlx::core::fast::Custom::jvp (const std::vector< array > & primals,
const std::vector< array > & tangents,
const std::vector< int > & argnums )
-
-overridevirtual
-
- -

The Jacobian-vector product.

- -

Reimplemented from mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
virtual std::vector< array > mlx::core::fast::Custom::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::Primitive.

- -

Reimplemented in mlx::core::fast::RMSNorm, mlx::core::fast::LayerNorm, and mlx::core::fast::RoPE.

- -
-
- -

◆ vmap()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual std::pair< std::vector< array >, std::vector< int > > mlx::core::fast::Custom::vmap (const std::vector< array > & inputs,
const std::vector< int > & axes )
-
-overridevirtual
-
- -

The primitive must know how to vectorize itself across the given axes.

-

The output is a pair containing the output arrays representing the vectorized computation and the axes which corresponds to the vectorized dimensions of each output.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_custom.png b/docs/build/html/classmlx_1_1core_1_1fast_1_1_custom.png deleted file mode 100644 index 6d384f81c061b79bb2110491cefc4b5c09b618b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2664 zcmd5;dsGuw8b@STnn}SQL>|!b3uWT~nk~ zFjA_55?vMSL=0BsErZEI+64>{!$Zu55RqpfA%p}nnb`?p|KZqk_Uu2q-?=k$=lk7z z=X=kW9}?teh1-lXGc&XD|Mc(?Gqc|*vH1ndwb-3q+L556X4v~O5zWh0^YFDD*T2Tm~xwkA&T3i*6Jg;uJX8rjgAll1&=YAw1dp*$4HAxHi;&JGJ>XCwM zi{x=`gW$GHyu94pT!Qy4rM0giNk-nH<@2~;q(9El+}ymenl76K7YBr6+qkz*$SRo( zq%L%#Qn?*71wPmXj_Ar5#tY+-? ztjNSEUGa=F_067Hfq%yU2_E^AlCiHd zmC`ybSE`7CqLIfl@y@25nSnA!&v?__4u#1dx)K4HHV~>xzaZh=znT|^E-Gt>PC>Mo zoEM2Lie_OCMJ>B2CkBb!CI3F5T1i^chCk)Icaa~}$oC^@^m% zqoxp2#!?BBI`6)?q^lJZy)=D;j9c5ue$QTbX)!*ov|^%vC0rmESRp;8k84AuiA=_e z>!!$HM{$*7J~WQft+1@Bnes~W+N34?@&prd825b9aHBG=)Q*5he|}mdPbM4X5$(P~ z7P$vzm@?A7j{wJeobFhH(__jvE~K~J>Z?N&IM%aythdnzg=|dH&sQW3r(zl!7%Kv; zGUw|2{tfusxJ`{~jRj$iu=*U9S-H8jE3xlW7P#4%ROY3{Cfycj^EoC?7T`7i2i2{xeCr#(-Z{j5*YRx0|Cp(KSMFKJ zefXY$Lc93)U>F;eErPJj%+EyMUsN*}GY|zvQX+sk^ zP)ASJbpufnnI*ia)Mq1x4;+ate^av4JW^_;6Z`r~m$K#1(O2s#=o%j5pVVuHJ>^k4 zq5hPcU-%6DyR^tB24b01ePQg0y}o>=SRzf9B;Q|bT!&*2TSKUZ$nrs&n082%1swI@L?9kNwj^hzG+JntsNESf|oORsc0gH5}#r@<+Thp>b;sIB7q# z6RsESt;6!h2_}hsH|Me(mNcg~U94o;?}gAncpVet_fI}1CAtb(r9Z0S@p*rGh zp%90@w5w~U2g%6ge+I1V?ZTAJa~)1&f|e*5dWgIV(Im z%9>>_RoWqw{iCyZhQYEfWq^uf&~+b?Yw0p}N^`*$BDYsurO(m3wqNyWjS1JC-mnOx zOeXYN9KNklC%*qjjf*YfaJVIVk{zKFHV_z*I$=R-M5|!XFkRRZ{=|EHB(xrw2`0eu zn?rlOpc_{b6YHZXo>~PIf0<9$dkA)oQ4%tA$3~}csD@Qk^u4?v01Uruz@ah@MM7_K zsabl?4bySIr)i&~2V`7oG@(~PcXO#hf^le%r6B8iQL3)QF|5;N*nL`NL1Z)=NSh~3D=f$!Lu)mouF(O1WA{5`BDm;5nz~}%jWx| z{1%~)u@qtb##!rNH%MDH4^8V|sHdZYou>U^*XtoH} ow4F{U-jB5qWyXRqyB8ttb-~@*k%(KwdO|aQ-=M<}4#s}-FS^1b`2YX_ diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm-members.html b/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm-members.html deleted file mode 100644 index 7c29baf14..000000000 --- a/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm-members.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::fast::LayerNorm Member List
-
-
- -

This is the complete list of members for mlx::core::fast::LayerNorm, including all inherited members.

- - - - - - - - - - - - - - - - - - - - -
Custom(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)mlx::core::fast::Custominlineexplicit
DEFINE_PRINT(LayerNorm) bool is_equivalent(const Primitive &other) const overridemlx::core::fast::LayerNorm
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::LayerNorminlinevirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::LayerNormvirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::fast::Customvirtual
LayerNorm(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)mlx::core::fast::LayerNorminline
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os)=0mlx::core::Primitivepure virtual
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::fast::LayerNormvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::fast::Customvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm.html b/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm.html deleted file mode 100644 index dd9db97ac..000000000 --- a/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - -MLX: mlx::core::fast::LayerNorm Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::fast::LayerNorm Class Reference
-
-
- -

#include <fast_primitives.h>

-
-Inheritance diagram for mlx::core::fast::LayerNorm:
-
-
- - -mlx::core::fast::Custom -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 LayerNorm (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
 DEFINE_PRINT (LayerNorm) bool is_equivalent(const Primitive &other) const override
 
- Public Member Functions inherited from mlx::core::fast::Custom
 Custom (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual void print (std::ostream &os)=0
 Print the primitive.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ LayerNorm()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::fast::LayerNorm::LayerNorm (Stream stream,
std::function< std::vector< array >(std::vector< array >)> fallback,
float eps )
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ DEFINE_PRINT()

- -
-
- - - - - -
- - - - - - - -
mlx::core::fast::LayerNorm::DEFINE_PRINT (LayerNorm ) const &
-
-override
-
- -
-
- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::LayerNorm::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-inlineoverridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::LayerNorm::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::fast::LayerNorm::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::fast::Custom.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm.png b/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm.png deleted file mode 100644 index 202a404d0d3ee549d25154cfcb6d4a2a78cd694a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 951 zcmeAS@N?(olHy`uVBq!ia0vp^bAh;ngBeJkdMtScNJ$6ygt-3y{~ySF@#br3|Doj; z2ATyD)6cwk@ZbSZ-1KbN5}+JsNswPK1CS2}=1jA%FfcGXdAc};R4~4s`?~M30#9o{ zf6&wK^^eZ-8ni6wwYKiw()UB;)X|!Q2A{<>mzwB$s90(yx=*q@)TdHglcuin({hvD z;+@{L`YJye>yN)nJGVGsd)cJ@C97wgIDYNPb+a|^!esY+%TdgllN#~!;yI<0ebu{7 zrCOUW=_SrCdgXK8ps&|qlJdPbb9t}5<<+#gJa6~CpYw0>>K|Hqw=is0q{_{Y8|UuL z7OyV1`DKk;Sg!Eommr>C96F3xAmb@)#% z+r$5Va+&$*{H^=$r>no-Q~D~*FtG3a`SrOGcPH(QI(B29mD=Rp{hpPsleY1^op!Kt z&xCC=uJ3co+$6hXj#qLy*UWI0%+nR`-`vr&UGl+av$N~-E6Mg7em{8ltTsE{zuK>Q zW?5$VuKinHUv>(zlKOqiVn*e=f9KZi6#ctXI`v!9PMLK3WRYu5iMlGeKhLa7*|~S~ z*G1P}WFLMQ@ILHsb-B#HNq;ZbOxk*+-e}Sn!7`PX%CN9Hs<(7X8Y@HH1aStR(^tyY zUq4e7d|S6j`1RRb@p3VSJp_XWS;6D~n}h{tigm1dwWMY4s#X0Pf{-|1 z^tZZa3a_>Ob$Nfh>b>UAZMV}NT`9h0#`h*9^uJzTYu)*Co6oJkxpUgjqi0sFvQq&H j*Mhxu)Xya)>>tC9I}5dR|L^kxW-$g&S3j3^P6 - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::fast::LayerNormVJP Member List
-
-
- -

This is the complete list of members for mlx::core::fast::LayerNormVJP, including all inherited members.

- - - - - - - - - - - - - - - - - - - - -
Custom(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)mlx::core::fast::Custominlineexplicit
DEFINE_PRINT(LayerNormVJP) bool is_equivalent(const Primitive &other) const overridemlx::core::fast::LayerNormVJP
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::LayerNormVJPinlinevirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::LayerNormVJPvirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::fast::Customvirtual
LayerNormVJP(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)mlx::core::fast::LayerNormVJPinline
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os)=0mlx::core::Primitivepure virtual
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::fast::Customvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::fast::Customvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm_v_j_p.html b/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm_v_j_p.html deleted file mode 100644 index 81a4b6e49..000000000 --- a/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm_v_j_p.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - -MLX: mlx::core::fast::LayerNormVJP Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::fast::LayerNormVJP Class Reference
-
-
- -

#include <fast_primitives.h>

-
-Inheritance diagram for mlx::core::fast::LayerNormVJP:
-
-
- - -mlx::core::fast::Custom -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 LayerNormVJP (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
 DEFINE_PRINT (LayerNormVJP) bool is_equivalent(const Primitive &other) const override
 
- Public Member Functions inherited from mlx::core::fast::Custom
 Custom (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual void print (std::ostream &os)=0
 Print the primitive.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ LayerNormVJP()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::fast::LayerNormVJP::LayerNormVJP (Stream stream,
std::function< std::vector< array >(std::vector< array >)> fallback,
float eps )
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ DEFINE_PRINT()

- -
-
- - - - - -
- - - - - - - -
mlx::core::fast::LayerNormVJP::DEFINE_PRINT (LayerNormVJP ) const &
-
-override
-
- -
-
- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::LayerNormVJP::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-inlineoverridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::LayerNormVJP::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm_v_j_p.png b/docs/build/html/classmlx_1_1core_1_1fast_1_1_layer_norm_v_j_p.png deleted file mode 100644 index e81afc1426049bda9e0cf122b880207911ac2fe1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 994 zcmeAS@N?(olHy`uVBq!ia0vp^TY1SR%c<=xyZhAIs2~du+B*-tA0mugfbEer>7#NsyJzX3_Dj46+eZ6V(8X-3M zS*t|8*B_l9XsM}I_%`L6_thmYmKI4w$wbtPCih%k$YCIv$D7a`&3vQaz7<1_U&TMS z6BSzGq_m&U>bQ_V!)7wtn86${YAt=k6(Id#(qp^P}z4 z6%920UdavhYh0EpvAmbzL!Wf^UB99TZ;m-HKmYon_kYgU0_M1=_mUvqnJ z{l;t0WxrpOdf@yo>F(QO$#L_Ip6o5%oy>Uevwg($oR{Y(6xsjKVBB?S?E(FB0uA+S z+u1f8T+5hKkj)^yY-^w4v6~Z?$bX!$0C2BW+6T4i?ZA#6WQP>dpYAQ|IED} z{wr*kZ=J6=DWx^qdlGM+uBX|KttvMkT$_~AOh{mtkQ2w{g%g6jCO^EUxfG~=`IJe# z>92R^3-U3adVJd9Z#lz>n5$=Zuc&y za~4)S{Gy`$7i6BtlHpC3+= eb>i6kQJ#0h&d1B9wMGGRBZH@_pUXO@geCyM#`Wd^ diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm-members.html b/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm-members.html deleted file mode 100644 index ab88c81d7..000000000 --- a/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm-members.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::fast::RMSNorm Member List
-
-
- -

This is the complete list of members for mlx::core::fast::RMSNorm, including all inherited members.

- - - - - - - - - - - - - - - - - - - - -
Custom(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)mlx::core::fast::Custominlineexplicit
DEFINE_PRINT(RMSNorm) bool is_equivalent(const Primitive &other) const overridemlx::core::fast::RMSNorm
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::RMSNorminlinevirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::RMSNormvirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::fast::Customvirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os)=0mlx::core::Primitivepure virtual
RMSNorm(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)mlx::core::fast::RMSNorminline
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::fast::RMSNormvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::fast::Customvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm.html b/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm.html deleted file mode 100644 index c476b2c96..000000000 --- a/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - -MLX: mlx::core::fast::RMSNorm Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::fast::RMSNorm Class Reference
-
-
- -

#include <fast_primitives.h>

-
-Inheritance diagram for mlx::core::fast::RMSNorm:
-
-
- - -mlx::core::fast::Custom -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 RMSNorm (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
 DEFINE_PRINT (RMSNorm) bool is_equivalent(const Primitive &other) const override
 
- Public Member Functions inherited from mlx::core::fast::Custom
 Custom (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual void print (std::ostream &os)=0
 Print the primitive.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ RMSNorm()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::fast::RMSNorm::RMSNorm (Stream stream,
std::function< std::vector< array >(std::vector< array >)> fallback,
float eps )
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ DEFINE_PRINT()

- -
-
- - - - - -
- - - - - - - -
mlx::core::fast::RMSNorm::DEFINE_PRINT (RMSNorm ) const &
-
-override
-
- -
-
- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::RMSNorm::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-inlineoverridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::RMSNorm::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::fast::RMSNorm::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::fast::Custom.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm.png b/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm.png deleted file mode 100644 index 0cb8e0a310f3b7a732e96136a5e706655baa4d09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 927 zcmeAS@N?(olHy`uVBq!ia0vp^(}B2ygBeKPJ=n<#q@)9ULR|m<{|{uoc=NTi|Il&^ z1I+@7>1SR%c<=xyZhAIs2~du+B*-tA0mugfbEer>7#NtfJY5_^Dj46+yIm^eEWZ`yk2NDD^O+jqtBbZzew4C zZ1dlX-74n`Dovm7vyXR{v#-9n+i{Zcx{9fDwte5Y$KNdM#4?lYJ>~MApT2YGPx>MZ zb>sO%ahglF$T57-m1EeT&|PIKm))iNYHOyh=C)Pgcib6vI8`t<%>Tf|VE>Snq3#ej z!=Dy$h98{z3?GE!7#^taVL0HAtl(cuxR<6bhmfb9d&R^h^FJtg+CPtTnj}6Uui>Z0 zZT^$XYB>Izt~VEcpI`esRKK#Xg6~%RnIFk#e{L*aefvX|Zf#EV+sP--9$#SdxO)BC z=y#e+bf10fid~h%tm&M&r)@&zG5+7F?xiOcT9wbP6PdX1sNUM>S345zKW%z$slJoP z`m5I2?R$TzOqkMlY(9;R$Ws# zU-bB!uivh`U;nsbdJO;L$NvR9?$*Dvg?lC9_a_w4JSXqT&E zpEWN2E)$(Q<#FWn*|N(MH#=^RFI%+h=+;QrtqVP)BVRwMnQ5}e>3mpfc=6@eGcKfP zFW+pg_u15Q&7$jjd?sxEo3&@Qw%NSjuM$?}Re%x?$7UP8l`r?^O!>9vWoXf@d&jFd z--;Z!wbi?jQtY>Hzt4@G(^tK6YMH)j)%*`Zp - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::fast::RMSNormVJP Member List
-
-
- -

This is the complete list of members for mlx::core::fast::RMSNormVJP, including all inherited members.

- - - - - - - - - - - - - - - - - - - - -
Custom(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)mlx::core::fast::Custominlineexplicit
DEFINE_PRINT(RMSNormVJP) bool is_equivalent(const Primitive &other) const overridemlx::core::fast::RMSNormVJP
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::RMSNormVJPinlinevirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::RMSNormVJPvirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::fast::Customvirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os)=0mlx::core::Primitivepure virtual
RMSNormVJP(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)mlx::core::fast::RMSNormVJPinline
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::fast::Customvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::fast::Customvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm_v_j_p.html b/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm_v_j_p.html deleted file mode 100644 index 4b010e9d1..000000000 --- a/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm_v_j_p.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - -MLX: mlx::core::fast::RMSNormVJP Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::fast::RMSNormVJP Class Reference
-
-
- -

#include <fast_primitives.h>

-
-Inheritance diagram for mlx::core::fast::RMSNormVJP:
-
-
- - -mlx::core::fast::Custom -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 RMSNormVJP (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
 DEFINE_PRINT (RMSNormVJP) bool is_equivalent(const Primitive &other) const override
 
- Public Member Functions inherited from mlx::core::fast::Custom
 Custom (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual void print (std::ostream &os)=0
 Print the primitive.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ RMSNormVJP()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - -
mlx::core::fast::RMSNormVJP::RMSNormVJP (Stream stream,
std::function< std::vector< array >(std::vector< array >)> fallback,
float eps )
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ DEFINE_PRINT()

- -
-
- - - - - -
- - - - - - - -
mlx::core::fast::RMSNormVJP::DEFINE_PRINT (RMSNormVJP ) const &
-
-override
-
- -
-
- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::RMSNormVJP::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-inlineoverridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::RMSNormVJP::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm_v_j_p.png b/docs/build/html/classmlx_1_1core_1_1fast_1_1_r_m_s_norm_v_j_p.png deleted file mode 100644 index 39e2b0d047114e829281dfb67b725699313f8a94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 981 zcmeAS@N?(olHy`uVBq!ia0vp^>w&m~gBeIJd+L1>NJ$6ygt-3y{~ySF@#br3|Doj; z2ATyD)6cwk@ZbSZ-1KbN5}+JsNswPK1CS2}=1jA%FfcGDc)B=-R4~4s`?hb1f`Ds& z>?FUv|Ap7*a*N1YS-rf){EH^{$tV-dH&i~mG{c; zv#*s`{}Y*1)3o`$>-_i=_r6WtBlWvk@^!?%n%lFlimvUwZ(7|Um7X0|w`H%#r=HpS z-v1Es^Rix1JJo*2%9+PD3VM8+wEK1T;quq+T<*92yiNbuUb8&<&6V#bHY^kOocHn0 z^>?o)f0g}yrGKAFW&81cXX{>nEEood&FW;aHRgWnP#?a-L{iYUM&umo2Zf=^E>ZuF^giZ z;r8=0o=#n>kgC!9Ucji|W0G-QM7;Fc-z%0BEQvg-WO3z&X1RC4-UIQUxBk{p_kLOS zDtguacem?(CSAICX8FE3Uu0JAe|!7QcDwrYp9M-29@i92Jrt#}rd1`~=8Nvmi}U!u z2CR6zH(n;J^!l~W-*1Gernmi5u@tKB_q@~(^94uzq%X;zeKnVsGBEJRF>Da%{<$wM zn^XVU?w5M1duHX&;b(Z@`GcuJ{vkI5Fk~5i2<~He;7&l`xT?}70fEq~sT}d4q4tNu zL$CH<{JwI3iR`KKwbrx6e{ZfWH46&feYa@A`X78}SLaKvJF~jB^!D|CXZB6X{?=YL z^Ud2C1<}#BZtOC?Z`Ag-^3Uqz*&4<7*H*q$T(xaRwB*+H;TJtE-<3*k`fZY9w&VG2 zjw}A5t3yMiXPu7^%b&FW+2&fO^J&(V#Z&kD*ZBTV{$#29Yo&d - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::fast::RoPE Member List
-
-
- -

This is the complete list of members for mlx::core::fast::RoPE, including all inherited members.

- - - - - - - - - - - - - - - - - - - - -
Custom(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)mlx::core::fast::Custominlineexplicit
DEFINE_PRINT(RoPE) bool is_equivalent(const Primitive &other) const overridemlx::core::fast::RoPE
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::RoPEinlinevirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::RoPEvirtual
is_equivalent(const Primitive &other) constmlx::core::Primitiveinlinevirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::fast::Customvirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os)=0mlx::core::Primitivepure virtual
RoPE(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, int dims, bool traditional, float base, float scale, int offset, bool forward)mlx::core::fast::RoPEinline
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::fast::RoPEvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::fast::Customvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_ro_p_e.html b/docs/build/html/classmlx_1_1core_1_1fast_1_1_ro_p_e.html deleted file mode 100644 index 745b490be..000000000 --- a/docs/build/html/classmlx_1_1core_1_1fast_1_1_ro_p_e.html +++ /dev/null @@ -1,352 +0,0 @@ - - - - - - - -MLX: mlx::core::fast::RoPE Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::fast::RoPE Class Reference
-
-
- -

#include <fast_primitives.h>

-
-Inheritance diagram for mlx::core::fast::RoPE:
-
-
- - -mlx::core::fast::Custom -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 RoPE (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, int dims, bool traditional, float base, float scale, int offset, bool forward)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
 DEFINE_PRINT (RoPE) bool is_equivalent(const Primitive &other) const override
 
- Public Member Functions inherited from mlx::core::fast::Custom
 Custom (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual void print (std::ostream &os)=0
 Print the primitive.
 
virtual bool is_equivalent (const Primitive &other) const
 Equivalence check defaults to false unless overridden by the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ RoPE()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mlx::core::fast::RoPE::RoPE (Stream stream,
std::function< std::vector< array >(std::vector< array >)> fallback,
int dims,
bool traditional,
float base,
float scale,
int offset,
bool forward )
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ DEFINE_PRINT()

- -
-
- - - - - -
- - - - - - - -
mlx::core::fast::RoPE::DEFINE_PRINT (RoPE ) const &
-
-override
-
- -
-
- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::RoPE::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-inlineoverridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::RoPE::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-overridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ vjp()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
std::vector< array > mlx::core::fast::RoPE::vjp (const std::vector< array > & primals,
const std::vector< array > & cotangents,
const std::vector< int > & argnums,
const std::vector< array > & outputs )
-
-overridevirtual
-
- -

The vector-Jacobian product.

- -

Reimplemented from mlx::core::fast::Custom.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_ro_p_e.png b/docs/build/html/classmlx_1_1core_1_1fast_1_1_ro_p_e.png deleted file mode 100644 index 62648d9411cecb26a750282334d3053f4627966a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 863 zcmeAS@N?(olHy`uVBq!ia0vp^?LgeY!3-pS<#W6RQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=B-KJY5_^Dj46+ecSh0i>Kvy zbI8ws>wj#?Y%o;Gtt#8EoS0LdTXI}lM zuju`I|A|j#{#82OJ?HzRZTFn#gI0 zU0%5B<0H#8i$y)kWZ$+g<9)5#yZPupiI@Kx9&a%9xBNDlFY>y@mh=AKlHVQOE~8?3 z%e(Kw^5lA-=bz>|SI=DXip$-4aYg*C-v^ILN{U=7dAo1Ill##{6GT+mJp+N1?h&9< z@0&CHSb3Krfib$}aalBTieR7hF(HN31y5=j1*XU_xSV8kAVmEaao1d`lc1sUv(%e! z(xN8{nzJl>RO}6;g`Qk~XFthN{b~J~k4cN(=6>1#c!T>9<&5fyKWcryZfyOUY8M~f z^Q+2d>#KW{U-e9UY!_qew(7~pHCNlNINn-vz;NmsW4_-D0}nr&bnND#Rkx2!cAsvf zv-a{oeZIH*t1@)oPFcKDzqn_%*CjUYIkg`Yip%1ka@1OVJAQGejOeuApWd)a?ap{p zb@<{rjeFDUJgep&KVTRA{@cI*8@DH0@7A>cf8CP}8Wuq6;@rhkg7)Pzd%hO@BRUUqg-6IeRsE?g9tI7#q*ALzbw^R_*NU<_Kulmw{63|dE1WdGQE5K)Eh%_%Xh{h zV#VPnA6te>2et3^mC}y6#jk6VvwZi@oQD#(c!KLg`m+Ci%N)~{~x~l qw|tt+J3TL`E5#le82{e)m)+34>;I=?*W7_wfx*+&&t;ucLK6Tj`k7Y% diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention-members.html b/docs/build/html/classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention-members.html deleted file mode 100644 index f75d5bd4d..000000000 --- a/docs/build/html/classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention-members.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::fast::ScaledDotProductAttention Member List
-
-
- -

This is the complete list of members for mlx::core::fast::ScaledDotProductAttention, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - -
Custom(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)mlx::core::fast::Custominlineexplicit
DEFINE_PRINT(ScaledDotProductAttention)mlx::core::fast::ScaledDotProductAttention
device()mlx::core::Primitiveinline
eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::ScaledDotProductAttentioninlinevirtual
eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) overridemlx::core::fast::ScaledDotProductAttentioninlinevirtual
eval_gpu(const std::vector< array > &inputs, array &out)mlx::core::fast::ScaledDotProductAttention
is_equivalent(const Primitive &other) const overridemlx::core::fast::ScaledDotProductAttentionvirtual
jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) overridemlx::core::fast::Customvirtual
operator=(const Primitive &other)=deletemlx::core::Primitive
operator=(Primitive &&other)=deletemlx::core::Primitive
output_shapes(const std::vector< array > &inputs)mlx::core::Primitivevirtual
Primitive(Stream stream)mlx::core::Primitiveinlineexplicit
Primitive(const Primitive &other)=deletemlx::core::Primitive
Primitive(Primitive &&other)=deletemlx::core::Primitive
print(std::ostream &os)=0mlx::core::Primitivepure virtual
ScaledDotProductAttention(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, const float scale, const bool needs_mask)mlx::core::fast::ScaledDotProductAttentioninlineexplicit
stream()mlx::core::Primitiveinline
vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) overridemlx::core::fast::Customvirtual
vmap(const std::vector< array > &inputs, const std::vector< int > &axes) overridemlx::core::fast::Customvirtual
~Primitive()=defaultmlx::core::Primitivevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html b/docs/build/html/classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html deleted file mode 100644 index e5b515790..000000000 --- a/docs/build/html/classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - -MLX: mlx::core::fast::ScaledDotProductAttention Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::fast::ScaledDotProductAttention Class Reference
-
-
- -

#include <fast_primitives.h>

-
-Inheritance diagram for mlx::core::fast::ScaledDotProductAttention:
-
-
- - -mlx::core::fast::Custom -mlx::core::Primitive - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ScaledDotProductAttention (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, const float scale, const bool needs_mask)
 
void eval_cpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.
 
void eval_gpu (const std::vector< array > &inputs, std::vector< array > &outputs) override
 
void eval_gpu (const std::vector< array > &inputs, array &out)
 
bool is_equivalent (const Primitive &other) const override
 Equivalence check defaults to false unless overridden by the primitive.
 
 DEFINE_PRINT (ScaledDotProductAttention)
 
- Public Member Functions inherited from mlx::core::fast::Custom
 Custom (Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)
 
virtual std::pair< std::vector< array >, std::vector< int > > vmap (const std::vector< array > &inputs, const std::vector< int > &axes) override
 The primitive must know how to vectorize itself across the given axes.
 
virtual std::vector< arrayjvp (const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
 The Jacobian-vector product.
 
virtual std::vector< arrayvjp (const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
 The vector-Jacobian product.
 
- Public Member Functions inherited from mlx::core::Primitive
 Primitive (Stream stream)
 
const Devicedevice ()
 The device the primitive will run on.
 
const Streamstream ()
 The stream the primitive will run on.
 
virtual void print (std::ostream &os)=0
 Print the primitive.
 
virtual std::vector< std::vector< int > > output_shapes (const std::vector< array > &inputs)
 Get the output shapes of the primitive.
 
virtual ~Primitive ()=default
 
 Primitive (const Primitive &other)=delete
 
 Primitive (Primitive &&other)=delete
 
Primitiveoperator= (const Primitive &other)=delete
 
Primitiveoperator= (Primitive &&other)=delete
 
-

Constructor & Destructor Documentation

- -

◆ ScaledDotProductAttention()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - -
mlx::core::fast::ScaledDotProductAttention::ScaledDotProductAttention (Stream stream,
std::function< std::vector< array >(std::vector< array >)> fallback,
const float scale,
const bool needs_mask )
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ DEFINE_PRINT()

- -
-
- - - - - - - -
mlx::core::fast::ScaledDotProductAttention::DEFINE_PRINT (ScaledDotProductAttention )
-
- -
-
- -

◆ eval_cpu()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::ScaledDotProductAttention::eval_cpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-inlineoverridevirtual
-
- -

A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the output arrays.

-

To avoid unnecessary allocations, the evaluation function is responsible for allocating space for the array.

- -

Implements mlx::core::Primitive.

- -
-
- -

◆ eval_gpu() [1/2]

- -
-
- - - - - - - - - - - -
void mlx::core::fast::ScaledDotProductAttention::eval_gpu (const std::vector< array > & inputs,
array & out )
-
- -
-
- -

◆ eval_gpu() [2/2]

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::fast::ScaledDotProductAttention::eval_gpu (const std::vector< array > & inputs,
std::vector< array > & outputs )
-
-inlineoverridevirtual
-
- -

Implements mlx::core::Primitive.

- -
-
- -

◆ is_equivalent()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::fast::ScaledDotProductAttention::is_equivalent (const Primitive & other) const
-
-overridevirtual
-
- -

Equivalence check defaults to false unless overridden by the primitive.

- -

Reimplemented from mlx::core::Primitive.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.png b/docs/build/html/classmlx_1_1core_1_1fast_1_1_scaled_dot_product_attention.png deleted file mode 100644 index 65f61e4a0d67c4cbc125902d2b8d2bc41e4f01a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1075 zcmeAS@N?(olHy`uVBq!ia0vp^UxB!TgBeJ2T#oesQqloFA+G=b{|7Q(y!l$%e`vXd zfo6fk^fNCWJa_;UH$5A+1SrQ@666=m0OW&#In(Sb3=GWsJY5_^Dj46+yuh+J!*!Stw zZ{GO*xx3=Y?w^&f)sy$R{q)LSX}#HQM#uKGYvi-H@7uli^QBFG7oYDe&yN42G0Em& z={4^uB7R-`cf+nK=R__0d_&UXlaBbit-M9sr!Ofua{u+;-9O&1S0cl9cn_s*O9fw|Y} z{A0f08{DmXCp?)QlYiH5_xXpmh2K|9?>f8o`H_FsdsWw#akqU``6)L2Z`|Z3^A*>6 z8nI>iP6GOUQjcTA>maXAHika}<_sL}9Kxo;SD70;kZv& zaAJW&NNDrKYpYfPZ3(?9(Q|EnE%zqr3;Xp>28CXInEmelwK>1`yfWD0?)uw4d;Y6A z+w3})*vXjh-r)0g$*Z4HmwxS!$VuAU7d!8_O78JD$G3^^+xm55?q|uG?_yc2LM$#{j=6?;$8K~JNC%=2lLl#eQyw*%W+(1-|Xm+ z+>hNi_sTsswN_iT>-gIhw@u5Rw_mn)v)j{Cwu#T?dEnVyz3X4ZX3x%f^)UDFGx6=E zuY&y7ynUj-_VuIBJMHuK#z%yvwpVNKEt0T&b9&9Ao~^QV8*Ut56Kgj6{({8^`qsqX zef@F9Ikow*?>oO%SLaUps?vTt=T6f-p@(H>etVdgmV|F0Im_J)Q2z3&MMr6pTeW$|2!3N>X*ThS3j3^ HP6 - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::io::FileReader Member List
-
-
- -

This is the complete list of members for mlx::core::io::FileReader, including all inherited members.

- - - - - - - - - -
FileReader(std::ifstream is)mlx::core::io::FileReaderinlineexplicit
FileReader(std::string file_path)mlx::core::io::FileReaderinlineexplicit
good() const overridemlx::core::io::FileReaderinlinevirtual
is_open() const overridemlx::core::io::FileReaderinlinevirtual
label() const overridemlx::core::io::FileReaderinlinevirtual
read(char *data, size_t n) overridemlx::core::io::FileReaderinlinevirtual
seek(int64_t off, std::ios_base::seekdir way=std::ios_base::beg) overridemlx::core::io::FileReaderinlinevirtual
tell() overridemlx::core::io::FileReaderinlinevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1io_1_1_file_reader.html b/docs/build/html/classmlx_1_1core_1_1io_1_1_file_reader.html deleted file mode 100644 index 1ae86019b..000000000 --- a/docs/build/html/classmlx_1_1core_1_1io_1_1_file_reader.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - -MLX: mlx::core::io::FileReader Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::io::FileReader Class Reference
-
-
- -

#include <load.h>

-
-Inheritance diagram for mlx::core::io::FileReader:
-
-
- - -mlx::core::io::Reader - -
- - - - - - - - - - - - - - - - - - -

-Public Member Functions

 FileReader (std::ifstream is)
 
 FileReader (std::string file_path)
 
bool is_open () const override
 
bool good () const override
 
size_t tell () override
 
void seek (int64_t off, std::ios_base::seekdir way=std::ios_base::beg) override
 
void read (char *data, size_t n) override
 
std::string label () const override
 
-

Constructor & Destructor Documentation

- -

◆ FileReader() [1/2]

- -
-
- - - - - -
- - - - - - - -
mlx::core::io::FileReader::FileReader (std::ifstream is)
-
-inlineexplicit
-
- -
-
- -

◆ FileReader() [2/2]

- -
-
- - - - - -
- - - - - - - -
mlx::core::io::FileReader::FileReader (std::string file_path)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ good()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::io::FileReader::good () const
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Reader.

- -
-
- -

◆ is_open()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::io::FileReader::is_open () const
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Reader.

- -
-
- -

◆ label()

- -
-
- - - - - -
- - - - - - - -
std::string mlx::core::io::FileReader::label () const
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Reader.

- -
-
- -

◆ read()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::io::FileReader::read (char * data,
size_t n )
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Reader.

- -
-
- -

◆ seek()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::io::FileReader::seek (int64_t off,
std::ios_base::seekdir way = std::ios_base::beg )
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Reader.

- -
-
- -

◆ tell()

- -
-
- - - - - -
- - - - - - - -
size_t mlx::core::io::FileReader::tell ()
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Reader.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1io_1_1_file_reader.png b/docs/build/html/classmlx_1_1core_1_1io_1_1_file_reader.png deleted file mode 100644 index 0a31de8a66d013e62136badc3528dffbeead85e6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 642 zcmV-|0)737P)vTJr#LVva2S`&=-}Ys|Ns9r%~qrU000SeQchC<|NsC0|NsC0Hv*f~0006F zNklRq;%F|M7%XCZ0VWtHp?bf+c@N0~TR)D~@w7Y8FruOA}W z4jzy?r}wra8D5fh1xS1SZ>rSAb^d39;r>2#`aP0s?~9V(U)-Z!B1x}DNXI4mi94R{ zJ^S}Q?hWK7jwGG(4}~NnB@#(SN+gnult?5QX+f&B)~N&lzoQob%%%B|Ua#qx=0jSD zW@DNVDJKp9VkHs)L`oz8h?GbG5Gj!WAW|X$K%_(hfJli10Fe?203sz407Ob80Em=G z01)X-8(}nfNNRr$#;Rfkr;ya|W zpQ}9>-|c++*4)gITS)i5?dMlV#xB|Ww`^*Mv{-hmBH3lO)yJ567js)f^q8z2&Zq9G zWU~yXE|Pk=YV>X6kxrvY*q?U1xaUZ=SqCIvrK8tfq_bMyk4Sb}K2*sf-y!+-_Q~w6 z21u^GFRFWgasS^-F_N2^b1du_^ - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::io::FileWriter Member List
-
-
- -

This is the complete list of members for mlx::core::io::FileWriter, including all inherited members.

- - - - - - - - - -
FileWriter(std::ofstream os)mlx::core::io::FileWriterinlineexplicit
FileWriter(std::string file_path)mlx::core::io::FileWriterinlineexplicit
good() const overridemlx::core::io::FileWriterinlinevirtual
is_open() const overridemlx::core::io::FileWriterinlinevirtual
label() const overridemlx::core::io::FileWriterinlinevirtual
seek(int64_t off, std::ios_base::seekdir way=std::ios_base::beg) overridemlx::core::io::FileWriterinlinevirtual
tell() overridemlx::core::io::FileWriterinlinevirtual
write(const char *data, size_t n) overridemlx::core::io::FileWriterinlinevirtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1io_1_1_file_writer.html b/docs/build/html/classmlx_1_1core_1_1io_1_1_file_writer.html deleted file mode 100644 index 7367b3b87..000000000 --- a/docs/build/html/classmlx_1_1core_1_1io_1_1_file_writer.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - -MLX: mlx::core::io::FileWriter Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::io::FileWriter Class Reference
-
-
- -

#include <load.h>

-
-Inheritance diagram for mlx::core::io::FileWriter:
-
-
- - -mlx::core::io::Writer - -
- - - - - - - - - - - - - - - - - - -

-Public Member Functions

 FileWriter (std::ofstream os)
 
 FileWriter (std::string file_path)
 
bool is_open () const override
 
bool good () const override
 
size_t tell () override
 
void seek (int64_t off, std::ios_base::seekdir way=std::ios_base::beg) override
 
void write (const char *data, size_t n) override
 
std::string label () const override
 
-

Constructor & Destructor Documentation

- -

◆ FileWriter() [1/2]

- -
-
- - - - - -
- - - - - - - -
mlx::core::io::FileWriter::FileWriter (std::ofstream os)
-
-inlineexplicit
-
- -
-
- -

◆ FileWriter() [2/2]

- -
-
- - - - - -
- - - - - - - -
mlx::core::io::FileWriter::FileWriter (std::string file_path)
-
-inlineexplicit
-
- -
-
-

Member Function Documentation

- -

◆ good()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::io::FileWriter::good () const
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Writer.

- -
-
- -

◆ is_open()

- -
-
- - - - - -
- - - - - - - -
bool mlx::core::io::FileWriter::is_open () const
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Writer.

- -
-
- -

◆ label()

- -
-
- - - - - -
- - - - - - - -
std::string mlx::core::io::FileWriter::label () const
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Writer.

- -
-
- -

◆ seek()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::io::FileWriter::seek (int64_t off,
std::ios_base::seekdir way = std::ios_base::beg )
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Writer.

- -
-
- -

◆ tell()

- -
-
- - - - - -
- - - - - - - -
size_t mlx::core::io::FileWriter::tell ()
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Writer.

- -
-
- -

◆ write()

- -
-
- - - - - -
- - - - - - - - - - - -
void mlx::core::io::FileWriter::write (const char * data,
size_t n )
-
-inlineoverridevirtual
-
- -

Implements mlx::core::io::Writer.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1io_1_1_file_writer.png b/docs/build/html/classmlx_1_1core_1_1io_1_1_file_writer.png deleted file mode 100644 index 3f1679897f3bd4c71bcf9d4034cc9a56cc8686ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 612 zcmeAS@N?(olHy`uVBq!ia0vp^-9Q|`!3-qj?8+2@lyrbki0l9V|AEXGZ@!lHA6jl< zpjjX>{mhF84;}!;P0xlc0m^Zf1o;Is0Qq2G&NTZ90|VoGPZ!6K3dXl{Z}%Nm;Bh(L z9CG%5{YSGWX$G0w-r6mgD&5C)P=(##mA02=s!)JO5!aRH0= z=>~G8|MVcQnam77=CL#Q9CFd?KW<|rywfIh*~FPARnH4D^mvFfbS&X!aJj_Fp!AZ7 zVPXkmgU2og2bEX`g-Lo00-i|H|1TUplOvQc$%OT#lIO&diAy|6DlhButl$6Z&zq<$ z>*(qaGuOwem>%WbUnW`qtYBm8wy>C-xlb!sCuaZs<8!?%IDU83tI+G`_HHhW{FN#t zQXZXjXR+OpwY8U@{yxY1<^7v$N8MX0XDykR_Rn`8Ps}y#6{eA2I!}MwxzT&KUi-}x zPp|AN`IM0=UPiJUvDWj4Ne tbUyGOyT>I_m}_@=1U-3~lxD_m|J=N|>cy3~slfEW;OXk;vd$@?2>>FtAhiGh diff --git a/docs/build/html/classmlx_1_1core_1_1io_1_1_reader-members.html b/docs/build/html/classmlx_1_1core_1_1io_1_1_reader-members.html deleted file mode 100644 index 98887ab2b..000000000 --- a/docs/build/html/classmlx_1_1core_1_1io_1_1_reader-members.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::io::Reader Member List
-
-
- -

This is the complete list of members for mlx::core::io::Reader, including all inherited members.

- - - - - - - -
good() const =0mlx::core::io::Readerpure virtual
is_open() const =0mlx::core::io::Readerpure virtual
label() const =0mlx::core::io::Readerpure virtual
read(char *data, size_t n)=0mlx::core::io::Readerpure virtual
seek(int64_t off, std::ios_base::seekdir way=std::ios_base::beg)=0mlx::core::io::Readerpure virtual
tell()=0mlx::core::io::Readerpure virtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1io_1_1_reader.html b/docs/build/html/classmlx_1_1core_1_1io_1_1_reader.html deleted file mode 100644 index 2cd2194a8..000000000 --- a/docs/build/html/classmlx_1_1core_1_1io_1_1_reader.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - -MLX: mlx::core::io::Reader Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::io::Reader Class Referenceabstract
-
-
- -

#include <load.h>

-
-Inheritance diagram for mlx::core::io::Reader:
-
-
- - -mlx::core::io::FileReader - -
- - - - - - - - - - - - - - -

-Public Member Functions

virtual bool is_open () const =0
 
virtual bool good () const =0
 
virtual size_t tell ()=0
 
virtual void seek (int64_t off, std::ios_base::seekdir way=std::ios_base::beg)=0
 
virtual void read (char *data, size_t n)=0
 
virtual std::string label () const =0
 
-

Member Function Documentation

- -

◆ good()

- -
-
- - - - - -
- - - - - - - -
virtual bool mlx::core::io::Reader::good () const
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileReader.

- -
-
- -

◆ is_open()

- -
-
- - - - - -
- - - - - - - -
virtual bool mlx::core::io::Reader::is_open () const
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileReader.

- -
-
- -

◆ label()

- -
-
- - - - - -
- - - - - - - -
virtual std::string mlx::core::io::Reader::label () const
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileReader.

- -
-
- -

◆ read()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual void mlx::core::io::Reader::read (char * data,
size_t n )
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileReader.

- -
-
- -

◆ seek()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual void mlx::core::io::Reader::seek (int64_t off,
std::ios_base::seekdir way = std::ios_base::beg )
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileReader.

- -
-
- -

◆ tell()

- -
-
- - - - - -
- - - - - - - -
virtual size_t mlx::core::io::Reader::tell ()
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileReader.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1io_1_1_reader.png b/docs/build/html/classmlx_1_1core_1_1io_1_1_reader.png deleted file mode 100644 index a28b37482fca676db602abbbf3248d03471d1b56..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 647 zcmeAS@N?(olHy`uVBq!ia0vp^lYlsYgBeI3ZM_4cqyv0HT>t<74`jZ0^R=}9&~gg{ z%>s$(XI?yb@Bk=odNyncP>!=C$S;@y$Oi*+rrB2*7?^}ST^vIy7~jsl+xOalqvd$= z%30s*A5FHZPgt&4y-oaD*C}Onkr(MauXMdMQ}q^lT=MZ!@$8!7F-hbl-^=z5d#h*5 zc}kVc|IzI+=}y+e>6UdpA@>yXv#Sj_w>iI$E;cUBP`ta_RBpC$Uro42_wBw=mEC8) zeKTBkFST0o@h!_5G0(Etu#^8B%ClBxOzA9k&AoW6qR_ze(=XLYZyzwOERNbPd-8+V zCT)jXuj_-C>aF{1FU<4(`^wAjC&pCAPxoPcTfM8`R()Svu=~->aE%Dru1?er@4o`@O{Ope`DSr{E_$k z_V#CKeRrI8eb2SuZ)H?=^4k4PD`hVw-Q38PIsN86yJJ^&&$unM=y=N80=v?1)!C^Q zrHVIChc3>S?k|z@J@jwO - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::io::Writer Member List
-
-
- -

This is the complete list of members for mlx::core::io::Writer, including all inherited members.

- - - - - - - -
good() const =0mlx::core::io::Writerpure virtual
is_open() const =0mlx::core::io::Writerpure virtual
label() const =0mlx::core::io::Writerpure virtual
seek(int64_t off, std::ios_base::seekdir way=std::ios_base::beg)=0mlx::core::io::Writerpure virtual
tell()=0mlx::core::io::Writerpure virtual
write(const char *data, size_t n)=0mlx::core::io::Writerpure virtual
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1io_1_1_writer.html b/docs/build/html/classmlx_1_1core_1_1io_1_1_writer.html deleted file mode 100644 index 991f1a823..000000000 --- a/docs/build/html/classmlx_1_1core_1_1io_1_1_writer.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - -MLX: mlx::core::io::Writer Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::io::Writer Class Referenceabstract
-
-
- -

#include <load.h>

-
-Inheritance diagram for mlx::core::io::Writer:
-
-
- - -mlx::core::io::FileWriter - -
- - - - - - - - - - - - - - -

-Public Member Functions

virtual bool is_open () const =0
 
virtual bool good () const =0
 
virtual size_t tell ()=0
 
virtual void seek (int64_t off, std::ios_base::seekdir way=std::ios_base::beg)=0
 
virtual void write (const char *data, size_t n)=0
 
virtual std::string label () const =0
 
-

Member Function Documentation

- -

◆ good()

- -
-
- - - - - -
- - - - - - - -
virtual bool mlx::core::io::Writer::good () const
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileWriter.

- -
-
- -

◆ is_open()

- -
-
- - - - - -
- - - - - - - -
virtual bool mlx::core::io::Writer::is_open () const
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileWriter.

- -
-
- -

◆ label()

- -
-
- - - - - -
- - - - - - - -
virtual std::string mlx::core::io::Writer::label () const
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileWriter.

- -
-
- -

◆ seek()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual void mlx::core::io::Writer::seek (int64_t off,
std::ios_base::seekdir way = std::ios_base::beg )
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileWriter.

- -
-
- -

◆ tell()

- -
-
- - - - - -
- - - - - - - -
virtual size_t mlx::core::io::Writer::tell ()
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileWriter.

- -
-
- -

◆ write()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual void mlx::core::io::Writer::write (const char * data,
size_t n )
-
-pure virtual
-
- -

Implemented in mlx::core::io::FileWriter.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1io_1_1_writer.png b/docs/build/html/classmlx_1_1core_1_1io_1_1_writer.png deleted file mode 100644 index 70dfa5f6882969907fbe781de58cc2ae5b58d14a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 619 zcmV-x0+juUP)vTJr#LVva2S`&=-}Ys|Ns9r%~qrU000SeQchC<|NsC0|NsC0Hv*f~0005@ zNklCg)KDm5p*@v&~op<~58~>q;q^9&Pw{IM{*gk_=aW7c@0{B}E+v?}H`}RS-)?Pnc zk}D&Zb&yPh;%;kWl|2{v1hCL;eqtq)56* zQY2j@DUvRd6j@x%%;o?9p7R2LNtnpx^_oX!B9}#F8kw0~@*Dxch;#vfNV)((BwYX? zk}d!cNf!W!qzeE<(ggq_=>hv2RAG(xM%41%ol=2u9lAMBcA<0O( zkYpsf7)ky;eYn+MeSUVWwVii+@R`RhB%9)fU%QMybGXGFN&2Ksk)>*6EAJdI>eGyf)E1}@tb)cn|= zT;87>yR_?an2lUc?Q0jG<`?VYT|c?>*&DX(#-+*KK3{J4XqYdTE_dtV4$R;j`NPp4 zmXN#05sNPV9OeH2lDr~aNHUTxBpFE;l8h`arIa!Ue*g)}bh{@89OnQ4002ovPDHLk FV1nahCCUH* diff --git a/docs/build/html/classmlx_1_1core_1_1metal_1_1_device-members.html b/docs/build/html/classmlx_1_1core_1_1metal_1_1_device-members.html deleted file mode 100644 index 0d522e267..000000000 --- a/docs/build/html/classmlx_1_1core_1_1metal_1_1_device-members.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::metal::Device Member List
-
-
- -

This is the complete list of members for mlx::core::metal::Device, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - -
argument_encoder(const std::vector< MTL::ArgumentDescriptor * > &arg_descs) constmlx::core::metal::Device
commit_command_buffer(int index)mlx::core::metal::Device
Device()mlx::core::metal::Device
Device(const Device &)=deletemlx::core::metal::Device
end_encoding(int index)mlx::core::metal::Device
get_command_buffer(int index)mlx::core::metal::Device
get_command_buffer_ops(int index)mlx::core::metal::Device
get_command_encoder(int index)mlx::core::metal::Device
get_function(const std::string &base_name, MTL::Library *mtl_lib, const std::string &specialized_name="", const MTLFCList &func_consts={})mlx::core::metal::Device
get_function(const std::string &base_name, const std::string &lib_name="mlx", const std::string &specialized_name="", const MTLFCList &func_consts={})mlx::core::metal::Device
get_kernel(const std::string &base_name, MTL::Library *mtl_lib, const std::string &hash_name="", const MTLFCList &func_consts={}, const std::vector< MTL::Function * > &linked_functions={})mlx::core::metal::Device
get_kernel(const std::string &base_name, const std::string &lib_name="mlx", const std::string &hash_name="", const MTLFCList &func_consts={}, const std::vector< MTL::Function * > &linked_functions={})mlx::core::metal::Device
get_library(const std::string &name)mlx::core::metal::Device
get_library(const std::string &name, const std::string &source_string, bool cache=true)mlx::core::metal::Device
get_library(const std::string &name, const MTL::StitchedLibraryDescriptor *desc, bool cache=true)mlx::core::metal::Device
increment_command_buffer_ops(int index)mlx::core::metal::Device
mtl_device()mlx::core::metal::Deviceinline
new_queue(int index)mlx::core::metal::Device
operator=(const Device &)=deletemlx::core::metal::Device
register_library(const std::string &lib_name, const std::string &lib_path)mlx::core::metal::Device
register_library(const std::string &lib_name, const std::function< std::string(const std::string &)> &lib_path_func=get_colocated_mtllib_path)mlx::core::metal::Device
~Device()mlx::core::metal::Device
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1metal_1_1_device.html b/docs/build/html/classmlx_1_1core_1_1metal_1_1_device.html deleted file mode 100644 index 9d6e636ad..000000000 --- a/docs/build/html/classmlx_1_1core_1_1metal_1_1_device.html +++ /dev/null @@ -1,635 +0,0 @@ - - - - - - - -MLX: mlx::core::metal::Device Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::metal::Device Class Reference
-
-
- -

#include <device.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Device ()
 
 Device (const Device &)=delete
 
Deviceoperator= (const Device &)=delete
 
 ~Device ()
 
MTL::Device * mtl_device ()
 
void new_queue (int index)
 
MTL::CommandBuffer * get_command_buffer (int index)
 
int get_command_buffer_ops (int index)
 
void increment_command_buffer_ops (int index)
 
void commit_command_buffer (int index)
 
CommandEncoderget_command_encoder (int index)
 
void end_encoding (int index)
 
void register_library (const std::string &lib_name, const std::string &lib_path)
 
void register_library (const std::string &lib_name, const std::function< std::string(const std::string &)> &lib_path_func=get_colocated_mtllib_path)
 
MTL::Library * get_library (const std::string &name)
 
MTL::Library * get_library (const std::string &name, const std::string &source_string, bool cache=true)
 
MTL::Library * get_library (const std::string &name, const MTL::StitchedLibraryDescriptor *desc, bool cache=true)
 
MTL::Function * get_function (const std::string &base_name, MTL::Library *mtl_lib, const std::string &specialized_name="", const MTLFCList &func_consts={})
 
MTL::Function * get_function (const std::string &base_name, const std::string &lib_name="mlx", const std::string &specialized_name="", const MTLFCList &func_consts={})
 
MTL::ComputePipelineState * get_kernel (const std::string &base_name, MTL::Library *mtl_lib, const std::string &hash_name="", const MTLFCList &func_consts={}, const std::vector< MTL::Function * > &linked_functions={})
 
MTL::ComputePipelineState * get_kernel (const std::string &base_name, const std::string &lib_name="mlx", const std::string &hash_name="", const MTLFCList &func_consts={}, const std::vector< MTL::Function * > &linked_functions={})
 
MTL::ArgumentEncoder * argument_encoder (const std::vector< MTL::ArgumentDescriptor * > &arg_descs) const
 
-

Constructor & Destructor Documentation

- -

◆ Device() [1/2]

- -
-
- - - - - - - -
mlx::core::metal::Device::Device ()
-
- -
-
- -

◆ Device() [2/2]

- -
-
- - - - - -
- - - - - - - -
mlx::core::metal::Device::Device (const Device & )
-
-delete
-
- -
-
- -

◆ ~Device()

- -
-
- - - - - - - -
mlx::core::metal::Device::~Device ()
-
- -
-
-

Member Function Documentation

- -

◆ argument_encoder()

- -
-
- - - - - - - -
MTL::ArgumentEncoder * mlx::core::metal::Device::argument_encoder (const std::vector< MTL::ArgumentDescriptor * > & arg_descs) const
-
- -
-
- -

◆ commit_command_buffer()

- -
-
- - - - - - - -
void mlx::core::metal::Device::commit_command_buffer (int index)
-
- -
-
- -

◆ end_encoding()

- -
-
- - - - - - - -
void mlx::core::metal::Device::end_encoding (int index)
-
- -
-
- -

◆ get_command_buffer()

- -
-
- - - - - - - -
MTL::CommandBuffer * mlx::core::metal::Device::get_command_buffer (int index)
-
- -
-
- -

◆ get_command_buffer_ops()

- -
-
- - - - - - - -
int mlx::core::metal::Device::get_command_buffer_ops (int index)
-
- -
-
- -

◆ get_command_encoder()

- -
-
- - - - - - - -
CommandEncoder & mlx::core::metal::Device::get_command_encoder (int index)
-
- -
-
- -

◆ get_function() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - -
MTL::Function * mlx::core::metal::Device::get_function (const std::string & base_name,
const std::string & lib_name = "mlx",
const std::string & specialized_name = "",
const MTLFCList & func_consts = {} )
-
- -
-
- -

◆ get_function() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - -
MTL::Function * mlx::core::metal::Device::get_function (const std::string & base_name,
MTL::Library * mtl_lib,
const std::string & specialized_name = "",
const MTLFCList & func_consts = {} )
-
- -
-
- -

◆ get_kernel() [1/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
MTL::ComputePipelineState * mlx::core::metal::Device::get_kernel (const std::string & base_name,
const std::string & lib_name = "mlx",
const std::string & hash_name = "",
const MTLFCList & func_consts = {},
const std::vector< MTL::Function * > & linked_functions = {} )
-
- -
-
- -

◆ get_kernel() [2/2]

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
MTL::ComputePipelineState * mlx::core::metal::Device::get_kernel (const std::string & base_name,
MTL::Library * mtl_lib,
const std::string & hash_name = "",
const MTLFCList & func_consts = {},
const std::vector< MTL::Function * > & linked_functions = {} )
-
- -
-
- -

◆ get_library() [1/3]

- -
-
- - - - - - - -
MTL::Library * mlx::core::metal::Device::get_library (const std::string & name)
-
- -
-
- -

◆ get_library() [2/3]

- -
-
- - - - - - - - - - - - - - - - -
MTL::Library * mlx::core::metal::Device::get_library (const std::string & name,
const MTL::StitchedLibraryDescriptor * desc,
bool cache = true )
-
- -
-
- -

◆ get_library() [3/3]

- -
-
- - - - - - - - - - - - - - - - -
MTL::Library * mlx::core::metal::Device::get_library (const std::string & name,
const std::string & source_string,
bool cache = true )
-
- -
-
- -

◆ increment_command_buffer_ops()

- -
-
- - - - - - - -
void mlx::core::metal::Device::increment_command_buffer_ops (int index)
-
- -
-
- -

◆ mtl_device()

- -
-
- - - - - -
- - - - - - - -
MTL::Device * mlx::core::metal::Device::mtl_device ()
-
-inline
-
- -
-
- -

◆ new_queue()

- -
-
- - - - - - - -
void mlx::core::metal::Device::new_queue (int index)
-
- -
-
- -

◆ operator=()

- -
-
- - - - - -
- - - - - - - -
Device & mlx::core::metal::Device::operator= (const Device & )
-
-delete
-
- -
-
- -

◆ register_library() [1/2]

- -
-
- - - - - - - - - - - -
void mlx::core::metal::Device::register_library (const std::string & lib_name,
const std::function< std::string(const std::string &)> & lib_path_func = get_colocated_mtllib_path )
-
- -
-
- -

◆ register_library() [2/2]

- -
-
- - - - - - - - - - - -
void mlx::core::metal::Device::register_library (const std::string & lib_name,
const std::string & lib_path )
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1metal_1_1_metal_allocator-members.html b/docs/build/html/classmlx_1_1core_1_1metal_1_1_metal_allocator-members.html deleted file mode 100644 index 6ddf10230..000000000 --- a/docs/build/html/classmlx_1_1core_1_1metal_1_1_metal_allocator-members.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::metal::MetalAllocator Member List
-
- - - - - diff --git a/docs/build/html/classmlx_1_1core_1_1metal_1_1_metal_allocator.html b/docs/build/html/classmlx_1_1core_1_1metal_1_1_metal_allocator.html deleted file mode 100644 index b19a22a49..000000000 --- a/docs/build/html/classmlx_1_1core_1_1metal_1_1_metal_allocator.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - - -MLX: mlx::core::metal::MetalAllocator Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::metal::MetalAllocator Class Reference
-
-
- -

#include <allocator.h>

-
-Inheritance diagram for mlx::core::metal::MetalAllocator:
-
-
- - -mlx::core::allocator::Allocator - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

virtual Buffer malloc (size_t size, bool allow_swap=false) override
 Allocator for Metal GPUs.
 
virtual void free (Buffer buffer) override
 
size_t get_active_memory ()
 
size_t get_peak_memory ()
 
void reset_peak_memory ()
 
size_t get_cache_memory ()
 
size_t set_cache_limit (size_t limit)
 
size_t set_memory_limit (size_t limit, bool relaxed)
 
void clear_cache ()
 
- Public Member Functions inherited from mlx::core::allocator::Allocator
 Allocator ()=default
 
 Allocator (const Allocator &other)=delete
 
 Allocator (Allocator &&other)=delete
 
Allocatoroperator= (const Allocator &other)=delete
 
Allocatoroperator= (Allocator &&other)=delete
 
virtual ~Allocator ()=default
 
- - - -

-Friends

MetalAllocatorallocator ()
 
-

Member Function Documentation

- -

◆ clear_cache()

- -
-
- - - - - - - -
void mlx::core::metal::MetalAllocator::clear_cache ()
-
- -
-
- -

◆ free()

- -
-
- - - - - -
- - - - - - - -
virtual void mlx::core::metal::MetalAllocator::free (Buffer buffer)
-
-overridevirtual
-
-
- -

◆ get_active_memory()

- -
-
- - - - - -
- - - - - - - -
size_t mlx::core::metal::MetalAllocator::get_active_memory ()
-
-inline
-
- -
-
- -

◆ get_cache_memory()

- -
-
- - - - - -
- - - - - - - -
size_t mlx::core::metal::MetalAllocator::get_cache_memory ()
-
-inline
-
- -
-
- -

◆ get_peak_memory()

- -
-
- - - - - -
- - - - - - - -
size_t mlx::core::metal::MetalAllocator::get_peak_memory ()
-
-inline
-
- -
-
- -

◆ malloc()

- -
-
- - - - - -
- - - - - - - - - - - -
virtual Buffer mlx::core::metal::MetalAllocator::malloc (size_t size,
bool allow_swap = false )
-
-overridevirtual
-
- -

Allocator for Metal GPUs.

- -

Implements mlx::core::allocator::Allocator.

- -
-
- -

◆ reset_peak_memory()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::metal::MetalAllocator::reset_peak_memory ()
-
-inline
-
- -
-
- -

◆ set_cache_limit()

- -
-
- - - - - - - -
size_t mlx::core::metal::MetalAllocator::set_cache_limit (size_t limit)
-
- -
-
- -

◆ set_memory_limit()

- -
-
- - - - - - - - - - - -
size_t mlx::core::metal::MetalAllocator::set_memory_limit (size_t limit,
bool relaxed )
-
- -
-
-

Friends And Related Symbol Documentation

- -

◆ allocator

- -
-
- - - - - -
- - - - - - - -
MetalAllocator & allocator ()
-
-friend
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1metal_1_1_metal_allocator.png b/docs/build/html/classmlx_1_1core_1_1metal_1_1_metal_allocator.png deleted file mode 100644 index c82190d6222eabf8781259a9fd6bce166fb65348..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 680 zcmeAS@N?(olHy`uVBq!ia0vp^JApWWgBeH`S*WN0Dd_;85ZC|z{{xvX-h3_XKeXJ! zK(jz%`k5CG9y|bwo1P6@0+iz{3GxeO0P?}WoN4wI1_mZ$PZ!6K3dXl{Z=QRtz|+F6 z9Qyg6f6b!W`}cR8h}Q%;RrHCH(mt*tLBV+4CqR!ZW_YmwB`ZU4R@A5K*TZ4^}I%GsLr6G64O_cp%)7j{&Hc;X~*I=7#l6G7Lb|P?anQ_tNy$ zRGBmbU&x)KP`&u5uH%2ZtEfyYBl}^{IA?#TNbY$046)K3RU-{mI!a zVP}6gm6V#Czn4N)NY-ye9EPsU+i^GGyFu}m3jly6oaR$ KpUXO@geCxqC`zON diff --git a/docs/build/html/classmlx_1_1core_1_1random_1_1_key_sequence-members.html b/docs/build/html/classmlx_1_1core_1_1random_1_1_key_sequence-members.html deleted file mode 100644 index a3e82b9eb..000000000 --- a/docs/build/html/classmlx_1_1core_1_1random_1_1_key_sequence-members.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::random::KeySequence Member List
-
-
- -

This is the complete list of members for mlx::core::random::KeySequence, including all inherited members.

- - - - - -
default_()mlx::core::random::KeySequenceinlinestatic
KeySequence(uint64_t seed)mlx::core::random::KeySequenceexplicit
next()mlx::core::random::KeySequence
seed(uint64_t seed)mlx::core::random::KeySequence
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1random_1_1_key_sequence.html b/docs/build/html/classmlx_1_1core_1_1random_1_1_key_sequence.html deleted file mode 100644 index 4662bb44f..000000000 --- a/docs/build/html/classmlx_1_1core_1_1random_1_1_key_sequence.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - -MLX: mlx::core::random::KeySequence Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::random::KeySequence Class Reference
-
-
- -

#include <random.h>

- - - - - - - - -

-Public Member Functions

 KeySequence (uint64_t seed)
 
void seed (uint64_t seed)
 
array next ()
 
- - - -

-Static Public Member Functions

static KeySequencedefault_ ()
 
-

Constructor & Destructor Documentation

- -

◆ KeySequence()

- -
-
- - - - - -
- - - - - - - -
mlx::core::random::KeySequence::KeySequence (uint64_t seed)
-
-explicit
-
- -
-
-

Member Function Documentation

- -

◆ default_()

- -
-
- - - - - -
- - - - - - - -
static KeySequence & mlx::core::random::KeySequence::default_ ()
-
-inlinestatic
-
- -
-
- -

◆ next()

- -
-
- - - - - - - -
array mlx::core::random::KeySequence::next ()
-
- -
-
- -

◆ seed()

- -
-
- - - - - - - -
void mlx::core::random::KeySequence::seed (uint64_t seed)
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classmlx_1_1core_1_1scheduler_1_1_scheduler-members.html b/docs/build/html/classmlx_1_1core_1_1scheduler_1_1_scheduler-members.html deleted file mode 100644 index 7a145e396..000000000 --- a/docs/build/html/classmlx_1_1core_1_1scheduler_1_1_scheduler-members.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
mlx::core::scheduler::Scheduler Member List
-
- - - - - diff --git a/docs/build/html/classmlx_1_1core_1_1scheduler_1_1_scheduler.html b/docs/build/html/classmlx_1_1core_1_1scheduler_1_1_scheduler.html deleted file mode 100644 index b9ec8053b..000000000 --- a/docs/build/html/classmlx_1_1core_1_1scheduler_1_1_scheduler.html +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - - -MLX: mlx::core::scheduler::Scheduler Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
mlx::core::scheduler::Scheduler Class Reference
-
-
- -

#include <scheduler.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 Scheduler ()
 
 Scheduler (const Scheduler &)=delete
 
 Scheduler (Scheduler &&)=delete
 
Scheduleroperator= (const Scheduler &)=delete
 
Scheduleroperator= (Scheduler &&)=delete
 
Stream new_stream (const Device &d)
 
template<typename F >
void enqueue (const Stream &stream, F &&f)
 
Stream get_default_stream (const Device &d)
 
void set_default_stream (const Stream &s)
 
void notify_new_task (const Stream &stream)
 
void notify_task_completion (const Stream &stream)
 
int n_active_tasks () const
 
void wait_for_one ()
 
 ~Scheduler ()
 
-

Constructor & Destructor Documentation

- -

◆ Scheduler() [1/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::scheduler::Scheduler::Scheduler ()
-
-inline
-
- -
-
- -

◆ Scheduler() [2/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::scheduler::Scheduler::Scheduler (const Scheduler & )
-
-delete
-
- -
-
- -

◆ Scheduler() [3/3]

- -
-
- - - - - -
- - - - - - - -
mlx::core::scheduler::Scheduler::Scheduler (Scheduler && )
-
-delete
-
- -
-
- -

◆ ~Scheduler()

- -
-
- - - - - -
- - - - - - - -
mlx::core::scheduler::Scheduler::~Scheduler ()
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ enqueue()

- -
-
-
-template<typename F >
- - - - - - - - - - - -
void mlx::core::scheduler::Scheduler::enqueue (const Stream & stream,
F && f )
-
- -
-
- -

◆ get_default_stream()

- -
-
- - - - - -
- - - - - - - -
Stream mlx::core::scheduler::Scheduler::get_default_stream (const Device & d)
-
-inline
-
- -
-
- -

◆ n_active_tasks()

- -
-
- - - - - -
- - - - - - - -
int mlx::core::scheduler::Scheduler::n_active_tasks () const
-
-inline
-
- -
-
- -

◆ new_stream()

- -
-
- - - - - -
- - - - - - - -
Stream mlx::core::scheduler::Scheduler::new_stream (const Device & d)
-
-inline
-
- -
-
- -

◆ notify_new_task()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::scheduler::Scheduler::notify_new_task (const Stream & stream)
-
-inline
-
- -
-
- -

◆ notify_task_completion()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::scheduler::Scheduler::notify_task_completion (const Stream & stream)
-
-inline
-
- -
-
- -

◆ operator=() [1/2]

- -
-
- - - - - -
- - - - - - - -
Scheduler & mlx::core::scheduler::Scheduler::operator= (const Scheduler & )
-
-delete
-
- -
-
- -

◆ operator=() [2/2]

- -
-
- - - - - -
- - - - - - - -
Scheduler & mlx::core::scheduler::Scheduler::operator= (Scheduler && )
-
-delete
-
- -
-
- -

◆ set_default_stream()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::scheduler::Scheduler::set_default_stream (const Stream & s)
-
-inline
-
- -
-
- -

◆ wait_for_one()

- -
-
- - - - - -
- - - - - - - -
void mlx::core::scheduler::Scheduler::wait_for_one ()
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst23-members.html b/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst23-members.html deleted file mode 100644 index 91ebfde05..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst23-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::T_dcst23< T0 > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::T_dcst23< T0 >, including all inherited members.

- - - - -
exec(T c[], T0 fct, bool ortho, int type, bool cosine) constpocketfft::detail::T_dcst23< T0 >inline
length() constpocketfft::detail::T_dcst23< T0 >inline
T_dcst23(size_t length)pocketfft::detail::T_dcst23< T0 >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst23.html b/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst23.html deleted file mode 100644 index c7c55e2aa..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst23.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::T_dcst23< T0 > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::T_dcst23< T0 > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - -

-Public Member Functions

 T_dcst23 (size_t length)
 
template<typename T >
void exec (T c[], T0 fct, bool ortho, int type, bool cosine) const
 
size_t length () const
 
-

Constructor & Destructor Documentation

- -

◆ T_dcst23()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
pocketfft::detail::T_dcst23< T0 >::T_dcst23 (size_t length)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ exec()

- -
-
-
-template<typename T0 >
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
void pocketfft::detail::T_dcst23< T0 >::exec (T c[],
T0 fct,
bool ortho,
int type,
bool cosine ) const
-
-inline
-
- -
-
- -

◆ length()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
size_t pocketfft::detail::T_dcst23< T0 >::length () const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst4-members.html b/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst4-members.html deleted file mode 100644 index 3df2ebce9..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst4-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::T_dcst4< T0 > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::T_dcst4< T0 >, including all inherited members.

- - - - -
exec(T c[], T0 fct, bool, int, bool cosine) constpocketfft::detail::T_dcst4< T0 >inline
length() constpocketfft::detail::T_dcst4< T0 >inline
T_dcst4(size_t length)pocketfft::detail::T_dcst4< T0 >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst4.html b/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst4.html deleted file mode 100644 index 8d03410d4..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1_t__dcst4.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::T_dcst4< T0 > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::T_dcst4< T0 > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - -

-Public Member Functions

 T_dcst4 (size_t length)
 
template<typename T >
void exec (T c[], T0 fct, bool, int, bool cosine) const
 
size_t length () const
 
-

Constructor & Destructor Documentation

- -

◆ T_dcst4()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
pocketfft::detail::T_dcst4< T0 >::T_dcst4 (size_t length)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ exec()

- -
-
-
-template<typename T0 >
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
void pocketfft::detail::T_dcst4< T0 >::exec (T c[],
T0 fct,
bool ,
int ,
bool cosine ) const
-
-inline
-
- -
-
- -

◆ length()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
size_t pocketfft::detail::T_dcst4< T0 >::length () const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1_t__dct1-members.html b/docs/build/html/classpocketfft_1_1detail_1_1_t__dct1-members.html deleted file mode 100644 index 306b02f42..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1_t__dct1-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::T_dct1< T0 > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::T_dct1< T0 >, including all inherited members.

- - - - -
exec(T c[], T0 fct, bool ortho, int, bool) constpocketfft::detail::T_dct1< T0 >inline
length() constpocketfft::detail::T_dct1< T0 >inline
T_dct1(size_t length)pocketfft::detail::T_dct1< T0 >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1_t__dct1.html b/docs/build/html/classpocketfft_1_1detail_1_1_t__dct1.html deleted file mode 100644 index ad8c292fc..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1_t__dct1.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::T_dct1< T0 > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::T_dct1< T0 > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - -

-Public Member Functions

 T_dct1 (size_t length)
 
template<typename T >
void exec (T c[], T0 fct, bool ortho, int, bool) const
 
size_t length () const
 
-

Constructor & Destructor Documentation

- -

◆ T_dct1()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
pocketfft::detail::T_dct1< T0 >::T_dct1 (size_t length)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ exec()

- -
-
-
-template<typename T0 >
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
void pocketfft::detail::T_dct1< T0 >::exec (T c[],
T0 fct,
bool ortho,
int ,
bool  ) const
-
-inline
-
- -
-
- -

◆ length()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
size_t pocketfft::detail::T_dct1< T0 >::length () const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1_t__dst1-members.html b/docs/build/html/classpocketfft_1_1detail_1_1_t__dst1-members.html deleted file mode 100644 index 5f72dd266..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1_t__dst1-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::T_dst1< T0 > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::T_dst1< T0 >, including all inherited members.

- - - - -
exec(T c[], T0 fct, bool, int, bool) constpocketfft::detail::T_dst1< T0 >inline
length() constpocketfft::detail::T_dst1< T0 >inline
T_dst1(size_t length)pocketfft::detail::T_dst1< T0 >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1_t__dst1.html b/docs/build/html/classpocketfft_1_1detail_1_1_t__dst1.html deleted file mode 100644 index 678dde855..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1_t__dst1.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::T_dst1< T0 > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::T_dst1< T0 > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - -

-Public Member Functions

 T_dst1 (size_t length)
 
template<typename T >
void exec (T c[], T0 fct, bool, int, bool) const
 
size_t length () const
 
-

Constructor & Destructor Documentation

- -

◆ T_dst1()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
pocketfft::detail::T_dst1< T0 >::T_dst1 (size_t length)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ exec()

- -
-
-
-template<typename T0 >
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
void pocketfft::detail::T_dst1< T0 >::exec (T c[],
T0 fct,
bool ,
int ,
bool  ) const
-
-inline
-
- -
-
- -

◆ length()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
size_t pocketfft::detail::T_dst1< T0 >::length () const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1arr-members.html b/docs/build/html/classpocketfft_1_1detail_1_1arr-members.html deleted file mode 100644 index 0a83715c7..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1arr-members.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::arr< T > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::arr< T >, including all inherited members.

- - - - - - - - - - - -
arr()pocketfft::detail::arr< T >inline
arr(size_t n)pocketfft::detail::arr< T >inline
arr(arr &&other)pocketfft::detail::arr< T >inline
data()pocketfft::detail::arr< T >inline
data() constpocketfft::detail::arr< T >inline
operator[](size_t idx)pocketfft::detail::arr< T >inline
operator[](size_t idx) constpocketfft::detail::arr< T >inline
resize(size_t n)pocketfft::detail::arr< T >inline
size() constpocketfft::detail::arr< T >inline
~arr()pocketfft::detail::arr< T >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1arr.html b/docs/build/html/classpocketfft_1_1detail_1_1arr.html deleted file mode 100644 index d81388ba2..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1arr.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::arr< T > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::arr< T > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 arr ()
 
 arr (size_t n)
 
 arr (arr &&other)
 
 ~arr ()
 
void resize (size_t n)
 
Toperator[] (size_t idx)
 
const Toperator[] (size_t idx) const
 
Tdata ()
 
const Tdata () const
 
size_t size () const
 
-

Constructor & Destructor Documentation

- -

◆ arr() [1/3]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
pocketfft::detail::arr< T >::arr ()
-
-inline
-
- -
-
- -

◆ arr() [2/3]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
pocketfft::detail::arr< T >::arr (size_t n)
-
-inline
-
- -
-
- -

◆ arr() [3/3]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
pocketfft::detail::arr< T >::arr (arr< T > && other)
-
-inline
-
- -
-
- -

◆ ~arr()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
pocketfft::detail::arr< T >::~arr ()
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ data() [1/2]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
T * pocketfft::detail::arr< T >::data ()
-
-inline
-
- -
-
- -

◆ data() [2/2]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
const T * pocketfft::detail::arr< T >::data () const
-
-inline
-
- -
-
- -

◆ operator[]() [1/2]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
T & pocketfft::detail::arr< T >::operator[] (size_t idx)
-
-inline
-
- -
-
- -

◆ operator[]() [2/2]

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
const T & pocketfft::detail::arr< T >::operator[] (size_t idx) const
-
-inline
-
- -
-
- -

◆ resize()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
void pocketfft::detail::arr< T >::resize (size_t n)
-
-inline
-
- -
-
- -

◆ size()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
size_t pocketfft::detail::arr< T >::size () const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1arr__info-members.html b/docs/build/html/classpocketfft_1_1detail_1_1arr__info-members.html deleted file mode 100644 index 38eb5333c..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1arr__info-members.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::arr_info Member List
-
-
- -

This is the complete list of members for pocketfft::detail::arr_info, including all inherited members.

- - - - - - - - - - -
arr_info(const shape_t &shape_, const stride_t &stride_)pocketfft::detail::arr_infoinline
ndim() constpocketfft::detail::arr_infoinline
shape() constpocketfft::detail::arr_infoinline
shape(size_t i) constpocketfft::detail::arr_infoinline
shppocketfft::detail::arr_infoprotected
size() constpocketfft::detail::arr_infoinline
strpocketfft::detail::arr_infoprotected
stride() constpocketfft::detail::arr_infoinline
stride(size_t i) constpocketfft::detail::arr_infoinline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1arr__info.html b/docs/build/html/classpocketfft_1_1detail_1_1arr__info.html deleted file mode 100644 index 08df02140..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1arr__info.html +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::arr_info Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::arr_info Class Reference
-
-
- -

#include <pocketfft.h>

-
-Inheritance diagram for pocketfft::detail::arr_info:
-
-
- - -pocketfft::detail::cndarr< T > -pocketfft::detail::ndarr< T > - -
- - - - - - - - - - - - - - - - -

-Public Member Functions

 arr_info (const shape_t &shape_, const stride_t &stride_)
 
size_t ndim () const
 
size_t size () const
 
const shape_tshape () const
 
size_t shape (size_t i) const
 
const stride_tstride () const
 
const ptrdiff_t & stride (size_t i) const
 
- - - - - -

-Protected Attributes

shape_t shp
 
stride_t str
 
-

Constructor & Destructor Documentation

- -

◆ arr_info()

- -
-
- - - - - -
- - - - - - - - - - - -
pocketfft::detail::arr_info::arr_info (const shape_t & shape_,
const stride_t & stride_ )
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ ndim()

- -
-
- - - - - -
- - - - - - - -
size_t pocketfft::detail::arr_info::ndim () const
-
-inline
-
- -
-
- -

◆ shape() [1/2]

- -
-
- - - - - -
- - - - - - - -
const shape_t & pocketfft::detail::arr_info::shape () const
-
-inline
-
- -
-
- -

◆ shape() [2/2]

- -
-
- - - - - -
- - - - - - - -
size_t pocketfft::detail::arr_info::shape (size_t i) const
-
-inline
-
- -
-
- -

◆ size()

- -
-
- - - - - -
- - - - - - - -
size_t pocketfft::detail::arr_info::size () const
-
-inline
-
- -
-
- -

◆ stride() [1/2]

- -
-
- - - - - -
- - - - - - - -
const stride_t & pocketfft::detail::arr_info::stride () const
-
-inline
-
- -
-
- -

◆ stride() [2/2]

- -
-
- - - - - -
- - - - - - - -
const ptrdiff_t & pocketfft::detail::arr_info::stride (size_t i) const
-
-inline
-
- -
-
-

Member Data Documentation

- -

◆ shp

- -
-
- - - - - -
- - - - -
shape_t pocketfft::detail::arr_info::shp
-
-protected
-
- -
-
- -

◆ str

- -
-
- - - - - -
- - - - -
stride_t pocketfft::detail::arr_info::str
-
-protected
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1arr__info.png b/docs/build/html/classpocketfft_1_1detail_1_1arr__info.png deleted file mode 100644 index 8cf1d3ced302b69089d970e4947289599f2076c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1040 zcmeAS@N?(olHy`uVBq!ia0vp^tAV(KgBeJ!=X<>wNJ$6ygt-3y{~ySF@#br3|Doj; z2ATyD)6cwk@ZbSZ-1KbN5}+JsNswPK1CS2}=1jA%FfcIB_H=O!sbG9N_w_nuO`eu+ zr>;N${P)!ExbIY+R+HBJq~jIC#=G*zChRXbx6_$LU8$(0C)C9y{+O21qV><$%)NX5 zKy1JFIKiCjGks0?rbBN^mtI}pBYyekXU@MV zlZ`G#@$}tPYwOv3)pWnfPMyiS(|R99AClR5&UbNy(B@X*%;=T#%eJq6U$lE$rEH}4 z6V=z}ve#XIbVcmti*<*j%<4}^={S|IYpg$bt8K^0*DvgEWo%may0q^9iCrtN$0yeo z^DoiO>#KRWZSvCxE!9qQu1s5&7h%7P-Nj{}|9|7`JuBq*z5lVNtD|Ni!YkcZEuWtg zV0iJGm7)EG!nNzKWo|S_=wC@r@K4%W&A?FSe2k0Xmr)qQh3Ola8us;wGJHv0!>~X< znU$edQk&t$=?F%Lcr+#Vs@JcZ{{7x+?s+Qx6E;p-vae^V%Ga&wrH`Q@cKzmroLkS9 ze<=PlA!Ygb2 z^NT{{ZQg92`$EqYO7oBPwWWGGRZ98}D)6x{(Ht%b5!{=YOy4{wc z{Iq8M=cu}hBU0M6$ALljoip3Yc4n!C*I^C5{D^jwH=nG2y^q}OA^*HIcKzqy?$>+y*H8DV zOAk(dB4`vg>B@AFWqFZzEeftbzGSlhMXA~93YD9ukMeu^{hDF=VBNJ3X_+d!%MS0_ zoDsP`g?0Cqbw8$lOtLyWYqOV@RrkTdju_v=IaL$Zyp;rpV+1T5BX6HF`Lx{B{Pw*s zRd4LpD`#(v-}G+Ju{~w`ay#a{FOAzRKX22qru!Skx-Z<_wCwWa$o4P1i>>yg%Wm3u z`t^(bC;!GH!mw{m>|V2!`PX0nlJkhZGw1Q8T=mm|oZnewcbm<6w)D*Me-G!nPP(t1 ztm;{N_uuhJPo|%U@C=GS<~8Zpu86(g|MC1~KXhPyhlEhoR$$&`@O1TaS?83{1OT-s B79aos diff --git a/docs/build/html/classpocketfft_1_1detail_1_1cfftp-members.html b/docs/build/html/classpocketfft_1_1detail_1_1cfftp-members.html deleted file mode 100644 index 65676b3eb..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1cfftp-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::cfftp< T0 > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::cfftp< T0 >, including all inherited members.

- - - -
cfftp(size_t length_)pocketfft::detail::cfftp< T0 >inline
exec(T c[], T0 fct, bool fwd) constpocketfft::detail::cfftp< T0 >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1cfftp.html b/docs/build/html/classpocketfft_1_1detail_1_1cfftp.html deleted file mode 100644 index 77e4017fe..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1cfftp.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::cfftp< T0 > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::cfftp< T0 > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - -

-Public Member Functions

template<typename T >
void exec (T c[], T0 fct, bool fwd) const
 
 cfftp (size_t length_)
 
-

Constructor & Destructor Documentation

- -

◆ cfftp()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
pocketfft::detail::cfftp< T0 >::cfftp (size_t length_)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ exec()

- -
-
-
-template<typename T0 >
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - -
void pocketfft::detail::cfftp< T0 >::exec (T c[],
T0 fct,
bool fwd ) const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1cndarr-members.html b/docs/build/html/classpocketfft_1_1detail_1_1cndarr-members.html deleted file mode 100644 index 1d2ac7085..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1cndarr-members.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::cndarr< T > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::cndarr< T >, including all inherited members.

- - - - - - - - - - - - - -
arr_info(const shape_t &shape_, const stride_t &stride_)pocketfft::detail::arr_infoinline
cndarr(const void *data_, const shape_t &shape_, const stride_t &stride_)pocketfft::detail::cndarr< T >inline
dpocketfft::detail::cndarr< T >protected
ndim() constpocketfft::detail::arr_infoinline
operator[](ptrdiff_t ofs) constpocketfft::detail::cndarr< T >inline
shape() constpocketfft::detail::arr_infoinline
shape(size_t i) constpocketfft::detail::arr_infoinline
shppocketfft::detail::arr_infoprotected
size() constpocketfft::detail::arr_infoinline
strpocketfft::detail::arr_infoprotected
stride() constpocketfft::detail::arr_infoinline
stride(size_t i) constpocketfft::detail::arr_infoinline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1cndarr.html b/docs/build/html/classpocketfft_1_1detail_1_1cndarr.html deleted file mode 100644 index 742ba67f6..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1cndarr.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::cndarr< T > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::cndarr< T > Class Template Reference
-
-
- -

#include <pocketfft.h>

-
-Inheritance diagram for pocketfft::detail::cndarr< T >:
-
-
- - -pocketfft::detail::arr_info -pocketfft::detail::ndarr< T > - -
- - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 cndarr (const void *data_, const shape_t &shape_, const stride_t &stride_)
 
const Toperator[] (ptrdiff_t ofs) const
 
- Public Member Functions inherited from pocketfft::detail::arr_info
 arr_info (const shape_t &shape_, const stride_t &stride_)
 
size_t ndim () const
 
size_t size () const
 
const shape_tshape () const
 
size_t shape (size_t i) const
 
const stride_tstride () const
 
const ptrdiff_t & stride (size_t i) const
 
- - - - - - - - -

-Protected Attributes

const chard
 
- Protected Attributes inherited from pocketfft::detail::arr_info
shape_t shp
 
stride_t str
 
-

Constructor & Destructor Documentation

- -

◆ cndarr()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - -
pocketfft::detail::cndarr< T >::cndarr (const void * data_,
const shape_t & shape_,
const stride_t & stride_ )
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ operator[]()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
const T & pocketfft::detail::cndarr< T >::operator[] (ptrdiff_t ofs) const
-
-inline
-
- -
-
-

Member Data Documentation

- -

◆ d

- -
-
-
-template<typename T >
- - - - - -
- - - - -
const char* pocketfft::detail::cndarr< T >::d
-
-protected
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1cndarr.png b/docs/build/html/classpocketfft_1_1detail_1_1cndarr.png deleted file mode 100644 index 268d77cafbb0952a67dfc3b44e99ea88660ca187..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1037 zcmeAS@N?(olHy`uVBq!ia0vp^tAV(KgBeJ!=X<>wNJ$6ygt-3y{~ySF@#br3|Doj; z2ATyD)6cwk@ZbSZ-1KbN5}+JsNswPK1CS2}=1jA%FfcIB@N{tusbG9N_w_nuO`eu+ zr>;N${P)P@oz*Q#KbCIh(YJz6;P&4{o}b+B_u9LBP^oO`nX2+Nb&bl(_0QMj$?W*R zG3%N5-g9j#?xt+^iJnE*=5Kbpb5-h|POpl5M)Ix{-jiK=>;7t0XwJ2tf8)HFrSjUN z4zi|?AM_(`3z%2R{&ko3y;i#S+>>KyRJwG6KL@J=a(YEvIJ4S{dypq}sFHT1=I>aC2V)$hg#&BW!My7^+ zJ)#U>Qr9pn&`)M%s6|s^@%)Zrldzzr(=jcjMf%C2f)}sP+xq)$`h!Et8METQm=)$< zn(V)~!(;jR2<3NKy!q4Alr~-X8>XkLmF*Gs<|*sa^-a?+Ns32@6kmws=`;1e%dOXM zF5&Ic0Z5Y#${gjH->fJs68~x-#<~d?~=i(%KMx7GH*OB{c?YE*+jc@uXn{g|K7i5 zc2zC&&8ykFXFdPAYajb3F?04EWw%dOxjnK~^jmlBc$V#{F0t^H9Vb?-V{>uY7Xk9z z`oHySI!=5)5#j0r3=JhEU}&DRET?X0R=nT4EAC$PdcBHCHcp@zGYXq@<+|=_X?8uE zre!}}*KdwIs(dm|uhygJ((yHdl0CLr?0VI zZ@7MLzVxCe)pM`EYhS)*<%9AySCz`Pule~!p$;Wcm3yI z<=4xAF|jUAdeiyWrM3J|bo0&?zTGzY>xv`QO?|P_zNdqp1^@qWPU+mdKI;Vst0EhYf<^TWy diff --git a/docs/build/html/classpocketfft_1_1detail_1_1fftblue-members.html b/docs/build/html/classpocketfft_1_1detail_1_1fftblue-members.html deleted file mode 100644 index ba6b7bcdd..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1fftblue-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::fftblue< T0 > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::fftblue< T0 >, including all inherited members.

- - - - -
exec(cmplx< T > c[], T0 fct, bool fwd) constpocketfft::detail::fftblue< T0 >inline
exec_r(T c[], T0 fct, bool fwd)pocketfft::detail::fftblue< T0 >inline
fftblue(size_t length)pocketfft::detail::fftblue< T0 >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1fftblue.html b/docs/build/html/classpocketfft_1_1detail_1_1fftblue.html deleted file mode 100644 index 519a05ae5..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1fftblue.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::fftblue< T0 > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::fftblue< T0 > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - - -

-Public Member Functions

 fftblue (size_t length)
 
template<typename T >
void exec (cmplx< T > c[], T0 fct, bool fwd) const
 
template<typename T >
void exec_r (T c[], T0 fct, bool fwd)
 
-

Constructor & Destructor Documentation

- -

◆ fftblue()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
pocketfft::detail::fftblue< T0 >::fftblue (size_t length)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ exec()

- -
-
-
-template<typename T0 >
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - -
void pocketfft::detail::fftblue< T0 >::exec (cmplx< T > c[],
T0 fct,
bool fwd ) const
-
-inline
-
- -
-
- -

◆ exec_r()

- -
-
-
-template<typename T0 >
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - -
void pocketfft::detail::fftblue< T0 >::exec_r (T c[],
T0 fct,
bool fwd )
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1multi__iter-members.html b/docs/build/html/classpocketfft_1_1detail_1_1multi__iter-members.html deleted file mode 100644 index fc671bdf6..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1multi__iter-members.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::multi_iter< N > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::multi_iter< N >, including all inherited members.

- - - - - - - - - - - - -
advance(size_t n)pocketfft::detail::multi_iter< N >inline
iofs(size_t i) constpocketfft::detail::multi_iter< N >inline
iofs(size_t j, size_t i) constpocketfft::detail::multi_iter< N >inline
length_in() constpocketfft::detail::multi_iter< N >inline
length_out() constpocketfft::detail::multi_iter< N >inline
multi_iter(const arr_info &iarr_, const arr_info &oarr_, size_t idim_)pocketfft::detail::multi_iter< N >inline
oofs(size_t i) constpocketfft::detail::multi_iter< N >inline
oofs(size_t j, size_t i) constpocketfft::detail::multi_iter< N >inline
remaining() constpocketfft::detail::multi_iter< N >inline
stride_in() constpocketfft::detail::multi_iter< N >inline
stride_out() constpocketfft::detail::multi_iter< N >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1multi__iter.html b/docs/build/html/classpocketfft_1_1detail_1_1multi__iter.html deleted file mode 100644 index 1558f0d92..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1multi__iter.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::multi_iter< N > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::multi_iter< N > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 multi_iter (const arr_info &iarr_, const arr_info &oarr_, size_t idim_)
 
void advance (size_t n)
 
ptrdiff_t iofs (size_t i) const
 
ptrdiff_t iofs (size_t j, size_t i) const
 
ptrdiff_t oofs (size_t i) const
 
ptrdiff_t oofs (size_t j, size_t i) const
 
size_t length_in () const
 
size_t length_out () const
 
ptrdiff_t stride_in () const
 
ptrdiff_t stride_out () const
 
size_t remaining () const
 
-

Constructor & Destructor Documentation

- -

◆ multi_iter()

- -
-
-
-template<size_t N>
- - - - - -
- - - - - - - - - - - - - - - - -
pocketfft::detail::multi_iter< N >::multi_iter (const arr_info & iarr_,
const arr_info & oarr_,
size_t idim_ )
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ advance()

- -
-
-
-template<size_t N>
- - - - - -
- - - - - - - -
void pocketfft::detail::multi_iter< N >::advance (size_t n)
-
-inline
-
- -
-
- -

◆ iofs() [1/2]

- -
-
-
-template<size_t N>
- - - - - -
- - - - - - - -
ptrdiff_t pocketfft::detail::multi_iter< N >::iofs (size_t i) const
-
-inline
-
- -
-
- -

◆ iofs() [2/2]

- -
-
-
-template<size_t N>
- - - - - -
- - - - - - - - - - - -
ptrdiff_t pocketfft::detail::multi_iter< N >::iofs (size_t j,
size_t i ) const
-
-inline
-
- -
-
- -

◆ length_in()

- -
-
-
-template<size_t N>
- - - - - -
- - - - - - - -
size_t pocketfft::detail::multi_iter< N >::length_in () const
-
-inline
-
- -
-
- -

◆ length_out()

- -
-
-
-template<size_t N>
- - - - - -
- - - - - - - -
size_t pocketfft::detail::multi_iter< N >::length_out () const
-
-inline
-
- -
-
- -

◆ oofs() [1/2]

- -
-
-
-template<size_t N>
- - - - - -
- - - - - - - -
ptrdiff_t pocketfft::detail::multi_iter< N >::oofs (size_t i) const
-
-inline
-
- -
-
- -

◆ oofs() [2/2]

- -
-
-
-template<size_t N>
- - - - - -
- - - - - - - - - - - -
ptrdiff_t pocketfft::detail::multi_iter< N >::oofs (size_t j,
size_t i ) const
-
-inline
-
- -
-
- -

◆ remaining()

- -
-
-
-template<size_t N>
- - - - - -
- - - - - - - -
size_t pocketfft::detail::multi_iter< N >::remaining () const
-
-inline
-
- -
-
- -

◆ stride_in()

- -
-
-
-template<size_t N>
- - - - - -
- - - - - - - -
ptrdiff_t pocketfft::detail::multi_iter< N >::stride_in () const
-
-inline
-
- -
-
- -

◆ stride_out()

- -
-
-
-template<size_t N>
- - - - - -
- - - - - - - -
ptrdiff_t pocketfft::detail::multi_iter< N >::stride_out () const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1ndarr-members.html b/docs/build/html/classpocketfft_1_1detail_1_1ndarr-members.html deleted file mode 100644 index 695ada829..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1ndarr-members.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::ndarr< T > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::ndarr< T >, including all inherited members.

- - - - - - - - - - - - - - - -
arr_info(const shape_t &shape_, const stride_t &stride_)pocketfft::detail::arr_infoinline
cndarr(const void *data_, const shape_t &shape_, const stride_t &stride_)pocketfft::detail::cndarr< T >inline
dpocketfft::detail::cndarr< T >protected
ndarr(void *data_, const shape_t &shape_, const stride_t &stride_)pocketfft::detail::ndarr< T >inline
ndim() constpocketfft::detail::arr_infoinline
operator[](ptrdiff_t ofs)pocketfft::detail::ndarr< T >inline
pocketfft::detail::cndarr::operator[](ptrdiff_t ofs) constpocketfft::detail::cndarr< T >inline
shape() constpocketfft::detail::arr_infoinline
shape(size_t i) constpocketfft::detail::arr_infoinline
shppocketfft::detail::arr_infoprotected
size() constpocketfft::detail::arr_infoinline
strpocketfft::detail::arr_infoprotected
stride() constpocketfft::detail::arr_infoinline
stride(size_t i) constpocketfft::detail::arr_infoinline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1ndarr.html b/docs/build/html/classpocketfft_1_1detail_1_1ndarr.html deleted file mode 100644 index 515d2c773..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1ndarr.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::ndarr< T > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::ndarr< T > Class Template Reference
-
-
- -

#include <pocketfft.h>

-
-Inheritance diagram for pocketfft::detail::ndarr< T >:
-
-
- - -pocketfft::detail::cndarr< T > -pocketfft::detail::arr_info - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 ndarr (void *data_, const shape_t &shape_, const stride_t &stride_)
 
Toperator[] (ptrdiff_t ofs)
 
- Public Member Functions inherited from pocketfft::detail::cndarr< T >
 cndarr (const void *data_, const shape_t &shape_, const stride_t &stride_)
 
const Toperator[] (ptrdiff_t ofs) const
 
- Public Member Functions inherited from pocketfft::detail::arr_info
 arr_info (const shape_t &shape_, const stride_t &stride_)
 
size_t ndim () const
 
size_t size () const
 
const shape_tshape () const
 
size_t shape (size_t i) const
 
const stride_tstride () const
 
const ptrdiff_t & stride (size_t i) const
 
- - - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from pocketfft::detail::cndarr< T >
const chard
 
- Protected Attributes inherited from pocketfft::detail::arr_info
shape_t shp
 
stride_t str
 
-

Constructor & Destructor Documentation

- -

◆ ndarr()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - -
pocketfft::detail::ndarr< T >::ndarr (void * data_,
const shape_t & shape_,
const stride_t & stride_ )
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ operator[]()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
T & pocketfft::detail::ndarr< T >::operator[] (ptrdiff_t ofs)
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1ndarr.png b/docs/build/html/classpocketfft_1_1detail_1_1ndarr.png deleted file mode 100644 index 96f688ccda63c89376608b377f575b96caf2c9a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1032 zcmeAS@N?(olHy`uVBq!ia0vp^tAV(KgBeJ!=X<>wNJ$6ygt-3y{~ySF@#br3|Doj; z2ATyD)6cwk@ZbSZ-1KbN5}+JsNswPK1CS2}=1jA%FfcGr_H=O!sbG9N_jTVBEuNNc zr>viU=l@7i5Gc-^bnok%OqKo>CIYvA8npfFmPo$i(xI}mbE%Yxnoxo?72sml{`nO{((L zu1`|0w_3eadVAM5;_@^7$knc|`b-d@$$d*Y72|GuWX>aXcF^X~_C z9({G<`nq{**wya}^X$20S$g=_MO%kS_m}^lX&QfpfB*K{IL}YqARp+bt9n+;t}#5e zqn+VEoIb-17wL`r;(i~if(LAEb-I7&c7b%+#=Vjwr*Mr)wAz^wU`x zsx7q{Zk&!}JP>z|i{TrZk`BXTzAYY;qEAG6UWz;CHR)T_=C(S4zT*oM>n>&Ic&yr1 zF*WYF{iK{PlG%smu6=m+l1I@Z>1*X;Q@?tI8Ci%=sppFGOOMJ4JnNWz(ej#&sr(L` zOK*NERBn~NCKD$-P2u_-gHx)8Q7l2`sn@Gg{uRH>y8YEDz4C43>W5QGpI&|Tb=FnI zk|mSgSH`{Wc3-peQuvyyN~QBR%v-*ELz(+Z>8B5Qv!}O(##R3}%@%(7c+a`lrGM(q z?^Wc68(@ri%)0oW8lMa~yws!NC6IS*QE8djC5+cz(?=eR%HLhqO$k zOIv>D)?_b?>`z&GaOb)|pj3BxR(F<`RQI`!-8D0p-TbVm6kdG{oZwzV6P!ZP)|r{l z?60rcwwJYP_VsyNZ}~@t$JNG3$IC8yQa$hbx1-M2Vm@eJ%bK{$``YI(BG>F{m5NN~ zeu%!NC%qb&0K4z}FO7Tt)v9iPdhC_#^S7?7R{Fgs?m0Le%7D_LyXswGp(UAnGb2w` zypq2csibsY8|0(wZ~sRKPSl?W^4RG}SC==X8`=a8$^GJ&{kh(%_`AdtV4h|0boFyt I=akR{0FJ5)UjP6A diff --git a/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__c-members.html b/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__c-members.html deleted file mode 100644 index cd88f36a7..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__c-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::pocketfft_c< T0 > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::pocketfft_c< T0 >, including all inherited members.

- - - - -
exec(cmplx< T > c[], T0 fct, bool fwd) constpocketfft::detail::pocketfft_c< T0 >inline
length() constpocketfft::detail::pocketfft_c< T0 >inline
pocketfft_c(size_t length)pocketfft::detail::pocketfft_c< T0 >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__c.html b/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__c.html deleted file mode 100644 index 8eac32ad6..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__c.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::pocketfft_c< T0 > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::pocketfft_c< T0 > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - -

-Public Member Functions

 pocketfft_c (size_t length)
 
template<typename T >
void exec (cmplx< T > c[], T0 fct, bool fwd) const
 
size_t length () const
 
-

Constructor & Destructor Documentation

- -

◆ pocketfft_c()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
pocketfft::detail::pocketfft_c< T0 >::pocketfft_c (size_t length)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ exec()

- -
-
-
-template<typename T0 >
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - -
void pocketfft::detail::pocketfft_c< T0 >::exec (cmplx< T > c[],
T0 fct,
bool fwd ) const
-
-inline
-
- -
-
- -

◆ length()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
size_t pocketfft::detail::pocketfft_c< T0 >::length () const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__r-members.html b/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__r-members.html deleted file mode 100644 index 14d5e1b2f..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__r-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::pocketfft_r< T0 > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::pocketfft_r< T0 >, including all inherited members.

- - - - -
exec(T c[], T0 fct, bool fwd) constpocketfft::detail::pocketfft_r< T0 >inline
length() constpocketfft::detail::pocketfft_r< T0 >inline
pocketfft_r(size_t length)pocketfft::detail::pocketfft_r< T0 >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__r.html b/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__r.html deleted file mode 100644 index 7cf6d4e6d..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1pocketfft__r.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::pocketfft_r< T0 > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::pocketfft_r< T0 > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - -

-Public Member Functions

 pocketfft_r (size_t length)
 
template<typename T >
void exec (T c[], T0 fct, bool fwd) const
 
size_t length () const
 
-

Constructor & Destructor Documentation

- -

◆ pocketfft_r()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
pocketfft::detail::pocketfft_r< T0 >::pocketfft_r (size_t length)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ exec()

- -
-
-
-template<typename T0 >
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - -
void pocketfft::detail::pocketfft_r< T0 >::exec (T c[],
T0 fct,
bool fwd ) const
-
-inline
-
- -
-
- -

◆ length()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
size_t pocketfft::detail::pocketfft_r< T0 >::length () const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1rev__iter-members.html b/docs/build/html/classpocketfft_1_1detail_1_1rev__iter-members.html deleted file mode 100644 index 39dfa4688..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1rev__iter-members.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::rev_iter Member List
-
-
- -

This is the complete list of members for pocketfft::detail::rev_iter, including all inherited members.

- - - - - - -
advance()pocketfft::detail::rev_iterinline
ofs() constpocketfft::detail::rev_iterinline
remaining() constpocketfft::detail::rev_iterinline
rev_iter(const arr_info &arr_, const shape_t &axes)pocketfft::detail::rev_iterinline
rev_ofs() constpocketfft::detail::rev_iterinline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1rev__iter.html b/docs/build/html/classpocketfft_1_1detail_1_1rev__iter.html deleted file mode 100644 index 3775ffc19..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1rev__iter.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::rev_iter Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::rev_iter Class Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - - - - -

-Public Member Functions

 rev_iter (const arr_info &arr_, const shape_t &axes)
 
void advance ()
 
ptrdiff_t ofs () const
 
ptrdiff_t rev_ofs () const
 
size_t remaining () const
 
-

Constructor & Destructor Documentation

- -

◆ rev_iter()

- -
-
- - - - - -
- - - - - - - - - - - -
pocketfft::detail::rev_iter::rev_iter (const arr_info & arr_,
const shape_t & axes )
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ advance()

- -
-
- - - - - -
- - - - - - - -
void pocketfft::detail::rev_iter::advance ()
-
-inline
-
- -
-
- -

◆ ofs()

- -
-
- - - - - -
- - - - - - - -
ptrdiff_t pocketfft::detail::rev_iter::ofs () const
-
-inline
-
- -
-
- -

◆ remaining()

- -
-
- - - - - -
- - - - - - - -
size_t pocketfft::detail::rev_iter::remaining () const
-
-inline
-
- -
-
- -

◆ rev_ofs()

- -
-
- - - - - -
- - - - - - - -
ptrdiff_t pocketfft::detail::rev_iter::rev_ofs () const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1rfftp-members.html b/docs/build/html/classpocketfft_1_1detail_1_1rfftp-members.html deleted file mode 100644 index 778f37aa0..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1rfftp-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::rfftp< T0 > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::rfftp< T0 >, including all inherited members.

- - - -
exec(T c[], T0 fct, bool r2hc) constpocketfft::detail::rfftp< T0 >inline
rfftp(size_t length_)pocketfft::detail::rfftp< T0 >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1rfftp.html b/docs/build/html/classpocketfft_1_1detail_1_1rfftp.html deleted file mode 100644 index deddc38d0..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1rfftp.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::rfftp< T0 > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::rfftp< T0 > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - -

-Public Member Functions

template<typename T >
void exec (T c[], T0 fct, bool r2hc) const
 
 rfftp (size_t length_)
 
-

Constructor & Destructor Documentation

- -

◆ rfftp()

- -
-
-
-template<typename T0 >
- - - - - -
- - - - - - - -
pocketfft::detail::rfftp< T0 >::rfftp (size_t length_)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ exec()

- -
-
-
-template<typename T0 >
-
-template<typename T >
- - - - - -
- - - - - - - - - - - - - - - - -
void pocketfft::detail::rfftp< T0 >::exec (T c[],
T0 fct,
bool r2hc ) const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1simple__iter-members.html b/docs/build/html/classpocketfft_1_1detail_1_1simple__iter-members.html deleted file mode 100644 index 0bd71a255..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1simple__iter-members.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::simple_iter Member List
-
-
- -

This is the complete list of members for pocketfft::detail::simple_iter, including all inherited members.

- - - - - -
advance()pocketfft::detail::simple_iterinline
ofs() constpocketfft::detail::simple_iterinline
remaining() constpocketfft::detail::simple_iterinline
simple_iter(const arr_info &arr_)pocketfft::detail::simple_iterinline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1simple__iter.html b/docs/build/html/classpocketfft_1_1detail_1_1simple__iter.html deleted file mode 100644 index 973bde1d8..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1simple__iter.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::simple_iter Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::simple_iter Class Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - - -

-Public Member Functions

 simple_iter (const arr_info &arr_)
 
void advance ()
 
ptrdiff_t ofs () const
 
size_t remaining () const
 
-

Constructor & Destructor Documentation

- -

◆ simple_iter()

- -
-
- - - - - -
- - - - - - - -
pocketfft::detail::simple_iter::simple_iter (const arr_info & arr_)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ advance()

- -
-
- - - - - -
- - - - - - - -
void pocketfft::detail::simple_iter::advance ()
-
-inline
-
- -
-
- -

◆ ofs()

- -
-
- - - - - -
- - - - - - - -
ptrdiff_t pocketfft::detail::simple_iter::ofs () const
-
-inline
-
- -
-
- -

◆ remaining()

- -
-
- - - - - -
- - - - - - - -
size_t pocketfft::detail::simple_iter::remaining () const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1sincos__2pibyn-members.html b/docs/build/html/classpocketfft_1_1detail_1_1sincos__2pibyn-members.html deleted file mode 100644 index 8220ef462..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1sincos__2pibyn-members.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::sincos_2pibyn< T > Member List
-
-
- -

This is the complete list of members for pocketfft::detail::sincos_2pibyn< T >, including all inherited members.

- - - -
operator[](size_t idx) constpocketfft::detail::sincos_2pibyn< T >inline
sincos_2pibyn(size_t n)pocketfft::detail::sincos_2pibyn< T >inline
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1sincos__2pibyn.html b/docs/build/html/classpocketfft_1_1detail_1_1sincos__2pibyn.html deleted file mode 100644 index c39332681..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1sincos__2pibyn.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::sincos_2pibyn< T > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::sincos_2pibyn< T > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - -

-Public Member Functions

 sincos_2pibyn (size_t n)
 
cmplx< Toperator[] (size_t idx) const
 
-

Constructor & Destructor Documentation

- -

◆ sincos_2pibyn()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
pocketfft::detail::sincos_2pibyn< T >::sincos_2pibyn (size_t n)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ operator[]()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
cmplx< T > pocketfft::detail::sincos_2pibyn< T >::operator[] (size_t idx) const
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1concurrent__queue-members.html b/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1concurrent__queue-members.html deleted file mode 100644 index 119b98e56..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1concurrent__queue-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::threading::concurrent_queue< T > Member List
-
- - - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1concurrent__queue.html b/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1concurrent__queue.html deleted file mode 100644 index 624dd5302..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1concurrent__queue.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::threading::concurrent_queue< T > Class Template Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::threading::concurrent_queue< T > Class Template Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - -

-Public Member Functions

void push (T val)
 
bool try_pop (T &val)
 
bool empty () const
 
-

Member Function Documentation

- -

◆ empty()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
bool pocketfft::detail::threading::concurrent_queue< T >::empty () const
-
-inline
-
- -
-
- -

◆ push()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
void pocketfft::detail::threading::concurrent_queue< T >::push (T val)
-
-inline
-
- -
-
- -

◆ try_pop()

- -
-
-
-template<typename T >
- - - - - -
- - - - - - - -
bool pocketfft::detail::threading::concurrent_queue< T >::try_pop (T & val)
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1latch-members.html b/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1latch-members.html deleted file mode 100644 index 1a1651f32..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1latch-members.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::threading::latch Member List
-
- - - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1latch.html b/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1latch.html deleted file mode 100644 index b4bc2ced1..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1latch.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::threading::latch Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::threading::latch Class Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - - -

-Public Member Functions

 latch (size_t n)
 
void count_down ()
 
void wait ()
 
bool is_ready ()
 
-

Constructor & Destructor Documentation

- -

◆ latch()

- -
-
- - - - - -
- - - - - - - -
pocketfft::detail::threading::latch::latch (size_t n)
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ count_down()

- -
-
- - - - - -
- - - - - - - -
void pocketfft::detail::threading::latch::count_down ()
-
-inline
-
- -
-
- -

◆ is_ready()

- -
-
- - - - - -
- - - - - - - -
bool pocketfft::detail::threading::latch::is_ready ()
-
-inline
-
- -
-
- -

◆ wait()

- -
-
- - - - - -
- - - - - - - -
void pocketfft::detail::threading::latch::wait ()
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1thread__pool-members.html b/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1thread__pool-members.html deleted file mode 100644 index a0affd7d6..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1thread__pool-members.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -MLX: Member List - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
pocketfft::detail::threading::thread_pool Member List
-
- - - - - diff --git a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1thread__pool.html b/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1thread__pool.html deleted file mode 100644 index d09be49b4..000000000 --- a/docs/build/html/classpocketfft_1_1detail_1_1threading_1_1thread__pool.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::threading::thread_pool Class Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
pocketfft::detail::threading::thread_pool Class Reference
-
-
- -

#include <pocketfft.h>

- - - - - - - - - - - - - - -

-Public Member Functions

 thread_pool (size_t nthreads)
 
 thread_pool ()
 
 ~thread_pool ()
 
void submit (std::function< void()> work)
 
void shutdown ()
 
void restart ()
 
-

Constructor & Destructor Documentation

- -

◆ thread_pool() [1/2]

- -
-
- - - - - -
- - - - - - - -
pocketfft::detail::threading::thread_pool::thread_pool (size_t nthreads)
-
-inlineexplicit
-
- -
-
- -

◆ thread_pool() [2/2]

- -
-
- - - - - -
- - - - - - - -
pocketfft::detail::threading::thread_pool::thread_pool ()
-
-inline
-
- -
-
- -

◆ ~thread_pool()

- -
-
- - - - - -
- - - - - - - -
pocketfft::detail::threading::thread_pool::~thread_pool ()
-
-inline
-
- -
-
-

Member Function Documentation

- -

◆ restart()

- -
-
- - - - - -
- - - - - - - -
void pocketfft::detail::threading::thread_pool::restart ()
-
-inline
-
- -
-
- -

◆ shutdown()

- -
-
- - - - - -
- - - - - - - -
void pocketfft::detail::threading::thread_pool::shutdown ()
-
-inline
-
- -
-
- -

◆ submit()

- -
-
- - - - - -
- - - - - - - -
void pocketfft::detail::threading::thread_pool::submit (std::function< void()> work)
-
-inline
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/docs/build/html/clipboard.js b/docs/build/html/clipboard.js deleted file mode 100644 index 42c1fb0e0..000000000 --- a/docs/build/html/clipboard.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - -The code below is based on the Doxygen Awesome project, see -https://github.com/jothepro/doxygen-awesome-css - -MIT License - -Copyright (c) 2021 - 2022 jothepro - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -*/ - -let clipboard_title = "Copy to clipboard" -let clipboard_icon = `` -let clipboard_successIcon = `` -let clipboard_successDuration = 1000 - -$(function() { - if(navigator.clipboard) { - const fragments = document.getElementsByClassName("fragment") - for(const fragment of fragments) { - const clipboard_div = document.createElement("div") - clipboard_div.classList.add("clipboard") - clipboard_div.innerHTML = clipboard_icon - clipboard_div.title = clipboard_title - $(clipboard_div).click(function() { - const content = this.parentNode.cloneNode(true) - // filter out line number and folded fragments from file listings - content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) - let text = content.textContent - // remove trailing newlines and trailing spaces from empty lines - text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') - navigator.clipboard.writeText(text); - this.classList.add("success") - this.innerHTML = clipboard_successIcon - window.setTimeout(() => { // switch back to normal icon after timeout - this.classList.remove("success") - this.innerHTML = clipboard_icon - }, clipboard_successDuration); - }) - fragment.insertBefore(clipboard_div, fragment.firstChild) - } - } -}) diff --git a/docs/build/html/closed.png b/docs/build/html/closed.png deleted file mode 100644 index 98cc2c909da37a6df914fbf67780eebd99c597f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{V-kvUwAr*{o@8{^CZMh(5KoB^r_<4^zF@3)Cp&&t3hdujKf f*?bjBoY!V+E))@{xMcbjXe@)LtDnm{r-UW|*e5JT diff --git a/docs/build/html/common_2binary_8h.html b/docs/build/html/common_2binary_8h.html deleted file mode 100644 index b8410e482..000000000 --- a/docs/build/html/common_2binary_8h.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/binary.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
binary.h File Reference
-
-
-
#include "mlx/allocator.h"
-#include "mlx/array.h"
-#include "mlx/backend/common/utils.h"
-
-

Go to the source code of this file.

- - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
-

Variable Documentation

- -

◆ op

- -
-
- - - - -
Op op
-
- -
-
-
- - - - diff --git a/docs/build/html/common_2binary_8h_source.html b/docs/build/html/common_2binary_8h_source.html deleted file mode 100644 index 10e707cd3..000000000 --- a/docs/build/html/common_2binary_8h_source.html +++ /dev/null @@ -1,764 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/binary.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
binary.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4#include "mlx/allocator.h"
-
5#include "mlx/array.h"
- -
7
-
8namespace mlx::core {
-
9
-
10namespace {
-
11
-
12enum class BinaryOpType {
-
13 ScalarScalar,
-
14 ScalarVector,
-
15 VectorScalar,
-
16 VectorVector,
-
17 General,
-
18};
-
19
-
20BinaryOpType get_binary_op_type(const array& a, const array& b) {
-
21 BinaryOpType bopt;
-
22 if (a.data_size() == 1 && b.data_size() == 1) {
-
23 bopt = BinaryOpType::ScalarScalar;
-
24 } else if (a.data_size() == 1 && b.flags().contiguous) {
-
25 bopt = BinaryOpType::ScalarVector;
-
26 } else if (b.data_size() == 1 && a.flags().contiguous) {
-
27 bopt = BinaryOpType::VectorScalar;
-
28 } else if (
-
29 a.flags().row_contiguous && b.flags().row_contiguous ||
-
30 a.flags().col_contiguous && b.flags().col_contiguous) {
-
31 bopt = BinaryOpType::VectorVector;
-
32 } else {
-
33 bopt = BinaryOpType::General;
-
34 }
-
35 return bopt;
-
36}
-
37
-
38void set_binary_op_output_data(
-
39 const array& a,
-
40 const array& b,
-
41 array& out,
-
42 BinaryOpType bopt,
-
43 bool donate_with_move = false) {
-
44 switch (bopt) {
-
45 case BinaryOpType::ScalarScalar:
-
46 out.set_data(
-
47 allocator::malloc_or_wait(out.itemsize()), 1, a.strides(), a.flags());
-
48 break;
-
49 case BinaryOpType::ScalarVector:
-
50 if (b.is_donatable() && b.itemsize() == out.itemsize()) {
-
51 if (donate_with_move) {
-
52 out.move_shared_buffer(b);
-
53 } else {
-
54 out.copy_shared_buffer(b);
-
55 }
-
56 } else {
-
57 out.set_data(
-
58 allocator::malloc_or_wait(b.data_size() * out.itemsize()),
-
59 b.data_size(),
-
60 b.strides(),
-
61 b.flags());
-
62 }
-
63 break;
-
64 case BinaryOpType::VectorScalar:
-
65 if (a.is_donatable() && a.itemsize() == out.itemsize()) {
-
66 if (donate_with_move) {
-
67 out.move_shared_buffer(a);
-
68 } else {
-
69 out.copy_shared_buffer(a);
-
70 }
-
71 } else {
-
72 out.set_data(
-
73 allocator::malloc_or_wait(a.data_size() * out.itemsize()),
-
74 a.data_size(),
-
75 a.strides(),
-
76 a.flags());
-
77 }
-
78 break;
-
79 case BinaryOpType::VectorVector:
-
80 if (a.is_donatable() && a.itemsize() == out.itemsize()) {
-
81 if (donate_with_move) {
-
82 out.move_shared_buffer(a);
-
83 } else {
-
84 out.copy_shared_buffer(a);
-
85 }
-
86 } else if (b.is_donatable() && b.itemsize() == out.itemsize()) {
-
87 if (donate_with_move) {
-
88 out.move_shared_buffer(b);
-
89 } else {
-
90 out.copy_shared_buffer(b);
-
91 }
-
92 } else {
-
93 out.set_data(
-
94 allocator::malloc_or_wait(a.data_size() * out.itemsize()),
-
95 a.data_size(),
-
96 a.strides(),
-
97 a.flags());
-
98 }
-
99 break;
-
100 case BinaryOpType::General:
-
101 if (a.is_donatable() && a.flags().row_contiguous &&
-
102 a.itemsize() == out.itemsize() && a.size() == out.size()) {
-
103 if (donate_with_move) {
-
104 out.move_shared_buffer(a);
-
105 } else {
-
106 out.copy_shared_buffer(a);
-
107 }
-
108 } else if (
-
109 b.is_donatable() && b.flags().row_contiguous &&
-
110 b.itemsize() == out.itemsize() && b.size() == out.size()) {
-
111 if (donate_with_move) {
-
112 out.move_shared_buffer(b);
-
113 } else {
-
114 out.copy_shared_buffer(b);
-
115 }
-
116 } else {
-
117 out.set_data(allocator::malloc_or_wait(out.nbytes()));
-
118 }
-
119 break;
-
120 }
-
121}
-
122
-
123struct UseDefaultBinaryOp {
-
124 template <typename T, typename U>
-
125 void operator()(const T* a, const T* b, U* dst, int size) {
-
126 // Should we throw? This should normally never be called.
-
127 assert(false);
-
128 }
-
129
-
130 template <typename T, typename U>
-
131 void operator()(const T* a, const T* b, U* dst_a, U* dst_b, int size) {
-
132 // Should we throw? This should normally never be called.
-
133 assert(false);
-
134 }
-
135};
-
136
-
137template <typename T, typename U, typename Op>
-
138struct DefaultVectorScalar {
-
139 Op op;
-
140
-
141 DefaultVectorScalar(Op op_) : op(op_) {}
-
142
-
143 void operator()(const T* a, const T* b, U* dst, int size) {
-
144 T scalar = *b;
-
145 while (size-- > 0) {
-
146 *dst = op(*a, scalar);
-
147 dst++;
-
148 a++;
-
149 }
-
150 }
-
151
-
152 void operator()(const T* a, const T* b, U* dst_a, U* dst_b, int size) {
-
153 T scalar = *b;
-
154 while (size-- > 0) {
-
155 auto dst = op(*a, scalar);
-
156 *dst_a = dst.first;
-
157 *dst_b = dst.second;
-
158 dst_a++;
-
159 dst_b++;
-
160 a++;
-
161 }
-
162 }
-
163};
-
164
-
165template <typename T, typename U, typename Op>
-
166struct DefaultScalarVector {
-
167 Op op;
-
168
-
169 DefaultScalarVector(Op op_) : op(op_) {}
-
170
-
171 void operator()(const T* a, const T* b, U* dst, int size) {
-
172 T scalar = *a;
-
173 while (size-- > 0) {
-
174 *dst = op(scalar, *b);
-
175 dst++;
-
176 b++;
-
177 }
-
178 }
-
179
-
180 void operator()(const T* a, const T* b, U* dst_a, U* dst_b, int size) {
-
181 T scalar = *a;
-
182 while (size-- > 0) {
-
183 auto dst = op(scalar, *b);
-
184 *dst_a = dst.first;
-
185 *dst_b = dst.second;
-
186 dst_a++;
-
187 dst_b++;
-
188 b++;
-
189 }
-
190 }
-
191};
-
192
-
193template <typename T, typename U, typename Op>
-
194struct DefaultVectorVector {
-
195 Op op;
-
196
-
197 DefaultVectorVector(Op op_) : op(op_) {}
-
198
-
199 void operator()(const T* a, const T* b, U* dst, int size) {
-
200 while (size-- > 0) {
-
201 *dst = op(*a, *b);
-
202 dst++;
-
203 a++;
-
204 b++;
-
205 }
-
206 }
-
207
-
208 void operator()(const T* a, const T* b, U* dst_a, U* dst_b, int size) {
-
209 while (size-- > 0) {
-
210 auto dst = op(*a, *b);
-
211 *dst_a = dst.first;
-
212 *dst_b = dst.second;
-
213 dst_a++;
-
214 dst_b++;
-
215 a++;
-
216 b++;
-
217 }
-
218 }
-
219};
-
220
-
221template <typename T, typename U, typename Op>
-
222void binary_op_dims1(const array& a, const array& b, array& out, Op op) {
-
223 const T* a_ptr = a.data<T>();
-
224 const T* b_ptr = b.data<T>();
-
225 U* dst = out.data<U>();
-
226 size_t a_idx = 0;
-
227 size_t b_idx = 0;
-
228 for (size_t i = 0; i < out.size(); ++i) {
-
229 dst[i] = op(a_ptr[a_idx], b_ptr[b_idx]);
-
230 a_idx += a.strides()[0];
-
231 b_idx += b.strides()[0];
-
232 }
-
233}
-
234
-
235template <typename T, typename U, typename Op>
-
236void binary_op_dims1(
-
237 const array& a,
-
238 const array& b,
-
239 array& out,
-
240 Op op,
-
241 int stride) {
-
242 const T* a_ptr = a.data<T>();
-
243 const T* b_ptr = b.data<T>();
-
244 U* dst = out.data<U>();
-
245 size_t a_idx = 0;
-
246 size_t b_idx = 0;
-
247 for (size_t i = 0; i < a.shape()[0]; i++) {
-
248 op(a_ptr + a_idx, b_ptr + b_idx, dst, stride);
-
249 a_idx += a.strides()[0];
-
250 b_idx += b.strides()[0];
-
251 dst += stride;
-
252 }
-
253}
-
254
-
255template <typename T, typename U, typename Op>
-
256void binary_op_dims2(const array& a, const array& b, array& out, Op op) {
-
257 const T* a_ptr = a.data<T>();
-
258 const T* b_ptr = b.data<T>();
-
259 U* dst = out.data<U>();
-
260 size_t a_idx = 0;
-
261 size_t b_idx = 0;
-
262 size_t out_idx = 0;
-
263 for (size_t i = 0; i < a.shape()[0]; ++i) {
-
264 for (size_t j = 0; j < a.shape()[1]; ++j) {
-
265 dst[out_idx++] = op(a_ptr[a_idx], b_ptr[b_idx]);
-
266 a_idx += a.strides()[1];
-
267 b_idx += b.strides()[1];
-
268 }
-
269 a_idx += a.strides()[0] - a.strides()[1] * a.shape()[1];
-
270 b_idx += b.strides()[0] - b.strides()[1] * b.shape()[1];
-
271 }
-
272}
-
273
-
274template <typename T, typename U, typename Op>
-
275void binary_op_dims2(
-
276 const array& a,
-
277 const array& b,
-
278 array& out,
-
279 Op op,
-
280 int stride) {
-
281 const T* a_ptr = a.data<T>();
-
282 const T* b_ptr = b.data<T>();
-
283 U* dst = out.data<U>();
-
284 size_t a_idx = 0;
-
285 size_t b_idx = 0;
-
286 for (size_t i = 0; i < a.shape()[0]; ++i) {
-
287 for (size_t j = 0; j < a.shape()[1]; ++j) {
-
288 op(a_ptr + a_idx, b_ptr + b_idx, dst, stride);
-
289 a_idx += a.strides()[1];
-
290 b_idx += b.strides()[1];
-
291 dst += stride;
-
292 }
-
293 a_idx += a.strides()[0] - a.strides()[1] * a.shape()[1];
-
294 b_idx += b.strides()[0] - b.strides()[1] * b.shape()[1];
-
295 }
-
296}
-
297
-
298template <typename T, typename U, typename Op>
-
299void binary_op_dims3(const array& a, const array& b, array& out, Op op) {
-
300 const T* a_ptr = a.data<T>();
-
301 const T* b_ptr = b.data<T>();
-
302 U* dst = out.data<U>();
-
303 size_t a_idx = 0;
-
304 size_t b_idx = 0;
-
305 size_t out_idx = 0;
-
306 for (size_t i = 0; i < a.shape()[0]; ++i) {
-
307 for (size_t j = 0; j < a.shape()[1]; ++j) {
-
308 for (size_t k = 0; k < a.shape()[2]; ++k) {
-
309 dst[out_idx++] = op(a_ptr[a_idx], b_ptr[b_idx]);
-
310 a_idx += a.strides()[2];
-
311 b_idx += b.strides()[2];
-
312 }
-
313 a_idx += a.strides()[1] - a.strides()[2] * a.shape()[2];
-
314 b_idx += b.strides()[1] - b.strides()[2] * b.shape()[2];
-
315 }
-
316 a_idx += a.strides()[0] - a.strides()[1] * a.shape()[1];
-
317 b_idx += b.strides()[0] - b.strides()[1] * b.shape()[1];
-
318 }
-
319}
-
320
-
321template <typename T, typename U, typename Op>
-
322void binary_op_dims4(const array& a, const array& b, array& out, Op op) {
-
323 const T* a_ptr = a.data<T>();
-
324 const T* b_ptr = b.data<T>();
-
325 U* dst = out.data<U>();
-
326 size_t a_idx = 0;
-
327 size_t b_idx = 0;
-
328 size_t out_idx = 0;
-
329 for (size_t i = 0; i < a.shape()[0]; ++i) {
-
330 for (size_t j = 0; j < a.shape()[1]; ++j) {
-
331 for (size_t k = 0; k < a.shape()[2]; ++k) {
-
332 for (size_t ii = 0; ii < a.shape()[3]; ++ii) {
-
333 dst[out_idx++] = op(a_ptr[a_idx], b_ptr[b_idx]);
-
334 a_idx += a.strides()[3];
-
335 b_idx += b.strides()[3];
-
336 }
-
337 a_idx += a.strides()[2] - a.strides()[3] * a.shape()[3];
-
338 b_idx += b.strides()[2] - b.strides()[3] * b.shape()[3];
-
339 }
-
340 a_idx += a.strides()[1] - a.strides()[2] * a.shape()[2];
-
341 b_idx += b.strides()[1] - b.strides()[2] * b.shape()[2];
-
342 }
-
343 a_idx += a.strides()[0] - a.strides()[1] * a.shape()[1];
-
344 b_idx += b.strides()[0] - b.strides()[1] * b.shape()[1];
-
345 }
-
346}
-
347
-
348template <typename T, typename U, typename Op>
-
349void binary_op_dispatch_dims(
-
350 const array& a,
-
351 const array& b,
-
352 array& out,
-
353 Op op) {
-
354 switch (out.ndim()) {
-
355 case 1:
-
356 binary_op_dims1<T, U, Op>(a, b, out, op);
-
357 return;
-
358 case 2:
-
359 binary_op_dims2<T, U, Op>(a, b, out, op);
-
360 return;
-
361 case 3:
-
362 binary_op_dims3<T, U, Op>(a, b, out, op);
-
363 return;
-
364 case 4:
-
365 binary_op_dims4<T, U, Op>(a, b, out, op);
-
366 return;
-
367 }
-
368
-
369 const T* a_ptr = a.data<T>();
-
370 const T* b_ptr = b.data<T>();
-
371 U* dst = out.data<U>();
-
372 for (size_t i = 0; i < out.size(); i++) {
-
373 int a_idx = elem_to_loc(i, a.shape(), a.strides());
-
374 int b_idx = elem_to_loc(i, b.shape(), b.strides());
-
375 dst[i] = op(a_ptr[a_idx], b_ptr[b_idx]);
-
376 }
-
377}
-
378
-
379template <typename T, typename U, typename Op>
-
380void binary_op_dispatch_dims(
-
381 const array& a,
-
382 const array& b,
-
383 array& out,
-
384 Op op,
-
385 int dim,
-
386 int stride) {
-
387 // Number of dimensions to loop over for vectorized ops
-
388 switch (dim) {
-
389 case 1:
-
390 binary_op_dims1<T, U, Op>(a, b, out, op, stride);
-
391 return;
-
392 case 2:
-
393 binary_op_dims2<T, U, Op>(a, b, out, op, stride);
-
394 return;
-
395 }
-
396
-
397 const T* a_ptr = a.data<T>();
-
398 const T* b_ptr = b.data<T>();
-
399 U* dst = out.data<U>();
-
400 for (size_t i = 0; i < out.size(); i += stride) {
-
401 int a_idx = elem_to_loc(i, a.shape(), a.strides());
-
402 int b_idx = elem_to_loc(i, b.shape(), b.strides());
-
403 op(a_ptr + a_idx, b_ptr + b_idx, dst, stride);
-
404 dst += stride;
-
405 }
-
406}
-
407
-
408template <
-
409 typename T,
-
410 typename U,
-
411 typename Op,
-
412 typename OpSV,
-
413 typename OpVS,
-
414 typename OpVV>
-
415void binary_op(
-
416 const array& a,
-
417 const array& b,
-
418 array& out,
-
419 Op op,
-
420 OpSV opsv,
-
421 OpVS opvs,
-
422 OpVV opvv) {
-
423 auto bopt = get_binary_op_type(a, b);
-
424 set_binary_op_output_data(a, b, out, bopt);
-
425
-
426 // The full computation is scalar scalar so call the base op once
-
427 if (bopt == BinaryOpType::ScalarScalar) {
-
428 *(out.data<U>()) = op(*a.data<T>(), *b.data<T>());
-
429 return;
-
430 }
-
431
-
432 // The full computation is scalar vector so delegate to the op
-
433 if (bopt == BinaryOpType::ScalarVector) {
-
434 opsv(a.data<T>(), b.data<T>(), out.data<U>(), b.data_size());
-
435 return;
-
436 }
-
437
-
438 // The full computation is vector scalar so delegate to the op
-
439 if (bopt == BinaryOpType::VectorScalar) {
-
440 opvs(a.data<T>(), b.data<T>(), out.data<U>(), a.data_size());
-
441 return;
-
442 }
-
443
-
444 // The full computation is vector vector so delegate to the op
-
445 if (bopt == BinaryOpType::VectorVector) {
-
446 opvv(a.data<T>(), b.data<T>(), out.data<U>(), out.size());
-
447 return;
-
448 }
-
449
-
450 // General computation so let's try to optimize
-
451
-
452 // Get the left-most dim such that the array is row contiguous after
-
453 auto& strides = out.strides();
-
454 auto leftmost_rc_dim = [&strides](const array& arr) {
-
455 int d = arr.ndim() - 1;
-
456 for (; d >= 0 && arr.strides()[d] == strides[d]; d--) {
-
457 }
-
458 return d + 1;
-
459 };
-
460 auto a_rc_dim = leftmost_rc_dim(a);
-
461 auto b_rc_dim = leftmost_rc_dim(b);
-
462
-
463 // Get the left-most dim such that the array is a broadcasted "scalar" after
-
464 auto leftmost_s_dim = [](const array& arr) {
-
465 int d = arr.ndim() - 1;
-
466 for (; d >= 0 && arr.strides()[d] == 0; d--) {
-
467 }
-
468 return d + 1;
-
469 };
-
470 auto a_s_dim = leftmost_s_dim(a);
-
471 auto b_s_dim = leftmost_s_dim(b);
-
472
-
473 auto ndim = out.ndim();
-
474
-
475 // Case 1: LxM and FxM where L and F are broadcastable and M is row contiguous
-
476 int dim = ndim;
-
477 if (int d = std::max(a_rc_dim, b_rc_dim); d < ndim) {
-
478 bopt = BinaryOpType::VectorVector;
-
479 dim = d;
-
480 // Case 2: LxM and Fx1 where L and F are broadcastable and M is row
-
481 // contiguous
-
482 } else if (int d = std::max(a_rc_dim, b_s_dim); d < ndim) {
-
483 bopt = BinaryOpType::VectorScalar;
-
484 dim = d;
-
485 // Case 3: Lx1 and FxM where L and F are broadcastable and M is row
-
486 // contiguous
-
487 } else if (int d = std::max(a_s_dim, b_rc_dim); d < ndim) {
-
488 bopt = BinaryOpType::ScalarVector;
-
489 dim = d;
-
490 }
-
491
-
492 // Can be sure dim > 0 since otherwise we would have used one of the fully
-
493 // contiguous methods above. Except for the case that the flags do not
-
494 // correspond to the underlying contiguity.
-
495 size_t stride;
-
496 if (dim == 0 || strides[dim - 1] < 16) {
-
497 stride = 1;
-
498 bopt = BinaryOpType::General;
-
499 dim = ndim;
-
500 } else {
-
501 stride = strides[dim - 1];
-
502 }
-
503
-
504 switch (bopt) {
-
505 case BinaryOpType::VectorVector:
-
506 binary_op_dispatch_dims<T, U>(a, b, out, opvv, dim, stride);
-
507 break;
-
508 case BinaryOpType::VectorScalar:
-
509 binary_op_dispatch_dims<T, U>(a, b, out, opvs, dim, stride);
-
510 break;
-
511 case BinaryOpType::ScalarVector:
-
512 binary_op_dispatch_dims<T, U>(a, b, out, opsv, dim, stride);
-
513 break;
-
514 default:
-
515 binary_op_dispatch_dims<T, U>(a, b, out, op);
-
516 break;
-
517 }
-
518}
-
519
-
520template <typename T, typename Op, typename OpSV, typename OpVS, typename OpVV>
-
521void binary_op(
-
522 const array& a,
-
523 const array& b,
-
524 array& out,
-
525 Op op,
-
526 OpSV opsv,
-
527 OpVS opvs,
-
528 OpVV opvv) {
-
529 // TODO: The following mess of constexpr evaluations can probably be achieved
-
530 // with template specializations and overloading. Would it be simpler?
-
531
-
532 if (std::is_same<decltype(opsv), UseDefaultBinaryOp>::value) {
-
533 if (std::is_same<decltype(opvs), UseDefaultBinaryOp>::value) {
-
534 if (std::is_same<decltype(opvv), UseDefaultBinaryOp>::value) {
-
535 // All ops are UseDefaultBinaryOp (why oh why would someone call that?)
-
536 binary_op<T, T>(
-
537 a,
-
538 b,
-
539 out,
-
540 op,
-
541 DefaultScalarVector<T, T, Op>(op),
-
542 DefaultVectorScalar<T, T, Op>(op),
-
543 DefaultVectorVector<T, T, Op>(op));
-
544 } else {
-
545 // opsv and opvs were UseDefaultBinaryOp
-
546 binary_op<T, T>(
-
547 a,
-
548 b,
-
549 out,
-
550 op,
-
551 DefaultScalarVector<T, T, Op>(op),
-
552 DefaultVectorScalar<T, T, Op>(op),
-
553 opvv);
-
554 }
-
555 } else if (std::is_same<decltype(opvv), UseDefaultBinaryOp>::value) {
-
556 // opsv and opvv were UseDefaultBinaryOp
-
557 binary_op<T, T>(
-
558 a,
-
559 b,
-
560 out,
-
561 op,
-
562 DefaultScalarVector<T, T, Op>(op),
-
563 opvs,
-
564 DefaultVectorVector<T, T, Op>(op));
-
565 } else {
-
566 // opsv was UseDefaultBinaryOp
-
567 binary_op<T, T>(
-
568 a, b, out, op, DefaultScalarVector<T, T, Op>(op), opvs, opvv);
-
569 }
-
570 } else if (std::is_same<decltype(opvs), UseDefaultBinaryOp>::value) {
-
571 if (std::is_same<decltype(opvv), UseDefaultBinaryOp>::value) {
-
572 // opvs and opvv were UseDefaultBinaryOp
-
573 binary_op<T, T>(
-
574 a,
-
575 b,
-
576 out,
-
577 op,
-
578 opsv,
-
579 DefaultVectorScalar<T, T, Op>(op),
-
580 DefaultVectorVector<T, T, Op>(op));
-
581 } else {
-
582 // opvs was UseDefaultBinaryOp
-
583 binary_op<T, T>(
-
584 a, b, out, op, opsv, DefaultVectorScalar<T, T, Op>(op), opvv);
-
585 }
-
586 } else if (std::is_same<decltype(opvv), UseDefaultBinaryOp>::value) {
-
587 // opvv was UseDefaultBinaryOp
-
588 binary_op<T, T>(
-
589 a, b, out, op, opsv, opvs, DefaultVectorVector<T, T, Op>(op));
-
590 } else {
-
591 // All ops provided
-
592 binary_op<T, T>(a, b, out, op, opsv, opvs, opvv);
-
593 }
-
594}
-
595
-
596template <typename T, typename Op>
-
597void binary_op(const array& a, const array& b, array& out, Op op) {
-
598 DefaultScalarVector<T, T, Op> opsv(op);
-
599 DefaultVectorScalar<T, T, Op> opvs(op);
-
600 DefaultVectorVector<T, T, Op> opvv(op);
-
601 binary_op<T, T>(a, b, out, op, opsv, opvs, opvv);
-
602}
-
603
-
604template <typename... Ops>
-
605void binary(const array& a, const array& b, array& out, Ops... ops) {
-
606 switch (out.dtype()) {
-
607 case bool_:
-
608 binary_op<bool>(a, b, out, ops...);
-
609 break;
-
610 case uint8:
-
611 binary_op<uint8_t>(a, b, out, ops...);
-
612 break;
-
613 case uint16:
-
614 binary_op<uint16_t>(a, b, out, ops...);
-
615 break;
-
616 case uint32:
-
617 binary_op<uint32_t>(a, b, out, ops...);
-
618 break;
-
619 case uint64:
-
620 binary_op<uint64_t>(a, b, out, ops...);
-
621 break;
-
622 case int8:
-
623 binary_op<int8_t>(a, b, out, ops...);
-
624 break;
-
625 case int16:
-
626 binary_op<int16_t>(a, b, out, ops...);
-
627 break;
-
628 case int32:
-
629 binary_op<int32_t>(a, b, out, ops...);
-
630 break;
-
631 case int64:
-
632 binary_op<int64_t>(a, b, out, ops...);
-
633 break;
-
634 case float16:
-
635 binary_op<float16_t>(a, b, out, ops...);
-
636 break;
-
637 case float32:
-
638 binary_op<float>(a, b, out, ops...);
-
639 break;
-
640 case bfloat16:
-
641 binary_op<bfloat16_t>(a, b, out, ops...);
-
642 break;
-
643 case complex64:
-
644 binary_op<complex64_t>(a, b, out, ops...);
-
645 break;
-
646 }
-
647}
-
648
-
649} // namespace
-
650
-
651} // namespace mlx::core
- - - -
Op op
Definition binary.h:139
-
Buffer malloc_or_wait(size_t size)
-
Definition allocator.h:7
-
constexpr Dtype bool_
Definition dtype.h:60
-
constexpr Dtype uint64
Definition dtype.h:65
-
constexpr Dtype uint16
Definition dtype.h:63
-
stride_t elem_to_loc(int elem, const std::vector< int > &shape, const std::vector< stride_t > &strides)
Definition utils.h:12
-
constexpr Dtype bfloat16
Definition dtype.h:74
-
constexpr Dtype int32
Definition dtype.h:69
-
constexpr Dtype float32
Definition dtype.h:73
-
constexpr Dtype int16
Definition dtype.h:68
-
constexpr Dtype int8
Definition dtype.h:67
-
constexpr Dtype int64
Definition dtype.h:70
-
constexpr Dtype uint8
Definition dtype.h:62
- -
constexpr Dtype float16
Definition dtype.h:72
-
constexpr Dtype uint32
Definition dtype.h:64
-
constexpr Dtype complex64
Definition dtype.h:75
-
- - - - diff --git a/docs/build/html/common_2compiled__preamble_8h.html b/docs/build/html/common_2compiled__preamble_8h.html deleted file mode 100644 index 824d31aae..000000000 --- a/docs/build/html/common_2compiled__preamble_8h.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/compiled_preamble.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
compiled_preamble.h File Reference
-
-
- -

Go to the source code of this file.

- - - - -

-Functions

const char * get_kernel_preamble ()
 
-

Function Documentation

- -

◆ get_kernel_preamble()

- -
-
- - - - - - - -
const char * get_kernel_preamble ()
-
- -
-
-
- - - - diff --git a/docs/build/html/common_2compiled__preamble_8h_source.html b/docs/build/html/common_2compiled__preamble_8h_source.html deleted file mode 100644 index 3fecd12e0..000000000 --- a/docs/build/html/common_2compiled__preamble_8h_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/compiled_preamble.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
compiled_preamble.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-24 Apple Inc.
-
2
-
3#pragma once
-
4
-
5// clang-format off
- -
7#include "mlx/types/complex.h"
- -
9// clang-format on
-
10
-
11const char* get_kernel_preamble();
- -
const char * get_kernel_preamble()
- - -
- - - - diff --git a/docs/build/html/common_2copy_8h.html b/docs/build/html/common_2copy_8h.html deleted file mode 100644 index 2a90f4911..000000000 --- a/docs/build/html/common_2copy_8h.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/copy.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
copy.h File Reference
-
-
-
#include "mlx/array.h"
-#include "mlx/backend/common/utils.h"
-
-

Go to the source code of this file.

- - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
- - - -

-Enumerations

enum class  mlx::core::CopyType { mlx::core::Scalar -, mlx::core::Vector -, mlx::core::General -, mlx::core::GeneralGeneral - }
 
- - - - - - - - -

-Functions

void mlx::core::copy (const array &src, array &dst, CopyType ctype)
 
void mlx::core::copy_inplace (const array &src, array &dst, CopyType ctype)
 
template<typename stride_t >
void mlx::core::copy_inplace (const array &src, array &dst, const std::vector< int > &data_shape, const std::vector< stride_t > &i_strides, const std::vector< stride_t > &o_strides, int64_t i_offset, int64_t o_offset, CopyType ctype)
 
-
- - - - diff --git a/docs/build/html/common_2copy_8h_source.html b/docs/build/html/common_2copy_8h_source.html deleted file mode 100644 index 050fc5aa9..000000000 --- a/docs/build/html/common_2copy_8h_source.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/copy.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
copy.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include "mlx/array.h"
- -
7
-
8namespace mlx::core {
-
9
-
-
10enum class CopyType {
-
11 // Copy a raw scalar input into the full contiguous output
-
12 Scalar,
-
13
-
14 // Copy the raw input buffer contiguously into a raw output buffer of the same
-
15 // size
-
16 Vector,
-
17
-
18 // Copy the full virtual input to the full contiguous output
-
19 General,
-
20
-
21 // Copy the full virtual input to the full virtual output. We assume the
-
22 // input and output have the same shape.
- -
24};
-
-
25
-
26void copy(const array& src, array& dst, CopyType ctype);
-
27void copy_inplace(const array& src, array& dst, CopyType ctype);
-
28
-
29template <typename stride_t>
- -
31 const array& src,
-
32 array& dst,
-
33 const std::vector<int>& data_shape,
-
34 const std::vector<stride_t>& i_strides,
-
35 const std::vector<stride_t>& o_strides,
-
36 int64_t i_offset,
-
37 int64_t o_offset,
-
38 CopyType ctype);
-
39
-
40} // namespace mlx::core
- - -
Definition array.h:20
-
Definition allocator.h:7
-
void copy(const array &src, array &dst, CopyType ctype)
-
void copy_inplace(const array &src, array &dst, CopyType ctype)
-
CopyType
Definition copy.h:10
- - - - -
- - - - diff --git a/docs/build/html/common_2reduce_8h.html b/docs/build/html/common_2reduce_8h.html deleted file mode 100644 index 951bd9ebd..000000000 --- a/docs/build/html/common_2reduce_8h.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/reduce.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
reduce.h File Reference
-
-
- -

Go to the source code of this file.

- - - - -

-Classes

struct  mlx::core::ReductionPlan
 
- - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
- - - -

-Enumerations

enum  mlx::core::ReductionOpType {
-  mlx::core::ContiguousAllReduce -, mlx::core::ContiguousReduce -, mlx::core::ContiguousStridedReduce -, mlx::core::GeneralContiguousReduce -,
-  mlx::core::GeneralStridedReduce -, mlx::core::GeneralReduce -
- }
 
-

Variable Documentation

- -

◆ op

- -
-
- - - - -
Op op
-
- -
-
-
- - - - diff --git a/docs/build/html/common_2reduce_8h_source.html b/docs/build/html/common_2reduce_8h_source.html deleted file mode 100644 index 813b7d68b..000000000 --- a/docs/build/html/common_2reduce_8h_source.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/reduce.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
reduce.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4
- -
6
-
7namespace mlx::core {
-
8
-
- -
10 // Self-explanatory. Read everything and produce 1 output.
- -
12
-
13 // The input is contiguous and the last axis is reduced
-
14 // N1xR1xN2xR2x...xNnxRn
- -
16
-
17 // The input is contiguous and the last axis is not reduced
-
18 // R1xN1xR2xN2x...xRnxNn
- -
20
-
21 // The input is not contiguous but the last axis is and it is reduced so we
-
22 // need to figure out the offsets but we can call the contiguous reduce after
-
23 // that.
-
24 // N3xR1xN1xR4x...xRn
- -
26
-
27 // The input is not contiguous but the last reduction axis and the last axis
-
28 // are so we need to figure out the offset but we can call the strided reduce
-
29 // after that.
- -
31
-
32 // The input is not contiguous after the reduction axis and it may contain
-
33 // 0-stride axes or transpositions. We could copy the strides and produce a
-
34 // transposed outcome or we can read the input out of order and write the
-
35 // output in order.
- -
37};
-
-
38
-
- - -
41 std::vector<int> shape;
-
42 std::vector<size_t> strides;
-
43
-
- -
45 ReductionOpType type_,
-
46 std::vector<int> shape_,
-
47 std::vector<size_t> strides_)
-
48 : type(type_), shape(std::move(shape_)), strides(std::move(strides_)) {}
-
- -
50};
-
-
51
-
52namespace {
-
53
-
54// Helper for the ndimensional strided loop
-
55// Should this be in utils?
-
56inline void nd_loop(
-
57 std::function<void(int)> callback,
-
58 const std::vector<int>& shape,
-
59 const std::vector<size_t>& strides) {
-
60 std::function<void(int, int)> loop_inner;
-
61 loop_inner = [&](int dim, int offset) {
-
62 if (dim < shape.size() - 1) {
-
63 int size = shape[dim];
-
64 size_t stride = strides[dim];
-
65 for (int i = 0; i < size; i++) {
-
66 loop_inner(dim + 1, offset + i * stride);
-
67 }
-
68 } else {
-
69 int size = shape[dim];
-
70 size_t stride = strides[dim];
-
71 for (int i = 0; i < size; i++) {
-
72 callback(offset + i * stride);
-
73 }
-
74 }
-
75 };
-
76 loop_inner(0, 0);
-
77}
-
78
-
79std::pair<std::vector<int>, std::vector<size_t>> shapes_without_reduction_axes(
-
80 const array& x,
-
81 const std::vector<int>& axes) {
-
82 std::vector<int> shape = x.shape();
-
83 std::vector<size_t> strides = x.strides();
-
84
-
85 for (int i = axes.size() - 1; i >= 0; i--) {
-
86 int a = axes[i];
-
87 shape.erase(shape.begin() + a);
-
88 strides.erase(strides.begin() + a);
-
89 }
-
90
-
91 return std::make_pair(shape, strides);
-
92}
-
93
-
94template <typename T, typename U, typename Op>
-
95struct DefaultStridedReduce {
-
96 Op op;
-
97
-
98 DefaultStridedReduce(Op op_) : op(op_) {}
-
99
-
100 void operator()(const T* x, U* accumulator, int size, size_t stride) {
-
101 for (int i = 0; i < size; i++) {
-
102 U* moving_accumulator = accumulator;
-
103 for (int j = 0; j < stride; j++) {
-
104 op(moving_accumulator, *x);
-
105 moving_accumulator++;
-
106 x++;
-
107 }
-
108 }
-
109 }
-
110};
-
111
-
112template <typename T, typename U, typename Op>
-
113struct DefaultContiguousReduce {
-
114 Op op;
-
115
-
116 DefaultContiguousReduce(Op op_) : op(op_) {}
-
117
-
118 void operator()(const T* x, U* accumulator, int size) {
-
119 while (size-- > 0) {
-
120 op(accumulator, *x);
-
121 x++;
-
122 }
-
123 }
-
124};
-
125
-
126ReductionPlan get_reduction_plan(const array& x, const std::vector<int> axes) {
-
127 // The data is all there and we are reducing over everything
-
128 if (x.size() == x.data_size() && axes.size() == x.ndim() &&
-
129 x.flags().contiguous) {
-
130 return ContiguousAllReduce;
-
131 }
-
132
-
133 // Row contiguous input so the output is row contiguous
-
134 if (x.flags().row_contiguous) {
-
135 // Merge consecutive axes
-
136 std::vector<int> shape = {x.shape(axes[0])};
-
137 std::vector<size_t> strides = {x.strides()[axes[0]]};
-
138 for (int i = 1; i < axes.size(); i++) {
-
139 if (axes[i] - 1 == axes[i - 1]) {
-
140 shape.back() *= x.shape(axes[i]);
-
141 strides.back() = x.strides()[axes[i]];
-
142 } else {
-
143 shape.push_back(x.shape(axes[i]));
-
144 strides.push_back(x.strides()[axes[i]]);
-
145 }
-
146 }
-
147
-
148 if (strides.back() == 1) {
-
149 return ReductionPlan(ContiguousReduce, shape, strides);
-
150 } else if (strides.back() > 1) {
-
151 return ReductionPlan(ContiguousStridedReduce, shape, strides);
-
152 }
-
153 }
-
154
-
155 // Let's check if we can optimize our access patterns
-
156 //
-
157 // 1. We have a reduction axis with stride 1. Simply call
-
158 // GeneralContiguousReduce and be done with it.
-
159 // 2. We have transpositions and we are not reducing over the axis with
-
160 // stride 1. However, we are reducing over an axis where everything is
-
161 // contiguous in memory to the right of that axis. We can call strided
-
162 // reduce and be done with it.
-
163 // 2. We have weird transpositions and expands. Copy the strides to the
-
164 // output, then call strided reduce.
-
165
-
166 // Sort reduction axes by stride in order to merge them and figure out if we
-
167 // have a contiguous reduction.
-
168 std::vector<std::pair<int, size_t>> reductions;
-
169 for (auto a : axes) {
-
170 reductions.push_back(std::make_pair(x.shape(a), x.strides()[a]));
-
171 }
-
172 std::sort(reductions.begin(), reductions.end(), [](auto a, auto b) {
-
173 return a.second > b.second;
-
174 });
-
175 // Extract the two smallest and try to merge them in case the contiguous
-
176 // reduction can be bigger than just the last axis.
-
177 for (int i = reductions.size() - 1; i >= 1; i--) {
-
178 auto a = reductions[i];
-
179 auto b = reductions[i - 1];
-
180
-
181 // b.stride = a.shape * a.stride then a and b are contiguous
-
182 if (b.second == a.first * a.second) {
-
183 reductions.erase(reductions.begin() + i);
-
184 reductions[i - 1] = std::make_pair(a.first * b.first, a.second);
-
185 }
-
186 }
-
187
-
188 std::vector<int> shape;
-
189 std::vector<size_t> strides;
-
190 for (auto r : reductions) {
-
191 shape.push_back(r.first);
-
192 strides.push_back(r.second);
-
193 }
-
194
-
195 // We can call the contiguous reduction op for every weird way the input is
-
196 // structured in the rest of the axes.
-
197 if (strides.back() == 1) {
-
198 return ReductionPlan(GeneralContiguousReduce, shape, strides);
-
199 }
-
200
-
201 // Delegate to the general strided reduction op if the axes after
-
202 // strides.back() are contiguous.
-
203 if (strides.back() > 1) {
-
204 int size = 1;
-
205 for (int i = x.ndim() - 1; i >= 0; i--) {
-
206 if (axes.back() == i) {
-
207 continue;
-
208 }
-
209 if (x.strides()[i] != size) {
-
210 break;
-
211 }
-
212 size *= x.shape(i);
-
213 }
-
214 if (size >= strides.back()) {
-
215 return ReductionPlan(GeneralStridedReduce, shape, strides);
-
216 }
-
217 }
-
218
-
219 return ReductionPlan(GeneralReduce, shape, strides);
-
220}
-
221
-
222template <typename T, typename U, typename OpS, typename OpC, typename Op>
-
223void reduction_op(
-
224 const array& x,
-
225 array& out,
-
226 const std::vector<int>& axes,
-
227 U init,
-
228 OpS ops,
-
229 OpC opc,
-
230 Op op) {
-
231 out.set_data(allocator::malloc_or_wait(out.nbytes()));
-
232 ReductionPlan plan = get_reduction_plan(x, axes);
-
233
-
234 if (plan.type == ContiguousAllReduce) {
-
235 U* out_ptr = out.data<U>();
-
236 *out_ptr = init;
-
237 opc(x.data<T>(), out_ptr, x.size());
-
238 return;
-
239 }
-
240
-
241 std::vector<int> shape;
-
242 std::vector<size_t> strides;
-
243
-
244 if (plan.type == ContiguousReduce && plan.shape.size() == 1) {
-
245 int reduction_size = plan.shape[0];
-
246 const T* x_ptr = x.data<T>();
-
247 U* out_ptr = out.data<U>();
-
248 for (int i = 0; i < out.size(); i++, out_ptr++, x_ptr += reduction_size) {
-
249 *out_ptr = init;
-
250 opc(x_ptr, out_ptr, reduction_size);
-
251 }
-
252 return;
-
253 }
-
254
-
255 if (plan.type == GeneralContiguousReduce || plan.type == ContiguousReduce) {
-
256 int reduction_size = plan.shape.back();
-
257 plan.shape.pop_back();
-
258 plan.strides.pop_back();
-
259 const T* x_ptr = x.data<T>();
-
260 U* out_ptr = out.data<U>();
-
261 // Unrolling the following loop (and implementing it in order for
-
262 // ContiguousReduce) should hold extra performance boost.
-
263 std::tie(shape, strides) = shapes_without_reduction_axes(x, axes);
-
264 if (plan.shape.size() == 0) {
-
265 for (int i = 0; i < out.size(); i++, out_ptr++) {
-
266 int offset = elem_to_loc(i, shape, strides);
-
267 *out_ptr = init;
-
268 opc(x_ptr + offset, out_ptr, reduction_size);
-
269 }
-
270 } else {
-
271 for (int i = 0; i < out.size(); i++, out_ptr++) {
-
272 int offset = elem_to_loc(i, shape, strides);
-
273 *out_ptr = init;
-
274 nd_loop(
-
275 [&](int extra_offset) {
-
276 opc(x_ptr + offset + extra_offset, out_ptr, reduction_size);
-
277 },
-
278 plan.shape,
-
279 plan.strides);
-
280 }
-
281 }
-
282 return;
-
283 }
-
284
-
285 if (plan.type == ContiguousStridedReduce && plan.shape.size() == 1) {
-
286 int reduction_size = plan.shape.back();
-
287 size_t reduction_stride = plan.strides.back();
-
288 plan.shape.pop_back();
-
289 plan.strides.pop_back();
-
290 const T* x_ptr = x.data<T>();
-
291 U* out_ptr = out.data<U>();
-
292 for (int i = 0; i < out.size(); i += reduction_stride) {
-
293 std::fill_n(out_ptr, reduction_stride, init);
-
294 ops(x_ptr, out_ptr, reduction_size, reduction_stride);
-
295 x_ptr += reduction_stride * reduction_size;
-
296 out_ptr += reduction_stride;
-
297 }
-
298 return;
-
299 }
-
300
-
301 if (plan.type == GeneralStridedReduce ||
-
302 plan.type == ContiguousStridedReduce) {
-
303 int reduction_size = plan.shape.back();
-
304 size_t reduction_stride = plan.strides.back();
-
305 plan.shape.pop_back();
-
306 plan.strides.pop_back();
-
307 const T* x_ptr = x.data<T>();
-
308 U* out_ptr = out.data<U>();
-
309 std::tie(shape, strides) = shapes_without_reduction_axes(x, axes);
-
310 if (plan.shape.size() == 0) {
-
311 for (int i = 0; i < out.size(); i += reduction_stride) {
-
312 int offset = elem_to_loc(i, shape, strides);
-
313 std::fill_n(out_ptr, reduction_stride, init);
-
314 ops(x_ptr + offset, out_ptr, reduction_size, reduction_stride);
-
315 out_ptr += reduction_stride;
-
316 }
-
317 } else {
-
318 for (int i = 0; i < out.size(); i += reduction_stride) {
-
319 int offset = elem_to_loc(i, shape, strides);
-
320 std::fill_n(out_ptr, reduction_stride, init);
-
321 nd_loop(
-
322 [&](int extra_offset) {
-
323 ops(x_ptr + offset + extra_offset,
-
324 out_ptr,
-
325 reduction_size,
-
326 reduction_stride);
-
327 },
-
328 plan.shape,
-
329 plan.strides);
-
330 out_ptr += reduction_stride;
-
331 }
-
332 }
-
333 return;
-
334 }
-
335
-
336 if (plan.type == GeneralReduce) {
-
337 const T* x_ptr = x.data<T>();
-
338 U* out_ptr = out.data<U>();
-
339 std::tie(shape, strides) = shapes_without_reduction_axes(x, axes);
-
340 for (int i = 0; i < out.size(); i++, out_ptr++) {
-
341 int offset = elem_to_loc(i, shape, strides);
-
342 U val = init;
-
343 nd_loop(
-
344 [&](int extra_offset) { op(&val, *(x_ptr + offset + extra_offset)); },
-
345 plan.shape,
-
346 plan.strides);
-
347 *out_ptr = val;
-
348 }
-
349 }
-
350}
-
351
-
352template <typename T, typename U, typename Op>
-
353void reduction_op(
-
354 const array& x,
-
355 array& out,
-
356 const std::vector<int>& axes,
-
357 U init,
-
358 Op op) {
-
359 DefaultStridedReduce<T, U, Op> ops(op);
-
360 DefaultContiguousReduce<T, U, Op> opc(op);
-
361 reduction_op<T, U>(x, out, axes, init, ops, opc, op);
-
362}
-
363
-
364} // namespace
-
365
-
366} // namespace mlx::core
- -
Op op
Definition binary.h:139
-
array std(const array &a, bool keepdims, int ddof=0, StreamOrDevice s={})
Computes the standard deviation of the elements of an array.
-
Buffer malloc_or_wait(size_t size)
-
Definition allocator.h:7
-
ReductionOpType
Definition reduce.h:9
-
@ GeneralReduce
Definition reduce.h:36
-
@ GeneralContiguousReduce
Definition reduce.h:25
-
@ ContiguousStridedReduce
Definition reduce.h:19
-
@ ContiguousReduce
Definition reduce.h:15
-
@ GeneralStridedReduce
Definition reduce.h:30
-
@ ContiguousAllReduce
Definition reduce.h:11
-
stride_t elem_to_loc(int elem, const std::vector< int > &shape, const std::vector< stride_t > &strides)
Definition utils.h:12
-
Definition reduce.h:39
-
ReductionOpType type
Definition reduce.h:40
-
ReductionPlan(ReductionOpType type_, std::vector< int > shape_, std::vector< size_t > strides_)
Definition reduce.h:44
-
std::vector< int > shape
Definition reduce.h:41
-
std::vector< size_t > strides
Definition reduce.h:42
-
ReductionPlan(ReductionOpType type_)
Definition reduce.h:49
-
- - - - diff --git a/docs/build/html/common_2ternary_8h.html b/docs/build/html/common_2ternary_8h.html deleted file mode 100644 index 2bdd394cc..000000000 --- a/docs/build/html/common_2ternary_8h.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/ternary.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
ternary.h File Reference
-
-
-
#include "mlx/allocator.h"
-#include "mlx/array.h"
-#include "mlx/backend/common/ops.h"
-#include "mlx/backend/common/utils.h"
-
-

Go to the source code of this file.

- - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
-
- - - - diff --git a/docs/build/html/common_2ternary_8h_source.html b/docs/build/html/common_2ternary_8h_source.html deleted file mode 100644 index edce1f51f..000000000 --- a/docs/build/html/common_2ternary_8h_source.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/ternary.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
ternary.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4#include "mlx/allocator.h"
-
5#include "mlx/array.h"
- - -
8namespace mlx::core {
-
9
-
10namespace {
-
11
-
12// TODO: Add support for more combinations of input types.
-
13enum class TernaryOpType {
-
14 ScalarScalarScalar,
-
15 General,
-
16};
-
17
-
18TernaryOpType
-
19get_ternary_op_type(const array& a, const array& b, const array& c) {
-
20 TernaryOpType topt;
-
21 if (a.data_size() == 1 && b.data_size() == 1 && c.data_size() == 1) {
-
22 topt = TernaryOpType::ScalarScalarScalar;
-
23 } else {
-
24 topt = TernaryOpType::General;
-
25 }
-
26 return topt;
-
27}
-
28
-
29void set_ternary_op_output_data(
-
30 const array& a,
-
31 const array& b,
-
32 const array& c,
-
33 array& out,
-
34 TernaryOpType topt,
-
35 bool donate_with_move = false) {
-
36 switch (topt) {
-
37 case TernaryOpType::ScalarScalarScalar:
-
38 out.set_data(
-
39 allocator::malloc_or_wait(out.itemsize()), 1, b.strides(), b.flags());
-
40 break;
-
41 case TernaryOpType::General:
-
42 out.set_data(allocator::malloc_or_wait(out.nbytes()));
-
43 break;
-
44 }
-
45}
-
46
-
47template <typename T1, typename T2, typename T3, typename U, typename Op>
-
48void ternary_op_dims1(
-
49 const array& a,
-
50 const array& b,
-
51 const array& c,
-
52 array& out,
-
53 Op op) {
-
54 const T1* a_ptr = a.data<T1>();
-
55 const T2* b_ptr = b.data<T2>();
-
56 const T3* c_ptr = c.data<T3>();
-
57
-
58 U* dst = out.data<U>();
-
59 size_t a_idx = 0;
-
60 size_t b_idx = 0;
-
61 size_t c_idx = 0;
-
62 for (size_t i = 0; i < out.size(); ++i) {
-
63 dst[i] = op(a_ptr[a_idx], b_ptr[b_idx], c_ptr[c_idx]);
-
64 a_idx += a.strides()[0];
-
65 b_idx += b.strides()[0];
-
66 c_idx += c.strides()[0];
-
67 }
-
68}
-
69
-
70template <typename T1, typename T2, typename T3, typename U, typename Op>
-
71void ternary_op_dims2(
-
72 const array& a,
-
73 const array& b,
-
74 const array& c,
-
75 array& out,
-
76 Op op) {
-
77 const T1* a_ptr = a.data<T1>();
-
78 const T2* b_ptr = b.data<T2>();
-
79 const T3* c_ptr = c.data<T3>();
-
80
-
81 U* dst = out.data<U>();
-
82 size_t a_idx = 0;
-
83 size_t b_idx = 0;
-
84 size_t c_idx = 0;
-
85 size_t out_idx = 0;
-
86 for (size_t i = 0; i < a.shape()[0]; ++i) {
-
87 for (size_t j = 0; j < a.shape()[1]; ++j) {
-
88 dst[out_idx++] = op(a_ptr[a_idx], b_ptr[b_idx], c_ptr[c_idx]);
-
89 a_idx += a.strides()[1];
-
90 b_idx += b.strides()[1];
-
91 c_idx += c.strides()[1];
-
92 }
-
93 a_idx += a.strides()[0] - a.strides()[1] * a.shape()[1];
-
94 b_idx += b.strides()[0] - b.strides()[1] * b.shape()[1];
-
95 c_idx += c.strides()[0] - c.strides()[1] * c.shape()[1];
-
96 }
-
97}
-
98
-
99template <typename T1, typename T2, typename T3, typename U, typename Op>
-
100void ternary_op_dims3(
-
101 const array& a,
-
102 const array& b,
-
103 const array& c,
-
104 array& out,
-
105 Op op) {
-
106 const T1* a_ptr = a.data<T1>();
-
107 const T2* b_ptr = b.data<T2>();
-
108 const T3* c_ptr = c.data<T3>();
-
109 U* dst = out.data<U>();
-
110 size_t a_idx = 0;
-
111 size_t b_idx = 0;
-
112 size_t c_idx = 0;
-
113 size_t out_idx = 0;
-
114 for (size_t i = 0; i < a.shape()[0]; ++i) {
-
115 for (size_t j = 0; j < a.shape()[1]; ++j) {
-
116 for (size_t k = 0; k < a.shape()[2]; ++k) {
-
117 dst[out_idx++] = op(a_ptr[a_idx], b_ptr[b_idx], c_ptr[c_idx]);
-
118 a_idx += a.strides()[2];
-
119 b_idx += b.strides()[2];
-
120 c_idx += c.strides()[2];
-
121 }
-
122 a_idx += a.strides()[1] - a.strides()[2] * a.shape()[2];
-
123 b_idx += b.strides()[1] - b.strides()[2] * b.shape()[2];
-
124 c_idx += c.strides()[1] - c.strides()[2] * c.shape()[2];
-
125 }
-
126 a_idx += a.strides()[0] - a.strides()[1] * a.shape()[1];
-
127 b_idx += b.strides()[0] - b.strides()[1] * b.shape()[1];
-
128 c_idx += c.strides()[0] - c.strides()[1] * c.shape()[1];
-
129 }
-
130}
-
131
-
132template <typename T1, typename T2, typename T3, typename U, typename Op>
-
133void ternary_op_dims4(
-
134 const array& a,
-
135 const array& b,
-
136 const array& c,
-
137 array& out,
-
138 Op op) {
-
139 const T1* a_ptr = a.data<T1>();
-
140 const T2* b_ptr = b.data<T2>();
-
141 const T3* c_ptr = c.data<T3>();
-
142
-
143 U* dst = out.data<U>();
-
144 size_t a_idx = 0;
-
145 size_t b_idx = 0;
-
146 size_t c_idx = 0;
-
147 size_t out_idx = 0;
-
148 for (size_t i = 0; i < a.shape()[0]; ++i) {
-
149 for (size_t j = 0; j < a.shape()[1]; ++j) {
-
150 for (size_t k = 0; k < a.shape()[2]; ++k) {
-
151 for (size_t ii = 0; ii < a.shape()[3]; ++ii) {
-
152 dst[out_idx++] = op(a_ptr[a_idx], b_ptr[b_idx], c_ptr[c_idx]);
-
153 a_idx += a.strides()[3];
-
154 b_idx += b.strides()[3];
-
155 c_idx += c.strides()[3];
-
156 }
-
157 a_idx += a.strides()[2] - a.strides()[3] * a.shape()[3];
-
158 b_idx += b.strides()[2] - b.strides()[3] * b.shape()[3];
-
159 c_idx += c.strides()[2] - c.strides()[3] * c.shape()[3];
-
160 }
-
161 a_idx += a.strides()[1] - a.strides()[2] * a.shape()[2];
-
162 b_idx += b.strides()[1] - b.strides()[2] * b.shape()[2];
-
163 c_idx += c.strides()[1] - c.strides()[2] * c.shape()[2];
-
164 }
-
165 a_idx += a.strides()[0] - a.strides()[1] * a.shape()[1];
-
166 b_idx += b.strides()[0] - b.strides()[1] * b.shape()[1];
-
167 c_idx += c.strides()[0] - c.strides()[1] * c.shape()[1];
-
168 }
-
169}
-
170
-
171template <typename T1, typename T2, typename T3, typename U, typename Op>
-
172void ternary_op_dispatch_dims(
-
173 const array& a,
-
174 const array& b,
-
175 const array& c,
-
176 array& out,
-
177 Op op) {
-
178 switch (out.ndim()) {
-
179 case 1:
-
180 ternary_op_dims1<T1, T2, T3, U, Op>(a, b, c, out, op);
-
181 return;
-
182 case 2:
-
183 ternary_op_dims2<T1, T2, T3, U, Op>(a, b, c, out, op);
-
184 return;
-
185 case 3:
-
186 ternary_op_dims3<T1, T2, T3, U, Op>(a, b, c, out, op);
-
187 return;
-
188 case 4:
-
189 ternary_op_dims4<T1, T2, T3, U, Op>(a, b, c, out, op);
-
190 return;
-
191 }
-
192
-
193 const T1* a_ptr = a.data<T1>();
-
194 const T2* b_ptr = b.data<T2>();
-
195 const T3* c_ptr = c.data<T3>();
-
196 U* dst = out.data<U>();
-
197 for (size_t i = 0; i < out.size(); i++) {
-
198 int a_idx = elem_to_loc(i, a.shape(), a.strides());
-
199 int b_idx = elem_to_loc(i, b.shape(), b.strides());
-
200 int c_idx = elem_to_loc(i, c.shape(), c.strides());
-
201 dst[i] = op(a_ptr[a_idx], b_ptr[b_idx], c_ptr[c_idx]);
-
202 }
-
203}
-
204
-
205template <typename T1, typename T2, typename T3, typename U, typename Op>
-
206void ternary_op(
-
207 const array& a,
-
208 const array& b,
-
209 const array& c,
-
210 array& out,
-
211 Op op) {
-
212 TernaryOpType topt = get_ternary_op_type(a, b, c);
-
213 set_ternary_op_output_data(a, b, c, out, topt);
-
214
-
215 // The full computation is scalar-scalar-scalar so we call the base op once.
-
216 if (topt == TernaryOpType::ScalarScalarScalar) {
-
217 *(out.data<U>()) = op(*a.data<T1>(), *b.data<T2>(), *c.data<T3>());
-
218 return;
-
219 }
-
220
-
221 ternary_op_dispatch_dims<T1, T2, T3, U>(a, b, c, out, op);
-
222}
-
223
-
224} // namespace
-
225
-
226} // namespace mlx::core
- - - - -
Op op
Definition binary.h:139
-
Buffer malloc_or_wait(size_t size)
-
Definition allocator.h:7
-
stride_t elem_to_loc(int elem, const std::vector< int > &shape, const std::vector< stride_t > &strides)
Definition utils.h:12
- -
- - - - diff --git a/docs/build/html/common_2unary_8h.html b/docs/build/html/common_2unary_8h.html deleted file mode 100644 index c0017b1c4..000000000 --- a/docs/build/html/common_2unary_8h.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/unary.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
unary.h File Reference
-
-
-
#include "mlx/allocator.h"
-#include "mlx/array.h"
-#include "mlx/backend/common/utils.h"
-#include "mlx/utils.h"
-
-

Go to the source code of this file.

- - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
-
- - - - diff --git a/docs/build/html/common_2unary_8h_source.html b/docs/build/html/common_2unary_8h_source.html deleted file mode 100644 index 1fa0f5e15..000000000 --- a/docs/build/html/common_2unary_8h_source.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/unary.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
unary.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include "mlx/allocator.h"
-
6#include "mlx/array.h"
- -
8#include "mlx/utils.h"
-
9
-
10namespace mlx::core {
-
11
-
12namespace {
-
13
-
14void set_unary_output_data(const array& in, array& out) {
-
15 if (in.is_donatable() && in.itemsize() == out.itemsize()) {
-
16 out.copy_shared_buffer(in);
-
17 } else {
-
18 auto size = in.data_size();
-
19 out.set_data(
-
20 allocator::malloc_or_wait(size * out.itemsize()),
-
21 size,
-
22 in.strides(),
-
23 in.flags());
-
24 }
-
25}
-
26
-
27template <typename T, typename Op>
-
28void unary_op(const array& a, array& out, Op op) {
-
29 const T* a_ptr = a.data<T>();
-
30 if (a.flags().contiguous) {
-
31 set_unary_output_data(a, out);
-
32 T* dst = out.data<T>();
-
33 for (size_t i = 0; i < a.data_size(); ++i) {
-
34 dst[i] = op(a_ptr[i]);
-
35 }
-
36 } else {
-
37 out.set_data(allocator::malloc_or_wait(out.nbytes()));
-
38 T* dst = out.data<T>();
-
39 for (size_t i = 0; i < out.size(); ++i) {
-
40 // TODO this is super inefficient, need to fix.
-
41 int a_idx = elem_to_loc(i, a.shape(), a.strides());
-
42 dst[i] = op(a_ptr[a_idx]);
-
43 }
-
44 }
-
45}
-
46
-
47template <typename Op>
-
48void unary(const array& a, array& out, Op op) {
-
49 switch (out.dtype()) {
-
50 case bool_:
-
51 unary_op<bool>(a, out, op);
-
52 break;
-
53 case uint8:
-
54 unary_op<uint8_t>(a, out, op);
-
55 break;
-
56 case uint16:
-
57 unary_op<uint16_t>(a, out, op);
-
58 break;
-
59 case uint32:
-
60 unary_op<uint32_t>(a, out, op);
-
61 break;
-
62 case uint64:
-
63 unary_op<uint64_t>(a, out, op);
-
64 break;
-
65 case int8:
-
66 unary_op<int8_t>(a, out, op);
-
67 break;
-
68 case int16:
-
69 unary_op<int16_t>(a, out, op);
-
70 break;
-
71 case int32:
-
72 unary_op<int32_t>(a, out, op);
-
73 break;
-
74 case int64:
-
75 unary_op<int64_t>(a, out, op);
-
76 break;
-
77 case float16:
-
78 unary_op<float16_t>(a, out, op);
-
79 break;
-
80 case float32:
-
81 unary_op<float>(a, out, op);
-
82 break;
-
83 case bfloat16:
-
84 unary_op<bfloat16_t>(a, out, op);
-
85 break;
-
86 case complex64:
-
87 unary_op<complex64_t>(a, out, op);
-
88 break;
-
89 }
-
90}
-
91
-
92template <typename Op>
-
93void unary_fp(const array& a, array& out, Op op) {
-
94 switch (out.dtype()) {
-
95 case bfloat16:
-
96 unary_op<bfloat16_t>(a, out, op);
-
97 break;
-
98 case float16:
-
99 unary_op<float16_t>(a, out, op);
-
100 break;
-
101 case float32:
-
102 unary_op<float>(a, out, op);
-
103 break;
-
104 case complex64:
-
105 unary_op<complex64_t>(a, out, op);
-
106 break;
-
107 default:
-
108 std::ostringstream err;
-
109 err << "[unary_fp] Does not support " << out.dtype();
-
110 throw std::runtime_error(err.str());
-
111 }
-
112}
-
113
-
114} // namespace
-
115
-
116} // namespace mlx::core
- - - -
Op op
Definition binary.h:139
-
Buffer malloc_or_wait(size_t size)
-
Definition allocator.h:7
-
constexpr Dtype bool_
Definition dtype.h:60
-
constexpr Dtype uint64
Definition dtype.h:65
-
constexpr Dtype uint16
Definition dtype.h:63
-
stride_t elem_to_loc(int elem, const std::vector< int > &shape, const std::vector< stride_t > &strides)
Definition utils.h:12
-
constexpr Dtype bfloat16
Definition dtype.h:74
-
constexpr Dtype int32
Definition dtype.h:69
-
constexpr Dtype float32
Definition dtype.h:73
-
constexpr Dtype int16
Definition dtype.h:68
-
constexpr Dtype int8
Definition dtype.h:67
-
constexpr Dtype int64
Definition dtype.h:70
-
constexpr Dtype uint8
Definition dtype.h:62
-
constexpr Dtype float16
Definition dtype.h:72
-
constexpr Dtype uint32
Definition dtype.h:64
-
constexpr Dtype complex64
Definition dtype.h:75
- -
- - - - diff --git a/docs/build/html/compile_8h.html b/docs/build/html/compile_8h.html deleted file mode 100644 index 3689b75f0..000000000 --- a/docs/build/html/compile_8h.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - -MLX: mlx/compile.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
compile.h File Reference
-
-
-
#include "mlx/array.h"
-
-

Go to the source code of this file.

- - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
- - - -

-Enumerations

enum class  mlx::core::CompileMode { mlx::core::disabled -, mlx::core::no_simplify -, mlx::core::no_fuse -, mlx::core::enabled - }
 
- - - - - - - - - - -

-Functions

void mlx::core::disable_compile ()
 Globally disable compilation.
 
void mlx::core::enable_compile ()
 Globally enable compilation.
 
void mlx::core::set_compile_mode (CompileMode mode)
 Set the compiler mode to the given value.
 
- - - - -

-Variables

std::function< std::vector< array >(const std::vector< array > &) mlx::core::compile )(const std::function< std::vector< array >(const std::vector< array > &)> &fun, bool shapeless=false)
 Compile takes a function and returns a compiled function.
 
-
- - - - diff --git a/docs/build/html/compile_8h_source.html b/docs/build/html/compile_8h_source.html deleted file mode 100644 index 8960d1ddc..000000000 --- a/docs/build/html/compile_8h_source.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - -MLX: mlx/compile.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
compile.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include "mlx/array.h"
-
6
-
7namespace mlx::core {
-
8
- -
10
-
12std::function<std::vector<array>(const std::vector<array>&)> compile(
-
13 const std::function<std::vector<array>(const std::vector<array>&)>& fun,
-
14 bool shapeless = false);
-
15
- -
21
- -
26
- -
29} // namespace mlx::core
- -
Definition allocator.h:7
-
void enable_compile()
Globally enable compilation.
-
void set_compile_mode(CompileMode mode)
Set the compiler mode to the given value.
-
void disable_compile()
Globally disable compilation.
-
std::function< std::vector< array >(const std::vector< array > &) compile)(const std::function< std::vector< array >(const std::vector< array > &)> &fun, bool shapeless=false)
Compile takes a function and returns a compiled function.
-
CompileMode
Definition compile.h:9
- - - - -
- - - - diff --git a/docs/build/html/compile__impl_8h.html b/docs/build/html/compile__impl_8h.html deleted file mode 100644 index cfe23b4a1..000000000 --- a/docs/build/html/compile__impl_8h.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -MLX: mlx/compile_impl.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
compile_impl.h File Reference
-
-
-
#include "mlx/device.h"
-
-

Go to the source code of this file.

- - - - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
namespace  mlx::core::detail
 
- - - -

-Functions

bool mlx::core::detail::compile_available_for_device (const Device &device)
 
-
- - - - diff --git a/docs/build/html/compile__impl_8h_source.html b/docs/build/html/compile__impl_8h_source.html deleted file mode 100644 index 83d84e37d..000000000 --- a/docs/build/html/compile__impl_8h_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: mlx/compile_impl.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
compile_impl.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5#include "mlx/device.h"
-
6
-
7namespace mlx::core::detail {
-
8
- -
10
-
11}
- -
Definition ops.h:8
-
bool compile_available_for_device(const Device &device)
-
Definition device.h:7
-
- - - - diff --git a/docs/build/html/compiled_8h.html b/docs/build/html/compiled_8h.html deleted file mode 100644 index aae146e42..000000000 --- a/docs/build/html/compiled_8h.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/compiled.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
compiled.h File Reference
-
-
-
#include <iomanip>
-#include <sstream>
-#include <unordered_set>
-#include "mlx/array.h"
-#include "mlx/primitives.h"
-
-

Go to the source code of this file.

- - - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::core
 
- - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

bool mlx::core::is_static_cast (const Primitive &p)
 
std::string mlx::core::build_lib_name (const std::vector< array > &inputs, const std::vector< array > &outputs, const std::vector< array > &tape, const std::unordered_set< uintptr_t > &constant_ids)
 
std::string mlx::core::get_type_string (Dtype d)
 
template<typename T >
void mlx::core::print_float_constant (std::ostream &os, const array &x)
 
template<typename T >
void mlx::core::print_int_constant (std::ostream &os, const array &x)
 
template<typename T >
void mlx::core::print_complex_constant (std::ostream &os, const array &x)
 
void mlx::core::print_constant (std::ostream &os, const array &x)
 
bool mlx::core::is_scalar (const array &x)
 
bool mlx::core::compiled_check_contiguity (const std::vector< array > &inputs, const std::vector< int > &shape)
 
void mlx::core::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)
 
-
- - - - diff --git a/docs/build/html/compiled_8h_source.html b/docs/build/html/compiled_8h_source.html deleted file mode 100644 index f5ec537b0..000000000 --- a/docs/build/html/compiled_8h_source.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/compiled.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
compiled.h
-
-
-Go to the documentation of this file.
1// Copyright © 2023-2024 Apple Inc.
-
2#pragma once
-
3
-
4#include <iomanip>
-
5#include <sstream>
-
6#include <unordered_set>
-
7
-
8#include "mlx/array.h"
-
9#include "mlx/primitives.h"
-
10
-
11namespace mlx::core {
-
12
-
-
13inline bool is_static_cast(const Primitive& p) {
-
14 return (
-
15 typeid(p) == typeid(Broadcast) || typeid(p) == typeid(Copy) ||
-
16 typeid(p) == typeid(StopGradient) || typeid(p) == typeid(AsType));
-
17}
-
-
18
-
19std::string build_lib_name(
-
20 const std::vector<array>& inputs,
-
21 const std::vector<array>& outputs,
-
22 const std::vector<array>& tape,
-
23 const std::unordered_set<uintptr_t>& constant_ids);
-
24
-
25std::string get_type_string(Dtype d);
-
26
-
27template <typename T>
-
-
28void print_float_constant(std::ostream& os, const array& x) {
-
29 auto old_precision = os.precision();
-
30 os << std::setprecision(std::numeric_limits<float>::digits10 + 1)
-
31 << x.item<T>() << std::setprecision(old_precision);
-
32}
-
-
33
-
34template <typename T>
-
-
35void print_int_constant(std::ostream& os, const array& x) {
-
36 os << x.item<T>();
-
37}
-
-
38
-
39template <typename T>
-
-
40void print_complex_constant(std::ostream& os, const array& x) {
-
41 auto old_precision = os.precision();
-
42 T constant = x.item<T>();
-
43
-
44 os << get_type_string(x.dtype()) << "("
-
45 << std::setprecision(std::numeric_limits<float>::digits10 + 1)
-
46 << constant.real() << ", " << constant.imag() << ")"
-
47 << std::setprecision(old_precision);
-
48}
-
-
49
-
50void print_constant(std::ostream& os, const array& x);
-
51
-
-
52inline bool is_scalar(const array& x) {
-
53 return x.ndim() == 0;
-
54}
-
-
55
-
56// Check if we can use a contiguous operation given inputs and the output shape
- -
58 const std::vector<array>& inputs,
-
59 const std::vector<int>& shape);
-
60
-
61// Allocate space for the outputs possibly with input donation
- -
63 const std::vector<array>& inputs,
-
64 std::vector<array>& outputs,
-
65 const std::vector<array>& inputs_,
-
66 const std::unordered_set<uintptr_t>& constant_ids_,
-
67 bool contiguous,
-
68 bool move_buffers = false);
-
69
-
70} // namespace mlx::core
- -
Definition primitives.h:416
-
Definition primitives.h:525
-
Definition primitives.h:680
-
Definition primitives.h:48
-
Definition primitives.h:1947
-
Definition array.h:20
-
size_t ndim() const
The number of dimensions of the array.
Definition array.h:94
-
T item()
Get the value from a scalar array.
Definition array.h:489
-
Dtype dtype() const
Get the arrays data type.
Definition array.h:127
-
Definition allocator.h:7
-
void print_complex_constant(std::ostream &os, const array &x)
Definition compiled.h:40
-
bool compiled_check_contiguity(const std::vector< array > &inputs, const std::vector< int > &shape)
-
std::string build_lib_name(const std::vector< array > &inputs, const std::vector< array > &outputs, const std::vector< array > &tape, const std::unordered_set< uintptr_t > &constant_ids)
-
void print_constant(std::ostream &os, const array &x)
-
void print_float_constant(std::ostream &os, const array &x)
Definition compiled.h:28
-
void print_int_constant(std::ostream &os, const array &x)
Definition compiled.h:35
-
bool is_scalar(const array &x)
Definition compiled.h:52
-
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)
-
std::string get_type_string(Dtype d)
-
bool is_static_cast(const Primitive &p)
Definition compiled.h:13
- -
Definition dtype.h:15
-
- - - - diff --git a/docs/build/html/conv_2loader_8h.html b/docs/build/html/conv_2loader_8h.html deleted file mode 100644 index f5125528c..000000000 --- a/docs/build/html/conv_2loader_8h.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/loader.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
loader.h File Reference
-
- - - - - diff --git a/docs/build/html/conv_2loader_8h_source.html b/docs/build/html/conv_2loader_8h_source.html deleted file mode 100644 index b3bb84bc8..000000000 --- a/docs/build/html/conv_2loader_8h_source.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/loader.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
loader.h
-
- - - - - diff --git a/docs/build/html/conv_2params_8h.html b/docs/build/html/conv_2params_8h.html deleted file mode 100644 index 72736b010..000000000 --- a/docs/build/html/conv_2params_8h.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/params.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
- -
params.h File Reference
-
-
- -

Go to the source code of this file.

- - - - - - - - - - -

-Classes

struct  MLXConvParams< NDIM >
 
struct  mlx::steel::ImplicitGemmConv2DParams
 
struct  mlx::steel::Conv2DGeneralJumpParams
 
struct  mlx::steel::Conv2DGeneralBaseInfo
 
- - - - - -

-Namespaces

namespace  mlx
 
namespace  mlx::steel
 
-
- - - - diff --git a/docs/build/html/conv_2params_8h_source.html b/docs/build/html/conv_2params_8h_source.html deleted file mode 100644 index deb4bf9a4..000000000 --- a/docs/build/html/conv_2params_8h_source.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/params.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
params.h
-
-
-Go to the documentation of this file.
1// Copyright © 2024 Apple Inc.
-
2
-
3#pragma once
-
4
-
5template <int NDIM>
-
- -
7 const int N; // Batch size
-
8 const int C; // In channels
-
9 const int O; // Out channels
-
10 const int iS[NDIM]; // Input spatial dim
-
11 const int wS[NDIM]; // Weight spatial dim
-
12 const int oS[NDIM]; // Output spatial dim
-
13 const int str[NDIM]; // Kernel strides
-
14 const int pad[NDIM]; // Input padding
-
15 const int kdil[NDIM]; // Kernel dilation
-
16 const int idil[NDIM]; // Input dilation
-
17 const size_t in_strides[NDIM + 2]; // In strides
-
18 const size_t wt_strides[NDIM + 2]; // Wt strides
-
19 const size_t out_strides[NDIM + 2]; // Out strides
-
20 const int groups; // Input channel groups
-
21 const bool flip;
-
22};
-
-
23
-
24namespace mlx {
-
25namespace steel {
-
26
-
- -
28 const int M;
-
29 const int N;
-
30 const int K;
-
31
- -
33
-
34 const int inp_jump_w;
-
35 const int inp_jump_h;
-
36 const int inp_jump_c;
-
37
-
38 const int tiles_n;
-
39 const int tiles_m;
-
40 const int swizzle_log;
-
41};
-
-
42
-
- -
44 const int f_wgt_jump_h;
-
45 const int f_wgt_jump_w;
-
46
-
47 const int f_out_jump_h;
-
48 const int f_out_jump_w;
-
49
-
50 const int adj_out_h;
-
51 const int adj_out_w;
-
52 const int adj_out_hw;
-
53 const int adj_implicit_m;
-
54};
-
-
55
-
- - - -
59};
-
-
60
-
61} // namespace steel
-
62} // namespace mlx
-
Definition allocator.h:7
-
Definition params.h:6
-
const int C
Definition params.h:8
-
const size_t out_strides[NDIM+2]
Definition params.h:19
-
const int oS[NDIM]
Definition params.h:12
-
const int iS[NDIM]
Definition params.h:10
-
const int kdil[NDIM]
Definition params.h:15
-
const int str[NDIM]
Definition params.h:13
-
const size_t wt_strides[NDIM+2]
Definition params.h:18
-
const bool flip
Definition params.h:21
-
const size_t in_strides[NDIM+2]
Definition params.h:17
-
const int wS[NDIM]
Definition params.h:11
-
const int O
Definition params.h:9
-
const int N
Definition params.h:7
-
const int pad[NDIM]
Definition params.h:14
-
const int groups
Definition params.h:20
-
const int idil[NDIM]
Definition params.h:16
-
Definition params.h:56
-
int weight_base
Definition params.h:57
-
int weight_size
Definition params.h:58
- -
const int f_out_jump_w
Definition params.h:48
-
const int f_wgt_jump_h
Definition params.h:44
-
const int f_wgt_jump_w
Definition params.h:45
-
const int adj_implicit_m
Definition params.h:53
-
const int f_out_jump_h
Definition params.h:47
-
const int adj_out_h
Definition params.h:50
-
const int adj_out_w
Definition params.h:51
-
const int adj_out_hw
Definition params.h:52
- -
const int inp_jump_h
Definition params.h:35
-
const int M
Definition params.h:28
-
const int N
Definition params.h:29
-
const int tiles_m
Definition params.h:39
-
const int tiles_n
Definition params.h:38
-
const int inp_jump_c
Definition params.h:36
-
const int gemm_k_iterations
Definition params.h:32
-
const int inp_jump_w
Definition params.h:34
-
const int swizzle_log
Definition params.h:40
-
const int K
Definition params.h:30
-
- - - - diff --git a/docs/build/html/conv_8h.html b/docs/build/html/conv_8h.html deleted file mode 100644 index e62539e7c..000000000 --- a/docs/build/html/conv_8h.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/conv.h File Reference - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
conv.h File Reference
-
- - - - - diff --git a/docs/build/html/conv_8h_source.html b/docs/build/html/conv_8h_source.html deleted file mode 100644 index a7219c852..000000000 --- a/docs/build/html/conv_8h_source.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/conv.h Source File - - - - - - - - - - - -
-
- - - - - - -
-
MLX -
-
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- - -
-
-
conv.h
-
-
-Go to the documentation of this file.
1// Copyright © 2024 Apple Inc.
-
2
-
3#pragma once
-
4
- -
6
- - -
9
-
10using namespace metal;
-
11using namespace mlx::steel;
- - - -
Definition bf16.h:265
-
Definition loader_channel_l.h:14
-
- - - - diff --git a/docs/build/html/cookie.js b/docs/build/html/cookie.js deleted file mode 100644 index 53ad21d98..000000000 --- a/docs/build/html/cookie.js +++ /dev/null @@ -1,58 +0,0 @@ -/*! - Cookie helper functions - Copyright (c) 2023 Dimitri van Heesch - Released under MIT license. -*/ -let Cookie = { - cookie_namespace: 'doxygen_', - - readSetting(cookie,defVal) { - if (window.chrome) { - const val = localStorage.getItem(this.cookie_namespace+cookie) || - sessionStorage.getItem(this.cookie_namespace+cookie); - if (val) return val; - } else { - let myCookie = this.cookie_namespace+cookie+"="; - if (document.cookie) { - const index = document.cookie.indexOf(myCookie); - if (index != -1) { - const valStart = index + myCookie.length; - let valEnd = document.cookie.indexOf(";", valStart); - if (valEnd == -1) { - valEnd = document.cookie.length; - } - return document.cookie.substring(valStart, valEnd); - } - } - } - return defVal; - }, - - writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete - if (window.chrome) { - if (days==0) { - sessionStorage.setItem(this.cookie_namespace+cookie,val); - } else { - localStorage.setItem(this.cookie_namespace+cookie,val); - } - } else { - let date = new Date(); - date.setTime(date.getTime()+(days*24*60*60*1000)); - const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; - document.cookie = this.cookie_namespace + cookie + "=" + - val + "; SameSite=Lax;" + expiration + "path=/"; - } - }, - - eraseSetting(cookie) { - if (window.chrome) { - if (localStorage.getItem(this.cookie_namespace+cookie)) { - localStorage.removeItem(this.cookie_namespace+cookie); - } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { - sessionStorage.removeItem(this.cookie_namespace+cookie); - } - } else { - this.writeSetting(cookie,'',-1); - } - }, -} diff --git a/docs/build/html/cpp/ops.html b/docs/build/html/cpp/ops.html index 9e4d3eb47..0d32ea1a3 100644 --- a/docs/build/html/cpp/ops.html +++ b/docs/build/html/cpp/ops.html @@ -8,7 +8,7 @@ - Operations — MLX 0.13.1 documentation + Operations — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/defines_8h.html b/docs/build/html/defines_8h.html deleted file mode 100644 index 4868bae44..000000000 --- a/docs/build/html/defines_8h.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/defines.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    defines.h File Reference
    -
    -
    - -

    Go to the source code of this file.

    - - - - -

    -Macros

    #define MTL_CONST
     
    - - - - - - - - - - - - - - - - - -

    -Variables

    static constexpr int MAX_BINARY_SPECIALIZED_DIMS = 5
     
    static constexpr int MAX_COPY_SPECIALIZED_DIMS = 5
     
    static constexpr int MAX_REDUCE_SPECIALIZED_DIMS = 4
     
    static constexpr int REDUCE_N_READS = 16
     
    static constexpr int SOFTMAX_N_READS = 4
     
    static constexpr int SOFTMAX_LOOPED_LIMIT = 4096
     
    static constexpr int RMS_N_READS = 4
     
    static constexpr int RMS_LOOPED_LIMIT = 4096
     
    -

    Macro Definition Documentation

    - -

    ◆ MTL_CONST

    - -
    -
    - - - - -
    #define MTL_CONST
    -
    - -
    -
    -

    Variable Documentation

    - -

    ◆ MAX_BINARY_SPECIALIZED_DIMS

    - -
    -
    - - - - - -
    - - - - -
    constexpr int MAX_BINARY_SPECIALIZED_DIMS = 5
    -
    -staticconstexpr
    -
    - -
    -
    - -

    ◆ MAX_COPY_SPECIALIZED_DIMS

    - -
    -
    - - - - - -
    - - - - -
    constexpr int MAX_COPY_SPECIALIZED_DIMS = 5
    -
    -staticconstexpr
    -
    - -
    -
    - -

    ◆ MAX_REDUCE_SPECIALIZED_DIMS

    - -
    -
    - - - - - -
    - - - - -
    constexpr int MAX_REDUCE_SPECIALIZED_DIMS = 4
    -
    -staticconstexpr
    -
    - -
    -
    - -

    ◆ REDUCE_N_READS

    - -
    -
    - - - - - -
    - - - - -
    constexpr int REDUCE_N_READS = 16
    -
    -staticconstexpr
    -
    - -
    -
    - -

    ◆ RMS_LOOPED_LIMIT

    - -
    -
    - - - - - -
    - - - - -
    constexpr int RMS_LOOPED_LIMIT = 4096
    -
    -staticconstexpr
    -
    - -
    -
    - -

    ◆ RMS_N_READS

    - -
    -
    - - - - - -
    - - - - -
    constexpr int RMS_N_READS = 4
    -
    -staticconstexpr
    -
    - -
    -
    - -

    ◆ SOFTMAX_LOOPED_LIMIT

    - -
    -
    - - - - - -
    - - - - -
    constexpr int SOFTMAX_LOOPED_LIMIT = 4096
    -
    -staticconstexpr
    -
    - -
    -
    - -

    ◆ SOFTMAX_N_READS

    - -
    -
    - - - - - -
    - - - - -
    constexpr int SOFTMAX_N_READS = 4
    -
    -staticconstexpr
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/defines_8h_source.html b/docs/build/html/defines_8h_source.html deleted file mode 100644 index a7c2b358e..000000000 --- a/docs/build/html/defines_8h_source.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/defines.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    defines.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#ifdef __METAL__
    -
    6#define MTL_CONST constant
    -
    7#else
    -
    8#define MTL_CONST
    -
    9#endif
    -
    10
    -
    11static MTL_CONST constexpr int MAX_BINARY_SPECIALIZED_DIMS = 5;
    -
    12static MTL_CONST constexpr int MAX_COPY_SPECIALIZED_DIMS = 5;
    -
    13static MTL_CONST constexpr int MAX_REDUCE_SPECIALIZED_DIMS = 4;
    -
    14static MTL_CONST constexpr int REDUCE_N_READS = 16;
    -
    15static MTL_CONST constexpr int SOFTMAX_N_READS = 4;
    -
    16static MTL_CONST constexpr int SOFTMAX_LOOPED_LIMIT = 4096;
    -
    17static MTL_CONST constexpr int RMS_N_READS = 4;
    -
    18static MTL_CONST constexpr int RMS_LOOPED_LIMIT = 4096;
    -
    static constexpr int MAX_COPY_SPECIALIZED_DIMS
    Definition defines.h:12
    -
    static constexpr int MAX_REDUCE_SPECIALIZED_DIMS
    Definition defines.h:13
    -
    static constexpr int REDUCE_N_READS
    Definition defines.h:14
    -
    static constexpr int RMS_LOOPED_LIMIT
    Definition defines.h:18
    -
    static constexpr int SOFTMAX_N_READS
    Definition defines.h:15
    -
    #define MTL_CONST
    Definition defines.h:8
    -
    static constexpr int RMS_N_READS
    Definition defines.h:17
    -
    static constexpr int SOFTMAX_LOOPED_LIMIT
    Definition defines.h:16
    -
    static constexpr int MAX_BINARY_SPECIALIZED_DIMS
    Definition defines.h:11
    -
    - - - - diff --git a/docs/build/html/dev/extensions.html b/docs/build/html/dev/extensions.html index f801e7199..e97d6ac09 100644 --- a/docs/build/html/dev/extensions.html +++ b/docs/build/html/dev/extensions.html @@ -8,7 +8,7 @@ - Custom Extensions in MLX — MLX 0.13.1 documentation + Custom Extensions in MLX — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/dev/metal_debugger.html b/docs/build/html/dev/metal_debugger.html index a23b9d821..d20f75a1a 100644 --- a/docs/build/html/dev/metal_debugger.html +++ b/docs/build/html/dev/metal_debugger.html @@ -8,7 +8,7 @@ - Metal Debugger — MLX 0.13.1 documentation + Metal Debugger — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -130,8 +130,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -270,7 +270,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -304,6 +303,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -384,6 +385,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/device_8h.html b/docs/build/html/device_8h.html deleted file mode 100644 index 5d75480d3..000000000 --- a/docs/build/html/device_8h.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - -MLX: mlx/device.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    device.h File Reference
    -
    -
    - -

    Go to the source code of this file.

    - - - - -

    -Classes

    struct  mlx::core::Device
     
    - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    - - - - - - - - - -

    -Functions

    const Devicemlx::core::default_device ()
     
    void mlx::core::set_default_device (const Device &d)
     
    bool mlx::core::operator== (const Device &lhs, const Device &rhs)
     
    bool mlx::core::operator!= (const Device &lhs, const Device &rhs)
     
    -
    - - - - diff --git a/docs/build/html/device_8h_source.html b/docs/build/html/device_8h_source.html deleted file mode 100644 index fb18620b4..000000000 --- a/docs/build/html/device_8h_source.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - -MLX: mlx/device.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    device.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5namespace mlx::core {
    -
    6
    -
    -
    7struct Device {
    -
    -
    8 enum class DeviceType {
    -
    9 cpu,
    -
    10 gpu,
    -
    11 };
    -
    -
    12
    -
    13 static constexpr DeviceType cpu = DeviceType::cpu;
    -
    14 static constexpr DeviceType gpu = DeviceType::gpu;
    -
    15
    - -
    17
    - -
    19 int index;
    -
    20};
    -
    -
    21
    - -
    23
    - -
    25
    -
    26bool operator==(const Device& lhs, const Device& rhs);
    -
    27bool operator!=(const Device& lhs, const Device& rhs);
    -
    28
    -
    29} // namespace mlx::core
    -
    Definition allocator.h:7
    -
    const Device & default_device()
    -
    void set_default_device(const Device &d)
    -
    bool operator==(const Device &lhs, const Device &rhs)
    -
    bool operator!=(const Device &lhs, const Device &rhs)
    -
    Definition device.h:7
    -
    static constexpr DeviceType gpu
    Definition device.h:14
    -
    Device(DeviceType type, int index=0)
    Definition device.h:16
    -
    int index
    Definition device.h:19
    -
    static constexpr DeviceType cpu
    Definition device.h:13
    -
    DeviceType type
    Definition device.h:18
    -
    DeviceType
    Definition device.h:8
    - - -
    - - - - diff --git a/docs/build/html/dir_1683daa6c50d5a1449f58a10604f9f12.html b/docs/build/html/dir_1683daa6c50d5a1449f58a10604f9f12.html deleted file mode 100644 index 8ca45a8f9..000000000 --- a/docs/build/html/dir_1683daa6c50d5a1449f58a10604f9f12.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/mps Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    mps Directory Reference
    -
    -
    - - - - -

    -Files

     gemm.h
     
    -
    - - - - diff --git a/docs/build/html/dir_1d446c9bd3c99228254c9484e0bc5c06.html b/docs/build/html/dir_1d446c9bd3c99228254c9484e0bc5c06.html deleted file mode 100644 index d0cb9438c..000000000 --- a/docs/build/html/dir_1d446c9bd3c99228254c9484e0bc5c06.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -MLX: mlx/backend Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    backend Directory Reference
    -
    -
    - - - - - - - - -

    -Directories

     accelerate
     
     common
     
     metal
     
    -
    - - - - diff --git a/docs/build/html/dir_2193406f5b2eae6fc53753d8a9a80df3.html b/docs/build/html/dir_2193406f5b2eae6fc53753d8a9a80df3.html deleted file mode 100644 index 8ffdf18d2..000000000 --- a/docs/build/html/dir_2193406f5b2eae6fc53753d8a9a80df3.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - -MLX: mlx/io Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    io Directory Reference
    -
    -
    - - - - - - -

    -Files

     gguf.h
     
     load.h
     
    -
    - - - - diff --git a/docs/build/html/dir_47795aa8999234f6f402f7e89d34d08e.html b/docs/build/html/dir_47795aa8999234f6f402f7e89d34d08e.html deleted file mode 100644 index 4a8dfe119..000000000 --- a/docs/build/html/dir_47795aa8999234f6f402f7e89d34d08e.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -MLX: mlx/types Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    types Directory Reference
    -
    -
    - - - - - - - - - - -

    -Files

     bf16.h
     
     complex.h
     
     fp16.h
     
     half_types.h
     
    -
    - - - - diff --git a/docs/build/html/dir_6768c99e6145fb9510ccdb40db8ede25.html b/docs/build/html/dir_6768c99e6145fb9510ccdb40db8ede25.html deleted file mode 100644 index 86ee81ed3..000000000 --- a/docs/build/html/dir_6768c99e6145fb9510ccdb40db8ede25.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/gemm Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    gemm Directory Reference
    -
    -
    - - - - - - - - - - - - -

    -Files

     gemm.h
     
     loader.h
     
     mma.h
     
     params.h
     
     transforms.h
     
    -
    - - - - diff --git a/docs/build/html/dir_70a37effa88bcbd6b791977fa1e64356.html b/docs/build/html/dir_70a37effa88bcbd6b791977fa1e64356.html deleted file mode 100644 index 6e32836fa..000000000 --- a/docs/build/html/dir_70a37effa88bcbd6b791977fa1e64356.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    kernels Directory Reference
    -
    -
    - - - - - - -

    -Directories

     reduction
     
     steel
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Files

     atomic.h
     
     bf16.h
     
     bf16_math.h
     
     binary.h
     
     compiled_preamble.h
     
     complex.h
     
     defines.h
     
     erf.h
     
     expm1f.h
     
     indexing.h
     
     scaled_dot_product_attention_params.h
     
     ternary.h
     
     unary.h
     
     utils.h
     
    -
    - - - - diff --git a/docs/build/html/dir_76215a6c54e2b67053e723fc2395583c.html b/docs/build/html/dir_76215a6c54e2b67053e723fc2395583c.html deleted file mode 100644 index a25172527..000000000 --- a/docs/build/html/dir_76215a6c54e2b67053e723fc2395583c.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    steel Directory Reference
    -
    -
    - - - - - - -

    -Directories

     conv
     
     gemm
     
    - - - -

    -Files

     utils.h
     
    -
    - - - - diff --git a/docs/build/html/dir_86b95e7b1d0d6e25466bb9213752d32f.html b/docs/build/html/dir_86b95e7b1d0d6e25466bb9213752d32f.html deleted file mode 100644 index 257878673..000000000 --- a/docs/build/html/dir_86b95e7b1d0d6e25466bb9213752d32f.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: mlx/backend/accelerate Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    accelerate Directory Reference
    -
    -
    - - - - -

    -Files

     utils.h
     
    -
    - - - - diff --git a/docs/build/html/dir_938ab0ecf10b8b860ff766c820f665fd.html b/docs/build/html/dir_938ab0ecf10b8b860ff766c820f665fd.html deleted file mode 100644 index d1334a37f..000000000 --- a/docs/build/html/dir_938ab0ecf10b8b860ff766c820f665fd.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - -MLX: mlx Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    mlx Directory Reference
    -
    -
    - - - - - - - - - - -

    -Directories

     3rdparty
     
     backend
     
     io
     
     types
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Files

     allocator.h
     
     array.h
     
     compile.h
     
     compile_impl.h
     
     device.h
     
     dtype.h
     
     event.h
     
     fast.h
     
     fast_primitives.h
     
     fft.h
     
     graph_utils.h
     
     io.h
     
     linalg.h
     
     mlx.h
     
     ops.h
     
     primitives.h
     
     random.h
     
     scheduler.h
     
     stream.h
     
     transforms.h
     
     transforms_impl.h
     
     utils.h
     
    -
    - - - - diff --git a/docs/build/html/dir_ad00dcd1517bfdbe01f68ec9b4eff877.html b/docs/build/html/dir_ad00dcd1517bfdbe01f68ec9b4eff877.html deleted file mode 100644 index ddbfad246..000000000 --- a/docs/build/html/dir_ad00dcd1517bfdbe01f68ec9b4eff877.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: mlx/3rdparty Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    3rdparty Directory Reference
    -
    -
    - - - - -

    -Files

     pocketfft.h
     
    -
    - - - - diff --git a/docs/build/html/dir_ba4426224ef60f409462a2a12fa18f06.html b/docs/build/html/dir_ba4426224ef60f409462a2a12fa18f06.html deleted file mode 100644 index 686f32888..000000000 --- a/docs/build/html/dir_ba4426224ef60f409462a2a12fa18f06.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/loaders Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    loaders Directory Reference
    -
    -
    - - - - - - - - -

    -Files

     loader_channel_l.h
     
     loader_channel_n.h
     
     loader_general.h
     
    -
    - - - - diff --git a/docs/build/html/dir_d0c977ea65824390717cdb7efc36c157.html b/docs/build/html/dir_d0c977ea65824390717cdb7efc36c157.html deleted file mode 100644 index 997ca2649..000000000 --- a/docs/build/html/dir_d0c977ea65824390717cdb7efc36c157.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    metal Directory Reference
    -
    -
    - - - - - - -

    -Directories

     kernels
     
     mps
     
    - - - - - - - - - - - - - - - - - - - -

    -Files

     allocator.h
     
     compiled_preamble.h
     
     copy.h
     
     device.h
     
     matmul.h
     
     metal.h
     
     metal_impl.h
     
     reduce.h
     
     utils.h
     
    -
    - - - - diff --git a/docs/build/html/dir_df9494e83ef22ae6150a0e080d9709ed.html b/docs/build/html/dir_df9494e83ef22ae6150a0e080d9709ed.html deleted file mode 100644 index c9c63d07e..000000000 --- a/docs/build/html/dir_df9494e83ef22ae6150a0e080d9709ed.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    conv Directory Reference
    -
    -
    - - - - -

    -Directories

     loaders
     
    - - - - - - - -

    -Files

     conv.h
     
     loader.h
     
     params.h
     
    -
    - - - - diff --git a/docs/build/html/dir_f149b24a1b5be11cd70151abe517e3f8.html b/docs/build/html/dir_f149b24a1b5be11cd70151abe517e3f8.html deleted file mode 100644 index 361ed581b..000000000 --- a/docs/build/html/dir_f149b24a1b5be11cd70151abe517e3f8.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - -MLX: mlx/backend/common Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    common Directory Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Files

     arange.h
     
     binary.h
     
     binary_two.h
     
     compiled.h
     
     compiled_preamble.h
     
     copy.h
     
     lapack_helper.h
     
     ops.h
     
     reduce.h
     
     ternary.h
     
     threefry.h
     
     unary.h
     
     utils.h
     
    -
    - - - - diff --git a/docs/build/html/dir_f60cd69d27fd3faa641c79056fff0e2d.html b/docs/build/html/dir_f60cd69d27fd3faa641c79056fff0e2d.html deleted file mode 100644 index 4ef44d048..000000000 --- a/docs/build/html/dir_f60cd69d27fd3faa641c79056fff0e2d.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/reduction Directory Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    reduction Directory Reference
    -
    -
    - - - - - - - - -

    -Files

     ops.h
     
     reduce_inst.h
     
     utils.h
     
    -
    - - - - diff --git a/docs/build/html/doc.svg b/docs/build/html/doc.svg deleted file mode 100644 index 0b928a531..000000000 --- a/docs/build/html/doc.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/docs/build/html/docd.svg b/docs/build/html/docd.svg deleted file mode 100644 index ac18b2755..000000000 --- a/docs/build/html/docd.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/docs/build/html/doxygen.css b/docs/build/html/doxygen.css deleted file mode 100644 index 7b7d851b8..000000000 --- a/docs/build/html/doxygen.css +++ /dev/null @@ -1,2225 +0,0 @@ -/* The standard CSS for doxygen 1.10.0*/ - -html { -/* page base colors */ ---page-background-color: white; ---page-foreground-color: black; ---page-link-color: #3D578C; ---page-visited-link-color: #4665A2; - -/* index */ ---index-odd-item-bg-color: #F8F9FC; ---index-even-item-bg-color: white; ---index-header-color: black; ---index-separator-color: #A0A0A0; - -/* header */ ---header-background-color: #F9FAFC; ---header-separator-color: #C4CFE5; ---header-gradient-image: url('nav_h.png'); ---group-header-separator-color: #879ECB; ---group-header-color: #354C7B; ---inherit-header-color: gray; - ---footer-foreground-color: #2A3D61; ---footer-logo-width: 104px; ---citation-label-color: #334975; ---glow-color: cyan; - ---title-background-color: white; ---title-separator-color: #5373B4; ---directory-separator-color: #9CAFD4; ---separator-color: #4A6AAA; - ---blockquote-background-color: #F7F8FB; ---blockquote-border-color: #9CAFD4; - ---scrollbar-thumb-color: #9CAFD4; ---scrollbar-background-color: #F9FAFC; - ---icon-background-color: #728DC1; ---icon-foreground-color: white; ---icon-doc-image: url('doc.svg'); ---icon-folder-open-image: url('folderopen.svg'); ---icon-folder-closed-image: url('folderclosed.svg'); - -/* brief member declaration list */ ---memdecl-background-color: #F9FAFC; ---memdecl-separator-color: #DEE4F0; ---memdecl-foreground-color: #555; ---memdecl-template-color: #4665A2; - -/* detailed member list */ ---memdef-border-color: #A8B8D9; ---memdef-title-background-color: #E2E8F2; ---memdef-title-gradient-image: url('nav_f.png'); ---memdef-proto-background-color: #DFE5F1; ---memdef-proto-text-color: #253555; ---memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); ---memdef-doc-background-color: white; ---memdef-param-name-color: #602020; ---memdef-template-color: #4665A2; - -/* tables */ ---table-cell-border-color: #2D4068; ---table-header-background-color: #374F7F; ---table-header-foreground-color: #FFFFFF; - -/* labels */ ---label-background-color: #728DC1; ---label-left-top-border-color: #5373B4; ---label-right-bottom-border-color: #C4CFE5; ---label-foreground-color: white; - -/** navigation bar/tree/menu */ ---nav-background-color: #F9FAFC; ---nav-foreground-color: #364D7C; ---nav-gradient-image: url('tab_b.png'); ---nav-gradient-hover-image: url('tab_h.png'); ---nav-gradient-active-image: url('tab_a.png'); ---nav-gradient-active-image-parent: url("../tab_a.png"); ---nav-separator-image: url('tab_s.png'); ---nav-breadcrumb-image: url('bc_s.png'); ---nav-breadcrumb-border-color: #C2CDE4; ---nav-splitbar-image: url('splitbar.png'); ---nav-font-size-level1: 13px; ---nav-font-size-level2: 10px; ---nav-font-size-level3: 9px; ---nav-text-normal-color: #283A5D; ---nav-text-hover-color: white; ---nav-text-active-color: white; ---nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); ---nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-menu-button-color: #364D7C; ---nav-menu-background-color: white; ---nav-menu-foreground-color: #555555; ---nav-menu-toggle-color: rgba(255, 255, 255, 0.5); ---nav-arrow-color: #9CAFD4; ---nav-arrow-selected-color: #9CAFD4; - -/* table of contents */ ---toc-background-color: #F4F6FA; ---toc-border-color: #D8DFEE; ---toc-header-color: #4665A2; ---toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); - -/** search field */ ---search-background-color: white; ---search-foreground-color: #909090; ---search-magnification-image: url('mag.svg'); ---search-magnification-select-image: url('mag_sel.svg'); ---search-active-color: black; ---search-filter-background-color: #F9FAFC; ---search-filter-foreground-color: black; ---search-filter-border-color: #90A5CE; ---search-filter-highlight-text-color: white; ---search-filter-highlight-bg-color: #3D578C; ---search-results-foreground-color: #425E97; ---search-results-background-color: #EEF1F7; ---search-results-border-color: black; ---search-box-shadow: inset 0.5px 0.5px 3px 0px #555; - -/** code fragments */ ---code-keyword-color: #008000; ---code-type-keyword-color: #604020; ---code-flow-keyword-color: #E08000; ---code-comment-color: #800000; ---code-preprocessor-color: #806020; ---code-string-literal-color: #002080; ---code-char-literal-color: #008080; ---code-xml-cdata-color: black; ---code-vhdl-digit-color: #FF00FF; ---code-vhdl-char-color: #000000; ---code-vhdl-keyword-color: #700070; ---code-vhdl-logic-color: #FF0000; ---code-link-color: #4665A2; ---code-external-link-color: #4665A2; ---fragment-foreground-color: black; ---fragment-background-color: #FBFCFD; ---fragment-border-color: #C4CFE5; ---fragment-lineno-border-color: #00FF00; ---fragment-lineno-background-color: #E8E8E8; ---fragment-lineno-foreground-color: black; ---fragment-lineno-link-fg-color: #4665A2; ---fragment-lineno-link-bg-color: #D8D8D8; ---fragment-lineno-link-hover-fg-color: #4665A2; ---fragment-lineno-link-hover-bg-color: #C8C8C8; ---fragment-copy-ok-color: #2EC82E; ---tooltip-foreground-color: black; ---tooltip-background-color: white; ---tooltip-border-color: gray; ---tooltip-doc-color: grey; ---tooltip-declaration-color: #006318; ---tooltip-link-color: #4665A2; ---tooltip-shadow: 1px 1px 7px gray; ---fold-line-color: #808080; ---fold-minus-image: url('minus.svg'); ---fold-plus-image: url('plus.svg'); ---fold-minus-image-relpath: url('../../minus.svg'); ---fold-plus-image-relpath: url('../../plus.svg'); - -/** font-family */ ---font-family-normal: Roboto,sans-serif; ---font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; ---font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; ---font-family-title: Tahoma,Arial,sans-serif; ---font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; ---font-family-search: Arial,Verdana,sans-serif; ---font-family-icon: Arial,Helvetica; ---font-family-tooltip: Roboto,sans-serif; - -/** special sections */ ---warning-color-bg: #f8d1cc; ---warning-color-hl: #b61825; ---warning-color-text: #75070f; ---note-color-bg: #faf3d8; ---note-color-hl: #f3a600; ---note-color-text: #5f4204; ---todo-color-bg: #e4f3ff; ---todo-color-hl: #1879C4; ---todo-color-text: #274a5c; ---test-color-bg: #e8e8ff; ---test-color-hl: #3939C4; ---test-color-text: #1a1a5c; ---deprecated-color-bg: #ecf0f3; ---deprecated-color-hl: #5b6269; ---deprecated-color-text: #43454a; ---bug-color-bg: #e4dafd; ---bug-color-hl: #5b2bdd; ---bug-color-text: #2a0d72; ---invariant-color-bg: #d8f1e3; ---invariant-color-hl: #44b86f; ---invariant-color-text: #265532; -} - -@media (prefers-color-scheme: dark) { - html:not(.dark-mode) { - color-scheme: dark; - -/* page base colors */ ---page-background-color: black; ---page-foreground-color: #C9D1D9; ---page-link-color: #90A5CE; ---page-visited-link-color: #A3B4D7; - -/* index */ ---index-odd-item-bg-color: #0B101A; ---index-even-item-bg-color: black; ---index-header-color: #C4CFE5; ---index-separator-color: #334975; - -/* header */ ---header-background-color: #070B11; ---header-separator-color: #141C2E; ---header-gradient-image: url('nav_hd.png'); ---group-header-separator-color: #283A5D; ---group-header-color: #90A5CE; ---inherit-header-color: #A0A0A0; - ---footer-foreground-color: #5B7AB7; ---footer-logo-width: 60px; ---citation-label-color: #90A5CE; ---glow-color: cyan; - ---title-background-color: #090D16; ---title-separator-color: #354C79; ---directory-separator-color: #283A5D; ---separator-color: #283A5D; - ---blockquote-background-color: #101826; ---blockquote-border-color: #283A5D; - ---scrollbar-thumb-color: #283A5D; ---scrollbar-background-color: #070B11; - ---icon-background-color: #334975; ---icon-foreground-color: #C4CFE5; ---icon-doc-image: url('docd.svg'); ---icon-folder-open-image: url('folderopend.svg'); ---icon-folder-closed-image: url('folderclosedd.svg'); - -/* brief member declaration list */ ---memdecl-background-color: #0B101A; ---memdecl-separator-color: #2C3F65; ---memdecl-foreground-color: #BBB; ---memdecl-template-color: #7C95C6; - -/* detailed member list */ ---memdef-border-color: #233250; ---memdef-title-background-color: #1B2840; ---memdef-title-gradient-image: url('nav_fd.png'); ---memdef-proto-background-color: #19243A; ---memdef-proto-text-color: #9DB0D4; ---memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); ---memdef-doc-background-color: black; ---memdef-param-name-color: #D28757; ---memdef-template-color: #7C95C6; - -/* tables */ ---table-cell-border-color: #283A5D; ---table-header-background-color: #283A5D; ---table-header-foreground-color: #C4CFE5; - -/* labels */ ---label-background-color: #354C7B; ---label-left-top-border-color: #4665A2; ---label-right-bottom-border-color: #283A5D; ---label-foreground-color: #CCCCCC; - -/** navigation bar/tree/menu */ ---nav-background-color: #101826; ---nav-foreground-color: #364D7C; ---nav-gradient-image: url('tab_bd.png'); ---nav-gradient-hover-image: url('tab_hd.png'); ---nav-gradient-active-image: url('tab_ad.png'); ---nav-gradient-active-image-parent: url("../tab_ad.png"); ---nav-separator-image: url('tab_sd.png'); ---nav-breadcrumb-image: url('bc_sd.png'); ---nav-breadcrumb-border-color: #2A3D61; ---nav-splitbar-image: url('splitbard.png'); ---nav-font-size-level1: 13px; ---nav-font-size-level2: 10px; ---nav-font-size-level3: 9px; ---nav-text-normal-color: #B6C4DF; ---nav-text-hover-color: #DCE2EF; ---nav-text-active-color: #DCE2EF; ---nav-text-normal-shadow: 0px 1px 1px black; ---nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-menu-button-color: #B6C4DF; ---nav-menu-background-color: #05070C; ---nav-menu-foreground-color: #BBBBBB; ---nav-menu-toggle-color: rgba(255, 255, 255, 0.2); ---nav-arrow-color: #334975; ---nav-arrow-selected-color: #90A5CE; - -/* table of contents */ ---toc-background-color: #151E30; ---toc-border-color: #202E4A; ---toc-header-color: #A3B4D7; ---toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); - -/** search field */ ---search-background-color: black; ---search-foreground-color: #C5C5C5; ---search-magnification-image: url('mag_d.svg'); ---search-magnification-select-image: url('mag_seld.svg'); ---search-active-color: #C5C5C5; ---search-filter-background-color: #101826; ---search-filter-foreground-color: #90A5CE; ---search-filter-border-color: #7C95C6; ---search-filter-highlight-text-color: #BCC9E2; ---search-filter-highlight-bg-color: #283A5D; ---search-results-background-color: #101826; ---search-results-foreground-color: #90A5CE; ---search-results-border-color: #7C95C6; ---search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C; - -/** code fragments */ ---code-keyword-color: #CC99CD; ---code-type-keyword-color: #AB99CD; ---code-flow-keyword-color: #E08000; ---code-comment-color: #717790; ---code-preprocessor-color: #65CABE; ---code-string-literal-color: #7EC699; ---code-char-literal-color: #00E0F0; ---code-xml-cdata-color: #C9D1D9; ---code-vhdl-digit-color: #FF00FF; ---code-vhdl-char-color: #C0C0C0; ---code-vhdl-keyword-color: #CF53C9; ---code-vhdl-logic-color: #FF0000; ---code-link-color: #79C0FF; ---code-external-link-color: #79C0FF; ---fragment-foreground-color: #C9D1D9; ---fragment-background-color: #090D16; ---fragment-border-color: #30363D; ---fragment-lineno-border-color: #30363D; ---fragment-lineno-background-color: black; ---fragment-lineno-foreground-color: #6E7681; ---fragment-lineno-link-fg-color: #6E7681; ---fragment-lineno-link-bg-color: #303030; ---fragment-lineno-link-hover-fg-color: #8E96A1; ---fragment-lineno-link-hover-bg-color: #505050; ---fragment-copy-ok-color: #0EA80E; ---tooltip-foreground-color: #C9D1D9; ---tooltip-background-color: #202020; ---tooltip-border-color: #C9D1D9; ---tooltip-doc-color: #D9E1E9; ---tooltip-declaration-color: #20C348; ---tooltip-link-color: #79C0FF; ---tooltip-shadow: none; ---fold-line-color: #808080; ---fold-minus-image: url('minusd.svg'); ---fold-plus-image: url('plusd.svg'); ---fold-minus-image-relpath: url('../../minusd.svg'); ---fold-plus-image-relpath: url('../../plusd.svg'); - -/** font-family */ ---font-family-normal: Roboto,sans-serif; ---font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; ---font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; ---font-family-title: Tahoma,Arial,sans-serif; ---font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; ---font-family-search: Arial,Verdana,sans-serif; ---font-family-icon: Arial,Helvetica; ---font-family-tooltip: Roboto,sans-serif; - -/** special sections */ ---warning-color-bg: #2e1917; ---warning-color-hl: #ad2617; ---warning-color-text: #f5b1aa; ---note-color-bg: #3b2e04; ---note-color-hl: #f1b602; ---note-color-text: #ceb670; ---todo-color-bg: #163750; ---todo-color-hl: #1982D2; ---todo-color-text: #dcf0fa; ---test-color-bg: #121258; ---test-color-hl: #4242cf; ---test-color-text: #c0c0da; ---deprecated-color-bg: #2e323b; ---deprecated-color-hl: #738396; ---deprecated-color-text: #abb0bd; ---bug-color-bg: #2a2536; ---bug-color-hl: #7661b3; ---bug-color-text: #ae9ed6; ---invariant-color-bg: #303a35; ---invariant-color-hl: #76ce96; ---invariant-color-text: #cceed5; -}} -body { - background-color: var(--page-background-color); - color: var(--page-foreground-color); -} - -body, table, div, p, dl { - font-weight: 400; - font-size: 14px; - font-family: var(--font-family-normal); - line-height: 22px; -} - -/* @group Heading Levels */ - -.title { - font-family: var(--font-family-normal); - line-height: 28px; - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h1.groupheader { - font-size: 150%; -} - -h2.groupheader { - border-bottom: 1px solid var(--group-header-separator-color); - color: var(--group-header-color); - font-size: 150%; - font-weight: normal; - margin-top: 1.75em; - padding-top: 8px; - padding-bottom: 4px; - width: 100%; -} - -h3.groupheader { - font-size: 100%; -} - -h1, h2, h3, h4, h5, h6 { - -webkit-transition: text-shadow 0.5s linear; - -moz-transition: text-shadow 0.5s linear; - -ms-transition: text-shadow 0.5s linear; - -o-transition: text-shadow 0.5s linear; - transition: text-shadow 0.5s linear; - margin-right: 15px; -} - -h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { - text-shadow: 0 0 15px var(--glow-color); -} - -dt { - font-weight: bold; -} - -p.startli, p.startdd { - margin-top: 2px; -} - -th p.starttd, th p.intertd, th p.endtd { - font-size: 100%; - font-weight: 700; -} - -p.starttd { - margin-top: 0px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -p.interli { -} - -p.interdd { -} - -p.intertd { -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.navtab { - padding-right: 15px; - text-align: right; - line-height: 110%; -} - -div.navtab table { - border-spacing: 0; -} - -td.navtab { - padding-right: 6px; - padding-left: 6px; -} - -td.navtabHL { - background-image: var(--nav-gradient-active-image); - background-repeat:repeat-x; - padding-right: 6px; - padding-left: 6px; -} - -td.navtabHL a, td.navtabHL a:visited { - color: var(--nav-text-hover-color); - text-shadow: var(--nav-text-hover-shadow); -} - -a.navtab { - font-weight: bold; -} - -div.qindex{ - text-align: center; - width: 100%; - line-height: 140%; - font-size: 130%; - color: var(--index-separator-color); -} - -#main-menu a:focus { - outline: auto; - z-index: 10; - position: relative; -} - -dt.alphachar{ - font-size: 180%; - font-weight: bold; -} - -.alphachar a{ - color: var(--index-header-color); -} - -.alphachar a:hover, .alphachar a:visited{ - text-decoration: none; -} - -.classindex dl { - padding: 25px; - column-count:1 -} - -.classindex dd { - display:inline-block; - margin-left: 50px; - width: 90%; - line-height: 1.15em; -} - -.classindex dl.even { - background-color: var(--index-even-item-bg-color); -} - -.classindex dl.odd { - background-color: var(--index-odd-item-bg-color); -} - -@media(min-width: 1120px) { - .classindex dl { - column-count:2 - } -} - -@media(min-width: 1320px) { - .classindex dl { - column-count:3 - } -} - - -/* @group Link Styling */ - -a { - color: var(--page-link-color); - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: var(--page-visited-link-color); -} - -a:hover { - text-decoration: none; - background: linear-gradient(to bottom, transparent 0,transparent calc(100% - 1px), currentColor 100%); -} - -a:hover > span.arrow { - text-decoration: none; - background : var(--nav-background-color); -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code, a.code:visited, a.line, a.line:visited { - color: var(--code-link-color); -} - -a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: var(--code-external-link-color); -} - -a.code.hl_class { /* style for links to class names in code snippets */ } -a.code.hl_struct { /* style for links to struct names in code snippets */ } -a.code.hl_union { /* style for links to union names in code snippets */ } -a.code.hl_interface { /* style for links to interface names in code snippets */ } -a.code.hl_protocol { /* style for links to protocol names in code snippets */ } -a.code.hl_category { /* style for links to category names in code snippets */ } -a.code.hl_exception { /* style for links to exception names in code snippets */ } -a.code.hl_service { /* style for links to service names in code snippets */ } -a.code.hl_singleton { /* style for links to singleton names in code snippets */ } -a.code.hl_concept { /* style for links to concept names in code snippets */ } -a.code.hl_namespace { /* style for links to namespace names in code snippets */ } -a.code.hl_package { /* style for links to package names in code snippets */ } -a.code.hl_define { /* style for links to macro names in code snippets */ } -a.code.hl_function { /* style for links to function names in code snippets */ } -a.code.hl_variable { /* style for links to variable names in code snippets */ } -a.code.hl_typedef { /* style for links to typedef names in code snippets */ } -a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } -a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } -a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } -a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } -a.code.hl_friend { /* style for links to friend names in code snippets */ } -a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } -a.code.hl_property { /* style for links to property names in code snippets */ } -a.code.hl_event { /* style for links to event names in code snippets */ } -a.code.hl_sequence { /* style for links to sequence names in code snippets */ } -a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -ul { - overflow: visible; -} - -ul.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; - column-count: 3; - list-style-type: none; -} - -#side-nav ul { - overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ -} - -#main-nav ul { - overflow: visible; /* reset ul rule for the navigation bar drop down lists */ -} - -.fragment { - text-align: left; - direction: ltr; - overflow-x: auto; - overflow-y: hidden; - position: relative; - min-height: 12px; - margin: 10px 0px; - padding: 10px 10px; - border: 1px solid var(--fragment-border-color); - border-radius: 4px; - background-color: var(--fragment-background-color); - color: var(--fragment-foreground-color); -} - -pre.fragment { - word-wrap: break-word; - font-size: 10pt; - line-height: 125%; - font-family: var(--font-family-monospace); -} - -.clipboard { - width: 24px; - height: 24px; - right: 5px; - top: 5px; - opacity: 0; - position: absolute; - display: inline; - overflow: auto; - fill: var(--fragment-foreground-color); - justify-content: center; - align-items: center; - cursor: pointer; -} - -.clipboard.success { - border: 1px solid var(--fragment-foreground-color); - border-radius: 4px; -} - -.fragment:hover .clipboard, .clipboard.success { - opacity: .28; -} - -.clipboard:hover, .clipboard.success { - opacity: 1 !important; -} - -.clipboard:active:not([class~=success]) svg { - transform: scale(.91); -} - -.clipboard.success svg { - fill: var(--fragment-copy-ok-color); -} - -.clipboard.success { - border-color: var(--fragment-copy-ok-color); -} - -div.line { - font-family: var(--font-family-monospace); - font-size: 13px; - min-height: 13px; - line-height: 1.2; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - text-indent: -53px; - padding-left: 53px; - padding-bottom: 0px; - margin: 0px; - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -div.line:after { - content:"\000A"; - white-space: pre; -} - -div.line.glow { - background-color: var(--glow-color); - box-shadow: 0 0 10px var(--glow-color); -} - -span.fold { - margin-left: 5px; - margin-right: 1px; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; - display: inline-block; - width: 12px; - height: 12px; - background-repeat:no-repeat; - background-position:center; -} - -span.lineno { - padding-right: 4px; - margin-right: 9px; - text-align: right; - border-right: 2px solid var(--fragment-lineno-border-color); - color: var(--fragment-lineno-foreground-color); - background-color: var(--fragment-lineno-background-color); - white-space: pre; -} -span.lineno a, span.lineno a:visited { - color: var(--fragment-lineno-link-fg-color); - background-color: var(--fragment-lineno-link-bg-color); -} - -span.lineno a:hover { - color: var(--fragment-lineno-link-hover-fg-color); - background-color: var(--fragment-lineno-link-hover-bg-color); -} - -.lineno { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -div.classindex ul { - list-style: none; - padding-left: 0; -} - -div.classindex span.ai { - display: inline-block; -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - color: var(--page-foreground-color); - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 12px; - margin-right: 8px; -} - -p.formulaDsp { - text-align: center; -} - -img.dark-mode-visible { - display: none; -} -img.light-mode-visible { - display: none; -} - -img.formulaInl, img.inline { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; - width: var(--footer-logo-width); -} - -.compoundTemplParams { - color: var(--memdecl-template-color); - font-size: 80%; - line-height: 120%; -} - -/* @group Code Colorization */ - -span.keyword { - color: var(--code-keyword-color); -} - -span.keywordtype { - color: var(--code-type-keyword-color); -} - -span.keywordflow { - color: var(--code-flow-keyword-color); -} - -span.comment { - color: var(--code-comment-color); -} - -span.preprocessor { - color: var(--code-preprocessor-color); -} - -span.stringliteral { - color: var(--code-string-literal-color); -} - -span.charliteral { - color: var(--code-char-literal-color); -} - -span.xmlcdata { - color: var(--code-xml-cdata-color); -} - -span.vhdldigit { - color: var(--code-vhdl-digit-color); -} - -span.vhdlchar { - color: var(--code-vhdl-char-color); -} - -span.vhdlkeyword { - color: var(--code-vhdl-keyword-color); -} - -span.vhdllogic { - color: var(--code-vhdl-logic-color); -} - -blockquote { - background-color: var(--blockquote-background-color); - border-left: 2px solid var(--blockquote-border-color); - margin: 0 24px 0 4px; - padding: 0 12px 0 16px; -} - -/* @end */ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid var(--table-cell-border-color); -} - -th.dirtab { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid var(--separator-color); -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.memberdecls td, .fieldtable tr { - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -.memberdecls td.glow, .fieldtable tr.glow { - background-color: var(--glow-color); - box-shadow: 0 0 15px var(--glow-color); -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: var(--memdecl-background-color); - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: var(--memdecl-foreground-color); -} - -.memSeparator { - border-bottom: 1px solid var(--memdecl-separator-color); - line-height: 1px; - margin: 0px; - padding: 0px; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight, .memTemplItemRight { - width: 100%; -} - -.memTemplParams { - color: var(--memdecl-template-color); - white-space: nowrap; - font-size: 80%; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtitle { - padding: 8px; - border-top: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); - border-top-right-radius: 4px; - border-top-left-radius: 4px; - margin-bottom: -1px; - background-image: var(--memdef-title-gradient-image); - background-repeat: repeat-x; - background-color: var(--memdef-title-background-color); - line-height: 1.25; - font-weight: 300; - float:left; -} - -.permalink -{ - font-size: 65%; - display: inline-block; - vertical-align: middle; -} - -.memtemplate { - font-size: 80%; - color: var(--memdef-template-color); - font-weight: normal; - margin-left: 9px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; - -webkit-transition: box-shadow 0.5s linear; - -moz-transition: box-shadow 0.5s linear; - -ms-transition: box-shadow 0.5s linear; - -o-transition: box-shadow 0.5s linear; - transition: box-shadow 0.5s linear; - display: table !important; - width: 100%; -} - -.memitem.glow { - box-shadow: 0 0 15px var(--glow-color); -} - -.memname { - font-weight: 400; - margin-left: 6px; -} - -.memname td { - vertical-align: bottom; -} - -.memproto, dl.reflist dt { - border-top: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); - padding: 6px 0px 6px 0px; - color: var(--memdef-proto-text-color); - font-weight: bold; - text-shadow: var(--memdef-proto-text-shadow); - background-color: var(--memdef-proto-background-color); - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 4px; -} - -.overload { - font-family: var(--font-family-monospace); - font-size: 65%; -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); - padding: 6px 10px 2px 10px; - border-top-width: 0; - background-image:url('nav_g.png'); - background-repeat:repeat-x; - background-color: var(--memdef-doc-background-color); - /* opera specific markup */ - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-bottomright: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; - padding: 0px; - padding-bottom: 1px; -} - -.paramname { - white-space: nowrap; - padding: 0px; - padding-bottom: 1px; - margin-left: 2px; -} - -.paramname em { - color: var(--memdef-param-name-color); - font-style: normal; - margin-right: 1px; -} - -.paramname .paramdefval { - font-family: var(--font-family-monospace); -} - -.params, .retval, .exception, .tparams { - margin-left: 0px; - padding-left: 0px; -} - -.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype, .tparams .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir, .tparams .paramdir { - font-family: var(--font-family-monospace); - vertical-align: top; -} - -table.mlabels { - border-spacing: 0px; -} - -td.mlabels-left { - width: 100%; - padding: 0px; -} - -td.mlabels-right { - vertical-align: bottom; - padding: 0px; - white-space: nowrap; -} - -span.mlabels { - margin-left: 8px; -} - -span.mlabel { - background-color: var(--label-background-color); - border-top:1px solid var(--label-left-top-border-color); - border-left:1px solid var(--label-left-top-border-color); - border-right:1px solid var(--label-right-bottom-border-color); - border-bottom:1px solid var(--label-right-bottom-border-color); - text-shadow: none; - color: var(--label-foreground-color); - margin-right: 4px; - padding: 2px 3px; - border-radius: 3px; - font-size: 7pt; - white-space: nowrap; - vertical-align: middle; -} - - - -/* @end */ - -/* these are for tree view inside a (index) page */ - -div.directory { - margin: 10px 0px; - border-top: 1px solid var(--directory-separator-color); - border-bottom: 1px solid var(--directory-separator-color); - width: 100%; -} - -.directory table { - border-collapse:collapse; -} - -.directory td { - margin: 0px; - padding: 0px; - vertical-align: top; -} - -.directory td.entry { - white-space: nowrap; - padding-right: 6px; - padding-top: 3px; -} - -.directory td.entry a { - outline:none; -} - -.directory td.entry a img { - border: none; -} - -.directory td.desc { - width: 100%; - padding-left: 6px; - padding-right: 6px; - padding-top: 3px; - border-left: 1px solid rgba(0,0,0,0.05); -} - -.directory tr.odd { - padding-left: 6px; - background-color: var(--index-odd-item-bg-color); -} - -.directory tr.even { - padding-left: 6px; - background-color: var(--index-even-item-bg-color); -} - -.directory img { - vertical-align: -30%; -} - -.directory .levels { - white-space: nowrap; - width: 100%; - text-align: right; - font-size: 9pt; -} - -.directory .levels span { - cursor: pointer; - padding-left: 2px; - padding-right: 2px; - color: var(--page-link-color); -} - -.arrow { - color: var(--nav-arrow-color); - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: pointer; - font-size: 80%; - display: inline-block; - width: 16px; - height: 22px; -} - -.icon { - font-family: var(--font-family-icon); - line-height: normal; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: var(--icon-background-color); - color: var(--icon-foreground-color); - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; -} - -.icona { - width: 24px; - height: 22px; - display: inline-block; -} - -.iconfopen { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:var(--icon-folder-open-image); - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.iconfclosed { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:var(--icon-folder-closed-image); - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.icondoc { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:var(--icon-doc-image); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -address { - font-style: normal; - color: var(--footer-foreground-color); -} - -table.doxtable caption { - caption-side: top; -} - -table.doxtable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.doxtable td, table.doxtable th { - border: 1px solid var(--table-cell-border-color); - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -table.fieldtable { - margin-bottom: 10px; - border: 1px solid var(--memdef-border-color); - border-spacing: 0px; - border-radius: 4px; - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid var(--memdef-border-color); - border-bottom: 1px solid var(--memdef-border-color); - vertical-align: top; -} - -.fieldtable td.fieldname { - padding-top: 3px; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid var(--memdef-border-color); -} - -.fieldtable td.fielddoc p:first-child { - margin-top: 0px; -} - -.fieldtable td.fielddoc p:last-child { - margin-bottom: 2px; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image: var(--memdef-title-gradient-image); - background-repeat:repeat-x; - background-color: var(--memdef-title-background-color); - font-size: 90%; - color: var(--memdef-proto-text-color); - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - font-weight: 400; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid var(--memdef-border-color); -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: var(--nav-gradient-image); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image: var(--nav-gradient-image); - background-repeat:repeat-x; - background-position: 0 -5px; - height:30px; - line-height:30px; - color:var(--nav-text-normal-color); - border:solid 1px var(--nav-breadcrumb-border-color); - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:var(--nav-breadcrumb-image); - background-repeat:no-repeat; - background-position:right; - color: var(--nav-foreground-color); -} - -.navpath li.navelem a -{ - height:32px; - display:block; - outline: none; - color: var(--nav-text-normal-color); - font-family: var(--font-family-nav); - text-shadow: var(--nav-text-normal-shadow); - text-decoration: none; -} - -.navpath li.navelem a:hover -{ - color: var(--nav-text-hover-color); - text-shadow: var(--nav-text-hover-shadow); -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color: var(--footer-foreground-color); - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -table.classindex -{ - margin: 10px; - white-space: nowrap; - margin-left: 3%; - margin-right: 3%; - width: 94%; - border: 0; - border-spacing: 0; - padding: 0; -} - -div.ingroups -{ - font-size: 8pt; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image: var(--header-gradient-image); - background-repeat:repeat-x; - background-color: var(--header-background-color); - margin: 0px; - border-bottom: 1px solid var(--header-separator-color); -} - -div.headertitle -{ - padding: 5px 5px 5px 10px; -} - -.PageDocRTL-title div.headertitle { - text-align: right; - direction: rtl; -} - -dl { - padding: 0 0 0 0; -} - -/* - -dl.section { - margin-left: 0px; - padding-left: 0px; -} - -dl.note { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #D0C000; -} - -dl.warning, dl.attention { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00D000; -} - -dl.deprecated { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #505050; -} - -dl.todo { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00C0E0; -} - -dl.test { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #3030E0; -} - -dl.bug { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #C08050; -} - -*/ - -dl.bug dt a, dl.deprecated dt a, dl.todo dt a, dl.test a { - font-weight: bold !important; -} - -dl.warning, dl.attention, dl.note, dl.deprecated, dl.bug, -dl.invariant, dl.pre, dl.post, dl.todo, dl.test, dl.remark { - padding: 10px; - margin: 10px 0px; - overflow: hidden; - margin-left: 0; - border-radius: 4px; -} - -dl.section dd { - margin-bottom: 2px; -} - -dl.warning, dl.attention { - background: var(--warning-color-bg); - border-left: 8px solid var(--warning-color-hl); - color: var(--warning-color-text); -} - -dl.warning dt, dl.attention dt { - color: var(--warning-color-hl); -} - -dl.note, dl.remark { - background: var(--note-color-bg); - border-left: 8px solid var(--note-color-hl); - color: var(--note-color-text); -} - -dl.note dt, dl.remark dt { - color: var(--note-color-hl); -} - -dl.todo { - background: var(--todo-color-bg); - border-left: 8px solid var(--todo-color-hl); - color: var(--todo-color-text); -} - -dl.todo dt { - color: var(--todo-color-hl); -} - -dl.test { - background: var(--test-color-bg); - border-left: 8px solid var(--test-color-hl); - color: var(--test-color-text); -} - -dl.test dt { - color: var(--test-color-hl); -} - -dl.bug dt a { - color: var(--bug-color-hl) !important; -} - -dl.bug { - background: var(--bug-color-bg); - border-left: 8px solid var(--bug-color-hl); - color: var(--bug-color-text); -} - -dl.bug dt a { - color: var(--bug-color-hl) !important; -} - -dl.deprecated { - background: var(--deprecated-color-bg); - border-left: 8px solid var(--deprecated-color-hl); - color: var(--deprecated-color-text); -} - -dl.deprecated dt a { - color: var(--deprecated-color-hl) !important; -} - -dl.section dd, dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { - margin-inline-start: 0px; -} - -dl.invariant, dl.pre, dl.post { - background: var(--invariant-color-bg); - border-left: 8px solid var(--invariant-color-hl); - color: var(--invariant-color-text); -} - -dl.invariant dt, dl.pre dt, dl.post dt { - color: var(--invariant-color-hl); -} - - -#projectrow -{ - height: 56px; -} - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectalign -{ - vertical-align: middle; - padding-left: 0.5em; -} - -#projectname -{ - font-size: 200%; - font-family: var(--font-family-title); - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font-size: 90%; - font-family: var(--font-family-title); - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font-size: 50%; - font-family: 50% var(--font-family-title); - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid var(--title-separator-color); - background-color: var(--title-background-color); -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.plantumlgraph -{ - text-align: center; -} - -.diagraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:var(--citation-label-color); - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; - text-align:right; - width:52px; -} - -dl.citelist dd { - margin:2px 0 2px 72px; - padding:5px 0; -} - -div.toc { - padding: 14px 25px; - background-color: var(--toc-background-color); - border: 1px solid var(--toc-border-color); - border-radius: 7px 7px 7px 7px; - float: right; - height: auto; - margin: 0 8px 10px 10px; - width: 200px; -} - -div.toc li { - background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; - font: 10px/1.2 var(--font-family-toc); - margin-top: 5px; - padding-left: 10px; - padding-top: 2px; -} - -div.toc h3 { - font: bold 12px/1.2 var(--font-family-toc); - color: var(--toc-header-color); - border-bottom: 0 none; - margin: 0; -} - -div.toc ul { - list-style: none outside none; - border: medium none; - padding: 0px; -} - -div.toc li.level1 { - margin-left: 0px; -} - -div.toc li.level2 { - margin-left: 15px; -} - -div.toc li.level3 { - margin-left: 15px; -} - -div.toc li.level4 { - margin-left: 15px; -} - -span.emoji { - /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html - * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; - */ -} - -span.obfuscator { - display: none; -} - -.inherit_header { - font-weight: bold; - color: var(--inherit-header-color); - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.inherit_header td { - padding: 6px 0px 2px 5px; -} - -.inherit { - display: none; -} - -tr.heading h2 { - margin-top: 12px; - margin-bottom: 4px; -} - -/* tooltip related style info */ - -.ttc { - position: absolute; - display: none; -} - -#powerTip { - cursor: default; - /*white-space: nowrap;*/ - color: var(--tooltip-foreground-color); - background-color: var(--tooltip-background-color); - border: 1px solid var(--tooltip-border-color); - border-radius: 4px 4px 4px 4px; - box-shadow: var(--tooltip-shadow); - display: none; - font-size: smaller; - max-width: 80%; - opacity: 0.9; - padding: 1ex 1em 1em; - position: absolute; - z-index: 2147483647; -} - -#powerTip div.ttdoc { - color: var(--tooltip-doc-color); - font-style: italic; -} - -#powerTip div.ttname a { - font-weight: bold; -} - -#powerTip a { - color: var(--tooltip-link-color); -} - -#powerTip div.ttname { - font-weight: bold; -} - -#powerTip div.ttdeci { - color: var(--tooltip-declaration-color); -} - -#powerTip div { - margin: 0px; - padding: 0px; - font-size: 12px; - font-family: var(--font-family-tooltip); - line-height: 16px; -} - -#powerTip:before, #powerTip:after { - content: ""; - position: absolute; - margin: 0px; -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.s:after, #powerTip.s:before, -#powerTip.w:after, #powerTip.w:before, -#powerTip.e:after, #powerTip.e:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.nw:after, #powerTip.nw:before, -#powerTip.sw:after, #powerTip.sw:before { - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; -} - -#powerTip.n:after, #powerTip.s:after, -#powerTip.w:after, #powerTip.e:after, -#powerTip.nw:after, #powerTip.ne:after, -#powerTip.sw:after, #powerTip.se:after { - border-color: rgba(255, 255, 255, 0); -} - -#powerTip.n:before, #powerTip.s:before, -#powerTip.w:before, #powerTip.e:before, -#powerTip.nw:before, #powerTip.ne:before, -#powerTip.sw:before, #powerTip.se:before { - border-color: rgba(128, 128, 128, 0); -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.nw:after, #powerTip.nw:before { - top: 100%; -} - -#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: var(--tooltip-background-color); - border-width: 10px; - margin: 0px -10px; -} -#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { - border-top-color: var(--tooltip-border-color); - border-width: 11px; - margin: 0px -11px; -} -#powerTip.n:after, #powerTip.n:before { - left: 50%; -} - -#powerTip.nw:after, #powerTip.nw:before { - right: 14px; -} - -#powerTip.ne:after, #powerTip.ne:before { - left: 14px; -} - -#powerTip.s:after, #powerTip.s:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.sw:after, #powerTip.sw:before { - bottom: 100%; -} - -#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: var(--tooltip-background-color); - border-width: 10px; - margin: 0px -10px; -} - -#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { - border-bottom-color: var(--tooltip-border-color); - border-width: 11px; - margin: 0px -11px; -} - -#powerTip.s:after, #powerTip.s:before { - left: 50%; -} - -#powerTip.sw:after, #powerTip.sw:before { - right: 14px; -} - -#powerTip.se:after, #powerTip.se:before { - left: 14px; -} - -#powerTip.e:after, #powerTip.e:before { - left: 100%; -} -#powerTip.e:after { - border-left-color: var(--tooltip-border-color); - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.e:before { - border-left-color: var(--tooltip-border-color); - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -#powerTip.w:after, #powerTip.w:before { - right: 100%; -} -#powerTip.w:after { - border-right-color: var(--tooltip-border-color); - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.w:before { - border-right-color: var(--tooltip-border-color); - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } -} - -/* @group Markdown */ - -table.markdownTable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.markdownTable td, table.markdownTable th { - border: 1px solid var(--table-cell-border-color); - padding: 3px 7px 2px; -} - -table.markdownTable tr { -} - -th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -th.markdownTableHeadLeft, td.markdownTableBodyLeft { - text-align: left -} - -th.markdownTableHeadRight, td.markdownTableBodyRight { - text-align: right -} - -th.markdownTableHeadCenter, td.markdownTableBodyCenter { - text-align: center -} - -tt, code, kbd, samp -{ - display: inline-block; -} -/* @end */ - -u { - text-decoration: underline; -} - -details>summary { - list-style-type: none; -} - -details > summary::-webkit-details-marker { - display: none; -} - -details>summary::before { - content: "\25ba"; - padding-right:4px; - font-size: 80%; -} - -details[open]>summary::before { - content: "\25bc"; - padding-right:4px; - font-size: 80%; -} - -body { - scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); -} - -::-webkit-scrollbar { - background-color: var(--scrollbar-background-color); - height: 12px; - width: 12px; -} -::-webkit-scrollbar-thumb { - border-radius: 6px; - box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); - border: solid 2px transparent; -} -::-webkit-scrollbar-corner { - background-color: var(--scrollbar-background-color); -} - diff --git a/docs/build/html/doxygen.svg b/docs/build/html/doxygen.svg deleted file mode 100644 index 79a763540..000000000 --- a/docs/build/html/doxygen.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/build/html/doxygen_crawl.html b/docs/build/html/doxygen_crawl.html deleted file mode 100644 index 753520686..000000000 --- a/docs/build/html/doxygen_crawl.html +++ /dev/null @@ -1,1137 +0,0 @@ - - - -Validator / crawler helper - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/build/html/dtype_8h.html b/docs/build/html/dtype_8h.html deleted file mode 100644 index f16755c74..000000000 --- a/docs/build/html/dtype_8h.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - -MLX: mlx/dtype.h File Reference - - - - - - - - - - - - -
    - -
    dtype.h File Reference
    -
    -
    -
    #include <complex>
    -#include <cstdint>
    -#include <ostream>
    -#include <string>
    -#include "mlx/types/complex.h"
    -#include "mlx/types/half_types.h"
    -
    -

    Go to the source code of this file.

    - - - - - - -

    -Classes

    struct  mlx::core::Dtype
     
    struct  mlx::core::TypeToDtype< T >
     
    - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    - - - - - - - - - - - - - - - - - - - -

    -Functions

    bool mlx::core::issubdtype (const Dtype &a, const Dtype &b)
     
    bool mlx::core::issubdtype (const Dtype::Category &a, const Dtype &b)
     
    bool mlx::core::issubdtype (const Dtype &a, const Dtype::Category &b)
     
    bool mlx::core::issubdtype (const Dtype::Category &a, const Dtype::Category &b)
     
    Dtype mlx::core::promote_types (const Dtype &t1, const Dtype &t2)
     
    uint8_t mlx::core::size_of (const Dtype &t)
     
    Dtype::Kind mlx::core::kindof (const Dtype &t)
     
    std::string mlx::core::dtype_to_array_protocol (const Dtype &t)
     
    Dtype mlx::core::dtype_from_array_protocol (std::string_view t)
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Variables

    constexpr Dtype mlx::core::bool_ {Dtype::Val::bool_, sizeof(bool)}
     
    constexpr Dtype mlx::core::uint8 {Dtype::Val::uint8, sizeof(uint8_t)}
     
    constexpr Dtype mlx::core::uint16 {Dtype::Val::uint16, sizeof(uint16_t)}
     
    constexpr Dtype mlx::core::uint32 {Dtype::Val::uint32, sizeof(uint32_t)}
     
    constexpr Dtype mlx::core::uint64 {Dtype::Val::uint64, sizeof(uint64_t)}
     
    constexpr Dtype mlx::core::int8 {Dtype::Val::int8, sizeof(int8_t)}
     
    constexpr Dtype mlx::core::int16 {Dtype::Val::int16, sizeof(int16_t)}
     
    constexpr Dtype mlx::core::int32 {Dtype::Val::int32, sizeof(int32_t)}
     
    constexpr Dtype mlx::core::int64 {Dtype::Val::int64, sizeof(int64_t)}
     
    constexpr Dtype mlx::core::float16 {Dtype::Val::float16, sizeof(uint16_t)}
     
    constexpr Dtype mlx::core::float32 {Dtype::Val::float32, sizeof(float)}
     
    constexpr Dtype mlx::core::bfloat16 {Dtype::Val::bfloat16, sizeof(uint16_t)}
     
    constexpr Dtype mlx::core::complex64 {Dtype::Val::complex64, sizeof(complex64_t)}
     
    constexpr Dtype::Category mlx::core::complexfloating
     
    constexpr Dtype::Category mlx::core::floating = Dtype::Category::floating
     
    constexpr Dtype::Category mlx::core::inexact = Dtype::Category::inexact
     
    constexpr Dtype::Category mlx::core::signedinteger = Dtype::Category::signedinteger
     
    constexpr Dtype::Category mlx::core::unsignedinteger
     
    constexpr Dtype::Category mlx::core::integer = Dtype::Category::integer
     
    constexpr Dtype::Category mlx::core::number = Dtype::Category::number
     
    constexpr Dtype::Category mlx::core::generic = Dtype::Category::generic
     
    -
    - - - - diff --git a/docs/build/html/dtype_8h_source.html b/docs/build/html/dtype_8h_source.html deleted file mode 100644 index 7109bf00a..000000000 --- a/docs/build/html/dtype_8h_source.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - -MLX: mlx/dtype.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    dtype.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <complex>
    -
    6#include <cstdint>
    -
    7#include <ostream>
    -
    8#include <string>
    -
    9
    -
    10#include "mlx/types/complex.h"
    - -
    12
    -
    13namespace mlx::core {
    -
    14
    -
    -
    15struct Dtype {
    -
    -
    16 enum class Val {
    -
    17 bool_,
    -
    18 uint8,
    -
    19 uint16,
    -
    20 uint32,
    -
    21 uint64,
    -
    22 int8,
    -
    23 int16,
    -
    24 int32,
    -
    25 int64,
    -
    26 float16,
    -
    27 float32,
    - - -
    30 };
    -
    -
    31
    -
    -
    32 enum class Kind {
    -
    33 b, /* bool */
    -
    34 u, /* unsigned int */
    -
    35 i, /* signed int */
    -
    36 f, /* float */
    -
    37 c, /* complex */
    -
    38 V, /* void - used for brain float */
    -
    39 };
    -
    -
    40
    -
    -
    41 enum class Category {
    - - -
    44 inexact,
    - - -
    47 integer,
    -
    48 number,
    -
    49 generic
    -
    50 };
    -
    -
    51
    - -
    53 const uint8_t size;
    -
    54 constexpr explicit Dtype(Val val, uint8_t size) : val(val), size(size) {};
    -
    -
    55 constexpr operator Val() const {
    -
    56 return val;
    -
    57 };
    -
    -
    58};
    -
    -
    59
    -
    60inline constexpr Dtype bool_{Dtype::Val::bool_, sizeof(bool)};
    -
    61
    -
    62inline constexpr Dtype uint8{Dtype::Val::uint8, sizeof(uint8_t)};
    -
    63inline constexpr Dtype uint16{Dtype::Val::uint16, sizeof(uint16_t)};
    -
    64inline constexpr Dtype uint32{Dtype::Val::uint32, sizeof(uint32_t)};
    -
    65inline constexpr Dtype uint64{Dtype::Val::uint64, sizeof(uint64_t)};
    -
    66
    -
    67inline constexpr Dtype int8{Dtype::Val::int8, sizeof(int8_t)};
    -
    68inline constexpr Dtype int16{Dtype::Val::int16, sizeof(int16_t)};
    -
    69inline constexpr Dtype int32{Dtype::Val::int32, sizeof(int32_t)};
    -
    70inline constexpr Dtype int64{Dtype::Val::int64, sizeof(int64_t)};
    -
    71
    -
    72inline constexpr Dtype float16{Dtype::Val::float16, sizeof(uint16_t)};
    -
    73inline constexpr Dtype float32{Dtype::Val::float32, sizeof(float)};
    -
    74inline constexpr Dtype bfloat16{Dtype::Val::bfloat16, sizeof(uint16_t)};
    - -
    76
    - - - - - - - - - -
    86inline constexpr Dtype::Category generic = Dtype::Category::generic;
    -
    87
    -
    88bool issubdtype(const Dtype& a, const Dtype& b);
    -
    89bool issubdtype(const Dtype::Category& a, const Dtype& b);
    -
    90bool issubdtype(const Dtype& a, const Dtype::Category& b);
    - -
    92
    -
    93Dtype promote_types(const Dtype& t1, const Dtype& t2);
    -
    94
    -
    -
    95inline uint8_t size_of(const Dtype& t) {
    -
    96 return t.size;
    -
    97}
    -
    -
    98
    - -
    100
    -
    101template <typename T>
    -
    - -
    103 operator Dtype();
    -
    104};
    -
    -
    105
    -
    106// Array protocol typestring for Dtype
    -
    107std::string dtype_to_array_protocol(const Dtype& t);
    -
    108// Dtype from array protocol type string
    - -
    110
    -
    111} // namespace mlx::core
    - -
    Definition allocator.h:7
    -
    constexpr Dtype::Category number
    Definition dtype.h:85
    -
    constexpr Dtype::Category integer
    Definition dtype.h:84
    -
    constexpr Dtype bool_
    Definition dtype.h:60
    -
    Dtype dtype_from_array_protocol(std::string_view t)
    -
    constexpr Dtype uint64
    Definition dtype.h:65
    -
    constexpr Dtype::Category signedinteger
    Definition dtype.h:81
    -
    constexpr Dtype uint16
    Definition dtype.h:63
    -
    constexpr Dtype::Category unsignedinteger
    Definition dtype.h:82
    -
    Dtype promote_types(const Dtype &t1, const Dtype &t2)
    -
    constexpr Dtype bfloat16
    Definition dtype.h:74
    -
    constexpr Dtype::Category inexact
    Definition dtype.h:80
    -
    constexpr Dtype int32
    Definition dtype.h:69
    -
    constexpr Dtype float32
    Definition dtype.h:73
    -
    constexpr Dtype::Category complexfloating
    Definition dtype.h:77
    -
    constexpr Dtype int16
    Definition dtype.h:68
    -
    std::string dtype_to_array_protocol(const Dtype &t)
    -
    constexpr Dtype int8
    Definition dtype.h:67
    -
    constexpr Dtype int64
    Definition dtype.h:70
    -
    constexpr Dtype uint8
    Definition dtype.h:62
    -
    constexpr Dtype float16
    Definition dtype.h:72
    -
    constexpr Dtype uint32
    Definition dtype.h:64
    -
    constexpr Dtype::Category floating
    Definition dtype.h:79
    -
    bool issubdtype(const Dtype &a, const Dtype &b)
    -
    Dtype::Kind kindof(const Dtype &t)
    -
    uint8_t size_of(const Dtype &t)
    Definition dtype.h:95
    -
    constexpr Dtype complex64
    Definition dtype.h:75
    -
    Definition dtype.h:15
    -
    Category
    Definition dtype.h:41
    - - - - - - - - -
    Val val
    Definition dtype.h:52
    -
    Kind
    Definition dtype.h:32
    - - - - - - -
    const uint8_t size
    Definition dtype.h:53
    -
    Val
    Definition dtype.h:16
    - - - - - - - - - - - - - -
    constexpr Dtype(Val val, uint8_t size)
    Definition dtype.h:54
    -
    Definition dtype.h:102
    -
    Definition complex.h:34
    - -
    - - - - diff --git a/docs/build/html/dynsections.js b/docs/build/html/dynsections.js deleted file mode 100644 index 8f493264f..000000000 --- a/docs/build/html/dynsections.js +++ /dev/null @@ -1,194 +0,0 @@ -/* - @licstart The following is the entire license notice for the JavaScript code in this file. - - The MIT License (MIT) - - Copyright (C) 1997-2020 by Dimitri van Heesch - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or - substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - @licend The above is the entire license notice for the JavaScript code in this file - */ - -let dynsection = { - - // helper function - updateStripes : function() { - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); - $('table.directory tr'). - removeClass('odd').filter(':visible:odd').addClass('odd'); - }, - - toggleVisibility : function(linkObj) { - const base = $(linkObj).attr('id'); - const summary = $('#'+base+'-summary'); - const content = $('#'+base+'-content'); - const trigger = $('#'+base+'-trigger'); - const src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; - }, - - toggleLevel : function(level) { - $('table.directory tr').each(function() { - const l = this.id.split('_').length-1; - const i = $('#img'+this.id.substring(3)); - const a = $('#arr'+this.id.substring(3)); - if (l'); - // add vertical lines to other rows - $('span[class=lineno]').not(':eq(0)').append(''); - // add toggle controls to lines with fold divs - $('div[class=foldopen]').each(function() { - // extract specific id to use - const id = $(this).attr('id').replace('foldopen',''); - // extract start and end foldable fragment attributes - const start = $(this).attr('data-start'); - const end = $(this).attr('data-end'); - // replace normal fold span with controls for the first line of a foldable fragment - $(this).find('span[class=fold]:first').replaceWith(''); - // append div for folded (closed) representation - $(this).after(''); - // extract the first line from the "open" section to represent closed content - const line = $(this).children().first().clone(); - // remove any glow that might still be active on the original line - $(line).removeClass('glow'); - if (start) { - // if line already ends with a start marker (e.g. trailing {), remove it - $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); - } - // replace minus with plus symbol - $(line).find('span[class=fold]').css('background-image',codefold.plusImg[relPath]); - // append ellipsis - $(line).append(' '+start+''+end); - // insert constructed line into closed div - $('#foldclosed'+id).html(line); - }); - }, -}; -/* @license-end */ diff --git a/docs/build/html/erf_8h.html b/docs/build/html/erf_8h.html deleted file mode 100644 index 67c255b66..000000000 --- a/docs/build/html/erf_8h.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/erf.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    erf.h File Reference
    -
    -
    -
    #include <metal_math>
    -
    -

    Go to the source code of this file.

    - - - - - - -

    -Functions

    float erf (float a)
     
    float erfinv (float a)
     
    -

    Function Documentation

    - -

    ◆ erf()

    - -
    -
    - - - - - - - -
    float erf (float a)
    -
    - -
    -
    - -

    ◆ erfinv()

    - -
    -
    - - - - - - - -
    float erfinv (float a)
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/erf_8h_source.html b/docs/build/html/erf_8h_source.html deleted file mode 100644 index f94121144..000000000 --- a/docs/build/html/erf_8h_source.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/erf.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    erf.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <metal_math>
    -
    6
    -
    7/*
    -
    8 * Approximation to the error function.
    -
    9 * Based on code from:
    -
    10 * https://stackoverflow.com/questions/35148198/efficient-faithfully-rounded-implementation-of-error-function-erff#answer-35148199
    -
    11 */
    -
    -
    12float erf(float a) {
    -
    13 float r, s, t, u;
    -
    14 t = metal::abs(a);
    -
    15 s = a * a;
    -
    16 if (t > 0.927734375f) {
    -
    17 // maximum error 0.99527 ulp
    -
    18 r = metal::fma(
    -
    19 -1.72853470e-5f, t, 3.83197126e-4f); // -0x1.220000p-16,0x1.91cfb2p-12
    -
    20 u = metal::fma(
    -
    21 -3.88396438e-3f, t, 2.42546219e-2f); // -0x1.fd1438p-9, 0x1.8d6342p-6
    -
    22 r = metal::fma(r, s, u);
    -
    23 r = metal::fma(r, t, -1.06777877e-1f); // -0x1.b55cb8p-4
    -
    24 r = metal::fma(r, t, -6.34846687e-1f); // -0x1.450aa0p-1
    -
    25 r = metal::fma(r, t, -1.28717512e-1f); // -0x1.079d0cp-3
    -
    26 r = metal::fma(r, t, -t);
    -
    27 // TODO, replace with expm1 when implemented
    -
    28 r = 1.0f - metal::exp(r);
    -
    29 r = metal::copysign(r, a);
    -
    30 } else {
    -
    31 // maximum error 0.98929 ulp
    -
    32 r = -5.96761703e-4f; // -0x1.38e000p-11
    -
    33 r = metal::fma(r, s, 4.99119423e-3f); // 0x1.471a58p-8
    -
    34 r = metal::fma(r, s, -2.67681349e-2f); // -0x1.b691b2p-6
    -
    35 r = metal::fma(r, s, 1.12819925e-1f); // 0x1.ce1c44p-4
    -
    36 r = metal::fma(r, s, -3.76125336e-1f); // -0x1.812700p-2
    -
    37 r = metal::fma(r, s, 1.28379166e-1f); // 0x1.06eba8p-3
    -
    38 r = metal::fma(r, a, a);
    -
    39 }
    -
    40 return r;
    -
    41}
    -
    -
    42
    -
    -
    43float erfinv(float a) {
    -
    44 auto t = metal::fma(a, 0.0f - a, 1.0f);
    -
    45 t = metal::log(t);
    -
    46 float p;
    -
    47 if (metal::abs(t) > 6.125f) { // maximum ulp error = 2.35793
    -
    48 p = 3.03697567e-10f; // 0x1.4deb44p-32
    -
    49 p = metal::fma(p, t, 2.93243101e-8f); // 0x1.f7c9aep-26
    -
    50 p = metal::fma(p, t, 1.22150334e-6f); // 0x1.47e512p-20
    -
    51 p = metal::fma(p, t, 2.84108955e-5f); // 0x1.dca7dep-16
    -
    52 p = metal::fma(p, t, 3.93552968e-4f); // 0x1.9cab92p-12
    -
    53 p = metal::fma(p, t, 3.02698812e-3f); // 0x1.8cc0dep-9
    -
    54 p = metal::fma(p, t, 4.83185798e-3f); // 0x1.3ca920p-8
    -
    55 p = metal::fma(p, t, -2.64646143e-1f); // -0x1.0eff66p-2
    -
    56 p = metal::fma(p, t, 8.40016484e-1f); // 0x1.ae16a4p-1
    -
    57 } else { // maximum ulp error = 2.35002
    -
    58 p = 5.43877832e-9f; // 0x1.75c000p-28
    -
    59 p = metal::fma(p, t, 1.43285448e-7f); // 0x1.33b402p-23
    -
    60 p = metal::fma(p, t, 1.22774793e-6f); // 0x1.499232p-20
    -
    61 p = metal::fma(p, t, 1.12963626e-7f); // 0x1.e52cd2p-24
    -
    62 p = metal::fma(p, t, -5.61530760e-5f); // -0x1.d70bd0p-15
    -
    63 p = metal::fma(p, t, -1.47697632e-4f); // -0x1.35be90p-13
    -
    64 p = metal::fma(p, t, 2.31468678e-3f); // 0x1.2f6400p-9
    -
    65 p = metal::fma(p, t, 1.15392581e-2f); // 0x1.7a1e50p-7
    -
    66 p = metal::fma(p, t, -2.32015476e-1f); // -0x1.db2aeep-3
    -
    67 p = metal::fma(p, t, 8.86226892e-1f); // 0x1.c5bf88p-1
    -
    68 }
    -
    69 return a * p;
    -
    70}
    -
    -
    float erfinv(float a)
    Definition erf.h:43
    -
    float erf(float a)
    Definition erf.h:12
    -
    METAL_FUNC bfloat16_t log(bfloat16_t x)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t fma(bfloat16_t x, bfloat16_t y, bfloat16_t z)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t abs(bfloat16_t x)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t exp(bfloat16_t x)
    Definition bf16_math.h:234
    -
    uint32_t u
    Definition bf16.h:17
    -
    - - - - diff --git a/docs/build/html/event_8h.html b/docs/build/html/event_8h.html deleted file mode 100644 index 4ab485283..000000000 --- a/docs/build/html/event_8h.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -MLX: mlx/event.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    event.h File Reference
    -
    -
    -
    #include <memory>
    -#include <stdexcept>
    -#include "mlx/stream.h"
    -
    -

    Go to the source code of this file.

    - - - - -

    -Classes

    class  mlx::core::Event
     
    - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    -
    - - - - diff --git a/docs/build/html/event_8h_source.html b/docs/build/html/event_8h_source.html deleted file mode 100644 index 62f8131b5..000000000 --- a/docs/build/html/event_8h_source.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - -MLX: mlx/event.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    event.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2024 Apple Inc.
    -
    2#pragma once
    -
    3
    -
    4#include <memory>
    -
    5#include <stdexcept>
    -
    6
    -
    7#include "mlx/stream.h"
    -
    8
    -
    9namespace mlx::core {
    -
    10
    -
    -
    11class Event {
    -
    12 public:
    -
    13 Event() {};
    -
    14
    -
    15 Event(const Stream& steam);
    -
    16
    -
    17 // Wait for the event to be signaled at its curent value
    -
    18 void wait();
    -
    19
    -
    20 // Signal the event at its current value
    -
    21 void signal();
    -
    22
    -
    23 // Check if the event is valid
    -
    -
    24 bool valid() {
    -
    25 return event_ != nullptr;
    -
    26 };
    -
    -
    27
    -
    -
    28 uint64_t value() {
    -
    29 return value_;
    -
    30 };
    -
    -
    31
    -
    -
    32 void set_value(uint64_t v) {
    -
    33 value_ = v;
    -
    34 };
    -
    -
    35
    -
    -
    36 const Stream& stream() {
    -
    37 if (!valid()) {
    -
    38 throw std::runtime_error(
    -
    39 "[Event::stream] Cannot access stream on invalid event.");
    -
    40 }
    -
    41 return stream_;
    -
    42 };
    -
    -
    43
    -
    -
    44 const std::shared_ptr<void>& raw_event() {
    -
    45 return event_;
    -
    46 };
    -
    -
    47
    -
    48 private:
    -
    49 // Default constructed stream should never be used
    -
    50 // since the event is not yet valid
    -
    51 Stream stream_{0, Device::cpu};
    -
    52 std::shared_ptr<void> event_{nullptr};
    -
    53 uint64_t value_{0};
    -
    54};
    -
    -
    55
    -
    56} // namespace mlx::core
    -
    Definition event.h:11
    -
    void set_value(uint64_t v)
    Definition event.h:32
    -
    Event(const Stream &steam)
    -
    const Stream & stream()
    Definition event.h:36
    -
    bool valid()
    Definition event.h:24
    - - -
    const std::shared_ptr< void > & raw_event()
    Definition event.h:44
    -
    Event()
    Definition event.h:13
    -
    uint64_t value()
    Definition event.h:28
    -
    Definition allocator.h:7
    - -
    static constexpr DeviceType cpu
    Definition device.h:13
    -
    Definition stream.h:9
    -
    - - - - diff --git a/docs/build/html/examples/linear_regression.html b/docs/build/html/examples/linear_regression.html index 7ce87a327..a0302285c 100644 --- a/docs/build/html/examples/linear_regression.html +++ b/docs/build/html/examples/linear_regression.html @@ -8,7 +8,7 @@ - Linear Regression — MLX 0.13.1 documentation + Linear Regression — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/examples/llama-inference.html b/docs/build/html/examples/llama-inference.html index ea01e1615..79e50bccb 100644 --- a/docs/build/html/examples/llama-inference.html +++ b/docs/build/html/examples/llama-inference.html @@ -8,7 +8,7 @@ - LLM inference — MLX 0.13.1 documentation + LLM inference — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/examples/mlp.html b/docs/build/html/examples/mlp.html index 43d2faf59..0400c69c1 100644 --- a/docs/build/html/examples/mlp.html +++ b/docs/build/html/examples/mlp.html @@ -8,7 +8,7 @@ - Multi-Layer Perceptron — MLX 0.13.1 documentation + Multi-Layer Perceptron — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/expm1f_8h.html b/docs/build/html/expm1f_8h.html deleted file mode 100644 index 110b82d46..000000000 --- a/docs/build/html/expm1f_8h.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/expm1f.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    expm1f.h File Reference
    -
    -
    -
    #include <metal_math>
    -
    -

    Go to the source code of this file.

    - - - - - - -

    -Functions

    float expm1f_scaled_unchecked (float a, float b)
     
    float expm1f (float a)
     
    -

    Function Documentation

    - -

    ◆ expm1f()

    - -
    -
    - - - - - - - -
    float expm1f (float a)
    -
    - -
    -
    - -

    ◆ expm1f_scaled_unchecked()

    - -
    -
    - - - - - - - - - - - -
    float expm1f_scaled_unchecked (float a,
    float b )
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/expm1f_8h_source.html b/docs/build/html/expm1f_8h_source.html deleted file mode 100644 index 0bb5ea528..000000000 --- a/docs/build/html/expm1f_8h_source.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/expm1f.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    expm1f.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <metal_math>
    -
    6
    -
    7// Original license copied below:
    -
    8// Copyright (c) 2015-2023 Norbert Juffa
    -
    9// All rights reserved.
    -
    10//
    -
    11// Redistribution and use in source and binary forms, with or without
    -
    12// modification, are permitted provided that the following conditions
    -
    13// are met:
    -
    14//
    -
    15// 1. Redistributions of source code must retain the above copyright
    -
    16// notice, this list of conditions and the following disclaimer.
    -
    17//
    -
    18// 2. Redistributions in binary form must reproduce the above copyright
    -
    19// notice, this list of conditions and the following disclaimer in the
    -
    20// documentation and/or other materials provided with the distribution.
    -
    21//
    -
    22// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    -
    23// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    -
    24// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    -
    25// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    -
    26// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    -
    27// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    -
    28// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    -
    29// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    -
    30// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    -
    31// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    -
    32// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    -
    33
    -
    34/* Compute exponential base e minus 1. Maximum ulp error = 0.997458
    -
    35
    -
    36 i = rint(a/log(2)), f = a-i*log(2). Then expm1(a) = 2**i * (expm1(f)+1) - 1.
    -
    37 Compute r = expm1(f). Then expm1(a)= 2 * (0.5 * 2**i * r + 0.5 * 2**i - 0.5).
    -
    38 With t = 0.5*2**i, expm1(a) = 2*(r * t + t-0.5). However, for best accuracy,
    -
    39 when i == 1, expm1(a)= 2*(r + 0.5), and when i == 0, expm1(a) = r.
    -
    40
    -
    41 NOTE: Scale factor b is only applied if i < 0 or i > 1 (should be power of 2)
    -
    42*/
    -
    -
    43float expm1f_scaled_unchecked(float a, float b) {
    -
    44 float f, j, r, s, t, u, v, x, y;
    -
    45 int i;
    -
    46
    -
    47 // exp(a) = 2**i * exp(f); i = rintf (a / log(2))
    -
    48 j = fma(1.442695f, a, 12582912.f); // 0x1.715476p0, 0x1.8p23
    -
    49 j = j - 12582912.0f; // 0x1.8p23
    -
    50 i = (int)j;
    -
    51 f = fma(j, -6.93145752e-1f, a);
    -
    52
    -
    53 // approximate r = exp(f)-1 on interval [-log(2)/2, +log(2)/2]
    -
    54 s = f * f;
    -
    55 if (a == 0.0f)
    -
    56 s = a; // ensure -0 is passed through
    -
    57 // err = 0.997458 ulp1 = 11081805
    -
    58 r = 1.97350979e-4f; // 0x1.9de000p-13
    -
    59 r = fma(r, f, 1.39309070e-3f); // 0x1.6d30bcp-10
    -
    60 r = fma(r, f, 8.33343994e-3f); // 0x1.1111f6p-7
    -
    61 r = fma(r, f, 4.16668020e-2f); // 0x1.55559ep-5
    -
    62 r = fma(r, f, 1.66666716e-1f); // 0x1.55555cp-3
    -
    63 r = fma(r, f, 4.99999970e-1f); // 0x1.fffffep-2
    -
    64 u = (j == 1) ? (f + 0.5f) : f;
    -
    65 v = fma(r, s, u);
    -
    66 s = 0.5f * b;
    -
    67 t = ldexp(s, i);
    -
    68 y = t - s;
    -
    69 x = (t - y) - s; // double-float canonicalization of difference
    -
    70 r = fma(v, t, x) + y;
    -
    71 r = r + r;
    -
    72 if (j == 0)
    -
    73 r = v;
    -
    74 if (j == 1)
    -
    75 r = v + v;
    -
    76 return r;
    -
    77}
    -
    -
    78
    -
    79/* Compute exponential base e minus 1. max ulp err = 0.99746 */
    -
    -
    80float expm1f(float a) {
    -
    81 float r;
    -
    82
    -
    83 r = expm1f_scaled_unchecked(a, 1.0f);
    -
    84 /* handle severe overflow and underflow */
    -
    85 if (abs(a - 1.0f) > 88.0f) {
    -
    86 r = fma(r, r, -1.0f);
    -
    87 }
    -
    88 return r;
    -
    89}
    -
    -
    float expm1f(float a)
    Definition expm1f.h:80
    -
    float expm1f_scaled_unchecked(float a, float b)
    Definition expm1f.h:43
    -
    uint32_t u
    Definition bf16.h:17
    -
    float f
    Definition bf16.h:16
    -
    - - - - diff --git a/docs/build/html/fast_8h.html b/docs/build/html/fast_8h.html deleted file mode 100644 index be609565e..000000000 --- a/docs/build/html/fast_8h.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -MLX: mlx/fast.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    fast.h File Reference
    -
    -
    -
    #include <optional>
    -#include "mlx/utils.h"
    -
    -

    Go to the source code of this file.

    - - - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    namespace  mlx::core::fast
     
    - - - - - - - - - - -

    -Functions

    array mlx::core::fast::rms_norm (const array &x, const array &weight, float eps, StreamOrDevice s={})
     
    array mlx::core::fast::layer_norm (const array &x, const std::optional< array > &weight, const std::optional< array > &bias, float eps, StreamOrDevice s={})
     
    array mlx::core::fast::rope (const array &x, int dims, bool traditional, float base, float scale, int offset, StreamOrDevice s={})
     
    array mlx::core::fast::scaled_dot_product_attention (const array &queries, const array &keys, const array &values, const float scale, const std::optional< array > &mask=std::nullopt, StreamOrDevice s={})
     Computes: O = softmax(Q @ K.T) @ V.
     
    -
    - - - - diff --git a/docs/build/html/fast_8h_source.html b/docs/build/html/fast_8h_source.html deleted file mode 100644 index 958aca426..000000000 --- a/docs/build/html/fast_8h_source.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - -MLX: mlx/fast.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    fast.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <optional>
    -
    6
    -
    7#include "mlx/utils.h"
    -
    8
    -
    -
    9namespace mlx::core::fast {
    -
    10
    - -
    12 const array& x,
    -
    13 const array& weight,
    -
    14 float eps,
    -
    15 StreamOrDevice s = {});
    -
    16
    - -
    18 const array& x,
    -
    19 const std::optional<array>& weight,
    -
    20 const std::optional<array>& bias,
    -
    21 float eps,
    -
    22 StreamOrDevice s = {});
    -
    23
    - -
    25 const array& x,
    -
    26 int dims,
    -
    27 bool traditional,
    -
    28 float base,
    -
    29 float scale,
    -
    30 int offset,
    -
    31 StreamOrDevice s = {});
    -
    32
    - -
    35 const array& queries,
    -
    36 const array& keys,
    -
    37 const array& values,
    -
    38 const float scale,
    -
    39 const std::optional<array>& mask = std::nullopt,
    -
    40 StreamOrDevice s = {});
    -
    41
    -
    42} // namespace mlx::core::fast
    -
    -
    Definition array.h:20
    -
    Definition fast.h:9
    -
    array layer_norm(const array &x, const std::optional< array > &weight, const std::optional< array > &bias, float eps, StreamOrDevice s={})
    -
    array rope(const array &x, int dims, bool traditional, float base, float scale, int offset, StreamOrDevice s={})
    -
    array scaled_dot_product_attention(const array &queries, const array &keys, const array &values, const float scale, const std::optional< array > &mask=std::nullopt, StreamOrDevice s={})
    Computes: O = softmax(Q @ K.T) @ V.
    -
    array rms_norm(const array &x, const array &weight, float eps, StreamOrDevice s={})
    -
    std::variant< std::monostate, Stream, Device > StreamOrDevice
    Definition utils.h:14
    - -
    - - - - diff --git a/docs/build/html/fast__primitives_8h.html b/docs/build/html/fast__primitives_8h.html deleted file mode 100644 index 24e9e89b8..000000000 --- a/docs/build/html/fast__primitives_8h.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - -MLX: mlx/fast_primitives.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    fast_primitives.h File Reference
    -
    -
    -
    #include "mlx/primitives.h"
    -
    -

    Go to the source code of this file.

    - - - - - - - - - - - - - - - - -

    -Classes

    class  mlx::core::fast::Custom
     
    class  mlx::core::fast::RMSNorm
     
    class  mlx::core::fast::RMSNormVJP
     
    class  mlx::core::fast::LayerNorm
     
    class  mlx::core::fast::LayerNormVJP
     
    class  mlx::core::fast::RoPE
     
    class  mlx::core::fast::ScaledDotProductAttention
     
    - - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    namespace  mlx::core::fast
     
    -
    - - - - diff --git a/docs/build/html/fast__primitives_8h_source.html b/docs/build/html/fast__primitives_8h_source.html deleted file mode 100644 index f8b76a5b2..000000000 --- a/docs/build/html/fast__primitives_8h_source.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - -MLX: mlx/fast_primitives.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    fast_primitives.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2024 Apple Inc.
    -
    2
    -
    3#include "mlx/primitives.h"
    -
    4
    -
    5namespace mlx::core::fast {
    -
    6
    -
    7// Custom primitive accepts a fallback function which it uses for
    -
    8// transformations. Transformations are virtual so that derived classes may
    -
    9// override the default behavior.
    -
    -
    10class Custom : public Primitive {
    -
    11 public:
    -
    -
    12 explicit Custom(
    - -
    14 std::function<std::vector<array>(std::vector<array>)> fallback)
    -
    15 : Primitive(stream), fallback_(fallback) {};
    -
    -
    16
    -
    17 virtual std::pair<std::vector<array>, std::vector<int>> vmap(
    -
    18 const std::vector<array>& inputs,
    -
    19 const std::vector<int>& axes) override;
    -
    20
    -
    21 virtual std::vector<array> jvp(
    -
    22 const std::vector<array>& primals,
    -
    23 const std::vector<array>& tangents,
    -
    24 const std::vector<int>& argnums) override;
    -
    25
    -
    26 virtual std::vector<array> vjp(
    -
    27 const std::vector<array>& primals,
    -
    28 const std::vector<array>& cotangents,
    -
    29 const std::vector<int>& argnums,
    -
    30 const std::vector<array>& outputs) override;
    -
    31
    -
    32 private:
    -
    33 std::function<std::vector<array>(std::vector<array>)> fallback_;
    -
    34};
    -
    -
    35
    -
    -
    36class RMSNorm : public Custom {
    -
    37 public:
    -
    - - -
    40 std::function<std::vector<array>(std::vector<array>)> fallback,
    -
    41 float eps)
    -
    42 : Custom(stream, fallback), eps_(eps) {};
    -
    -
    43
    -
    -
    44 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    45 override {
    -
    46 throw std::runtime_error("NYI");
    -
    47 };
    -
    -
    48 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    49 override;
    -
    50
    -
    51 std::vector<array> vjp(
    -
    52 const std::vector<array>& primals,
    -
    53 const std::vector<array>& cotangents,
    -
    54 const std::vector<int>& argnums,
    -
    55 const std::vector<array>& outputs) override;
    -
    56
    - -
    58 bool is_equivalent(const Primitive& other) const override;
    -
    59
    -
    60 private:
    -
    61 std::function<std::vector<array>(std::vector<array>)> fallback_;
    -
    62 float eps_;
    -
    63};
    -
    -
    64
    -
    -
    65class RMSNormVJP : public Custom {
    -
    66 public:
    -
    - - -
    69 std::function<std::vector<array>(std::vector<array>)> fallback,
    -
    70 float eps)
    -
    71 : Custom(stream, fallback), eps_(eps) {};
    -
    -
    72
    -
    -
    73 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    74 override {
    -
    75 throw std::runtime_error("NYI");
    -
    76 };
    -
    -
    77 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    78 override;
    -
    79
    - -
    81 bool is_equivalent(const Primitive& other) const override;
    -
    82
    -
    83 private:
    -
    84 std::function<std::vector<array>(std::vector<array>)> fallback_;
    -
    85 float eps_;
    -
    86};
    -
    -
    87
    -
    -
    88class LayerNorm : public Custom {
    -
    89 public:
    -
    - - -
    92 std::function<std::vector<array>(std::vector<array>)> fallback,
    -
    93 float eps)
    -
    94 : Custom(stream, fallback), eps_(eps) {};
    -
    -
    95
    -
    -
    96 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    97 override {
    -
    98 throw std::runtime_error("NYI");
    -
    99 };
    -
    -
    100 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    101 override;
    -
    102
    -
    103 std::vector<array> vjp(
    -
    104 const std::vector<array>& primals,
    -
    105 const std::vector<array>& cotangents,
    -
    106 const std::vector<int>& argnums,
    -
    107 const std::vector<array>& outputs) override;
    -
    108
    - -
    110 bool is_equivalent(const Primitive& other) const override;
    -
    111
    -
    112 private:
    -
    113 std::function<std::vector<array>(std::vector<array>)> fallback_;
    -
    114 float eps_;
    -
    115};
    -
    -
    116
    -
    -
    117class LayerNormVJP : public Custom {
    -
    118 public:
    -
    - - -
    121 std::function<std::vector<array>(std::vector<array>)> fallback,
    -
    122 float eps)
    -
    123 : Custom(stream, fallback), eps_(eps) {};
    -
    -
    124
    -
    -
    125 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    126 override {
    -
    127 throw std::runtime_error("NYI");
    -
    128 };
    -
    -
    129 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    130 override;
    -
    131
    - -
    133 bool is_equivalent(const Primitive& other) const override;
    -
    134
    -
    135 private:
    -
    136 std::function<std::vector<array>(std::vector<array>)> fallback_;
    -
    137 float eps_;
    -
    138};
    -
    -
    139
    -
    -
    140class RoPE : public Custom {
    -
    141 public:
    -
    - - -
    144 std::function<std::vector<array>(std::vector<array>)> fallback,
    -
    145 int dims,
    -
    146 bool traditional,
    -
    147 float base,
    -
    148 float scale,
    -
    149 int offset,
    -
    150 bool forward)
    -
    151 : Custom(stream, fallback),
    -
    152 dims_(dims),
    -
    153 traditional_(traditional),
    -
    154 base_(base),
    -
    155 scale_(scale),
    -
    156 offset_(offset),
    -
    157 forward_(forward) {};
    -
    -
    158
    -
    -
    159 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    160 override {
    -
    161 throw std::runtime_error("NYI");
    -
    162 };
    -
    -
    163 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    164 override;
    -
    165
    -
    166 std::vector<array> vjp(
    -
    167 const std::vector<array>& primals,
    -
    168 const std::vector<array>& cotangents,
    -
    169 const std::vector<int>& argnums,
    -
    170 const std::vector<array>& outputs) override;
    -
    171
    - -
    173 bool is_equivalent(const Primitive& other) const override;
    -
    174
    -
    175 private:
    -
    176 std::function<std::vector<array>(std::vector<array>)> fallback_;
    -
    177 int dims_;
    -
    178 bool traditional_;
    -
    179 float base_;
    -
    180 float scale_;
    -
    181 int offset_;
    -
    182 bool forward_;
    -
    183};
    -
    -
    184
    -
    - -
    186 public:
    -
    - - -
    189 std::function<std::vector<array>(std::vector<array>)> fallback,
    -
    190 const float scale,
    -
    191 const bool needs_mask)
    -
    192 : Custom(stream, fallback), scale_(scale), needs_mask_(needs_mask) {};
    -
    -
    193
    -
    -
    194 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    195 override {
    -
    196 throw std::runtime_error("NYI");
    -
    197 };
    -
    -
    198
    -
    -
    199 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    200 override {
    -
    201 eval_gpu(inputs, outputs[0]);
    -
    202 };
    -
    -
    203
    -
    204 void eval_gpu(const std::vector<array>& inputs, array& out);
    -
    205 bool is_equivalent(const Primitive& other) const override;
    -
    206
    - -
    208
    -
    209 private:
    -
    210 std::function<std::vector<array>(std::vector<array>)> fallback_;
    -
    211 float scale_;
    -
    212 bool needs_mask_;
    -
    213};
    -
    -
    214
    -
    215} // namespace mlx::core::fast
    -
    Definition primitives.h:48
    -
    const Stream & stream()
    The stream the primitive will run on.
    Definition primitives.h:58
    -
    virtual bool is_equivalent(const Primitive &other) const
    Equivalence check defaults to false unless overridden by the primitive.
    Definition primitives.h:107
    -
    Definition array.h:20
    -
    Definition fast_primitives.h:10
    -
    Custom(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback)
    Definition fast_primitives.h:12
    -
    virtual std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
    The vector-Jacobian product.
    -
    virtual std::pair< std::vector< array >, std::vector< int > > vmap(const std::vector< array > &inputs, const std::vector< int > &axes) override
    The primitive must know how to vectorize itself across the given axes.
    -
    virtual std::vector< array > jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums) override
    The Jacobian-vector product.
    -
    Definition fast_primitives.h:88
    -
    DEFINE_PRINT(LayerNorm) bool is_equivalent(const Primitive &other) const override
    -
    LayerNorm(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)
    Definition fast_primitives.h:90
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    Definition fast_primitives.h:96
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
    The vector-Jacobian product.
    -
    Definition fast_primitives.h:117
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    Definition fast_primitives.h:125
    -
    LayerNormVJP(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)
    Definition fast_primitives.h:119
    -
    DEFINE_PRINT(LayerNormVJP) bool is_equivalent(const Primitive &other) const override
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    Definition fast_primitives.h:36
    -
    RMSNorm(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)
    Definition fast_primitives.h:38
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    Definition fast_primitives.h:44
    -
    std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
    The vector-Jacobian product.
    -
    DEFINE_PRINT(RMSNorm) bool is_equivalent(const Primitive &other) const override
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    Definition fast_primitives.h:65
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    DEFINE_PRINT(RMSNormVJP) bool is_equivalent(const Primitive &other) const override
    -
    RMSNormVJP(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, float eps)
    Definition fast_primitives.h:67
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    Definition fast_primitives.h:73
    -
    Definition fast_primitives.h:140
    -
    RoPE(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, int dims, bool traditional, float base, float scale, int offset, bool forward)
    Definition fast_primitives.h:142
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    Definition fast_primitives.h:159
    -
    DEFINE_PRINT(RoPE) bool is_equivalent(const Primitive &other) const override
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
    The vector-Jacobian product.
    -
    Definition fast_primitives.h:185
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    Definition fast_primitives.h:199
    -
    ScaledDotProductAttention(Stream stream, std::function< std::vector< array >(std::vector< array >)> fallback, const float scale, const bool needs_mask)
    Definition fast_primitives.h:187
    -
    DEFINE_PRINT(ScaledDotProductAttention)
    -
    void eval_gpu(const std::vector< array > &inputs, array &out)
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    Definition fast_primitives.h:194
    -
    bool is_equivalent(const Primitive &other) const override
    Equivalence check defaults to false unless overridden by the primitive.
    -
    Definition fast.h:9
    - -
    Definition stream.h:9
    -
    - - - - diff --git a/docs/build/html/fft_8h.html b/docs/build/html/fft_8h.html deleted file mode 100644 index deae34931..000000000 --- a/docs/build/html/fft_8h.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - -MLX: mlx/fft.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    fft.h File Reference
    -
    -
    -
    #include <variant>
    -#include "array.h"
    -#include "device.h"
    -#include "utils.h"
    -
    -

    Go to the source code of this file.

    - - - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    namespace  mlx::core::fft
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    array mlx::core::fft::fftn (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the n-dimensional Fourier Transform.
     
    array mlx::core::fft::fftn (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     
    array mlx::core::fft::fftn (const array &a, StreamOrDevice s={})
     
    array mlx::core::fft::ifftn (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the n-dimensional inverse Fourier Transform.
     
    array mlx::core::fft::ifftn (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     
    array mlx::core::fft::ifftn (const array &a, StreamOrDevice s={})
     
    array mlx::core::fft::fft (const array &a, int n, int axis, StreamOrDevice s={})
     Compute the one-dimensional Fourier Transform.
     
    array mlx::core::fft::fft (const array &a, int axis=-1, StreamOrDevice s={})
     
    array mlx::core::fft::ifft (const array &a, int n, int axis, StreamOrDevice s={})
     Compute the one-dimensional inverse Fourier Transform.
     
    array mlx::core::fft::ifft (const array &a, int axis=-1, StreamOrDevice s={})
     
    array mlx::core::fft::fft2 (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the two-dimensional Fourier Transform.
     
    array mlx::core::fft::fft2 (const array &a, const std::vector< int > &axes={-2, -1}, StreamOrDevice s={})
     
    array mlx::core::fft::ifft2 (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the two-dimensional inverse Fourier Transform.
     
    array mlx::core::fft::ifft2 (const array &a, const std::vector< int > &axes={-2, -1}, StreamOrDevice s={})
     
    array mlx::core::fft::rfftn (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the n-dimensional Fourier Transform on a real input.
     
    array mlx::core::fft::rfftn (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     
    array mlx::core::fft::rfftn (const array &a, StreamOrDevice s={})
     
    array mlx::core::fft::irfftn (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the n-dimensional inverse of rfftn.
     
    array mlx::core::fft::irfftn (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     
    array mlx::core::fft::irfftn (const array &a, StreamOrDevice s={})
     
    array mlx::core::fft::rfft (const array &a, int n, int axis, StreamOrDevice s={})
     Compute the one-dimensional Fourier Transform on a real input.
     
    array mlx::core::fft::rfft (const array &a, int axis=-1, StreamOrDevice s={})
     
    array mlx::core::fft::irfft (const array &a, int n, int axis, StreamOrDevice s={})
     Compute the one-dimensional inverse of rfft.
     
    array mlx::core::fft::irfft (const array &a, int axis=-1, StreamOrDevice s={})
     
    array mlx::core::fft::rfft2 (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the two-dimensional Fourier Transform on a real input.
     
    array mlx::core::fft::rfft2 (const array &a, const std::vector< int > &axes={-2, -1}, StreamOrDevice s={})
     
    array mlx::core::fft::irfft2 (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the two-dimensional inverse of rfft2.
     
    array mlx::core::fft::irfft2 (const array &a, const std::vector< int > &axes={-2, -1}, StreamOrDevice s={})
     
    -
    - - - - diff --git a/docs/build/html/fft_8h_source.html b/docs/build/html/fft_8h_source.html deleted file mode 100644 index 24f0f4bac..000000000 --- a/docs/build/html/fft_8h_source.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - -MLX: mlx/fft.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    fft.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <variant>
    -
    6
    -
    7#include "array.h"
    -
    8#include "device.h"
    -
    9#include "utils.h"
    -
    10
    -
    -
    11namespace mlx::core::fft {
    -
    12
    - -
    15 const array& a,
    -
    16 const std::vector<int>& n,
    -
    17 const std::vector<int>& axes,
    -
    18 StreamOrDevice s = {});
    -
    19array fftn(const array& a, const std::vector<int>& axes, StreamOrDevice s = {});
    -
    20array fftn(const array& a, StreamOrDevice s = {});
    -
    21
    - -
    24 const array& a,
    -
    25 const std::vector<int>& n,
    -
    26 const std::vector<int>& axes,
    -
    27 StreamOrDevice s = {});
    - -
    29 const array& a,
    -
    30 const std::vector<int>& axes,
    -
    31 StreamOrDevice s = {});
    -
    32array ifftn(const array& a, StreamOrDevice s = {});
    -
    33
    -
    -
    35inline array fft(const array& a, int n, int axis, StreamOrDevice s = {}) {
    -
    36 return fftn(a, {n}, {axis}, s);
    -
    37}
    -
    -
    -
    38inline array fft(const array& a, int axis = -1, StreamOrDevice s = {}) {
    -
    39 return fftn(a, {axis}, s);
    -
    40}
    -
    -
    41
    -
    -
    43inline array ifft(const array& a, int n, int axis, StreamOrDevice s = {}) {
    -
    44 return ifftn(a, {n}, {axis}, s);
    -
    45}
    -
    -
    -
    46inline array ifft(const array& a, int axis = -1, StreamOrDevice s = {}) {
    -
    47 return ifftn(a, {axis}, s);
    -
    48}
    -
    -
    49
    -
    -
    51inline array fft2(
    -
    52 const array& a,
    -
    53 const std::vector<int>& n,
    -
    54 const std::vector<int>& axes,
    -
    55 StreamOrDevice s = {}) {
    -
    56 return fftn(a, n, axes, s);
    -
    57}
    -
    -
    -
    58inline array fft2(
    -
    59 const array& a,
    -
    60 const std::vector<int>& axes = {-2, -1},
    -
    61 StreamOrDevice s = {}) {
    -
    62 return fftn(a, axes, s);
    -
    63}
    -
    -
    64
    -
    -
    66inline array ifft2(
    -
    67 const array& a,
    -
    68 const std::vector<int>& n,
    -
    69 const std::vector<int>& axes,
    -
    70 StreamOrDevice s = {}) {
    -
    71 return ifftn(a, n, axes, s);
    -
    72}
    -
    -
    -
    73inline array ifft2(
    -
    74 const array& a,
    -
    75 const std::vector<int>& axes = {-2, -1},
    -
    76 StreamOrDevice s = {}) {
    -
    77 return ifftn(a, axes, s);
    -
    78}
    -
    -
    79
    - -
    82 const array& a,
    -
    83 const std::vector<int>& n,
    -
    84 const std::vector<int>& axes,
    -
    85 StreamOrDevice s = {});
    - -
    87 const array& a,
    -
    88 const std::vector<int>& axes,
    -
    89 StreamOrDevice s = {});
    -
    90array rfftn(const array& a, StreamOrDevice s = {});
    -
    91
    - -
    94 const array& a,
    -
    95 const std::vector<int>& n,
    -
    96 const std::vector<int>& axes,
    -
    97 StreamOrDevice s = {});
    - -
    99 const array& a,
    -
    100 const std::vector<int>& axes,
    -
    101 StreamOrDevice s = {});
    - -
    103
    -
    -
    105inline array rfft(const array& a, int n, int axis, StreamOrDevice s = {}) {
    -
    106 return rfftn(a, {n}, {axis}, s);
    -
    107}
    -
    -
    -
    108inline array rfft(const array& a, int axis = -1, StreamOrDevice s = {}) {
    -
    109 return rfftn(a, {axis}, s);
    -
    110}
    -
    -
    -
    112inline array irfft(const array& a, int n, int axis, StreamOrDevice s = {}) {
    -
    113 return irfftn(a, {n}, {axis}, s);
    -
    114}
    -
    -
    -
    115inline array irfft(const array& a, int axis = -1, StreamOrDevice s = {}) {
    -
    116 return irfftn(a, {axis}, s);
    -
    117}
    -
    -
    118
    -
    - -
    121 const array& a,
    -
    122 const std::vector<int>& n,
    -
    123 const std::vector<int>& axes,
    -
    124 StreamOrDevice s = {}) {
    -
    125 return rfftn(a, n, axes, s);
    -
    126}
    -
    -
    - -
    128 const array& a,
    -
    129 const std::vector<int>& axes = {-2, -1},
    -
    130 StreamOrDevice s = {}) {
    -
    131 return rfftn(a, axes, s);
    -
    132}
    -
    -
    133
    -
    - -
    136 const array& a,
    -
    137 const std::vector<int>& n,
    -
    138 const std::vector<int>& axes,
    -
    139 StreamOrDevice s = {}) {
    -
    140 return irfftn(a, n, axes, s);
    -
    141}
    -
    -
    - -
    143 const array& a,
    -
    144 const std::vector<int>& axes = {-2, -1},
    -
    145 StreamOrDevice s = {}) {
    -
    146 return irfftn(a, axes, s);
    -
    147}
    -
    -
    148
    -
    149} // namespace mlx::core::fft
    -
    - -
    Definition array.h:20
    - -
    Definition fft.h:11
    -
    array fft2(const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
    Compute the two-dimensional Fourier Transform.
    Definition fft.h:51
    -
    array fftn(const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
    Compute the n-dimensional Fourier Transform.
    -
    array rfftn(const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
    Compute the n-dimensional Fourier Transform on a real input.
    -
    array irfftn(const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
    Compute the n-dimensional inverse of rfftn.
    -
    array irfft2(const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
    Compute the two-dimensional inverse of rfft2.
    Definition fft.h:135
    -
    array ifft2(const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
    Compute the two-dimensional inverse Fourier Transform.
    Definition fft.h:66
    -
    array ifft(const array &a, int n, int axis, StreamOrDevice s={})
    Compute the one-dimensional inverse Fourier Transform.
    Definition fft.h:43
    -
    array rfft(const array &a, int n, int axis, StreamOrDevice s={})
    Compute the one-dimensional Fourier Transform on a real input.
    Definition fft.h:105
    -
    array irfft(const array &a, int n, int axis, StreamOrDevice s={})
    Compute the one-dimensional inverse of rfft.
    Definition fft.h:112
    -
    array ifftn(const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
    Compute the n-dimensional inverse Fourier Transform.
    -
    array fft(const array &a, int n, int axis, StreamOrDevice s={})
    Compute the one-dimensional Fourier Transform.
    Definition fft.h:35
    -
    array rfft2(const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
    Compute the two-dimensional Fourier Transform on a real input.
    Definition fft.h:120
    -
    std::variant< std::monostate, Stream, Device > StreamOrDevice
    Definition utils.h:14
    - -
    - - - - diff --git a/docs/build/html/files.html b/docs/build/html/files.html deleted file mode 100644 index 786bfd98d..000000000 --- a/docs/build/html/files.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - -MLX: File List - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    File List
    -
    - - - - - diff --git a/docs/build/html/folderclosed.svg b/docs/build/html/folderclosed.svg deleted file mode 100644 index b04bed2e7..000000000 --- a/docs/build/html/folderclosed.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - diff --git a/docs/build/html/folderclosedd.svg b/docs/build/html/folderclosedd.svg deleted file mode 100644 index 52f0166a2..000000000 --- a/docs/build/html/folderclosedd.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - diff --git a/docs/build/html/folderopen.svg b/docs/build/html/folderopen.svg deleted file mode 100644 index f6896dd25..000000000 --- a/docs/build/html/folderopen.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/docs/build/html/folderopend.svg b/docs/build/html/folderopend.svg deleted file mode 100644 index 2d1f06e7b..000000000 --- a/docs/build/html/folderopend.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/docs/build/html/fp16_8h.html b/docs/build/html/fp16_8h.html deleted file mode 100644 index b8125487a..000000000 --- a/docs/build/html/fp16_8h.html +++ /dev/null @@ -1,741 +0,0 @@ - - - - - - - -MLX: mlx/types/fp16.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    fp16.h File Reference
    -
    -
    -
    #include <algorithm>
    -#include <cmath>
    -#include <cstdint>
    -#include <vector>
    -
    -

    Go to the source code of this file.

    - - - - -

    -Classes

    struct  mlx::core::_MLX_Float16
     
    - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    - - - - - - - - - - - - - - - - - -

    -Macros

    #define __MLX_HALF_NAN__   0x7D00
     
    #define half_binop_base(__op__, __operator__, otype, atype, btype, ctype)
     
    #define half_binop_helper(__op__, __operator__, otype, itype, ctype)
     
    #define half_binop(__op__, __operator__)
     
    #define half_compop(__op__, __operator__)
     
    #define half_inplace_op(__op__, __operator__)
     
    #define half_bitop(__op__, __operator__)
     
    #define half_inplace_bitop(__op__, __operator__)
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    float mlx::core::operator+ (_MLX_Float16 lhs, float rhs)
     
    float mlx::core::operator+ (float lhs, _MLX_Float16 rhs)
     
    double mlx::core::operator+ (_MLX_Float16 lhs, double rhs)
     
    double mlx::core::operator+ (double lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs, bool rhs)
     
    _MLX_Float16 mlx::core::operator+ (bool lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs, int32_t rhs)
     
    _MLX_Float16 mlx::core::operator+ (int32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs, uint32_t rhs)
     
    _MLX_Float16 mlx::core::operator+ (uint32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs, int64_t rhs)
     
    _MLX_Float16 mlx::core::operator+ (int64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs, uint64_t rhs)
     
    _MLX_Float16 mlx::core::operator+ (uint64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    float mlx::core::operator- (_MLX_Float16 lhs, float rhs)
     
    float mlx::core::operator- (float lhs, _MLX_Float16 rhs)
     
    double mlx::core::operator- (_MLX_Float16 lhs, double rhs)
     
    double mlx::core::operator- (double lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs, bool rhs)
     
    _MLX_Float16 mlx::core::operator- (bool lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs, int32_t rhs)
     
    _MLX_Float16 mlx::core::operator- (int32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs, uint32_t rhs)
     
    _MLX_Float16 mlx::core::operator- (uint32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs, int64_t rhs)
     
    _MLX_Float16 mlx::core::operator- (int64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs, uint64_t rhs)
     
    _MLX_Float16 mlx::core::operator- (uint64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    float mlx::core::operator* (_MLX_Float16 lhs, float rhs)
     
    float mlx::core::operator* (float lhs, _MLX_Float16 rhs)
     
    double mlx::core::operator* (_MLX_Float16 lhs, double rhs)
     
    double mlx::core::operator* (double lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs, bool rhs)
     
    _MLX_Float16 mlx::core::operator* (bool lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs, int32_t rhs)
     
    _MLX_Float16 mlx::core::operator* (int32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs, uint32_t rhs)
     
    _MLX_Float16 mlx::core::operator* (uint32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs, int64_t rhs)
     
    _MLX_Float16 mlx::core::operator* (int64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs, uint64_t rhs)
     
    _MLX_Float16 mlx::core::operator* (uint64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    float mlx::core::operator/ (_MLX_Float16 lhs, float rhs)
     
    float mlx::core::operator/ (float lhs, _MLX_Float16 rhs)
     
    double mlx::core::operator/ (_MLX_Float16 lhs, double rhs)
     
    double mlx::core::operator/ (double lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs, bool rhs)
     
    _MLX_Float16 mlx::core::operator/ (bool lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs, int32_t rhs)
     
    _MLX_Float16 mlx::core::operator/ (int32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs, uint32_t rhs)
     
    _MLX_Float16 mlx::core::operator/ (uint32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs, int64_t rhs)
     
    _MLX_Float16 mlx::core::operator/ (int64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs, uint64_t rhs)
     
    _MLX_Float16 mlx::core::operator/ (uint64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator> (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator> (_MLX_Float16 lhs, float rhs)
     
    bool mlx::core::operator> (float lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator> (_MLX_Float16 lhs, double rhs)
     
    bool mlx::core::operator> (double lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator> (_MLX_Float16 lhs, int32_t rhs)
     
    bool mlx::core::operator> (int32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator> (_MLX_Float16 lhs, uint32_t rhs)
     
    bool mlx::core::operator> (uint32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator> (_MLX_Float16 lhs, int64_t rhs)
     
    bool mlx::core::operator> (int64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator> (_MLX_Float16 lhs, uint64_t rhs)
     
    bool mlx::core::operator> (uint64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator< (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator< (_MLX_Float16 lhs, float rhs)
     
    bool mlx::core::operator< (float lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator< (_MLX_Float16 lhs, double rhs)
     
    bool mlx::core::operator< (double lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator< (_MLX_Float16 lhs, int32_t rhs)
     
    bool mlx::core::operator< (int32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator< (_MLX_Float16 lhs, uint32_t rhs)
     
    bool mlx::core::operator< (uint32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator< (_MLX_Float16 lhs, int64_t rhs)
     
    bool mlx::core::operator< (int64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator< (_MLX_Float16 lhs, uint64_t rhs)
     
    bool mlx::core::operator< (uint64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator>= (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator>= (_MLX_Float16 lhs, float rhs)
     
    bool mlx::core::operator>= (float lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator>= (_MLX_Float16 lhs, double rhs)
     
    bool mlx::core::operator>= (double lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator>= (_MLX_Float16 lhs, int32_t rhs)
     
    bool mlx::core::operator>= (int32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator>= (_MLX_Float16 lhs, uint32_t rhs)
     
    bool mlx::core::operator>= (uint32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator>= (_MLX_Float16 lhs, int64_t rhs)
     
    bool mlx::core::operator>= (int64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator>= (_MLX_Float16 lhs, uint64_t rhs)
     
    bool mlx::core::operator>= (uint64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator<= (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator<= (_MLX_Float16 lhs, float rhs)
     
    bool mlx::core::operator<= (float lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator<= (_MLX_Float16 lhs, double rhs)
     
    bool mlx::core::operator<= (double lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator<= (_MLX_Float16 lhs, int32_t rhs)
     
    bool mlx::core::operator<= (int32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator<= (_MLX_Float16 lhs, uint32_t rhs)
     
    bool mlx::core::operator<= (uint32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator<= (_MLX_Float16 lhs, int64_t rhs)
     
    bool mlx::core::operator<= (int64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator<= (_MLX_Float16 lhs, uint64_t rhs)
     
    bool mlx::core::operator<= (uint64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator== (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator== (_MLX_Float16 lhs, float rhs)
     
    bool mlx::core::operator== (float lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator== (_MLX_Float16 lhs, double rhs)
     
    bool mlx::core::operator== (double lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator== (_MLX_Float16 lhs, int32_t rhs)
     
    bool mlx::core::operator== (int32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator== (_MLX_Float16 lhs, uint32_t rhs)
     
    bool mlx::core::operator== (uint32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator== (_MLX_Float16 lhs, int64_t rhs)
     
    bool mlx::core::operator== (int64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator== (_MLX_Float16 lhs, uint64_t rhs)
     
    bool mlx::core::operator== (uint64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator!= (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator!= (_MLX_Float16 lhs, float rhs)
     
    bool mlx::core::operator!= (float lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator!= (_MLX_Float16 lhs, double rhs)
     
    bool mlx::core::operator!= (double lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator!= (_MLX_Float16 lhs, int32_t rhs)
     
    bool mlx::core::operator!= (int32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator!= (_MLX_Float16 lhs, uint32_t rhs)
     
    bool mlx::core::operator!= (uint32_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator!= (_MLX_Float16 lhs, int64_t rhs)
     
    bool mlx::core::operator!= (int64_t lhs, _MLX_Float16 rhs)
     
    bool mlx::core::operator!= (_MLX_Float16 lhs, uint64_t rhs)
     
    bool mlx::core::operator!= (uint64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs)
     
    _MLX_Float16mlx::core::operator+= (_MLX_Float16 &lhs, const float &rhs)
     
    float & mlx::core::operator+= (float &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16mlx::core::operator-= (_MLX_Float16 &lhs, const float &rhs)
     
    float & mlx::core::operator-= (float &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16mlx::core::operator*= (_MLX_Float16 &lhs, const float &rhs)
     
    float & mlx::core::operator*= (float &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16mlx::core::operator/= (_MLX_Float16 &lhs, const float &rhs)
     
    float & mlx::core::operator/= (float &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator| (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator| (_MLX_Float16 lhs, uint16_t rhs)
     
    _MLX_Float16 mlx::core::operator| (uint16_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator& (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator& (_MLX_Float16 lhs, uint16_t rhs)
     
    _MLX_Float16 mlx::core::operator& (uint16_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator^ (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 mlx::core::operator^ (_MLX_Float16 lhs, uint16_t rhs)
     
    _MLX_Float16 mlx::core::operator^ (uint16_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16mlx::core::operator|= (_MLX_Float16 &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16mlx::core::operator|= (_MLX_Float16 &lhs, uint16_t rhs)
     
    _MLX_Float16mlx::core::operator&= (_MLX_Float16 &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16mlx::core::operator&= (_MLX_Float16 &lhs, uint16_t rhs)
     
    _MLX_Float16mlx::core::operator^= (_MLX_Float16 &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16mlx::core::operator^= (_MLX_Float16 &lhs, uint16_t rhs)
     
    -

    Macro Definition Documentation

    - -

    ◆ __MLX_HALF_NAN__

    - -
    -
    - - - - -
    #define __MLX_HALF_NAN__   0x7D00
    -
    - -
    -
    - -

    ◆ half_binop

    - -
    -
    - - - - - - - - - - - -
    #define half_binop( __op__,
    __operator__ )
    -
    -Value:
    -
    __op__, __operator__, _MLX_Float16, _MLX_Float16, _MLX_Float16, float); \
    -
    half_binop_helper(__op__, __operator__, float, float, float); \
    -
    half_binop_helper(__op__, __operator__, double, double, double); \
    -
    half_binop_helper(__op__, __operator__, _MLX_Float16, bool, float); \
    -
    half_binop_helper(__op__, __operator__, _MLX_Float16, int32_t, float); \
    -
    half_binop_helper(__op__, __operator__, _MLX_Float16, uint32_t, float); \
    -
    half_binop_helper(__op__, __operator__, _MLX_Float16, int64_t, float); \
    -
    half_binop_helper(__op__, __operator__, _MLX_Float16, uint64_t, float);
    -
    #define half_binop_base(__op__, __operator__, otype, atype, btype, ctype)
    Definition fp16.h:118
    -
    -
    -
    - -

    ◆ half_binop_base

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define half_binop_base( __op__,
    __operator__,
    otype,
    atype,
    btype,
    ctype )
    -
    -Value:
    inline otype __operator__(atype lhs, btype rhs) { \
    -
    return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
    -
    }
    -
    -
    -
    - -

    ◆ half_binop_helper

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define half_binop_helper( __op__,
    __operator__,
    otype,
    itype,
    ctype )
    -
    -Value:
    inline otype __operator__(_MLX_Float16 lhs, itype rhs) { \
    -
    return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
    -
    } \
    -
    inline otype __operator__(itype lhs, _MLX_Float16 rhs) { \
    -
    return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
    -
    }
    -
    -
    -
    - -

    ◆ half_bitop

    - -
    -
    - - - - - - - - - - - -
    #define half_bitop( __op__,
    __operator__ )
    -
    -Value:
    inline _MLX_Float16 __operator__(_MLX_Float16 lhs, _MLX_Float16 rhs) { \
    -
    _MLX_Float16 out; \
    -
    out.bits_ = lhs.bits_ __op__ rhs.bits_; \
    -
    return out; \
    -
    } \
    -
    inline _MLX_Float16 __operator__(_MLX_Float16 lhs, uint16_t rhs) { \
    -
    _MLX_Float16 out; \
    -
    out.bits_ = lhs.bits_ __op__ rhs; \
    -
    return out; \
    -
    } \
    -
    inline _MLX_Float16 __operator__(uint16_t lhs, _MLX_Float16 rhs) { \
    -
    _MLX_Float16 out; \
    -
    out.bits_ = lhs __op__ rhs.bits_; \
    -
    return out; \
    -
    }
    -
    -
    -
    - -

    ◆ half_compop

    - -
    -
    - - - - - - - - - - - -
    #define half_compop( __op__,
    __operator__ )
    -
    -Value:
    -
    __op__, __operator__, bool, _MLX_Float16, _MLX_Float16, float); \
    -
    half_binop_helper(__op__, __operator__, bool, float, float); \
    -
    half_binop_helper(__op__, __operator__, bool, double, double); \
    -
    half_binop_helper(__op__, __operator__, bool, int32_t, float); \
    -
    half_binop_helper(__op__, __operator__, bool, uint32_t, float); \
    -
    half_binop_helper(__op__, __operator__, bool, int64_t, float); \
    -
    half_binop_helper(__op__, __operator__, bool, uint64_t, float);
    -
    -
    -
    - -

    ◆ half_inplace_bitop

    - -
    -
    - - - - - - - - - - - -
    #define half_inplace_bitop( __op__,
    __operator__ )
    -
    -Value:
    inline _MLX_Float16& __operator__(_MLX_Float16& lhs, _MLX_Float16 rhs) { \
    -
    lhs.bits_ = lhs.bits_ __op__ rhs.bits_; \
    -
    return lhs; \
    -
    } \
    -
    inline _MLX_Float16& __operator__(_MLX_Float16& lhs, uint16_t rhs) { \
    -
    lhs.bits_ = lhs.bits_ __op__ rhs; \
    -
    return lhs; \
    -
    }
    -
    -
    -
    - -

    ◆ half_inplace_op

    - -
    -
    - - - - - - - - - - - -
    #define half_inplace_op( __op__,
    __operator__ )
    -
    -Value:
    inline _MLX_Float16& __operator__(_MLX_Float16& lhs, const float& rhs) { \
    -
    lhs = lhs __op__ rhs; \
    -
    return lhs; \
    -
    } \
    -
    inline float& __operator__(float& lhs, _MLX_Float16 rhs) { \
    -
    lhs = lhs __op__ rhs; \
    -
    return lhs; \
    -
    }
    -
    -
    -
    -

    Variable Documentation

    - -

    ◆ f

    - -
    -
    - - - - -
    float f
    -
    - -
    -
    - -

    ◆ u

    - -
    -
    - - - - -
    uint32_t u
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/fp16_8h_source.html b/docs/build/html/fp16_8h_source.html deleted file mode 100644 index 70c955f1d..000000000 --- a/docs/build/html/fp16_8h_source.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - -MLX: mlx/types/fp16.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    fp16.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <algorithm>
    -
    6#include <cmath>
    -
    7#include <cstdint>
    -
    8#include <vector>
    -
    9
    -
    10#define __MLX_HALF_NAN__ 0x7D00
    -
    11
    -
    12namespace mlx::core {
    -
    13
    -
    14namespace {
    -
    15union float_bits_fp16 {
    -
    16 float f;
    -
    17 uint32_t u;
    -
    18};
    -
    19} // namespace
    -
    20
    -
    - -
    22 uint16_t bits_;
    -
    23
    -
    24 // Default constructor
    -
    25 _MLX_Float16() = default;
    -
    26
    -
    27 // Default copy constructor
    -
    28 _MLX_Float16(_MLX_Float16 const&) = default;
    -
    29
    -
    30 // Appease std::vector<bool> for being special
    -
    -
    31 _MLX_Float16& operator=(std::vector<bool>::reference x) {
    -
    32 bits_ = x;
    -
    33 return *this;
    -
    34 }
    -
    -
    35
    -
    -
    36 _MLX_Float16& operator=(const float& x) {
    -
    37 return (*this = _MLX_Float16(x));
    -
    38 }
    -
    -
    39
    -
    40 // From float32
    -
    -
    41 _MLX_Float16(const float& x) : bits_(0) {
    -
    42 // Conversion following
    -
    43 // https://github.com/Maratyszcza/FP16/blob/master/include/fp16/fp16.h
    -
    44
    -
    45 // Union
    -
    46 float_bits_fp16 in;
    -
    47
    -
    48 // Take fp32 bits
    -
    49 in.f = x;
    -
    50
    -
    51 // Find and take sign bit
    -
    52 uint32_t x_sign_32 = in.u & uint32_t(0x80000000);
    -
    53 uint16_t x_sign_16 = (x_sign_32 >> 16);
    -
    54
    -
    55 if (std::isnan(x)) {
    -
    56 bits_ = x_sign_16 | uint16_t(__MLX_HALF_NAN__);
    -
    57 } else {
    -
    58 // Union
    -
    59 float_bits_fp16 inf_scale, zero_scale, magic_bits;
    -
    60
    -
    61 // Find exponent bits and take the max supported by half
    -
    62 uint32_t x_expo_32 = in.u & uint32_t(0x7f800000);
    -
    63 uint32_t max_expo_32 = uint32_t(0x38800000);
    -
    64 x_expo_32 = x_expo_32 < max_expo_32 ? max_expo_32 : x_expo_32;
    -
    65 x_expo_32 += uint32_t(15) << 23;
    -
    66
    -
    67 // Handle scaling to inf as needed
    -
    68 inf_scale.u = uint32_t(0x77800000);
    -
    69 zero_scale.u = uint32_t(0x08800000);
    -
    70
    -
    71 // Combine with magic and let addition do rounding
    -
    72 magic_bits.u = x_expo_32;
    -
    73 magic_bits.f += (std::abs(x) * inf_scale.f) * zero_scale.f;
    -
    74
    -
    75 // Take the lower 5 bits of the exponent
    -
    76 uint32_t x_expo_16 = ((magic_bits.u >> 13) & uint32_t(0x7c00));
    -
    77
    -
    78 // Collect the lower 12 bits which have the mantissa
    -
    79 uint32_t x_mant_16 = magic_bits.u & uint32_t(0x0fff);
    -
    80
    -
    81 // Combine sign, exp and mantissa
    -
    82 bits_ = (x_sign_16 | uint16_t(x_expo_16 + x_mant_16));
    -
    83 }
    -
    84 }
    -
    -
    85
    -
    86 // To float32
    -
    -
    87 operator float() const {
    -
    88 // Conversion following
    -
    89 // https://github.com/Maratyszcza/FP16/blob/master/include/fp16/fp16.h
    -
    90
    -
    91 // Union
    -
    92 float_bits_fp16 out;
    -
    93
    -
    94 uint32_t x_sign_32 = (bits_ << 16) & uint32_t(0x80000000);
    -
    95 uint32_t base = (bits_ << 16);
    -
    96 uint32_t two_base = base + base;
    -
    97
    -
    98 uint32_t denorm_max = 1u << 27;
    -
    99 if (two_base < denorm_max) {
    -
    100 out.u = uint32_t(126) << 23; // magic mask
    -
    101 out.u |= (two_base >> 17); // Bits from fp16
    -
    102 out.f -= 0.5f; // magic bias
    -
    103 } else {
    -
    104 out.u = uint32_t(0xE0) << 23; // exponent offset
    -
    105 out.u += (two_base >> 4); // Bits from fp16
    -
    106 float out_unscaled = out.f; // Store value
    -
    107 out.u = uint32_t(0x7800000); // exponent scale
    -
    108 out.f *= out_unscaled;
    -
    109 }
    -
    110
    -
    111 // Add sign
    -
    112 out.u |= x_sign_32;
    -
    113
    -
    114 return out.f;
    -
    115 }
    -
    -
    116};
    -
    -
    117
    -
    -
    118#define half_binop_base(__op__, __operator__, otype, atype, btype, ctype) \
    -
    119 inline otype __operator__(atype lhs, btype rhs) { \
    -
    120 return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
    -
    121 }
    -
    -
    122
    -
    -
    123#define half_binop_helper(__op__, __operator__, otype, itype, ctype) \
    -
    124 inline otype __operator__(_MLX_Float16 lhs, itype rhs) { \
    -
    125 return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
    -
    126 } \
    -
    127 inline otype __operator__(itype lhs, _MLX_Float16 rhs) { \
    -
    128 return static_cast<ctype>(lhs) __op__ static_cast<ctype>(rhs); \
    -
    129 }
    -
    -
    130
    -
    131// Operators
    -
    -
    132#define half_binop(__op__, __operator__) \
    -
    133 half_binop_base( \
    -
    134 __op__, __operator__, _MLX_Float16, _MLX_Float16, _MLX_Float16, float); \
    -
    135 half_binop_helper(__op__, __operator__, float, float, float); \
    -
    136 half_binop_helper(__op__, __operator__, double, double, double); \
    -
    137 half_binop_helper(__op__, __operator__, _MLX_Float16, bool, float); \
    -
    138 half_binop_helper(__op__, __operator__, _MLX_Float16, int32_t, float); \
    -
    139 half_binop_helper(__op__, __operator__, _MLX_Float16, uint32_t, float); \
    -
    140 half_binop_helper(__op__, __operator__, _MLX_Float16, int64_t, float); \
    -
    141 half_binop_helper(__op__, __operator__, _MLX_Float16, uint64_t, float);
    -
    -
    142
    -
    143half_binop(+, operator+);
    -
    144half_binop(-, operator-);
    -
    145half_binop(*, operator*);
    -
    146half_binop(/, operator/);
    -
    147
    -
    148#undef half_binop
    -
    149
    -
    150// Comparison ops
    -
    -
    151#define half_compop(__op__, __operator__) \
    -
    152 half_binop_base( \
    -
    153 __op__, __operator__, bool, _MLX_Float16, _MLX_Float16, float); \
    -
    154 half_binop_helper(__op__, __operator__, bool, float, float); \
    -
    155 half_binop_helper(__op__, __operator__, bool, double, double); \
    -
    156 half_binop_helper(__op__, __operator__, bool, int32_t, float); \
    -
    157 half_binop_helper(__op__, __operator__, bool, uint32_t, float); \
    -
    158 half_binop_helper(__op__, __operator__, bool, int64_t, float); \
    -
    159 half_binop_helper(__op__, __operator__, bool, uint64_t, float);
    -
    -
    160
    -
    161half_compop(>, operator>);
    -
    162half_compop(<, operator<);
    -
    163half_compop(>=, operator>=);
    -
    164half_compop(<=, operator<=);
    -
    165half_compop(==, operator==);
    -
    166half_compop(!=, operator!=);
    -
    167
    -
    168#undef half_compop
    -
    169
    -
    170// Negative
    -
    - -
    172 return -static_cast<float>(lhs);
    -
    173}
    -
    -
    174
    -
    175// Inplace ops
    -
    -
    176#define half_inplace_op(__op__, __operator__) \
    -
    177 inline _MLX_Float16& __operator__(_MLX_Float16& lhs, const float& rhs) { \
    -
    178 lhs = lhs __op__ rhs; \
    -
    179 return lhs; \
    -
    180 } \
    -
    181 inline float& __operator__(float& lhs, _MLX_Float16 rhs) { \
    -
    182 lhs = lhs __op__ rhs; \
    -
    183 return lhs; \
    -
    184 }
    -
    -
    185
    -
    186half_inplace_op(+, operator+=);
    -
    187half_inplace_op(-, operator-=);
    -
    188half_inplace_op(*, operator*=);
    -
    189half_inplace_op(/, operator/=);
    -
    190
    -
    191#undef half_inplace_op
    -
    192
    -
    193// Bitwise ops
    -
    194
    -
    -
    195#define half_bitop(__op__, __operator__) \
    -
    196 inline _MLX_Float16 __operator__(_MLX_Float16 lhs, _MLX_Float16 rhs) { \
    -
    197 _MLX_Float16 out; \
    -
    198 out.bits_ = lhs.bits_ __op__ rhs.bits_; \
    -
    199 return out; \
    -
    200 } \
    -
    201 inline _MLX_Float16 __operator__(_MLX_Float16 lhs, uint16_t rhs) { \
    -
    202 _MLX_Float16 out; \
    -
    203 out.bits_ = lhs.bits_ __op__ rhs; \
    -
    204 return out; \
    -
    205 } \
    -
    206 inline _MLX_Float16 __operator__(uint16_t lhs, _MLX_Float16 rhs) { \
    -
    207 _MLX_Float16 out; \
    -
    208 out.bits_ = lhs __op__ rhs.bits_; \
    -
    209 return out; \
    -
    210 }
    -
    -
    211
    -
    212half_bitop(|, operator|);
    -
    213half_bitop(&, operator&);
    -
    214half_bitop(^, operator^);
    -
    215
    -
    216#undef half_bitop
    -
    217
    -
    -
    218#define half_inplace_bitop(__op__, __operator__) \
    -
    219 inline _MLX_Float16& __operator__(_MLX_Float16& lhs, _MLX_Float16 rhs) { \
    -
    220 lhs.bits_ = lhs.bits_ __op__ rhs.bits_; \
    -
    221 return lhs; \
    -
    222 } \
    -
    223 inline _MLX_Float16& __operator__(_MLX_Float16& lhs, uint16_t rhs) { \
    -
    224 lhs.bits_ = lhs.bits_ __op__ rhs; \
    -
    225 return lhs; \
    -
    226 }
    -
    -
    227
    -
    228half_inplace_bitop(|, operator|=);
    -
    229half_inplace_bitop(&, operator&=);
    -
    230half_inplace_bitop(^, operator^=);
    -
    231
    -
    232#undef half_inplace_bitop
    -
    233
    -
    234} // namespace mlx::core
    -
    #define __MLX_HALF_NAN__
    Definition fp16.h:10
    -
    #define half_bitop(__op__, __operator__)
    Definition fp16.h:195
    -
    #define half_inplace_bitop(__op__, __operator__)
    Definition fp16.h:218
    -
    #define half_inplace_op(__op__, __operator__)
    Definition fp16.h:176
    -
    #define half_compop(__op__, __operator__)
    Definition fp16.h:151
    -
    #define half_binop(__op__, __operator__)
    Definition fp16.h:132
    -
    array operator-(const array &a)
    -
    Definition allocator.h:7
    -
    Definition fp16.h:21
    -
    _MLX_Float16(_MLX_Float16 const &)=default
    -
    _MLX_Float16 & operator=(const float &x)
    Definition fp16.h:36
    -
    uint16_t bits_
    Definition fp16.h:22
    -
    _MLX_Float16 & operator=(std::vector< bool >::reference x)
    Definition fp16.h:31
    - -
    _MLX_Float16(const float &x)
    Definition fp16.h:41
    -
    uint32_t u
    Definition bf16.h:17
    -
    float f
    Definition bf16.h:16
    -
    - - - - diff --git a/docs/build/html/functions.html b/docs/build/html/functions.html deleted file mode 100644 index 28f4819a3..000000000 --- a/docs/build/html/functions.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - _ -

    -
    - - - - diff --git a/docs/build/html/functions_a.html b/docs/build/html/functions_a.html deleted file mode 100644 index 9ab5d4d08..000000000 --- a/docs/build/html/functions_a.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - a -

    -
    - - - - diff --git a/docs/build/html/functions_b.html b/docs/build/html/functions_b.html deleted file mode 100644 index 8d03d5e6f..000000000 --- a/docs/build/html/functions_b.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - b -

    -
    - - - - diff --git a/docs/build/html/functions_c.html b/docs/build/html/functions_c.html deleted file mode 100644 index f2a3a607d..000000000 --- a/docs/build/html/functions_c.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - c -

    -
    - - - - diff --git a/docs/build/html/functions_d.html b/docs/build/html/functions_d.html deleted file mode 100644 index e3df6c7cf..000000000 --- a/docs/build/html/functions_d.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - d -

    -
    - - - - diff --git a/docs/build/html/functions_e.html b/docs/build/html/functions_e.html deleted file mode 100644 index 6c5380511..000000000 --- a/docs/build/html/functions_e.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - e -

    -
    - - - - diff --git a/docs/build/html/functions_enum.html b/docs/build/html/functions_enum.html deleted file mode 100644 index 85ae495da..000000000 --- a/docs/build/html/functions_enum.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -MLX: Class Members - Enumerations - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all enums with links to the classes they belong to:
    -
    - - - - diff --git a/docs/build/html/functions_eval.html b/docs/build/html/functions_eval.html deleted file mode 100644 index fa9d08ea8..000000000 --- a/docs/build/html/functions_eval.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -MLX: Class Members - Enumerator - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_f.html b/docs/build/html/functions_f.html deleted file mode 100644 index f0281590a..000000000 --- a/docs/build/html/functions_f.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_func.html b/docs/build/html/functions_func.html deleted file mode 100644 index ca4ea3bb8..000000000 --- a/docs/build/html/functions_func.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - _ -

    -
    - - - - diff --git a/docs/build/html/functions_func_a.html b/docs/build/html/functions_func_a.html deleted file mode 100644 index b3fcd5beb..000000000 --- a/docs/build/html/functions_func_a.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - a -

    -
    - - - - diff --git a/docs/build/html/functions_func_b.html b/docs/build/html/functions_func_b.html deleted file mode 100644 index d7756da8d..000000000 --- a/docs/build/html/functions_func_b.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - b -

    -
    - - - - diff --git a/docs/build/html/functions_func_c.html b/docs/build/html/functions_func_c.html deleted file mode 100644 index bb3e9a6c9..000000000 --- a/docs/build/html/functions_func_c.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - c -

    -
    - - - - diff --git a/docs/build/html/functions_func_d.html b/docs/build/html/functions_func_d.html deleted file mode 100644 index 765c8b6a9..000000000 --- a/docs/build/html/functions_func_d.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - d -

    -
    - - - - diff --git a/docs/build/html/functions_func_e.html b/docs/build/html/functions_func_e.html deleted file mode 100644 index 8b353661e..000000000 --- a/docs/build/html/functions_func_e.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - e -

    -
    - - - - diff --git a/docs/build/html/functions_func_f.html b/docs/build/html/functions_func_f.html deleted file mode 100644 index acd729b13..000000000 --- a/docs/build/html/functions_func_f.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - f -

    -
    - - - - diff --git a/docs/build/html/functions_func_g.html b/docs/build/html/functions_func_g.html deleted file mode 100644 index 6081f5f8e..000000000 --- a/docs/build/html/functions_func_g.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - g -

    -
    - - - - diff --git a/docs/build/html/functions_func_h.html b/docs/build/html/functions_func_h.html deleted file mode 100644 index 04b813382..000000000 --- a/docs/build/html/functions_func_h.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - h -

    -
    - - - - diff --git a/docs/build/html/functions_func_i.html b/docs/build/html/functions_func_i.html deleted file mode 100644 index af3a141f1..000000000 --- a/docs/build/html/functions_func_i.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - i -

    -
    - - - - diff --git a/docs/build/html/functions_func_j.html b/docs/build/html/functions_func_j.html deleted file mode 100644 index 4035038f7..000000000 --- a/docs/build/html/functions_func_j.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - j -

    -
    - - - - diff --git a/docs/build/html/functions_func_k.html b/docs/build/html/functions_func_k.html deleted file mode 100644 index bbf9f740f..000000000 --- a/docs/build/html/functions_func_k.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - k -

    -
    - - - - diff --git a/docs/build/html/functions_func_l.html b/docs/build/html/functions_func_l.html deleted file mode 100644 index b8e6366cb..000000000 --- a/docs/build/html/functions_func_l.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - l -

    -
    - - - - diff --git a/docs/build/html/functions_func_m.html b/docs/build/html/functions_func_m.html deleted file mode 100644 index ef4582aef..000000000 --- a/docs/build/html/functions_func_m.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_func_n.html b/docs/build/html/functions_func_n.html deleted file mode 100644 index e451ba710..000000000 --- a/docs/build/html/functions_func_n.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_func_o.html b/docs/build/html/functions_func_o.html deleted file mode 100644 index 11ebe5439..000000000 --- a/docs/build/html/functions_func_o.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - o -

    -
    - - - - diff --git a/docs/build/html/functions_func_p.html b/docs/build/html/functions_func_p.html deleted file mode 100644 index 10f625b26..000000000 --- a/docs/build/html/functions_func_p.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - p -

    -
    - - - - diff --git a/docs/build/html/functions_func_q.html b/docs/build/html/functions_func_q.html deleted file mode 100644 index d79f8c35e..000000000 --- a/docs/build/html/functions_func_q.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - q -

    -
    - - - - diff --git a/docs/build/html/functions_func_r.html b/docs/build/html/functions_func_r.html deleted file mode 100644 index 2634f8d8b..000000000 --- a/docs/build/html/functions_func_r.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_func_s.html b/docs/build/html/functions_func_s.html deleted file mode 100644 index 74c9394a1..000000000 --- a/docs/build/html/functions_func_s.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - s -

    -
    - - - - diff --git a/docs/build/html/functions_func_t.html b/docs/build/html/functions_func_t.html deleted file mode 100644 index 79e1a2b1e..000000000 --- a/docs/build/html/functions_func_t.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - t -

    -
    - - - - diff --git a/docs/build/html/functions_func_u.html b/docs/build/html/functions_func_u.html deleted file mode 100644 index 64ed44868..000000000 --- a/docs/build/html/functions_func_u.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - u -

    -
    - - - - diff --git a/docs/build/html/functions_func_v.html b/docs/build/html/functions_func_v.html deleted file mode 100644 index a92f0fcde..000000000 --- a/docs/build/html/functions_func_v.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - v -

    -
    - - - - diff --git a/docs/build/html/functions_func_w.html b/docs/build/html/functions_func_w.html deleted file mode 100644 index ba90ff09f..000000000 --- a/docs/build/html/functions_func_w.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - w -

    -
    - - - - diff --git a/docs/build/html/functions_func_~.html b/docs/build/html/functions_func_~.html deleted file mode 100644 index 252b90689..000000000 --- a/docs/build/html/functions_func_~.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -MLX: Class Members - Functions - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all functions with links to the classes they belong to:
    - -

    - ~ -

    -
    - - - - diff --git a/docs/build/html/functions_g.html b/docs/build/html/functions_g.html deleted file mode 100644 index 57f2466f6..000000000 --- a/docs/build/html/functions_g.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - g -

    -
    - - - - diff --git a/docs/build/html/functions_h.html b/docs/build/html/functions_h.html deleted file mode 100644 index eb2c2b455..000000000 --- a/docs/build/html/functions_h.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - h -

    -
    - - - - diff --git a/docs/build/html/functions_i.html b/docs/build/html/functions_i.html deleted file mode 100644 index 7d601d7ba..000000000 --- a/docs/build/html/functions_i.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - i -

    -
    - - - - diff --git a/docs/build/html/functions_j.html b/docs/build/html/functions_j.html deleted file mode 100644 index 8657cd14e..000000000 --- a/docs/build/html/functions_j.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - j -

    -
    - - - - diff --git a/docs/build/html/functions_k.html b/docs/build/html/functions_k.html deleted file mode 100644 index 41cb6fb13..000000000 --- a/docs/build/html/functions_k.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - k -

    -
    - - - - diff --git a/docs/build/html/functions_l.html b/docs/build/html/functions_l.html deleted file mode 100644 index 95342f33c..000000000 --- a/docs/build/html/functions_l.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - l -

    -
    - - - - diff --git a/docs/build/html/functions_m.html b/docs/build/html/functions_m.html deleted file mode 100644 index 5cf76dc3a..000000000 --- a/docs/build/html/functions_m.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - m -

    -
    - - - - diff --git a/docs/build/html/functions_n.html b/docs/build/html/functions_n.html deleted file mode 100644 index 3b59f101c..000000000 --- a/docs/build/html/functions_n.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - n -

    -
    - - - - diff --git a/docs/build/html/functions_o.html b/docs/build/html/functions_o.html deleted file mode 100644 index 1bb371114..000000000 --- a/docs/build/html/functions_o.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - o -

    -
    - - - - diff --git a/docs/build/html/functions_p.html b/docs/build/html/functions_p.html deleted file mode 100644 index d581b8645..000000000 --- a/docs/build/html/functions_p.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - p -

    -
    - - - - diff --git a/docs/build/html/functions_q.html b/docs/build/html/functions_q.html deleted file mode 100644 index 9713f824a..000000000 --- a/docs/build/html/functions_q.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - q -

    -
    - - - - diff --git a/docs/build/html/functions_r.html b/docs/build/html/functions_r.html deleted file mode 100644 index f8bad233d..000000000 --- a/docs/build/html/functions_r.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - r -

    -
    - - - - diff --git a/docs/build/html/functions_rela.html b/docs/build/html/functions_rela.html deleted file mode 100644 index 5ee5a394e..000000000 --- a/docs/build/html/functions_rela.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -MLX: Class Members - Related Symbols - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all related symbols with links to the classes they belong to:
    -
    - - - - diff --git a/docs/build/html/functions_s.html b/docs/build/html/functions_s.html deleted file mode 100644 index ca77a29f8..000000000 --- a/docs/build/html/functions_s.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - s -

    -
    - - - - diff --git a/docs/build/html/functions_t.html b/docs/build/html/functions_t.html deleted file mode 100644 index f0e8fd5b0..000000000 --- a/docs/build/html/functions_t.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - t -

    -
    - - - - diff --git a/docs/build/html/functions_type.html b/docs/build/html/functions_type.html deleted file mode 100644 index 1cad563b2..000000000 --- a/docs/build/html/functions_type.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -MLX: Class Members - Typedefs - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_u.html b/docs/build/html/functions_u.html deleted file mode 100644 index e5658d9e7..000000000 --- a/docs/build/html/functions_u.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - u -

    -
    - - - - diff --git a/docs/build/html/functions_v.html b/docs/build/html/functions_v.html deleted file mode 100644 index 801da911d..000000000 --- a/docs/build/html/functions_v.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - v -

    -
    - - - - diff --git a/docs/build/html/functions_vars.html b/docs/build/html/functions_vars.html deleted file mode 100644 index 6f1f49043..000000000 --- a/docs/build/html/functions_vars.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_vars_b.html b/docs/build/html/functions_vars_b.html deleted file mode 100644 index fd350dcb9..000000000 --- a/docs/build/html/functions_vars_b.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all variables with links to the classes they belong to:
    - -

    - b -

    -
    - - - - diff --git a/docs/build/html/functions_vars_c.html b/docs/build/html/functions_vars_c.html deleted file mode 100644 index f913fd469..000000000 --- a/docs/build/html/functions_vars_c.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all variables with links to the classes they belong to:
    - -

    - c -

    -
    - - - - diff --git a/docs/build/html/functions_vars_d.html b/docs/build/html/functions_vars_d.html deleted file mode 100644 index 36262dfca..000000000 --- a/docs/build/html/functions_vars_d.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all variables with links to the classes they belong to:
    - -

    - d -

    -
    - - - - diff --git a/docs/build/html/functions_vars_e.html b/docs/build/html/functions_vars_e.html deleted file mode 100644 index 537f4cb7d..000000000 --- a/docs/build/html/functions_vars_e.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all variables with links to the classes they belong to:
    - -

    - e -

    -
    - - - - diff --git a/docs/build/html/functions_vars_f.html b/docs/build/html/functions_vars_f.html deleted file mode 100644 index f0af96b4f..000000000 --- a/docs/build/html/functions_vars_f.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_vars_g.html b/docs/build/html/functions_vars_g.html deleted file mode 100644 index d3d960373..000000000 --- a/docs/build/html/functions_vars_g.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_vars_i.html b/docs/build/html/functions_vars_i.html deleted file mode 100644 index 7ee5bfaed..000000000 --- a/docs/build/html/functions_vars_i.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all variables with links to the classes they belong to:
    - -

    - i -

    -
    - - - - diff --git a/docs/build/html/functions_vars_j.html b/docs/build/html/functions_vars_j.html deleted file mode 100644 index 774f1cfad..000000000 --- a/docs/build/html/functions_vars_j.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_vars_k.html b/docs/build/html/functions_vars_k.html deleted file mode 100644 index 4db2c8e39..000000000 --- a/docs/build/html/functions_vars_k.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all variables with links to the classes they belong to:
    - -

    - k -

    -
    - - - - diff --git a/docs/build/html/functions_vars_l.html b/docs/build/html/functions_vars_l.html deleted file mode 100644 index 91b5b1cb1..000000000 --- a/docs/build/html/functions_vars_l.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all variables with links to the classes they belong to:
    - -

    - l -

    -
    - - - - diff --git a/docs/build/html/functions_vars_m.html b/docs/build/html/functions_vars_m.html deleted file mode 100644 index da9140568..000000000 --- a/docs/build/html/functions_vars_m.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_vars_n.html b/docs/build/html/functions_vars_n.html deleted file mode 100644 index 74c90811f..000000000 --- a/docs/build/html/functions_vars_n.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_vars_o.html b/docs/build/html/functions_vars_o.html deleted file mode 100644 index 00bb1bcb3..000000000 --- a/docs/build/html/functions_vars_o.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all variables with links to the classes they belong to:
    - -

    - o -

    -
    - - - - diff --git a/docs/build/html/functions_vars_p.html b/docs/build/html/functions_vars_p.html deleted file mode 100644 index 9573a30f6..000000000 --- a/docs/build/html/functions_vars_p.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_vars_q.html b/docs/build/html/functions_vars_q.html deleted file mode 100644 index 33b60846e..000000000 --- a/docs/build/html/functions_vars_q.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all variables with links to the classes they belong to:
    - -

    - q -

    -
    - - - - diff --git a/docs/build/html/functions_vars_r.html b/docs/build/html/functions_vars_r.html deleted file mode 100644 index 3fb9ebca8..000000000 --- a/docs/build/html/functions_vars_r.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_vars_s.html b/docs/build/html/functions_vars_s.html deleted file mode 100644 index 0ed8cdf11..000000000 --- a/docs/build/html/functions_vars_s.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all variables with links to the classes they belong to:
    - -

    - s -

    -
    - - - - diff --git a/docs/build/html/functions_vars_t.html b/docs/build/html/functions_vars_t.html deleted file mode 100644 index 8cd202b1b..000000000 --- a/docs/build/html/functions_vars_t.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all variables with links to the classes they belong to:
    - -

    - t -

    -
    - - - - diff --git a/docs/build/html/functions_vars_v.html b/docs/build/html/functions_vars_v.html deleted file mode 100644 index 1cf883cbd..000000000 --- a/docs/build/html/functions_vars_v.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_vars_w.html b/docs/build/html/functions_vars_w.html deleted file mode 100644 index fa4aa9ba6..000000000 --- a/docs/build/html/functions_vars_w.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -MLX: Class Members - Variables - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_w.html b/docs/build/html/functions_w.html deleted file mode 100644 index 2327c2f6b..000000000 --- a/docs/build/html/functions_w.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - - - - - diff --git a/docs/build/html/functions_x.html b/docs/build/html/functions_x.html deleted file mode 100644 index 218b073bc..000000000 --- a/docs/build/html/functions_x.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - x -

    -
    - - - - diff --git a/docs/build/html/functions_~.html b/docs/build/html/functions_~.html deleted file mode 100644 index bd220692b..000000000 --- a/docs/build/html/functions_~.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -MLX: Class Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - ~ -

    -
    - - - - diff --git a/docs/build/html/gemm_2loader_8h.html b/docs/build/html/gemm_2loader_8h.html deleted file mode 100644 index 84cef43cd..000000000 --- a/docs/build/html/gemm_2loader_8h.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/gemm/loader.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    loader.h File Reference
    -
    - - - - - diff --git a/docs/build/html/gemm_2loader_8h_source.html b/docs/build/html/gemm_2loader_8h_source.html deleted file mode 100644 index 9ab5d6284..000000000 --- a/docs/build/html/gemm_2loader_8h_source.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/gemm/loader.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    loader.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    - -
    6
    -
    8// Loading helper
    -
    10
    -
    11namespace mlx {
    -
    12namespace steel {
    -
    13
    -
    14template <
    -
    15 typename T,
    -
    16 short BROWS,
    -
    17 short BCOLS,
    -
    18 short dst_ld,
    -
    19 short reduction_dim,
    -
    20 short tgp_size,
    -
    21 short alignment = 1,
    -
    22 short n_reads = (BCOLS * BROWS) / (tgp_size),
    -
    23 short TCOLS = BCOLS / n_reads,
    -
    24 short TROWS = tgp_size / TCOLS>
    -
    - -
    26 STEEL_CONST short n_rows = (BROWS + TROWS - 1) / TROWS;
    -
    27 STEEL_CONST short vec_size = n_reads;
    -
    28
    -
    29 // Leading dimension for src
    -
    30 const int src_ld;
    -
    31 const int tile_stride;
    -
    32
    -
    33 // Thread location indices
    -
    34 const short thread_idx;
    -
    35 const short bi;
    -
    36 const short bj;
    -
    37
    -
    38 // threadgroup and device memory
    -
    39 threadgroup T* dst;
    -
    40 const device T* src;
    -
    41
    -
    -
    42 struct alignas(alignment * sizeof(T)) ReadVector {
    -
    43 uint8_t v[sizeof(T) * vec_size];
    -
    44 };
    -
    -
    45
    -
    46 /* Constructor */
    -
    -
    47 METAL_FUNC BlockLoader(
    -
    48 const device T* src_,
    -
    49 const int src_ld_,
    -
    50 threadgroup T* dst_,
    -
    51 ushort simd_group_id [[simdgroup_index_in_threadgroup]],
    -
    52 ushort simd_lane_id [[thread_index_in_simdgroup]])
    -
    53 : src_ld(src_ld_),
    -
    54 tile_stride(reduction_dim ? BCOLS : BROWS * src_ld),
    -
    55 thread_idx(simd_group_id * 32 + simd_lane_id),
    -
    56 bi(thread_idx / TCOLS),
    -
    57 bj(vec_size * (thread_idx % TCOLS)),
    -
    58 dst(dst_ + bi * dst_ld + bj),
    -
    59 src(src_ + bi * src_ld + bj) {}
    -
    -
    60
    -
    61 /* Load from device memory into threadgroup memory - without bound checking */
    -
    -
    62 METAL_FUNC void load_unsafe() const {
    - -
    64 for (short i = 0; i < BROWS; i += TROWS) {
    -
    65 *((threadgroup ReadVector*)(&dst[i * dst_ld])) =
    -
    66 *((const device ReadVector*)(&src[i * src_ld]));
    -
    67 }
    -
    68 }
    -
    -
    69
    -
    70 /* Load from device memory into threadgroup memory - with bound checking */
    -
    -
    71 METAL_FUNC void load_safe(short2 src_tile_dim) const {
    -
    72 src_tile_dim = src_tile_dim - short2(bj, bi);
    -
    73
    -
    74 // Skip loading if thread has no valid reads
    -
    75 if (src_tile_dim.x <= 0 || src_tile_dim.y <= 0) {
    - -
    77 for (short i = 0; i < BROWS; i += TROWS) {
    - -
    79 for (short j = 0; j < vec_size; j++) {
    -
    80 dst[i * dst_ld + j] = T(0);
    -
    81 }
    -
    82 }
    -
    83 return;
    -
    84 }
    -
    85
    -
    86 // Use fast thread memory for bound checks
    -
    87 bool tmp_idx[vec_size];
    -
    88 T tmp_val[vec_size];
    -
    89
    - -
    91 for (short i = 0; i < BROWS; i += TROWS) {
    -
    92 // Make sure tmp_idx only contains valid indices
    - -
    94 for (short j = 0; j < vec_size; j++) {
    -
    95 tmp_idx[j] = (i < src_tile_dim.y) && (j < src_tile_dim.x);
    -
    96 }
    -
    97
    -
    98 // Read valid indices into tmp_val
    - -
    100 for (short j = 0; j < vec_size; j++) {
    -
    101 tmp_val[j] = src[(tmp_idx[j] ? i * src_ld + j : 0)];
    -
    102 }
    -
    103
    -
    104 // Zero out uneeded values
    - -
    106 for (short j = 0; j < vec_size; j++) {
    -
    107 tmp_val[j] = tmp_idx[j] ? tmp_val[j] : T(0);
    -
    108 }
    -
    109
    -
    110 // Copy values to threadgroup memory
    - -
    112 for (short j = 0; j < vec_size; j++) {
    -
    113 dst[i * dst_ld + j] = tmp_val[j];
    -
    114 }
    -
    115 }
    -
    116 }
    -
    -
    117
    -
    118 /* Iteration helper */
    -
    -
    119 METAL_FUNC void next() {
    -
    120 src += tile_stride;
    -
    121 }
    -
    -
    122};
    -
    -
    123
    -
    124} // namespace steel
    -
    125} // namespace mlx
    - -
    #define STEEL_PRAGMA_UNROLL
    Definition utils.h:8
    -
    #define STEEL_CONST
    Definition utils.h:7
    -
    Definition allocator.h:7
    - -
    uint8_t v[sizeof(T) *vec_size]
    Definition loader.h:43
    -
    Definition loader.h:25
    -
    const short thread_idx
    Definition loader.h:34
    -
    const device T * src
    Definition loader.h:40
    -
    METAL_FUNC BlockLoader(const device T *src_, const int src_ld_, threadgroup T *dst_, ushort simd_group_id, ushort simd_lane_id)
    Definition loader.h:47
    -
    STEEL_CONST short vec_size
    Definition loader.h:27
    -
    METAL_FUNC void next()
    Definition loader.h:119
    -
    METAL_FUNC void load_unsafe() const
    Definition loader.h:62
    -
    const short bj
    Definition loader.h:36
    -
    STEEL_CONST short n_rows
    Definition loader.h:26
    -
    const short bi
    Definition loader.h:35
    -
    const int src_ld
    Definition loader.h:30
    -
    const int tile_stride
    Definition loader.h:31
    -
    METAL_FUNC void load_safe(short2 src_tile_dim) const
    Definition loader.h:71
    -
    threadgroup T * dst
    Definition loader.h:39
    -
    - - - - diff --git a/docs/build/html/gemm_2params_8h.html b/docs/build/html/gemm_2params_8h.html deleted file mode 100644 index 5f1de1b1f..000000000 --- a/docs/build/html/gemm_2params_8h.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/gemm/params.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    params.h File Reference
    -
    -
    - -

    Go to the source code of this file.

    - - - - - - - - -

    -Classes

    struct  mlx::steel::GEMMParams
     
    struct  mlx::steel::GEMMSpiltKParams
     
    struct  mlx::steel::GEMMAddMMParams
     
    - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::steel
     
    -
    - - - - diff --git a/docs/build/html/gemm_2params_8h_source.html b/docs/build/html/gemm_2params_8h_source.html deleted file mode 100644 index 29f24fcc2..000000000 --- a/docs/build/html/gemm_2params_8h_source.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/gemm/params.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    params.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    6// GEMM param classes
    -
    8
    -
    9namespace mlx {
    -
    10namespace steel {
    -
    11
    -
    -
    12struct GEMMParams {
    -
    13 const int M;
    -
    14 const int N;
    -
    15 const int K;
    -
    16
    -
    17 const int lda;
    -
    18 const int ldb;
    -
    19 const int ldd;
    -
    20
    -
    21 const int tiles_n;
    -
    22 const int tiles_m;
    -
    23
    -
    24 const size_t batch_stride_a;
    -
    25 const size_t batch_stride_b;
    -
    26 const size_t batch_stride_d;
    -
    27
    -
    28 const int swizzle_log;
    - -
    30
    -
    31 const int batch_ndim;
    -
    32};
    -
    -
    33
    -
    - -
    35 const int M;
    -
    36 const int N;
    -
    37 const int K;
    -
    38
    -
    39 const int lda;
    -
    40 const int ldb;
    -
    41 const int ldc;
    -
    42
    -
    43 const int tiles_n;
    -
    44 const int tiles_m;
    -
    45
    - - - -
    49
    - -
    51};
    -
    -
    52
    -
    - -
    54 const int ldc;
    -
    55 const int fdc;
    -
    56
    -
    57 const size_t batch_stride_c;
    -
    58
    -
    59 const float alpha;
    -
    60 const float beta;
    -
    61};
    -
    -
    62
    -
    63} // namespace steel
    -
    64} // namespace mlx
    -
    Definition allocator.h:7
    -
    Definition params.h:53
    -
    const int fdc
    Definition params.h:55
    -
    const size_t batch_stride_c
    Definition params.h:57
    -
    const int ldc
    Definition params.h:54
    -
    const float beta
    Definition params.h:60
    -
    const float alpha
    Definition params.h:59
    -
    Definition params.h:12
    -
    const int gemm_k_iterations_aligned
    Definition params.h:29
    -
    const int tiles_n
    Definition params.h:21
    -
    const int N
    Definition params.h:14
    -
    const int ldb
    Definition params.h:18
    -
    const int batch_ndim
    Definition params.h:31
    -
    const int ldd
    Definition params.h:19
    -
    const size_t batch_stride_a
    Definition params.h:24
    -
    const int M
    Definition params.h:13
    -
    const size_t batch_stride_b
    Definition params.h:25
    -
    const int K
    Definition params.h:15
    -
    const int tiles_m
    Definition params.h:22
    -
    const size_t batch_stride_d
    Definition params.h:26
    -
    const int swizzle_log
    Definition params.h:28
    -
    const int lda
    Definition params.h:17
    -
    Definition params.h:34
    -
    const int tiles_m
    Definition params.h:44
    -
    const int N
    Definition params.h:36
    -
    const int split_k_partition_stride
    Definition params.h:47
    -
    const int K
    Definition params.h:37
    -
    const int tiles_n
    Definition params.h:43
    -
    const int lda
    Definition params.h:39
    -
    const int ldb
    Definition params.h:40
    -
    const int ldc
    Definition params.h:41
    -
    const int M
    Definition params.h:35
    -
    const int split_k_partition_size
    Definition params.h:48
    -
    const int gemm_k_iterations_aligned
    Definition params.h:50
    -
    const int split_k_partitions
    Definition params.h:46
    -
    - - - - diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index 3b58c2384..88b5ac374 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -7,7 +7,7 @@ - Index — MLX 0.13.1 documentation + Index — MLX 0.14.0 documentation @@ -35,7 +35,7 @@ - + @@ -128,8 +128,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -268,7 +268,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -302,6 +301,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -382,6 +383,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • @@ -1264,6 +1266,10 @@ document.write(` + + +

    MLX_BUILD_GGUF

    ON

    MLX_METAL_JIT

    OFF

    @@ -997,11 +1002,19 @@ GGUF, you can do:

    cmake ..
       -DCMAKE_BUILD_TYPE=MinSizeRel \
       -DBUILD_SHARED_LIBS=ON \
    -  -DMLX_BUILD_CPU=ON \
    +  -DMLX_BUILD_CPU=OFF \
       -DMLX_BUILD_SAFETENSORS=OFF \
    -  -DMLX_BUILD_GGUF=OFF
    +  -DMLX_BUILD_GGUF=OFF \
    +  -DMLX_METAL_JIT=ON
     
    +

    THE MLX_METAL_JIT flag minimizes the size of the MLX Metal library which +contains pre-built GPU kernels. This substantially reduces the size of the +Metal library by run-time compiling kernels the first time they are used in MLX +on a given machine. Note run-time compilation incurs a cold-start cost which can +be anwywhere from a few hundred millisecond to a few seconds depending on the +application. Once a kernel is compiled, it will be cached by the system. The +Metal kernel cache persists accross reboots.

    diff --git a/docs/build/html/io_8h.html b/docs/build/html/io_8h.html deleted file mode 100644 index 13ee93edc..000000000 --- a/docs/build/html/io_8h.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - -MLX: mlx/io.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    io.h File Reference
    -
    -
    -
    #include <variant>
    -#include "mlx/array.h"
    -#include "mlx/io/load.h"
    -#include "mlx/stream.h"
    -#include "mlx/utils.h"
    -
    -

    Go to the source code of this file.

    - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    - - - - - - - -

    -Typedefs

    using mlx::core::GGUFMetaData
     
    using mlx::core::GGUFLoad
     
    using mlx::core::SafetensorsLoad
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    void mlx::core::save (std::shared_ptr< io::Writer > out_stream, array a)
     Save array to out stream in .npy format.
     
    void mlx::core::save (std::string file, array a)
     Save array to file in .npy format.
     
    array mlx::core::load (std::shared_ptr< io::Reader > in_stream, StreamOrDevice s={})
     Load array from reader in .npy format.
     
    array mlx::core::load (std::string file, StreamOrDevice s={})
     Load array from file in .npy format.
     
    SafetensorsLoad mlx::core::load_safetensors (std::shared_ptr< io::Reader > in_stream, StreamOrDevice s={})
     Load array map from .safetensors file format.
     
    SafetensorsLoad mlx::core::load_safetensors (const std::string &file, StreamOrDevice s={})
     
    void mlx::core::save_safetensors (std::shared_ptr< io::Writer > in_stream, std::unordered_map< std::string, array >, std::unordered_map< std::string, std::string > metadata={})
     
    void mlx::core::save_safetensors (std::string file, std::unordered_map< std::string, array >, std::unordered_map< std::string, std::string > metadata={})
     
    GGUFLoad mlx::core::load_gguf (const std::string &file, StreamOrDevice s={})
     Load array map and metadata from .gguf file format.
     
    void mlx::core::save_gguf (std::string file, std::unordered_map< std::string, array > array_map, std::unordered_map< std::string, GGUFMetaData > meta_data={})
     
    -
    - - - - diff --git a/docs/build/html/io_8h_source.html b/docs/build/html/io_8h_source.html deleted file mode 100644 index b36258f10..000000000 --- a/docs/build/html/io_8h_source.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - -MLX: mlx/io.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    io.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <variant>
    -
    6
    -
    7#include "mlx/array.h"
    -
    8#include "mlx/io/load.h"
    -
    9#include "mlx/stream.h"
    -
    10#include "mlx/utils.h"
    -
    11
    -
    12namespace mlx::core {
    - -
    14 std::variant<std::monostate, array, std::string, std::vector<std::string>>;
    -
    15using GGUFLoad = std::pair<
    -
    16 std::unordered_map<std::string, array>,
    -
    17 std::unordered_map<std::string, GGUFMetaData>>;
    -
    18using SafetensorsLoad = std::pair<
    -
    19 std::unordered_map<std::string, array>,
    -
    20 std::unordered_map<std::string, std::string>>;
    -
    21
    -
    23void save(std::shared_ptr<io::Writer> out_stream, array a);
    -
    24
    -
    26void save(std::string file, array a);
    -
    27
    -
    29array load(std::shared_ptr<io::Reader> in_stream, StreamOrDevice s = {});
    -
    30
    -
    32array load(std::string file, StreamOrDevice s = {});
    -
    33
    - -
    36 std::shared_ptr<io::Reader> in_stream,
    -
    37 StreamOrDevice s = {});
    - -
    39 const std::string& file,
    -
    40 StreamOrDevice s = {});
    -
    41
    - -
    43 std::shared_ptr<io::Writer> in_stream,
    -
    44 std::unordered_map<std::string, array>,
    -
    45 std::unordered_map<std::string, std::string> metadata = {});
    - -
    47 std::string file,
    -
    48 std::unordered_map<std::string, array>,
    -
    49 std::unordered_map<std::string, std::string> metadata = {});
    -
    50
    -
    53GGUFLoad load_gguf(const std::string& file, StreamOrDevice s = {});
    -
    54
    - -
    56 std::string file,
    -
    57 std::unordered_map<std::string, array> array_map,
    -
    58 std::unordered_map<std::string, GGUFMetaData> meta_data = {});
    -
    59
    -
    60} // namespace mlx::core
    - -
    Definition array.h:20
    - -
    Definition allocator.h:7
    -
    GGUFLoad load_gguf(const std::string &file, StreamOrDevice s={})
    Load array map and metadata from .gguf file format.
    -
    std::pair< std::unordered_map< std::string, array >, std::unordered_map< std::string, std::string > > SafetensorsLoad
    Definition io.h:18
    -
    void save_gguf(std::string file, std::unordered_map< std::string, array > array_map, std::unordered_map< std::string, GGUFMetaData > meta_data={})
    -
    std::variant< std::monostate, array, std::string, std::vector< std::string > > GGUFMetaData
    Definition io.h:13
    -
    std::variant< std::monostate, Stream, Device > StreamOrDevice
    Definition utils.h:14
    -
    SafetensorsLoad load_safetensors(std::shared_ptr< io::Reader > in_stream, StreamOrDevice s={})
    Load array map from .safetensors file format.
    -
    void save_safetensors(std::shared_ptr< io::Writer > in_stream, std::unordered_map< std::string, array >, std::unordered_map< std::string, std::string > metadata={})
    -
    std::pair< std::unordered_map< std::string, array >, std::unordered_map< std::string, GGUFMetaData > > GGUFLoad
    Definition io.h:15
    -
    array load(std::shared_ptr< io::Reader > in_stream, StreamOrDevice s={})
    Load array from reader in .npy format.
    -
    void save(std::shared_ptr< io::Writer > out_stream, array a)
    Save array to out stream in .npy format.
    - - -
    - - - - diff --git a/docs/build/html/jquery.js b/docs/build/html/jquery.js deleted file mode 100644 index 1dffb65b5..000000000 --- a/docs/build/html/jquery.js +++ /dev/null @@ -1,34 +0,0 @@ -/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=y.widget.extend({},this.options[t]),n=0;n
    "),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e,function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 - * http://www.smartmenus.org/ - * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
    ').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/docs/build/html/kernels_2steel_2gemm_2gemm_8h.html b/docs/build/html/kernels_2steel_2gemm_2gemm_8h.html deleted file mode 100644 index c87050416..000000000 --- a/docs/build/html/kernels_2steel_2gemm_2gemm_8h.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/gemm/gemm.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    gemm.h File Reference
    -
    - - - - - diff --git a/docs/build/html/kernels_2steel_2gemm_2gemm_8h_source.html b/docs/build/html/kernels_2steel_2gemm_2gemm_8h_source.html deleted file mode 100644 index 4c7b304c7..000000000 --- a/docs/build/html/kernels_2steel_2gemm_2gemm_8h_source.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/gemm/gemm.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    gemm.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    - - - - - -
    10
    -
    11using namespace metal;
    -
    12
    -
    14// GEMM kernel class
    -
    16
    -
    17namespace mlx {
    -
    18namespace steel {
    -
    19
    -
    20template <bool M_aligned, bool N_aligned, bool K_aligned>
    -
    21struct LoopAlignment {};
    -
    22
    -
    23template <
    -
    24 typename T,
    -
    25 typename U,
    -
    26 int BM,
    -
    27 int BN,
    -
    28 int BK,
    -
    29 int WM,
    -
    30 int WN,
    -
    31 bool transpose_a,
    -
    32 bool transpose_b,
    -
    33 bool MN_aligned,
    -
    34 bool K_aligned,
    -
    35 typename AccumType = typename AccumHelper<T>::accum_type,
    -
    36 typename Epilogue = TransformNone<U, AccumType>>
    -
    -
    37struct GEMMKernel {
    -
    38 STEEL_CONST short tgp_padding_a = 16 / sizeof(T);
    -
    39 STEEL_CONST short tgp_padding_b = 16 / sizeof(T);
    - -
    41 transpose_a ? BK * (BM + tgp_padding_a) : BM * (BK + tgp_padding_a);
    - -
    43 transpose_b ? BN * (BK + tgp_padding_b) : BK * (BN + tgp_padding_b);
    - -
    45
    -
    46 STEEL_CONST short tgp_size = WM * WN * 32;
    -
    47
    - -
    49 T,
    -
    50 transpose_a ? BK : BM,
    -
    51 transpose_a ? BM : BK,
    -
    52 transpose_a ? BM + tgp_padding_a : BK + tgp_padding_a,
    -
    53 !transpose_a,
    -
    54 tgp_size>;
    - -
    56 T,
    -
    57 transpose_b ? BN : BK,
    -
    58 transpose_b ? BK : BN,
    -
    59 transpose_b ? BK + tgp_padding_b : BN + tgp_padding_b,
    -
    60 transpose_b,
    -
    61 tgp_size>;
    -
    62 using mma_t = BlockMMA<
    -
    63 T,
    -
    64 U,
    -
    65 BM,
    -
    66 BN,
    -
    67 BK,
    -
    68 WM,
    -
    69 WN,
    -
    70 transpose_a,
    -
    71 transpose_b,
    -
    72 transpose_a ? BM + tgp_padding_a : BK + tgp_padding_a,
    -
    73 transpose_b ? BK + tgp_padding_b : BN + tgp_padding_b,
    -
    74 AccumType,
    -
    75 Epilogue>;
    -
    76
    -
    77 /* Main kernel function */
    -
    78 template <bool M_aligned, bool N_aligned, bool K_aligned_>
    -
    -
    79 static METAL_FUNC void gemm_loop(
    -
    80 threadgroup T* As [[threadgroup(0)]],
    -
    81 threadgroup T* Bs [[threadgroup(1)]],
    -
    82 const int gemm_k_iterations,
    -
    83 thread loader_a_t& loader_a,
    -
    84 thread loader_b_t& loader_b,
    -
    85 thread mma_t& mma_op,
    -
    86 thread const short& tgp_bm,
    -
    87 thread const short& tgp_bn,
    -
    88 thread const short& lbk,
    - -
    90 // Appease the compiler
    -
    91 (void)l;
    -
    92
    -
    93 short2 tile_dims_A = transpose_a ? short2(tgp_bm, BK) : short2(BK, tgp_bm);
    -
    94
    -
    95 short2 tile_dims_B = transpose_b ? short2(BK, tgp_bn) : short2(tgp_bn, BK);
    -
    96
    -
    97 for (int k = 0; k < gemm_k_iterations; k++) {
    -
    98 threadgroup_barrier(mem_flags::mem_threadgroup);
    -
    99 // Load elements into threadgroup
    -
    100 if (M_aligned) {
    -
    101 loader_a.load_unsafe();
    -
    102 } else {
    -
    103 loader_a.load_safe(tile_dims_A);
    -
    104 }
    -
    105
    -
    106 if (N_aligned) {
    -
    107 loader_b.load_unsafe();
    -
    108 } else {
    -
    109 loader_b.load_safe(tile_dims_B);
    -
    110 }
    -
    111
    -
    112 threadgroup_barrier(mem_flags::mem_threadgroup);
    -
    113
    -
    114 // Multiply and accumulate threadgroup elements
    -
    115 mma_op.mma(As, Bs);
    -
    116
    -
    117 // Prepare for next iteration
    -
    118 loader_a.next();
    -
    119 loader_b.next();
    -
    120 }
    -
    121
    -
    122 if (!K_aligned_) {
    -
    123 threadgroup_barrier(mem_flags::mem_threadgroup);
    -
    124
    -
    125 short2 tile_dims_A_last =
    -
    126 transpose_a ? short2(tgp_bm, lbk) : short2(lbk, tgp_bm);
    -
    127 short2 tile_dims_B_last =
    -
    128 transpose_b ? short2(lbk, tgp_bn) : short2(tgp_bn, lbk);
    -
    129
    -
    130 loader_a.load_safe(tile_dims_A_last);
    -
    131 loader_b.load_safe(tile_dims_B_last);
    -
    132
    -
    133 threadgroup_barrier(mem_flags::mem_threadgroup);
    -
    134
    -
    135 mma_op.mma(As, Bs);
    -
    136 }
    -
    137 }
    -
    -
    138
    -
    139 /* Main kernel function */
    -
    -
    140 static METAL_FUNC void run(
    -
    141 const device T* A [[buffer(0)]],
    -
    142 const device T* B [[buffer(1)]],
    -
    143 device U* D [[buffer(2)]],
    -
    144 const constant GEMMParams* params [[buffer(3)]],
    -
    145 threadgroup T* As [[threadgroup(0)]],
    -
    146 threadgroup T* Bs [[threadgroup(1)]],
    -
    147 uint simd_lane_id [[thread_index_in_simdgroup]],
    -
    148 uint simd_group_id [[simdgroup_index_in_threadgroup]],
    -
    149 uint3 tid [[threadgroup_position_in_grid]],
    -
    150 uint3 lid [[thread_position_in_threadgroup]]) {
    -
    151 // Pacifying compiler
    -
    152 (void)lid;
    -
    153
    -
    154 const int tid_y = ((tid.y) << params->swizzle_log) +
    -
    155 ((tid.x) & ((1 << params->swizzle_log) - 1));
    -
    156 const int tid_x = (tid.x) >> params->swizzle_log;
    -
    157
    -
    158 if (params->tiles_n <= tid_x || params->tiles_m <= tid_y) {
    -
    159 return;
    -
    160 }
    -
    161
    -
    162 threadgroup_barrier(mem_flags::mem_none);
    -
    163
    -
    164 // Find block in A, B, C
    -
    165 const int c_row = tid_y * BM;
    -
    166 const int c_col = tid_x * BN;
    -
    167 const size_t c_row_long = size_t(c_row);
    -
    168 const size_t c_col_long = size_t(c_col);
    -
    169
    -
    170 A += transpose_a ? c_row_long : c_row_long * params->lda;
    -
    171 B += transpose_b ? c_col_long * params->ldb : c_col_long;
    -
    172 D += c_row_long * params->ldd + c_col_long;
    -
    173
    -
    174 // Prepare threadgroup loading operations
    -
    175 thread loader_a_t loader_a(A, params->lda, As, simd_group_id, simd_lane_id);
    -
    176 thread loader_b_t loader_b(B, params->ldb, Bs, simd_group_id, simd_lane_id);
    -
    177
    -
    178 // Prepare threadgroup mma operation
    -
    179 thread mma_t mma_op(simd_group_id, simd_lane_id);
    -
    180
    -
    181 int gemm_k_iterations = params->gemm_k_iterations_aligned;
    -
    182
    -
    184 // MNK aligned loop
    -
    185 if (MN_aligned) {
    -
    186 for (int k = 0; k < gemm_k_iterations; k++) {
    -
    187 threadgroup_barrier(mem_flags::mem_threadgroup);
    -
    188 // Load elements into threadgroup
    -
    189 loader_a.load_unsafe();
    -
    190 loader_b.load_unsafe();
    -
    191
    -
    192 threadgroup_barrier(mem_flags::mem_threadgroup);
    -
    193
    -
    194 // Multiply and accumulate threadgroup elements
    -
    195 mma_op.mma(As, Bs);
    -
    196
    -
    197 // Prepare for next iteration
    -
    198 loader_a.next();
    -
    199 loader_b.next();
    -
    200 }
    -
    201
    -
    202 threadgroup_barrier(mem_flags::mem_none);
    -
    203
    -
    204 // Loop tail
    -
    205 if (!K_aligned) {
    -
    206 int lbk = params->K - params->gemm_k_iterations_aligned * BK;
    -
    207 short2 tile_dims_A = transpose_a ? short2(BM, lbk) : short2(lbk, BM);
    -
    208 short2 tile_dims_B = transpose_b ? short2(lbk, BN) : short2(BN, lbk);
    -
    209
    -
    210 loader_a.load_safe(tile_dims_A);
    -
    211 loader_b.load_safe(tile_dims_B);
    -
    212
    -
    213 threadgroup_barrier(mem_flags::mem_threadgroup);
    -
    214
    -
    215 mma_op.mma(As, Bs);
    -
    216 }
    -
    217
    -
    218 // Store results to device memory
    -
    219 mma_op.store_result(D, params->ldd);
    -
    220 return;
    -
    221
    -
    222 }
    -
    224 // MN unaligned loop
    -
    225 else { // Loop over K - unaligned case
    -
    226 short tgp_bm = min(BM, params->M - c_row);
    -
    227 short tgp_bn = min(BN, params->N - c_col);
    -
    228 short leftover_bk = params->K - params->gemm_k_iterations_aligned * BK;
    -
    229
    -
    230 if (tgp_bm == BM && tgp_bn == BN) {
    -
    231 gemm_loop<true, true, K_aligned>(
    -
    232 As,
    -
    233 Bs,
    -
    234 gemm_k_iterations,
    -
    235 loader_a,
    -
    236 loader_b,
    -
    237 mma_op,
    -
    238 tgp_bm,
    -
    239 tgp_bn,
    -
    240 leftover_bk);
    -
    241
    -
    242 mma_op.store_result(D, params->ldd);
    -
    243 return;
    -
    244
    -
    245 } else if (tgp_bn == BN) {
    -
    246 gemm_loop<false, true, K_aligned>(
    -
    247 As,
    -
    248 Bs,
    -
    249 gemm_k_iterations,
    -
    250 loader_a,
    -
    251 loader_b,
    -
    252 mma_op,
    -
    253 tgp_bm,
    -
    254 tgp_bn,
    -
    255 leftover_bk);
    -
    256
    -
    257 mma_op.store_result_safe(D, params->ldd, short2(tgp_bn, tgp_bm));
    -
    258 return;
    -
    259
    -
    260 } else if (tgp_bm == BM) {
    -
    261 gemm_loop<true, false, K_aligned>(
    -
    262 As,
    -
    263 Bs,
    -
    264 gemm_k_iterations,
    -
    265 loader_a,
    -
    266 loader_b,
    -
    267 mma_op,
    -
    268 tgp_bm,
    -
    269 tgp_bn,
    -
    270 leftover_bk);
    -
    271
    -
    272 mma_op.store_result_safe(D, params->ldd, short2(tgp_bn, tgp_bm));
    -
    273 return;
    -
    274
    -
    275 } else {
    -
    276 gemm_loop<false, false, K_aligned>(
    -
    277 As,
    -
    278 Bs,
    -
    279 gemm_k_iterations,
    -
    280 loader_a,
    -
    281 loader_b,
    -
    282 mma_op,
    -
    283 tgp_bm,
    -
    284 tgp_bn,
    -
    285 leftover_bk);
    -
    286
    -
    287 mma_op.store_result_safe(D, params->ldd, short2(tgp_bn, tgp_bm));
    -
    288 return;
    -
    289 }
    -
    290 }
    -
    291 }
    -
    -
    292};
    -
    -
    293
    -
    294} // namespace steel
    -
    295} // namespace mlx
    - - -
    #define STEEL_CONST
    Definition utils.h:7
    - - - -
    Definition bf16.h:265
    -
    METAL_FUNC bfloat16_t min(bfloat16_t x, bfloat16_t y)
    Definition bf16_math.h:234
    -
    Definition allocator.h:7
    -
    float accum_type
    Definition transforms.h:57
    -
    Definition loader.h:25
    -
    Definition mma.h:35
    -
    Definition gemm.h:37
    -
    static METAL_FUNC void run(const device T *A, const device T *B, device U *D, const constant GEMMParams *params, threadgroup T *As, threadgroup T *Bs, uint simd_lane_id, uint simd_group_id, uint3 tid, uint3 lid)
    Definition gemm.h:140
    -
    STEEL_CONST short tgp_mem_size_b
    Definition gemm.h:42
    -
    STEEL_CONST short tgp_mem_size
    Definition gemm.h:44
    -
    static METAL_FUNC void gemm_loop(threadgroup T *As, threadgroup T *Bs, const int gemm_k_iterations, thread loader_a_t &loader_a, thread loader_b_t &loader_b, thread mma_t &mma_op, thread const short &tgp_bm, thread const short &tgp_bn, thread const short &lbk, LoopAlignment< M_aligned, N_aligned, K_aligned_ > l={})
    Definition gemm.h:79
    -
    STEEL_CONST short tgp_size
    Definition gemm.h:46
    -
    STEEL_CONST short tgp_mem_size_a
    Definition gemm.h:40
    -
    STEEL_CONST short tgp_padding_b
    Definition gemm.h:39
    -
    STEEL_CONST short tgp_padding_a
    Definition gemm.h:38
    -
    Definition params.h:12
    -
    Definition gemm.h:21
    -
    Definition transforms.h:15
    -
    - - - - diff --git a/docs/build/html/lapack__helper_8h.html b/docs/build/html/lapack__helper_8h.html deleted file mode 100644 index 063c81e69..000000000 --- a/docs/build/html/lapack__helper_8h.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/lapack_helper.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    lapack_helper.h File Reference
    -
    -
    -
    #include <lapack.h>
    -
    -

    Go to the source code of this file.

    - - - - -

    -Macros

    #define MLX_LAPACK_FUNC(f)   f##_
     
    -

    Macro Definition Documentation

    - -

    ◆ MLX_LAPACK_FUNC

    - -
    -
    - - - - - - - -
    #define MLX_LAPACK_FUNC( f)   f##_
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/lapack__helper_8h_source.html b/docs/build/html/lapack__helper_8h_source.html deleted file mode 100644 index 255f5b65d..000000000 --- a/docs/build/html/lapack__helper_8h_source.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: mlx/backend/common/lapack_helper.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    lapack_helper.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#ifdef ACCELERATE_NEW_LAPACK
    -
    6#include <Accelerate/Accelerate.h>
    -
    7#else
    -
    8#include <lapack.h>
    -
    9#endif
    -
    10
    -
    11#if defined(LAPACK_GLOBAL) || defined(LAPACK_NAME)
    -
    12
    -
    13// This is to work around a change in the function signatures of lapack >= 3.9.1
    -
    14// where functions taking char* also include a strlen argument, see a similar
    -
    15// change in OpenCV:
    -
    16// https://github.com/opencv/opencv/blob/1eb061f89de0fb85c4c75a2deeb0f61a961a63ad/cmake/OpenCVFindLAPACK.cmake#L57
    -
    17#define MLX_LAPACK_FUNC(f) LAPACK_##f
    -
    18
    -
    19#else
    -
    20
    -
    21#define MLX_LAPACK_FUNC(f) f##_
    -
    22
    -
    23#endif
    -
    - - - - diff --git a/docs/build/html/linalg_8h.html b/docs/build/html/linalg_8h.html deleted file mode 100644 index 10ab25b35..000000000 --- a/docs/build/html/linalg_8h.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - -MLX: mlx/linalg.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    linalg.h File Reference
    -
    -
    -
    #include <optional>
    -#include "mlx/array.h"
    -#include "mlx/device.h"
    -#include "mlx/ops.h"
    -#include "mlx/stream.h"
    -
    -

    Go to the source code of this file.

    - - - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    namespace  mlx::core::linalg
     
    - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    array mlx::core::linalg::norm (const array &a, const double ord, const std::optional< std::vector< int > > &axis=std::nullopt, bool keepdims=false, StreamOrDevice s={})
     Compute vector or matrix norms.
     
    array mlx::core::linalg::norm (const array &a, const double ord, int axis, bool keepdims=false, StreamOrDevice s={})
     
    array mlx::core::linalg::norm (const array &a, const std::string &ord, const std::optional< std::vector< int > > &axis=std::nullopt, bool keepdims=false, StreamOrDevice s={})
     
    array mlx::core::linalg::norm (const array &a, const std::string &ord, int axis, bool keepdims=false, StreamOrDevice s={})
     
    array mlx::core::linalg::norm (const array &a, const std::optional< std::vector< int > > &axis=std::nullopt, bool keepdims=false, StreamOrDevice s={})
     
    array mlx::core::linalg::norm (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     
    std::pair< array, arraymlx::core::linalg::qr (const array &a, StreamOrDevice s={})
     
    std::vector< arraymlx::core::linalg::svd (const array &a, StreamOrDevice s={})
     
    array mlx::core::linalg::inv (const array &a, StreamOrDevice s={})
     
    array mlx::core::linalg::cholesky (const array &a, bool upper=false, StreamOrDevice s={})
     
    -
    - - - - diff --git a/docs/build/html/linalg_8h_source.html b/docs/build/html/linalg_8h_source.html deleted file mode 100644 index bf88ac647..000000000 --- a/docs/build/html/linalg_8h_source.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - -MLX: mlx/linalg.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    linalg.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <optional>
    -
    6
    -
    7#include "mlx/array.h"
    -
    8#include "mlx/device.h"
    -
    9#include "mlx/ops.h"
    -
    10#include "mlx/stream.h"
    -
    11
    -
    - -
    13
    - -
    26 const array& a,
    -
    27 const double ord,
    -
    28 const std::optional<std::vector<int>>& axis = std::nullopt,
    -
    29 bool keepdims = false,
    -
    30 StreamOrDevice s = {});
    -
    -
    31inline array norm(
    -
    32 const array& a,
    -
    33 const double ord,
    -
    34 int axis,
    -
    35 bool keepdims = false,
    -
    36 StreamOrDevice s = {}) {
    -
    37 return norm(a, ord, std::vector<int>{axis}, keepdims, s);
    -
    38}
    -
    - -
    40 const array& a,
    -
    41 const std::string& ord,
    -
    42 const std::optional<std::vector<int>>& axis = std::nullopt,
    -
    43 bool keepdims = false,
    -
    44 StreamOrDevice s = {});
    -
    -
    45inline array norm(
    -
    46 const array& a,
    -
    47 const std::string& ord,
    -
    48 int axis,
    -
    49 bool keepdims = false,
    -
    50 StreamOrDevice s = {}) {
    -
    51 return norm(a, ord, std::vector<int>{axis}, keepdims, s);
    -
    52}
    -
    - -
    54 const array& a,
    -
    55 const std::optional<std::vector<int>>& axis = std::nullopt,
    -
    56 bool keepdims = false,
    -
    57 StreamOrDevice s = {});
    -
    58inline array
    -
    -
    59norm(const array& a, int axis, bool keepdims = false, StreamOrDevice s = {}) {
    -
    60 return norm(a, std::vector<int>{axis}, keepdims, s);
    -
    61}
    -
    -
    62
    -
    63std::pair<array, array> qr(const array& a, StreamOrDevice s = {});
    -
    64
    -
    65std::vector<array> svd(const array& a, StreamOrDevice s = {});
    -
    66
    -
    67array inv(const array& a, StreamOrDevice s = {});
    -
    68
    -
    69array cholesky(const array& a, bool upper = false, StreamOrDevice s = {});
    -
    70
    -
    71} // namespace mlx::core::linalg
    -
    - -
    Definition array.h:20
    - -
    Definition linalg.h:12
    -
    array cholesky(const array &a, bool upper=false, StreamOrDevice s={})
    -
    std::vector< array > svd(const array &a, StreamOrDevice s={})
    -
    array norm(const array &a, const double ord, const std::optional< std::vector< int > > &axis=std::nullopt, bool keepdims=false, StreamOrDevice s={})
    Compute vector or matrix norms.
    -
    array inv(const array &a, StreamOrDevice s={})
    -
    std::pair< array, array > qr(const array &a, StreamOrDevice s={})
    -
    std::variant< std::monostate, Stream, Device > StreamOrDevice
    Definition utils.h:14
    - - -
    - - - - diff --git a/docs/build/html/load_8h.html b/docs/build/html/load_8h.html deleted file mode 100644 index ea7767e57..000000000 --- a/docs/build/html/load_8h.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -MLX: mlx/io/load.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    load.h File Reference
    -
    -
    -
    #include <fstream>
    -#include <istream>
    -#include <memory>
    -
    -

    Go to the source code of this file.

    - - - - - - - - - - -

    -Classes

    class  mlx::core::io::Reader
     
    class  mlx::core::io::Writer
     
    class  mlx::core::io::FileReader
     
    class  mlx::core::io::FileWriter
     
    - - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    namespace  mlx::core::io
     
    -
    - - - - diff --git a/docs/build/html/load_8h_source.html b/docs/build/html/load_8h_source.html deleted file mode 100644 index 28c2c0eb9..000000000 --- a/docs/build/html/load_8h_source.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - -MLX: mlx/io/load.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    load.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <fstream>
    -
    6#include <istream>
    -
    7#include <memory>
    -
    8
    -
    9namespace mlx::core {
    -
    10
    -
    -
    11namespace io {
    -
    12
    -
    -
    13class Reader {
    -
    14 public:
    -
    15 virtual bool is_open() const = 0;
    -
    16 virtual bool good() const = 0;
    -
    17 virtual size_t tell() = 0; // tellp is non-const in iostream
    -
    18 virtual void seek(
    -
    19 int64_t off,
    -
    20 std::ios_base::seekdir way = std::ios_base::beg) = 0;
    -
    21 virtual void read(char* data, size_t n) = 0;
    -
    22 virtual std::string label() const = 0;
    -
    23};
    -
    -
    24
    -
    -
    25class Writer {
    -
    26 public:
    -
    27 virtual bool is_open() const = 0;
    -
    28 virtual bool good() const = 0;
    -
    29 virtual size_t tell() = 0;
    -
    30 virtual void seek(
    -
    31 int64_t off,
    -
    32 std::ios_base::seekdir way = std::ios_base::beg) = 0;
    -
    33 virtual void write(const char* data, size_t n) = 0;
    -
    34 virtual std::string label() const = 0;
    -
    35};
    -
    -
    36
    -
    -
    37class FileReader : public Reader {
    -
    38 public:
    -
    -
    39 explicit FileReader(std::ifstream is)
    -
    40 : is_(std::move(is)), label_("stream") {}
    -
    -
    -
    41 explicit FileReader(std::string file_path)
    -
    42 : is_(std::ifstream(file_path, std::ios::binary)),
    -
    43 label_(std::move(file_path)) {}
    -
    -
    44
    -
    -
    45 bool is_open() const override {
    -
    46 return is_.is_open();
    -
    47 }
    -
    -
    48
    -
    -
    49 bool good() const override {
    -
    50 return is_.good();
    -
    51 }
    -
    -
    52
    -
    -
    53 size_t tell() override {
    -
    54 return is_.tellg();
    -
    55 }
    -
    -
    56
    -
    -
    57 void seek(int64_t off, std::ios_base::seekdir way = std::ios_base::beg)
    -
    58 override {
    -
    59 is_.seekg(off, way);
    -
    60 }
    -
    -
    61
    -
    -
    62 void read(char* data, size_t n) override {
    -
    63 is_.read(data, n);
    -
    64 }
    -
    -
    65
    -
    -
    66 std::string label() const override {
    -
    67 return "file " + label_;
    -
    68 }
    -
    -
    69
    -
    70 private:
    -
    71 std::ifstream is_;
    -
    72 std::string label_;
    -
    73};
    -
    -
    74
    -
    -
    75class FileWriter : public Writer {
    -
    76 public:
    -
    -
    77 explicit FileWriter(std::ofstream os)
    -
    78 : os_(std::move(os)), label_("stream") {}
    -
    -
    -
    79 explicit FileWriter(std::string file_path)
    -
    80 : os_(std::ofstream(file_path, std::ios::binary)),
    -
    81 label_(std::move(file_path)) {}
    -
    -
    82
    -
    -
    83 bool is_open() const override {
    -
    84 return os_.is_open();
    -
    85 }
    -
    -
    86
    -
    -
    87 bool good() const override {
    -
    88 return os_.good();
    -
    89 }
    -
    -
    90
    -
    -
    91 size_t tell() override {
    -
    92 return os_.tellp();
    -
    93 }
    -
    -
    94
    -
    -
    95 void seek(int64_t off, std::ios_base::seekdir way = std::ios_base::beg)
    -
    96 override {
    -
    97 os_.seekp(off, way);
    -
    98 }
    -
    -
    99
    -
    -
    100 void write(const char* data, size_t n) override {
    -
    101 os_.write(data, n);
    -
    102 }
    -
    -
    103
    -
    -
    104 std::string label() const override {
    -
    105 return "file " + label_;
    -
    106 }
    -
    -
    107
    -
    108 private:
    -
    109 std::ofstream os_;
    -
    110 std::string label_;
    -
    111};
    -
    -
    112
    -
    113} // namespace io
    -
    -
    114} // namespace mlx::core
    -
    Definition load.h:37
    -
    bool good() const override
    Definition load.h:49
    -
    FileReader(std::ifstream is)
    Definition load.h:39
    -
    void read(char *data, size_t n) override
    Definition load.h:62
    -
    std::string label() const override
    Definition load.h:66
    -
    FileReader(std::string file_path)
    Definition load.h:41
    -
    bool is_open() const override
    Definition load.h:45
    -
    size_t tell() override
    Definition load.h:53
    -
    void seek(int64_t off, std::ios_base::seekdir way=std::ios_base::beg) override
    Definition load.h:57
    -
    Definition load.h:75
    -
    FileWriter(std::string file_path)
    Definition load.h:79
    -
    std::string label() const override
    Definition load.h:104
    -
    void seek(int64_t off, std::ios_base::seekdir way=std::ios_base::beg) override
    Definition load.h:95
    -
    bool good() const override
    Definition load.h:87
    -
    size_t tell() override
    Definition load.h:91
    -
    FileWriter(std::ofstream os)
    Definition load.h:77
    -
    void write(const char *data, size_t n) override
    Definition load.h:100
    -
    bool is_open() const override
    Definition load.h:83
    -
    Definition load.h:13
    -
    virtual bool good() const =0
    -
    virtual size_t tell()=0
    -
    virtual bool is_open() const =0
    -
    virtual std::string label() const =0
    -
    virtual void seek(int64_t off, std::ios_base::seekdir way=std::ios_base::beg)=0
    -
    virtual void read(char *data, size_t n)=0
    -
    Definition load.h:25
    -
    virtual bool good() const =0
    -
    virtual size_t tell()=0
    -
    virtual std::string label() const =0
    -
    virtual bool is_open() const =0
    -
    virtual void seek(int64_t off, std::ios_base::seekdir way=std::ios_base::beg)=0
    -
    virtual void write(const char *data, size_t n)=0
    -
    array std(const array &a, bool keepdims, int ddof=0, StreamOrDevice s={})
    Computes the standard deviation of the elements of an array.
    -
    Definition allocator.h:7
    -
    - - - - diff --git a/docs/build/html/loader__channel__l_8h.html b/docs/build/html/loader__channel__l_8h.html deleted file mode 100644 index 7f9a8d4d7..000000000 --- a/docs/build/html/loader__channel__l_8h.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/loaders/loader_channel_l.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    loader_channel_l.h File Reference
    -
    - - - - - diff --git a/docs/build/html/loader__channel__l_8h_source.html b/docs/build/html/loader__channel__l_8h_source.html deleted file mode 100644 index a7b9bddad..000000000 --- a/docs/build/html/loader__channel__l_8h_source.html +++ /dev/null @@ -1,653 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/loaders/loader_channel_l.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    loader_channel_l.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    - -
    6
    - -
    8
    -
    10// Loading helper
    -
    12
    -
    13namespace mlx {
    -
    -
    14namespace steel {
    -
    15
    -
    16template <
    -
    17 typename T,
    -
    18 short BM,
    -
    19 short BN,
    -
    20 short BK,
    -
    21 short tgp_size,
    -
    22 short tgp_padding = 0>
    -
    - -
    24 // Destination dimensions
    -
    25 STEEL_CONST short BROWS = BM;
    -
    26 STEEL_CONST short BCOLS = BK;
    -
    27
    -
    28 // Read dimensions
    -
    29 STEEL_CONST short dst_ld = BCOLS + tgp_padding;
    -
    30 STEEL_CONST short vec_size = tgp_size / (BROWS * BCOLS) >= 8 ? 8 : 4;
    -
    31
    -
    32 // Thread read shape
    - -
    34 STEEL_CONST short TROWS = tgp_size / TCOLS;
    -
    35
    -
    36 // Rows / strided reads within the block
    - -
    38
    -
    39 // Thread location indices
    -
    40 const short thread_idx;
    -
    41 const short bi;
    -
    42 const short bj;
    -
    43
    -
    44 // threadgroup and device memory
    -
    45 threadgroup T* dst;
    -
    46
    -
    47 const constant MLXConvParams<2>* params;
    - -
    49
    -
    50 short weight_h;
    -
    51 short weight_w;
    -
    52
    -
    53 const device T* src[n_rows];
    -
    54
    - - - -
    58
    -
    59 /* Constructor */
    -
    - -
    61 const device T* src_,
    -
    62 threadgroup T* dst_,
    -
    63 const int2 offsets,
    -
    64 const constant MLXConvParams<2>* params_,
    -
    65 const constant ImplicitGemmConv2DParams* gemm_params_,
    -
    66 uint simd_group_id [[simdgroup_index_in_threadgroup]],
    -
    67 uint simd_lane_id [[thread_index_in_simdgroup]])
    -
    68 : thread_idx(simd_group_id * 32 + simd_lane_id),
    - - -
    71 dst(dst_ + bi * dst_ld + bj),
    -
    72 params(params_),
    -
    73 gemm_params(gemm_params_),
    -
    74 weight_h(0),
    -
    75 weight_w(0) {
    -
    76 int out_n_pixels = params->oS[0] * params->oS[1];
    -
    77
    - -
    79 for (short i = 0; i < n_rows; ++i) {
    -
    80 int offset_nhw = offsets.y + bi + i * TROWS;
    -
    81 int n = offset_nhw / out_n_pixels;
    -
    82 int hw = offset_nhw % out_n_pixels;
    -
    83 int oh = hw / params->oS[1];
    -
    84 int ow = hw % params->oS[1];
    -
    85
    -
    86 int ih = oh * params->str[0] - params->pad[0];
    -
    87 int iw = ow * params->str[1] - params->pad[1];
    -
    88
    -
    89 read_n[i] = n;
    -
    90 read_ih[i] = ih;
    -
    91 read_iw[i] = iw;
    -
    92
    -
    93 // Adjust for flip
    -
    94 if (params->flip) {
    -
    95 ih += (params->wS[0] - 1) * params->kdil[0];
    -
    96 iw += (params->wS[1] - 1) * params->kdil[1];
    -
    97 }
    -
    98
    -
    99 // Read from input if in bounds
    -
    100 src[i] = src_ + n * params->in_strides[0] + ih * params->in_strides[1] +
    -
    101 iw * params->in_strides[2] + bj;
    -
    102 }
    -
    103 }
    -
    -
    104
    -
    105 /* Load from device memory into threadgroup memory - without bound checking */
    -
    -
    106 METAL_FUNC void load_unsafe() const {
    - -
    108 for (short i = 0, is = 0; i < n_rows; ++i, is += TROWS) {
    -
    109 // Find bounds
    -
    110 int n = read_n[i];
    -
    111 int ih = read_ih[i] + weight_h * params->kdil[0];
    -
    112 int iw = read_iw[i] + weight_w * params->kdil[1];
    -
    113
    -
    114 // Read from input if in bounds
    -
    115 if ((n < params->N) && (ih >= 0 && ih < params->iS[0]) &&
    -
    116 (iw >= 0 && iw < params->iS[1])) {
    - -
    118 for (short j = 0; j < vec_size; ++j) {
    -
    119 dst[is * dst_ld + j] = src[i][j];
    -
    120 }
    -
    121 }
    -
    122
    -
    123 // Zero pad otherwise
    -
    124 else {
    - -
    126 for (short j = 0; j < vec_size; ++j) {
    -
    127 dst[is * dst_ld + j] = T(0);
    -
    128 }
    -
    129 }
    -
    130 }
    -
    131 }
    -
    -
    132
    -
    133 /* Iteration helper */
    -
    -
    134 METAL_FUNC void next() {
    -
    135 if (++weight_w < params->wS[1]) {
    - -
    137 for (short i = 0; i < n_rows; i++) {
    - -
    139 }
    -
    140
    -
    141 return;
    -
    142 }
    -
    143
    -
    144 weight_w = 0;
    -
    145
    -
    146 if (++weight_h < params->wS[0]) {
    - -
    148 for (short i = 0; i < n_rows; i++) {
    - -
    150 }
    -
    151
    -
    152 return;
    -
    153 }
    -
    154
    -
    155 weight_h = 0;
    -
    156
    - -
    158 for (short i = 0; i < n_rows; i++) {
    - -
    160 }
    -
    161 }
    -
    -
    162};
    -
    -
    163
    -
    164template <
    -
    165 typename T,
    -
    166 short BM,
    -
    167 short BN,
    -
    168 short BK,
    -
    169 short tgp_size,
    -
    170 short tgp_padding = 0>
    -
    - -
    172 // Destination dimensions
    -
    173 STEEL_CONST short BROWS = BM;
    -
    174 STEEL_CONST short BCOLS = BK;
    -
    175
    -
    176 // Read dimensions
    -
    177 STEEL_CONST short dst_ld = BCOLS + tgp_padding;
    -
    178 STEEL_CONST short vec_size = tgp_size / (BROWS * BCOLS) >= 8 ? 8 : 4;
    -
    179
    -
    180 // Thread read shape
    - -
    182 STEEL_CONST short TROWS = tgp_size / TCOLS;
    -
    183
    -
    184 // Rows / strided reads within the block
    - -
    186
    -
    187 using mask_t = short;
    -
    188
    -
    189 // Thread location indices
    -
    190 const short thread_idx;
    -
    191 const short bi;
    -
    192 const short bj;
    -
    193
    -
    194 // threadgroup and device memory
    -
    195 threadgroup T* dst;
    -
    196
    -
    197 const constant MLXConvParams<2>* params;
    - -
    199
    -
    200 short weight_h;
    -
    201 short weight_w;
    -
    202
    -
    203 const device T* src[n_rows];
    -
    204
    - - -
    207
    -
    208 /* Constructor */
    -
    - -
    210 const device T* src_,
    -
    211 threadgroup T* dst_,
    -
    212 const int2 offsets,
    -
    213 const constant MLXConvParams<2>* params_,
    -
    214 const constant ImplicitGemmConv2DParams* gemm_params_,
    -
    215 uint simd_group_id [[simdgroup_index_in_threadgroup]],
    -
    216 uint simd_lane_id [[thread_index_in_simdgroup]])
    -
    217 : thread_idx(simd_group_id * 32 + simd_lane_id),
    - - -
    220 dst(dst_ + bi * dst_ld + bj),
    -
    221 params(params_),
    -
    222 gemm_params(gemm_params_),
    -
    223 weight_h(0),
    -
    224 weight_w(0) {
    -
    225 int out_n_pixels = params->oS[0] * params->oS[1];
    -
    226
    -
    227 int read_n[n_rows];
    -
    228 int read_ih[n_rows];
    -
    229 int read_iw[n_rows];
    -
    230
    - -
    232 for (short i = 0; i < n_rows; ++i) {
    -
    233 int offset_nhw = offsets.y + bi + i * TROWS;
    -
    234 int n = offset_nhw / out_n_pixels;
    -
    235 int hw = offset_nhw % out_n_pixels;
    -
    236 int oh = hw / params->oS[1];
    -
    237 int ow = hw % params->oS[1];
    -
    238
    -
    239 int ih = oh * params->str[0] - params->pad[0];
    -
    240 int iw = ow * params->str[1] - params->pad[1];
    -
    241
    -
    242 read_n[i] = n;
    -
    243 read_ih[i] = ih;
    -
    244 read_iw[i] = iw;
    -
    245
    -
    246 // Adjust for flip
    -
    247 if (params->flip) {
    -
    248 ih += (params->wS[0] - 1) * params->kdil[0];
    -
    249 iw += (params->wS[1] - 1) * params->kdil[1];
    -
    250 }
    -
    251
    -
    252 // Read from input if in bounds
    -
    253 src[i] = src_ + n * params->in_strides[0] + ih * params->in_strides[1] +
    -
    254 iw * params->in_strides[2] + bj;
    -
    255 }
    -
    256
    - -
    258 for (short i = 0; i < n_rows; ++i) {
    -
    259 mask_h[i] = 0;
    -
    260 mask_w[i] = 0;
    -
    261 }
    -
    262
    -
    263 for (short kh = 0; kh < params->wS[0]; kh++) {
    -
    264 short flip_h = params->flip ? params->wS[0] - kh - 1 : kh;
    - -
    266 for (short i = 0; i < n_rows; ++i) {
    -
    267 int n = read_n[i];
    -
    268 int ih = read_ih[i] + flip_h * params->kdil[0];
    -
    269
    -
    270 bool in_bounds = n < params->N && ih >= 0 && ih < params->iS[0];
    -
    271
    -
    272 mask_h[i] |= (in_bounds << kh);
    -
    273 }
    -
    274 }
    -
    275
    -
    276 for (short kw = 0; kw < params->wS[1]; kw++) {
    -
    277 short flip_w = params->flip ? params->wS[1] - kw - 1 : kw;
    - -
    279 for (short i = 0; i < n_rows; ++i) {
    -
    280 int iw = read_iw[i] + flip_w * params->kdil[1];
    -
    281
    -
    282 bool in_bounds = iw >= 0 && iw < params->iS[1];
    -
    283
    -
    284 mask_w[i] |= (in_bounds << kw);
    -
    285 }
    -
    286 }
    -
    287 }
    -
    -
    288
    -
    289 /* Load from device memory into threadgroup memory - without bound checking */
    -
    -
    290 METAL_FUNC void load_unsafe() const {
    -
    291 mask_t h_mask = mask_t(1) << weight_h;
    -
    292 mask_t w_mask = mask_t(1) << weight_w;
    -
    293
    - -
    295 for (short i = 0, is = 0; i < n_rows; ++i, is += TROWS) {
    -
    296 // Read from input if in bounds
    -
    297 if ((mask_h[i] & h_mask) && (mask_w[i] & w_mask)) {
    - -
    299 for (short j = 0; j < vec_size; ++j) {
    -
    300 dst[is * dst_ld + j] = src[i][j];
    -
    301 }
    -
    302 }
    -
    303
    -
    304 // Zero pad otherwise
    -
    305 else {
    - -
    307 for (short j = 0; j < vec_size; ++j) {
    -
    308 dst[is * dst_ld + j] = T(0);
    -
    309 }
    -
    310 }
    -
    311 }
    -
    312 }
    -
    -
    313
    -
    314 /* Iteration helper */
    -
    -
    315 METAL_FUNC void next() {
    -
    316 if (++weight_w < params->wS[1]) {
    - -
    318 for (short i = 0; i < n_rows; i++) {
    - -
    320 }
    -
    321
    -
    322 return;
    -
    323 }
    -
    324
    -
    325 weight_w = 0;
    -
    326
    -
    327 if (++weight_h < params->wS[0]) {
    - -
    329 for (short i = 0; i < n_rows; i++) {
    - -
    331 }
    -
    332
    -
    333 return;
    -
    334 }
    -
    335
    -
    336 weight_h = 0;
    -
    337
    - -
    339 for (short i = 0; i < n_rows; i++) {
    - -
    341 }
    -
    342 }
    -
    -
    343};
    -
    -
    344
    -
    345template <
    -
    346 typename T,
    -
    347 short BM,
    -
    348 short BN,
    -
    349 short BK,
    -
    350 short tgp_size,
    -
    351 short tgp_padding = 0>
    -
    - -
    353 // Destination dimensions
    -
    354 STEEL_CONST short BROWS = BN;
    -
    355 STEEL_CONST short BCOLS = BK;
    -
    356
    -
    357 // Read dimensions
    -
    358 STEEL_CONST short dst_ld = BCOLS + tgp_padding;
    - -
    360 (BN == 8) ? 1 : (tgp_size / (BROWS * BCOLS) >= 8 ? 8 : 4);
    -
    361
    -
    362 // Thread read shape
    - -
    364 STEEL_CONST short TROWS = tgp_size / TCOLS;
    -
    365
    -
    366 // Rows / strided reads within the block
    - -
    368
    -
    369 // Leading dimension for src
    -
    370 const int src_ld;
    -
    371
    -
    372 // Thread location indices
    -
    373 const short thread_idx;
    -
    374 const short bi;
    -
    375 const short bj;
    -
    376
    -
    377 // threadgroup and device memory
    -
    378 threadgroup T* dst;
    -
    379 const device T* src;
    -
    380
    -
    381 const constant MLXConvParams<2>* params;
    -
    382
    - -
    384
    -
    385 const int read_n;
    -
    386 const bool do_read;
    -
    387
    -
    388 /* Constructor */
    -
    - -
    390 const device T* src_,
    -
    391 threadgroup T* dst_,
    -
    392 const int2 offsets,
    -
    393 const constant MLXConvParams<2>* params_,
    -
    394 const constant ImplicitGemmConv2DParams* gemm_params_,
    -
    395 uint simd_group_id [[simdgroup_index_in_threadgroup]],
    -
    396 uint simd_lane_id [[thread_index_in_simdgroup]])
    -
    397 : src_ld(params_ -> wt_strides[0]),
    -
    398 thread_idx(simd_group_id * 32 + simd_lane_id),
    - - -
    401 dst(dst_ + bi * dst_ld + bj),
    -
    402 src(src_ + bi * src_ld + bj),
    -
    403 params(params_),
    -
    404 weight_hw(0),
    -
    405 read_n(offsets.y + bi),
    -
    406 do_read(read_n + n_rows * TROWS <= gemm_params_->N) {}
    -
    -
    407
    -
    408 /* Load from device memory into threadgroup memory - without bound checking */
    -
    -
    409 METAL_FUNC void load_unsafe() const {
    -
    410 if (BN != 8 || do_read) {
    - -
    412 for (short i = 0; i < BN; i += TROWS) {
    - -
    414 for (short j = 0; j < vec_size; j++) {
    -
    415 dst[i * dst_ld + j] = src[i * src_ld + j];
    -
    416 }
    -
    417 }
    -
    418 } else {
    -
    419 for (short i = 0; i < BN; i += TROWS) {
    -
    420 if ((read_n + i) < params->O) {
    - -
    422 for (short j = 0; j < vec_size; j++) {
    -
    423 dst[i * dst_ld + j] = src[i * src_ld + j];
    -
    424 }
    -
    425 } else {
    - -
    427 for (short j = 0; j < vec_size; j++) {
    -
    428 dst[i * dst_ld + j] = T(0);
    -
    429 }
    -
    430 }
    -
    431 }
    -
    432 }
    -
    433 }
    -
    -
    434
    -
    435 /* Iteration helper */
    -
    -
    436 METAL_FUNC void next() {
    -
    437 if (++weight_hw < (params->wS[1] * params->wS[0])) {
    -
    438 src += params->wt_strides[2];
    -
    439 return;
    -
    440 }
    -
    441
    -
    442 weight_hw = 0;
    -
    443
    -
    444 src += BK - (params->wS[1] * params->wS[0] - 1) * params->wt_strides[2];
    -
    445 }
    -
    -
    446};
    -
    -
    447
    -
    448} // namespace steel
    -
    -
    449} // namespace mlx
    - -
    #define STEEL_PRAGMA_UNROLL
    Definition utils.h:8
    -
    #define STEEL_CONST
    Definition utils.h:7
    - -
    Definition allocator.h:7
    -
    Definition params.h:6
    -
    const int oS[NDIM]
    Definition params.h:12
    -
    const int iS[NDIM]
    Definition params.h:10
    -
    const int kdil[NDIM]
    Definition params.h:15
    -
    const int str[NDIM]
    Definition params.h:13
    -
    const size_t wt_strides[NDIM+2]
    Definition params.h:18
    -
    const bool flip
    Definition params.h:21
    -
    const size_t in_strides[NDIM+2]
    Definition params.h:17
    -
    const int wS[NDIM]
    Definition params.h:11
    -
    const int O
    Definition params.h:9
    -
    const int N
    Definition params.h:7
    -
    const int pad[NDIM]
    Definition params.h:14
    -
    Definition loader_channel_l.h:23
    -
    STEEL_CONST short n_rows
    Definition loader_channel_l.h:37
    -
    const constant MLXConvParams< 2 > * params
    Definition loader_channel_l.h:47
    -
    STEEL_CONST short TCOLS
    Definition loader_channel_l.h:33
    -
    int read_iw[n_rows]
    Definition loader_channel_l.h:57
    -
    STEEL_CONST short TROWS
    Definition loader_channel_l.h:34
    -
    STEEL_CONST short BCOLS
    Definition loader_channel_l.h:26
    -
    METAL_FUNC void next()
    Definition loader_channel_l.h:134
    -
    short weight_h
    Definition loader_channel_l.h:50
    -
    const device T * src[n_rows]
    Definition loader_channel_l.h:53
    -
    const short thread_idx
    Definition loader_channel_l.h:40
    -
    const short bj
    Definition loader_channel_l.h:42
    -
    int read_ih[n_rows]
    Definition loader_channel_l.h:56
    -
    METAL_FUNC Conv2DInputBlockLoaderLargeFilter(const device T *src_, threadgroup T *dst_, const int2 offsets, const constant MLXConvParams< 2 > *params_, const constant ImplicitGemmConv2DParams *gemm_params_, uint simd_group_id, uint simd_lane_id)
    Definition loader_channel_l.h:60
    -
    const short bi
    Definition loader_channel_l.h:41
    -
    STEEL_CONST short dst_ld
    Definition loader_channel_l.h:29
    -
    METAL_FUNC void load_unsafe() const
    Definition loader_channel_l.h:106
    -
    const constant ImplicitGemmConv2DParams * gemm_params
    Definition loader_channel_l.h:48
    -
    STEEL_CONST short BROWS
    Definition loader_channel_l.h:25
    -
    STEEL_CONST short vec_size
    Definition loader_channel_l.h:30
    -
    short weight_w
    Definition loader_channel_l.h:51
    -
    threadgroup T * dst
    Definition loader_channel_l.h:45
    -
    int read_n[n_rows]
    Definition loader_channel_l.h:55
    -
    Definition loader_channel_l.h:171
    -
    METAL_FUNC Conv2DInputBlockLoaderSmallFilter(const device T *src_, threadgroup T *dst_, const int2 offsets, const constant MLXConvParams< 2 > *params_, const constant ImplicitGemmConv2DParams *gemm_params_, uint simd_group_id, uint simd_lane_id)
    Definition loader_channel_l.h:209
    -
    mask_t mask_h[n_rows]
    Definition loader_channel_l.h:205
    -
    STEEL_CONST short BROWS
    Definition loader_channel_l.h:173
    -
    mask_t mask_w[n_rows]
    Definition loader_channel_l.h:206
    -
    short mask_t
    Definition loader_channel_l.h:187
    -
    short weight_h
    Definition loader_channel_l.h:200
    -
    STEEL_CONST short TROWS
    Definition loader_channel_l.h:182
    -
    STEEL_CONST short n_rows
    Definition loader_channel_l.h:185
    -
    short weight_w
    Definition loader_channel_l.h:201
    -
    const constant MLXConvParams< 2 > * params
    Definition loader_channel_l.h:197
    -
    const device T * src[n_rows]
    Definition loader_channel_l.h:203
    -
    STEEL_CONST short TCOLS
    Definition loader_channel_l.h:181
    -
    const short bj
    Definition loader_channel_l.h:192
    -
    STEEL_CONST short vec_size
    Definition loader_channel_l.h:178
    -
    METAL_FUNC void next()
    Definition loader_channel_l.h:315
    -
    METAL_FUNC void load_unsafe() const
    Definition loader_channel_l.h:290
    -
    threadgroup T * dst
    Definition loader_channel_l.h:195
    -
    STEEL_CONST short dst_ld
    Definition loader_channel_l.h:177
    -
    const short thread_idx
    Definition loader_channel_l.h:190
    -
    STEEL_CONST short BCOLS
    Definition loader_channel_l.h:174
    -
    const constant ImplicitGemmConv2DParams * gemm_params
    Definition loader_channel_l.h:198
    -
    const short bi
    Definition loader_channel_l.h:191
    -
    Definition loader_channel_l.h:352
    -
    STEEL_CONST short dst_ld
    Definition loader_channel_l.h:358
    -
    STEEL_CONST short vec_size
    Definition loader_channel_l.h:359
    -
    const bool do_read
    Definition loader_channel_l.h:386
    -
    const constant MLXConvParams< 2 > * params
    Definition loader_channel_l.h:381
    -
    STEEL_CONST short n_rows
    Definition loader_channel_l.h:367
    -
    const int read_n
    Definition loader_channel_l.h:385
    -
    METAL_FUNC void load_unsafe() const
    Definition loader_channel_l.h:409
    -
    const short bj
    Definition loader_channel_l.h:375
    -
    const int src_ld
    Definition loader_channel_l.h:370
    -
    const device T * src
    Definition loader_channel_l.h:379
    -
    STEEL_CONST short TCOLS
    Definition loader_channel_l.h:363
    -
    STEEL_CONST short BCOLS
    Definition loader_channel_l.h:355
    -
    const short bi
    Definition loader_channel_l.h:374
    -
    STEEL_CONST short TROWS
    Definition loader_channel_l.h:364
    -
    METAL_FUNC Conv2DWeightBlockLoader(const device T *src_, threadgroup T *dst_, const int2 offsets, const constant MLXConvParams< 2 > *params_, const constant ImplicitGemmConv2DParams *gemm_params_, uint simd_group_id, uint simd_lane_id)
    Definition loader_channel_l.h:389
    -
    METAL_FUNC void next()
    Definition loader_channel_l.h:436
    -
    const short thread_idx
    Definition loader_channel_l.h:373
    -
    int weight_hw
    Definition loader_channel_l.h:383
    -
    STEEL_CONST short BROWS
    Definition loader_channel_l.h:354
    -
    threadgroup T * dst
    Definition loader_channel_l.h:378
    - -
    const int inp_jump_h
    Definition params.h:35
    -
    const int inp_jump_c
    Definition params.h:36
    -
    const int inp_jump_w
    Definition params.h:34
    -
    - - - - diff --git a/docs/build/html/loader__channel__n_8h.html b/docs/build/html/loader__channel__n_8h.html deleted file mode 100644 index 0837a77e8..000000000 --- a/docs/build/html/loader__channel__n_8h.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/loaders/loader_channel_n.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    loader_channel_n.h File Reference
    -
    - - - - - diff --git a/docs/build/html/loader__channel__n_8h_source.html b/docs/build/html/loader__channel__n_8h_source.html deleted file mode 100644 index 07655f60c..000000000 --- a/docs/build/html/loader__channel__n_8h_source.html +++ /dev/null @@ -1,499 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/loaders/loader_channel_n.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    loader_channel_n.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    - -
    6
    - -
    8
    -
    10// Loading helper
    -
    12
    -
    13namespace mlx {
    -
    14namespace steel {
    -
    15
    -
    16template <short n_channels_>
    -
    - -
    18 STEEL_CONST short n_channels = n_channels_;
    -
    19 STEEL_CONST short vec_size = n_channels_ <= 4 ? 4 : 8;
    -
    20 STEEL_CONST short excess = vec_size - n_channels_;
    -
    21};
    -
    -
    22
    -
    23template <>
    -
    -
    24struct ChannelHelper<1> {
    - - - -
    28};
    -
    -
    29
    -
    30template <>
    -
    -
    31struct ChannelHelper<2> {
    - - - -
    35};
    -
    -
    36
    -
    37template <>
    -
    -
    38struct ChannelHelper<3> {
    - - - -
    42};
    -
    -
    43
    -
    44template <>
    -
    -
    45struct ChannelHelper<4> {
    - - - -
    49};
    -
    -
    50
    -
    51template <
    -
    52 typename T,
    -
    53 short BM,
    -
    54 short BN,
    -
    55 short BK,
    -
    56 short tgp_size,
    -
    57 short n_channels,
    -
    58 short tgp_padding = 0>
    -
    - -
    60 // Destination dimensions
    -
    61 STEEL_CONST short BROWS = BM;
    -
    62 STEEL_CONST short BCOLS = BK;
    -
    63
    -
    64 // Read dimensions
    -
    65 STEEL_CONST short dst_ld = BCOLS + tgp_padding;
    - -
    67
    -
    68 // Thread read shape
    - -
    70 STEEL_CONST short TROWS = tgp_size / TCOLS;
    -
    71
    -
    72 // Rows / strided reads within the block
    - -
    74
    -
    75 // Thread location indices
    -
    76 const short thread_idx;
    -
    77 const short bi;
    -
    78 const short bj;
    -
    79
    -
    80 // threadgroup and device memory
    -
    81 threadgroup T* dst;
    -
    82
    -
    83 const constant MLXConvParams<2>* params;
    - -
    85
    -
    86 short weight_hw;
    -
    87
    -
    88 const device T* src[n_rows];
    -
    89
    - - - -
    93
    -
    94 /* Constructor */
    -
    - -
    96 const device T* src_,
    -
    97 threadgroup T* dst_,
    -
    98 const int2 offsets,
    -
    99 const constant MLXConvParams<2>* params_,
    -
    100 const constant ImplicitGemmConv2DParams* gemm_params_,
    -
    101 uint simd_group_id [[simdgroup_index_in_threadgroup]],
    -
    102 uint simd_lane_id [[thread_index_in_simdgroup]])
    -
    103 : thread_idx(simd_group_id * 32 + simd_lane_id),
    - - -
    106 dst(dst_ + bi * dst_ld + bj),
    -
    107 params(params_),
    -
    108 gemm_params(gemm_params_),
    - -
    110 int out_n_pixels = params->oS[0] * params->oS[1];
    -
    111
    - -
    113 for (short i = 0; i < n_rows; ++i) {
    -
    114 int offset_nhw = offsets.y + bi + i * TROWS;
    -
    115 int n = offset_nhw / out_n_pixels;
    -
    116 int hw = offset_nhw % out_n_pixels;
    -
    117 int oh = hw / params->oS[1];
    -
    118 int ow = hw % params->oS[1];
    -
    119
    -
    120 int ih = oh * params->str[0] - params->pad[0];
    -
    121 int iw = ow * params->str[1] - params->pad[1];
    -
    122
    -
    123 // Read from input if in bounds
    -
    124 src[i] = src_ + n * params->in_strides[0] + ih * params->in_strides[1] +
    -
    125 iw * params->in_strides[2];
    -
    126
    -
    127 read_n[i] = n;
    -
    128 read_ih[i] = ih;
    -
    129 read_iw[i] = iw;
    -
    130 }
    -
    131 }
    -
    -
    132
    -
    133 /* Load from device memory into threadgroup memory - without bound checking */
    -
    -
    134 METAL_FUNC void load_unsafe() const {
    -
    135 if (weight_hw >= params->wS[1] * params->wS[0]) {
    - -
    137 for (short i = 0; i < BROWS; i += TROWS) {
    - -
    139 for (short j = 0; j < vec_size; j++) {
    -
    140 dst[i * dst_ld + j] = T(0);
    -
    141 }
    -
    142 }
    -
    143 return;
    -
    144 }
    -
    145
    -
    146 int wh = (weight_hw / params->wS[1]);
    -
    147 int ww = (weight_hw % params->wS[1]);
    -
    148
    -
    149 int flip_h = params->flip ? params->wS[0] - wh - 1 : wh;
    -
    150 int flip_w = params->flip ? params->wS[1] - ww - 1 : ww;
    -
    151
    -
    152 int weight_h = flip_h * params->kdil[0];
    -
    153 int weight_w = flip_w * params->kdil[1];
    -
    154
    - -
    156 for (short i = 0, is = 0; i < n_rows; ++i, is += TROWS) {
    -
    157 // Find bounds
    -
    158 int n = read_n[i];
    -
    159 int ih = read_ih[i] + weight_h;
    -
    160 int iw = read_iw[i] + weight_w;
    -
    161
    -
    162 // Read from input if in bounds
    -
    163 if ((n < params->N) && (ih >= 0 && ih < params->iS[0]) &&
    -
    164 (iw >= 0 && iw < params->iS[1])) {
    -
    165 const device T* curr_src = src[i] + weight_h * params->in_strides[1] +
    -
    166 weight_w * params->in_strides[2];
    -
    167
    - -
    169 for (short j = 0; j < n_channels; ++j) {
    -
    170 dst[is * dst_ld + j] = curr_src[j];
    -
    171 }
    -
    172
    - -
    174 for (short j = n_channels; j < vec_size; ++j) {
    -
    175 dst[is * dst_ld + j] = T(0);
    -
    176 }
    -
    177 }
    -
    178
    -
    179 // Zero pad otherwise
    -
    180 else {
    - -
    182 for (short j = 0; j < vec_size; ++j) {
    -
    183 dst[is * dst_ld + j] = T(0);
    -
    184 }
    -
    185 }
    -
    186 }
    -
    187 }
    -
    -
    188
    -
    189 /* Iteration helper */
    -
    -
    190 METAL_FUNC void next() {
    -
    191 weight_hw += TCOLS;
    -
    192 }
    -
    -
    193};
    -
    -
    194
    -
    195template <
    -
    196 typename T,
    -
    197 short BM,
    -
    198 short BN,
    -
    199 short BK,
    -
    200 short tgp_size,
    -
    201 short n_channels,
    -
    202 short tgp_padding = 0>
    -
    - -
    204 // Destination dimensions
    -
    205 STEEL_CONST short BROWS = BN;
    -
    206 STEEL_CONST short BCOLS = BK;
    -
    207
    -
    208 // Read dimensions
    -
    209 STEEL_CONST short dst_ld = BCOLS + tgp_padding;
    - -
    211
    -
    212 // Thread read shape
    - -
    214 STEEL_CONST short TROWS = tgp_size / TCOLS;
    -
    215
    -
    216 // Rows / strided reads within the block
    - -
    218
    -
    219 // Leading dimension for src
    -
    220 const int src_ld;
    -
    221
    -
    222 // Thread location indices
    -
    223 const short thread_idx;
    -
    224 const short bi;
    -
    225 const short bj;
    -
    226
    -
    227 // threadgroup and device memory
    -
    228 threadgroup T* dst;
    -
    229 const device T* src;
    -
    230
    -
    231 const constant MLXConvParams<2>* params;
    -
    232
    - -
    234
    -
    235 const int read_n;
    -
    236 const bool do_read;
    -
    237
    -
    238 /* Constructor */
    -
    - -
    240 const device T* src_,
    -
    241 threadgroup T* dst_,
    -
    242 const int2 offsets,
    -
    243 const constant MLXConvParams<2>* params_,
    -
    244 const constant ImplicitGemmConv2DParams* gemm_params_,
    -
    245 uint simd_group_id [[simdgroup_index_in_threadgroup]],
    -
    246 uint simd_lane_id [[thread_index_in_simdgroup]])
    -
    247 : src_ld(params_ -> wt_strides[0]),
    -
    248 thread_idx(simd_group_id * 32 + simd_lane_id),
    - - -
    251 dst(dst_ + bi * dst_ld + bj),
    -
    252 src(src_ + bi * src_ld),
    -
    253 params(params_),
    - -
    255 read_n(offsets.y + bi),
    -
    256 do_read(read_n + BN <= gemm_params_->N) {}
    -
    -
    257
    -
    258 /* Load from device memory into threadgroup memory - without bound checking */
    -
    -
    259 METAL_FUNC void load_unsafe() const {
    -
    260 if (bi >= BROWS || bj >= BCOLS)
    -
    261 return;
    -
    262
    -
    263 if (read_n >= params->O || weight_hw >= params->wS[1] * params->wS[0]) {
    - -
    265 for (short i = 0; i < BROWS; i += TROWS) {
    - -
    267 for (short j = 0; j < vec_size; j++) {
    -
    268 dst[i * dst_ld + j] = T(0);
    -
    269 }
    -
    270 }
    -
    271
    -
    272 return;
    -
    273 }
    -
    274
    -
    275 const device T* curr_src = src + weight_hw * params->wt_strides[2];
    -
    276
    -
    277 if (BN != 8 || do_read) {
    - -
    279 for (short i = 0; i < BROWS; i += TROWS) {
    - -
    281 for (short j = 0; j < n_channels; j++) {
    -
    282 dst[i * dst_ld + j] = curr_src[i * src_ld + j];
    -
    283 }
    -
    284
    - -
    286 for (short j = n_channels; j < vec_size; j++) {
    -
    287 dst[i * dst_ld + j] = T(0);
    -
    288 }
    -
    289 }
    -
    290 } else {
    -
    291 for (short i = 0; i < BROWS; i += TROWS) {
    -
    292 if (((read_n + i) < params->O)) {
    - -
    294 for (short j = 0; j < n_channels; j++) {
    -
    295 dst[i * dst_ld + j] = curr_src[i * src_ld + j];
    -
    296 }
    -
    297
    - -
    299 for (short j = n_channels; j < vec_size; j++) {
    -
    300 dst[i * dst_ld + j] = T(0);
    -
    301 }
    -
    302 } else {
    - -
    304 for (short j = 0; j < vec_size; j++) {
    -
    305 dst[i * dst_ld + j] = T(0);
    -
    306 }
    -
    307 }
    -
    308 }
    -
    309 }
    -
    310 }
    -
    -
    311
    -
    312 /* Iteration helper */
    -
    -
    313 METAL_FUNC void next() {
    -
    314 weight_hw += TCOLS;
    -
    315 }
    -
    -
    316};
    -
    -
    317
    -
    318} // namespace steel
    -
    319} // namespace mlx
    - -
    #define STEEL_PRAGMA_UNROLL
    Definition utils.h:8
    -
    #define STEEL_CONST
    Definition utils.h:7
    - -
    Definition allocator.h:7
    -
    Definition params.h:6
    -
    const int oS[NDIM]
    Definition params.h:12
    -
    const int iS[NDIM]
    Definition params.h:10
    -
    const int kdil[NDIM]
    Definition params.h:15
    -
    const int str[NDIM]
    Definition params.h:13
    -
    const size_t wt_strides[NDIM+2]
    Definition params.h:18
    -
    const bool flip
    Definition params.h:21
    -
    const size_t in_strides[NDIM+2]
    Definition params.h:17
    -
    const int wS[NDIM]
    Definition params.h:11
    -
    const int O
    Definition params.h:9
    -
    const int pad[NDIM]
    Definition params.h:14
    -
    Definition loader_channel_n.h:17
    -
    STEEL_CONST short vec_size
    Definition loader_channel_n.h:19
    -
    STEEL_CONST short n_channels
    Definition loader_channel_n.h:18
    -
    STEEL_CONST short excess
    Definition loader_channel_n.h:20
    -
    Definition loader_channel_n.h:59
    -
    const constant MLXConvParams< 2 > * params
    Definition loader_channel_n.h:83
    -
    STEEL_CONST short BROWS
    Definition loader_channel_n.h:61
    -
    threadgroup T * dst
    Definition loader_channel_n.h:81
    -
    int read_ih[n_rows]
    Definition loader_channel_n.h:91
    -
    STEEL_CONST short vec_size
    Definition loader_channel_n.h:66
    -
    STEEL_CONST short TROWS
    Definition loader_channel_n.h:70
    -
    const short bj
    Definition loader_channel_n.h:78
    -
    short weight_hw
    Definition loader_channel_n.h:86
    -
    STEEL_CONST short n_rows
    Definition loader_channel_n.h:73
    -
    STEEL_CONST short BCOLS
    Definition loader_channel_n.h:62
    -
    const short thread_idx
    Definition loader_channel_n.h:76
    -
    const short bi
    Definition loader_channel_n.h:77
    -
    METAL_FUNC void load_unsafe() const
    Definition loader_channel_n.h:134
    -
    int read_iw[n_rows]
    Definition loader_channel_n.h:92
    -
    METAL_FUNC Conv2DInputBlockLoaderSmallChannels(const device T *src_, threadgroup T *dst_, const int2 offsets, const constant MLXConvParams< 2 > *params_, const constant ImplicitGemmConv2DParams *gemm_params_, uint simd_group_id, uint simd_lane_id)
    Definition loader_channel_n.h:95
    -
    STEEL_CONST short TCOLS
    Definition loader_channel_n.h:69
    -
    int read_n[n_rows]
    Definition loader_channel_n.h:90
    -
    STEEL_CONST short dst_ld
    Definition loader_channel_n.h:65
    -
    const constant ImplicitGemmConv2DParams * gemm_params
    Definition loader_channel_n.h:84
    -
    METAL_FUNC void next()
    Definition loader_channel_n.h:190
    -
    const device T * src[n_rows]
    Definition loader_channel_n.h:88
    -
    Definition loader_channel_n.h:203
    -
    STEEL_CONST short vec_size
    Definition loader_channel_n.h:210
    -
    METAL_FUNC void load_unsafe() const
    Definition loader_channel_n.h:259
    -
    threadgroup T * dst
    Definition loader_channel_n.h:228
    -
    METAL_FUNC void next()
    Definition loader_channel_n.h:313
    -
    int weight_hw
    Definition loader_channel_n.h:233
    -
    STEEL_CONST short TROWS
    Definition loader_channel_n.h:214
    -
    const bool do_read
    Definition loader_channel_n.h:236
    -
    const device T * src
    Definition loader_channel_n.h:229
    -
    STEEL_CONST short BCOLS
    Definition loader_channel_n.h:206
    -
    const int read_n
    Definition loader_channel_n.h:235
    -
    const int src_ld
    Definition loader_channel_n.h:220
    -
    STEEL_CONST short dst_ld
    Definition loader_channel_n.h:209
    -
    const short thread_idx
    Definition loader_channel_n.h:223
    -
    STEEL_CONST short BROWS
    Definition loader_channel_n.h:205
    -
    STEEL_CONST short TCOLS
    Definition loader_channel_n.h:213
    -
    const short bj
    Definition loader_channel_n.h:225
    -
    METAL_FUNC Conv2DWeightBlockLoaderSmallChannels(const device T *src_, threadgroup T *dst_, const int2 offsets, const constant MLXConvParams< 2 > *params_, const constant ImplicitGemmConv2DParams *gemm_params_, uint simd_group_id, uint simd_lane_id)
    Definition loader_channel_n.h:239
    -
    const short bi
    Definition loader_channel_n.h:224
    -
    STEEL_CONST short n_rows
    Definition loader_channel_n.h:217
    -
    const constant MLXConvParams< 2 > * params
    Definition loader_channel_n.h:231
    - -
    - - - - diff --git a/docs/build/html/loader__general_8h.html b/docs/build/html/loader__general_8h.html deleted file mode 100644 index e16d19fc7..000000000 --- a/docs/build/html/loader__general_8h.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/loaders/loader_general.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    loader_general.h File Reference
    -
    - - - - - diff --git a/docs/build/html/loader__general_8h_source.html b/docs/build/html/loader__general_8h_source.html deleted file mode 100644 index 8ef41b859..000000000 --- a/docs/build/html/loader__general_8h_source.html +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/conv/loaders/loader_general.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    loader_general.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    - -
    6
    - -
    8
    -
    10// Loading helper
    -
    12
    -
    13namespace mlx {
    -
    14namespace steel {
    -
    15
    -
    16template <
    -
    17 typename T,
    -
    18 short BM,
    -
    19 short BN,
    -
    20 short BK,
    -
    21 short tgp_size,
    -
    22 short tgp_padding = 0>
    -
    - -
    24 // Destination dimensions
    -
    25 STEEL_CONST short BROWS = BM;
    -
    26 STEEL_CONST short BCOLS = BK;
    -
    27
    -
    28 // Read dimensions
    -
    29 STEEL_CONST short dst_ld = BCOLS + tgp_padding;
    -
    30 STEEL_CONST short vec_size = tgp_size / (BROWS * BCOLS) >= 8 ? 8 : 4;
    -
    31
    -
    32 // Thread read shape
    - -
    34 STEEL_CONST short TROWS = tgp_size / TCOLS;
    -
    35
    -
    36 // Rows / strided reads within the block
    - -
    38
    -
    39 // Thread location indices
    -
    40 const short thread_idx;
    -
    41 const short bi;
    -
    42 const short bj;
    -
    43
    -
    44 // threadgroup and device memory
    -
    45 threadgroup T* dst;
    -
    46
    -
    47 const constant MLXConvParams<2>* params;
    - -
    49
    -
    50 const short base_wh;
    -
    51 const short base_ww;
    -
    52
    -
    53 short weight_h;
    -
    54 short weight_w;
    -
    55
    -
    56 const device T* src[n_rows];
    -
    57
    - - - -
    61
    -
    62 /* Constructor */
    -
    - -
    64 const device T* src_,
    -
    65 threadgroup T* dst_,
    -
    66 const int4 offsets,
    -
    67 const constant MLXConvParams<2>* params_,
    -
    68 const constant Conv2DGeneralJumpParams* jump_params_,
    -
    69 const short base_wh_,
    -
    70 const short base_ww_,
    -
    71 uint simd_group_id [[simdgroup_index_in_threadgroup]],
    -
    72 uint simd_lane_id [[thread_index_in_simdgroup]])
    -
    73 : thread_idx(simd_group_id * 32 + simd_lane_id),
    - - -
    76 dst(dst_ + bi * dst_ld + bj),
    -
    77 params(params_),
    -
    78 jump_params(jump_params_),
    -
    79 base_wh(base_wh_),
    -
    80 base_ww(base_ww_),
    -
    81 weight_h(base_wh_),
    -
    82 weight_w(base_ww_) {
    - -
    84 for (short i = 0; i < n_rows; ++i) {
    -
    85 int offset_nhw = offsets.y + bi + i * TROWS;
    -
    86 int n = offset_nhw / jump_params->adj_out_hw;
    -
    87 int hw = offset_nhw % jump_params->adj_out_hw;
    -
    88 int oh =
    -
    89 (hw / jump_params->adj_out_w) * jump_params->f_out_jump_h + offsets.z;
    -
    90 int ow =
    -
    91 (hw % jump_params->adj_out_w) * jump_params->f_out_jump_w + offsets.w;
    -
    92
    -
    93 int ih = oh * params->str[0] - params->pad[0];
    -
    94 int iw = ow * params->str[1] - params->pad[1];
    -
    95
    -
    96 read_n[i] = n;
    -
    97 read_ih[i] = ih;
    -
    98 read_iw[i] = iw;
    -
    99
    -
    100 // Read from input if in bounds
    -
    101 src[i] = src_ + n * params->in_strides[0] + bj;
    -
    102 }
    -
    103 }
    -
    -
    104
    -
    105 /* Load from device memory into threadgroup memory - without bound checking */
    -
    -
    106 METAL_FUNC void load_unsafe() const {
    - -
    108 for (short i = 0, is = 0; i < n_rows; ++i, is += TROWS) {
    -
    109 // Find bounds
    -
    110 int n = read_n[i];
    -
    111
    -
    112 int h_flip = params->flip ? params->wS[0] - weight_h - 1 : weight_h;
    -
    113 int w_flip = params->flip ? params->wS[1] - weight_w - 1 : weight_w;
    -
    114
    -
    115 int ih_dil = read_ih[i] + h_flip * params->kdil[0];
    -
    116 int iw_dil = read_iw[i] + w_flip * params->kdil[1];
    -
    117
    -
    118 int ih = ih_dil / params->idil[0];
    -
    119 int iw = iw_dil / params->idil[1];
    -
    120
    -
    121 size_t offset = ih * params->in_strides[1] + iw * params->in_strides[2];
    -
    122
    -
    123 // Read from input if in bounds
    -
    124 if ((n < params->N) && (ih_dil >= 0 && ih < params->iS[0]) &&
    -
    125 (iw_dil >= 0 && iw < params->iS[1])) {
    - -
    127 for (short j = 0; j < vec_size; ++j) {
    -
    128 dst[is * dst_ld + j] = (src[i])[offset + j];
    -
    129 }
    -
    130 }
    -
    131
    -
    132 // Zero pad otherwise
    -
    133 else {
    - -
    135 for (short j = 0; j < vec_size; ++j) {
    -
    136 dst[is * dst_ld + j] = T(0);
    -
    137 }
    -
    138 }
    -
    139 }
    -
    140 }
    -
    -
    141
    -
    142 /* Iteration helper */
    -
    -
    143 METAL_FUNC void next() {
    - -
    145 if (weight_w < params->wS[1]) {
    -
    146 return;
    -
    147 }
    -
    148
    - -
    150
    - -
    152 if (weight_h < params->wS[0]) {
    -
    153 return;
    -
    154 }
    -
    155
    - -
    157
    - -
    159 for (short i = 0; i < n_rows; i++) {
    -
    160 src[i] += BK;
    -
    161 }
    -
    162 }
    -
    -
    163};
    -
    -
    164
    -
    165template <
    -
    166 typename T,
    -
    167 short BM,
    -
    168 short BN,
    -
    169 short BK,
    -
    170 short tgp_size,
    -
    171 short tgp_padding = 0>
    -
    - -
    173 // Destination dimensions
    -
    174 STEEL_CONST short BROWS = BN;
    -
    175 STEEL_CONST short BCOLS = BK;
    -
    176
    -
    177 // Read dimensions
    -
    178 STEEL_CONST short dst_ld = BCOLS + tgp_padding;
    - -
    180 (BN == 8) ? 1 : (tgp_size / (BROWS * BCOLS) >= 8 ? 8 : 4);
    -
    181
    -
    182 // Thread read shape
    - -
    184 STEEL_CONST short TROWS = tgp_size / TCOLS;
    -
    185
    -
    186 // Rows / strided reads within the block
    - -
    188
    -
    189 // Leading dimension for src
    -
    190 const int src_ld;
    -
    191
    -
    192 // Thread location indices
    -
    193 const short thread_idx;
    -
    194 const short bi;
    -
    195 const short bj;
    -
    196
    -
    197 // threadgroup and device memory
    -
    198 threadgroup T* dst;
    -
    199 const device T* src;
    -
    200
    -
    201 const constant MLXConvParams<2>* params;
    - -
    203
    -
    204 const short base_wh;
    -
    205 const short base_ww;
    -
    206
    -
    207 short weight_h;
    -
    208 short weight_w;
    -
    209
    -
    210 const int start_row;
    -
    211
    -
    212 /* Constructor */
    -
    - -
    214 const device T* src_,
    -
    215 threadgroup T* dst_,
    -
    216 const int2 offsets,
    -
    217 const constant MLXConvParams<2>* params_,
    -
    218 const constant Conv2DGeneralJumpParams* jump_params_,
    -
    219 const short base_wh_,
    -
    220 const short base_ww_,
    -
    221 uint simd_group_id [[simdgroup_index_in_threadgroup]],
    -
    222 uint simd_lane_id [[thread_index_in_simdgroup]])
    -
    223 : src_ld(params_ -> wt_strides[0]),
    -
    224 thread_idx(simd_group_id * 32 + simd_lane_id),
    - - -
    227 dst(dst_ + bi * dst_ld + bj),
    -
    228 src(src_ + bi * src_ld + bj),
    -
    229 params(params_),
    -
    230 jump_params(jump_params_),
    -
    231 base_wh(base_wh_),
    -
    232 base_ww(base_ww_),
    -
    233 weight_h(base_wh_),
    -
    234 weight_w(base_ww_),
    -
    235 start_row(offsets.y + bi) {}
    -
    -
    236
    -
    237 /* Load from device memory into threadgroup memory - without bound checking */
    -
    -
    238 METAL_FUNC void load_unsafe() const {
    -
    239 const device T* curr_src = src + weight_h * params->wt_strides[1] +
    - -
    241
    -
    242 if ((start_row + BN <= params->O)) {
    - -
    244 for (short i = 0; i < BN; i += TROWS) {
    - -
    246 for (short j = 0; j < vec_size; j++) {
    -
    247 dst[i * dst_ld + j] = curr_src[i * src_ld + j];
    -
    248 }
    -
    249 }
    -
    250 } else {
    -
    251 for (short i = 0; i < BN; i += TROWS) {
    -
    252 if ((start_row + i) < params->O) {
    - -
    254 for (short j = 0; j < vec_size; j++) {
    -
    255 dst[i * dst_ld + j] = curr_src[i * src_ld + j];
    -
    256 }
    -
    257 } else {
    - -
    259 for (short j = 0; j < vec_size; j++) {
    -
    260 dst[i * dst_ld + j] = T(0);
    -
    261 }
    -
    262 }
    -
    263 }
    -
    264 }
    -
    265 }
    -
    -
    266
    -
    267 /* Iteration helper */
    -
    -
    268 METAL_FUNC void next() {
    - -
    270 if (weight_w < params->wS[1]) {
    -
    271 return;
    -
    272 }
    -
    273
    - -
    275
    - -
    277 if (weight_h < params->wS[0]) {
    -
    278 return;
    -
    279 }
    -
    280
    - -
    282
    -
    283 src += BK;
    -
    284 }
    -
    -
    285};
    -
    -
    286
    -
    287} // namespace steel
    -
    288} // namespace mlx
    - -
    #define STEEL_PRAGMA_UNROLL
    Definition utils.h:8
    -
    #define STEEL_CONST
    Definition utils.h:7
    - -
    Definition allocator.h:7
    -
    Definition params.h:6
    -
    const int kdil[NDIM]
    Definition params.h:15
    -
    const int str[NDIM]
    Definition params.h:13
    -
    const size_t wt_strides[NDIM+2]
    Definition params.h:18
    -
    const bool flip
    Definition params.h:21
    -
    const size_t in_strides[NDIM+2]
    Definition params.h:17
    -
    const int wS[NDIM]
    Definition params.h:11
    -
    const int O
    Definition params.h:9
    -
    const int pad[NDIM]
    Definition params.h:14
    -
    const int idil[NDIM]
    Definition params.h:16
    - -
    const int f_out_jump_w
    Definition params.h:48
    -
    const int f_wgt_jump_h
    Definition params.h:44
    -
    const int f_wgt_jump_w
    Definition params.h:45
    -
    const int f_out_jump_h
    Definition params.h:47
    -
    const int adj_out_w
    Definition params.h:51
    -
    const int adj_out_hw
    Definition params.h:52
    -
    Definition loader_general.h:23
    -
    short weight_w
    Definition loader_general.h:54
    -
    STEEL_CONST short dst_ld
    Definition loader_general.h:29
    -
    const constant MLXConvParams< 2 > * params
    Definition loader_general.h:47
    -
    STEEL_CONST short vec_size
    Definition loader_general.h:30
    -
    METAL_FUNC Conv2DInputBlockLoaderGeneral(const device T *src_, threadgroup T *dst_, const int4 offsets, const constant MLXConvParams< 2 > *params_, const constant Conv2DGeneralJumpParams *jump_params_, const short base_wh_, const short base_ww_, uint simd_group_id, uint simd_lane_id)
    Definition loader_general.h:63
    -
    const device T * src[n_rows]
    Definition loader_general.h:56
    -
    const constant Conv2DGeneralJumpParams * jump_params
    Definition loader_general.h:48
    -
    STEEL_CONST short TROWS
    Definition loader_general.h:34
    -
    const short bi
    Definition loader_general.h:41
    -
    const short base_ww
    Definition loader_general.h:51
    -
    int read_ih[n_rows]
    Definition loader_general.h:59
    -
    METAL_FUNC void load_unsafe() const
    Definition loader_general.h:106
    -
    short weight_h
    Definition loader_general.h:53
    -
    STEEL_CONST short BCOLS
    Definition loader_general.h:26
    -
    METAL_FUNC void next()
    Definition loader_general.h:143
    -
    const short thread_idx
    Definition loader_general.h:40
    -
    int read_iw[n_rows]
    Definition loader_general.h:60
    -
    threadgroup T * dst
    Definition loader_general.h:45
    -
    STEEL_CONST short BROWS
    Definition loader_general.h:25
    -
    STEEL_CONST short n_rows
    Definition loader_general.h:37
    -
    const short base_wh
    Definition loader_general.h:50
    -
    const short bj
    Definition loader_general.h:42
    -
    STEEL_CONST short TCOLS
    Definition loader_general.h:33
    -
    int read_n[n_rows]
    Definition loader_general.h:58
    -
    Definition loader_general.h:172
    -
    STEEL_CONST short BROWS
    Definition loader_general.h:174
    -
    const short thread_idx
    Definition loader_general.h:193
    -
    STEEL_CONST short vec_size
    Definition loader_general.h:179
    -
    METAL_FUNC void next()
    Definition loader_general.h:268
    -
    STEEL_CONST short BCOLS
    Definition loader_general.h:175
    -
    const int start_row
    Definition loader_general.h:210
    -
    const short base_ww
    Definition loader_general.h:205
    -
    const short bi
    Definition loader_general.h:194
    -
    const device T * src
    Definition loader_general.h:199
    -
    short weight_h
    Definition loader_general.h:207
    -
    const int src_ld
    Definition loader_general.h:190
    -
    const short base_wh
    Definition loader_general.h:204
    -
    short weight_w
    Definition loader_general.h:208
    -
    threadgroup T * dst
    Definition loader_general.h:198
    -
    METAL_FUNC void load_unsafe() const
    Definition loader_general.h:238
    -
    const constant Conv2DGeneralJumpParams * jump_params
    Definition loader_general.h:202
    -
    STEEL_CONST short dst_ld
    Definition loader_general.h:178
    -
    STEEL_CONST short n_rows
    Definition loader_general.h:187
    -
    STEEL_CONST short TROWS
    Definition loader_general.h:184
    -
    const short bj
    Definition loader_general.h:195
    -
    METAL_FUNC Conv2DWeightBlockLoaderGeneral(const device T *src_, threadgroup T *dst_, const int2 offsets, const constant MLXConvParams< 2 > *params_, const constant Conv2DGeneralJumpParams *jump_params_, const short base_wh_, const short base_ww_, uint simd_group_id, uint simd_lane_id)
    Definition loader_general.h:213
    -
    const constant MLXConvParams< 2 > * params
    Definition loader_general.h:201
    -
    STEEL_CONST short TCOLS
    Definition loader_general.h:183
    -
    - - - - diff --git a/docs/build/html/matmul_8h.html b/docs/build/html/matmul_8h.html deleted file mode 100644 index cd4e2fab1..000000000 --- a/docs/build/html/matmul_8h.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/matmul.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    matmul.h File Reference
    -
    -
    -
    #include <algorithm>
    -#include <cassert>
    -#include <sstream>
    -#include "mlx/backend/metal/copy.h"
    -#include "mlx/backend/metal/device.h"
    -#include "mlx/backend/metal/mps/gemm.h"
    -#include "mlx/backend/metal/utils.h"
    -#include "mlx/utils.h"
    -
    -

    Go to the source code of this file.

    - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    - - - - - -

    -Functions

    void mlx::core::steel_matmul_conv_groups (const Stream &s, metal::Device &d, const array &a, const array &b, array &out, int M, int N, int K, int lda, int ldb, int ldd, bool transpose_a, bool transpose_b, int groups, std::vector< array > &copies)
     
    void mlx::core::steel_matmul (const Stream &s, metal::Device &d, const array &a, const array &b, array &out, int M, int N, int K, int batch_size_out, int lda, int ldb, bool transpose_a, bool transpose_b, std::vector< array > &copies, std::vector< int > batch_shape={}, std::vector< size_t > A_batch_stride={}, std::vector< size_t > B_batch_stride={})
     
    -
    - - - - diff --git a/docs/build/html/matmul_8h_source.html b/docs/build/html/matmul_8h_source.html deleted file mode 100644 index a0d044bc9..000000000 --- a/docs/build/html/matmul_8h_source.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/matmul.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    matmul.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023 Apple Inc.
    -
    2
    -
    3#include <algorithm>
    -
    4#include <cassert>
    -
    5#include <sstream>
    -
    6
    - - - - -
    11#include "mlx/utils.h"
    -
    12
    -
    13namespace mlx::core {
    -
    14
    - -
    16 const Stream& s,
    - -
    18 const array& a,
    -
    19 const array& b,
    -
    20 array& out,
    -
    21 int M,
    -
    22 int N,
    -
    23 int K,
    -
    24 int lda,
    -
    25 int ldb,
    -
    26 int ldd,
    -
    27 bool transpose_a,
    -
    28 bool transpose_b,
    -
    29 int groups,
    -
    30 std::vector<array>& copies);
    -
    31
    - -
    33 const Stream& s,
    - -
    35 const array& a,
    -
    36 const array& b,
    -
    37 array& out,
    -
    38 int M,
    -
    39 int N,
    -
    40 int K,
    -
    41 int batch_size_out,
    -
    42 int lda,
    -
    43 int ldb,
    -
    44 bool transpose_a,
    -
    45 bool transpose_b,
    -
    46 std::vector<array>& copies,
    -
    47 std::vector<int> batch_shape = {},
    -
    48 std::vector<size_t> A_batch_stride = {},
    -
    49 std::vector<size_t> B_batch_stride = {});
    -
    50
    -
    51} // namespace mlx::core
    - - -
    Definition array.h:20
    -
    Definition device.h:117
    - - -
    Definition allocator.h:7
    -
    void steel_matmul(const Stream &s, metal::Device &d, const array &a, const array &b, array &out, int M, int N, int K, int batch_size_out, int lda, int ldb, bool transpose_a, bool transpose_b, std::vector< array > &copies, std::vector< int > batch_shape={}, std::vector< size_t > A_batch_stride={}, std::vector< size_t > B_batch_stride={})
    -
    void steel_matmul_conv_groups(const Stream &s, metal::Device &d, const array &a, const array &b, array &out, int M, int N, int K, int lda, int ldb, int ldd, bool transpose_a, bool transpose_b, int groups, std::vector< array > &copies)
    -
    Definition stream.h:9
    - -
    - - - - diff --git a/docs/build/html/menu.js b/docs/build/html/menu.js deleted file mode 100644 index 717761d01..000000000 --- a/docs/build/html/menu.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - @licstart The following is the entire license notice for the JavaScript code in this file. - - The MIT License (MIT) - - Copyright (C) 1997-2020 by Dimitri van Heesch - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or - substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - @licend The above is the entire license notice for the JavaScript code in this file - */ -function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { - function makeTree(data,relPath) { - let result=''; - if ('children' in data) { - result+='
      '; - for (let i in data.children) { - let url; - const link = data.children[i].url; - if (link.substring(0,1)=='^') { - url = link.substring(1); - } else { - url = relPath+link; - } - result+='
    • '+ - data.children[i].text+''+ - makeTree(data.children[i],relPath)+'
    • '; - } - result+='
    '; - } - return result; - } - let searchBoxHtml; - if (searchEnabled) { - if (serverSide) { - searchBoxHtml='
    '+ - '
    '+ - '
     '+ - ''+ - '
    '+ - '
    '+ - '
    '+ - '
    '; - } else { - searchBoxHtml='
    '+ - ''+ - ' '+ - ''+ - ''+ - ''+ - ''+ - ''+ - '
    '; - } - } - - $('#main-nav').before('
    '+ - ''+ - ''+ - '
    '); - $('#main-nav').append(makeTree(menudata,relPath)); - $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); - if (searchBoxHtml) { - $('#main-menu').append('
  • '); - } - const $mainMenuState = $('#main-menu-state'); - let prevWidth = 0; - if ($mainMenuState.length) { - const initResizableIfExists = function() { - if (typeof initResizable==='function') initResizable(); - } - // animate mobile menu - $mainMenuState.change(function() { - const $menu = $('#main-menu'); - let options = { duration: 250, step: initResizableIfExists }; - if (this.checked) { - options['complete'] = () => $menu.css('display', 'block'); - $menu.hide().slideDown(options); - } else { - options['complete'] = () => $menu.css('display', 'none'); - $menu.show().slideUp(options); - } - }); - // set default menu visibility - const resetState = function() { - const $menu = $('#main-menu'); - const newWidth = $(window).outerWidth(); - if (newWidth!=prevWidth) { - if ($(window).outerWidth()<768) { - $mainMenuState.prop('checked',false); $menu.hide(); - $('#searchBoxPos1').html(searchBoxHtml); - $('#searchBoxPos2').hide(); - } else { - $menu.show(); - $('#searchBoxPos1').empty(); - $('#searchBoxPos2').html(searchBoxHtml); - $('#searchBoxPos2').show(); - } - if (typeof searchBox!=='undefined') { - searchBox.CloseResultsWindow(); - } - prevWidth = newWidth; - } - } - $(window).ready(function() { resetState(); initResizableIfExists(); }); - $(window).resize(resetState); - } - $('#main-menu').smartmenus(); -} -/* @license-end */ diff --git a/docs/build/html/menudata.js b/docs/build/html/menudata.js deleted file mode 100644 index 76964b399..000000000 --- a/docs/build/html/menudata.js +++ /dev/null @@ -1,225 +0,0 @@ -/* - @licstart The following is the entire license notice for the JavaScript code in this file. - - The MIT License (MIT) - - Copyright (C) 1997-2020 by Dimitri van Heesch - - Permission is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, publish, distribute, - sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or - substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - @licend The above is the entire license notice for the JavaScript code in this file -*/ -var menudata={children:[ -{text:"Main Page",url:"index.html"}, -{text:"Topics",url:"topics.html"}, -{text:"Namespaces",url:"namespaces.html",children:[ -{text:"Namespace List",url:"namespaces.html"}, -{text:"Namespace Members",url:"namespacemembers.html",children:[ -{text:"All",url:"namespacemembers.html",children:[ -{text:"_",url:"namespacemembers.html#index__5F"}, -{text:"a",url:"namespacemembers_a.html#index_a"}, -{text:"b",url:"namespacemembers_b.html#index_b"}, -{text:"c",url:"namespacemembers_c.html#index_c"}, -{text:"d",url:"namespacemembers_d.html#index_d"}, -{text:"e",url:"namespacemembers_e.html#index_e"}, -{text:"f",url:"namespacemembers_f.html#index_f"}, -{text:"g",url:"namespacemembers_g.html#index_g"}, -{text:"i",url:"namespacemembers_i.html#index_i"}, -{text:"j",url:"namespacemembers_j.html#index_j"}, -{text:"k",url:"namespacemembers_k.html#index_k"}, -{text:"l",url:"namespacemembers_l.html#index_l"}, -{text:"m",url:"namespacemembers_m.html#index_m"}, -{text:"n",url:"namespacemembers_n.html#index_n"}, -{text:"o",url:"namespacemembers_o.html#index_o"}, -{text:"p",url:"namespacemembers_p.html#index_p"}, -{text:"q",url:"namespacemembers_q.html#index_q"}, -{text:"r",url:"namespacemembers_r.html#index_r"}, -{text:"s",url:"namespacemembers_s.html#index_s"}, -{text:"t",url:"namespacemembers_t.html#index_t"}, -{text:"u",url:"namespacemembers_u.html#index_u"}, -{text:"v",url:"namespacemembers_v.html#index_v"}, -{text:"w",url:"namespacemembers_w.html#index_w"}, -{text:"z",url:"namespacemembers_z.html#index_z"}]}, -{text:"Functions",url:"namespacemembers_func.html",children:[ -{text:"_",url:"namespacemembers_func.html#index__5F"}, -{text:"a",url:"namespacemembers_func_a.html#index_a"}, -{text:"b",url:"namespacemembers_func_b.html#index_b"}, -{text:"c",url:"namespacemembers_func_c.html#index_c"}, -{text:"d",url:"namespacemembers_func_d.html#index_d"}, -{text:"e",url:"namespacemembers_func_e.html#index_e"}, -{text:"f",url:"namespacemembers_func_f.html#index_f"}, -{text:"g",url:"namespacemembers_func_g.html#index_g"}, -{text:"i",url:"namespacemembers_func_i.html#index_i"}, -{text:"j",url:"namespacemembers_func_j.html#index_j"}, -{text:"k",url:"namespacemembers_func_k.html#index_k"}, -{text:"l",url:"namespacemembers_func_l.html#index_l"}, -{text:"m",url:"namespacemembers_func_m.html#index_m"}, -{text:"n",url:"namespacemembers_func_n.html#index_n"}, -{text:"o",url:"namespacemembers_func_o.html#index_o"}, -{text:"p",url:"namespacemembers_func_p.html#index_p"}, -{text:"q",url:"namespacemembers_func_q.html#index_q"}, -{text:"r",url:"namespacemembers_func_r.html#index_r"}, -{text:"s",url:"namespacemembers_func_s.html#index_s"}, -{text:"t",url:"namespacemembers_func_t.html#index_t"}, -{text:"u",url:"namespacemembers_func_u.html#index_u"}, -{text:"v",url:"namespacemembers_func_v.html#index_v"}, -{text:"w",url:"namespacemembers_func_w.html#index_w"}, -{text:"z",url:"namespacemembers_func_z.html#index_z"}]}, -{text:"Variables",url:"namespacemembers_vars.html",children:[ -{text:"b",url:"namespacemembers_vars.html#index_b"}, -{text:"c",url:"namespacemembers_vars.html#index_c"}, -{text:"f",url:"namespacemembers_vars.html#index_f"}, -{text:"g",url:"namespacemembers_vars.html#index_g"}, -{text:"i",url:"namespacemembers_vars.html#index_i"}, -{text:"m",url:"namespacemembers_vars.html#index_m"}, -{text:"n",url:"namespacemembers_vars.html#index_n"}, -{text:"s",url:"namespacemembers_vars.html#index_s"}, -{text:"u",url:"namespacemembers_vars.html#index_u"}, -{text:"v",url:"namespacemembers_vars.html#index_v"}]}, -{text:"Typedefs",url:"namespacemembers_type.html"}, -{text:"Enumerations",url:"namespacemembers_enum.html"}, -{text:"Enumerator",url:"namespacemembers_eval.html"}]}]}, -{text:"Classes",url:"annotated.html",children:[ -{text:"Class List",url:"annotated.html"}, -{text:"Class Index",url:"classes.html"}, -{text:"Class Hierarchy",url:"hierarchy.html"}, -{text:"Class Members",url:"functions.html",children:[ -{text:"All",url:"functions.html",children:[ -{text:"_",url:"functions.html#index__5F"}, -{text:"a",url:"functions_a.html#index_a"}, -{text:"b",url:"functions_b.html#index_b"}, -{text:"c",url:"functions_c.html#index_c"}, -{text:"d",url:"functions_d.html#index_d"}, -{text:"e",url:"functions_e.html#index_e"}, -{text:"f",url:"functions_f.html#index_f"}, -{text:"g",url:"functions_g.html#index_g"}, -{text:"h",url:"functions_h.html#index_h"}, -{text:"i",url:"functions_i.html#index_i"}, -{text:"j",url:"functions_j.html#index_j"}, -{text:"k",url:"functions_k.html#index_k"}, -{text:"l",url:"functions_l.html#index_l"}, -{text:"m",url:"functions_m.html#index_m"}, -{text:"n",url:"functions_n.html#index_n"}, -{text:"o",url:"functions_o.html#index_o"}, -{text:"p",url:"functions_p.html#index_p"}, -{text:"q",url:"functions_q.html#index_q"}, -{text:"r",url:"functions_r.html#index_r"}, -{text:"s",url:"functions_s.html#index_s"}, -{text:"t",url:"functions_t.html#index_t"}, -{text:"u",url:"functions_u.html#index_u"}, -{text:"v",url:"functions_v.html#index_v"}, -{text:"w",url:"functions_w.html#index_w"}, -{text:"x",url:"functions_x.html#index_x"}, -{text:"~",url:"functions_~.html#index__7E"}]}, -{text:"Functions",url:"functions_func.html",children:[ -{text:"_",url:"functions_func.html#index__5F"}, -{text:"a",url:"functions_func_a.html#index_a"}, -{text:"b",url:"functions_func_b.html#index_b"}, -{text:"c",url:"functions_func_c.html#index_c"}, -{text:"d",url:"functions_func_d.html#index_d"}, -{text:"e",url:"functions_func_e.html#index_e"}, -{text:"f",url:"functions_func_f.html#index_f"}, -{text:"g",url:"functions_func_g.html#index_g"}, -{text:"h",url:"functions_func_h.html#index_h"}, -{text:"i",url:"functions_func_i.html#index_i"}, -{text:"j",url:"functions_func_j.html#index_j"}, -{text:"k",url:"functions_func_k.html#index_k"}, -{text:"l",url:"functions_func_l.html#index_l"}, -{text:"m",url:"functions_func_m.html#index_m"}, -{text:"n",url:"functions_func_n.html#index_n"}, -{text:"o",url:"functions_func_o.html#index_o"}, -{text:"p",url:"functions_func_p.html#index_p"}, -{text:"q",url:"functions_func_q.html#index_q"}, -{text:"r",url:"functions_func_r.html#index_r"}, -{text:"s",url:"functions_func_s.html#index_s"}, -{text:"t",url:"functions_func_t.html#index_t"}, -{text:"u",url:"functions_func_u.html#index_u"}, -{text:"v",url:"functions_func_v.html#index_v"}, -{text:"w",url:"functions_func_w.html#index_w"}, -{text:"~",url:"functions_func_~.html#index__7E"}]}, -{text:"Variables",url:"functions_vars.html",children:[ -{text:"a",url:"functions_vars.html#index_a"}, -{text:"b",url:"functions_vars_b.html#index_b"}, -{text:"c",url:"functions_vars_c.html#index_c"}, -{text:"d",url:"functions_vars_d.html#index_d"}, -{text:"e",url:"functions_vars_e.html#index_e"}, -{text:"f",url:"functions_vars_f.html#index_f"}, -{text:"g",url:"functions_vars_g.html#index_g"}, -{text:"i",url:"functions_vars_i.html#index_i"}, -{text:"j",url:"functions_vars_j.html#index_j"}, -{text:"k",url:"functions_vars_k.html#index_k"}, -{text:"l",url:"functions_vars_l.html#index_l"}, -{text:"m",url:"functions_vars_m.html#index_m"}, -{text:"n",url:"functions_vars_n.html#index_n"}, -{text:"o",url:"functions_vars_o.html#index_o"}, -{text:"p",url:"functions_vars_p.html#index_p"}, -{text:"q",url:"functions_vars_q.html#index_q"}, -{text:"r",url:"functions_vars_r.html#index_r"}, -{text:"s",url:"functions_vars_s.html#index_s"}, -{text:"t",url:"functions_vars_t.html#index_t"}, -{text:"v",url:"functions_vars_v.html#index_v"}, -{text:"w",url:"functions_vars_w.html#index_w"}]}, -{text:"Typedefs",url:"functions_type.html"}, -{text:"Enumerations",url:"functions_enum.html"}, -{text:"Enumerator",url:"functions_eval.html"}, -{text:"Related Symbols",url:"functions_rela.html"}]}]}, -{text:"Files",url:"files.html",children:[ -{text:"File List",url:"files.html"}, -{text:"File Members",url:"globals.html",children:[ -{text:"All",url:"globals.html",children:[ -{text:"_",url:"globals.html#index__5F"}, -{text:"a",url:"globals_a.html#index_a"}, -{text:"b",url:"globals_b.html#index_b"}, -{text:"c",url:"globals_c.html#index_c"}, -{text:"d",url:"globals_d.html#index_d"}, -{text:"e",url:"globals_e.html#index_e"}, -{text:"f",url:"globals_f.html#index_f"}, -{text:"g",url:"globals_g.html#index_g"}, -{text:"h",url:"globals_h.html#index_h"}, -{text:"i",url:"globals_i.html#index_i"}, -{text:"l",url:"globals_l.html#index_l"}, -{text:"m",url:"globals_m.html#index_m"}, -{text:"n",url:"globals_n.html#index_n"}, -{text:"o",url:"globals_o.html#index_o"}, -{text:"p",url:"globals_p.html#index_p"}, -{text:"r",url:"globals_r.html#index_r"}, -{text:"s",url:"globals_s.html#index_s"}, -{text:"u",url:"globals_u.html#index_u"}]}, -{text:"Functions",url:"globals_func.html",children:[ -{text:"b",url:"globals_func.html#index_b"}, -{text:"c",url:"globals_func_c.html#index_c"}, -{text:"e",url:"globals_func_e.html#index_e"}, -{text:"f",url:"globals_func_f.html#index_f"}, -{text:"g",url:"globals_func_g.html#index_g"}, -{text:"l",url:"globals_func_l.html#index_l"}, -{text:"m",url:"globals_func_m.html#index_m"}, -{text:"o",url:"globals_func_o.html#index_o"}, -{text:"s",url:"globals_func_s.html#index_s"}]}, -{text:"Variables",url:"globals_vars.html"}, -{text:"Typedefs",url:"globals_type.html"}, -{text:"Macros",url:"globals_defs.html",children:[ -{text:"_",url:"globals_defs.html#index__5F"}, -{text:"a",url:"globals_defs.html#index_a"}, -{text:"b",url:"globals_defs.html#index_b"}, -{text:"c",url:"globals_defs.html#index_c"}, -{text:"d",url:"globals_defs.html#index_d"}, -{text:"f",url:"globals_defs.html#index_f"}, -{text:"h",url:"globals_defs.html#index_h"}, -{text:"i",url:"globals_defs.html#index_i"}, -{text:"m",url:"globals_defs.html#index_m"}, -{text:"p",url:"globals_defs.html#index_p"}, -{text:"s",url:"globals_defs.html#index_s"}, -{text:"u",url:"globals_defs.html#index_u"}]}]}]}]} diff --git a/docs/build/html/metal_2compiled__preamble_8h.html b/docs/build/html/metal_2compiled__preamble_8h.html deleted file mode 100644 index 6c5c7d1cf..000000000 --- a/docs/build/html/metal_2compiled__preamble_8h.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/compiled_preamble.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    compiled_preamble.h File Reference
    -
    -
    - -

    Go to the source code of this file.

    - - - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    namespace  mlx::core::metal
     
    - - - -

    -Functions

    const char * mlx::core::metal::get_kernel_preamble ()
     
    -
    - - - - diff --git a/docs/build/html/metal_2compiled__preamble_8h_source.html b/docs/build/html/metal_2compiled__preamble_8h_source.html deleted file mode 100644 index 253b15424..000000000 --- a/docs/build/html/metal_2compiled__preamble_8h_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/compiled_preamble.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    compiled_preamble.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-24 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5namespace mlx::core::metal {
    -
    6
    -
    7const char* get_kernel_preamble();
    -
    8
    -
    9}
    -
    Definition allocator.h:12
    -
    const char * get_kernel_preamble()
    -
    - - - - diff --git a/docs/build/html/metal_2copy_8h.html b/docs/build/html/metal_2copy_8h.html deleted file mode 100644 index 4f777e810..000000000 --- a/docs/build/html/metal_2copy_8h.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/copy.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    copy.h File Reference
    -
    -
    -
    #include "mlx/backend/common/copy.h"
    -#include "mlx/stream.h"
    -
    -

    Go to the source code of this file.

    - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    - - - - - - - - - - - - -

    -Functions

    template<typename stride_t >
    void mlx::core::copy_gpu_inplace (const array &in, array &out, const std::vector< int > &data_shape, const std::vector< stride_t > &i_strides, const std::vector< stride_t > &o_strides, int64_t i_offset, int64_t o_offset, CopyType ctype, const Stream &s)
     
    void mlx::core::copy_gpu (const array &src, array &out, CopyType ctype, const Stream &s)
     
    void mlx::core::copy_gpu (const array &src, array &out, CopyType ctype)
     
    void mlx::core::copy_gpu_inplace (const array &src, array &out, CopyType ctype, const Stream &s)
     
    void mlx::core::copy_gpu_inplace (const array &in, array &out, const std::vector< int64_t > &istride, int64_t ioffset, CopyType ctype, const Stream &s)
     
    -
    - - - - diff --git a/docs/build/html/metal_2copy_8h_source.html b/docs/build/html/metal_2copy_8h_source.html deleted file mode 100644 index 179f4a764..000000000 --- a/docs/build/html/metal_2copy_8h_source.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/copy.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    copy.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    - -
    6#include "mlx/stream.h"
    -
    7
    -
    8namespace mlx::core {
    -
    9
    -
    10// Generic copy inplace
    -
    11template <typename stride_t>
    - -
    13 const array& in,
    -
    14 array& out,
    -
    15 const std::vector<int>& data_shape,
    -
    16 const std::vector<stride_t>& i_strides,
    -
    17 const std::vector<stride_t>& o_strides,
    -
    18 int64_t i_offset,
    -
    19 int64_t o_offset,
    -
    20 CopyType ctype,
    -
    21 const Stream& s);
    -
    22
    -
    23void copy_gpu(const array& src, array& out, CopyType ctype, const Stream& s);
    -
    24void copy_gpu(const array& src, array& out, CopyType ctype);
    -
    25
    - -
    27 const array& src,
    -
    28 array& out,
    -
    29 CopyType ctype,
    -
    30 const Stream& s);
    -
    31
    - -
    33 const array& in,
    -
    34 array& out,
    -
    35 const std::vector<int64_t>& istride,
    -
    36 int64_t ioffset,
    -
    37 CopyType ctype,
    -
    38 const Stream& s);
    -
    39
    -
    40} // namespace mlx::core
    -
    Definition array.h:20
    - -
    Definition allocator.h:7
    -
    void copy_gpu_inplace(const array &in, array &out, const std::vector< int > &data_shape, const std::vector< stride_t > &i_strides, const std::vector< stride_t > &o_strides, int64_t i_offset, int64_t o_offset, CopyType ctype, const Stream &s)
    -
    CopyType
    Definition copy.h:10
    -
    void copy_gpu(const array &src, array &out, CopyType ctype, const Stream &s)
    - -
    Definition stream.h:9
    -
    - - - - diff --git a/docs/build/html/metal_2kernels_2binary_8h.html b/docs/build/html/metal_2kernels_2binary_8h.html deleted file mode 100644 index 8b7b04b42..000000000 --- a/docs/build/html/metal_2kernels_2binary_8h.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/binary.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    binary.h File Reference
    -
    -
    -
    #include <metal_integer>
    -#include <metal_math>
    -#include "mlx/backend/metal/kernels/bf16.h"
    -#include "mlx/backend/metal/kernels/utils.h"
    -
    -

    Go to the source code of this file.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Classes

    struct  Add
     
    struct  Divide
     
    struct  Remainder
     
    struct  Equal
     
    struct  NaNEqual
     
    struct  Greater
     
    struct  GreaterEqual
     
    struct  Less
     
    struct  LessEqual
     
    struct  LogAddExp
     
    struct  Maximum
     
    struct  Minimum
     
    struct  Multiply
     
    struct  NotEqual
     
    struct  Power
     
    struct  Subtract
     
    struct  LogicalAnd
     
    struct  LogicalOr
     
    struct  BitwiseAnd
     
    struct  BitwiseOr
     
    struct  BitwiseXor
     
    struct  LeftShift
     
    struct  RightShift
     
    struct  ArcTan2
     
    -
    - - - - diff --git a/docs/build/html/metal_2kernels_2binary_8h_source.html b/docs/build/html/metal_2kernels_2binary_8h_source.html deleted file mode 100644 index 3400e527e..000000000 --- a/docs/build/html/metal_2kernels_2binary_8h_source.html +++ /dev/null @@ -1,559 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/binary.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    binary.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <metal_integer>
    -
    6#include <metal_math>
    -
    7
    - - -
    10
    -
    -
    11struct Add {
    -
    12 template <typename T>
    -
    -
    13 T operator()(T x, T y) {
    -
    14 return x + y;
    -
    15 }
    -
    -
    16};
    -
    -
    17
    -
    -
    18struct Divide {
    -
    19 template <typename T>
    -
    -
    20 T operator()(T x, T y) {
    -
    21 return x / y;
    -
    22 }
    -
    -
    23};
    -
    -
    24
    -
    -
    25struct Remainder {
    -
    26 template <typename T>
    -
    27 metal::enable_if_t<metal::is_integral_v<T> & !metal::is_signed_v<T>, T>
    -
    -
    28 operator()(T x, T y) {
    -
    29 return x % y;
    -
    30 }
    -
    -
    31 template <typename T>
    -
    32 metal::enable_if_t<metal::is_integral_v<T> & metal::is_signed_v<T>, T>
    -
    -
    33 operator()(T x, T y) {
    -
    34 auto r = x % y;
    -
    35 if (r != 0 && (r < 0 != y < 0)) {
    -
    36 r += y;
    -
    37 }
    -
    38 return r;
    -
    39 }
    -
    -
    40 template <typename T>
    -
    -
    41 metal::enable_if_t<!metal::is_integral_v<T>, T> operator()(T x, T y) {
    -
    42 T r = fmod(x, y);
    -
    43 if (r != 0 && (r < 0 != y < 0)) {
    -
    44 r += y;
    -
    45 }
    -
    46 return r;
    -
    47 }
    -
    -
    48 template <>
    -
    - -
    50 return x % y;
    -
    51 }
    -
    -
    52};
    -
    -
    53
    -
    -
    54struct Equal {
    -
    55 template <typename T>
    -
    -
    56 bool operator()(T x, T y) {
    -
    57 return x == y;
    -
    58 }
    -
    -
    59};
    -
    -
    60
    -
    -
    61struct NaNEqual {
    -
    62 template <typename T>
    -
    -
    63 bool operator()(T x, T y) {
    -
    64 return x == y || (metal::isnan(x) && metal::isnan(y));
    -
    65 }
    -
    -
    66 template <>
    -
    - -
    68 return x == y ||
    - -
    70 metal::isnan(y.imag)) ||
    -
    71 (x.real == y.real && metal::isnan(x.imag) && metal::isnan(y.imag)) ||
    -
    72 (metal::isnan(x.real) && metal::isnan(y.real) && x.imag == y.imag);
    -
    73 }
    -
    -
    74};
    -
    -
    75
    -
    -
    76struct Greater {
    -
    77 template <typename T>
    -
    -
    78 bool operator()(T x, T y) {
    -
    79 return x > y;
    -
    80 }
    -
    -
    81};
    -
    -
    82
    -
    - -
    84 template <typename T>
    -
    -
    85 bool operator()(T x, T y) {
    -
    86 return x >= y;
    -
    87 }
    -
    -
    88};
    -
    -
    89
    -
    -
    90struct Less {
    -
    91 template <typename T>
    -
    -
    92 bool operator()(T x, T y) {
    -
    93 return x < y;
    -
    94 }
    -
    -
    95};
    -
    -
    96
    -
    -
    97struct LessEqual {
    -
    98 template <typename T>
    -
    -
    99 bool operator()(T x, T y) {
    -
    100 return x <= y;
    -
    101 }
    -
    -
    102};
    -
    -
    103
    -
    -
    104struct LogAddExp {
    -
    105 template <typename T>
    -
    -
    106 T operator()(T x, T y) {
    -
    107 if (metal::isnan(x) || metal::isnan(y)) {
    -
    108 return metal::numeric_limits<T>::quiet_NaN();
    -
    109 }
    -
    110 constexpr T inf = metal::numeric_limits<T>::infinity();
    -
    111 T maxval = metal::max(x, y);
    -
    112 T minval = metal::min(x, y);
    -
    113 return (minval == -inf || maxval == inf)
    -
    114 ? maxval
    -
    115 : (maxval + log1p(metal::exp(minval - maxval)));
    -
    116 };
    -
    -
    117};
    -
    -
    118
    -
    -
    119struct Maximum {
    -
    120 template <typename T>
    -
    -
    121 metal::enable_if_t<metal::is_integral_v<T>, T> operator()(T x, T y) {
    -
    122 return metal::max(x, y);
    -
    123 }
    -
    -
    124
    -
    125 template <typename T>
    -
    -
    126 metal::enable_if_t<!metal::is_integral_v<T>, T> operator()(T x, T y) {
    -
    127 if (metal::isnan(x)) {
    -
    128 return x;
    -
    129 }
    -
    130 return x > y ? x : y;
    -
    131 }
    -
    -
    132
    -
    133 template <>
    -
    - -
    135 if (metal::isnan(x.real) || metal::isnan(x.imag)) {
    -
    136 return x;
    -
    137 }
    -
    138 return x > y ? x : y;
    -
    139 }
    -
    -
    140};
    -
    -
    141
    -
    -
    142struct Minimum {
    -
    143 template <typename T>
    -
    -
    144 metal::enable_if_t<metal::is_integral_v<T>, T> operator()(T x, T y) {
    -
    145 return metal::min(x, y);
    -
    146 }
    -
    -
    147
    -
    148 template <typename T>
    -
    -
    149 metal::enable_if_t<!metal::is_integral_v<T>, T> operator()(T x, T y) {
    -
    150 if (metal::isnan(x)) {
    -
    151 return x;
    -
    152 }
    -
    153 return x < y ? x : y;
    -
    154 }
    -
    -
    155
    -
    156 template <>
    -
    - -
    158 if (metal::isnan(x.real) || metal::isnan(x.imag)) {
    -
    159 return x;
    -
    160 }
    -
    161 return x < y ? x : y;
    -
    162 }
    -
    -
    163};
    -
    -
    164
    -
    -
    165struct Multiply {
    -
    166 template <typename T>
    -
    -
    167 T operator()(T x, T y) {
    -
    168 return x * y;
    -
    169 }
    -
    -
    170};
    -
    -
    171
    -
    -
    172struct NotEqual {
    -
    173 template <typename T>
    -
    -
    174 bool operator()(T x, T y) {
    -
    175 return x != y;
    -
    176 }
    -
    -
    177 template <>
    -
    - -
    179 return x.real != y.real || x.imag != y.imag;
    -
    180 }
    -
    -
    181};
    -
    -
    182
    -
    -
    183struct Power {
    -
    184 template <typename T>
    -
    -
    185 metal::enable_if_t<!metal::is_integral_v<T>, T> operator()(T base, T exp) {
    -
    186 return metal::pow(base, exp);
    -
    187 }
    -
    -
    188
    -
    189 template <typename T>
    -
    -
    190 metal::enable_if_t<metal::is_integral_v<T>, T> operator()(T base, T exp) {
    -
    191 T res = 1;
    -
    192 while (exp) {
    -
    193 if (exp & 1) {
    -
    194 res *= base;
    -
    195 }
    -
    196 exp >>= 1;
    -
    197 base *= base;
    -
    198 }
    -
    199 return res;
    -
    200 }
    -
    -
    201
    -
    202 template <>
    -
    - -
    204 auto x_theta = metal::atan(x.imag / x.real);
    -
    205 auto x_ln_r = 0.5 * metal::log(x.real * x.real + x.imag * x.imag);
    -
    206 auto mag = metal::exp(y.real * x_ln_r - y.imag * x_theta);
    -
    207 auto phase = y.imag * x_ln_r + y.real * x_theta;
    -
    208 return {mag * metal::cos(phase), mag * metal::sin(phase)};
    -
    209 }
    -
    -
    210};
    -
    -
    211
    -
    -
    212struct Subtract {
    -
    213 template <typename T>
    -
    -
    214 T operator()(T x, T y) {
    -
    215 return x - y;
    -
    216 }
    -
    -
    217};
    -
    -
    218
    -
    - -
    220 template <typename T>
    -
    -
    221 T operator()(T x, T y) {
    -
    222 return x && y;
    -
    223 };
    -
    -
    224};
    -
    -
    225
    -
    -
    226struct LogicalOr {
    -
    227 template <typename T>
    -
    -
    228 T operator()(T x, T y) {
    -
    229 return x || y;
    -
    230 };
    -
    -
    231};
    -
    -
    232
    -
    - -
    234 template <typename T>
    -
    -
    235 T operator()(T x, T y) {
    -
    236 return x & y;
    -
    237 };
    -
    -
    238};
    -
    -
    239
    -
    -
    240struct BitwiseOr {
    -
    241 template <typename T>
    -
    -
    242 T operator()(T x, T y) {
    -
    243 return x | y;
    -
    244 };
    -
    -
    245};
    -
    -
    246
    -
    - -
    248 template <typename T>
    -
    -
    249 T operator()(T x, T y) {
    -
    250 return x ^ y;
    -
    251 };
    -
    -
    252};
    -
    -
    253
    -
    -
    254struct LeftShift {
    -
    255 template <typename T>
    -
    -
    256 T operator()(T x, T y) {
    -
    257 return x << y;
    -
    258 };
    -
    -
    259};
    -
    -
    260
    -
    - -
    262 template <typename T>
    -
    -
    263 T operator()(T x, T y) {
    -
    264 return x >> y;
    -
    265 };
    -
    -
    266};
    -
    -
    267
    -
    -
    268struct ArcTan2 {
    -
    269 template <typename T>
    -
    -
    270 T operator()(T y, T x) {
    -
    271 return metal::precise::atan2(y, x);
    -
    272 }
    -
    -
    273};
    -
    - - -
    float log1p(float x)
    Definition utils.h:298
    -
    METAL_FUNC bfloat16_t atan2(bfloat16_t y, bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t cos(bfloat16_t x)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t fmod(bfloat16_t x, bfloat16_t y)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t log(bfloat16_t x)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t sin(bfloat16_t x)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t min(bfloat16_t x, bfloat16_t y)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t atan(bfloat16_t y_over_x)
    Definition bf16_math.h:234
    -
    METAL_FUNC bool isnan(_MLX_BFloat16 x)
    Definition bf16.h:307
    -
    METAL_FUNC bfloat16_t max(bfloat16_t x, bfloat16_t y)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t exp(bfloat16_t x)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t pow(bfloat16_t x, bfloat16_t y)
    Definition bf16_math.h:234
    -
    Definition binary.h:11
    -
    T operator()(T x, T y)
    Definition binary.h:13
    -
    Definition binary.h:268
    -
    T operator()(T y, T x)
    Definition binary.h:270
    -
    Definition binary.h:233
    -
    T operator()(T x, T y)
    Definition binary.h:235
    -
    Definition binary.h:240
    -
    T operator()(T x, T y)
    Definition binary.h:242
    -
    Definition binary.h:247
    -
    T operator()(T x, T y)
    Definition binary.h:249
    -
    Definition binary.h:18
    -
    T operator()(T x, T y)
    Definition binary.h:20
    -
    Definition binary.h:54
    -
    bool operator()(T x, T y)
    Definition binary.h:56
    -
    Definition binary.h:83
    -
    bool operator()(T x, T y)
    Definition binary.h:85
    -
    Definition binary.h:76
    -
    bool operator()(T x, T y)
    Definition binary.h:78
    -
    Definition binary.h:254
    -
    T operator()(T x, T y)
    Definition binary.h:256
    -
    Definition binary.h:97
    -
    bool operator()(T x, T y)
    Definition binary.h:99
    -
    Definition binary.h:90
    -
    bool operator()(T x, T y)
    Definition binary.h:92
    -
    Definition binary.h:104
    -
    T operator()(T x, T y)
    Definition binary.h:106
    -
    Definition binary.h:219
    -
    T operator()(T x, T y)
    Definition binary.h:221
    -
    Definition binary.h:226
    -
    T operator()(T x, T y)
    Definition binary.h:228
    -
    Definition binary.h:119
    -
    metal::enable_if_t<!metal::is_integral_v< T >, T > operator()(T x, T y)
    Definition binary.h:126
    -
    metal::enable_if_t< metal::is_integral_v< T >, T > operator()(T x, T y)
    Definition binary.h:121
    -
    complex64_t operator()(complex64_t x, complex64_t y)
    Definition binary.h:134
    -
    Definition binary.h:142
    -
    metal::enable_if_t<!metal::is_integral_v< T >, T > operator()(T x, T y)
    Definition binary.h:149
    -
    complex64_t operator()(complex64_t x, complex64_t y)
    Definition binary.h:157
    -
    metal::enable_if_t< metal::is_integral_v< T >, T > operator()(T x, T y)
    Definition binary.h:144
    -
    Definition binary.h:165
    -
    T operator()(T x, T y)
    Definition binary.h:167
    -
    Definition binary.h:61
    -
    bool operator()(T x, T y)
    Definition binary.h:63
    -
    bool operator()(complex64_t x, complex64_t y)
    Definition binary.h:67
    -
    Definition binary.h:172
    -
    bool operator()(complex64_t x, complex64_t y)
    Definition binary.h:178
    -
    bool operator()(T x, T y)
    Definition binary.h:174
    -
    Definition binary.h:183
    -
    complex64_t operator()(complex64_t x, complex64_t y)
    Definition binary.h:203
    -
    metal::enable_if_t<!metal::is_integral_v< T >, T > operator()(T base, T exp)
    Definition binary.h:185
    -
    metal::enable_if_t< metal::is_integral_v< T >, T > operator()(T base, T exp)
    Definition binary.h:190
    -
    Definition binary.h:25
    -
    metal::enable_if_t< metal::is_integral_v< T > &metal::is_signed_v< T >, T > operator()(T x, T y)
    Definition binary.h:33
    -
    metal::enable_if_t<!metal::is_integral_v< T >, T > operator()(T x, T y)
    Definition binary.h:41
    -
    metal::enable_if_t< metal::is_integral_v< T > &!metal::is_signed_v< T >, T > operator()(T x, T y)
    Definition binary.h:28
    -
    complex64_t operator()(complex64_t x, complex64_t y)
    Definition binary.h:49
    -
    Definition binary.h:261
    -
    T operator()(T x, T y)
    Definition binary.h:263
    -
    Definition binary.h:212
    -
    T operator()(T x, T y)
    Definition binary.h:214
    -
    Definition complex.h:20
    -
    float imag
    Definition complex.h:22
    -
    float real
    Definition complex.h:21
    -
    - - - - diff --git a/docs/build/html/metal_2kernels_2compiled__preamble_8h.html b/docs/build/html/metal_2kernels_2compiled__preamble_8h.html deleted file mode 100644 index a57745f5a..000000000 --- a/docs/build/html/metal_2kernels_2compiled__preamble_8h.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/compiled_preamble.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    compiled_preamble.h File Reference
    -
    -
    - -

    Go to the source code of this file.

    - - - - -

    -Typedefs

    typedef half float16_t
     
    -

    Typedef Documentation

    - -

    ◆ float16_t

    - -
    -
    - - - - -
    typedef half float16_t
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/metal_2kernels_2compiled__preamble_8h_source.html b/docs/build/html/metal_2kernels_2compiled__preamble_8h_source.html deleted file mode 100644 index f3996d3f2..000000000 --- a/docs/build/html/metal_2kernels_2compiled__preamble_8h_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/compiled_preamble.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    compiled_preamble.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    - - - -
    6
    -
    7typedef half float16_t;
    - -
    half float16_t
    Definition compiled_preamble.h:7
    - - -
    - - - - diff --git a/docs/build/html/metal_2kernels_2ternary_8h.html b/docs/build/html/metal_2kernels_2ternary_8h.html deleted file mode 100644 index e9a43467d..000000000 --- a/docs/build/html/metal_2kernels_2ternary_8h.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/ternary.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    ternary.h File Reference
    -
    -
    - -

    Go to the source code of this file.

    - - - - -

    -Classes

    struct  Select
     
    -
    - - - - diff --git a/docs/build/html/metal_2kernels_2ternary_8h_source.html b/docs/build/html/metal_2kernels_2ternary_8h_source.html deleted file mode 100644 index f843e445b..000000000 --- a/docs/build/html/metal_2kernels_2ternary_8h_source.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/ternary.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    ternary.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    -
    5struct Select {
    -
    6 template <typename T>
    -
    -
    7 T operator()(bool condition, T x, T y) {
    -
    8 return condition ? x : y;
    -
    9 }
    -
    -
    10};
    -
    -
    Definition ternary.h:5
    -
    T operator()(bool condition, T x, T y)
    Definition ternary.h:7
    -
    - - - - diff --git a/docs/build/html/metal_2kernels_2unary_8h.html b/docs/build/html/metal_2kernels_2unary_8h.html deleted file mode 100644 index c3db76056..000000000 --- a/docs/build/html/metal_2kernels_2unary_8h.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/unary.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    unary.h File Reference
    -
    -
    -
    #include <metal_integer>
    -#include <metal_math>
    -#include "mlx/backend/metal/kernels/bf16.h"
    -#include "mlx/backend/metal/kernels/erf.h"
    -#include "mlx/backend/metal/kernels/expm1f.h"
    -#include "mlx/backend/metal/kernels/utils.h"
    -
    -

    Go to the source code of this file.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Classes

    struct  Abs
     
    struct  ArcCos
     
    struct  ArcCosh
     
    struct  ArcSin
     
    struct  ArcSinh
     
    struct  ArcTan
     
    struct  ArcTanh
     
    struct  Ceil
     
    struct  Cos
     
    struct  Cosh
     
    struct  Conjugate
     
    struct  Erf
     
    struct  ErfInv
     
    struct  Exp
     
    struct  Expm1
     
    struct  Floor
     
    struct  Log
     
    struct  Log2
     
    struct  Log10
     
    struct  Log1p
     
    struct  LogicalNot
     
    struct  Negative
     
    struct  Round
     
    struct  Sigmoid
     
    struct  Sign
     
    struct  Sin
     
    struct  Sinh
     
    struct  Square
     
    struct  Sqrt
     
    struct  Rsqrt
     
    struct  Tan
     
    struct  Tanh
     
    -
    - - - - diff --git a/docs/build/html/metal_2kernels_2unary_8h_source.html b/docs/build/html/metal_2kernels_2unary_8h_source.html deleted file mode 100644 index 44d5b22da..000000000 --- a/docs/build/html/metal_2kernels_2unary_8h_source.html +++ /dev/null @@ -1,811 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/unary.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    unary.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <metal_integer>
    -
    6#include <metal_math>
    -
    7
    - - - - -
    12
    -
    13namespace {
    -
    14constant float inf = metal::numeric_limits<float>::infinity();
    -
    15}
    -
    16
    -
    -
    17struct Abs {
    -
    18 template <typename T>
    -
    -
    19 T operator()(T x) {
    -
    20 return metal::abs(x);
    -
    21 };
    -
    -
    22 template <>
    -
    -
    23 uint8_t operator()(uint8_t x) {
    -
    24 return x;
    -
    25 };
    -
    -
    26 template <>
    -
    -
    27 uint16_t operator()(uint16_t x) {
    -
    28 return x;
    -
    29 };
    -
    -
    30 template <>
    -
    -
    31 uint32_t operator()(uint32_t x) {
    -
    32 return x;
    -
    33 };
    -
    -
    34 template <>
    -
    -
    35 uint64_t operator()(uint64_t x) {
    -
    36 return x;
    -
    37 };
    -
    -
    38 template <>
    -
    -
    39 bool operator()(bool x) {
    -
    40 return x;
    -
    41 };
    -
    -
    42 template <>
    -
    - -
    44 return {metal::precise::sqrt(x.real * x.real + x.imag * x.imag), 0};
    -
    45 };
    -
    -
    46};
    -
    -
    47
    -
    -
    48struct ArcCos {
    -
    49 template <typename T>
    -
    -
    50 T operator()(T x) {
    -
    51 return metal::precise::acos(x);
    -
    52 };
    -
    -
    53};
    -
    -
    54
    -
    -
    55struct ArcCosh {
    -
    56 template <typename T>
    -
    -
    57 T operator()(T x) {
    -
    58 return metal::precise::acosh(x);
    -
    59 };
    -
    -
    60};
    -
    -
    61
    -
    -
    62struct ArcSin {
    -
    63 template <typename T>
    -
    -
    64 T operator()(T x) {
    -
    65 return metal::precise::asin(x);
    -
    66 };
    -
    -
    67};
    -
    -
    68
    -
    -
    69struct ArcSinh {
    -
    70 template <typename T>
    -
    -
    71 T operator()(T x) {
    -
    72 return metal::precise::asinh(x);
    -
    73 };
    -
    -
    74};
    -
    -
    75
    -
    -
    76struct ArcTan {
    -
    77 template <typename T>
    -
    -
    78 T operator()(T x) {
    -
    79 return metal::precise::atan(x);
    -
    80 };
    -
    -
    81};
    -
    -
    82
    -
    -
    83struct ArcTanh {
    -
    84 template <typename T>
    -
    -
    85 T operator()(T x) {
    -
    86 return metal::precise::atanh(x);
    -
    87 };
    -
    -
    88};
    -
    -
    89
    -
    -
    90struct Ceil {
    -
    91 template <typename T>
    -
    -
    92 T operator()(T x) {
    -
    93 return metal::ceil(x);
    -
    94 };
    -
    -
    95 template <>
    -
    -
    96 int8_t operator()(int8_t x) {
    -
    97 return x;
    -
    98 };
    -
    -
    99 template <>
    -
    -
    100 int16_t operator()(int16_t x) {
    -
    101 return x;
    -
    102 };
    -
    -
    103 template <>
    -
    -
    104 int32_t operator()(int32_t x) {
    -
    105 return x;
    -
    106 };
    -
    -
    107 template <>
    -
    -
    108 int64_t operator()(int64_t x) {
    -
    109 return x;
    -
    110 };
    -
    -
    111 template <>
    -
    -
    112 uint8_t operator()(uint8_t x) {
    -
    113 return x;
    -
    114 };
    -
    -
    115 template <>
    -
    -
    116 uint16_t operator()(uint16_t x) {
    -
    117 return x;
    -
    118 };
    -
    -
    119 template <>
    -
    -
    120 uint32_t operator()(uint32_t x) {
    -
    121 return x;
    -
    122 };
    -
    -
    123 template <>
    -
    -
    124 uint64_t operator()(uint64_t x) {
    -
    125 return x;
    -
    126 };
    -
    -
    127 template <>
    -
    -
    128 bool operator()(bool x) {
    -
    129 return x;
    -
    130 };
    -
    -
    131};
    -
    -
    132
    -
    -
    133struct Cos {
    -
    134 template <typename T>
    -
    -
    135 T operator()(T x) {
    -
    136 return metal::precise::cos(x);
    -
    137 };
    -
    -
    138
    -
    139 template <>
    - -
    145};
    -
    -
    146
    -
    -
    147struct Cosh {
    -
    148 template <typename T>
    -
    -
    149 T operator()(T x) {
    -
    150 return metal::precise::cosh(x);
    -
    151 };
    -
    -
    152
    -
    153 template <>
    - -
    159};
    -
    -
    160
    -
    -
    161struct Conjugate {
    -
    - -
    163 return complex64_t{x.real, -x.imag};
    -
    164 }
    -
    -
    165};
    -
    -
    166
    -
    -
    167struct Erf {
    -
    168 template <typename T>
    -
    -
    169 T operator()(T x) {
    -
    170 return static_cast<T>(erf(static_cast<float>(x)));
    -
    171 };
    -
    -
    172};
    -
    -
    173
    -
    -
    174struct ErfInv {
    -
    175 template <typename T>
    -
    -
    176 T operator()(T x) {
    -
    177 return static_cast<T>(erfinv(static_cast<float>(x)));
    -
    178 };
    -
    -
    179};
    -
    -
    180
    -
    -
    181struct Exp {
    -
    182 template <typename T>
    -
    -
    183 T operator()(T x) {
    -
    184 return metal::precise::exp(x);
    -
    185 };
    -
    -
    186 template <>
    -
    - -
    188 auto m = metal::precise::exp(x.real);
    -
    189 return {m * metal::precise::cos(x.imag), m * metal::precise::sin(x.imag)};
    -
    190 }
    -
    -
    191};
    -
    -
    192
    -
    -
    193struct Expm1 {
    -
    194 template <typename T>
    -
    -
    195 T operator()(T x) {
    -
    196 return static_cast<T>(expm1f(static_cast<float>(x)));
    -
    197 };
    -
    -
    198};
    -
    -
    199
    -
    -
    200struct Floor {
    -
    201 template <typename T>
    -
    -
    202 T operator()(T x) {
    -
    203 return metal::floor(x);
    -
    204 };
    -
    -
    205 template <>
    -
    -
    206 int8_t operator()(int8_t x) {
    -
    207 return x;
    -
    208 };
    -
    -
    209 template <>
    -
    -
    210 int16_t operator()(int16_t x) {
    -
    211 return x;
    -
    212 };
    -
    -
    213 template <>
    -
    -
    214 int32_t operator()(int32_t x) {
    -
    215 return x;
    -
    216 };
    -
    -
    217 template <>
    -
    -
    218 int64_t operator()(int64_t x) {
    -
    219 return x;
    -
    220 };
    -
    -
    221 template <>
    -
    -
    222 uint8_t operator()(uint8_t x) {
    -
    223 return x;
    -
    224 };
    -
    -
    225 template <>
    -
    -
    226 uint16_t operator()(uint16_t x) {
    -
    227 return x;
    -
    228 };
    -
    -
    229 template <>
    -
    -
    230 uint32_t operator()(uint32_t x) {
    -
    231 return x;
    -
    232 };
    -
    -
    233 template <>
    -
    -
    234 uint64_t operator()(uint64_t x) {
    -
    235 return x;
    -
    236 };
    -
    -
    237 template <>
    -
    -
    238 bool operator()(bool x) {
    -
    239 return x;
    -
    240 };
    -
    -
    241};
    -
    -
    242
    -
    -
    243struct Log {
    -
    244 template <typename T>
    -
    -
    245 T operator()(T x) {
    -
    246 return metal::precise::log(x);
    -
    247 };
    -
    -
    248};
    -
    -
    249
    -
    -
    250struct Log2 {
    -
    251 template <typename T>
    -
    -
    252 T operator()(T x) {
    -
    253 return metal::precise::log2(x);
    -
    254 };
    -
    -
    255};
    -
    -
    256
    -
    -
    257struct Log10 {
    -
    258 template <typename T>
    -
    -
    259 T operator()(T x) {
    -
    260 return metal::precise::log10(x);
    -
    261 };
    -
    -
    262};
    -
    -
    263
    -
    -
    264struct Log1p {
    -
    265 template <typename T>
    -
    -
    266 T operator()(T x) {
    -
    267 return log1p(x);
    -
    268 };
    -
    -
    269};
    -
    -
    270
    -
    - -
    272 template <typename T>
    -
    -
    273 T operator()(T x) {
    -
    274 return !x;
    -
    275 };
    -
    -
    276};
    -
    -
    277
    -
    -
    278struct Negative {
    -
    279 template <typename T>
    -
    -
    280 T operator()(T x) {
    -
    281 return -x;
    -
    282 };
    -
    -
    283};
    -
    -
    284
    -
    -
    285struct Round {
    -
    286 template <typename T>
    -
    -
    287 T operator()(T x) {
    -
    288 return metal::rint(x);
    -
    289 };
    -
    -
    290 template <>
    -
    - -
    292 return {metal::rint(x.real), metal::rint(x.imag)};
    -
    293 };
    -
    -
    294};
    -
    -
    295
    -
    -
    296struct Sigmoid {
    -
    297 template <typename T>
    -
    -
    298 T operator()(T x) {
    -
    299 auto y = 1 / (1 + metal::exp(-metal::abs(x)));
    -
    300 return (x < 0) ? 1 - y : y;
    -
    301 }
    -
    -
    302};
    -
    -
    303
    -
    -
    304struct Sign {
    -
    305 template <typename T>
    -
    -
    306 T operator()(T x) {
    -
    307 return (x > T(0)) - (x < T(0));
    -
    308 };
    -
    -
    309 template <>
    -
    -
    310 uint32_t operator()(uint32_t x) {
    -
    311 return x != 0;
    -
    312 };
    -
    -
    313};
    -
    -
    314
    -
    -
    315struct Sin {
    -
    316 template <typename T>
    -
    -
    317 T operator()(T x) {
    -
    318 return metal::precise::sin(x);
    -
    319 };
    -
    -
    320
    -
    321 template <>
    - -
    327};
    -
    -
    328
    -
    -
    329struct Sinh {
    -
    330 template <typename T>
    -
    -
    331 T operator()(T x) {
    -
    332 return metal::precise::sinh(x);
    -
    333 };
    -
    -
    334
    -
    335 template <>
    - -
    341};
    -
    -
    342
    -
    -
    343struct Square {
    -
    344 template <typename T>
    -
    -
    345 T operator()(T x) {
    -
    346 return x * x;
    -
    347 };
    -
    -
    348};
    -
    -
    349
    -
    -
    350struct Sqrt {
    -
    351 template <typename T>
    -
    -
    352 T operator()(T x) {
    -
    353 return metal::precise::sqrt(x);
    -
    354 };
    -
    -
    355};
    -
    -
    356
    -
    -
    357struct Rsqrt {
    -
    358 template <typename T>
    -
    -
    359 T operator()(T x) {
    -
    360 return metal::precise::rsqrt(x);
    -
    361 };
    -
    -
    362};
    -
    -
    363
    -
    -
    364struct Tan {
    -
    365 template <typename T>
    -
    -
    366 T operator()(T x) {
    -
    367 return metal::precise::tan(x);
    -
    368 };
    -
    -
    369
    -
    370 template <>
    -
    - -
    372 float tan_a = metal::precise::tan(x.real);
    -
    373 float tanh_b = metal::precise::tanh(x.imag);
    -
    374 float t1 = tan_a * tanh_b;
    -
    375 float denom = 1. + t1 * t1;
    -
    376 return {(tan_a - tanh_b * t1) / denom, (tanh_b + tan_a * t1) / denom};
    -
    377 };
    -
    -
    378};
    -
    -
    379
    -
    -
    380struct Tanh {
    -
    381 template <typename T>
    -
    -
    382 T operator()(T x) {
    -
    383 return metal::precise::tanh(x);
    -
    384 };
    -
    -
    385
    -
    386 template <>
    -
    - -
    388 float tanh_a = metal::precise::tanh(x.real);
    -
    389 float tan_b = metal::precise::tan(x.imag);
    -
    390 float t1 = tanh_a * tan_b;
    -
    391 float denom = 1. + t1 * t1;
    -
    392 return {(tanh_a + tan_b * t1) / denom, (tan_b - tanh_a * t1) / denom};
    -
    393 };
    -
    -
    394};
    -
    - - -
    float log1p(float x)
    Definition utils.h:298
    - -
    float erfinv(float a)
    Definition erf.h:43
    -
    float erf(float a)
    Definition erf.h:12
    - -
    float expm1f(float a)
    Definition expm1f.h:80
    -
    METAL_FUNC bfloat16_t acosh(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t log(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t log10(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t log2(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t sin(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t cosh(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t tanh(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t tan(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t acos(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t exp(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t atanh(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t asinh(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t atan(bfloat16_t y_over_x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t sinh(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t cos(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t sqrt(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t asin(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t rsqrt(bfloat16_t x)
    Definition bf16_math.h:252
    -
    METAL_FUNC bfloat16_t floor(bfloat16_t x)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t rint(bfloat16_t x)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t abs(bfloat16_t x)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t exp(bfloat16_t x)
    Definition bf16_math.h:234
    -
    METAL_FUNC bfloat16_t ceil(bfloat16_t x)
    Definition bf16_math.h:234
    -
    Definition unary.h:17
    -
    uint8_t operator()(uint8_t x)
    Definition unary.h:23
    -
    uint32_t operator()(uint32_t x)
    Definition unary.h:31
    -
    T operator()(T x)
    Definition unary.h:19
    -
    complex64_t operator()(complex64_t x)
    Definition unary.h:43
    -
    bool operator()(bool x)
    Definition unary.h:39
    -
    uint64_t operator()(uint64_t x)
    Definition unary.h:35
    -
    uint16_t operator()(uint16_t x)
    Definition unary.h:27
    -
    Definition unary.h:48
    -
    T operator()(T x)
    Definition unary.h:50
    -
    Definition unary.h:55
    -
    T operator()(T x)
    Definition unary.h:57
    -
    Definition unary.h:62
    -
    T operator()(T x)
    Definition unary.h:64
    -
    Definition unary.h:69
    -
    T operator()(T x)
    Definition unary.h:71
    -
    Definition unary.h:76
    -
    T operator()(T x)
    Definition unary.h:78
    -
    Definition unary.h:83
    -
    T operator()(T x)
    Definition unary.h:85
    -
    Definition unary.h:90
    -
    int16_t operator()(int16_t x)
    Definition unary.h:100
    -
    bool operator()(bool x)
    Definition unary.h:128
    -
    uint32_t operator()(uint32_t x)
    Definition unary.h:120
    -
    int8_t operator()(int8_t x)
    Definition unary.h:96
    -
    T operator()(T x)
    Definition unary.h:92
    -
    int64_t operator()(int64_t x)
    Definition unary.h:108
    -
    uint64_t operator()(uint64_t x)
    Definition unary.h:124
    -
    uint8_t operator()(uint8_t x)
    Definition unary.h:112
    -
    uint16_t operator()(uint16_t x)
    Definition unary.h:116
    -
    int32_t operator()(int32_t x)
    Definition unary.h:104
    -
    Definition unary.h:161
    -
    complex64_t operator()(complex64_t x)
    Definition unary.h:162
    -
    Definition unary.h:133
    -
    complex64_t operator()(complex64_t x)
    Definition unary.h:140
    -
    T operator()(T x)
    Definition unary.h:135
    -
    Definition unary.h:147
    -
    T operator()(T x)
    Definition unary.h:149
    -
    complex64_t operator()(complex64_t x)
    Definition unary.h:154
    -
    Definition unary.h:167
    -
    T operator()(T x)
    Definition unary.h:169
    -
    Definition unary.h:174
    -
    T operator()(T x)
    Definition unary.h:176
    -
    Definition unary.h:181
    -
    complex64_t operator()(complex64_t x)
    Definition unary.h:187
    -
    T operator()(T x)
    Definition unary.h:183
    -
    Definition unary.h:193
    -
    T operator()(T x)
    Definition unary.h:195
    -
    Definition unary.h:200
    -
    int8_t operator()(int8_t x)
    Definition unary.h:206
    -
    int16_t operator()(int16_t x)
    Definition unary.h:210
    -
    int32_t operator()(int32_t x)
    Definition unary.h:214
    -
    uint16_t operator()(uint16_t x)
    Definition unary.h:226
    -
    uint64_t operator()(uint64_t x)
    Definition unary.h:234
    -
    uint32_t operator()(uint32_t x)
    Definition unary.h:230
    -
    int64_t operator()(int64_t x)
    Definition unary.h:218
    -
    bool operator()(bool x)
    Definition unary.h:238
    -
    uint8_t operator()(uint8_t x)
    Definition unary.h:222
    -
    T operator()(T x)
    Definition unary.h:202
    -
    Definition unary.h:257
    -
    T operator()(T x)
    Definition unary.h:259
    -
    Definition unary.h:264
    -
    T operator()(T x)
    Definition unary.h:266
    -
    Definition unary.h:250
    -
    T operator()(T x)
    Definition unary.h:252
    -
    Definition unary.h:243
    -
    T operator()(T x)
    Definition unary.h:245
    -
    Definition unary.h:271
    -
    T operator()(T x)
    Definition unary.h:273
    -
    Definition unary.h:278
    -
    T operator()(T x)
    Definition unary.h:280
    -
    Definition unary.h:285
    -
    T operator()(T x)
    Definition unary.h:287
    -
    complex64_t operator()(complex64_t x)
    Definition unary.h:291
    -
    Definition unary.h:357
    -
    T operator()(T x)
    Definition unary.h:359
    -
    Definition unary.h:296
    -
    T operator()(T x)
    Definition unary.h:298
    -
    Definition unary.h:304
    -
    T operator()(T x)
    Definition unary.h:306
    -
    uint32_t operator()(uint32_t x)
    Definition unary.h:310
    -
    Definition unary.h:315
    -
    T operator()(T x)
    Definition unary.h:317
    -
    complex64_t operator()(complex64_t x)
    Definition unary.h:322
    -
    Definition unary.h:329
    -
    T operator()(T x)
    Definition unary.h:331
    -
    complex64_t operator()(complex64_t x)
    Definition unary.h:336
    -
    Definition unary.h:350
    -
    T operator()(T x)
    Definition unary.h:352
    -
    Definition unary.h:343
    -
    T operator()(T x)
    Definition unary.h:345
    -
    Definition unary.h:364
    -
    T operator()(T x)
    Definition unary.h:366
    -
    complex64_t operator()(complex64_t x)
    Definition unary.h:371
    -
    Definition unary.h:380
    -
    complex64_t operator()(complex64_t x)
    Definition unary.h:387
    -
    T operator()(T x)
    Definition unary.h:382
    -
    Definition complex.h:20
    -
    float imag
    Definition complex.h:22
    -
    float real
    Definition complex.h:21
    -
    - - - - diff --git a/docs/build/html/metal_2reduce_8h.html b/docs/build/html/metal_2reduce_8h.html deleted file mode 100644 index 4bdefa048..000000000 --- a/docs/build/html/metal_2reduce_8h.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/reduce.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    reduce.h File Reference
    -
    -
    - -

    Go to the source code of this file.

    - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    - - - - - - - -

    -Functions

    void mlx::core::all_reduce_dispatch (const array &in, array &out, const std::string &op_name, CommandEncoder &compute_encoder, metal::Device &d, const Stream &s)
     
    void mlx::core::row_reduce_general_dispatch (const array &in, array &out, const std::string &op_name, const ReductionPlan &plan, const std::vector< int > &axes, CommandEncoder &compute_encoder, metal::Device &d, const Stream &s)
     
    void mlx::core::strided_reduce_general_dispatch (const array &in, array &out, const std::string &op_name, const ReductionPlan &plan, const std::vector< int > &axes, CommandEncoder &compute_encoder, metal::Device &d, const Stream &s)
     
    -
    - - - - diff --git a/docs/build/html/metal_2reduce_8h_source.html b/docs/build/html/metal_2reduce_8h_source.html deleted file mode 100644 index 0b477ee3e..000000000 --- a/docs/build/html/metal_2reduce_8h_source.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/reduce.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    reduce.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright @ 2023 - 2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    - - -
    7#include "mlx/stream.h"
    -
    8
    -
    9namespace mlx::core {
    -
    10
    -
    11using metal::CommandEncoder;
    -
    12
    - -
    14 const array& in,
    -
    15 array& out,
    -
    16 const std::string& op_name,
    -
    17 CommandEncoder& compute_encoder,
    - -
    19 const Stream& s);
    -
    20
    - -
    22 const array& in,
    -
    23 array& out,
    -
    24 const std::string& op_name,
    -
    25 const ReductionPlan& plan,
    -
    26 const std::vector<int>& axes,
    -
    27 CommandEncoder& compute_encoder,
    - -
    29 const Stream& s);
    -
    30
    - -
    32 const array& in,
    -
    33 array& out,
    -
    34 const std::string& op_name,
    -
    35 const ReductionPlan& plan,
    -
    36 const std::vector<int>& axes,
    -
    37 CommandEncoder& compute_encoder,
    - -
    39 const Stream& s);
    -
    40
    -
    41} // namespace mlx::core
    - -
    Definition array.h:20
    -
    Definition device.h:117
    - -
    Definition allocator.h:7
    -
    void all_reduce_dispatch(const array &in, array &out, const std::string &op_name, CommandEncoder &compute_encoder, metal::Device &d, const Stream &s)
    -
    void strided_reduce_general_dispatch(const array &in, array &out, const std::string &op_name, const ReductionPlan &plan, const std::vector< int > &axes, CommandEncoder &compute_encoder, metal::Device &d, const Stream &s)
    -
    void row_reduce_general_dispatch(const array &in, array &out, const std::string &op_name, const ReductionPlan &plan, const std::vector< int > &axes, CommandEncoder &compute_encoder, metal::Device &d, const Stream &s)
    - -
    Definition reduce.h:39
    -
    Definition stream.h:9
    -
    Definition device.h:39
    -
    - - - - diff --git a/docs/build/html/metal_8h.html b/docs/build/html/metal_8h.html deleted file mode 100644 index 53911afb9..000000000 --- a/docs/build/html/metal_8h.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/metal.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    metal.h File Reference
    -
    -
    -
    #include <variant>
    -#include "mlx/array.h"
    -
    -

    Go to the source code of this file.

    - - - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    namespace  mlx::core::metal
     
    - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    bool mlx::core::metal::is_available ()
     
    size_t mlx::core::metal::get_active_memory ()
     
    size_t mlx::core::metal::get_peak_memory ()
     
    void mlx::core::metal::reset_peak_memory ()
     
    size_t mlx::core::metal::get_cache_memory ()
     
    size_t mlx::core::metal::set_memory_limit (size_t limit, bool relaxed=true)
     
    size_t mlx::core::metal::set_cache_limit (size_t limit)
     
    void mlx::core::metal::clear_cache ()
     
    void mlx::core::metal::start_capture (std::string path="")
     Capture a GPU trace, saving it to an absolute file path
     
    void mlx::core::metal::stop_capture ()
     
    std::unordered_map< std::string, std::variant< std::string, size_t > > mlx::core::metal::device_info ()
     Get information about the GPU and system settings.
     
    -
    - - - - diff --git a/docs/build/html/metal_8h_source.html b/docs/build/html/metal_8h_source.html deleted file mode 100644 index 04c2a29f4..000000000 --- a/docs/build/html/metal_8h_source.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/metal.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    metal.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <variant>
    -
    6
    -
    7#include "mlx/array.h"
    -
    8
    -
    9namespace mlx::core::metal {
    -
    10
    -
    11/* Check if the Metal backend is available. */
    - -
    13
    -
    14/* Get the actively used memory in bytes.
    -
    15 *
    -
    16 * Note, this will not always match memory use reported by the system because
    -
    17 * it does not include cached memory buffers.
    -
    18 * */
    - -
    20
    -
    21/* Get the peak amount of used memory in bytes.
    -
    22 *
    -
    23 * The maximum memory used recorded from the beginning of the program
    -
    24 * execution or since the last call to reset_peak_memory.
    -
    25 * */
    - -
    27
    -
    28/* Reset the peak memory to zero.
    -
    29 * */
    - -
    31
    -
    32/* Get the cache size in bytes.
    -
    33 *
    -
    34 * The cache includes memory not currently used that has not been returned
    -
    35 * to the system allocator.
    -
    36 * */
    - -
    38
    -
    39/* Set the memory limit.
    -
    40 * Calls to malloc will wait on scheduled tasks if the limit is exceeded. If
    -
    41 * there are no more scheduled tasks an error will be raised if relaxed
    -
    42 * is false or memory will be allocated (including the potential for
    -
    43 * swap) if relaxed is true.
    -
    44 *
    -
    45 * The memory limit defaults to 1.5 times the maximum recommended working set
    -
    46 * size reported by the device.
    -
    47 *
    -
    48 * Returns the previous memory limit.
    -
    49 * */
    -
    50size_t set_memory_limit(size_t limit, bool relaxed = true);
    -
    51
    -
    52/* Set the free cache limit.
    -
    53 * If using more than the given limit, free memory will be reclaimed
    -
    54 * from the cache on the next allocation. To disable the cache,
    -
    55 * set the limit to 0.
    -
    56 *
    -
    57 * The cache limit defaults to the memory limit.
    -
    58 *
    -
    59 * Returns the previous cache limit.
    -
    60 * */
    -
    61size_t set_cache_limit(size_t limit);
    -
    62
    -
    63/* Clear the memory cache. */
    - -
    65
    -
    67void start_capture(std::string path = "");
    - -
    69
    -
    71std::unordered_map<std::string, std::variant<std::string, size_t>>
    - -
    73
    -
    74} // namespace mlx::core::metal
    - -
    Definition allocator.h:12
    - - -
    size_t set_memory_limit(size_t limit, bool relaxed=true)
    -
    size_t get_cache_memory()
    -
    size_t get_peak_memory()
    -
    std::unordered_map< std::string, std::variant< std::string, size_t > > device_info()
    Get information about the GPU and system settings.
    -
    size_t get_active_memory()
    -
    void start_capture(std::string path="")
    Capture a GPU trace, saving it to an absolute file path
    -
    size_t set_cache_limit(size_t limit)
    - -
    void reset_peak_memory()
    -
    - - - - diff --git a/docs/build/html/metal__impl_8h.html b/docs/build/html/metal__impl_8h.html deleted file mode 100644 index 0c0f4f099..000000000 --- a/docs/build/html/metal__impl_8h.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/metal_impl.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    metal_impl.h File Reference
    -
    -
    -
    #include <future>
    -#include <memory>
    -#include "mlx/array.h"
    -#include "mlx/stream.h"
    -
    -

    Go to the source code of this file.

    - - - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    namespace  mlx::core::metal
     
    - - - - - - - -

    -Functions

    void mlx::core::metal::new_stream (Stream stream)
     
    std::function< void()> mlx::core::metal::make_task (array arr, bool signal)
     
    std::function< void()> mlx::core::metal::make_synchronize_task (Stream s, std::shared_ptr< std::promise< void > > p)
     
    - - - -

    -Variables

    std::unique_ptr< void, std::function< void(void *)> mlx::core::metal::new_scoped_memory_pool )()
     
    -
    - - - - diff --git a/docs/build/html/metal__impl_8h_source.html b/docs/build/html/metal__impl_8h_source.html deleted file mode 100644 index cc4bceac3..000000000 --- a/docs/build/html/metal__impl_8h_source.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/metal_impl.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    metal_impl.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <future>
    -
    6#include <memory>
    -
    7
    -
    8#include "mlx/array.h"
    -
    9#include "mlx/stream.h"
    -
    10
    -
    11namespace mlx::core::metal {
    -
    12
    -
    13void new_stream(Stream stream);
    -
    14
    -
    15std::unique_ptr<void, std::function<void(void*)>> new_scoped_memory_pool();
    -
    16
    -
    17std::function<void()> make_task(array arr, bool signal);
    -
    18
    -
    19std::function<void()> make_synchronize_task(
    -
    20 Stream s,
    -
    21 std::shared_ptr<std::promise<void>> p);
    -
    22
    -
    23} // namespace mlx::core::metal
    - -
    Definition array.h:20
    -
    Definition allocator.h:12
    -
    std::function< void()> make_task(array arr, bool signal)
    -
    std::unique_ptr< void, std::function< void(void *)> new_scoped_memory_pool)()
    -
    void new_stream(Stream stream)
    -
    std::function< void()> make_synchronize_task(Stream s, std::shared_ptr< std::promise< void > > p)
    - -
    Definition stream.h:9
    -
    - - - - diff --git a/docs/build/html/minus.svg b/docs/build/html/minus.svg deleted file mode 100644 index f70d0c1a1..000000000 --- a/docs/build/html/minus.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/docs/build/html/minusd.svg b/docs/build/html/minusd.svg deleted file mode 100644 index 5f8e87962..000000000 --- a/docs/build/html/minusd.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/docs/build/html/mlx_8h.html b/docs/build/html/mlx_8h.html deleted file mode 100644 index 690a11da8..000000000 --- a/docs/build/html/mlx_8h.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: mlx/mlx.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    mlx.h File Reference
    -
    -
    -
    #include "mlx/array.h"
    -#include "mlx/backend/metal/metal.h"
    -#include "mlx/compile.h"
    -#include "mlx/device.h"
    -#include "mlx/fast.h"
    -#include "mlx/fft.h"
    -#include "mlx/io.h"
    -#include "mlx/linalg.h"
    -#include "mlx/ops.h"
    -#include "mlx/random.h"
    -#include "mlx/stream.h"
    -#include "mlx/transforms.h"
    -#include "mlx/utils.h"
    -
    -

    Go to the source code of this file.

    -
    - - - - diff --git a/docs/build/html/mlx_8h_source.html b/docs/build/html/mlx_8h_source.html deleted file mode 100644 index 6df9b73ea..000000000 --- a/docs/build/html/mlx_8h_source.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - -MLX: mlx/mlx.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    mlx.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include "mlx/array.h"
    - -
    7#include "mlx/compile.h"
    -
    8#include "mlx/device.h"
    -
    9#include "mlx/fast.h"
    -
    10#include "mlx/fft.h"
    -
    11#include "mlx/io.h"
    -
    12#include "mlx/linalg.h"
    -
    13#include "mlx/ops.h"
    -
    14#include "mlx/random.h"
    -
    15#include "mlx/stream.h"
    -
    16#include "mlx/transforms.h"
    -
    17#include "mlx/utils.h"
    - - - - - - - - - - - - - -
    - - - - diff --git a/docs/build/html/mma_8h.html b/docs/build/html/mma_8h.html deleted file mode 100644 index 29de1e3a9..000000000 --- a/docs/build/html/mma_8h.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/gemm/mma.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mma.h File Reference
    -
    -
    -
    #include <metal_simdgroup>
    -#include <metal_simdgroup_matrix>
    -#include <metal_stdlib>
    -#include "mlx/backend/metal/kernels/steel/gemm/transforms.h"
    -#include "mlx/backend/metal/kernels/steel/utils.h"
    -
    -

    Go to the source code of this file.

    - - - - -

    -Classes

    struct  mlx::steel::BlockMMA< T, U, BM, BN, BK, WM, WN, transpose_a, transpose_b, lda_tgp, ldb_tgp, AccumType, Epilogue >
     
    - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::steel
     
    -
    - - - - diff --git a/docs/build/html/mma_8h_source.html b/docs/build/html/mma_8h_source.html deleted file mode 100644 index e673f2bd1..000000000 --- a/docs/build/html/mma_8h_source.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/kernels/steel/gemm/mma.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    mma.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <metal_simdgroup>
    -
    6#include <metal_simdgroup_matrix>
    -
    7#include <metal_stdlib>
    -
    8
    - - -
    11
    -
    12using namespace metal;
    -
    13
    -
    15// MMA helper
    -
    17
    -
    18namespace mlx {
    -
    19namespace steel {
    -
    20
    -
    21template <
    -
    22 typename T,
    -
    23 typename U,
    -
    24 int BM,
    -
    25 int BN,
    -
    26 int BK,
    -
    27 int WM,
    -
    28 int WN,
    -
    29 bool transpose_a,
    -
    30 bool transpose_b,
    -
    31 short lda_tgp,
    -
    32 short ldb_tgp,
    -
    33 typename AccumType = float,
    -
    34 typename Epilogue = TransformNone<U, AccumType>>
    -
    -
    35struct BlockMMA {
    -
    36 // Warp tile simdgroup matrix strides along M
    -
    37 STEEL_CONST short TM_stride = 8 * WM;
    -
    38 // Warp tile simdgroup matrix strides along M
    -
    39 STEEL_CONST short TN_stride = 8 * WN;
    -
    40
    -
    41 // Warp tile size along M
    -
    42 STEEL_CONST short TM = BM / TM_stride;
    -
    43 // Warp tile size along N
    -
    44 STEEL_CONST short TN = BN / TN_stride;
    -
    45
    -
    46 // Strides of A, B along reduction axis
    -
    - -
    48 transpose_a ? TM_stride : TM_stride * lda_tgp};
    -
    -
    - -
    50 transpose_b ? TN_stride * ldb_tgp : TN_stride};
    -
    -
    51
    -
    52 // Jump between elements
    -
    53 STEEL_CONST short jump_a = {transpose_a ? lda_tgp : 1};
    -
    54 STEEL_CONST short jump_b = {transpose_b ? ldb_tgp : 1};
    -
    55
    -
    56 STEEL_CONST short tile_stride_a = {transpose_a ? 8 * lda_tgp : 8};
    -
    57 STEEL_CONST short tile_stride_b = {transpose_b ? 8 : 8 * ldb_tgp};
    -
    58
    -
    59 // Simdgroup matrices
    -
    60 simdgroup_matrix<AccumType, 8, 8> Asimd[TM];
    -
    61 simdgroup_matrix<AccumType, 8, 8> Bsimd[TN];
    -
    -
    62 simdgroup_matrix<AccumType, 8, 8> results[TM * TN] = {
    -
    63 simdgroup_matrix<AccumType, 8, 8>(0)};
    -
    -
    64
    -
    65 // Offsets within threadgroup
    -
    66 const short tm;
    -
    67 const short tn;
    -
    68
    -
    69 short sm;
    -
    70 short sn;
    -
    71
    -
    72 short As_offset;
    -
    73 short Bs_offset;
    -
    74
    -
    75 /* Constructor */
    -
    -
    76 METAL_FUNC BlockMMA(
    -
    77 ushort simd_group_id [[simdgroup_index_in_threadgroup]],
    -
    78 ushort simd_lane_id [[thread_index_in_simdgroup]])
    -
    79 : tm(8 * (simd_group_id / WN)), tn(8 * (simd_group_id % WN)) {
    -
    80 // Determine thread position in simdgroup matrix
    -
    81 short qid = simd_lane_id / 4;
    -
    82 sm = (qid & 4) + (simd_lane_id / 2) % 4;
    -
    83 sn = (qid & 2) * 2 + (simd_lane_id % 2) * 2;
    -
    84
    -
    85 // Determine thread and simdgroup offset
    -
    86 As_offset =
    -
    87 transpose_a ? ((sn)*lda_tgp + (tm + sm)) : ((sn) + (tm + sm) * lda_tgp);
    -
    88 Bs_offset =
    -
    89 transpose_b ? ((tn + sn) * ldb_tgp + (sm)) : ((sm)*ldb_tgp + (tn + sn));
    -
    90 }
    -
    -
    91
    -
    92 /* (BM, BK) X (BK, BN) multiply accumulate function */
    -
    -
    93 METAL_FUNC void mma(const threadgroup T* As, const threadgroup T* Bs) {
    -
    94 // Adjust for simdgroup and thread location
    -
    95 As += As_offset;
    -
    96 Bs += Bs_offset;
    -
    97
    -
    98 // Iterate over BK in blocks of 8
    - -
    100 for (short kk = 0; kk < BK; kk += 8) {
    -
    101 simdgroup_barrier(mem_flags::mem_none);
    -
    102
    -
    103 // Load elements from threadgroup A as simdgroup matrices
    - -
    105 for (short i = 0; i < TM; i++) {
    -
    106 Asimd[i].thread_elements()[0] =
    -
    107 static_cast<AccumType>(As[i * simd_stride_a + 0]);
    -
    108 Asimd[i].thread_elements()[1] =
    -
    109 static_cast<AccumType>(As[i * simd_stride_a + jump_a]);
    -
    110 }
    -
    111
    -
    112 simdgroup_barrier(mem_flags::mem_none);
    -
    113
    -
    114 // Load elements from threadgroup B as simdgroup matrices
    - -
    116 for (short j = 0; j < TN; j++) {
    -
    117 Bsimd[j].thread_elements()[0] =
    -
    118 static_cast<AccumType>(Bs[j * simd_stride_b + 0]);
    -
    119 Bsimd[j].thread_elements()[1] =
    -
    120 static_cast<AccumType>(Bs[j * simd_stride_b + jump_b]);
    -
    121 }
    -
    122
    -
    123 simdgroup_barrier(mem_flags::mem_none);
    -
    124
    -
    125 // Multiply and accumulate into result simdgroup matrices
    - -
    127 for (short i = 0; i < TM; i++) {
    - -
    129 for (short j = 0; j < TN; j++) {
    -
    130 short j_serp = (i % 2) ? (TN - 1 - j) : j;
    -
    131
    -
    132 simdgroup_multiply_accumulate(
    -
    133 results[i * TN + j_serp],
    -
    134 Asimd[i],
    -
    135 Bsimd[j_serp],
    -
    136 results[i * TN + j_serp]);
    -
    137 }
    -
    138 }
    -
    139
    -
    140 // Progress to next simdgroup tile
    -
    141 As += tile_stride_a;
    -
    142 Bs += tile_stride_b;
    -
    143 }
    -
    144 }
    -
    -
    145
    -
    146 /* Store results from simdgroup_matrix results into device memory */
    -
    -
    147 METAL_FUNC void store_result(device U* D, const int ldd) const {
    -
    148 // Adjust for simdgroup and thread location
    -
    149 D += (sm + tm) * ldd + tn + sn;
    -
    150
    -
    151 // Loop over all simdgroup tiles
    - -
    153 for (short i = 0; i < TM; i++) {
    - -
    155 for (short j = 0; j < TN; j++) {
    -
    156 // Get accumulated result and associated offset in C
    -
    157 thread const auto& accum = results[i * TN + j].thread_elements();
    -
    158 int offset = (i * TM_stride) * ldd + (j * TN_stride);
    -
    159
    -
    160 // Apply epilogue
    -
    161 U outs[2] = {Epilogue::apply(accum[0]), Epilogue::apply(accum[1])};
    -
    162
    -
    163 // Write out D
    -
    164 D[offset] = outs[0];
    -
    165 D[offset + 1] = outs[1];
    -
    166 }
    -
    167 }
    -
    168 }
    -
    -
    169
    -
    170 METAL_FUNC void
    -
    -
    171 store_result_safe(device U* D, const int ldd, short2 dst_tile_dims) const {
    -
    172 // Adjust for simdgroup and thread location
    -
    173 D += (sm + tm) * ldd + (tn + sn);
    -
    174 dst_tile_dims -= short2(tn + sn, sm + tm);
    -
    175
    -
    176 if (dst_tile_dims.x <= 0 || dst_tile_dims.y <= 0)
    -
    177 return;
    -
    178
    - -
    180 for (int i = 0; i < TM; i++) {
    -
    181 if (i * TM_stride < dst_tile_dims.y) {
    - -
    183 for (int j = 0; j < TN; j++) {
    -
    184 // Get accumulated result and associated offset in C
    -
    185 thread const auto& accum = results[i * TN + j].thread_elements();
    -
    186 int offset = (i * TM_stride) * ldd + (j * TN_stride);
    -
    187
    -
    188 // Apply epilogue and output C
    -
    189 if (j * TN_stride < dst_tile_dims.x) {
    -
    190 D[offset] = Epilogue::apply(accum[0]);
    -
    191 }
    -
    192
    -
    193 if (j * TN_stride + 1 < dst_tile_dims.x) {
    -
    194 D[offset + 1] = Epilogue::apply(accum[1]);
    -
    195 }
    -
    196 }
    -
    197 }
    -
    198 }
    -
    199 }
    -
    -
    200
    -
    201 /* Apply epilogue */
    -
    202 template <typename BinaryEpilogue>
    -
    -
    203 METAL_FUNC void apply_epilogue(
    -
    204 const device U* C,
    -
    205 const int ldc,
    -
    206 const int fdc,
    -
    207 thread const BinaryEpilogue& epilogue_op) {
    -
    208 // Adjust for simdgroup and thread location
    -
    209 C += (sm + tm) * ldc + (tn + sn) * fdc;
    -
    210
    -
    211 // Loop over all simdgroup tiles
    - -
    213 for (short i = 0; i < TM; i++) {
    - -
    215 for (short j = 0; j < TN; j++) {
    -
    216 // Get accumulated result and associated offset in C
    -
    217 thread auto& accum = results[i * TN + j].thread_elements();
    -
    218 int offset_c = (i * TM_stride) * ldc + (j * TN_stride) * fdc;
    -
    219
    -
    220 // Apply epilogue
    -
    221 accum[0] = epilogue_op.apply(accum[0], C[offset_c]);
    -
    222 accum[1] = epilogue_op.apply(accum[1], C[offset_c + fdc]);
    -
    223 }
    -
    224 }
    -
    225 }
    -
    -
    226
    -
    227 /* Apply epilogue */
    -
    228 template <typename BinaryEpilogue>
    -
    -
    229 METAL_FUNC void apply_epilogue_safe(
    -
    230 const device U* C,
    -
    231 const int ldc,
    -
    232 const int fdc,
    -
    233 short2 dst_tile_dims,
    -
    234 thread const BinaryEpilogue& epilogue_op) {
    -
    235 // Adjust for simdgroup and thread location
    -
    236 C += (sm + tm) * ldc + (tn + sn) * fdc;
    -
    237 dst_tile_dims -= short2(tn + sn, sm + tm);
    -
    238
    -
    239 if (dst_tile_dims.x <= 0 || dst_tile_dims.y <= 0)
    -
    240 return;
    -
    241
    -
    242 // Loop over all simdgroup tiles
    - -
    244 for (short i = 0; i < TM; i++) {
    - -
    246 for (short j = 0; j < TN; j++) {
    -
    247 // Get accumulated result and associated offset in C
    -
    248 thread auto& accum = results[i * TN + j].thread_elements();
    -
    249 int offset_c = (i * TM_stride) * ldc + (j * TN_stride) * fdc;
    -
    250
    -
    251 // Read C
    -
    252 U c_elems[2] = {0};
    -
    253
    -
    254 if ((j * TN_stride + 1) < dst_tile_dims.x) {
    -
    255 c_elems[0] = C[offset_c];
    -
    256 c_elems[1] = C[offset_c + fdc];
    -
    257 } else if ((j * TN_stride) < dst_tile_dims.x) {
    -
    258 c_elems[0] = C[offset_c];
    -
    259 }
    -
    260
    -
    261 // Apply epilogue
    -
    262 accum[0] = epilogue_op.apply(accum[0], c_elems[0]);
    -
    263 accum[1] = epilogue_op.apply(accum[1], c_elems[1]);
    -
    264 }
    -
    265 }
    -
    266 }
    -
    -
    267
    -
    268 /* Store results from simdgroup_matrix results into device memory */
    -
    -
    269 METAL_FUNC void store_result(
    -
    270 device U* D,
    -
    271 const int ldd,
    -
    272 const device U* C,
    -
    273 const int ldc,
    -
    274 const int fdc,
    -
    275 thread const Epilogue& epilogue_op) const {
    -
    276 // Adjust for simdgroup and thread location
    -
    277 C += (sm + tm) * ldc + (tn + sn) * fdc;
    -
    278 D += (sm + tm) * ldd + tn + sn;
    -
    279
    -
    280 // Loop over all simdgroup tiles
    - -
    282 for (short i = 0; i < TM; i++) {
    - -
    284 for (short j = 0; j < TN; j++) {
    -
    285 // Get accumulated result and associated offset in C
    -
    286 thread const auto& accum = results[i * TN + j].thread_elements();
    -
    287 int offset_c = (i * TM_stride) * ldc + (j * TN_stride) * fdc;
    -
    288 int offset_d = (i * TM_stride) * ldd + (j * TN_stride);
    -
    289
    -
    290 // Apply epilogue
    -
    291 U outs[2] = {
    -
    292 epilogue_op.apply(accum[0], C[offset_c]),
    -
    293 epilogue_op.apply(accum[1], C[offset_c + fdc])};
    -
    294
    -
    295 // Write out D
    -
    296 D[offset_d] = outs[0];
    -
    297 D[offset_d + 1] = outs[1];
    -
    298 }
    -
    299 }
    -
    300 }
    -
    -
    301
    -
    -
    302 METAL_FUNC void store_result_safe(
    -
    303 device U* D,
    -
    304 const int ldd,
    -
    305 const device U* C,
    -
    306 const int ldc,
    -
    307 const int fdc,
    -
    308 short2 dst_tile_dims,
    -
    309 thread const Epilogue& epilogue_op) const {
    -
    310 // Adjust for simdgroup and thread location
    -
    311 C += (sm + tm) * ldc + (tn + sn) * fdc;
    -
    312 D += (sm + tm) * ldd + tn + sn;
    -
    313 dst_tile_dims -= short2(tn + sn, sm + tm);
    -
    314
    -
    315 if (dst_tile_dims.x <= 0 || dst_tile_dims.y <= 0)
    -
    316 return;
    -
    317
    - -
    319 for (int i = 0; i < TM; i++) {
    -
    320 if (i * TM_stride < dst_tile_dims.y) {
    - -
    322 for (int j = 0; j < TN; j++) {
    -
    323 // Get accumulated result and associated offset in C
    -
    324 thread const auto& accum = results[i * TN + j].thread_elements();
    -
    325 int offset_c = (i * TM_stride) * ldc + (j * TN_stride) * fdc;
    -
    326 int offset_d = (i * TM_stride) * ldd + (j * TN_stride);
    -
    327
    -
    328 // Apply epilogue and output C
    -
    329 if (j * TN_stride < dst_tile_dims.x) {
    -
    330 D[offset_d] = epilogue_op.apply(accum[0], C[offset_c]);
    -
    331 }
    -
    332
    -
    333 if (j * TN_stride + 1 < dst_tile_dims.x) {
    -
    334 D[offset_d + 1] = epilogue_op.apply(accum[1], C[offset_c + fdc]);
    -
    335 }
    -
    336 }
    -
    337 }
    -
    338 }
    -
    339 }
    -
    -
    340};
    -
    -
    341
    -
    342} // namespace steel
    -
    343} // namespace mlx
    - - -
    #define STEEL_PRAGMA_UNROLL
    Definition utils.h:8
    -
    #define STEEL_CONST
    Definition utils.h:7
    -
    Definition bf16.h:265
    -
    Definition allocator.h:7
    -
    Definition mma.h:35
    -
    short As_offset
    Definition mma.h:72
    -
    STEEL_CONST short jump_b
    Definition mma.h:54
    -
    simdgroup_matrix< AccumType, 8, 8 > Bsimd[TN]
    Definition mma.h:61
    -
    STEEL_CONST short TM_stride
    Definition mma.h:37
    -
    METAL_FUNC void mma(const threadgroup T *As, const threadgroup T *Bs)
    Definition mma.h:93
    -
    simdgroup_matrix< AccumType, 8, 8 > results[TM *TN]
    Definition mma.h:62
    -
    STEEL_CONST short TN
    Definition mma.h:44
    -
    METAL_FUNC void store_result_safe(device U *D, const int ldd, const device U *C, const int ldc, const int fdc, short2 dst_tile_dims, thread const Epilogue &epilogue_op) const
    Definition mma.h:302
    -
    METAL_FUNC void store_result(device U *D, const int ldd, const device U *C, const int ldc, const int fdc, thread const Epilogue &epilogue_op) const
    Definition mma.h:269
    -
    METAL_FUNC void apply_epilogue(const device U *C, const int ldc, const int fdc, thread const BinaryEpilogue &epilogue_op)
    Definition mma.h:203
    -
    METAL_FUNC void store_result(device U *D, const int ldd) const
    Definition mma.h:147
    -
    STEEL_CONST short TN_stride
    Definition mma.h:39
    -
    STEEL_CONST short tile_stride_a
    Definition mma.h:56
    -
    simdgroup_matrix< AccumType, 8, 8 > Asimd[TM]
    Definition mma.h:60
    -
    short Bs_offset
    Definition mma.h:73
    -
    METAL_FUNC void apply_epilogue_safe(const device U *C, const int ldc, const int fdc, short2 dst_tile_dims, thread const BinaryEpilogue &epilogue_op)
    Definition mma.h:229
    -
    METAL_FUNC BlockMMA(ushort simd_group_id, ushort simd_lane_id)
    Definition mma.h:76
    -
    short sm
    Definition mma.h:69
    -
    STEEL_CONST short simd_stride_a
    Definition mma.h:47
    -
    const short tm
    Definition mma.h:66
    -
    STEEL_CONST short TM
    Definition mma.h:42
    -
    const short tn
    Definition mma.h:67
    -
    STEEL_CONST short jump_a
    Definition mma.h:53
    -
    short sn
    Definition mma.h:70
    -
    STEEL_CONST short tile_stride_b
    Definition mma.h:57
    -
    STEEL_CONST short simd_stride_b
    Definition mma.h:49
    -
    METAL_FUNC void store_result_safe(device U *D, const int ldd, short2 dst_tile_dims) const
    Definition mma.h:171
    -
    - - - - diff --git a/docs/build/html/mps_2gemm_8h.html b/docs/build/html/mps_2gemm_8h.html deleted file mode 100644 index f264c755d..000000000 --- a/docs/build/html/mps_2gemm_8h.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/mps/gemm.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    gemm.h File Reference
    -
    -
    -
    #include <Metal/Metal.hpp>
    -
    -

    Go to the source code of this file.

    - - - - - - - - - - - - - - - - -

    -Classes

    class  MPS::MatrixDescriptor
     
    class  MPS::Matrix
     
    class  MPS::Kernel
     
    class  MPS::MatrixMultiplication
     
    class  MPS::VectorDescriptor
     
    class  MPS::Vector
     
    class  MPS::MatrixVectorMultiplication
     
    - - - - - - - - - - - -

    -Namespaces

    namespace  MTL
     
    namespace  MTL::Private
     
    namespace  MTL::Private::Class
     
    namespace  MTL::Private::Selector
     
    namespace  MPS
     
    - - - - - -

    -Macros

    #define _MPS_PRIVATE_CLS(symbol)   (MTL::Private::Class::s_k##symbol)
     
    #define _MPS_PRIVATE_SEL(accessor)   (MTL::Private::Selector::s_k##accessor)
     
    - - - -

    -Typedefs

    typedef enum MPS::DataType MPS::DataType
     
    - - - -

    -Enumerations

    enum  MPS::DataType : uint32_t {
    -  MPS::DataTypeFloatBit = 0x10000000 -, MPS::DataTypeAlternateEncodingBit = 0x80000000 -, MPS::DataTypeFloat16 = DataTypeFloatBit | 16 -, MPS::DataTypeFloat32 = DataTypeFloatBit | 32 -,
    -  MPS::DataTypeBFloat16 = DataTypeAlternateEncodingBit | DataTypeFloat16 -
    - }
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

     MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSMatrixDescriptor)
     
     MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSMatrix)
     
     MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSVectorDescriptor)
     
     MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSVector)
     
     MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSKernel)
     
     MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSMatrixMultiplication)
     
     MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSMatrixVectorMultiplication)
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (matrixDescriptorWithRows_columns_rowBytes_dataType, "matrixDescriptorWithRows:columns:rowBytes:dataType:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (matrixDescriptorWithRows_columns_matrices_rowBytes_matrixBytes_dataType, "matrixDescriptorWithRows:columns:matrices:rowBytes:matrixBytes:dataType:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (rows, "rows")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (initWithBuffer_descriptor, "initWithBuffer:descriptor:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (initWithDevice_, "initWithDevice:transposeLeft:transposeRight:" "resultRows:resultColumns:interiorColumns:alpha:beta:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (encodeToCommandBuffer_leftMatrix_rightMatrix_resultMatrix, "encodeToCommandBuffer:leftMatrix:rightMatrix:resultMatrix:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (setLeftMatrixOrigin_, "setLeftMatrixOrigin:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (setRightMatrixOrigin_, "setRightMatrixOrigin:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (setResultMatrixOrigin_, "setResultMatrixOrigin:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (setBatchStart_, "setBatchStart:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (setBatchSize_, "setBatchSize:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (vectorDescriptorWithLength_dataType, "vectorDescriptorWithLength:dataType:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (vectorDescriptorWithLength_vectors_vectorBytes_dataType, "vectorDescriptorWithLength:vectors:vectorBytes:dataType:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (initWithDevice_transpose_rows_columns_alpha_beta, "initWithDevice:transpose:rows:columns:alpha:beta:")
     
     MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (encodeToCommandBuffer_inputMatrix_inputVector_resultVector, "encodeToCommandBuffer:inputMatrix:inputVector:resultVector:")
     
    -

    Macro Definition Documentation

    - -

    ◆ _MPS_PRIVATE_CLS

    - -
    -
    - - - - - - - -
    #define _MPS_PRIVATE_CLS( symbol)   (MTL::Private::Class::s_k##symbol)
    -
    - -
    -
    - -

    ◆ _MPS_PRIVATE_SEL

    - -
    -
    - - - - - - - -
    #define _MPS_PRIVATE_SEL( accessor)   (MTL::Private::Selector::s_k##accessor)
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/mps_2gemm_8h_source.html b/docs/build/html/mps_2gemm_8h_source.html deleted file mode 100644 index e991428e2..000000000 --- a/docs/build/html/mps_2gemm_8h_source.html +++ /dev/null @@ -1,572 +0,0 @@ - - - - - - - -MLX: mlx/backend/metal/mps/gemm.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    gemm.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <Metal/Metal.hpp>
    -
    6
    -
    7#define _MPS_PRIVATE_CLS(symbol) (MTL::Private::Class::s_k##symbol)
    -
    8#define _MPS_PRIVATE_SEL(accessor) (MTL::Private::Selector::s_k##accessor)
    -
    9
    -
    - -
    11_MTL_PRIVATE_DEF_CLS(MPSMatrixDescriptor);
    - -
    13_MTL_PRIVATE_DEF_CLS(MPSVectorDescriptor);
    - - -
    16_MTL_PRIVATE_DEF_CLS(MPSMatrixMultiplication);
    -
    17_MTL_PRIVATE_DEF_CLS(MPSMatrixVectorMultiplication);
    -
    18} // namespace MTL::Private::Class
    -
    -
    19
    -
    - - -
    22 matrixDescriptorWithRows_columns_rowBytes_dataType,
    -
    23 "matrixDescriptorWithRows:columns:rowBytes:dataType:");
    - -
    25 matrixDescriptorWithRows_columns_matrices_rowBytes_matrixBytes_dataType,
    -
    26 "matrixDescriptorWithRows:columns:matrices:rowBytes:matrixBytes:dataType:");
    - -
    28_MTL_PRIVATE_DEF_SEL(initWithBuffer_descriptor, "initWithBuffer:descriptor:");
    - -
    30 initWithDevice_,
    -
    31 "initWithDevice:transposeLeft:transposeRight:"
    -
    32 "resultRows:resultColumns:interiorColumns:alpha:beta:");
    - -
    34 encodeToCommandBuffer_leftMatrix_rightMatrix_resultMatrix,
    -
    35 "encodeToCommandBuffer:leftMatrix:rightMatrix:resultMatrix:");
    -
    36_MTL_PRIVATE_DEF_SEL(setLeftMatrixOrigin_, "setLeftMatrixOrigin:");
    -
    37_MTL_PRIVATE_DEF_SEL(setRightMatrixOrigin_, "setRightMatrixOrigin:");
    -
    38_MTL_PRIVATE_DEF_SEL(setResultMatrixOrigin_, "setResultMatrixOrigin:");
    -
    39_MTL_PRIVATE_DEF_SEL(setBatchStart_, "setBatchStart:");
    -
    40_MTL_PRIVATE_DEF_SEL(setBatchSize_, "setBatchSize:");
    - -
    42 vectorDescriptorWithLength_dataType,
    -
    43 "vectorDescriptorWithLength:dataType:");
    - -
    45 vectorDescriptorWithLength_vectors_vectorBytes_dataType,
    -
    46 "vectorDescriptorWithLength:vectors:vectorBytes:dataType:");
    - -
    48 initWithDevice_transpose_rows_columns_alpha_beta,
    -
    49 "initWithDevice:transpose:rows:columns:alpha:beta:");
    - -
    51 encodeToCommandBuffer_inputMatrix_inputVector_resultVector,
    -
    52 "encodeToCommandBuffer:inputMatrix:inputVector:resultVector:");
    -
    53} // namespace MTL::Private::Selector
    -
    -
    54
    -
    -
    55namespace MPS {
    -
    56
    - -
    64
    -
    -
    65class MatrixDescriptor : public NS::Copying<MatrixDescriptor> {
    -
    66 public:
    - -
    68 NS::UInteger rows,
    -
    69 NS::UInteger columns,
    -
    70 NS::UInteger rowBytes,
    -
    71 NS::UInteger dataType);
    - -
    73 NS::UInteger rows,
    -
    74 NS::UInteger columns,
    -
    75 NS::UInteger matrices,
    -
    76 NS::UInteger rowBytes,
    -
    77 NS::UInteger matrixBytes,
    -
    78 NS::UInteger dataType);
    -
    79 NS::UInteger rows() const;
    -
    80};
    -
    -
    81
    -
    -
    82class Matrix : public NS::Referencing<Matrix> {
    -
    83 public:
    -
    84 static class Matrix* alloc();
    -
    85 Matrix* init(MTL::Buffer* buffer, MatrixDescriptor* descriptor);
    -
    86 Matrix* init(const MTL::Buffer* buffer, MatrixDescriptor* descriptor);
    -
    87};
    -
    -
    88
    -
    -
    89class Kernel : public NS::Referencing<Kernel> {
    -
    90 public:
    -
    91 NS::String* label() const;
    -
    92 MTL::Device* device() const;
    -
    93};
    -
    -
    94
    -
    - -
    96 : public NS::Referencing<MatrixMultiplication, Kernel> {
    -
    97 public:
    -
    98 static class MatrixMultiplication* alloc();
    -
    99
    - -
    101 MTL::Device* device,
    -
    102 bool transposeLeft,
    -
    103 bool transposeRight,
    -
    104 NS::UInteger resultRows,
    -
    105 NS::UInteger resultColumns,
    -
    106 NS::UInteger interiorColumns,
    -
    107 double alpha,
    -
    108 double beta);
    -
    109
    - -
    111 MTL::CommandBuffer* commandBuffer,
    -
    112 Matrix* leftMatrix,
    -
    113 Matrix* rightMatrix,
    -
    114 Matrix* resultMatrix);
    -
    115
    -
    116 void setLeftMatrixOrigin(MTL::Origin origin);
    -
    117 void setRightMatrixOrigin(MTL::Origin origin);
    -
    118 void setResultMatrixOrigin(MTL::Origin origin);
    -
    119 void setBatchStart(NS::UInteger batchStart);
    -
    120 void setBatchSize(NS::UInteger batchSize);
    -
    121};
    -
    -
    122
    -
    -
    123class VectorDescriptor : public NS::Copying<VectorDescriptor> {
    -
    124 public:
    - -
    126 NS::UInteger length,
    -
    127 NS::UInteger dataType);
    - -
    129 NS::UInteger length,
    -
    130 NS::UInteger vectors,
    -
    131 NS::UInteger vectorBytes,
    -
    132 NS::UInteger dataType);
    -
    133};
    -
    -
    134
    -
    -
    135class Vector : public NS::Referencing<Vector> {
    -
    136 public:
    -
    137 static class Vector* alloc();
    -
    138 Vector* init(MTL::Buffer* buffer, VectorDescriptor* descriptor);
    -
    139 Vector* init(const MTL::Buffer* buffer, VectorDescriptor* descriptor);
    -
    140};
    -
    -
    141
    -
    - -
    143 : public NS::Referencing<MatrixVectorMultiplication, Kernel> {
    -
    144 public:
    -
    145 static class MatrixVectorMultiplication* alloc();
    -
    146
    - -
    148 MTL::Device* device,
    -
    149 bool transpose,
    -
    150 NS::UInteger rows,
    -
    151 NS::UInteger columns,
    -
    152 double alpha,
    -
    153 double beta);
    -
    154
    - -
    156 MTL::CommandBuffer* commandBuffer,
    -
    157 Matrix* inputMatrix,
    -
    158 Vector* inputVector,
    -
    159 Vector* resultVector);
    -
    160};
    -
    -
    161
    -
    - -
    163 NS::UInteger rows,
    -
    164 NS::UInteger columns,
    -
    165 NS::UInteger rowBytes,
    -
    166 NS::UInteger dataType) {
    -
    167 return Object::sendMessage<MatrixDescriptor*>(
    -
    168 _MPS_PRIVATE_CLS(MPSMatrixDescriptor),
    -
    169 _MPS_PRIVATE_SEL(matrixDescriptorWithRows_columns_rowBytes_dataType),
    -
    170 rows,
    -
    171 columns,
    -
    172 rowBytes,
    -
    173 dataType);
    -
    174}
    -
    -
    175
    -
    - -
    177 NS::UInteger rows,
    -
    178 NS::UInteger columns,
    -
    179 NS::UInteger matrices,
    -
    180 NS::UInteger rowBytes,
    -
    181 NS::UInteger matrixBytes,
    -
    182 NS::UInteger dataType) {
    -
    183 return Object::sendMessage<MatrixDescriptor*>(
    -
    184 _MPS_PRIVATE_CLS(MPSMatrixDescriptor),
    - -
    186 matrixDescriptorWithRows_columns_matrices_rowBytes_matrixBytes_dataType),
    -
    187 rows,
    -
    188 columns,
    -
    189 matrices,
    -
    190 rowBytes,
    -
    191 matrixBytes,
    -
    192 dataType);
    -
    193}
    -
    -
    194
    -
    -
    195_MTL_INLINE NS::UInteger MatrixDescriptor::rows() const {
    -
    196 return Object::sendMessage<NS::UInteger>(this, _MPS_PRIVATE_SEL(rows));
    -
    197}
    -
    -
    198
    -
    -
    199_MTL_INLINE Matrix* Matrix::alloc() {
    -
    200 return NS::Object::alloc<Matrix>(_MPS_PRIVATE_CLS(MPSMatrix));
    -
    201}
    -
    -
    202
    -
    -
    203_MTL_INLINE Matrix* Matrix::init(
    -
    204 MTL::Buffer* buffer,
    -
    205 MatrixDescriptor* descriptor) {
    -
    206 return Object::sendMessage<Matrix*>(
    -
    207 this, _MPS_PRIVATE_SEL(initWithBuffer_descriptor), buffer, descriptor);
    -
    208}
    -
    -
    209
    -
    -
    210_MTL_INLINE Matrix* Matrix::init(
    -
    211 const MTL::Buffer* buffer,
    -
    212 MatrixDescriptor* descriptor) {
    -
    213 return init(const_cast<MTL::Buffer*>(buffer), descriptor);
    -
    214}
    -
    -
    215
    -
    -
    216_MTL_INLINE NS::String* Kernel::label() const {
    -
    217 return Object::sendMessage<NS::String*>(this, _MPS_PRIVATE_SEL(label));
    -
    218}
    -
    -
    219
    -
    -
    220_MTL_INLINE MTL::Device* Kernel::device() const {
    -
    221 return Object::sendMessage<MTL::Device*>(this, _MPS_PRIVATE_SEL(device));
    -
    222}
    -
    -
    223
    -
    - -
    225 return NS::Object::alloc<MatrixMultiplication>(
    -
    226 _MPS_PRIVATE_CLS(MPSMatrixMultiplication));
    -
    227}
    -
    -
    228
    -
    - -
    230 MTL::Device* device,
    -
    231 bool transposeLeft,
    -
    232 bool transposeRight,
    -
    233 NS::UInteger resultRows,
    -
    234 NS::UInteger resultColumns,
    -
    235 NS::UInteger interiorColumns,
    -
    236 double alpha,
    -
    237 double beta) {
    -
    238 return Object::sendMessage<MatrixMultiplication*>(
    -
    239 this,
    -
    240 _MPS_PRIVATE_SEL(initWithDevice_),
    -
    241 device,
    -
    242 transposeLeft,
    -
    243 transposeRight,
    -
    244 resultRows,
    -
    245 resultColumns,
    -
    246 interiorColumns,
    -
    247 alpha,
    -
    248 beta);
    -
    249}
    -
    -
    250
    -
    - -
    252 MTL::CommandBuffer* commandBuffer,
    -
    253 Matrix* leftMatrix,
    -
    254 Matrix* rightMatrix,
    -
    255 Matrix* resultMatrix) {
    -
    256 return Object::sendMessage<void>(
    -
    257 this,
    - -
    259 encodeToCommandBuffer_leftMatrix_rightMatrix_resultMatrix),
    -
    260 commandBuffer,
    -
    261 leftMatrix,
    -
    262 rightMatrix,
    -
    263 resultMatrix);
    -
    264}
    -
    -
    265
    -
    -
    266_MTL_INLINE void MatrixMultiplication::setLeftMatrixOrigin(MTL::Origin origin) {
    -
    267 Object::sendMessage<void>(
    -
    268 this, _MPS_PRIVATE_SEL(setLeftMatrixOrigin_), origin);
    -
    269}
    -
    -
    270
    -
    - -
    272 MTL::Origin origin) {
    -
    273 Object::sendMessage<void>(
    -
    274 this, _MPS_PRIVATE_SEL(setRightMatrixOrigin_), origin);
    -
    275}
    -
    -
    276
    -
    - -
    278 MTL::Origin origin) {
    -
    279 Object::sendMessage<void>(
    -
    280 this, _MPS_PRIVATE_SEL(setResultMatrixOrigin_), origin);
    -
    281}
    -
    -
    282
    -
    -
    283_MTL_INLINE void MatrixMultiplication::setBatchStart(NS::UInteger batchStart) {
    -
    284 Object::sendMessage<void>(this, _MPS_PRIVATE_SEL(setBatchStart_), batchStart);
    -
    285}
    -
    -
    286
    -
    -
    287_MTL_INLINE void MatrixMultiplication::setBatchSize(NS::UInteger batchSize) {
    -
    288 Object::sendMessage<void>(this, _MPS_PRIVATE_SEL(setBatchSize_), batchSize);
    -
    289}
    -
    -
    290
    -
    - -
    292 NS::UInteger length,
    -
    293 NS::UInteger dataType) {
    -
    294 return Object::sendMessage<VectorDescriptor*>(
    -
    295 _MPS_PRIVATE_CLS(MPSVectorDescriptor),
    -
    296 _MPS_PRIVATE_SEL(vectorDescriptorWithLength_dataType),
    -
    297 length,
    -
    298 dataType);
    -
    299}
    -
    -
    300
    -
    - -
    302 NS::UInteger length,
    -
    303 NS::UInteger vectors,
    -
    304 NS::UInteger vectorBytes,
    -
    305 NS::UInteger dataType) {
    -
    306 return Object::sendMessage<VectorDescriptor*>(
    -
    307 _MPS_PRIVATE_CLS(MPSVectorDescriptor),
    -
    308 _MPS_PRIVATE_SEL(vectorDescriptorWithLength_vectors_vectorBytes_dataType),
    -
    309 length,
    -
    310 vectors,
    -
    311 vectorBytes,
    -
    312 dataType);
    -
    313}
    -
    -
    314
    -
    -
    315_MTL_INLINE Vector* Vector::alloc() {
    -
    316 return NS::Object::alloc<Vector>(_MPS_PRIVATE_CLS(MPSVector));
    -
    317}
    -
    -
    318
    -
    -
    319_MTL_INLINE Vector* Vector::init(
    -
    320 MTL::Buffer* buffer,
    -
    321 VectorDescriptor* descriptor) {
    -
    322 return Object::sendMessage<Vector*>(
    -
    323 this, _MPS_PRIVATE_SEL(initWithBuffer_descriptor), buffer, descriptor);
    -
    324}
    -
    -
    325
    -
    -
    326_MTL_INLINE Vector* Vector::init(
    -
    327 const MTL::Buffer* buffer,
    -
    328 VectorDescriptor* descriptor) {
    -
    329 return init(const_cast<MTL::Buffer*>(buffer), descriptor);
    -
    330}
    -
    -
    331
    -
    - -
    333 return NS::Object::alloc<MatrixVectorMultiplication>(
    -
    334 _MPS_PRIVATE_CLS(MPSMatrixVectorMultiplication));
    -
    335}
    -
    -
    336
    -
    - -
    338 MTL::Device* device,
    -
    339 bool transpose,
    -
    340 NS::UInteger rows,
    -
    341 NS::UInteger columns,
    -
    342 double alpha,
    -
    343 double beta) {
    -
    344 return Object::sendMessage<MatrixVectorMultiplication*>(
    -
    345 this,
    -
    346 _MPS_PRIVATE_SEL(initWithDevice_transpose_rows_columns_alpha_beta),
    -
    347 device,
    -
    348 transpose,
    -
    349 rows,
    -
    350 columns,
    -
    351 alpha,
    -
    352 beta);
    -
    353}
    -
    -
    354
    -
    - -
    356 MTL::CommandBuffer* commandBuffer,
    -
    357 Matrix* inputMatrix,
    -
    358 Vector* inputVector,
    -
    359 Vector* resultVector) {
    -
    360 return Object::sendMessage<void>(
    -
    361 this,
    - -
    363 encodeToCommandBuffer_inputMatrix_inputVector_resultVector),
    -
    364 commandBuffer,
    -
    365 inputMatrix,
    -
    366 inputVector,
    -
    367 resultVector);
    -
    368}
    -
    -
    369
    -
    370} // namespace MPS
    -
    -
    Definition gemm.h:89
    -
    MTL::Device * device() const
    Definition gemm.h:220
    -
    NS::String * label() const
    Definition gemm.h:216
    -
    Definition gemm.h:65
    -
    NS::UInteger rows() const
    Definition gemm.h:195
    -
    static class MatrixDescriptor * matrixDescriptor(NS::UInteger rows, NS::UInteger columns, NS::UInteger rowBytes, NS::UInteger dataType)
    Definition gemm.h:162
    -
    Definition gemm.h:82
    -
    Matrix * init(MTL::Buffer *buffer, MatrixDescriptor *descriptor)
    Definition gemm.h:203
    -
    static class Matrix * alloc()
    Definition gemm.h:199
    -
    Definition gemm.h:96
    -
    MatrixMultiplication * init(MTL::Device *device, bool transposeLeft, bool transposeRight, NS::UInteger resultRows, NS::UInteger resultColumns, NS::UInteger interiorColumns, double alpha, double beta)
    Definition gemm.h:229
    -
    void setBatchStart(NS::UInteger batchStart)
    Definition gemm.h:283
    -
    void setResultMatrixOrigin(MTL::Origin origin)
    Definition gemm.h:277
    -
    void setLeftMatrixOrigin(MTL::Origin origin)
    Definition gemm.h:266
    -
    static class MatrixMultiplication * alloc()
    Definition gemm.h:224
    -
    void setBatchSize(NS::UInteger batchSize)
    Definition gemm.h:287
    -
    void encodeToCommandBuffer(MTL::CommandBuffer *commandBuffer, Matrix *leftMatrix, Matrix *rightMatrix, Matrix *resultMatrix)
    Definition gemm.h:251
    -
    void setRightMatrixOrigin(MTL::Origin origin)
    Definition gemm.h:271
    -
    Definition gemm.h:143
    -
    MatrixVectorMultiplication * init(MTL::Device *device, bool transpose, NS::UInteger rows, NS::UInteger columns, double alpha, double beta)
    Definition gemm.h:337
    -
    void encodeToCommandBuffer(MTL::CommandBuffer *commandBuffer, Matrix *inputMatrix, Vector *inputVector, Vector *resultVector)
    Definition gemm.h:355
    -
    static class MatrixVectorMultiplication * alloc()
    Definition gemm.h:332
    -
    Definition gemm.h:123
    -
    static class VectorDescriptor * vectorDescriptor(NS::UInteger length, NS::UInteger dataType)
    Definition gemm.h:291
    -
    Definition gemm.h:135
    -
    Vector * init(MTL::Buffer *buffer, VectorDescriptor *descriptor)
    Definition gemm.h:319
    -
    static class Vector * alloc()
    Definition gemm.h:315
    -
    #define _MPS_PRIVATE_SEL(accessor)
    Definition gemm.h:8
    -
    #define _MPS_PRIVATE_CLS(symbol)
    Definition gemm.h:7
    -
    Definition gemm.h:55
    -
    DataType
    Definition gemm.h:57
    -
    @ DataTypeFloat32
    Definition gemm.h:61
    -
    @ DataTypeFloatBit
    Definition gemm.h:58
    -
    @ DataTypeBFloat16
    Definition gemm.h:62
    -
    @ DataTypeFloat16
    Definition gemm.h:60
    -
    @ DataTypeAlternateEncodingBit
    Definition gemm.h:59
    -
    Definition gemm.h:10
    -
    _MTL_PRIVATE_DEF_CLS(MPSMatrixDescriptor)
    -
    Definition gemm.h:20
    -
    _MTL_PRIVATE_DEF_SEL(matrixDescriptorWithRows_columns_rowBytes_dataType, "matrixDescriptorWithRows:columns:rowBytes:dataType:")
    -
    - - - - diff --git a/docs/build/html/namespace_m_p_s.html b/docs/build/html/namespace_m_p_s.html deleted file mode 100644 index b28781ded..000000000 --- a/docs/build/html/namespace_m_p_s.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - -MLX: MPS Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    - -
    MPS Namespace Reference
    -
    -
    - - - - - - - - - - - - - - - - -

    -Classes

    class  Kernel
     
    class  Matrix
     
    class  MatrixDescriptor
     
    class  MatrixMultiplication
     
    class  MatrixVectorMultiplication
     
    class  Vector
     
    class  VectorDescriptor
     
    - - - -

    -Typedefs

    typedef enum MPS::DataType DataType
     
    - - - -

    -Enumerations

    enum  DataType : uint32_t {
    -  DataTypeFloatBit = 0x10000000 -, DataTypeAlternateEncodingBit = 0x80000000 -, DataTypeFloat16 = DataTypeFloatBit | 16 -, DataTypeFloat32 = DataTypeFloatBit | 32 -,
    -  DataTypeBFloat16 = DataTypeAlternateEncodingBit | DataTypeFloat16 -
    - }
     
    -

    Typedef Documentation

    - -

    ◆ DataType

    - -
    -
    - - - - -
    typedef enum MPS::DataType MPS::DataType
    -
    - -
    -
    -

    Enumeration Type Documentation

    - -

    ◆ DataType

    - -
    -
    - - - - -
    enum MPS::DataType : uint32_t
    -
    - - - - - - -
    Enumerator
    DataTypeFloatBit 
    DataTypeAlternateEncodingBit 
    DataTypeFloat16 
    DataTypeFloat32 
    DataTypeBFloat16 
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespace_m_t_l.html b/docs/build/html/namespace_m_t_l.html deleted file mode 100644 index 1ac55b059..000000000 --- a/docs/build/html/namespace_m_t_l.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -MLX: MTL Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    - -
    MTL Namespace Reference
    -
    -
    - - - - -

    -Namespaces

    namespace  Private
     
    -
    - - - - diff --git a/docs/build/html/namespace_m_t_l_1_1_private.html b/docs/build/html/namespace_m_t_l_1_1_private.html deleted file mode 100644 index f2a17676c..000000000 --- a/docs/build/html/namespace_m_t_l_1_1_private.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - -MLX: MTL::Private Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    MTL::Private Namespace Reference
    -
    -
    - - - - - - -

    -Namespaces

    namespace  Class
     
    namespace  Selector
     
    -
    - - - - diff --git a/docs/build/html/namespace_m_t_l_1_1_private_1_1_class.html b/docs/build/html/namespace_m_t_l_1_1_private_1_1_class.html deleted file mode 100644 index 99e9f9c46..000000000 --- a/docs/build/html/namespace_m_t_l_1_1_private_1_1_class.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - -MLX: MTL::Private::Class Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    MTL::Private::Class Namespace Reference
    -
    -
    - - - - - - - - - - - - - - - - -

    -Functions

     _MTL_PRIVATE_DEF_CLS (MPSMatrixDescriptor)
     
     _MTL_PRIVATE_DEF_CLS (MPSMatrix)
     
     _MTL_PRIVATE_DEF_CLS (MPSVectorDescriptor)
     
     _MTL_PRIVATE_DEF_CLS (MPSVector)
     
     _MTL_PRIVATE_DEF_CLS (MPSKernel)
     
     _MTL_PRIVATE_DEF_CLS (MPSMatrixMultiplication)
     
     _MTL_PRIVATE_DEF_CLS (MPSMatrixVectorMultiplication)
     
    -

    Function Documentation

    - -

    ◆ _MTL_PRIVATE_DEF_CLS() [1/7]

    - -
    -
    - - - - - - - -
    MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSKernel )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_CLS() [2/7]

    - -
    -
    - - - - - - - -
    MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSMatrix )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_CLS() [3/7]

    - -
    -
    - - - - - - - -
    MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSMatrixDescriptor )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_CLS() [4/7]

    - -
    -
    - - - - - - - -
    MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSMatrixMultiplication )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_CLS() [5/7]

    - -
    -
    - - - - - - - -
    MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSMatrixVectorMultiplication )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_CLS() [6/7]

    - -
    -
    - - - - - - - -
    MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSVector )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_CLS() [7/7]

    - -
    -
    - - - - - - - -
    MTL::Private::Class::_MTL_PRIVATE_DEF_CLS (MPSVectorDescriptor )
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespace_m_t_l_1_1_private_1_1_selector.html b/docs/build/html/namespace_m_t_l_1_1_private_1_1_selector.html deleted file mode 100644 index a3efee9d0..000000000 --- a/docs/build/html/namespace_m_t_l_1_1_private_1_1_selector.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - - -MLX: MTL::Private::Selector Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    MTL::Private::Selector Namespace Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

     _MTL_PRIVATE_DEF_SEL (matrixDescriptorWithRows_columns_rowBytes_dataType, "matrixDescriptorWithRows:columns:rowBytes:dataType:")
     
     _MTL_PRIVATE_DEF_SEL (matrixDescriptorWithRows_columns_matrices_rowBytes_matrixBytes_dataType, "matrixDescriptorWithRows:columns:matrices:rowBytes:matrixBytes:dataType:")
     
     _MTL_PRIVATE_DEF_SEL (rows, "rows")
     
     _MTL_PRIVATE_DEF_SEL (initWithBuffer_descriptor, "initWithBuffer:descriptor:")
     
     _MTL_PRIVATE_DEF_SEL (initWithDevice_, "initWithDevice:transposeLeft:transposeRight:" "resultRows:resultColumns:interiorColumns:alpha:beta:")
     
     _MTL_PRIVATE_DEF_SEL (encodeToCommandBuffer_leftMatrix_rightMatrix_resultMatrix, "encodeToCommandBuffer:leftMatrix:rightMatrix:resultMatrix:")
     
     _MTL_PRIVATE_DEF_SEL (setLeftMatrixOrigin_, "setLeftMatrixOrigin:")
     
     _MTL_PRIVATE_DEF_SEL (setRightMatrixOrigin_, "setRightMatrixOrigin:")
     
     _MTL_PRIVATE_DEF_SEL (setResultMatrixOrigin_, "setResultMatrixOrigin:")
     
     _MTL_PRIVATE_DEF_SEL (setBatchStart_, "setBatchStart:")
     
     _MTL_PRIVATE_DEF_SEL (setBatchSize_, "setBatchSize:")
     
     _MTL_PRIVATE_DEF_SEL (vectorDescriptorWithLength_dataType, "vectorDescriptorWithLength:dataType:")
     
     _MTL_PRIVATE_DEF_SEL (vectorDescriptorWithLength_vectors_vectorBytes_dataType, "vectorDescriptorWithLength:vectors:vectorBytes:dataType:")
     
     _MTL_PRIVATE_DEF_SEL (initWithDevice_transpose_rows_columns_alpha_beta, "initWithDevice:transpose:rows:columns:alpha:beta:")
     
     _MTL_PRIVATE_DEF_SEL (encodeToCommandBuffer_inputMatrix_inputVector_resultVector, "encodeToCommandBuffer:inputMatrix:inputVector:resultVector:")
     
    -

    Function Documentation

    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [1/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (encodeToCommandBuffer_inputMatrix_inputVector_resultVector ,
    "encodeToCommandBuffer:inputMatrix:inputVector:resultVector:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [2/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (encodeToCommandBuffer_leftMatrix_rightMatrix_resultMatrix ,
    "encodeToCommandBuffer:leftMatrix:rightMatrix:resultMatrix:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [3/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (initWithBuffer_descriptor ,
    "initWithBuffer:descriptor:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [4/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (initWithDevice_ ,
    "initWithDevice:transposeLeft:transposeRight:" "resultRows:resultColumns:interiorColumns:alpha:beta:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [5/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (initWithDevice_transpose_rows_columns_alpha_beta ,
    "initWithDevice:transpose:rows:columns:alpha:beta:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [6/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (matrixDescriptorWithRows_columns_matrices_rowBytes_matrixBytes_dataType ,
    "matrixDescriptorWithRows:columns:matrices:rowBytes:matrixBytes:dataType:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [7/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (matrixDescriptorWithRows_columns_rowBytes_dataType ,
    "matrixDescriptorWithRows:columns:rowBytes:dataType:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [8/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (rows ,
    "rows"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [9/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (setBatchSize_ ,
    "setBatchSize:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [10/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (setBatchStart_ ,
    "setBatchStart:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [11/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (setLeftMatrixOrigin_ ,
    "setLeftMatrixOrigin:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [12/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (setResultMatrixOrigin_ ,
    "setResultMatrixOrigin:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [13/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (setRightMatrixOrigin_ ,
    "setRightMatrixOrigin:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [14/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (vectorDescriptorWithLength_dataType ,
    "vectorDescriptorWithLength:dataType:"  )
    -
    - -
    -
    - -

    ◆ _MTL_PRIVATE_DEF_SEL() [15/15]

    - -
    -
    - - - - - - - - - - - -
    MTL::Private::Selector::_MTL_PRIVATE_DEF_SEL (vectorDescriptorWithLength_vectors_vectorBytes_dataType ,
    "vectorDescriptorWithLength:vectors:vectorBytes:dataType:"  )
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemembers.html b/docs/build/html/namespacemembers.html deleted file mode 100644 index e3075eacf..000000000 --- a/docs/build/html/namespacemembers.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - _ -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_a.html b/docs/build/html/namespacemembers_a.html deleted file mode 100644 index 27eecc1cc..000000000 --- a/docs/build/html/namespacemembers_a.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - a -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_b.html b/docs/build/html/namespacemembers_b.html deleted file mode 100644 index b17e67ab0..000000000 --- a/docs/build/html/namespacemembers_b.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - b -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_c.html b/docs/build/html/namespacemembers_c.html deleted file mode 100644 index 818b93804..000000000 --- a/docs/build/html/namespacemembers_c.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - c -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_d.html b/docs/build/html/namespacemembers_d.html deleted file mode 100644 index 833d8a4ba..000000000 --- a/docs/build/html/namespacemembers_d.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - d -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_e.html b/docs/build/html/namespacemembers_e.html deleted file mode 100644 index 3fa4728c2..000000000 --- a/docs/build/html/namespacemembers_e.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - e -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_enum.html b/docs/build/html/namespacemembers_enum.html deleted file mode 100644 index ca5e91440..000000000 --- a/docs/build/html/namespacemembers_enum.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace enums with links to the namespace documentation for each enum:
    -
    - - - - diff --git a/docs/build/html/namespacemembers_eval.html b/docs/build/html/namespacemembers_eval.html deleted file mode 100644 index 417bd48a8..000000000 --- a/docs/build/html/namespacemembers_eval.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace enum values with links to the namespace documentation for each enum value:
      -
    • ContiguousAllReduce : mlx::core
    • -
    • ContiguousReduce : mlx::core
    • -
    • ContiguousStridedReduce : mlx::core
    • -
    • DataTypeAlternateEncodingBit : MPS
    • -
    • DataTypeBFloat16 : MPS
    • -
    • DataTypeFloat16 : MPS
    • -
    • DataTypeFloat32 : MPS
    • -
    • DataTypeFloatBit : MPS
    • -
    • GeneralContiguousReduce : mlx::core
    • -
    • GeneralReduce : mlx::core
    • -
    • GeneralStridedReduce : mlx::core
    • -
    -
    - - - - diff --git a/docs/build/html/namespacemembers_f.html b/docs/build/html/namespacemembers_f.html deleted file mode 100644 index e898a0dcd..000000000 --- a/docs/build/html/namespacemembers_f.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - f -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func.html b/docs/build/html/namespacemembers_func.html deleted file mode 100644 index 58c784a67..000000000 --- a/docs/build/html/namespacemembers_func.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - _ -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_a.html b/docs/build/html/namespacemembers_func_a.html deleted file mode 100644 index 88a411364..000000000 --- a/docs/build/html/namespacemembers_func_a.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - a -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_b.html b/docs/build/html/namespacemembers_func_b.html deleted file mode 100644 index d124b1d39..000000000 --- a/docs/build/html/namespacemembers_func_b.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - b -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_c.html b/docs/build/html/namespacemembers_func_c.html deleted file mode 100644 index 7afc7ea56..000000000 --- a/docs/build/html/namespacemembers_func_c.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - c -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_d.html b/docs/build/html/namespacemembers_func_d.html deleted file mode 100644 index a177e646b..000000000 --- a/docs/build/html/namespacemembers_func_d.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - d -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_e.html b/docs/build/html/namespacemembers_func_e.html deleted file mode 100644 index c225c1baa..000000000 --- a/docs/build/html/namespacemembers_func_e.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - e -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_f.html b/docs/build/html/namespacemembers_func_f.html deleted file mode 100644 index 5cef05b0d..000000000 --- a/docs/build/html/namespacemembers_func_f.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - f -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_g.html b/docs/build/html/namespacemembers_func_g.html deleted file mode 100644 index bd318330c..000000000 --- a/docs/build/html/namespacemembers_func_g.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - g -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_i.html b/docs/build/html/namespacemembers_func_i.html deleted file mode 100644 index 585c71f09..000000000 --- a/docs/build/html/namespacemembers_func_i.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - i -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_j.html b/docs/build/html/namespacemembers_func_j.html deleted file mode 100644 index 478310fc7..000000000 --- a/docs/build/html/namespacemembers_func_j.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - j -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_k.html b/docs/build/html/namespacemembers_func_k.html deleted file mode 100644 index c17597ff7..000000000 --- a/docs/build/html/namespacemembers_func_k.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - k -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_l.html b/docs/build/html/namespacemembers_func_l.html deleted file mode 100644 index 8b9559099..000000000 --- a/docs/build/html/namespacemembers_func_l.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - l -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_m.html b/docs/build/html/namespacemembers_func_m.html deleted file mode 100644 index 2cc9d7308..000000000 --- a/docs/build/html/namespacemembers_func_m.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - m -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_n.html b/docs/build/html/namespacemembers_func_n.html deleted file mode 100644 index 1209f1296..000000000 --- a/docs/build/html/namespacemembers_func_n.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - n -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_o.html b/docs/build/html/namespacemembers_func_o.html deleted file mode 100644 index 8583a4200..000000000 --- a/docs/build/html/namespacemembers_func_o.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - o -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_p.html b/docs/build/html/namespacemembers_func_p.html deleted file mode 100644 index dfe294519..000000000 --- a/docs/build/html/namespacemembers_func_p.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - p -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_q.html b/docs/build/html/namespacemembers_func_q.html deleted file mode 100644 index 3dc3e9676..000000000 --- a/docs/build/html/namespacemembers_func_q.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - q -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_r.html b/docs/build/html/namespacemembers_func_r.html deleted file mode 100644 index b0c255068..000000000 --- a/docs/build/html/namespacemembers_func_r.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - r -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_s.html b/docs/build/html/namespacemembers_func_s.html deleted file mode 100644 index 940686ed7..000000000 --- a/docs/build/html/namespacemembers_func_s.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - s -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_t.html b/docs/build/html/namespacemembers_func_t.html deleted file mode 100644 index 66aa426c4..000000000 --- a/docs/build/html/namespacemembers_func_t.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - t -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_u.html b/docs/build/html/namespacemembers_func_u.html deleted file mode 100644 index fa647eecc..000000000 --- a/docs/build/html/namespacemembers_func_u.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - u -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_v.html b/docs/build/html/namespacemembers_func_v.html deleted file mode 100644 index d09e3e262..000000000 --- a/docs/build/html/namespacemembers_func_v.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - v -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_w.html b/docs/build/html/namespacemembers_func_w.html deleted file mode 100644 index ea0d0d3ab..000000000 --- a/docs/build/html/namespacemembers_func_w.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - w -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_func_z.html b/docs/build/html/namespacemembers_func_z.html deleted file mode 100644 index 18bea3a42..000000000 --- a/docs/build/html/namespacemembers_func_z.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace functions with links to the namespace documentation for each function:
    - -

    - z -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_g.html b/docs/build/html/namespacemembers_g.html deleted file mode 100644 index a8f5773a7..000000000 --- a/docs/build/html/namespacemembers_g.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - g -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_i.html b/docs/build/html/namespacemembers_i.html deleted file mode 100644 index 0723ac750..000000000 --- a/docs/build/html/namespacemembers_i.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - i -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_j.html b/docs/build/html/namespacemembers_j.html deleted file mode 100644 index a94493ee7..000000000 --- a/docs/build/html/namespacemembers_j.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - j -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_k.html b/docs/build/html/namespacemembers_k.html deleted file mode 100644 index a224ff244..000000000 --- a/docs/build/html/namespacemembers_k.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - k -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_l.html b/docs/build/html/namespacemembers_l.html deleted file mode 100644 index 7d0513b3b..000000000 --- a/docs/build/html/namespacemembers_l.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - l -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_m.html b/docs/build/html/namespacemembers_m.html deleted file mode 100644 index 7a80698c6..000000000 --- a/docs/build/html/namespacemembers_m.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - m -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_n.html b/docs/build/html/namespacemembers_n.html deleted file mode 100644 index 16e0d18ee..000000000 --- a/docs/build/html/namespacemembers_n.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - n -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_o.html b/docs/build/html/namespacemembers_o.html deleted file mode 100644 index ec9921d56..000000000 --- a/docs/build/html/namespacemembers_o.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - o -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_p.html b/docs/build/html/namespacemembers_p.html deleted file mode 100644 index f59f862ee..000000000 --- a/docs/build/html/namespacemembers_p.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - p -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_q.html b/docs/build/html/namespacemembers_q.html deleted file mode 100644 index 2be44f174..000000000 --- a/docs/build/html/namespacemembers_q.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - q -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_r.html b/docs/build/html/namespacemembers_r.html deleted file mode 100644 index 6f48a2979..000000000 --- a/docs/build/html/namespacemembers_r.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - r -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_s.html b/docs/build/html/namespacemembers_s.html deleted file mode 100644 index 3a88b8e70..000000000 --- a/docs/build/html/namespacemembers_s.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - s -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_t.html b/docs/build/html/namespacemembers_t.html deleted file mode 100644 index eb7280ef4..000000000 --- a/docs/build/html/namespacemembers_t.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - t -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_type.html b/docs/build/html/namespacemembers_type.html deleted file mode 100644 index 9d45cf3e1..000000000 --- a/docs/build/html/namespacemembers_type.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace typedefs with links to the namespace documentation for each typedef:
    -
    - - - - diff --git a/docs/build/html/namespacemembers_u.html b/docs/build/html/namespacemembers_u.html deleted file mode 100644 index 0a9ced77c..000000000 --- a/docs/build/html/namespacemembers_u.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - u -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_v.html b/docs/build/html/namespacemembers_v.html deleted file mode 100644 index 557cbae99..000000000 --- a/docs/build/html/namespacemembers_v.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - v -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_vars.html b/docs/build/html/namespacemembers_vars.html deleted file mode 100644 index 7ea53b770..000000000 --- a/docs/build/html/namespacemembers_vars.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace variables with links to the namespace documentation for each variable:
    - -

    - b -

    - - -

    - c -

    - - -

    - f -

    - - -

    - g -

    - - -

    - i -

    - - -

    - m -

    - - -

    - n -

    - - -

    - s -

    - - -

    - u -

    - - -

    - v -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_w.html b/docs/build/html/namespacemembers_w.html deleted file mode 100644 index 137c227c7..000000000 --- a/docs/build/html/namespacemembers_w.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - w -

    -
    - - - - diff --git a/docs/build/html/namespacemembers_z.html b/docs/build/html/namespacemembers_z.html deleted file mode 100644 index 39853973b..000000000 --- a/docs/build/html/namespacemembers_z.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -MLX: Namespace Members - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Here is a list of all namespace members with links to the namespace documentation for each member:
    - -

    - z -

    -
    - - - - diff --git a/docs/build/html/namespacemetal.html b/docs/build/html/namespacemetal.html deleted file mode 100644 index 5575222a1..000000000 --- a/docs/build/html/namespacemetal.html +++ /dev/null @@ -1,1661 +0,0 @@ - - - - - - - -MLX: metal Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    - -
    metal Namespace Reference
    -
    -
    - - - - - - -

    -Namespaces

    namespace  fast
     
    namespace  precise
     
    - - - -

    -Classes

    struct  _numeric_limits_impl< bfloat16_t >
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    METAL_FUNC bool isnan (_MLX_BFloat16 x)
     
    METAL_FUNC bfloat16_t abs (bfloat16_t x)
     
    METAL_FUNC bfloat16_t acos (bfloat16_t x)
     
    METAL_FUNC bfloat16_t acosh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t asin (bfloat16_t x)
     
    METAL_FUNC bfloat16_t asinh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t atan (bfloat16_t y_over_x)
     
    METAL_FUNC bfloat16_t atan2 (bfloat16_t y, bfloat16_t x)
     
    METAL_FUNC bfloat16_t atanh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t ceil (bfloat16_t x)
     
    METAL_FUNC bfloat16_t cos (bfloat16_t x)
     
    METAL_FUNC bfloat16_t cosh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t cospi (bfloat16_t x)
     
    METAL_FUNC bfloat16_t divide (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t exp (bfloat16_t x)
     
    METAL_FUNC bfloat16_t exp10 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t exp2 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t fabs (bfloat16_t x)
     
    METAL_FUNC bfloat16_t fdim (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t floor (bfloat16_t x)
     
    METAL_FUNC bfloat16_t fma (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmax (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t fmax3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmedian3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmin (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t fmin3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmod (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t fract (bfloat16_t x)
     
    METAL_FUNC bfloat16_t frexp (bfloat16_t x, thread int &exp)
     
    METAL_FUNC bfloat16_t ldexp (bfloat16_t x, int k)
     
    METAL_FUNC bfloat16_t log (bfloat16_t x)
     
    METAL_FUNC bfloat16_t log10 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t log2 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t max (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t max3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t median3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t min (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t min3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t nextafter (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t pow (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t powr (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t rint (bfloat16_t x)
     
    METAL_FUNC bfloat16_t round (bfloat16_t x)
     
    METAL_FUNC bfloat16_t rsqrt (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sin (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sinh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sinpi (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sqrt (bfloat16_t x)
     
    METAL_FUNC bfloat16_t tan (bfloat16_t x)
     
    METAL_FUNC bfloat16_t tanh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t tanpi (bfloat16_t x)
     
    METAL_FUNC bfloat16_t trunc (bfloat16_t x)
     
    METAL_FUNC bfloat16_t simd_broadcast (bfloat16_t data, ushort broadcast_lane_id)
     
    METAL_FUNC bfloat16_t simd_shuffle (bfloat16_t data, ushort simd_lane_id)
     
    METAL_FUNC bfloat16_t simd_shuffle_and_fill_down (bfloat16_t data, bfloat16_t filling_data, ushort delta, ushort modulo)
     
    METAL_FUNC bfloat16_t simd_shuffle_and_fill_down (bfloat16_t data, bfloat16_t filling_data, ushort delta)
     
    METAL_FUNC bfloat16_t simd_shuffle_and_fill_up (bfloat16_t data, bfloat16_t filling_data, ushort delta, ushort modulo)
     
    METAL_FUNC bfloat16_t simd_shuffle_and_fill_up (bfloat16_t data, bfloat16_t filling_data, ushort delta)
     
    METAL_FUNC bfloat16_t simd_shuffle_down (bfloat16_t data, ushort delta)
     
    METAL_FUNC bfloat16_t simd_shuffle_rotate_down (bfloat16_t data, ushort delta)
     
    METAL_FUNC bfloat16_t simd_shuffle_rotate_up (bfloat16_t data, ushort delta)
     
    METAL_FUNC bfloat16_t simd_shuffle_up (bfloat16_t data, ushort delta)
     
    METAL_FUNC bfloat16_t simd_shuffle_xor (bfloat16_t data, ushort mask)
     
    METAL_FUNC bfloat16_t simd_max (bfloat16_t data)
     
    METAL_FUNC bfloat16_t simd_min (bfloat16_t data)
     
    METAL_FUNC bfloat16_t simd_prefix_exclusive_product (bfloat16_t data)
     
    METAL_FUNC bfloat16_t simd_prefix_exclusive_sum (bfloat16_t data)
     
    METAL_FUNC bfloat16_t simd_prefix_inclusive_product (bfloat16_t data)
     
    METAL_FUNC bfloat16_t simd_prefix_inclusive_sum (bfloat16_t data)
     
    METAL_FUNC bfloat16_t simd_product (bfloat16_t data)
     
    METAL_FUNC bfloat16_t simd_sum (bfloat16_t data)
     
    METAL_FUNC bfloat16_t simd_xor (bfloat16_t data)
     
    -

    Function Documentation

    - -

    ◆ abs()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::abs (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ acos()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::acos (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ acosh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::acosh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ asin()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::asin (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ asinh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::asinh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ atan()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::atan (bfloat16_t y_over_x)
    -
    - -
    -
    - -

    ◆ atan2()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::atan2 (bfloat16_t y,
    bfloat16_t x )
    -
    - -
    -
    - -

    ◆ atanh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::atanh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ ceil()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::ceil (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ cos()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::cos (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ cosh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::cosh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ cospi()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::cospi (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ divide()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::divide (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ exp()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::exp (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ exp10()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::exp10 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ exp2()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::exp2 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ fabs()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fabs (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ fdim()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fdim (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ floor()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::floor (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ fma()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fma (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmax()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fmax (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ fmax3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fmax3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmedian3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fmedian3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmin()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fmin (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ fmin3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fmin3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmod()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fmod (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ fract()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fract (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ frexp()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::frexp (bfloat16_t x,
    thread int & exp )
    -
    - -
    -
    - -

    ◆ isnan()

    - -
    -
    - - - - - - - -
    METAL_FUNC bool metal::isnan (_MLX_BFloat16 x)
    -
    - -
    -
    - -

    ◆ ldexp()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::ldexp (bfloat16_t x,
    int k )
    -
    - -
    -
    - -

    ◆ log()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::log (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ log10()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::log10 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ log2()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::log2 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ max()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::max (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ max3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::max3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ median3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::median3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ min()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::min (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ min3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::min3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ nextafter()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::nextafter (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ pow()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::pow (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ powr()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::powr (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ rint()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::rint (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ round()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::round (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ rsqrt()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::rsqrt (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ simd_broadcast()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_broadcast (bfloat16_t data,
    ushort broadcast_lane_id )
    -
    - -
    -
    - -

    ◆ simd_max()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_max (bfloat16_t data)
    -
    - -
    -
    - -

    ◆ simd_min()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_min (bfloat16_t data)
    -
    - -
    -
    - -

    ◆ simd_prefix_exclusive_product()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_prefix_exclusive_product (bfloat16_t data)
    -
    - -
    -
    - -

    ◆ simd_prefix_exclusive_sum()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_prefix_exclusive_sum (bfloat16_t data)
    -
    - -
    -
    - -

    ◆ simd_prefix_inclusive_product()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_prefix_inclusive_product (bfloat16_t data)
    -
    - -
    -
    - -

    ◆ simd_prefix_inclusive_sum()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_prefix_inclusive_sum (bfloat16_t data)
    -
    - -
    -
    - -

    ◆ simd_product()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_product (bfloat16_t data)
    -
    - -
    -
    - -

    ◆ simd_shuffle()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_shuffle (bfloat16_t data,
    ushort simd_lane_id )
    -
    - -
    -
    - -

    ◆ simd_shuffle_and_fill_down() [1/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_shuffle_and_fill_down (bfloat16_t data,
    bfloat16_t filling_data,
    ushort delta )
    -
    - -
    -
    - -

    ◆ simd_shuffle_and_fill_down() [2/2]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_shuffle_and_fill_down (bfloat16_t data,
    bfloat16_t filling_data,
    ushort delta,
    ushort modulo )
    -
    - -
    -
    - -

    ◆ simd_shuffle_and_fill_up() [1/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_shuffle_and_fill_up (bfloat16_t data,
    bfloat16_t filling_data,
    ushort delta )
    -
    - -
    -
    - -

    ◆ simd_shuffle_and_fill_up() [2/2]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_shuffle_and_fill_up (bfloat16_t data,
    bfloat16_t filling_data,
    ushort delta,
    ushort modulo )
    -
    - -
    -
    - -

    ◆ simd_shuffle_down()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_shuffle_down (bfloat16_t data,
    ushort delta )
    -
    - -
    -
    - -

    ◆ simd_shuffle_rotate_down()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_shuffle_rotate_down (bfloat16_t data,
    ushort delta )
    -
    - -
    -
    - -

    ◆ simd_shuffle_rotate_up()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_shuffle_rotate_up (bfloat16_t data,
    ushort delta )
    -
    - -
    -
    - -

    ◆ simd_shuffle_up()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_shuffle_up (bfloat16_t data,
    ushort delta )
    -
    - -
    -
    - -

    ◆ simd_shuffle_xor()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_shuffle_xor (bfloat16_t data,
    ushort mask )
    -
    - -
    -
    - -

    ◆ simd_sum()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_sum (bfloat16_t data)
    -
    - -
    -
    - -

    ◆ simd_xor()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::simd_xor (bfloat16_t data)
    -
    - -
    -
    - -

    ◆ sin()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::sin (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ sinh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::sinh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ sinpi()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::sinpi (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ sqrt()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::sqrt (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ tan()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::tan (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ tanh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::tanh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ tanpi()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::tanpi (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ trunc()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::trunc (bfloat16_t x)
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemetal_1_1fast.html b/docs/build/html/namespacemetal_1_1fast.html deleted file mode 100644 index 94b70a7f5..000000000 --- a/docs/build/html/namespacemetal_1_1fast.html +++ /dev/null @@ -1,1178 +0,0 @@ - - - - - - - -MLX: metal::fast Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    metal::fast Namespace Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    METAL_FUNC bfloat16_t abs (bfloat16_t x)
     
    METAL_FUNC bfloat16_t acos (bfloat16_t x)
     
    METAL_FUNC bfloat16_t acosh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t asin (bfloat16_t x)
     
    METAL_FUNC bfloat16_t asinh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t atan (bfloat16_t y_over_x)
     
    METAL_FUNC bfloat16_t atan2 (bfloat16_t y, bfloat16_t x)
     
    METAL_FUNC bfloat16_t atanh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t ceil (bfloat16_t x)
     
    METAL_FUNC bfloat16_t cos (bfloat16_t x)
     
    METAL_FUNC bfloat16_t cosh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t cospi (bfloat16_t x)
     
    METAL_FUNC bfloat16_t divide (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t exp (bfloat16_t x)
     
    METAL_FUNC bfloat16_t exp10 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t exp2 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t fabs (bfloat16_t x)
     
    METAL_FUNC bfloat16_t fdim (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t floor (bfloat16_t x)
     
    METAL_FUNC bfloat16_t fma (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmax (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t fmax3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmedian3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmin (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t fmin3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmod (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t fract (bfloat16_t x)
     
    METAL_FUNC bfloat16_t frexp (bfloat16_t x, thread int &exp)
     
    METAL_FUNC bfloat16_t ldexp (bfloat16_t x, int k)
     
    METAL_FUNC bfloat16_t log (bfloat16_t x)
     
    METAL_FUNC bfloat16_t log10 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t log2 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t max (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t max3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t median3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t min (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t min3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t nextafter (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t pow (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t powr (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t rint (bfloat16_t x)
     
    METAL_FUNC bfloat16_t round (bfloat16_t x)
     
    METAL_FUNC bfloat16_t rsqrt (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sin (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sinh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sinpi (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sqrt (bfloat16_t x)
     
    METAL_FUNC bfloat16_t tan (bfloat16_t x)
     
    METAL_FUNC bfloat16_t tanh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t tanpi (bfloat16_t x)
     
    METAL_FUNC bfloat16_t trunc (bfloat16_t x)
     
    -

    Function Documentation

    - -

    ◆ abs()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::abs (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ acos()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::acos (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ acosh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::acosh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ asin()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::asin (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ asinh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::asinh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ atan()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::atan (bfloat16_t y_over_x)
    -
    - -
    -
    - -

    ◆ atan2()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::atan2 (bfloat16_t y,
    bfloat16_t x )
    -
    - -
    -
    - -

    ◆ atanh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::atanh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ ceil()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::ceil (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ cos()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::cos (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ cosh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::cosh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ cospi()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::cospi (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ divide()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::divide (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ exp()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::exp (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ exp10()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::exp10 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ exp2()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::exp2 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ fabs()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::fabs (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ fdim()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::fdim (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ floor()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::floor (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ fma()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::fma (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmax()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::fmax (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ fmax3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::fmax3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmedian3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::fmedian3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmin()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::fmin (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ fmin3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::fmin3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmod()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::fmod (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ fract()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::fract (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ frexp()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::frexp (bfloat16_t x,
    thread int & exp )
    -
    - -
    -
    - -

    ◆ ldexp()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::ldexp (bfloat16_t x,
    int k )
    -
    - -
    -
    - -

    ◆ log()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::log (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ log10()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::log10 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ log2()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::log2 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ max()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::max (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ max3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::max3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ median3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::median3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ min()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::min (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ min3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::min3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ nextafter()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::nextafter (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ pow()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::pow (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ powr()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::powr (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ rint()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::rint (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ round()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::round (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ rsqrt()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::rsqrt (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ sin()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::sin (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ sinh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::sinh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ sinpi()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::sinpi (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ sqrt()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::sqrt (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ tan()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::tan (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ tanh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::tanh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ tanpi()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::tanpi (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ trunc()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::fast::trunc (bfloat16_t x)
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemetal_1_1precise.html b/docs/build/html/namespacemetal_1_1precise.html deleted file mode 100644 index 9af2b69fe..000000000 --- a/docs/build/html/namespacemetal_1_1precise.html +++ /dev/null @@ -1,1178 +0,0 @@ - - - - - - - -MLX: metal::precise Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    metal::precise Namespace Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    METAL_FUNC bfloat16_t abs (bfloat16_t x)
     
    METAL_FUNC bfloat16_t acos (bfloat16_t x)
     
    METAL_FUNC bfloat16_t acosh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t asin (bfloat16_t x)
     
    METAL_FUNC bfloat16_t asinh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t atan (bfloat16_t y_over_x)
     
    METAL_FUNC bfloat16_t atan2 (bfloat16_t y, bfloat16_t x)
     
    METAL_FUNC bfloat16_t atanh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t ceil (bfloat16_t x)
     
    METAL_FUNC bfloat16_t cos (bfloat16_t x)
     
    METAL_FUNC bfloat16_t cosh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t cospi (bfloat16_t x)
     
    METAL_FUNC bfloat16_t divide (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t exp (bfloat16_t x)
     
    METAL_FUNC bfloat16_t exp10 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t exp2 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t fabs (bfloat16_t x)
     
    METAL_FUNC bfloat16_t fdim (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t floor (bfloat16_t x)
     
    METAL_FUNC bfloat16_t fma (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmax (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t fmax3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmedian3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmin (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t fmin3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t fmod (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t fract (bfloat16_t x)
     
    METAL_FUNC bfloat16_t frexp (bfloat16_t x, thread int &exp)
     
    METAL_FUNC bfloat16_t ldexp (bfloat16_t x, int k)
     
    METAL_FUNC bfloat16_t log (bfloat16_t x)
     
    METAL_FUNC bfloat16_t log10 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t log2 (bfloat16_t x)
     
    METAL_FUNC bfloat16_t max (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t max3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t median3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t min (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t min3 (bfloat16_t x, bfloat16_t y, bfloat16_t z)
     
    METAL_FUNC bfloat16_t nextafter (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t pow (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t powr (bfloat16_t x, bfloat16_t y)
     
    METAL_FUNC bfloat16_t rint (bfloat16_t x)
     
    METAL_FUNC bfloat16_t round (bfloat16_t x)
     
    METAL_FUNC bfloat16_t rsqrt (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sin (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sinh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sinpi (bfloat16_t x)
     
    METAL_FUNC bfloat16_t sqrt (bfloat16_t x)
     
    METAL_FUNC bfloat16_t tan (bfloat16_t x)
     
    METAL_FUNC bfloat16_t tanh (bfloat16_t x)
     
    METAL_FUNC bfloat16_t tanpi (bfloat16_t x)
     
    METAL_FUNC bfloat16_t trunc (bfloat16_t x)
     
    -

    Function Documentation

    - -

    ◆ abs()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::abs (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ acos()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::acos (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ acosh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::acosh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ asin()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::asin (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ asinh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::asinh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ atan()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::atan (bfloat16_t y_over_x)
    -
    - -
    -
    - -

    ◆ atan2()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::atan2 (bfloat16_t y,
    bfloat16_t x )
    -
    - -
    -
    - -

    ◆ atanh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::atanh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ ceil()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::ceil (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ cos()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::cos (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ cosh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::cosh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ cospi()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::cospi (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ divide()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::divide (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ exp()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::exp (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ exp10()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::exp10 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ exp2()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::exp2 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ fabs()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::fabs (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ fdim()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::fdim (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ floor()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::floor (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ fma()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::fma (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmax()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::fmax (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ fmax3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::fmax3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmedian3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::fmedian3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmin()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::fmin (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ fmin3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::fmin3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ fmod()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::fmod (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ fract()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::fract (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ frexp()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::frexp (bfloat16_t x,
    thread int & exp )
    -
    - -
    -
    - -

    ◆ ldexp()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::ldexp (bfloat16_t x,
    int k )
    -
    - -
    -
    - -

    ◆ log()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::log (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ log10()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::log10 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ log2()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::log2 (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ max()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::max (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ max3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::max3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ median3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::median3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ min()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::min (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ min3()

    - -
    -
    - - - - - - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::min3 (bfloat16_t x,
    bfloat16_t y,
    bfloat16_t z )
    -
    - -
    -
    - -

    ◆ nextafter()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::nextafter (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ pow()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::pow (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ powr()

    - -
    -
    - - - - - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::powr (bfloat16_t x,
    bfloat16_t y )
    -
    - -
    -
    - -

    ◆ rint()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::rint (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ round()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::round (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ rsqrt()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::rsqrt (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ sin()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::sin (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ sinh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::sinh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ sinpi()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::sinpi (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ sqrt()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::sqrt (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ tan()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::tan (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ tanh()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::tanh (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ tanpi()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::tanpi (bfloat16_t x)
    -
    - -
    -
    - -

    ◆ trunc()

    - -
    -
    - - - - - - - -
    METAL_FUNC bfloat16_t metal::precise::trunc (bfloat16_t x)
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemlx.html b/docs/build/html/namespacemlx.html deleted file mode 100644 index 85a217efb..000000000 --- a/docs/build/html/namespacemlx.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -MLX: mlx Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    - -
    mlx Namespace Reference
    -
    -
    - - - - - - -

    -Namespaces

    namespace  core
     
    namespace  steel
     
    -
    - - - - diff --git a/docs/build/html/namespacemlx_1_1core.html b/docs/build/html/namespacemlx_1_1core.html deleted file mode 100644 index 6a9605979..000000000 --- a/docs/build/html/namespacemlx_1_1core.html +++ /dev/null @@ -1,16317 +0,0 @@ - - - - - - - -MLX: mlx::core Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mlx::core Namespace Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - -

    -Namespaces

    namespace  allocator
     
    namespace  detail
     
    namespace  fast
     
    namespace  fft
     
    namespace  io
     
    namespace  linalg
     
    namespace  metal
     
    namespace  random
     
    namespace  scheduler
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Classes

    struct  _MLX_BFloat16
     
    struct  _MLX_Float16
     
    class  Abs
     
    class  Add
     
    class  AddMM
     
    class  Arange
     
    class  ArcCos
     
    class  ArcCosh
     
    class  ArcSin
     
    class  ArcSinh
     
    class  ArcTan
     
    class  ArcTan2
     
    class  ArcTanh
     
    class  ArgPartition
     
    class  ArgReduce
     
    class  ArgSort
     
    class  array
     
    class  AsStrided
     
    class  AsType
     
    class  BitwiseBinary
     
    class  BlockMaskedMM
     
    class  BlockSparseMM
     
    class  BlockSparseQMM
     
    class  Broadcast
     
    class  Ceil
     
    class  Cholesky
     
    class  Compiled
     
    struct  complex128_t
     
    struct  complex64_t
     
    class  Concatenate
     
    class  Conjugate
     
    class  Convolution
     
    class  Copy
     
    class  Cos
     
    class  Cosh
     
    class  CustomVJP
     
    class  Depends
     
    struct  Device
     
    class  Divide
     
    class  DivMod
     
    struct  Dtype
     
    class  Equal
     
    class  Erf
     
    class  ErfInv
     
    class  Event
     
    class  Exp
     
    class  Expm1
     
    class  FFT
     
    class  Floor
     
    class  Full
     
    class  Gather
     
    class  Greater
     
    class  GreaterEqual
     
    class  Inverse
     
    class  Less
     
    class  LessEqual
     
    class  Load
     
    class  Log
     
    class  Log1p
     
    class  LogAddExp
     
    class  LogicalAnd
     
    class  LogicalNot
     
    class  LogicalOr
     
    class  Matmul
     
    class  Maximum
     
    class  Minimum
     
    class  Multiply
     
    class  Negative
     
    struct  NodeNamer
     
    class  NotEqual
     
    class  NumberOfElements
     
    class  Pad
     
    class  Partition
     
    class  Power
     
    class  Primitive
     
    struct  PrintFormatter
     
    class  QRF
     
    class  QuantizedMatmul
     
    class  RandomBits
     
    class  Reduce
     
    struct  ReductionPlan
     
    class  Remainder
     
    class  Reshape
     
    class  Round
     
    class  Scan
     
    class  Scatter
     
    class  Select
     
    class  Sigmoid
     
    class  Sign
     
    class  Sin
     
    class  Sinh
     
    class  Slice
     
    class  SliceUpdate
     
    class  Softmax
     
    class  Sort
     
    class  Split
     
    class  Sqrt
     
    class  Square
     
    class  StopGradient
     
    struct  Stream
     
    struct  StreamContext
     
    class  Subtract
     
    class  SVD
     
    class  Tan
     
    class  Tanh
     
    class  Transpose
     
    struct  TypeToDtype
     
    class  UnaryPrimitive
     
    class  Uniform
     
    - - - - - - - - - - - - - - - - - - - - - - -

    -Typedefs

    using deleter_t = std::function<void(allocator::Buffer)>
     
    template<typename... T>
    using enable_for_arrays_t = typename std::enable_if_t<is_arrays_v<T...>>
     
    using GGUFMetaData
     
    using GGUFLoad
     
    using SafetensorsLoad
     
    using ValueAndGradFn
     
    using SimpleValueAndGradFn
     
    typedef struct _MLX_Float16 float16_t
     
    typedef struct _MLX_BFloat16 bfloat16_t
     
    using StreamOrDevice = std::variant<std::monostate, Stream, Device>
     
    - - - - - - - -

    -Enumerations

    enum class  CopyType { Scalar -, Vector -, General -, GeneralGeneral - }
     
    enum  ReductionOpType {
    -  ContiguousAllReduce -, ContiguousReduce -, ContiguousStridedReduce -, GeneralContiguousReduce -,
    -  GeneralStridedReduce -, GeneralReduce -
    - }
     
    enum class  CompileMode { disabled -, no_simplify -, no_fuse -, enabled - }
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    BNNSDataType to_bnns_dtype (Dtype mlx_dtype)
     
    void arange (const std::vector< array > &inputs, array &out, double start, double step)
     
    bool is_static_cast (const Primitive &p)
     
    std::string build_lib_name (const std::vector< array > &inputs, const std::vector< array > &outputs, const std::vector< array > &tape, const std::unordered_set< uintptr_t > &constant_ids)
     
    std::string get_type_string (Dtype d)
     
    template<typename T >
    void print_float_constant (std::ostream &os, const array &x)
     
    template<typename T >
    void print_int_constant (std::ostream &os, const array &x)
     
    template<typename T >
    void print_complex_constant (std::ostream &os, const array &x)
     
    void print_constant (std::ostream &os, const array &x)
     
    bool is_scalar (const array &x)
     
    bool compiled_check_contiguity (const std::vector< array > &inputs, const std::vector< int > &shape)
     
    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)
     
    void copy (const array &src, array &dst, CopyType ctype)
     
    void copy_inplace (const array &src, array &dst, CopyType ctype)
     
    template<typename stride_t >
    void copy_inplace (const array &src, array &dst, const std::vector< int > &data_shape, const std::vector< stride_t > &i_strides, const std::vector< stride_t > &o_strides, int64_t i_offset, int64_t o_offset, CopyType ctype)
     
    template<typename stride_t >
    stride_t elem_to_loc (int elem, const std::vector< int > &shape, const std::vector< stride_t > &strides)
     
    size_t elem_to_loc (int elem, const array &a)
     
    template<typename stride_t >
    std::tuple< std::vector< int >, std::vector< std::vector< stride_t > > > collapse_contiguous_dims (const std::vector< int > &shape, const std::vector< std::vector< stride_t > > strides)
     
    std::tuple< std::vector< int >, std::vector< std::vector< size_t > > > collapse_contiguous_dims (const std::vector< array > &xs)
     
    template<typename... Arrays, typename = enable_for_arrays_t<Arrays...>>
    auto collapse_contiguous_dims (Arrays &&... xs)
     
    template<typename stride_t >
    auto check_contiguity (const std::vector< int > &shape, const std::vector< stride_t > &strides)
     
    template<typename stride_t >
    void copy_gpu_inplace (const array &in, array &out, const std::vector< int > &data_shape, const std::vector< stride_t > &i_strides, const std::vector< stride_t > &o_strides, int64_t i_offset, int64_t o_offset, CopyType ctype, const Stream &s)
     
    void copy_gpu (const array &src, array &out, CopyType ctype, const Stream &s)
     
    void copy_gpu (const array &src, array &out, CopyType ctype)
     
    void copy_gpu_inplace (const array &src, array &out, CopyType ctype, const Stream &s)
     
    void copy_gpu_inplace (const array &in, array &out, const std::vector< int64_t > &istride, int64_t ioffset, CopyType ctype, const Stream &s)
     
    void steel_matmul_conv_groups (const Stream &s, metal::Device &d, const array &a, const array &b, array &out, int M, int N, int K, int lda, int ldb, int ldd, bool transpose_a, bool transpose_b, int groups, std::vector< array > &copies)
     
    void steel_matmul (const Stream &s, metal::Device &d, const array &a, const array &b, array &out, int M, int N, int K, int batch_size_out, int lda, int ldb, bool transpose_a, bool transpose_b, std::vector< array > &copies, std::vector< int > batch_shape={}, std::vector< size_t > A_batch_stride={}, std::vector< size_t > B_batch_stride={})
     
    void all_reduce_dispatch (const array &in, array &out, const std::string &op_name, CommandEncoder &compute_encoder, metal::Device &d, const Stream &s)
     
    void row_reduce_general_dispatch (const array &in, array &out, const std::string &op_name, const ReductionPlan &plan, const std::vector< int > &axes, CommandEncoder &compute_encoder, metal::Device &d, const Stream &s)
     
    void strided_reduce_general_dispatch (const array &in, array &out, const std::string &op_name, const ReductionPlan &plan, const std::vector< int > &axes, CommandEncoder &compute_encoder, metal::Device &d, const Stream &s)
     
    void disable_compile ()
     Globally disable compilation.
     
    void enable_compile ()
     Globally enable compilation.
     
    void set_compile_mode (CompileMode mode)
     Set the compiler mode to the given value.
     
    const Devicedefault_device ()
     
    void set_default_device (const Device &d)
     
    bool operator== (const Device &lhs, const Device &rhs)
     
    bool operator!= (const Device &lhs, const Device &rhs)
     
    bool issubdtype (const Dtype &a, const Dtype &b)
     
    bool issubdtype (const Dtype::Category &a, const Dtype &b)
     
    bool issubdtype (const Dtype &a, const Dtype::Category &b)
     
    bool issubdtype (const Dtype::Category &a, const Dtype::Category &b)
     
    Dtype promote_types (const Dtype &t1, const Dtype &t2)
     
    uint8_t size_of (const Dtype &t)
     
    Dtype::Kind kindof (const Dtype &t)
     
    std::string dtype_to_array_protocol (const Dtype &t)
     
    Dtype dtype_from_array_protocol (std::string_view t)
     
    void print_graph (std::ostream &os, const std::vector< array > &outputs)
     
    template<typename... Arrays, typename = enable_for_arrays_t<Arrays...>>
    void print_graph (std::ostream &os, Arrays &&... outputs)
     
    void export_to_dot (std::ostream &os, const std::vector< array > &outputs)
     
    template<typename... Arrays, typename = enable_for_arrays_t<Arrays...>>
    void export_to_dot (std::ostream &os, Arrays &&... outputs)
     
    void save (std::shared_ptr< io::Writer > out_stream, array a)
     Save array to out stream in .npy format.
     
    void save (std::string file, array a)
     Save array to file in .npy format.
     
    array load (std::shared_ptr< io::Reader > in_stream, StreamOrDevice s={})
     Load array from reader in .npy format.
     
    array load (std::string file, StreamOrDevice s={})
     Load array from file in .npy format.
     
    SafetensorsLoad load_safetensors (std::shared_ptr< io::Reader > in_stream, StreamOrDevice s={})
     Load array map from .safetensors file format.
     
    SafetensorsLoad load_safetensors (const std::string &file, StreamOrDevice s={})
     
    void save_safetensors (std::shared_ptr< io::Writer > in_stream, std::unordered_map< std::string, array >, std::unordered_map< std::string, std::string > metadata={})
     
    void save_safetensors (std::string file, std::unordered_map< std::string, array >, std::unordered_map< std::string, std::string > metadata={})
     
    GGUFLoad load_gguf (const std::string &file, StreamOrDevice s={})
     Load array map and metadata from .gguf file format.
     
    void save_gguf (std::string file, std::unordered_map< std::string, array > array_map, std::unordered_map< std::string, GGUFMetaData > meta_data={})
     
    std::vector< int > get_shape (const gguf_tensor &tensor)
     
    void gguf_load_quantized (std::unordered_map< std::string, array > &a, const gguf_tensor &tensor)
     
    array arange (double start, double stop, double step, Dtype dtype, StreamOrDevice s={})
     A 1D array of numbers starting at start (optional), stopping at stop, stepping by step (optional).
     
    array arange (double start, double stop, double step, StreamOrDevice s={})
     
    array arange (double start, double stop, Dtype dtype, StreamOrDevice s={})
     
    array arange (double start, double stop, StreamOrDevice s={})
     
    array arange (double stop, Dtype dtype, StreamOrDevice s={})
     
    array arange (double stop, StreamOrDevice s={})
     
    array arange (int start, int stop, int step, StreamOrDevice s={})
     
    array arange (int start, int stop, StreamOrDevice s={})
     
    array arange (int stop, StreamOrDevice s={})
     
    array linspace (double start, double stop, int num=50, Dtype dtype=float32, StreamOrDevice s={})
     A 1D array of num evenly spaced numbers in the range [start, stop]
     
    array astype (array a, Dtype dtype, StreamOrDevice s={})
     Convert an array to the given data type.
     
    array as_strided (array a, std::vector< int > shape, std::vector< size_t > strides, size_t offset, StreamOrDevice s={})
     Create a view of an array with the given shape and strides.
     
    array copy (array a, StreamOrDevice s={})
     Copy another array.
     
    array full (std::vector< int > shape, array vals, Dtype dtype, StreamOrDevice s={})
     Fill an array of the given shape with the given value(s).
     
    array full (std::vector< int > shape, array vals, StreamOrDevice s={})
     
    template<typename T >
    array full (std::vector< int > shape, T val, Dtype dtype, StreamOrDevice s={})
     
    template<typename T >
    array full (std::vector< int > shape, T val, StreamOrDevice s={})
     
    array zeros (const std::vector< int > &shape, Dtype dtype, StreamOrDevice s={})
     Fill an array of the given shape with zeros.
     
    array zeros (const std::vector< int > &shape, StreamOrDevice s={})
     
    array zeros_like (const array &a, StreamOrDevice s={})
     
    array ones (const std::vector< int > &shape, Dtype dtype, StreamOrDevice s={})
     Fill an array of the given shape with ones.
     
    array ones (const std::vector< int > &shape, StreamOrDevice s={})
     
    array ones_like (const array &a, StreamOrDevice s={})
     
    array eye (int n, int m, int k, Dtype dtype, StreamOrDevice s={})
     Fill an array of the given shape (n,m) with ones in the specified diagonal k, and zeros everywhere else.
     
    array eye (int n, Dtype dtype, StreamOrDevice s={})
     
    array eye (int n, int m, StreamOrDevice s={})
     
    array eye (int n, int m, int k, StreamOrDevice s={})
     
    array eye (int n, StreamOrDevice s={})
     
    array identity (int n, Dtype dtype, StreamOrDevice s={})
     Create a square matrix of shape (n,n) of zeros, and ones in the major diagonal.
     
    array identity (int n, StreamOrDevice s={})
     
    array tri (int n, int m, int k, Dtype type, StreamOrDevice s={})
     
    array tri (int n, Dtype type, StreamOrDevice s={})
     
    array tril (array x, int k=0, StreamOrDevice s={})
     
    array triu (array x, int k=0, StreamOrDevice s={})
     
    array reshape (const array &a, std::vector< int > shape, StreamOrDevice s={})
     Reshape an array to the given shape.
     
    array flatten (const array &a, int start_axis, int end_axis=-1, StreamOrDevice s={})
     Flatten the dimensions in the range [start_axis, end_axis] .
     
    array flatten (const array &a, StreamOrDevice s={})
     Flatten the array to 1D.
     
    array squeeze (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     Remove singleton dimensions at the given axes.
     
    array squeeze (const array &a, int axis, StreamOrDevice s={})
     Remove singleton dimensions at the given axis.
     
    array squeeze (const array &a, StreamOrDevice s={})
     Remove all singleton dimensions.
     
    array expand_dims (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     Add a singleton dimension at the given axes.
     
    array expand_dims (const array &a, int axis, StreamOrDevice s={})
     Add a singleton dimension at the given axis.
     
    array slice (const array &a, std::vector< int > start, std::vector< int > stop, std::vector< int > strides, StreamOrDevice s={})
     Slice an array.
     
    array slice (const array &a, const std::vector< int > &start, const std::vector< int > &stop, StreamOrDevice s={})
     Slice an array with a stride of 1 in each dimension.
     
    array slice_update (const array &src, const array &update, std::vector< int > start, std::vector< int > stop, std::vector< int > strides, StreamOrDevice s={})
     Update a slice from the source array.
     
    array slice_update (const array &src, const array &update, std::vector< int > start, std::vector< int > stop, StreamOrDevice s={})
     Update a slice from the source array with stride 1 in each dimension.
     
    std::vector< arraysplit (const array &a, int num_splits, int axis, StreamOrDevice s={})
     Split an array into sub-arrays along a given axis.
     
    std::vector< arraysplit (const array &a, int num_splits, StreamOrDevice s={})
     
    std::vector< arraysplit (const array &a, const std::vector< int > &indices, int axis, StreamOrDevice s={})
     
    std::vector< arraysplit (const array &a, const std::vector< int > &indices, StreamOrDevice s={})
     
    std::vector< arraymeshgrid (const std::vector< array > &arrays, bool sparse=false, std::string indexing="xy", StreamOrDevice s={})
     A vector of coordinate arrays from coordinate vectors.
     
    array clip (const array &a, const std::optional< array > &a_min=std::nullopt, const std::optional< array > &a_max=std::nullopt, StreamOrDevice s={})
     Clip (limit) the values in an array.
     
    array concatenate (const std::vector< array > &arrays, int axis, StreamOrDevice s={})
     Concatenate arrays along a given axis.
     
    array concatenate (const std::vector< array > &arrays, StreamOrDevice s={})
     
    array stack (const std::vector< array > &arrays, int axis, StreamOrDevice s={})
     Stack arrays along a new axis.
     
    array stack (const std::vector< array > &arrays, StreamOrDevice s={})
     
    array repeat (const array &arr, int repeats, int axis, StreamOrDevice s={})
     Repeat an array along an axis.
     
    array repeat (const array &arr, int repeats, StreamOrDevice s={})
     
    array tile (const array &arr, std::vector< int > reps, StreamOrDevice s={})
     
    array transpose (const array &a, std::vector< int > axes, StreamOrDevice s={})
     Permutes the dimensions according to the given axes.
     
    array transpose (const array &a, std::initializer_list< int > axes, StreamOrDevice s={})
     
    array swapaxes (const array &a, int axis1, int axis2, StreamOrDevice s={})
     Swap two axes of an array.
     
    array moveaxis (const array &a, int source, int destination, StreamOrDevice s={})
     Move an axis of an array.
     
    array pad (const array &a, const std::vector< int > &axes, const std::vector< int > &low_pad_size, const std::vector< int > &high_pad_size, const array &pad_value=array(0), StreamOrDevice s={})
     Pad an array with a constant value.
     
    array pad (const array &a, const std::vector< std::pair< int, int > > &pad_width, const array &pad_value=array(0), StreamOrDevice s={})
     Pad an array with a constant value along all axes.
     
    array pad (const array &a, const std::pair< int, int > &pad_width, const array &pad_value=array(0), StreamOrDevice s={})
     
    array pad (const array &a, int pad_width, const array &pad_value=array(0), StreamOrDevice s={})
     
    array transpose (const array &a, StreamOrDevice s={})
     Permutes the dimensions in reverse order.
     
    array broadcast_to (const array &a, const std::vector< int > &shape, StreamOrDevice s={})
     Broadcast an array to a given shape.
     
    std::vector< arraybroadcast_arrays (const std::vector< array > &inputs, StreamOrDevice s={})
     Broadcast a vector of arrays against one another.
     
    array equal (const array &a, const array &b, StreamOrDevice s={})
     Returns the bool array with (a == b) element-wise.
     
    array operator== (const array &a, const array &b)
     
    template<typename T >
    array operator== (T a, const array &b)
     
    template<typename T >
    array operator== (const array &a, T b)
     
    array not_equal (const array &a, const array &b, StreamOrDevice s={})
     Returns the bool array with (a != b) element-wise.
     
    array operator!= (const array &a, const array &b)
     
    template<typename T >
    array operator!= (T a, const array &b)
     
    template<typename T >
    array operator!= (const array &a, T b)
     
    array greater (const array &a, const array &b, StreamOrDevice s={})
     Returns bool array with (a > b) element-wise.
     
    array operator> (const array &a, const array &b)
     
    template<typename T >
    array operator> (T a, const array &b)
     
    template<typename T >
    array operator> (const array &a, T b)
     
    array greater_equal (const array &a, const array &b, StreamOrDevice s={})
     Returns bool array with (a >= b) element-wise.
     
    array operator>= (const array &a, const array &b)
     
    template<typename T >
    array operator>= (T a, const array &b)
     
    template<typename T >
    array operator>= (const array &a, T b)
     
    array less (const array &a, const array &b, StreamOrDevice s={})
     Returns bool array with (a < b) element-wise.
     
    array operator< (const array &a, const array &b)
     
    template<typename T >
    array operator< (T a, const array &b)
     
    template<typename T >
    array operator< (const array &a, T b)
     
    array less_equal (const array &a, const array &b, StreamOrDevice s={})
     Returns bool array with (a <= b) element-wise.
     
    array operator<= (const array &a, const array &b)
     
    template<typename T >
    array operator<= (T a, const array &b)
     
    template<typename T >
    array operator<= (const array &a, T b)
     
    array array_equal (const array &a, const array &b, bool equal_nan, StreamOrDevice s={})
     True if two arrays have the same shape and elements.
     
    array array_equal (const array &a, const array &b, StreamOrDevice s={})
     
    array isnan (const array &a, StreamOrDevice s={})
     
    array isinf (const array &a, StreamOrDevice s={})
     
    array isposinf (const array &a, StreamOrDevice s={})
     
    array isneginf (const array &a, StreamOrDevice s={})
     
    array where (const array &condition, const array &x, const array &y, StreamOrDevice s={})
     Select from x or y depending on condition.
     
    array all (const array &a, bool keepdims, StreamOrDevice s={})
     True if all elements in the array are true (or non-zero).
     
    array all (const array &a, StreamOrDevice s={})
     
    array allclose (const array &a, const array &b, double rtol=1e-5, double atol=1e-8, bool equal_nan=false, StreamOrDevice s={})
     True if the two arrays are equal within the specified tolerance.
     
    array isclose (const array &a, const array &b, double rtol=1e-5, double atol=1e-8, bool equal_nan=false, StreamOrDevice s={})
     Returns a boolean array where two arrays are element-wise equal within the specified tolerance.
     
    array all (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     Reduces the input along the given axes.
     
    array all (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Reduces the input along the given axis.
     
    array any (const array &a, bool keepdims, StreamOrDevice s={})
     True if any elements in the array are true (or non-zero).
     
    array any (const array &a, StreamOrDevice s={})
     
    array any (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     Reduces the input along the given axes.
     
    array any (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Reduces the input along the given axis.
     
    array sum (const array &a, bool keepdims, StreamOrDevice s={})
     Sums the elements of an array.
     
    array sum (const array &a, StreamOrDevice s={})
     
    array sum (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     Sums the elements of an array along the given axes.
     
    array sum (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Sums the elements of an array along the given axis.
     
    array mean (const array &a, bool keepdims, StreamOrDevice s={})
     Computes the mean of the elements of an array.
     
    array mean (const array &a, StreamOrDevice s={})
     
    array mean (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     Computes the mean of the elements of an array along the given axes.
     
    array mean (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Computes the mean of the elements of an array along the given axis.
     
    array var (const array &a, bool keepdims, int ddof=0, StreamOrDevice s={})
     Computes the variance of the elements of an array.
     
    array var (const array &a, StreamOrDevice s={})
     
    array var (const array &a, const std::vector< int > &axes, bool keepdims=false, int ddof=0, StreamOrDevice s={})
     Computes the variance of the elements of an array along the given axes.
     
    array var (const array &a, int axis, bool keepdims=false, int ddof=0, StreamOrDevice s={})
     Computes the variance of the elements of an array along the given axis.
     
    array std (const array &a, bool keepdims, int ddof=0, StreamOrDevice s={})
     Computes the standard deviation of the elements of an array.
     
    array std (const array &a, StreamOrDevice s={})
     
    array std (const array &a, const std::vector< int > &axes, bool keepdims=false, int ddof=0, StreamOrDevice s={})
     Computes the standard deviatoin of the elements of an array along the given axes.
     
    array std (const array &a, int axis, bool keepdims=false, int ddof=0, StreamOrDevice s={})
     Computes the standard deviation of the elements of an array along the given axis.
     
    array prod (const array &a, bool keepdims, StreamOrDevice s={})
     The product of all elements of the array.
     
    array prod (const array &a, StreamOrDevice s={})
     
    array prod (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     The product of the elements of an array along the given axes.
     
    array prod (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     The product of the elements of an array along the given axis.
     
    array max (const array &a, bool keepdims, StreamOrDevice s={})
     The maximum of all elements of the array.
     
    array max (const array &a, StreamOrDevice s={})
     
    array max (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     The maximum of the elements of an array along the given axes.
     
    array max (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     The maximum of the elements of an array along the given axis.
     
    array min (const array &a, bool keepdims, StreamOrDevice s={})
     The minimum of all elements of the array.
     
    array min (const array &a, StreamOrDevice s={})
     
    array min (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     The minimum of the elements of an array along the given axes.
     
    array min (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     The minimum of the elements of an array along the given axis.
     
    array argmin (const array &a, bool keepdims, StreamOrDevice s={})
     Returns the index of the minimum value in the array.
     
    array argmin (const array &a, StreamOrDevice s={})
     
    array argmin (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Returns the indices of the minimum values along a given axis.
     
    array argmax (const array &a, bool keepdims, StreamOrDevice s={})
     Returns the index of the maximum value in the array.
     
    array argmax (const array &a, StreamOrDevice s={})
     
    array argmax (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Returns the indices of the maximum values along a given axis.
     
    array sort (const array &a, StreamOrDevice s={})
     Returns a sorted copy of the flattened array.
     
    array sort (const array &a, int axis, StreamOrDevice s={})
     Returns a sorted copy of the array along a given axis.
     
    array argsort (const array &a, StreamOrDevice s={})
     Returns indices that sort the flattened array.
     
    array argsort (const array &a, int axis, StreamOrDevice s={})
     Returns indices that sort the array along a given axis.
     
    array partition (const array &a, int kth, StreamOrDevice s={})
     Returns a partitioned copy of the flattened array such that the smaller kth elements are first.
     
    array partition (const array &a, int kth, int axis, StreamOrDevice s={})
     Returns a partitioned copy of the array along a given axis such that the smaller kth elements are first.
     
    array argpartition (const array &a, int kth, StreamOrDevice s={})
     Returns indices that partition the flattened array such that the smaller kth elements are first.
     
    array argpartition (const array &a, int kth, int axis, StreamOrDevice s={})
     Returns indices that partition the array along a given axis such that the smaller kth elements are first.
     
    array topk (const array &a, int k, StreamOrDevice s={})
     Returns topk elements of the flattened array.
     
    array topk (const array &a, int k, int axis, StreamOrDevice s={})
     Returns topk elements of the array along a given axis.
     
    array logsumexp (const array &a, bool keepdims, StreamOrDevice s={})
     The logsumexp of all elements of the array.
     
    array logsumexp (const array &a, StreamOrDevice s={})
     
    array logsumexp (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     The logsumexp of the elements of an array along the given axes.
     
    array logsumexp (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     The logsumexp of the elements of an array along the given axis.
     
    array abs (const array &a, StreamOrDevice s={})
     Absolute value of elements in an array.
     
    array negative (const array &a, StreamOrDevice s={})
     Negate an array.
     
    array operator- (const array &a)
     
    array sign (const array &a, StreamOrDevice s={})
     The sign of the elements in an array.
     
    array logical_not (const array &a, StreamOrDevice s={})
     Logical not of an array.
     
    array logical_and (const array &a, const array &b, StreamOrDevice s={})
     Logical and of two arrays.
     
    array operator&& (const array &a, const array &b)
     
    array logical_or (const array &a, const array &b, StreamOrDevice s={})
     Logical or of two arrays.
     
    array operator|| (const array &a, const array &b)
     
    array reciprocal (const array &a, StreamOrDevice s={})
     The reciprocal (1/x) of the elements in an array.
     
    array add (const array &a, const array &b, StreamOrDevice s={})
     Add two arrays.
     
    array operator+ (const array &a, const array &b)
     
    template<typename T >
    array operator+ (T a, const array &b)
     
    template<typename T >
    array operator+ (const array &a, T b)
     
    array subtract (const array &a, const array &b, StreamOrDevice s={})
     Subtract two arrays.
     
    array operator- (const array &a, const array &b)
     
    template<typename T >
    array operator- (T a, const array &b)
     
    template<typename T >
    array operator- (const array &a, T b)
     
    array multiply (const array &a, const array &b, StreamOrDevice s={})
     Multiply two arrays.
     
    array operator* (const array &a, const array &b)
     
    template<typename T >
    array operator* (T a, const array &b)
     
    template<typename T >
    array operator* (const array &a, T b)
     
    array divide (const array &a, const array &b, StreamOrDevice s={})
     Divide two arrays.
     
    array operator/ (const array &a, const array &b)
     
    array operator/ (double a, const array &b)
     
    array operator/ (const array &a, double b)
     
    std::vector< arraydivmod (const array &a, const array &b, StreamOrDevice s={})
     Compute the element-wise quotient and remainder.
     
    array floor_divide (const array &a, const array &b, StreamOrDevice s={})
     Compute integer division.
     
    array remainder (const array &a, const array &b, StreamOrDevice s={})
     Compute the element-wise remainder of division.
     
    array operator% (const array &a, const array &b)
     
    template<typename T >
    array operator% (T a, const array &b)
     
    template<typename T >
    array operator% (const array &a, T b)
     
    array maximum (const array &a, const array &b, StreamOrDevice s={})
     Element-wise maximum between two arrays.
     
    array minimum (const array &a, const array &b, StreamOrDevice s={})
     Element-wise minimum between two arrays.
     
    array floor (const array &a, StreamOrDevice s={})
     Floor the element of an array.
     
    array ceil (const array &a, StreamOrDevice s={})
     Ceil the element of an array.
     
    array square (const array &a, StreamOrDevice s={})
     Square the elements of an array.
     
    array exp (const array &a, StreamOrDevice s={})
     Exponential of the elements of an array.
     
    array sin (const array &a, StreamOrDevice s={})
     Sine of the elements of an array.
     
    array cos (const array &a, StreamOrDevice s={})
     Cosine of the elements of an array.
     
    array tan (const array &a, StreamOrDevice s={})
     Tangent of the elements of an array.
     
    array arcsin (const array &a, StreamOrDevice s={})
     Arc Sine of the elements of an array.
     
    array arccos (const array &a, StreamOrDevice s={})
     Arc Cosine of the elements of an array.
     
    array arctan (const array &a, StreamOrDevice s={})
     Arc Tangent of the elements of an array.
     
    array arctan2 (const array &a, const array &b, StreamOrDevice s={})
     Inverse tangent of the ratio of two arrays.
     
    array sinh (const array &a, StreamOrDevice s={})
     Hyperbolic Sine of the elements of an array.
     
    array cosh (const array &a, StreamOrDevice s={})
     Hyperbolic Cosine of the elements of an array.
     
    array tanh (const array &a, StreamOrDevice s={})
     Hyperbolic Tangent of the elements of an array.
     
    array arcsinh (const array &a, StreamOrDevice s={})
     Inverse Hyperbolic Sine of the elements of an array.
     
    array arccosh (const array &a, StreamOrDevice s={})
     Inverse Hyperbolic Cosine of the elements of an array.
     
    array arctanh (const array &a, StreamOrDevice s={})
     Inverse Hyperbolic Tangent of the elements of an array.
     
    array degrees (const array &a, StreamOrDevice s={})
     Convert the elements of an array from Radians to Degrees.
     
    array radians (const array &a, StreamOrDevice s={})
     Convert the elements of an array from Degrees to Radians.
     
    array log (const array &a, StreamOrDevice s={})
     Natural logarithm of the elements of an array.
     
    array log2 (const array &a, StreamOrDevice s={})
     Log base 2 of the elements of an array.
     
    array log10 (const array &a, StreamOrDevice s={})
     Log base 10 of the elements of an array.
     
    array log1p (const array &a, StreamOrDevice s={})
     Natural logarithm of one plus elements in the array: log(1 + a).
     
    array logaddexp (const array &a, const array &b, StreamOrDevice s={})
     Log-add-exp of one elements in the array: log(exp(a) + exp(b)).
     
    array sigmoid (const array &a, StreamOrDevice s={})
     Element-wise logistic sigmoid of the array: 1 / (1 + exp(-x).
     
    array erf (const array &a, StreamOrDevice s={})
     Computes the error function of the elements of an array.
     
    array erfinv (const array &a, StreamOrDevice s={})
     Computes the inverse error function of the elements of an array.
     
    array expm1 (const array &a, StreamOrDevice s={})
     Computes the expm1 function of the elements of an array.
     
    array stop_gradient (const array &a, StreamOrDevice s={})
     Stop the flow of gradients.
     
    array round (const array &a, int decimals, StreamOrDevice s={})
     Round a floating point number.
     
    array round (const array &a, StreamOrDevice s={})
     
    array matmul (const array &a, const array &b, StreamOrDevice s={})
     Matrix-matrix multiplication.
     
    array gather (const array &a, const std::vector< array > &indices, const std::vector< int > &axes, const std::vector< int > &slice_sizes, StreamOrDevice s={})
     Gather array entries given indices and slices.
     
    array gather (const array &a, const array &indices, int axis, const std::vector< int > &slice_sizes, StreamOrDevice s={})
     
    array take (const array &a, const array &indices, int axis, StreamOrDevice s={})
     Take array slices at the given indices of the specified axis.
     
    array take (const array &a, const array &indices, StreamOrDevice s={})
     Take array entries at the given indices treating the array as flattened.
     
    array take_along_axis (const array &a, const array &indices, int axis, StreamOrDevice s={})
     Take array entries given indices along the axis.
     
    array scatter (const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
     Scatter updates to given linear indices.
     
    array scatter (const array &a, const array &indices, const array &updates, int axis, StreamOrDevice s={})
     
    array scatter_add (const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
     Scatter and add updates to given indices.
     
    array scatter_add (const array &a, const array &indices, const array &updates, int axis, StreamOrDevice s={})
     
    array scatter_prod (const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
     Scatter and prod updates to given indices.
     
    array scatter_prod (const array &a, const array &indices, const array &updates, int axis, StreamOrDevice s={})
     
    array scatter_max (const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
     Scatter and max updates to given linear indices.
     
    array scatter_max (const array &a, const array &indices, const array &updates, int axis, StreamOrDevice s={})
     
    array scatter_min (const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
     Scatter and min updates to given linear indices.
     
    array scatter_min (const array &a, const array &indices, const array &updates, int axis, StreamOrDevice s={})
     
    array sqrt (const array &a, StreamOrDevice s={})
     Square root the elements of an array.
     
    array rsqrt (const array &a, StreamOrDevice s={})
     Square root and reciprocal the elements of an array.
     
    array softmax (const array &a, const std::vector< int > &axes, bool precise=false, StreamOrDevice s={})
     Softmax of an array.
     
    array softmax (const array &a, bool precise=false, StreamOrDevice s={})
     Softmax of an array.
     
    array softmax (const array &a, int axis, bool precise=false, StreamOrDevice s={})
     Softmax of an array.
     
    array power (const array &a, const array &b, StreamOrDevice s={})
     Raise elements of a to the power of b element-wise.
     
    array cumsum (const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
     Cumulative sum of an array.
     
    array cumprod (const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
     Cumulative product of an array.
     
    array cummax (const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
     Cumulative max of an array.
     
    array cummin (const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
     Cumulative min of an array.
     
    array conv_general (array input, array weight, std::vector< int > stride={}, std::vector< int > padding_lo={}, std::vector< int > padding_hi={}, std::vector< int > kernel_dilation={}, std::vector< int > input_dilation={}, int groups=1, bool flip=false, StreamOrDevice s={})
     General convolution with a filter.
     
    array conv_general (const array &input, const array &weight, std::vector< int > stride={}, std::vector< int > padding={}, std::vector< int > kernel_dilation={}, std::vector< int > input_dilation={}, int groups=1, bool flip=false, StreamOrDevice s={})
     General convolution with a filter.
     
    array conv1d (const array &input, const array &weight, int stride=1, int padding=0, int dilation=1, int groups=1, StreamOrDevice s={})
     1D convolution with a filter
     
    array conv2d (const array &input, const array &weight, const std::pair< int, int > &stride={1, 1}, const std::pair< int, int > &padding={0, 0}, const std::pair< int, int > &dilation={1, 1}, int groups=1, StreamOrDevice s={})
     2D convolution with a filter
     
    array conv3d (const array &input, const array &weight, const std::tuple< int, int, int > &stride={1, 1, 1}, const std::tuple< int, int, int > &padding={0, 0, 0}, const std::tuple< int, int, int > &dilation={1, 1, 1}, int groups=1, StreamOrDevice s={})
     3D convolution with a filter
     
    array quantized_matmul (const array &x, const array &w, const array &scales, const array &biases, bool transpose=true, int group_size=64, int bits=4, StreamOrDevice s={})
     Quantized matmul multiplies x with a quantized matrix w.
     
    std::tuple< array, array, arrayquantize (const array &w, int group_size=64, int bits=4, StreamOrDevice s={})
     Quantize a matrix along its last axis.
     
    array dequantize (const array &w, const array &scales, const array &biases, int group_size=64, int bits=4, StreamOrDevice s={})
     Dequantize a matrix produced by quantize()
     
    array block_sparse_qmm (const array &x, const array &w, const array &scales, const array &biases, std::optional< array > lhs_indices=std::nullopt, std::optional< array > rhs_indices=std::nullopt, bool transpose=true, int group_size=64, int bits=4, StreamOrDevice s={})
     Compute matrix products with matrix-level gather.
     
    array tensordot (const array &a, const array &b, const int axis=2, StreamOrDevice s={})
     Returns a contraction of a and b over multiple dimensions.
     
    array tensordot (const array &a, const array &b, const std::vector< int > &axes_a, const std::vector< int > &axes_b, StreamOrDevice s={})
     
    array outer (const array &a, const array &b, StreamOrDevice s={})
     Compute the outer product of two vectors.
     
    array inner (const array &a, const array &b, StreamOrDevice s={})
     Compute the inner product of two vectors.
     
    array addmm (array c, array a, array b, const float &alpha=1.f, const float &beta=1.f, StreamOrDevice s={})
     Compute D = beta * C + alpha * (A @ B)
     
    array block_masked_mm (array a, array b, int block_size, std::optional< array > mask_out=std::nullopt, std::optional< array > mask_lhs=std::nullopt, std::optional< array > mask_rhs=std::nullopt, StreamOrDevice s={})
     Compute matrix product with block masking.
     
    array block_sparse_mm (array a, array b, std::optional< array > lhs_indices=std::nullopt, std::optional< array > rhs_indices=std::nullopt, StreamOrDevice s={})
     Compute matrix product with matrix-level gather.
     
    array diagonal (const array &a, int offset=0, int axis1=0, int axis2=1, StreamOrDevice s={})
     Extract a diagonal or construct a diagonal array.
     
    array diag (const array &a, int k=0, StreamOrDevice s={})
     Extract diagonal from a 2d array or create a diagonal matrix.
     
    std::vector< arraydepends (const std::vector< array > &inputs, const std::vector< array > &dependencies)
     Implements the identity function but allows injecting dependencies to other arrays.
     
    array atleast_1d (const array &a, StreamOrDevice s={})
     convert an array to an atleast ndim array
     
    std::vector< arrayatleast_1d (const std::vector< array > &a, StreamOrDevice s={})
     
    array atleast_2d (const array &a, StreamOrDevice s={})
     
    std::vector< arrayatleast_2d (const std::vector< array > &a, StreamOrDevice s={})
     
    array atleast_3d (const array &a, StreamOrDevice s={})
     
    std::vector< arrayatleast_3d (const std::vector< array > &a, StreamOrDevice s={})
     
    array number_of_elements (const array &a, std::vector< int > axes, bool inverted, Dtype dtype=int32, StreamOrDevice s={})
     Extract the number of elements along some axes as a scalar array.
     
    array conjugate (const array &a, StreamOrDevice s={})
     
    array bitwise_and (const array &a, const array &b, StreamOrDevice s={})
     Bitwise and.
     
    array operator& (const array &a, const array &b)
     
    array bitwise_or (const array &a, const array &b, StreamOrDevice s={})
     Bitwise inclusive or.
     
    array operator| (const array &a, const array &b)
     
    array bitwise_xor (const array &a, const array &b, StreamOrDevice s={})
     Bitwise exclusive or.
     
    array operator^ (const array &a, const array &b)
     
    array left_shift (const array &a, const array &b, StreamOrDevice s={})
     Shift bits to the left.
     
    array operator<< (const array &a, const array &b)
     
    array right_shift (const array &a, const array &b, StreamOrDevice s={})
     Shift bits to the right.
     
    array operator>> (const array &a, const array &b)
     
    Stream default_stream (Device d)
     Get the default stream for the given device.
     
    void set_default_stream (Stream s)
     Make the stream the default for its device.
     
    Stream new_stream (Device d)
     Make a new stream on the given device.
     
    bool operator== (const Stream &lhs, const Stream &rhs)
     
    bool operator!= (const Stream &lhs, const Stream &rhs)
     
    void synchronize ()
     
    void synchronize (Stream)
     
    void async_eval (std::vector< array > outputs)
     
    void eval (std::vector< array > outputs)
     
    template<typename... Arrays, typename = enable_for_arrays_t<Arrays...>>
    void eval (Arrays &&... outputs)
     
    std::pair< std::vector< array >, std::vector< array > > vjp (const std::function< std::vector< array >(const std::vector< array > &)> &fun, const std::vector< array > &primals, const std::vector< array > &cotangents)
     Computes the output and vector-Jacobian product (VJP) of a function.
     
    std::pair< array, arrayvjp (const std::function< array(const array &)> &fun, const array &primal, const array &cotangent)
     Computes the output and vector-Jacobian product (VJP) of a unary function.
     
    std::pair< std::vector< array >, std::vector< array > > jvp (const std::function< std::vector< array >(const std::vector< array > &)> &fun, const std::vector< array > &primals, const std::vector< array > &tangents)
     Computes the output and Jacobian-vector product (JVP) of a function.
     
    std::pair< array, arrayjvp (const std::function< array(const array &)> &fun, const array &primal, const array &tangent)
     Computes the output and Jacobian-vector product (JVP) of a unary function.
     
    ValueAndGradFn value_and_grad (const std::function< std::vector< array >(const std::vector< array > &)> &fun, const std::vector< int > &argnums)
     Returns a function which computes the value and gradient of the input function with respect to a vector of input arrays.
     
    ValueAndGradFn value_and_grad (const std::function< std::vector< array >(const std::vector< array > &)> &fun, int argnum=0)
     Returns a function which computes the value and gradient of the input function with respect to a single input array.
     
    SimpleValueAndGradFn value_and_grad (const std::function< array(const std::vector< array > &)> &fun, const std::vector< int > &argnums)
     
    SimpleValueAndGradFn value_and_grad (const std::function< array(const std::vector< array > &)> &fun, int argnum=0)
     
    std::function< std::vector< array >(const std::vector< array > &)> grad (const std::function< array(const std::vector< array > &)> &fun, int argnum=0)
     Returns a function which computes the gradient of the input function with respect to a single input array.
     
    std::function< array(const array &)> grad (const std::function< array(const array &)> &fun)
     Returns a function which computes the gradient of the unary input function.
     
    std::function< array(const array &, const array &)> vmap (const std::function< array(const array &, const array &)> &fun, int in_axis_a=0, int in_axis_b=0, int out_axis=0)
     Automatically vectorize a binary function over the requested axes.
     
    std::function< std::vector< array >(const std::vector< array > &)> vmap (const std::function< std::vector< array >(const std::vector< array > &)> &fun, const std::vector< int > &in_axes={}, const std::vector< int > &out_axes={})
     Automatically vectorize a function over the requested axes.
     
    _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    float operator+ (_MLX_BFloat16 lhs, float rhs)
     
    float operator+ (float lhs, _MLX_BFloat16 rhs)
     
    double operator+ (_MLX_BFloat16 lhs, double rhs)
     
    double operator+ (double lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs, bool rhs)
     
    _MLX_BFloat16 operator+ (bool lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs, int32_t rhs)
     
    _MLX_BFloat16 operator+ (int32_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs, uint32_t rhs)
     
    _MLX_BFloat16 operator+ (uint32_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs, int64_t rhs)
     
    _MLX_BFloat16 operator+ (int64_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator+ (_MLX_BFloat16 lhs, uint64_t rhs)
     
    _MLX_BFloat16 operator+ (uint64_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator- (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    float operator- (_MLX_BFloat16 lhs, float rhs)
     
    float operator- (float lhs, _MLX_BFloat16 rhs)
     
    double operator- (_MLX_BFloat16 lhs, double rhs)
     
    double operator- (double lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator- (_MLX_BFloat16 lhs, bool rhs)
     
    _MLX_BFloat16 operator- (bool lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator- (_MLX_BFloat16 lhs, int32_t rhs)
     
    _MLX_BFloat16 operator- (int32_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator- (_MLX_BFloat16 lhs, uint32_t rhs)
     
    _MLX_BFloat16 operator- (uint32_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator- (_MLX_BFloat16 lhs, int64_t rhs)
     
    _MLX_BFloat16 operator- (int64_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator- (_MLX_BFloat16 lhs, uint64_t rhs)
     
    _MLX_BFloat16 operator- (uint64_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator* (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    float operator* (_MLX_BFloat16 lhs, float rhs)
     
    float operator* (float lhs, _MLX_BFloat16 rhs)
     
    double operator* (_MLX_BFloat16 lhs, double rhs)
     
    double operator* (double lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator* (_MLX_BFloat16 lhs, bool rhs)
     
    _MLX_BFloat16 operator* (bool lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator* (_MLX_BFloat16 lhs, int32_t rhs)
     
    _MLX_BFloat16 operator* (int32_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator* (_MLX_BFloat16 lhs, uint32_t rhs)
     
    _MLX_BFloat16 operator* (uint32_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator* (_MLX_BFloat16 lhs, int64_t rhs)
     
    _MLX_BFloat16 operator* (int64_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator* (_MLX_BFloat16 lhs, uint64_t rhs)
     
    _MLX_BFloat16 operator* (uint64_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    float operator/ (_MLX_BFloat16 lhs, float rhs)
     
    float operator/ (float lhs, _MLX_BFloat16 rhs)
     
    double operator/ (_MLX_BFloat16 lhs, double rhs)
     
    double operator/ (double lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs, bool rhs)
     
    _MLX_BFloat16 operator/ (bool lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs, int32_t rhs)
     
    _MLX_BFloat16 operator/ (int32_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs, uint32_t rhs)
     
    _MLX_BFloat16 operator/ (uint32_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs, int64_t rhs)
     
    _MLX_BFloat16 operator/ (int64_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator/ (_MLX_BFloat16 lhs, uint64_t rhs)
     
    _MLX_BFloat16 operator/ (uint64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator> (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    bool operator> (_MLX_BFloat16 lhs, float rhs)
     
    bool operator> (float lhs, _MLX_BFloat16 rhs)
     
    bool operator> (_MLX_BFloat16 lhs, double rhs)
     
    bool operator> (double lhs, _MLX_BFloat16 rhs)
     
    bool operator> (_MLX_BFloat16 lhs, int32_t rhs)
     
    bool operator> (int32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator> (_MLX_BFloat16 lhs, uint32_t rhs)
     
    bool operator> (uint32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator> (_MLX_BFloat16 lhs, int64_t rhs)
     
    bool operator> (int64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator> (_MLX_BFloat16 lhs, uint64_t rhs)
     
    bool operator> (uint64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator< (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    bool operator< (_MLX_BFloat16 lhs, float rhs)
     
    bool operator< (float lhs, _MLX_BFloat16 rhs)
     
    bool operator< (_MLX_BFloat16 lhs, double rhs)
     
    bool operator< (double lhs, _MLX_BFloat16 rhs)
     
    bool operator< (_MLX_BFloat16 lhs, int32_t rhs)
     
    bool operator< (int32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator< (_MLX_BFloat16 lhs, uint32_t rhs)
     
    bool operator< (uint32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator< (_MLX_BFloat16 lhs, int64_t rhs)
     
    bool operator< (int64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator< (_MLX_BFloat16 lhs, uint64_t rhs)
     
    bool operator< (uint64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator>= (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    bool operator>= (_MLX_BFloat16 lhs, float rhs)
     
    bool operator>= (float lhs, _MLX_BFloat16 rhs)
     
    bool operator>= (_MLX_BFloat16 lhs, double rhs)
     
    bool operator>= (double lhs, _MLX_BFloat16 rhs)
     
    bool operator>= (_MLX_BFloat16 lhs, int32_t rhs)
     
    bool operator>= (int32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator>= (_MLX_BFloat16 lhs, uint32_t rhs)
     
    bool operator>= (uint32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator>= (_MLX_BFloat16 lhs, int64_t rhs)
     
    bool operator>= (int64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator>= (_MLX_BFloat16 lhs, uint64_t rhs)
     
    bool operator>= (uint64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator<= (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    bool operator<= (_MLX_BFloat16 lhs, float rhs)
     
    bool operator<= (float lhs, _MLX_BFloat16 rhs)
     
    bool operator<= (_MLX_BFloat16 lhs, double rhs)
     
    bool operator<= (double lhs, _MLX_BFloat16 rhs)
     
    bool operator<= (_MLX_BFloat16 lhs, int32_t rhs)
     
    bool operator<= (int32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator<= (_MLX_BFloat16 lhs, uint32_t rhs)
     
    bool operator<= (uint32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator<= (_MLX_BFloat16 lhs, int64_t rhs)
     
    bool operator<= (int64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator<= (_MLX_BFloat16 lhs, uint64_t rhs)
     
    bool operator<= (uint64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator== (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    bool operator== (_MLX_BFloat16 lhs, float rhs)
     
    bool operator== (float lhs, _MLX_BFloat16 rhs)
     
    bool operator== (_MLX_BFloat16 lhs, double rhs)
     
    bool operator== (double lhs, _MLX_BFloat16 rhs)
     
    bool operator== (_MLX_BFloat16 lhs, int32_t rhs)
     
    bool operator== (int32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator== (_MLX_BFloat16 lhs, uint32_t rhs)
     
    bool operator== (uint32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator== (_MLX_BFloat16 lhs, int64_t rhs)
     
    bool operator== (int64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator== (_MLX_BFloat16 lhs, uint64_t rhs)
     
    bool operator== (uint64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator!= (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    bool operator!= (_MLX_BFloat16 lhs, float rhs)
     
    bool operator!= (float lhs, _MLX_BFloat16 rhs)
     
    bool operator!= (_MLX_BFloat16 lhs, double rhs)
     
    bool operator!= (double lhs, _MLX_BFloat16 rhs)
     
    bool operator!= (_MLX_BFloat16 lhs, int32_t rhs)
     
    bool operator!= (int32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator!= (_MLX_BFloat16 lhs, uint32_t rhs)
     
    bool operator!= (uint32_t lhs, _MLX_BFloat16 rhs)
     
    bool operator!= (_MLX_BFloat16 lhs, int64_t rhs)
     
    bool operator!= (int64_t lhs, _MLX_BFloat16 rhs)
     
    bool operator!= (_MLX_BFloat16 lhs, uint64_t rhs)
     
    bool operator!= (uint64_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator- (_MLX_BFloat16 lhs)
     
    _MLX_BFloat16operator+= (_MLX_BFloat16 &lhs, const float &rhs)
     
    float & operator+= (float &lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16operator-= (_MLX_BFloat16 &lhs, const float &rhs)
     
    float & operator-= (float &lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16operator*= (_MLX_BFloat16 &lhs, const float &rhs)
     
    float & operator*= (float &lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16operator/= (_MLX_BFloat16 &lhs, const float &rhs)
     
    float & operator/= (float &lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator| (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator| (_MLX_BFloat16 lhs, uint16_t rhs)
     
    _MLX_BFloat16 operator| (uint16_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator& (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator& (_MLX_BFloat16 lhs, uint16_t rhs)
     
    _MLX_BFloat16 operator& (uint16_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator^ (_MLX_BFloat16 lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16 operator^ (_MLX_BFloat16 lhs, uint16_t rhs)
     
    _MLX_BFloat16 operator^ (uint16_t lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16operator|= (_MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16operator|= (_MLX_BFloat16 &lhs, uint16_t rhs)
     
    _MLX_BFloat16operator&= (_MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16operator&= (_MLX_BFloat16 &lhs, uint16_t rhs)
     
    _MLX_BFloat16operator^= (_MLX_BFloat16 &lhs, _MLX_BFloat16 rhs)
     
    _MLX_BFloat16operator^= (_MLX_BFloat16 &lhs, uint16_t rhs)
     
    bool operator>= (const complex64_t &a, const complex64_t &b)
     
    bool operator> (const complex64_t &a, const complex64_t &b)
     
    complex64_t operator% (complex64_t a, complex64_t b)
     
    bool operator<= (const complex64_t &a, const complex64_t &b)
     
    bool operator< (const complex64_t &a, const complex64_t &b)
     
    complex64_t operator- (const complex64_t &v)
     
    complex64_t operator+ (const std::complex< float > &x, const complex64_t &y)
     
    complex64_t operator+ (const complex64_t &x, const std::complex< float > &y)
     
    complex64_t operator+ (const complex64_t &x, const complex64_t &y)
     
    complex64_t operator+ (bool x, const complex64_t &y)
     
    complex64_t operator+ (const complex64_t &x, bool y)
     
    complex64_t operator+ (uint32_t x, const complex64_t &y)
     
    complex64_t operator+ (const complex64_t &x, uint32_t y)
     
    complex64_t operator+ (uint64_t x, const complex64_t &y)
     
    complex64_t operator+ (const complex64_t &x, uint64_t y)
     
    complex64_t operator+ (int32_t x, const complex64_t &y)
     
    complex64_t operator+ (const complex64_t &x, int32_t y)
     
    complex64_t operator+ (int64_t x, const complex64_t &y)
     
    complex64_t operator+ (const complex64_t &x, int64_t y)
     
    complex64_t operator+ (float16_t x, const complex64_t &y)
     
    complex64_t operator+ (const complex64_t &x, float16_t y)
     
    complex64_t operator+ (bfloat16_t x, const complex64_t &y)
     
    complex64_t operator+ (const complex64_t &x, bfloat16_t y)
     
    complex64_t operator+ (float x, const complex64_t &y)
     
    complex64_t operator+ (const complex64_t &x, float y)
     
    _MLX_Float16 operator+ (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    float operator+ (_MLX_Float16 lhs, float rhs)
     
    float operator+ (float lhs, _MLX_Float16 rhs)
     
    double operator+ (_MLX_Float16 lhs, double rhs)
     
    double operator+ (double lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator+ (_MLX_Float16 lhs, bool rhs)
     
    _MLX_Float16 operator+ (bool lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator+ (_MLX_Float16 lhs, int32_t rhs)
     
    _MLX_Float16 operator+ (int32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator+ (_MLX_Float16 lhs, uint32_t rhs)
     
    _MLX_Float16 operator+ (uint32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator+ (_MLX_Float16 lhs, int64_t rhs)
     
    _MLX_Float16 operator+ (int64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator+ (_MLX_Float16 lhs, uint64_t rhs)
     
    _MLX_Float16 operator+ (uint64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator- (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    float operator- (_MLX_Float16 lhs, float rhs)
     
    float operator- (float lhs, _MLX_Float16 rhs)
     
    double operator- (_MLX_Float16 lhs, double rhs)
     
    double operator- (double lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator- (_MLX_Float16 lhs, bool rhs)
     
    _MLX_Float16 operator- (bool lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator- (_MLX_Float16 lhs, int32_t rhs)
     
    _MLX_Float16 operator- (int32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator- (_MLX_Float16 lhs, uint32_t rhs)
     
    _MLX_Float16 operator- (uint32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator- (_MLX_Float16 lhs, int64_t rhs)
     
    _MLX_Float16 operator- (int64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator- (_MLX_Float16 lhs, uint64_t rhs)
     
    _MLX_Float16 operator- (uint64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator* (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    float operator* (_MLX_Float16 lhs, float rhs)
     
    float operator* (float lhs, _MLX_Float16 rhs)
     
    double operator* (_MLX_Float16 lhs, double rhs)
     
    double operator* (double lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator* (_MLX_Float16 lhs, bool rhs)
     
    _MLX_Float16 operator* (bool lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator* (_MLX_Float16 lhs, int32_t rhs)
     
    _MLX_Float16 operator* (int32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator* (_MLX_Float16 lhs, uint32_t rhs)
     
    _MLX_Float16 operator* (uint32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator* (_MLX_Float16 lhs, int64_t rhs)
     
    _MLX_Float16 operator* (int64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator* (_MLX_Float16 lhs, uint64_t rhs)
     
    _MLX_Float16 operator* (uint64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator/ (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    float operator/ (_MLX_Float16 lhs, float rhs)
     
    float operator/ (float lhs, _MLX_Float16 rhs)
     
    double operator/ (_MLX_Float16 lhs, double rhs)
     
    double operator/ (double lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator/ (_MLX_Float16 lhs, bool rhs)
     
    _MLX_Float16 operator/ (bool lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator/ (_MLX_Float16 lhs, int32_t rhs)
     
    _MLX_Float16 operator/ (int32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator/ (_MLX_Float16 lhs, uint32_t rhs)
     
    _MLX_Float16 operator/ (uint32_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator/ (_MLX_Float16 lhs, int64_t rhs)
     
    _MLX_Float16 operator/ (int64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator/ (_MLX_Float16 lhs, uint64_t rhs)
     
    _MLX_Float16 operator/ (uint64_t lhs, _MLX_Float16 rhs)
     
    bool operator> (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool operator> (_MLX_Float16 lhs, float rhs)
     
    bool operator> (float lhs, _MLX_Float16 rhs)
     
    bool operator> (_MLX_Float16 lhs, double rhs)
     
    bool operator> (double lhs, _MLX_Float16 rhs)
     
    bool operator> (_MLX_Float16 lhs, int32_t rhs)
     
    bool operator> (int32_t lhs, _MLX_Float16 rhs)
     
    bool operator> (_MLX_Float16 lhs, uint32_t rhs)
     
    bool operator> (uint32_t lhs, _MLX_Float16 rhs)
     
    bool operator> (_MLX_Float16 lhs, int64_t rhs)
     
    bool operator> (int64_t lhs, _MLX_Float16 rhs)
     
    bool operator> (_MLX_Float16 lhs, uint64_t rhs)
     
    bool operator> (uint64_t lhs, _MLX_Float16 rhs)
     
    bool operator< (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool operator< (_MLX_Float16 lhs, float rhs)
     
    bool operator< (float lhs, _MLX_Float16 rhs)
     
    bool operator< (_MLX_Float16 lhs, double rhs)
     
    bool operator< (double lhs, _MLX_Float16 rhs)
     
    bool operator< (_MLX_Float16 lhs, int32_t rhs)
     
    bool operator< (int32_t lhs, _MLX_Float16 rhs)
     
    bool operator< (_MLX_Float16 lhs, uint32_t rhs)
     
    bool operator< (uint32_t lhs, _MLX_Float16 rhs)
     
    bool operator< (_MLX_Float16 lhs, int64_t rhs)
     
    bool operator< (int64_t lhs, _MLX_Float16 rhs)
     
    bool operator< (_MLX_Float16 lhs, uint64_t rhs)
     
    bool operator< (uint64_t lhs, _MLX_Float16 rhs)
     
    bool operator>= (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool operator>= (_MLX_Float16 lhs, float rhs)
     
    bool operator>= (float lhs, _MLX_Float16 rhs)
     
    bool operator>= (_MLX_Float16 lhs, double rhs)
     
    bool operator>= (double lhs, _MLX_Float16 rhs)
     
    bool operator>= (_MLX_Float16 lhs, int32_t rhs)
     
    bool operator>= (int32_t lhs, _MLX_Float16 rhs)
     
    bool operator>= (_MLX_Float16 lhs, uint32_t rhs)
     
    bool operator>= (uint32_t lhs, _MLX_Float16 rhs)
     
    bool operator>= (_MLX_Float16 lhs, int64_t rhs)
     
    bool operator>= (int64_t lhs, _MLX_Float16 rhs)
     
    bool operator>= (_MLX_Float16 lhs, uint64_t rhs)
     
    bool operator>= (uint64_t lhs, _MLX_Float16 rhs)
     
    bool operator<= (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool operator<= (_MLX_Float16 lhs, float rhs)
     
    bool operator<= (float lhs, _MLX_Float16 rhs)
     
    bool operator<= (_MLX_Float16 lhs, double rhs)
     
    bool operator<= (double lhs, _MLX_Float16 rhs)
     
    bool operator<= (_MLX_Float16 lhs, int32_t rhs)
     
    bool operator<= (int32_t lhs, _MLX_Float16 rhs)
     
    bool operator<= (_MLX_Float16 lhs, uint32_t rhs)
     
    bool operator<= (uint32_t lhs, _MLX_Float16 rhs)
     
    bool operator<= (_MLX_Float16 lhs, int64_t rhs)
     
    bool operator<= (int64_t lhs, _MLX_Float16 rhs)
     
    bool operator<= (_MLX_Float16 lhs, uint64_t rhs)
     
    bool operator<= (uint64_t lhs, _MLX_Float16 rhs)
     
    bool operator== (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool operator== (_MLX_Float16 lhs, float rhs)
     
    bool operator== (float lhs, _MLX_Float16 rhs)
     
    bool operator== (_MLX_Float16 lhs, double rhs)
     
    bool operator== (double lhs, _MLX_Float16 rhs)
     
    bool operator== (_MLX_Float16 lhs, int32_t rhs)
     
    bool operator== (int32_t lhs, _MLX_Float16 rhs)
     
    bool operator== (_MLX_Float16 lhs, uint32_t rhs)
     
    bool operator== (uint32_t lhs, _MLX_Float16 rhs)
     
    bool operator== (_MLX_Float16 lhs, int64_t rhs)
     
    bool operator== (int64_t lhs, _MLX_Float16 rhs)
     
    bool operator== (_MLX_Float16 lhs, uint64_t rhs)
     
    bool operator== (uint64_t lhs, _MLX_Float16 rhs)
     
    bool operator!= (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    bool operator!= (_MLX_Float16 lhs, float rhs)
     
    bool operator!= (float lhs, _MLX_Float16 rhs)
     
    bool operator!= (_MLX_Float16 lhs, double rhs)
     
    bool operator!= (double lhs, _MLX_Float16 rhs)
     
    bool operator!= (_MLX_Float16 lhs, int32_t rhs)
     
    bool operator!= (int32_t lhs, _MLX_Float16 rhs)
     
    bool operator!= (_MLX_Float16 lhs, uint32_t rhs)
     
    bool operator!= (uint32_t lhs, _MLX_Float16 rhs)
     
    bool operator!= (_MLX_Float16 lhs, int64_t rhs)
     
    bool operator!= (int64_t lhs, _MLX_Float16 rhs)
     
    bool operator!= (_MLX_Float16 lhs, uint64_t rhs)
     
    bool operator!= (uint64_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator- (_MLX_Float16 lhs)
     
    _MLX_Float16operator+= (_MLX_Float16 &lhs, const float &rhs)
     
    float & operator+= (float &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16operator-= (_MLX_Float16 &lhs, const float &rhs)
     
    float & operator-= (float &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16operator*= (_MLX_Float16 &lhs, const float &rhs)
     
    float & operator*= (float &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16operator/= (_MLX_Float16 &lhs, const float &rhs)
     
    float & operator/= (float &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator| (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator| (_MLX_Float16 lhs, uint16_t rhs)
     
    _MLX_Float16 operator| (uint16_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator& (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator& (_MLX_Float16 lhs, uint16_t rhs)
     
    _MLX_Float16 operator& (uint16_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator^ (_MLX_Float16 lhs, _MLX_Float16 rhs)
     
    _MLX_Float16 operator^ (_MLX_Float16 lhs, uint16_t rhs)
     
    _MLX_Float16 operator^ (uint16_t lhs, _MLX_Float16 rhs)
     
    _MLX_Float16operator|= (_MLX_Float16 &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16operator|= (_MLX_Float16 &lhs, uint16_t rhs)
     
    _MLX_Float16operator&= (_MLX_Float16 &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16operator&= (_MLX_Float16 &lhs, uint16_t rhs)
     
    _MLX_Float16operator^= (_MLX_Float16 &lhs, _MLX_Float16 rhs)
     
    _MLX_Float16operator^= (_MLX_Float16 &lhs, uint16_t rhs)
     
    float operator+ (float16_t lhs, bfloat16_t rhs)
     
    float operator+ (bfloat16_t lhs, float16_t rhs)
     
    float operator- (float16_t lhs, bfloat16_t rhs)
     
    float operator- (bfloat16_t lhs, float16_t rhs)
     
    float operator* (float16_t lhs, bfloat16_t rhs)
     
    float operator* (bfloat16_t lhs, float16_t rhs)
     
    float operator/ (float16_t lhs, bfloat16_t rhs)
     
    float operator/ (bfloat16_t lhs, float16_t rhs)
     
    Stream to_stream (StreamOrDevice s)
     
    Dtype result_type (const array &a, const array &b)
     The type from promoting the arrays' types with one another.
     
    Dtype result_type (const array &a, const array &b, const array &c)
     
    Dtype result_type (const std::vector< array > &arrays)
     
    std::vector< int > broadcast_shapes (const std::vector< int > &s1, const std::vector< int > &s2)
     
    bool is_same_shape (const std::vector< array > &arrays)
     
    template<typename T >
    int check_shape_dim (const T dim)
     Returns the shape dimension if it's within allowed range.
     
    bool is_big_endian ()
     
    int normalize_axis (int axis, int ndim)
     Returns the axis normalized to be in the range [0, ndim).
     
    std::ostream & operator<< (std::ostream &os, const Device &d)
     
    std::ostream & operator<< (std::ostream &os, const Stream &s)
     
    std::ostream & operator<< (std::ostream &os, const Dtype &d)
     
    std::ostream & operator<< (std::ostream &os, const Dtype::Kind &k)
     
    std::ostream & operator<< (std::ostream &os, array a)
     
    std::ostream & operator<< (std::ostream &os, const std::vector< int > &v)
     
    std::ostream & operator<< (std::ostream &os, const std::vector< size_t > &v)
     
    std::ostream & operator<< (std::ostream &os, const std::vector< int64_t > &v)
     
    std::ostream & operator<< (std::ostream &os, const complex64_t &v)
     
    std::ostream & operator<< (std::ostream &os, const float16_t &v)
     
    std::ostream & operator<< (std::ostream &os, const bfloat16_t &v)
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Variables

    template<typename T >
    constexpr bool is_array_v
     
    template<typename... T>
    constexpr bool is_arrays_v = (is_array_v<T> && ...)
     
    std::function< std::vector< array >(const std::vector< array > &) compile )(const std::function< std::vector< array >(const std::vector< array > &)> &fun, bool shapeless=false)
     Compile takes a function and returns a compiled function.
     
    constexpr Dtype bool_ {Dtype::Val::bool_, sizeof(bool)}
     
    constexpr Dtype uint8 {Dtype::Val::uint8, sizeof(uint8_t)}
     
    constexpr Dtype uint16 {Dtype::Val::uint16, sizeof(uint16_t)}
     
    constexpr Dtype uint32 {Dtype::Val::uint32, sizeof(uint32_t)}
     
    constexpr Dtype uint64 {Dtype::Val::uint64, sizeof(uint64_t)}
     
    constexpr Dtype int8 {Dtype::Val::int8, sizeof(int8_t)}
     
    constexpr Dtype int16 {Dtype::Val::int16, sizeof(int16_t)}
     
    constexpr Dtype int32 {Dtype::Val::int32, sizeof(int32_t)}
     
    constexpr Dtype int64 {Dtype::Val::int64, sizeof(int64_t)}
     
    constexpr Dtype float16 {Dtype::Val::float16, sizeof(uint16_t)}
     
    constexpr Dtype float32 {Dtype::Val::float32, sizeof(float)}
     
    constexpr Dtype bfloat16 {Dtype::Val::bfloat16, sizeof(uint16_t)}
     
    constexpr Dtype complex64 {Dtype::Val::complex64, sizeof(complex64_t)}
     
    constexpr Dtype::Category complexfloating
     
    constexpr Dtype::Category floating = Dtype::Category::floating
     
    constexpr Dtype::Category inexact = Dtype::Category::inexact
     
    constexpr Dtype::Category signedinteger = Dtype::Category::signedinteger
     
    constexpr Dtype::Category unsignedinteger
     
    constexpr Dtype::Category integer = Dtype::Category::integer
     
    constexpr Dtype::Category number = Dtype::Category::number
     
    constexpr Dtype::Category generic = Dtype::Category::generic
     
    std::function< std::pair< array, array >(const array &) value_and_grad )(const std::function< array(const array &)> &fun)
     Returns a function which computes the value and gradient of the unary input function.
     
    std::function< std::vector< array >(const std::vector< array > &) grad )(const std::function< array(const std::vector< array > &)> &fun, const std::vector< int > &argnums)
     Returns a function which computes the gradient of the input function with respect to a vector of input arrays.
     
    std::function< array(const array &) vmap )(const std::function< array(const array &)> &fun, int in_axis=0, int out_axis=0)
     Automatically vectorize a unary function over the requested axes.
     
    std::function< std::vector< array >(const std::vector< array > &) custom_vjp )(std::function< std::vector< array >(const std::vector< array > &)> fun, std::function< std::vector< array >(const std::vector< array > &, const std::vector< array > &, const std::vector< array > &)> fun_vjp)
     Return the results of calling fun with args but if their vjp is computed it will be computed by fun_vjp.
     
    std::function< std::vector< array >(const std::vector< array > &) checkpoint )(std::function< std::vector< array >(const std::vector< array > &)> fun)
     Checkpoint the gradient of a function.
     
    template<typename T >
    constexpr bool can_convert_to_complex128
     
    template<typename T >
    constexpr bool can_convert_to_complex64
     
    PrintFormatter global_formatter
     
    -

    Typedef Documentation

    - -

    ◆ bfloat16_t

    - -
    -
    - - - - -
    typedef struct _MLX_BFloat16 mlx::core::bfloat16_t
    -
    - -
    -
    - -

    ◆ deleter_t

    - -
    -
    - - - - -
    using mlx::core::deleter_t = std::function<void(allocator::Buffer)>
    -
    - -
    -
    - -

    ◆ enable_for_arrays_t

    - -
    -
    -
    -template<typename... T>
    - - - - -
    using mlx::core::enable_for_arrays_t = typename std::enable_if_t<is_arrays_v<T...>>
    -
    - -
    -
    - -

    ◆ float16_t

    - -
    -
    - - - - -
    typedef struct _MLX_Float16 mlx::core::float16_t
    -
    - -
    -
    - -

    ◆ GGUFLoad

    - -
    -
    - - - - -
    using mlx::core::GGUFLoad
    -
    -Initial value:
    std::pair<
    -
    std::unordered_map<std::string, array>,
    -
    std::unordered_map<std::string, GGUFMetaData>>
    -
    -
    -
    - -

    ◆ GGUFMetaData

    - -
    -
    - - - - -
    using mlx::core::GGUFMetaData
    -
    -Initial value:
    -
    std::variant<std::monostate, array, std::string, std::vector<std::string>>
    -
    -
    -
    - -

    ◆ SafetensorsLoad

    - -
    -
    - - - - -
    using mlx::core::SafetensorsLoad
    -
    -Initial value:
    std::pair<
    -
    std::unordered_map<std::string, array>,
    -
    std::unordered_map<std::string, std::string>>
    -
    -
    -
    - -

    ◆ SimpleValueAndGradFn

    - -
    -
    -Initial value:
    std::function<std::pair<array, std::vector<array>>(
    -
    const std::vector<array>&)>
    -
    -
    -
    - -

    ◆ StreamOrDevice

    - -
    -
    - - - - -
    using mlx::core::StreamOrDevice = std::variant<std::monostate, Stream, Device>
    -
    - -
    -
    - -

    ◆ ValueAndGradFn

    - -
    -
    - - - - -
    using mlx::core::ValueAndGradFn
    -
    -Initial value:
    -
    std::function<std::pair<std::vector<array>, std::vector<array>>(
    -
    const std::vector<array>&)>
    -
    -
    -
    -

    Enumeration Type Documentation

    - -

    ◆ CompileMode

    - -
    -
    - - - - - -
    - - - - -
    enum class mlx::core::CompileMode
    -
    -strong
    -
    - - - - - -
    Enumerator
    disabled 
    no_simplify 
    no_fuse 
    enabled 
    - -
    -
    - -

    ◆ CopyType

    - -
    -
    - - - - - -
    - - - - -
    enum class mlx::core::CopyType
    -
    -strong
    -
    - - - - - -
    Enumerator
    Scalar 
    Vector 
    General 
    GeneralGeneral 
    - -
    -
    - -

    ◆ ReductionOpType

    - -
    -
    - - - - -
    enum mlx::core::ReductionOpType
    -
    - - - - - - - -
    Enumerator
    ContiguousAllReduce 
    ContiguousReduce 
    ContiguousStridedReduce 
    GeneralContiguousReduce 
    GeneralStridedReduce 
    GeneralReduce 
    - -
    -
    -

    Function Documentation

    - -

    ◆ all_reduce_dispatch()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::all_reduce_dispatch (const array & in,
    array & out,
    const std::string & op_name,
    CommandEncoder & compute_encoder,
    metal::Device & d,
    const Stream & s )
    -
    - -
    -
    - -

    ◆ arange()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::arange (const std::vector< array > & inputs,
    array & out,
    double start,
    double step )
    -
    - -
    -
    - -

    ◆ async_eval()

    - -
    -
    - - - - - - - -
    void mlx::core::async_eval (std::vector< array > outputs)
    -
    - -
    -
    - -

    ◆ broadcast_shapes()

    - -
    -
    - - - - - - - - - - - -
    std::vector< int > mlx::core::broadcast_shapes (const std::vector< int > & s1,
    const std::vector< int > & s2 )
    -
    - -
    -
    - -

    ◆ build_lib_name()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    std::string mlx::core::build_lib_name (const std::vector< array > & inputs,
    const std::vector< array > & outputs,
    const std::vector< array > & tape,
    const std::unordered_set< uintptr_t > & constant_ids )
    -
    - -
    -
    - -

    ◆ check_contiguity()

    - -
    -
    -
    -template<typename stride_t >
    - - - - - -
    - - - - - - - - - - - -
    auto mlx::core::check_contiguity (const std::vector< int > & shape,
    const std::vector< stride_t > & strides )
    -
    -inline
    -
    - -
    -
    - -

    ◆ check_shape_dim()

    - -
    -
    -
    -template<typename T >
    - - - - - - - -
    int mlx::core::check_shape_dim (const T dim)
    -
    - -

    Returns the shape dimension if it's within allowed range.

    - -
    -
    - -

    ◆ collapse_contiguous_dims() [1/3]

    - -
    -
    -
    -template<typename... Arrays, typename = enable_for_arrays_t<Arrays...>>
    - - - - - -
    - - - - - - - -
    auto mlx::core::collapse_contiguous_dims (Arrays &&... xs)
    -
    -inline
    -
    - -
    -
    - -

    ◆ collapse_contiguous_dims() [2/3]

    - -
    -
    - - - - - -
    - - - - - - - -
    std::tuple< std::vector< int >, std::vector< std::vector< size_t > > > mlx::core::collapse_contiguous_dims (const std::vector< array > & xs)
    -
    -inline
    -
    - -
    -
    - -

    ◆ collapse_contiguous_dims() [3/3]

    - -
    -
    -
    -template<typename stride_t >
    - - - - - -
    - - - - - - - - - - - -
    std::tuple< std::vector< int >, std::vector< std::vector< stride_t > > > mlx::core::collapse_contiguous_dims (const std::vector< int > & shape,
    const std::vector< std::vector< stride_t > > strides )
    -
    -inline
    -
    - -
    -
    - -

    ◆ compiled_allocate_outputs()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::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 )
    -
    - -
    -
    - -

    ◆ compiled_check_contiguity()

    - -
    -
    - - - - - - - - - - - -
    bool mlx::core::compiled_check_contiguity (const std::vector< array > & inputs,
    const std::vector< int > & shape )
    -
    - -
    -
    - -

    ◆ copy()

    - -
    -
    - - - - - - - - - - - - - - - - -
    void mlx::core::copy (const array & src,
    array & dst,
    CopyType ctype )
    -
    - -
    -
    - -

    ◆ copy_gpu() [1/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    void mlx::core::copy_gpu (const array & src,
    array & out,
    CopyType ctype )
    -
    - -
    -
    - -

    ◆ copy_gpu() [2/2]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::copy_gpu (const array & src,
    array & out,
    CopyType ctype,
    const Stream & s )
    -
    - -
    -
    - -

    ◆ copy_gpu_inplace() [1/3]

    - -
    -
    -
    -template<typename stride_t >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::copy_gpu_inplace (const array & in,
    array & out,
    const std::vector< int > & data_shape,
    const std::vector< stride_t > & i_strides,
    const std::vector< stride_t > & o_strides,
    int64_t i_offset,
    int64_t o_offset,
    CopyType ctype,
    const Stream & s )
    -
    - -
    -
    - -

    ◆ copy_gpu_inplace() [2/3]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::copy_gpu_inplace (const array & in,
    array & out,
    const std::vector< int64_t > & istride,
    int64_t ioffset,
    CopyType ctype,
    const Stream & s )
    -
    - -
    -
    - -

    ◆ copy_gpu_inplace() [3/3]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::copy_gpu_inplace (const array & src,
    array & out,
    CopyType ctype,
    const Stream & s )
    -
    - -
    -
    - -

    ◆ copy_inplace() [1/2]

    - -
    -
    -
    -template<typename stride_t >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::copy_inplace (const array & src,
    array & dst,
    const std::vector< int > & data_shape,
    const std::vector< stride_t > & i_strides,
    const std::vector< stride_t > & o_strides,
    int64_t i_offset,
    int64_t o_offset,
    CopyType ctype )
    -
    - -
    -
    - -

    ◆ copy_inplace() [2/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    void mlx::core::copy_inplace (const array & src,
    array & dst,
    CopyType ctype )
    -
    - -
    -
    - -

    ◆ default_device()

    - -
    -
    - - - - - - - -
    const Device & mlx::core::default_device ()
    -
    - -
    -
    - -

    ◆ default_stream()

    - -
    -
    - - - - - - - -
    Stream mlx::core::default_stream (Device d)
    -
    - -

    Get the default stream for the given device.

    - -
    -
    - -

    ◆ disable_compile()

    - -
    -
    - - - - - - - -
    void mlx::core::disable_compile ()
    -
    - -

    Globally disable compilation.

    -

    Setting the environment variable MLX_DISABLE_COMPILE can also be used to disable compilation.

    - -
    -
    - -

    ◆ dtype_from_array_protocol()

    - -
    -
    - - - - - - - -
    Dtype mlx::core::dtype_from_array_protocol (std::string_view t)
    -
    - -
    -
    - -

    ◆ dtype_to_array_protocol()

    - -
    -
    - - - - - - - -
    std::string mlx::core::dtype_to_array_protocol (const Dtype & t)
    -
    - -
    -
    - -

    ◆ elem_to_loc() [1/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    size_t mlx::core::elem_to_loc (int elem,
    const array & a )
    -
    -inline
    -
    - -
    -
    - -

    ◆ elem_to_loc() [2/2]

    - -
    -
    -
    -template<typename stride_t >
    - - - - - -
    - - - - - - - - - - - - - - - - -
    stride_t mlx::core::elem_to_loc (int elem,
    const std::vector< int > & shape,
    const std::vector< stride_t > & strides )
    -
    -inline
    -
    - -
    -
    - -

    ◆ enable_compile()

    - -
    -
    - - - - - - - -
    void mlx::core::enable_compile ()
    -
    - -

    Globally enable compilation.

    -

    This will override the environment variable MLX_DISABLE_COMPILE.

    - -
    -
    - -

    ◆ eval() [1/2]

    - -
    -
    -
    -template<typename... Arrays, typename = enable_for_arrays_t<Arrays...>>
    - - - - - - - -
    void mlx::core::eval (Arrays &&... outputs)
    -
    - -
    -
    - -

    ◆ eval() [2/2]

    - -
    -
    - - - - - - - -
    void mlx::core::eval (std::vector< array > outputs)
    -
    - -
    -
    - -

    ◆ export_to_dot() [1/2]

    - -
    -
    -
    -template<typename... Arrays, typename = enable_for_arrays_t<Arrays...>>
    - - - - - - - - - - - -
    void mlx::core::export_to_dot (std::ostream & os,
    Arrays &&... outputs )
    -
    - -
    -
    - -

    ◆ export_to_dot() [2/2]

    - -
    -
    - - - - - - - - - - - -
    void mlx::core::export_to_dot (std::ostream & os,
    const std::vector< array > & outputs )
    -
    - -
    -
    - -

    ◆ get_shape()

    - -
    -
    - - - - - - - -
    std::vector< int > mlx::core::get_shape (const gguf_tensor & tensor)
    -
    - -
    -
    - -

    ◆ get_type_string()

    - -
    -
    - - - - - - - -
    std::string mlx::core::get_type_string (Dtype d)
    -
    - -
    -
    - -

    ◆ gguf_load_quantized()

    - -
    -
    - - - - - - - - - - - -
    void mlx::core::gguf_load_quantized (std::unordered_map< std::string, array > & a,
    const gguf_tensor & tensor )
    -
    - -
    -
    - -

    ◆ grad() [1/2]

    - -
    -
    - - - - - -
    - - - - - - - -
    std::function< array(const array &)> mlx::core::grad (const std::function< array(const array &)> & fun)
    -
    -inline
    -
    - -

    Returns a function which computes the gradient of the unary input function.

    - -
    -
    - -

    ◆ grad() [2/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    std::function< std::vector< array >(const std::vector< array > &)> mlx::core::grad (const std::function< array(const std::vector< array > &)> & fun,
    int argnum = 0 )
    -
    -inline
    -
    - -

    Returns a function which computes the gradient of the input function with respect to a single input array.

    -

    The function being differentiated takes a vector of arrays and returns an array. The optional argnum index specifies which the argument to compute the gradient with respect to and defaults to 0.

    - -
    -
    - -

    ◆ is_big_endian()

    - -
    -
    - - - - - -
    - - - - - - - -
    bool mlx::core::is_big_endian ()
    -
    -inline
    -
    - -
    -
    - -

    ◆ is_same_shape()

    - -
    -
    - - - - - - - -
    bool mlx::core::is_same_shape (const std::vector< array > & arrays)
    -
    - -
    -
    - -

    ◆ is_scalar()

    - -
    -
    - - - - - -
    - - - - - - - -
    bool mlx::core::is_scalar (const array & x)
    -
    -inline
    -
    - -
    -
    - -

    ◆ is_static_cast()

    - -
    -
    - - - - - -
    - - - - - - - -
    bool mlx::core::is_static_cast (const Primitive & p)
    -
    -inline
    -
    - -
    -
    - -

    ◆ issubdtype() [1/4]

    - -
    -
    - - - - - - - - - - - -
    bool mlx::core::issubdtype (const Dtype & a,
    const Dtype & b )
    -
    - -
    -
    - -

    ◆ issubdtype() [2/4]

    - -
    -
    - - - - - - - - - - - -
    bool mlx::core::issubdtype (const Dtype & a,
    const Dtype::Category & b )
    -
    - -
    -
    - -

    ◆ issubdtype() [3/4]

    - -
    -
    - - - - - - - - - - - -
    bool mlx::core::issubdtype (const Dtype::Category & a,
    const Dtype & b )
    -
    - -
    -
    - -

    ◆ issubdtype() [4/4]

    - -
    -
    - - - - - - - - - - - -
    bool mlx::core::issubdtype (const Dtype::Category & a,
    const Dtype::Category & b )
    -
    - -
    -
    - -

    ◆ jvp() [1/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    std::pair< array, array > mlx::core::jvp (const std::function< array(const array &)> & fun,
    const array & primal,
    const array & tangent )
    -
    - -

    Computes the output and Jacobian-vector product (JVP) of a unary function.

    - -
    -
    - -

    ◆ jvp() [2/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    std::pair< std::vector< array >, std::vector< array > > mlx::core::jvp (const std::function< std::vector< array >(const std::vector< array > &)> & fun,
    const std::vector< array > & primals,
    const std::vector< array > & tangents )
    -
    - -

    Computes the output and Jacobian-vector product (JVP) of a function.

    -

    Computes the Jacobian-vector product of the Jacobian of the function evaluated at the primals with the vector of tangents. Returns a pair of vectors of output arrays and JVP arrays.

    - -
    -
    - -

    ◆ kindof()

    - -
    -
    - - - - - - - -
    Dtype::Kind mlx::core::kindof (const Dtype & t)
    -
    - -
    -
    - -

    ◆ load() [1/2]

    - -
    -
    - - - - - - - - - - - -
    array mlx::core::load (std::shared_ptr< io::Reader > in_stream,
    StreamOrDevice s = {} )
    -
    - -

    Load array from reader in .npy format.

    - -
    -
    - -

    ◆ load() [2/2]

    - -
    -
    - - - - - - - - - - - -
    array mlx::core::load (std::string file,
    StreamOrDevice s = {} )
    -
    - -

    Load array from file in .npy format.

    - -
    -
    - -

    ◆ load_gguf()

    - -
    -
    - - - - - - - - - - - -
    GGUFLoad mlx::core::load_gguf (const std::string & file,
    StreamOrDevice s = {} )
    -
    - -

    Load array map and metadata from .gguf file format.

    - -
    -
    - -

    ◆ load_safetensors() [1/2]

    - -
    -
    - - - - - - - - - - - -
    SafetensorsLoad mlx::core::load_safetensors (const std::string & file,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ load_safetensors() [2/2]

    - -
    -
    - - - - - - - - - - - -
    SafetensorsLoad mlx::core::load_safetensors (std::shared_ptr< io::Reader > in_stream,
    StreamOrDevice s = {} )
    -
    - -

    Load array map from .safetensors file format.

    - -
    -
    - -

    ◆ new_stream()

    - -
    -
    - - - - - - - -
    Stream mlx::core::new_stream (Device d)
    -
    - -

    Make a new stream on the given device.

    - -
    -
    - -

    ◆ normalize_axis()

    - -
    -
    - - - - - - - - - - - -
    int mlx::core::normalize_axis (int axis,
    int ndim )
    -
    - -

    Returns the axis normalized to be in the range [0, ndim).

    -

    Based on numpy's normalize_axis_index. See https://numpy.org/devdocs/reference/generated/numpy.lib.array_utils.normalize_axis_index.html

    - -
    -
    - -

    ◆ operator!=() [1/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [2/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_BFloat16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [3/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_BFloat16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [4/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_BFloat16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [5/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_BFloat16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [6/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_BFloat16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [7/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_BFloat16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [8/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [9/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_Float16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [10/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_Float16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [11/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_Float16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [12/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_Float16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [13/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_Float16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [14/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (_MLX_Float16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [15/28]

    - -
    -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (const Device & lhs,
    const Device & rhs )
    -
    - -
    -
    - -

    ◆ operator!=() [16/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (const Stream & lhs,
    const Stream & rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [17/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (double lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [18/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (double lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [19/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (float lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [20/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (float lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [21/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (int32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [22/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (int32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [23/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (int64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [24/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (int64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [25/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (uint32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [26/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (uint32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [27/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (uint64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator!=() [28/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator!= (uint64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator%()

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator% (complex64_t a,
    complex64_t b )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator&() [1/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator& (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator&() [2/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator& (_MLX_BFloat16 lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator&() [3/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator& (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator&() [4/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator& (_MLX_Float16 lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator&() [5/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator& (uint16_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator&() [6/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator& (uint16_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator&=() [1/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 & mlx::core::operator&= (_MLX_BFloat16 & lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator&=() [2/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 & mlx::core::operator&= (_MLX_BFloat16 & lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator&=() [3/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 & mlx::core::operator&= (_MLX_Float16 & lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator&=() [4/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 & mlx::core::operator&= (_MLX_Float16 & lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [1/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator* (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [2/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator* (_MLX_BFloat16 lhs,
    bool rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [3/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator* (_MLX_BFloat16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [4/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator* (_MLX_BFloat16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [5/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator* (_MLX_BFloat16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [6/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator* (_MLX_BFloat16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [7/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator* (_MLX_BFloat16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [8/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator* (_MLX_BFloat16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [9/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [10/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs,
    bool rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [11/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator* (_MLX_Float16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [12/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator* (_MLX_Float16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [13/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [14/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [15/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [16/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator* (_MLX_Float16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [17/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator* (bfloat16_t lhs,
    float16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [18/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator* (bool lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [19/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator* (bool lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [20/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator* (double lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [21/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator* (double lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [22/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator* (float lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [23/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator* (float lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [24/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator* (float16_t lhs,
    bfloat16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [25/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator* (int32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [26/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator* (int32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [27/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator* (int64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [28/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator* (int64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [29/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator* (uint32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [30/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator* (uint32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [31/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator* (uint64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*() [32/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator* (uint64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*=() [1/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 & mlx::core::operator*= (_MLX_BFloat16 & lhs,
    const float & rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*=() [2/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 & mlx::core::operator*= (_MLX_Float16 & lhs,
    const float & rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*=() [3/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float & mlx::core::operator*= (float & lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator*=() [4/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float & mlx::core::operator*= (float & lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [1/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator+ (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [2/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator+ (_MLX_BFloat16 lhs,
    bool rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [3/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator+ (_MLX_BFloat16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [4/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator+ (_MLX_BFloat16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [5/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator+ (_MLX_BFloat16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [6/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator+ (_MLX_BFloat16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [7/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator+ (_MLX_BFloat16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [8/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator+ (_MLX_BFloat16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [9/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [10/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs,
    bool rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [11/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator+ (_MLX_Float16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [12/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator+ (_MLX_Float16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [13/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [14/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [15/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [16/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator+ (_MLX_Float16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [17/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator+ (bfloat16_t lhs,
    float16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [18/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (bfloat16_t x,
    const complex64_t & y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [19/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator+ (bool lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [20/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator+ (bool lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [21/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (bool x,
    const complex64_t & y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [22/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (const complex64_t & x,
    bfloat16_t y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [23/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (const complex64_t & x,
    bool y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [24/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (const complex64_t & x,
    const complex64_t & y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [25/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (const complex64_t & x,
    const std::complex< float > & y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [26/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (const complex64_t & x,
    float y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [27/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (const complex64_t & x,
    float16_t y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [28/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (const complex64_t & x,
    int32_t y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [29/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (const complex64_t & x,
    int64_t y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [30/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (const complex64_t & x,
    uint32_t y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [31/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (const complex64_t & x,
    uint64_t y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [32/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (const std::complex< float > & x,
    const complex64_t & y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [33/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator+ (double lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [34/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator+ (double lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [35/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator+ (float lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [36/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator+ (float lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [37/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (float x,
    const complex64_t & y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [38/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator+ (float16_t lhs,
    bfloat16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [39/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (float16_t x,
    const complex64_t & y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [40/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator+ (int32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [41/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator+ (int32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [42/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (int32_t x,
    const complex64_t & y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [43/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator+ (int64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [44/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator+ (int64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [45/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (int64_t x,
    const complex64_t & y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [46/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator+ (uint32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [47/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator+ (uint32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [48/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (uint32_t x,
    const complex64_t & y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [49/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator+ (uint64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [50/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator+ (uint64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+() [51/51]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    complex64_t mlx::core::operator+ (uint64_t x,
    const complex64_t & y )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+=() [1/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 & mlx::core::operator+= (_MLX_BFloat16 & lhs,
    const float & rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+=() [2/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 & mlx::core::operator+= (_MLX_Float16 & lhs,
    const float & rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+=() [3/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float & mlx::core::operator+= (float & lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator+=() [4/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float & mlx::core::operator+= (float & lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [1/35]

    - -
    -
    - - - - - -
    - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (_MLX_BFloat16 lhs)
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [2/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [3/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (_MLX_BFloat16 lhs,
    bool rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [4/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator- (_MLX_BFloat16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [5/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator- (_MLX_BFloat16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [6/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (_MLX_BFloat16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [7/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (_MLX_BFloat16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [8/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (_MLX_BFloat16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [9/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (_MLX_BFloat16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [10/35]

    - -
    -
    - - - - - -
    - - - - - - - -
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs)
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [11/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [12/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs,
    bool rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [13/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator- (_MLX_Float16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [14/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator- (_MLX_Float16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [15/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [16/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [17/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [18/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator- (_MLX_Float16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [19/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator- (bfloat16_t lhs,
    float16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [20/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (bool lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [21/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator- (bool lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [22/35]

    - -
    -
    - - - - - -
    - - - - - - - -
    complex64_t mlx::core::operator- (const complex64_t & v)
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [23/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator- (double lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [24/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator- (double lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [25/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator- (float lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [26/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator- (float lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [27/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator- (float16_t lhs,
    bfloat16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [28/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (int32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [29/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator- (int32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [30/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (int64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [31/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator- (int64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [32/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (uint32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [33/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator- (uint32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [34/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator- (uint64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-() [35/35]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator- (uint64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-=() [1/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 & mlx::core::operator-= (_MLX_BFloat16 & lhs,
    const float & rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-=() [2/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 & mlx::core::operator-= (_MLX_Float16 & lhs,
    const float & rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-=() [3/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float & mlx::core::operator-= (float & lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator-=() [4/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float & mlx::core::operator-= (float & lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [1/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator/ (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [2/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator/ (_MLX_BFloat16 lhs,
    bool rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [3/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator/ (_MLX_BFloat16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [4/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator/ (_MLX_BFloat16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [5/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator/ (_MLX_BFloat16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [6/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator/ (_MLX_BFloat16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [7/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator/ (_MLX_BFloat16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [8/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator/ (_MLX_BFloat16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [9/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [10/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs,
    bool rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [11/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator/ (_MLX_Float16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [12/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator/ (_MLX_Float16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [13/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [14/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [15/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [16/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator/ (_MLX_Float16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [17/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator/ (bfloat16_t lhs,
    float16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [18/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator/ (bool lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [19/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator/ (bool lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [20/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator/ (double lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [21/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    double mlx::core::operator/ (double lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [22/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator/ (float lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [23/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator/ (float lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [24/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float mlx::core::operator/ (float16_t lhs,
    bfloat16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [25/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator/ (int32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [26/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator/ (int32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [27/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator/ (int64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [28/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator/ (int64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [29/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator/ (uint32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [30/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator/ (uint32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [31/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator/ (uint64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/() [32/32]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator/ (uint64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/=() [1/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 & mlx::core::operator/= (_MLX_BFloat16 & lhs,
    const float & rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/=() [2/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 & mlx::core::operator/= (_MLX_Float16 & lhs,
    const float & rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/=() [3/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float & mlx::core::operator/= (float & lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator/=() [4/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    float & mlx::core::operator/= (float & lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [1/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [2/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_BFloat16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [3/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_BFloat16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [4/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_BFloat16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [5/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_BFloat16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [6/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_BFloat16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [7/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_BFloat16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [8/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [9/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_Float16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [10/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_Float16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [11/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_Float16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [12/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_Float16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [13/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_Float16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [14/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (_MLX_Float16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [15/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (const complex64_t & a,
    const complex64_t & b )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [16/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (double lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [17/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (double lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [18/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (float lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [19/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (float lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [20/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (int32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [21/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (int32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [22/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (int64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [23/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (int64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [24/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (uint32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [25/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (uint32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [26/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (uint64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<() [27/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator< (uint64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<<() [1/11]

    - -
    -
    - - - - - - - - - - - -
    std::ostream & mlx::core::operator<< (std::ostream & os,
    array a )
    -
    - -
    -
    - -

    ◆ operator<<() [2/11]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    std::ostream & mlx::core::operator<< (std::ostream & os,
    const bfloat16_t & v )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<<() [3/11]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    std::ostream & mlx::core::operator<< (std::ostream & os,
    const complex64_t & v )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<<() [4/11]

    - -
    -
    - - - - - - - - - - - -
    std::ostream & mlx::core::operator<< (std::ostream & os,
    const Device & d )
    -
    - -
    -
    - -

    ◆ operator<<() [5/11]

    - -
    -
    - - - - - - - - - - - -
    std::ostream & mlx::core::operator<< (std::ostream & os,
    const Dtype & d )
    -
    - -
    -
    - -

    ◆ operator<<() [6/11]

    - -
    -
    - - - - - - - - - - - -
    std::ostream & mlx::core::operator<< (std::ostream & os,
    const Dtype::Kind & k )
    -
    - -
    -
    - -

    ◆ operator<<() [7/11]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    std::ostream & mlx::core::operator<< (std::ostream & os,
    const float16_t & v )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<<() [8/11]

    - -
    -
    - - - - - - - - - - - -
    std::ostream & mlx::core::operator<< (std::ostream & os,
    const std::vector< int > & v )
    -
    - -
    -
    - -

    ◆ operator<<() [9/11]

    - -
    -
    - - - - - - - - - - - -
    std::ostream & mlx::core::operator<< (std::ostream & os,
    const std::vector< int64_t > & v )
    -
    - -
    -
    - -

    ◆ operator<<() [10/11]

    - -
    -
    - - - - - - - - - - - -
    std::ostream & mlx::core::operator<< (std::ostream & os,
    const std::vector< size_t > & v )
    -
    - -
    -
    - -

    ◆ operator<<() [11/11]

    - -
    -
    - - - - - - - - - - - -
    std::ostream & mlx::core::operator<< (std::ostream & os,
    const Stream & s )
    -
    - -
    -
    - -

    ◆ operator<=() [1/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [2/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_BFloat16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [3/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_BFloat16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [4/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_BFloat16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [5/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_BFloat16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [6/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_BFloat16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [7/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_BFloat16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [8/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [9/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_Float16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [10/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_Float16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [11/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_Float16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [12/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_Float16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [13/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_Float16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [14/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (_MLX_Float16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [15/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (const complex64_t & a,
    const complex64_t & b )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [16/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (double lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [17/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (double lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [18/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (float lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [19/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (float lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [20/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (int32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [21/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (int32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [22/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (int64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [23/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (int64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [24/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (uint32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [25/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (uint32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [26/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (uint64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator<=() [27/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator<= (uint64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [1/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [2/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_BFloat16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [3/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_BFloat16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [4/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_BFloat16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [5/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_BFloat16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [6/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_BFloat16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [7/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_BFloat16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [8/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [9/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_Float16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [10/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_Float16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [11/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_Float16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [12/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_Float16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [13/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_Float16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [14/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (_MLX_Float16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [15/28]

    - -
    -
    - - - - - - - - - - - -
    bool mlx::core::operator== (const Device & lhs,
    const Device & rhs )
    -
    - -
    -
    - -

    ◆ operator==() [16/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (const Stream & lhs,
    const Stream & rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [17/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (double lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [18/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (double lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [19/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (float lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [20/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (float lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [21/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (int32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [22/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (int32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [23/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (int64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [24/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (int64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [25/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (uint32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [26/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (uint32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [27/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (uint64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator==() [28/28]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator== (uint64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [1/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [2/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_BFloat16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [3/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_BFloat16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [4/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_BFloat16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [5/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_BFloat16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [6/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_BFloat16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [7/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_BFloat16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [8/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [9/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_Float16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [10/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_Float16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [11/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_Float16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [12/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_Float16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [13/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_Float16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [14/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (_MLX_Float16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [15/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (const complex64_t & a,
    const complex64_t & b )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [16/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (double lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [17/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (double lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [18/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (float lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [19/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (float lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [20/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (int32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [21/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (int32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [22/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (int64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [23/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (int64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [24/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (uint32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [25/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (uint32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [26/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (uint64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>() [27/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator> (uint64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [1/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [2/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_BFloat16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [3/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_BFloat16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [4/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_BFloat16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [5/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_BFloat16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [6/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_BFloat16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [7/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_BFloat16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [8/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [9/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_Float16 lhs,
    double rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [10/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_Float16 lhs,
    float rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [11/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_Float16 lhs,
    int32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [12/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_Float16 lhs,
    int64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [13/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_Float16 lhs,
    uint32_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [14/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (_MLX_Float16 lhs,
    uint64_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [15/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (const complex64_t & a,
    const complex64_t & b )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [16/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (double lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [17/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (double lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [18/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (float lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [19/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (float lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [20/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (int32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [21/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (int32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [22/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (int64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [23/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (int64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [24/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (uint32_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [25/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (uint32_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [26/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (uint64_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator>=() [27/27]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    bool mlx::core::operator>= (uint64_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator^() [1/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator^ (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator^() [2/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator^ (_MLX_BFloat16 lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator^() [3/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator^ (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator^() [4/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator^ (_MLX_Float16 lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator^() [5/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator^ (uint16_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator^() [6/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator^ (uint16_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator^=() [1/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 & mlx::core::operator^= (_MLX_BFloat16 & lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator^=() [2/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 & mlx::core::operator^= (_MLX_BFloat16 & lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator^=() [3/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 & mlx::core::operator^= (_MLX_Float16 & lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator^=() [4/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 & mlx::core::operator^= (_MLX_Float16 & lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator|() [1/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator| (_MLX_BFloat16 lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator|() [2/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator| (_MLX_BFloat16 lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator|() [3/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator| (_MLX_Float16 lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator|() [4/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator| (_MLX_Float16 lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator|() [5/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 mlx::core::operator| (uint16_t lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator|() [6/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 mlx::core::operator| (uint16_t lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator|=() [1/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 & mlx::core::operator|= (_MLX_BFloat16 & lhs,
    _MLX_BFloat16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator|=() [2/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_BFloat16 & mlx::core::operator|= (_MLX_BFloat16 & lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator|=() [3/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 & mlx::core::operator|= (_MLX_Float16 & lhs,
    _MLX_Float16 rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ operator|=() [4/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    _MLX_Float16 & mlx::core::operator|= (_MLX_Float16 & lhs,
    uint16_t rhs )
    -
    -inline
    -
    - -
    -
    - -

    ◆ print_complex_constant()

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - -
    void mlx::core::print_complex_constant (std::ostream & os,
    const array & x )
    -
    - -
    -
    - -

    ◆ print_constant()

    - -
    -
    - - - - - - - - - - - -
    void mlx::core::print_constant (std::ostream & os,
    const array & x )
    -
    - -
    -
    - -

    ◆ print_float_constant()

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - -
    void mlx::core::print_float_constant (std::ostream & os,
    const array & x )
    -
    - -
    -
    - -

    ◆ print_graph() [1/2]

    - -
    -
    -
    -template<typename... Arrays, typename = enable_for_arrays_t<Arrays...>>
    - - - - - - - - - - - -
    void mlx::core::print_graph (std::ostream & os,
    Arrays &&... outputs )
    -
    - -
    -
    - -

    ◆ print_graph() [2/2]

    - -
    -
    - - - - - - - - - - - -
    void mlx::core::print_graph (std::ostream & os,
    const std::vector< array > & outputs )
    -
    - -
    -
    - -

    ◆ print_int_constant()

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - -
    void mlx::core::print_int_constant (std::ostream & os,
    const array & x )
    -
    - -
    -
    - -

    ◆ promote_types()

    - -
    -
    - - - - - - - - - - - -
    Dtype mlx::core::promote_types (const Dtype & t1,
    const Dtype & t2 )
    -
    - -
    -
    - -

    ◆ result_type() [1/3]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    Dtype mlx::core::result_type (const array & a,
    const array & b )
    -
    -inline
    -
    - -

    The type from promoting the arrays' types with one another.

    - -
    -
    - -

    ◆ result_type() [2/3]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    Dtype mlx::core::result_type (const array & a,
    const array & b,
    const array & c )
    -
    -inline
    -
    - -
    -
    - -

    ◆ result_type() [3/3]

    - -
    -
    - - - - - - - -
    Dtype mlx::core::result_type (const std::vector< array > & arrays)
    -
    - -
    -
    - -

    ◆ row_reduce_general_dispatch()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::row_reduce_general_dispatch (const array & in,
    array & out,
    const std::string & op_name,
    const ReductionPlan & plan,
    const std::vector< int > & axes,
    CommandEncoder & compute_encoder,
    metal::Device & d,
    const Stream & s )
    -
    - -
    -
    - -

    ◆ save() [1/2]

    - -
    -
    - - - - - - - - - - - -
    void mlx::core::save (std::shared_ptr< io::Writer > out_stream,
    array a )
    -
    - -

    Save array to out stream in .npy format.

    - -
    -
    - -

    ◆ save() [2/2]

    - -
    -
    - - - - - - - - - - - -
    void mlx::core::save (std::string file,
    array a )
    -
    - -

    Save array to file in .npy format.

    - -
    -
    - -

    ◆ save_gguf()

    - -
    -
    - - - - - - - - - - - - - - - - -
    void mlx::core::save_gguf (std::string file,
    std::unordered_map< std::string, array > array_map,
    std::unordered_map< std::string, GGUFMetaData > meta_data = {} )
    -
    - -
    -
    - -

    ◆ save_safetensors() [1/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    void mlx::core::save_safetensors (std::shared_ptr< io::Writer > in_stream,
    std::unordered_map< std::string, array > ,
    std::unordered_map< std::string, std::string > metadata = {} )
    -
    - -
    -
    - -

    ◆ save_safetensors() [2/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    void mlx::core::save_safetensors (std::string file,
    std::unordered_map< std::string, array > ,
    std::unordered_map< std::string, std::string > metadata = {} )
    -
    - -
    -
    - -

    ◆ set_compile_mode()

    - -
    -
    - - - - - - - -
    void mlx::core::set_compile_mode (CompileMode mode)
    -
    - -

    Set the compiler mode to the given value.

    - -
    -
    - -

    ◆ set_default_device()

    - -
    -
    - - - - - - - -
    void mlx::core::set_default_device (const Device & d)
    -
    - -
    -
    - -

    ◆ set_default_stream()

    - -
    -
    - - - - - - - -
    void mlx::core::set_default_stream (Stream s)
    -
    - -

    Make the stream the default for its device.

    - -
    -
    - -

    ◆ size_of()

    - -
    -
    - - - - - -
    - - - - - - - -
    uint8_t mlx::core::size_of (const Dtype & t)
    -
    -inline
    -
    - -
    -
    - -

    ◆ steel_matmul()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::steel_matmul (const Stream & s,
    metal::Device & d,
    const array & a,
    const array & b,
    array & out,
    int M,
    int N,
    int K,
    int batch_size_out,
    int lda,
    int ldb,
    bool transpose_a,
    bool transpose_b,
    std::vector< array > & copies,
    std::vector< int > batch_shape = {},
    std::vector< size_t > A_batch_stride = {},
    std::vector< size_t > B_batch_stride = {} )
    -
    - -
    -
    - -

    ◆ steel_matmul_conv_groups()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::steel_matmul_conv_groups (const Stream & s,
    metal::Device & d,
    const array & a,
    const array & b,
    array & out,
    int M,
    int N,
    int K,
    int lda,
    int ldb,
    int ldd,
    bool transpose_a,
    bool transpose_b,
    int groups,
    std::vector< array > & copies )
    -
    - -
    -
    - -

    ◆ strided_reduce_general_dispatch()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void mlx::core::strided_reduce_general_dispatch (const array & in,
    array & out,
    const std::string & op_name,
    const ReductionPlan & plan,
    const std::vector< int > & axes,
    CommandEncoder & compute_encoder,
    metal::Device & d,
    const Stream & s )
    -
    - -
    -
    - -

    ◆ synchronize() [1/2]

    - -
    -
    - - - - - - - -
    void mlx::core::synchronize ()
    -
    - -
    -
    - -

    ◆ synchronize() [2/2]

    - -
    -
    - - - - - - - -
    void mlx::core::synchronize (Stream )
    -
    - -
    -
    - -

    ◆ to_bnns_dtype()

    - -
    -
    - - - - - - - -
    BNNSDataType mlx::core::to_bnns_dtype (Dtype mlx_dtype)
    -
    - -
    -
    - -

    ◆ to_stream()

    - -
    -
    - - - - - - - -
    Stream mlx::core::to_stream (StreamOrDevice s)
    -
    - -
    -
    - -

    ◆ value_and_grad() [1/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    SimpleValueAndGradFn mlx::core::value_and_grad (const std::function< array(const std::vector< array > &)> & fun,
    const std::vector< int > & argnums )
    -
    -inline
    -
    - -
    -
    - -

    ◆ value_and_grad() [2/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    SimpleValueAndGradFn mlx::core::value_and_grad (const std::function< array(const std::vector< array > &)> & fun,
    int argnum = 0 )
    -
    -inline
    -
    - -
    -
    - -

    ◆ value_and_grad() [3/4]

    - -
    -
    - - - - - - - - - - - -
    ValueAndGradFn mlx::core::value_and_grad (const std::function< std::vector< array >(const std::vector< array > &)> & fun,
    const std::vector< int > & argnums )
    -
    - -

    Returns a function which computes the value and gradient of the input function with respect to a vector of input arrays.

    - -
    -
    - -

    ◆ value_and_grad() [4/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    ValueAndGradFn mlx::core::value_and_grad (const std::function< std::vector< array >(const std::vector< array > &)> & fun,
    int argnum = 0 )
    -
    -inline
    -
    - -

    Returns a function which computes the value and gradient of the input function with respect to a single input array.

    - -
    -
    - -

    ◆ vjp() [1/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    std::pair< array, array > mlx::core::vjp (const std::function< array(const array &)> & fun,
    const array & primal,
    const array & cotangent )
    -
    - -

    Computes the output and vector-Jacobian product (VJP) of a unary function.

    - -
    -
    - -

    ◆ vjp() [2/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    std::pair< std::vector< array >, std::vector< array > > mlx::core::vjp (const std::function< std::vector< array >(const std::vector< array > &)> & fun,
    const std::vector< array > & primals,
    const std::vector< array > & cotangents )
    -
    - -

    Computes the output and vector-Jacobian product (VJP) of a function.

    -

    Computes the vector-Jacobian product of the vector of cotangents with the Jacobian of the function evaluated at the primals. Returns a pair of vectors of output arrays and VJP arrays.

    - -
    -
    - -

    ◆ vmap() [1/2]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    std::function< array(const array &, const array &)> mlx::core::vmap (const std::function< array(const array &, const array &)> & fun,
    int in_axis_a = 0,
    int in_axis_b = 0,
    int out_axis = 0 )
    -
    - -

    Automatically vectorize a binary function over the requested axes.

    - -
    -
    - -

    ◆ vmap() [2/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    std::function< std::vector< array >(const std::vector< array > &)> mlx::core::vmap (const std::function< std::vector< array >(const std::vector< array > &)> & fun,
    const std::vector< int > & in_axes = {},
    const std::vector< int > & out_axes = {} )
    -
    - -

    Automatically vectorize a function over the requested axes.

    -

    The input function to vmap takes as an argument a vector of arrays and returns a vector of arrays. Optionally specify the axes to vectorize over with in_axes and out_axes, otherwise a default of 0 is used. Returns a vectorized function with the same signature as the input function.

    - -
    -
    -

    Variable Documentation

    - -

    ◆ bfloat16

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::bfloat16 {Dtype::Val::bfloat16, sizeof(uint16_t)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ bool_

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::bool_ {Dtype::Val::bool_, sizeof(bool)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ can_convert_to_complex128

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - -
    constexpr bool mlx::core::can_convert_to_complex128
    -
    -inlineconstexpr
    -
    -Initial value:
    =
    -
    !std::is_same_v<T, complex128_t> && std::is_convertible_v<T, double>
    -
    -
    -
    - -

    ◆ can_convert_to_complex64

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - -
    constexpr bool mlx::core::can_convert_to_complex64
    -
    -inlineconstexpr
    -
    -Initial value:
    =
    -
    !std::is_same_v<T, complex64_t> && std::is_convertible_v<T, float>
    -
    -
    -
    - -

    ◆ checkpoint

    - -
    -
    - - - - - - - -
    std::function< std::vector< array >(const std::vector< array > &) mlx::core::checkpoint) (std::function< std::vector< array >(const std::vector< array > &)> fun) (std::function< std::vector< array >(const std::vector< array > &)> fun)
    -
    - -

    Checkpoint the gradient of a function.

    -

    Namely, discard all intermediate state and recalculate it when we need to compute the gradient.

    - -
    -
    - -

    ◆ compile

    - -
    -
    - - - - - - - - - - - -
    std::function< std::vector< array >(const std::vector< array > &) mlx::core::compile) (const std::function< std::vector< array >(const std::vector< array > &)> &fun, bool shapeless=false) (const std::function< std::vector< array >(const std::vector< array > &)> & fun,
    bool shapeless = false )
    -
    - -

    Compile takes a function and returns a compiled function.

    - -
    -
    - -

    ◆ complex64

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::complex64 {Dtype::Val::complex64, sizeof(complex64_t)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ complexfloating

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype::Category mlx::core::complexfloating
    -
    -inlineconstexpr
    -
    -Initial value:
    =
    -
    Dtype::Category::complexfloating
    -
    -
    -
    - -

    ◆ custom_vjp

    - -
    -
    - - - - - - - - - - - -
    std::function< std::vector< array >(const std::vector< array > &) mlx::core::custom_vjp) (std::function< std::vector< array >(const std::vector< array > &)> fun, std::function< std::vector< array >( const std::vector< array > &, const std::vector< array > &, const std::vector< array > &)> fun_vjp) (std::function< std::vector< array >(const std::vector< array > &)> fun,
    std::function< std::vector< array >(const std::vector< array > &, const std::vector< array > &, const std::vector< array > &)> fun_vjp )
    -
    - -

    Return the results of calling fun with args but if their vjp is computed it will be computed by fun_vjp.

    - -
    -
    - -

    ◆ float16

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::float16 {Dtype::Val::float16, sizeof(uint16_t)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ float32

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::float32 {Dtype::Val::float32, sizeof(float)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ floating

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype::Category mlx::core::floating = Dtype::Category::floating
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ generic

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype::Category mlx::core::generic = Dtype::Category::generic
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ global_formatter

    - -
    -
    - - - - - -
    - - - - -
    PrintFormatter mlx::core::global_formatter
    -
    -extern
    -
    - -
    -
    - -

    ◆ grad

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    std::function< array(const array &) mlx::core::grad) (const std::function< array(const array &)> &fun) (const std::function< array(const std::vector< array > &)> & fun,
    const std::vector< int > & argnums )
    -
    -inline
    -
    - -

    Returns a function which computes the gradient of the input function with respect to a vector of input arrays.

    -

    Returns a function which computes the gradient of the unary input function.

    -

    Returns a function which computes the gradient of the input function with respect to a single input array.

    -

    The function being differentiated takes a vector of arrays and returns an array. The vector of argnums specifies which the arguments to compute the gradient with respect to. At least one argument must be specified.

    -

    The function being differentiated takes a vector of arrays and returns an array. The optional argnum index specifies which the argument to compute the gradient with respect to and defaults to 0.

    - -
    -
    - -

    ◆ inexact

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype::Category mlx::core::inexact = Dtype::Category::inexact
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ int16

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::int16 {Dtype::Val::int16, sizeof(int16_t)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ int32

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::int32 {Dtype::Val::int32, sizeof(int32_t)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ int64

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::int64 {Dtype::Val::int64, sizeof(int64_t)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ int8

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::int8 {Dtype::Val::int8, sizeof(int8_t)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ integer

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype::Category mlx::core::integer = Dtype::Category::integer
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ is_array_v

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - -
    constexpr bool mlx::core::is_array_v
    -
    -inlineconstexpr
    -
    -Initial value:
    =
    -
    std::is_same_v<std::remove_cv_t<std::remove_reference_t<T>>, array>
    -
    -
    -
    - -

    ◆ is_arrays_v

    - -
    -
    -
    -template<typename... T>
    - - - - - -
    - - - - -
    constexpr bool mlx::core::is_arrays_v = (is_array_v<T> && ...)
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ number

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype::Category mlx::core::number = Dtype::Category::number
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ signedinteger

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype::Category mlx::core::signedinteger = Dtype::Category::signedinteger
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ uint16

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::uint16 {Dtype::Val::uint16, sizeof(uint16_t)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ uint32

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::uint32 {Dtype::Val::uint32, sizeof(uint32_t)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ uint64

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::uint64 {Dtype::Val::uint64, sizeof(uint64_t)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ uint8

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype mlx::core::uint8 {Dtype::Val::uint8, sizeof(uint8_t)}
    -
    -inlineconstexpr
    -
    - -
    -
    - -

    ◆ unsignedinteger

    - -
    -
    - - - - - -
    - - - - -
    constexpr Dtype::Category mlx::core::unsignedinteger
    -
    -inlineconstexpr
    -
    -Initial value:
    =
    -
    Dtype::Category::unsignedinteger
    -
    -
    -
    - -

    ◆ value_and_grad

    - -
    -
    - - - - - -
    - - - - - - - -
    std::function< std::pair< array, array >(const array &) mlx::core::value_and_grad) (const std::function< array(const array &)> &fun) (const std::function< array(const array &)> & fun)
    -
    -inline
    -
    - -

    Returns a function which computes the value and gradient of the unary input function.

    - -
    -
    - -

    ◆ vmap

    - -
    -
    - - - - - - - - - - - - - - - - -
    std::function< std::vector< array >(const std::vector< array > &) mlx::core::vmap) (const std::function< std::vector< array >(const std::vector< array > &)> &fun, const std::vector< int > &in_axes={}, const std::vector< int > &out_axes={}) (const std::function< array(const array &)> & fun,
    int in_axis = 0,
    int out_axis = 0 )
    -
    - -

    Automatically vectorize a unary function over the requested axes.

    -

    Automatically vectorize a function over the requested axes.

    -

    Automatically vectorize a binary function over the requested axes.

    -

    The input function to vmap takes as an argument a vector of arrays and returns a vector of arrays. Optionally specify the axes to vectorize over with in_axes and out_axes, otherwise a default of 0 is used. Returns a vectorized function with the same signature as the input function.

    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemlx_1_1core_1_1allocator.html b/docs/build/html/namespacemlx_1_1core_1_1allocator.html deleted file mode 100644 index 35bc4a7da..000000000 --- a/docs/build/html/namespacemlx_1_1core_1_1allocator.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - -MLX: mlx::core::allocator Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mlx::core::allocator Namespace Reference
    -
    -
    - - - - - - - - -

    -Classes

    class  Allocator
     
    class  Buffer
     
    class  CommonAllocator
     
    - - - - - - - - - -

    -Functions

    Buffer malloc (size_t size)
     
    void free (Buffer buffer)
     
    Buffer malloc_or_wait (size_t size)
     
    Allocatorallocator ()
     
    -

    Function Documentation

    - -

    ◆ allocator()

    - -
    -
    - - - - - - - -
    Allocator & mlx::core::allocator::allocator ()
    -
    - -
    -
    - -

    ◆ free()

    - -
    -
    - - - - - - - -
    void mlx::core::allocator::free (Buffer buffer)
    -
    - -
    -
    - -

    ◆ malloc()

    - -
    -
    - - - - - - - -
    Buffer mlx::core::allocator::malloc (size_t size)
    -
    - -
    -
    - -

    ◆ malloc_or_wait()

    - -
    -
    - - - - - - - -
    Buffer mlx::core::allocator::malloc_or_wait (size_t size)
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemlx_1_1core_1_1detail.html b/docs/build/html/namespacemlx_1_1core_1_1detail.html deleted file mode 100644 index e0a8318dc..000000000 --- a/docs/build/html/namespacemlx_1_1core_1_1detail.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - - -MLX: mlx::core::detail Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mlx::core::detail Namespace Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Classes

    struct  Abs
     
    struct  Add
     
    struct  ArcCos
     
    struct  ArcCosh
     
    struct  ArcSin
     
    struct  ArcSinh
     
    struct  ArcTan
     
    struct  ArcTan2
     
    struct  ArcTanh
     
    struct  BitwiseAnd
     
    struct  BitwiseOr
     
    struct  BitwiseXor
     
    struct  Ceil
     
    struct  Conjugate
     
    struct  Cos
     
    struct  Cosh
     
    struct  Divide
     
    struct  Equal
     
    struct  Erf
     
    struct  ErfInv
     
    struct  Exp
     
    struct  Expm1
     
    struct  Floor
     
    struct  Greater
     
    struct  GreaterEqual
     
    union  IntOrFloat
     
    struct  InTracing
     
    struct  LeftShift
     
    struct  Less
     
    struct  LessEqual
     
    struct  Log
     
    struct  Log10
     
    struct  Log1p
     
    struct  Log2
     
    struct  LogAddExp
     
    struct  LogicalAnd
     
    struct  LogicalNot
     
    struct  LogicalOr
     
    struct  Maximum
     
    struct  Minimum
     
    struct  Multiply
     
    struct  NaNEqual
     
    struct  Negative
     
    struct  NotEqual
     
    struct  Power
     
    struct  Remainder
     
    struct  RightShift
     
    struct  Round
     
    struct  Rsqrt
     
    struct  Select
     
    struct  Sigmoid
     
    struct  Sign
     
    struct  Sin
     
    struct  Sinh
     
    struct  Sqrt
     
    struct  Square
     
    struct  Subtract
     
    struct  Tan
     
    struct  Tanh
     
    - - - - - - - - - - - - - - - -

    -Functions

    float fast_exp (float x)
     
    float fast_erf (float a)
     
    float fast_erfinv (float a)
     
    bool compile_available_for_device (const Device &device)
     
    std::pair< std::vector< array >, std::vector< array > > vmap_trace (const std::function< std::vector< array >(const std::vector< array > &)> &fun, const std::vector< array > &inputs, const std::vector< int > &in_axes)
     
    std::vector< arrayvmap_replace (const std::vector< array > &inputs, const std::vector< array > &s_inputs, const std::vector< array > &s_outputs, const std::vector< int > &in_axes, const std::vector< int > &out_axes)
     
    void compile_erase (std::uintptr_t fun_id)
     
    - - - -

    -Variables

    std::function< std::vector< array >(const std::vector< array > &) compile )(const std::function< std::vector< array >(const std::vector< array > &)> &fun, std::uintptr_t fun_id, bool shapeless=false, std::vector< uint64_t > constants={})
     
    -

    Function Documentation

    - -

    ◆ compile_available_for_device()

    - -
    -
    - - - - - - - -
    bool mlx::core::detail::compile_available_for_device (const Device & device)
    -
    - -
    -
    - -

    ◆ compile_erase()

    - -
    -
    - - - - - - - -
    void mlx::core::detail::compile_erase (std::uintptr_t fun_id)
    -
    - -
    -
    - -

    ◆ fast_erf()

    - -
    -
    - - - - - -
    - - - - - - - -
    float mlx::core::detail::fast_erf (float a)
    -
    -inline
    -
    - -
    -
    - -

    ◆ fast_erfinv()

    - -
    -
    - - - - - -
    - - - - - - - -
    float mlx::core::detail::fast_erfinv (float a)
    -
    -inline
    -
    - -
    -
    - -

    ◆ fast_exp()

    - -
    -
    - - - - - -
    - - - - - - - -
    float mlx::core::detail::fast_exp (float x)
    -
    -inline
    -
    - -
    -
    - -

    ◆ vmap_replace()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    std::vector< array > mlx::core::detail::vmap_replace (const std::vector< array > & inputs,
    const std::vector< array > & s_inputs,
    const std::vector< array > & s_outputs,
    const std::vector< int > & in_axes,
    const std::vector< int > & out_axes )
    -
    - -
    -
    - -

    ◆ vmap_trace()

    - -
    -
    - - - - - - - - - - - - - - - - -
    std::pair< std::vector< array >, std::vector< array > > mlx::core::detail::vmap_trace (const std::function< std::vector< array >(const std::vector< array > &)> & fun,
    const std::vector< array > & inputs,
    const std::vector< int > & in_axes )
    -
    - -
    -
    -

    Variable Documentation

    - -

    ◆ compile

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    std::function< std::vector< array >(const std::vector< array > &) mlx::core::detail::compile) (const std::function< std::vector< array >(const std::vector< array > &)> &fun, std::uintptr_t fun_id, bool shapeless=false, std::vector< uint64_t > constants={}) (const std::function< std::vector< array >(const std::vector< array > &)> & fun,
    std::uintptr_t fun_id,
    bool shapeless = false,
    std::vector< uint64_t > constants = {} )
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemlx_1_1core_1_1fast.html b/docs/build/html/namespacemlx_1_1core_1_1fast.html deleted file mode 100644 index 4a2778536..000000000 --- a/docs/build/html/namespacemlx_1_1core_1_1fast.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - -MLX: mlx::core::fast Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mlx::core::fast Namespace Reference
    -
    -
    - - - - - - - - - - - - - - - - -

    -Classes

    class  Custom
     
    class  LayerNorm
     
    class  LayerNormVJP
     
    class  RMSNorm
     
    class  RMSNormVJP
     
    class  RoPE
     
    class  ScaledDotProductAttention
     
    - - - - - - - - - - -

    -Functions

    array rms_norm (const array &x, const array &weight, float eps, StreamOrDevice s={})
     
    array layer_norm (const array &x, const std::optional< array > &weight, const std::optional< array > &bias, float eps, StreamOrDevice s={})
     
    array rope (const array &x, int dims, bool traditional, float base, float scale, int offset, StreamOrDevice s={})
     
    array scaled_dot_product_attention (const array &queries, const array &keys, const array &values, const float scale, const std::optional< array > &mask=std::nullopt, StreamOrDevice s={})
     Computes: O = softmax(Q @ K.T) @ V.
     
    -

    Function Documentation

    - -

    ◆ layer_norm()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fast::layer_norm (const array & x,
    const std::optional< array > & weight,
    const std::optional< array > & bias,
    float eps,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ rms_norm()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fast::rms_norm (const array & x,
    const array & weight,
    float eps,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ rope()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fast::rope (const array & x,
    int dims,
    bool traditional,
    float base,
    float scale,
    int offset,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ scaled_dot_product_attention()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fast::scaled_dot_product_attention (const array & queries,
    const array & keys,
    const array & values,
    const float scale,
    const std::optional< array > & mask = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -

    Computes: O = softmax(Q @ K.T) @ V.

    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemlx_1_1core_1_1fft.html b/docs/build/html/namespacemlx_1_1core_1_1fft.html deleted file mode 100644 index 4526b1650..000000000 --- a/docs/build/html/namespacemlx_1_1core_1_1fft.html +++ /dev/null @@ -1,1082 +0,0 @@ - - - - - - - -MLX: mlx::core::fft Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mlx::core::fft Namespace Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    array fftn (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the n-dimensional Fourier Transform.
     
    array fftn (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     
    array fftn (const array &a, StreamOrDevice s={})
     
    array ifftn (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the n-dimensional inverse Fourier Transform.
     
    array ifftn (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     
    array ifftn (const array &a, StreamOrDevice s={})
     
    array fft (const array &a, int n, int axis, StreamOrDevice s={})
     Compute the one-dimensional Fourier Transform.
     
    array fft (const array &a, int axis=-1, StreamOrDevice s={})
     
    array ifft (const array &a, int n, int axis, StreamOrDevice s={})
     Compute the one-dimensional inverse Fourier Transform.
     
    array ifft (const array &a, int axis=-1, StreamOrDevice s={})
     
    array fft2 (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the two-dimensional Fourier Transform.
     
    array fft2 (const array &a, const std::vector< int > &axes={-2, -1}, StreamOrDevice s={})
     
    array ifft2 (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the two-dimensional inverse Fourier Transform.
     
    array ifft2 (const array &a, const std::vector< int > &axes={-2, -1}, StreamOrDevice s={})
     
    array rfftn (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the n-dimensional Fourier Transform on a real input.
     
    array rfftn (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     
    array rfftn (const array &a, StreamOrDevice s={})
     
    array irfftn (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the n-dimensional inverse of rfftn.
     
    array irfftn (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     
    array irfftn (const array &a, StreamOrDevice s={})
     
    array rfft (const array &a, int n, int axis, StreamOrDevice s={})
     Compute the one-dimensional Fourier Transform on a real input.
     
    array rfft (const array &a, int axis=-1, StreamOrDevice s={})
     
    array irfft (const array &a, int n, int axis, StreamOrDevice s={})
     Compute the one-dimensional inverse of rfft.
     
    array irfft (const array &a, int axis=-1, StreamOrDevice s={})
     
    array rfft2 (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the two-dimensional Fourier Transform on a real input.
     
    array rfft2 (const array &a, const std::vector< int > &axes={-2, -1}, StreamOrDevice s={})
     
    array irfft2 (const array &a, const std::vector< int > &n, const std::vector< int > &axes, StreamOrDevice s={})
     Compute the two-dimensional inverse of rfft2.
     
    array irfft2 (const array &a, const std::vector< int > &axes={-2, -1}, StreamOrDevice s={})
     
    -

    Function Documentation

    - -

    ◆ fft() [1/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::fft (const array & a,
    int axis = -1,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ fft() [2/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::fft (const array & a,
    int n,
    int axis,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -

    Compute the one-dimensional Fourier Transform.

    - -
    -
    - -

    ◆ fft2() [1/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::fft2 (const array & a,
    const std::vector< int > & axes = {-2, -1},
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ fft2() [2/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::fft2 (const array & a,
    const std::vector< int > & n,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -

    Compute the two-dimensional Fourier Transform.

    - -
    -
    - -

    ◆ fftn() [1/3]

    - -
    -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::fftn (const array & a,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ fftn() [2/3]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::fftn (const array & a,
    const std::vector< int > & n,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    - -

    Compute the n-dimensional Fourier Transform.

    - -
    -
    - -

    ◆ fftn() [3/3]

    - -
    -
    - - - - - - - - - - - -
    array mlx::core::fft::fftn (const array & a,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ ifft() [1/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::ifft (const array & a,
    int axis = -1,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ ifft() [2/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::ifft (const array & a,
    int n,
    int axis,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -

    Compute the one-dimensional inverse Fourier Transform.

    - -
    -
    - -

    ◆ ifft2() [1/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::ifft2 (const array & a,
    const std::vector< int > & axes = {-2, -1},
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ ifft2() [2/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::ifft2 (const array & a,
    const std::vector< int > & n,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -

    Compute the two-dimensional inverse Fourier Transform.

    - -
    -
    - -

    ◆ ifftn() [1/3]

    - -
    -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::ifftn (const array & a,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ ifftn() [2/3]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::ifftn (const array & a,
    const std::vector< int > & n,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    - -

    Compute the n-dimensional inverse Fourier Transform.

    - -
    -
    - -

    ◆ ifftn() [3/3]

    - -
    -
    - - - - - - - - - - - -
    array mlx::core::fft::ifftn (const array & a,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ irfft() [1/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::irfft (const array & a,
    int axis = -1,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ irfft() [2/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::irfft (const array & a,
    int n,
    int axis,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -

    Compute the one-dimensional inverse of rfft.

    - -
    -
    - -

    ◆ irfft2() [1/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::irfft2 (const array & a,
    const std::vector< int > & axes = {-2, -1},
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ irfft2() [2/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::irfft2 (const array & a,
    const std::vector< int > & n,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -

    Compute the two-dimensional inverse of rfft2.

    - -
    -
    - -

    ◆ irfftn() [1/3]

    - -
    -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::irfftn (const array & a,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ irfftn() [2/3]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::irfftn (const array & a,
    const std::vector< int > & n,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    - -

    Compute the n-dimensional inverse of rfftn.

    - -
    -
    - -

    ◆ irfftn() [3/3]

    - -
    -
    - - - - - - - - - - - -
    array mlx::core::fft::irfftn (const array & a,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ rfft() [1/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::rfft (const array & a,
    int axis = -1,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ rfft() [2/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::rfft (const array & a,
    int n,
    int axis,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -

    Compute the one-dimensional Fourier Transform on a real input.

    - -
    -
    - -

    ◆ rfft2() [1/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::rfft2 (const array & a,
    const std::vector< int > & axes = {-2, -1},
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ rfft2() [2/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::rfft2 (const array & a,
    const std::vector< int > & n,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -

    Compute the two-dimensional Fourier Transform on a real input.

    - -
    -
    - -

    ◆ rfftn() [1/3]

    - -
    -
    - - - - - - - - - - - - - - - - -
    array mlx::core::fft::rfftn (const array & a,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ rfftn() [2/3]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::fft::rfftn (const array & a,
    const std::vector< int > & n,
    const std::vector< int > & axes,
    StreamOrDevice s = {} )
    -
    - -

    Compute the n-dimensional Fourier Transform on a real input.

    - -
    -
    - -

    ◆ rfftn() [3/3]

    - -
    -
    - - - - - - - - - - - -
    array mlx::core::fft::rfftn (const array & a,
    StreamOrDevice s = {} )
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemlx_1_1core_1_1io.html b/docs/build/html/namespacemlx_1_1core_1_1io.html deleted file mode 100644 index 9779a4e24..000000000 --- a/docs/build/html/namespacemlx_1_1core_1_1io.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -MLX: mlx::core::io Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mlx::core::io Namespace Reference
    -
    -
    - - - - - - - - - - -

    -Classes

    class  FileReader
     
    class  FileWriter
     
    class  Reader
     
    class  Writer
     
    -
    - - - - diff --git a/docs/build/html/namespacemlx_1_1core_1_1linalg.html b/docs/build/html/namespacemlx_1_1core_1_1linalg.html deleted file mode 100644 index 8520bbfdc..000000000 --- a/docs/build/html/namespacemlx_1_1core_1_1linalg.html +++ /dev/null @@ -1,442 +0,0 @@ - - - - - - - -MLX: mlx::core::linalg Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mlx::core::linalg Namespace Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    array norm (const array &a, const double ord, const std::optional< std::vector< int > > &axis=std::nullopt, bool keepdims=false, StreamOrDevice s={})
     Compute vector or matrix norms.
     
    array norm (const array &a, const double ord, int axis, bool keepdims=false, StreamOrDevice s={})
     
    array norm (const array &a, const std::string &ord, const std::optional< std::vector< int > > &axis=std::nullopt, bool keepdims=false, StreamOrDevice s={})
     
    array norm (const array &a, const std::string &ord, int axis, bool keepdims=false, StreamOrDevice s={})
     
    array norm (const array &a, const std::optional< std::vector< int > > &axis=std::nullopt, bool keepdims=false, StreamOrDevice s={})
     
    array norm (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     
    std::pair< array, arrayqr (const array &a, StreamOrDevice s={})
     
    std::vector< arraysvd (const array &a, StreamOrDevice s={})
     
    array inv (const array &a, StreamOrDevice s={})
     
    array cholesky (const array &a, bool upper=false, StreamOrDevice s={})
     
    -

    Function Documentation

    - -

    ◆ cholesky()

    - -
    -
    - - - - - - - - - - - - - - - - -
    array mlx::core::linalg::cholesky (const array & a,
    bool upper = false,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ inv()

    - -
    -
    - - - - - - - - - - - -
    array mlx::core::linalg::inv (const array & a,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ norm() [1/6]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::linalg::norm (const array & a,
    const double ord,
    const std::optional< std::vector< int > > & axis = std::nullopt,
    bool keepdims = false,
    StreamOrDevice s = {} )
    -
    - -

    Compute vector or matrix norms.

    -
      -
    • If axis and ord are both unspecified, computes the 2-norm of flatten(x).
    • -
    • If axis is not provided but ord is, then x must be either 1D or 2D.
    • -
    • If axis is provided, but ord is not, then the 2-norm (or Frobenius norm for matrices) is computed along the given axes. At most 2 axes can be specified.
    • -
    • If both axis and ord are provided, then the corresponding matrix or vector norm is computed. At most 2 axes can be specified.
    • -
    - -
    -
    - -

    ◆ norm() [2/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::linalg::norm (const array & a,
    const double ord,
    int axis,
    bool keepdims = false,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ norm() [3/6]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::linalg::norm (const array & a,
    const std::optional< std::vector< int > > & axis = std::nullopt,
    bool keepdims = false,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ norm() [4/6]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::linalg::norm (const array & a,
    const std::string & ord,
    const std::optional< std::vector< int > > & axis = std::nullopt,
    bool keepdims = false,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ norm() [5/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::linalg::norm (const array & a,
    const std::string & ord,
    int axis,
    bool keepdims = false,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ norm() [6/6]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::linalg::norm (const array & a,
    int axis,
    bool keepdims = false,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ qr()

    - -
    -
    - - - - - - - - - - - -
    std::pair< array, array > mlx::core::linalg::qr (const array & a,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ svd()

    - -
    -
    - - - - - - - - - - - -
    std::vector< array > mlx::core::linalg::svd (const array & a,
    StreamOrDevice s = {} )
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemlx_1_1core_1_1metal.html b/docs/build/html/namespacemlx_1_1core_1_1metal.html deleted file mode 100644 index c9d963399..000000000 --- a/docs/build/html/namespacemlx_1_1core_1_1metal.html +++ /dev/null @@ -1,519 +0,0 @@ - - - - - - - -MLX: mlx::core::metal Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mlx::core::metal Namespace Reference
    -
    -
    - - - - - - - - -

    -Classes

    struct  CommandEncoder
     
    class  Device
     
    class  MetalAllocator
     
    - - - -

    -Typedefs

    using MTLFCList
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    MetalAllocatorallocator ()
     
    const char * get_kernel_preamble ()
     
    std::string get_colocated_mtllib_path (const std::string &lib_name)
     
    Devicedevice (mlx::core::Device)
     
    bool is_available ()
     
    size_t get_active_memory ()
     
    size_t get_peak_memory ()
     
    void reset_peak_memory ()
     
    size_t get_cache_memory ()
     
    size_t set_memory_limit (size_t limit, bool relaxed=true)
     
    size_t set_cache_limit (size_t limit)
     
    void clear_cache ()
     
    void start_capture (std::string path="")
     Capture a GPU trace, saving it to an absolute file path
     
    void stop_capture ()
     
    std::unordered_map< std::string, std::variant< std::string, size_t > > device_info ()
     Get information about the GPU and system settings.
     
    void new_stream (Stream stream)
     
    std::function< void()> make_task (array arr, bool signal)
     
    std::function< void()> make_synchronize_task (Stream s, std::shared_ptr< std::promise< void > > p)
     
    - - - -

    -Variables

    std::unique_ptr< void, std::function< void(void *)> new_scoped_memory_pool )()
     
    -

    Typedef Documentation

    - -

    ◆ MTLFCList

    - -
    -
    - - - - -
    using mlx::core::metal::MTLFCList
    -
    -Initial value:
    -
    std::vector<std::tuple<const void*, MTL::DataType, NS::UInteger>>
    -
    -
    -
    -

    Function Documentation

    - -

    ◆ allocator()

    - -
    -
    - - - - - - - -
    MetalAllocator & mlx::core::metal::allocator ()
    -
    - -
    -
    - -

    ◆ clear_cache()

    - -
    -
    - - - - - - - -
    void mlx::core::metal::clear_cache ()
    -
    - -
    -
    - -

    ◆ device()

    - -
    -
    - - - - - - - -
    Device & mlx::core::metal::device (mlx::core::Device )
    -
    - -
    -
    - -

    ◆ device_info()

    - -
    -
    - - - - - - - -
    std::unordered_map< std::string, std::variant< std::string, size_t > > mlx::core::metal::device_info ()
    -
    - -

    Get information about the GPU and system settings.

    - -
    -
    - -

    ◆ get_active_memory()

    - -
    -
    - - - - - - - -
    size_t mlx::core::metal::get_active_memory ()
    -
    - -
    -
    - -

    ◆ get_cache_memory()

    - -
    -
    - - - - - - - -
    size_t mlx::core::metal::get_cache_memory ()
    -
    - -
    -
    - -

    ◆ get_colocated_mtllib_path()

    - -
    -
    - - - - - -
    - - - - - - - -
    std::string mlx::core::metal::get_colocated_mtllib_path (const std::string & lib_name)
    -
    -inline
    -
    - -
    -
    - -

    ◆ get_kernel_preamble()

    - -
    -
    - - - - - - - -
    const char * mlx::core::metal::get_kernel_preamble ()
    -
    - -
    -
    - -

    ◆ get_peak_memory()

    - -
    -
    - - - - - - - -
    size_t mlx::core::metal::get_peak_memory ()
    -
    - -
    -
    - -

    ◆ is_available()

    - -
    -
    - - - - - - - -
    bool mlx::core::metal::is_available ()
    -
    - -
    -
    - -

    ◆ make_synchronize_task()

    - -
    -
    - - - - - - - - - - - -
    std::function< void()> mlx::core::metal::make_synchronize_task (Stream s,
    std::shared_ptr< std::promise< void > > p )
    -
    - -
    -
    - -

    ◆ make_task()

    - -
    -
    - - - - - - - - - - - -
    std::function< void()> mlx::core::metal::make_task (array arr,
    bool signal )
    -
    - -
    -
    - -

    ◆ new_stream()

    - -
    -
    - - - - - - - -
    void mlx::core::metal::new_stream (Stream stream)
    -
    - -
    -
    - -

    ◆ reset_peak_memory()

    - -
    -
    - - - - - - - -
    void mlx::core::metal::reset_peak_memory ()
    -
    - -
    -
    - -

    ◆ set_cache_limit()

    - -
    -
    - - - - - - - -
    size_t mlx::core::metal::set_cache_limit (size_t limit)
    -
    - -
    -
    - -

    ◆ set_memory_limit()

    - -
    -
    - - - - - - - - - - - -
    size_t mlx::core::metal::set_memory_limit (size_t limit,
    bool relaxed = true )
    -
    - -
    -
    - -

    ◆ start_capture()

    - -
    -
    - - - - - - - -
    void mlx::core::metal::start_capture (std::string path = "")
    -
    - -

    Capture a GPU trace, saving it to an absolute file path

    - -
    -
    - -

    ◆ stop_capture()

    - -
    -
    - - - - - - - -
    void mlx::core::metal::stop_capture ()
    -
    - -
    -
    -

    Variable Documentation

    - -

    ◆ new_scoped_memory_pool

    - -
    -
    - - - - - - - -
    std::unique_ptr< void, std::function< void(void *)> mlx::core::metal::new_scoped_memory_pool) () ()
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemlx_1_1core_1_1random.html b/docs/build/html/namespacemlx_1_1core_1_1random.html deleted file mode 100644 index 4bba38c05..000000000 --- a/docs/build/html/namespacemlx_1_1core_1_1random.html +++ /dev/null @@ -1,1149 +0,0 @@ - - - - - - - -MLX: mlx::core::random Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mlx::core::random Namespace Reference
    -
    -
    - - - - -

    -Classes

    class  KeySequence
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    std::pair< uint32_t, uint32_t > threefry2x32_hash (const std::pair< uint32_t, uint32_t > &key, std::pair< uint32_t, uint32_t > count)
     Applies the Threefry 2x32 hash function.
     
    array key (uint64_t seed)
     Get a PRNG key from a seed.
     
    void seed (uint64_t seed)
     Seed the default PRNG key.
     
    array bits (const std::vector< int > &shape, int width, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     Generate an array with type uint32 filled with random bits.
     
    array bits (const std::vector< int > &shape, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    std::pair< array, arraysplit (const array &key, StreamOrDevice s={})
     Split the rng key into a pair of keys.
     
    array split (const array &key, int num, StreamOrDevice s={})
     Split the rng key into num keys.
     
    array uniform (const array &low, const array &high, const std::vector< int > &shape, Dtype dtype=float32, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     Generate uniform random numbers between low and high.
     
    template<typename T , typename U >
    array uniform (T low, U high, const std::vector< int > &shape, Dtype dtype=float32, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array uniform (const std::vector< int > &shape, Dtype dtype, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     Generate uniform random numbers between 0 and 1.
     
    array uniform (const std::vector< int > &shape, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array normal (const std::vector< int > &shape, Dtype dtype, const float loc, const float scale, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     Generate samples from the standard normal distribution.
     
    array normal (const std::vector< int > &shape, const float loc, const float scale, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array normal (const std::vector< int > &shape, const Dtype dtype, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array normal (const std::vector< int > &shape, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array multivariate_normal (const array &mean, const array &cov, const std::vector< int > &shape, Dtype dtype, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     Generate samples from a multivariate normal distribution.
     
    array randint (const array &low, const array &high, const std::vector< int > &shape, Dtype dtype=int32, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     Generate integer samples uniformly at random.
     
    template<typename T , typename U >
    array randint (T low, U high, const std::vector< int > &shape, Dtype dtype=int32, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array bernoulli (const array &p, const std::vector< int > &shape, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     Generate binary variables with probability to be true equal to p.
     
    array bernoulli (const array &p, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    template<typename T >
    array bernoulli (T p, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    template<typename T >
    array bernoulli (T p, const std::vector< int > &shape, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array bernoulli (const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array truncated_normal (const array &lower, const array &upper, const std::vector< int > &shape, Dtype dtype=float32, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array truncated_normal (const array &lower, const array &upper, Dtype dtype=float32, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array gumbel (const std::vector< int > &shape, Dtype dtype=float32, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array categorical (const array &logits, int axis, const std::vector< int > &shape, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array categorical (const array &logits_, int axis, int num_samples, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    array categorical (const array &logits, int axis=-1, const std::optional< array > &key=std::nullopt, StreamOrDevice s={})
     
    -

    Function Documentation

    - -

    ◆ bernoulli() [1/5]

    - -
    -
    - - - - - - - - - - - - - - - - -
    array mlx::core::random::bernoulli (const array & p,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ bernoulli() [2/5]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::bernoulli (const array & p,
    const std::vector< int > & shape,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -

    Generate binary variables with probability to be true equal to p.

    - -
    -
    - -

    ◆ bernoulli() [3/5]

    - -
    -
    - - - - - - - - - - - -
    array mlx::core::random::bernoulli (const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ bernoulli() [4/5]

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - -
    array mlx::core::random::bernoulli (T p,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ bernoulli() [5/5]

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::bernoulli (T p,
    const std::vector< int > & shape,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ bits() [1/2]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    array mlx::core::random::bits (const std::vector< int > & shape,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ bits() [2/2]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::bits (const std::vector< int > & shape,
    int width,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -

    Generate an array with type uint32 filled with random bits.

    - -
    -
    - -

    ◆ categorical() [1/3]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::categorical (const array & logits,
    int axis,
    const std::vector< int > & shape,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ categorical() [2/3]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::categorical (const array & logits,
    int axis = -1,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ categorical() [3/3]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::categorical (const array & logits_,
    int axis,
    int num_samples,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ gumbel()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::gumbel (const std::vector< int > & shape,
    Dtype dtype = float32,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ key()

    - -
    -
    - - - - - - - -
    array mlx::core::random::key (uint64_t seed)
    -
    - -

    Get a PRNG key from a seed.

    - -
    -
    - -

    ◆ multivariate_normal()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::multivariate_normal (const array & mean,
    const array & cov,
    const std::vector< int > & shape,
    Dtype dtype,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -

    Generate samples from a multivariate normal distribution.

    - -
    -
    - -

    ◆ normal() [1/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::normal (const std::vector< int > & shape,
    const Dtype dtype,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ normal() [2/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::normal (const std::vector< int > & shape,
    const float loc,
    const float scale,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ normal() [3/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    array mlx::core::random::normal (const std::vector< int > & shape,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ normal() [4/4]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::normal (const std::vector< int > & shape,
    Dtype dtype,
    const float loc,
    const float scale,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -

    Generate samples from the standard normal distribution.

    - -
    -
    - -

    ◆ randint() [1/2]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::randint (const array & low,
    const array & high,
    const std::vector< int > & shape,
    Dtype dtype = int32,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -

    Generate integer samples uniformly at random.

    - -
    -
    - -

    ◆ randint() [2/2]

    - -
    -
    -
    -template<typename T , typename U >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::randint (T low,
    U high,
    const std::vector< int > & shape,
    Dtype dtype = int32,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ seed()

    - -
    -
    - - - - - - - -
    void mlx::core::random::seed (uint64_t seed)
    -
    - -

    Seed the default PRNG key.

    - -
    -
    - -

    ◆ split() [1/2]

    - -
    -
    - - - - - - - - - - - - - - - - -
    array mlx::core::random::split (const array & key,
    int num,
    StreamOrDevice s = {} )
    -
    - -

    Split the rng key into num keys.

    - -
    -
    - -

    ◆ split() [2/2]

    - -
    -
    - - - - - - - - - - - -
    std::pair< array, array > mlx::core::random::split (const array & key,
    StreamOrDevice s = {} )
    -
    - -

    Split the rng key into a pair of keys.

    - -
    -
    - -

    ◆ threefry2x32_hash()

    - -
    -
    - - - - - - - - - - - -
    std::pair< uint32_t, uint32_t > mlx::core::random::threefry2x32_hash (const std::pair< uint32_t, uint32_t > & key,
    std::pair< uint32_t, uint32_t > count )
    -
    - -

    Applies the Threefry 2x32 hash function.

    -

    This code is based on the Jax counter-based and splittable PRNG https://github.com/google/jax/blob/main/docs/jep/263-prng.md

    -

    Original Threefry reference: http://www.thesalmons.org/john/random123/papers/random123sc11.pdf

    - -
    -
    - -

    ◆ truncated_normal() [1/2]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::truncated_normal (const array & lower,
    const array & upper,
    const std::vector< int > & shape,
    Dtype dtype = float32,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ truncated_normal() [2/2]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::truncated_normal (const array & lower,
    const array & upper,
    Dtype dtype = float32,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    - -

    ◆ uniform() [1/4]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::uniform (const array & low,
    const array & high,
    const std::vector< int > & shape,
    Dtype dtype = float32,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -

    Generate uniform random numbers between low and high.

    - -
    -
    - -

    ◆ uniform() [2/4]

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    array mlx::core::random::uniform (const std::vector< int > & shape,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    -inline
    -
    - -
    -
    - -

    ◆ uniform() [3/4]

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::uniform (const std::vector< int > & shape,
    Dtype dtype,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -

    Generate uniform random numbers between 0 and 1.

    - -
    -
    - -

    ◆ uniform() [4/4]

    - -
    -
    -
    -template<typename T , typename U >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    array mlx::core::random::uniform (T low,
    U high,
    const std::vector< int > & shape,
    Dtype dtype = float32,
    const std::optional< array > & key = std::nullopt,
    StreamOrDevice s = {} )
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemlx_1_1core_1_1scheduler.html b/docs/build/html/namespacemlx_1_1core_1_1scheduler.html deleted file mode 100644 index 4e4a627fb..000000000 --- a/docs/build/html/namespacemlx_1_1core_1_1scheduler.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - -MLX: mlx::core::scheduler Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mlx::core::scheduler Namespace Reference
    -
    -
    - - - - - - -

    -Classes

    class  Scheduler
     
    struct  StreamThread
     
    - - - - - - - - - - - - - - -

    -Functions

    Schedulerscheduler ()
     
    template<typename F >
    void enqueue (const Stream &stream, F &&f)
     
    int n_active_tasks ()
     
    void notify_new_task (const Stream &stream)
     
    void notify_task_completion (const Stream &stream)
     
    void wait_for_one ()
     
    -

    Function Documentation

    - -

    ◆ enqueue()

    - -
    -
    -
    -template<typename F >
    - - - - - - - - - - - -
    void mlx::core::scheduler::enqueue (const Stream & stream,
    F && f )
    -
    - -
    -
    - -

    ◆ n_active_tasks()

    - -
    -
    - - - - - -
    - - - - - - - -
    int mlx::core::scheduler::n_active_tasks ()
    -
    -inline
    -
    - -
    -
    - -

    ◆ notify_new_task()

    - -
    -
    - - - - - -
    - - - - - - - -
    void mlx::core::scheduler::notify_new_task (const Stream & stream)
    -
    -inline
    -
    - -
    -
    - -

    ◆ notify_task_completion()

    - -
    -
    - - - - - -
    - - - - - - - -
    void mlx::core::scheduler::notify_task_completion (const Stream & stream)
    -
    -inline
    -
    - -
    -
    - -

    ◆ scheduler()

    - -
    -
    - - - - - - - -
    Scheduler & mlx::core::scheduler::scheduler ()
    -
    - -
    -
    - -

    ◆ wait_for_one()

    - -
    -
    - - - - - -
    - - - - - - - -
    void mlx::core::scheduler::wait_for_one ()
    -
    -inline
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacemlx_1_1steel.html b/docs/build/html/namespacemlx_1_1steel.html deleted file mode 100644 index e15e79d50..000000000 --- a/docs/build/html/namespacemlx_1_1steel.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - -MLX: mlx::steel Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    mlx::steel Namespace Reference
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Classes

    struct  AccumHelper
     
    struct  BlockLoader
     
    struct  BlockMMA
     
    struct  BlockSwizzle
     
    struct  ChannelHelper
     
    struct  ChannelHelper< 1 >
     
    struct  ChannelHelper< 2 >
     
    struct  ChannelHelper< 3 >
     
    struct  ChannelHelper< 4 >
     
    struct  Conv2DGeneralBaseInfo
     
    struct  Conv2DGeneralJumpParams
     
    struct  Conv2DInputBlockLoaderGeneral
     
    struct  Conv2DInputBlockLoaderLargeFilter
     
    struct  Conv2DInputBlockLoaderSmallChannels
     
    struct  Conv2DInputBlockLoaderSmallFilter
     
    struct  Conv2DWeightBlockLoader
     
    struct  Conv2DWeightBlockLoaderGeneral
     
    struct  Conv2DWeightBlockLoaderSmallChannels
     
    struct  GEMMAddMMParams
     
    struct  GEMMKernel
     
    struct  GEMMParams
     
    struct  GEMMSpiltKParams
     
    struct  ImplicitGemmConv2DParams
     
    struct  LoopAlignment
     
    struct  TransformAdd
     
    struct  TransformAxpby
     
    struct  TransformNone
     
    -
    - - - - diff --git a/docs/build/html/namespacepocketfft.html b/docs/build/html/namespacepocketfft.html deleted file mode 100644 index c25e5c9f6..000000000 --- a/docs/build/html/namespacepocketfft.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -MLX: pocketfft Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    - -
    pocketfft Namespace Reference
    -
    -
    - - - - -

    -Namespaces

    namespace  detail
     
    -
    - - - - diff --git a/docs/build/html/namespacepocketfft_1_1detail.html b/docs/build/html/namespacepocketfft_1_1detail.html deleted file mode 100644 index 09d6216a2..000000000 --- a/docs/build/html/namespacepocketfft_1_1detail.html +++ /dev/null @@ -1,1725 +0,0 @@ - - - - - - - -MLX: pocketfft::detail Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    pocketfft::detail Namespace Reference
    -
    -
    - - - - -

    -Namespaces

    namespace  threading
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Classes

    struct  add_vec
     
    struct  add_vec< cmplx< T > >
     
    class  arr
     
    class  arr_info
     
    class  cfftp
     
    struct  cmplx
     
    class  cndarr
     
    struct  ExecC2C
     
    struct  ExecDcst
     
    struct  ExecHartley
     
    struct  ExecR2R
     
    class  fftblue
     
    class  multi_iter
     
    class  ndarr
     
    class  pocketfft_c
     
    class  pocketfft_r
     
    class  rev_iter
     
    class  rfftp
     
    class  simple_iter
     
    class  sincos_2pibyn
     
    class  T_dcst23
     
    class  T_dcst4
     
    class  T_dct1
     
    class  T_dst1
     
    struct  util
     
    struct  VLEN
     
    struct  VTYPE
     
    - - - - - - - - - - - -

    -Typedefs

    using shape_t = std::vector<size_t>
     
    using stride_t = std::vector<ptrdiff_t>
     
    template<typename T >
    using vtype_t = typename VTYPE<T>::type
     
    template<typename T >
    using add_vec_t = typename add_vec<T>::type
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    template<typename T >
    T cos (T)=delete
     
    template<typename T >
    T sin (T)=delete
     
    template<typename T >
    T sqrt (T)=delete
     
    voidaligned_alloc (size_t align, size_t size)
     
    void aligned_dealloc (void *ptr)
     
    template<typename T >
    void PM (T &a, T &b, T c, T d)
     
    template<typename T >
    void PMINPLACE (T &a, T &b)
     
    template<typename T >
    void MPINPLACE (T &a, T &b)
     
    template<typename T >
    cmplx< Tconj (const cmplx< T > &a)
     
    template<bool fwd, typename T , typename T2 >
    void special_mul (const cmplx< T > &v1, const cmplx< T2 > &v2, cmplx< T > &res)
     
    template<typename T >
    void ROT90 (cmplx< T > &a)
     
    template<bool fwd, typename T >
    void ROTX90 (cmplx< T > &a)
     
    template<typename T >
    std::shared_ptr< Tget_plan (size_t length)
     
    template<typename T >
    arr< charalloc_tmp (const shape_t &shape, size_t axsize, size_t elemsize)
     
    template<typename T >
    arr< charalloc_tmp (const shape_t &shape, const shape_t &axes, size_t elemsize)
     
    template<typename T , size_t vlen>
    void copy_input (const multi_iter< vlen > &it, const cndarr< cmplx< T > > &src, cmplx< vtype_t< T > > *dst)
     
    template<typename T , size_t vlen>
    void copy_input (const multi_iter< vlen > &it, const cndarr< T > &src, vtype_t< T > *dst)
     
    template<typename T , size_t vlen>
    void copy_input (const multi_iter< vlen > &it, const cndarr< T > &src, T *dst)
     
    template<typename T , size_t vlen>
    void copy_output (const multi_iter< vlen > &it, const cmplx< vtype_t< T > > *src, ndarr< cmplx< T > > &dst)
     
    template<typename T , size_t vlen>
    void copy_output (const multi_iter< vlen > &it, const vtype_t< T > *src, ndarr< T > &dst)
     
    template<typename T , size_t vlen>
    void copy_output (const multi_iter< vlen > &it, const T *src, ndarr< T > &dst)
     
    template<typename Tplan , typename T , typename T0 , typename Exec >
    void general_nd (const cndarr< T > &in, ndarr< T > &out, const shape_t &axes, T0 fct, size_t nthreads, const Exec &exec, const bool allow_inplace=true)
     
    template<typename T , size_t vlen>
    void copy_hartley (const multi_iter< vlen > &it, const vtype_t< T > *src, ndarr< T > &dst)
     
    template<typename T , size_t vlen>
    void copy_hartley (const multi_iter< vlen > &it, const T *src, ndarr< T > &dst)
     
    template<typename T >
    void general_r2c (const cndarr< T > &in, ndarr< cmplx< T > > &out, size_t axis, bool forward, T fct, size_t nthreads)
     
    template<typename T >
    void general_c2r (const cndarr< cmplx< T > > &in, ndarr< T > &out, size_t axis, bool forward, T fct, size_t nthreads)
     
    template<typename T >
    void c2c (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, bool forward, const std::complex< T > *data_in, std::complex< T > *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void dct (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, int type, const T *data_in, T *data_out, T fct, bool ortho, size_t nthreads=1)
     
    template<typename T >
    void dst (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, int type, const T *data_in, T *data_out, T fct, bool ortho, size_t nthreads=1)
     
    template<typename T >
    void r2c (const shape_t &shape_in, const stride_t &stride_in, const stride_t &stride_out, size_t axis, bool forward, const T *data_in, std::complex< T > *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void r2c (const shape_t &shape_in, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, bool forward, const T *data_in, std::complex< T > *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void c2r (const shape_t &shape_out, const stride_t &stride_in, const stride_t &stride_out, size_t axis, bool forward, const std::complex< T > *data_in, T *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void c2r (const shape_t &shape_out, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, bool forward, const std::complex< T > *data_in, T *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void r2r_fftpack (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, bool real2hermitian, bool forward, const T *data_in, T *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void r2r_separable_hartley (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, const T *data_in, T *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void r2r_genuine_hartley (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, const T *data_in, T *data_out, T fct, size_t nthreads=1)
     
    - - - - - -

    -Variables

    constexpr bool FORWARD = true
     
    constexpr bool BACKWARD = false
     
    -

    Typedef Documentation

    - -

    ◆ add_vec_t

    - -
    -
    -
    -template<typename T >
    - - - - -
    using pocketfft::detail::add_vec_t = typename add_vec<T>::type
    -
    - -
    -
    - -

    ◆ shape_t

    - -
    -
    - - - - -
    using pocketfft::detail::shape_t = std::vector<size_t>
    -
    - -
    -
    - -

    ◆ stride_t

    - -
    -
    - - - - -
    using pocketfft::detail::stride_t = std::vector<ptrdiff_t>
    -
    - -
    -
    - -

    ◆ vtype_t

    - -
    -
    -
    -template<typename T >
    - - - - -
    using pocketfft::detail::vtype_t = typename VTYPE<T>::type
    -
    - -
    -
    -

    Function Documentation

    - -

    ◆ aligned_alloc()

    - -
    -
    - - - - - -
    - - - - - - - - - - - -
    void * pocketfft::detail::aligned_alloc (size_t align,
    size_t size )
    -
    -inline
    -
    - -
    -
    - -

    ◆ aligned_dealloc()

    - -
    -
    - - - - - -
    - - - - - - - -
    void pocketfft::detail::aligned_dealloc (void * ptr)
    -
    -inline
    -
    - -
    -
    - -

    ◆ alloc_tmp() [1/2]

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - -
    arr< char > pocketfft::detail::alloc_tmp (const shape_t & shape,
    const shape_t & axes,
    size_t elemsize )
    -
    - -
    -
    - -

    ◆ alloc_tmp() [2/2]

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - -
    arr< char > pocketfft::detail::alloc_tmp (const shape_t & shape,
    size_t axsize,
    size_t elemsize )
    -
    - -
    -
    - -

    ◆ c2c()

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::c2c (const shape_t & shape,
    const stride_t & stride_in,
    const stride_t & stride_out,
    const shape_t & axes,
    bool forward,
    const std::complex< T > * data_in,
    std::complex< T > * data_out,
    T fct,
    size_t nthreads = 1 )
    -
    - -
    -
    - -

    ◆ c2r() [1/2]

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::c2r (const shape_t & shape_out,
    const stride_t & stride_in,
    const stride_t & stride_out,
    const shape_t & axes,
    bool forward,
    const std::complex< T > * data_in,
    T * data_out,
    T fct,
    size_t nthreads = 1 )
    -
    - -
    -
    - -

    ◆ c2r() [2/2]

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::c2r (const shape_t & shape_out,
    const stride_t & stride_in,
    const stride_t & stride_out,
    size_t axis,
    bool forward,
    const std::complex< T > * data_in,
    T * data_out,
    T fct,
    size_t nthreads = 1 )
    -
    - -
    -
    - -

    ◆ conj()

    - -
    -
    -
    -template<typename T >
    - - - - - - - -
    cmplx< T > pocketfft::detail::conj (const cmplx< T > & a)
    -
    - -
    -
    - -

    ◆ copy_hartley() [1/2]

    - -
    -
    -
    -template<typename T , size_t vlen>
    - - - - - - - - - - - - - - - - -
    void pocketfft::detail::copy_hartley (const multi_iter< vlen > & it,
    const T * src,
    ndarr< T > & dst )
    -
    - -
    -
    - -

    ◆ copy_hartley() [2/2]

    - -
    -
    -
    -template<typename T , size_t vlen>
    - - - - - - - - - - - - - - - - -
    void pocketfft::detail::copy_hartley (const multi_iter< vlen > & it,
    const vtype_t< T > * src,
    ndarr< T > & dst )
    -
    - -
    -
    - -

    ◆ copy_input() [1/3]

    - -
    -
    -
    -template<typename T , size_t vlen>
    - - - - - - - - - - - - - - - - -
    void pocketfft::detail::copy_input (const multi_iter< vlen > & it,
    const cndarr< cmplx< T > > & src,
    cmplx< vtype_t< T > > * dst )
    -
    - -
    -
    - -

    ◆ copy_input() [2/3]

    - -
    -
    -
    -template<typename T , size_t vlen>
    - - - - - - - - - - - - - - - - -
    void pocketfft::detail::copy_input (const multi_iter< vlen > & it,
    const cndarr< T > & src,
    T * dst )
    -
    - -
    -
    - -

    ◆ copy_input() [3/3]

    - -
    -
    -
    -template<typename T , size_t vlen>
    - - - - - - - - - - - - - - - - -
    void pocketfft::detail::copy_input (const multi_iter< vlen > & it,
    const cndarr< T > & src,
    vtype_t< T > * dst )
    -
    - -
    -
    - -

    ◆ copy_output() [1/3]

    - -
    -
    -
    -template<typename T , size_t vlen>
    - - - - - - - - - - - - - - - - -
    void pocketfft::detail::copy_output (const multi_iter< vlen > & it,
    const cmplx< vtype_t< T > > * src,
    ndarr< cmplx< T > > & dst )
    -
    - -
    -
    - -

    ◆ copy_output() [2/3]

    - -
    -
    -
    -template<typename T , size_t vlen>
    - - - - - - - - - - - - - - - - -
    void pocketfft::detail::copy_output (const multi_iter< vlen > & it,
    const T * src,
    ndarr< T > & dst )
    -
    - -
    -
    - -

    ◆ copy_output() [3/3]

    - -
    -
    -
    -template<typename T , size_t vlen>
    - - - - - - - - - - - - - - - - -
    void pocketfft::detail::copy_output (const multi_iter< vlen > & it,
    const vtype_t< T > * src,
    ndarr< T > & dst )
    -
    - -
    -
    - -

    ◆ cos()

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    T pocketfft::detail::cos (T )
    -
    -delete
    -
    - -
    -
    - -

    ◆ dct()

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::dct (const shape_t & shape,
    const stride_t & stride_in,
    const stride_t & stride_out,
    const shape_t & axes,
    int type,
    const T * data_in,
    T * data_out,
    T fct,
    bool ortho,
    size_t nthreads = 1 )
    -
    - -
    -
    - -

    ◆ dst()

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::dst (const shape_t & shape,
    const stride_t & stride_in,
    const stride_t & stride_out,
    const shape_t & axes,
    int type,
    const T * data_in,
    T * data_out,
    T fct,
    bool ortho,
    size_t nthreads = 1 )
    -
    - -
    -
    - -

    ◆ general_c2r()

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::general_c2r (const cndarr< cmplx< T > > & in,
    ndarr< T > & out,
    size_t axis,
    bool forward,
    T fct,
    size_t nthreads )
    -
    - -
    -
    - -

    ◆ general_nd()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::general_nd (const cndarr< T > & in,
    ndarr< T > & out,
    const shape_t & axes,
    T0 fct,
    size_t nthreads,
    const Exec & exec,
    const bool allow_inplace = true )
    -
    - -
    -
    - -

    ◆ general_r2c()

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::general_r2c (const cndarr< T > & in,
    ndarr< cmplx< T > > & out,
    size_t axis,
    bool forward,
    T fct,
    size_t nthreads )
    -
    - -
    -
    - -

    ◆ get_plan()

    - -
    -
    -
    -template<typename T >
    - - - - - - - -
    std::shared_ptr< T > pocketfft::detail::get_plan (size_t length)
    -
    - -
    -
    - -

    ◆ MPINPLACE()

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - -
    void pocketfft::detail::MPINPLACE (T & a,
    T & b )
    -
    -inline
    -
    - -
    -
    - -

    ◆ PM()

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::PM (T & a,
    T & b,
    T c,
    T d )
    -
    -inline
    -
    - -
    -
    - -

    ◆ PMINPLACE()

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - -
    void pocketfft::detail::PMINPLACE (T & a,
    T & b )
    -
    -inline
    -
    - -
    -
    - -

    ◆ r2c() [1/2]

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::r2c (const shape_t & shape_in,
    const stride_t & stride_in,
    const stride_t & stride_out,
    const shape_t & axes,
    bool forward,
    const T * data_in,
    std::complex< T > * data_out,
    T fct,
    size_t nthreads = 1 )
    -
    - -
    -
    - -

    ◆ r2c() [2/2]

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::r2c (const shape_t & shape_in,
    const stride_t & stride_in,
    const stride_t & stride_out,
    size_t axis,
    bool forward,
    const T * data_in,
    std::complex< T > * data_out,
    T fct,
    size_t nthreads = 1 )
    -
    - -
    -
    - -

    ◆ r2r_fftpack()

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::r2r_fftpack (const shape_t & shape,
    const stride_t & stride_in,
    const stride_t & stride_out,
    const shape_t & axes,
    bool real2hermitian,
    bool forward,
    const T * data_in,
    T * data_out,
    T fct,
    size_t nthreads = 1 )
    -
    - -
    -
    - -

    ◆ r2r_genuine_hartley()

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::r2r_genuine_hartley (const shape_t & shape,
    const stride_t & stride_in,
    const stride_t & stride_out,
    const shape_t & axes,
    const T * data_in,
    T * data_out,
    T fct,
    size_t nthreads = 1 )
    -
    - -
    -
    - -

    ◆ r2r_separable_hartley()

    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    void pocketfft::detail::r2r_separable_hartley (const shape_t & shape,
    const stride_t & stride_in,
    const stride_t & stride_out,
    const shape_t & axes,
    const T * data_in,
    T * data_out,
    T fct,
    size_t nthreads = 1 )
    -
    - -
    -
    - -

    ◆ ROT90()

    - -
    -
    -
    -template<typename T >
    - - - - - - - -
    void pocketfft::detail::ROT90 (cmplx< T > & a)
    -
    - -
    -
    - -

    ◆ ROTX90()

    - -
    -
    -
    -template<bool fwd, typename T >
    - - - - - - - -
    void pocketfft::detail::ROTX90 (cmplx< T > & a)
    -
    - -
    -
    - -

    ◆ sin()

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    T pocketfft::detail::sin (T )
    -
    -delete
    -
    - -
    -
    - -

    ◆ special_mul()

    - -
    -
    -
    -template<bool fwd, typename T , typename T2 >
    - - - - - - - - - - - - - - - - -
    void pocketfft::detail::special_mul (const cmplx< T > & v1,
    const cmplx< T2 > & v2,
    cmplx< T > & res )
    -
    - -
    -
    - -

    ◆ sqrt()

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    T pocketfft::detail::sqrt (T )
    -
    -delete
    -
    - -
    -
    -

    Variable Documentation

    - -

    ◆ BACKWARD

    - -
    -
    - - - - -
    constexpr bool pocketfft::detail::BACKWARD = false
    -
    - -
    -
    - -

    ◆ FORWARD

    - -
    -
    - - - - - -
    - - - - -
    constexpr bool pocketfft::detail::FORWARD = true
    -
    -constexpr
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespacepocketfft_1_1detail_1_1threading.html b/docs/build/html/namespacepocketfft_1_1detail_1_1threading.html deleted file mode 100644 index a8f72093e..000000000 --- a/docs/build/html/namespacepocketfft_1_1detail_1_1threading.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - -MLX: pocketfft::detail::threading Namespace Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    pocketfft::detail::threading Namespace Reference
    -
    -
    - - - - - - - - - - -

    -Classes

    struct  aligned_allocator
     
    class  concurrent_queue
     
    class  latch
     
    class  thread_pool
     
    - - - - - - - - - - - -

    -Functions

    size_t & thread_id ()
     
    size_t & num_threads ()
     
    thread_poolget_pool ()
     
    template<typename Func >
    void thread_map (size_t nthreads, Func f)
     Map a function f over nthreads.
     
    - - - -

    -Variables

    static const size_t max_threads = std::max(1u, std::thread::hardware_concurrency())
     
    -

    Function Documentation

    - -

    ◆ get_pool()

    - -
    -
    - - - - - -
    - - - - - - - -
    thread_pool & pocketfft::detail::threading::get_pool ()
    -
    -inline
    -
    - -
    -
    - -

    ◆ num_threads()

    - -
    -
    - - - - - -
    - - - - - - - -
    size_t & pocketfft::detail::threading::num_threads ()
    -
    -inline
    -
    - -
    -
    - -

    ◆ thread_id()

    - -
    -
    - - - - - -
    - - - - - - - -
    size_t & pocketfft::detail::threading::thread_id ()
    -
    -inline
    -
    - -
    -
    - -

    ◆ thread_map()

    - -
    -
    -
    -template<typename Func >
    - - - - - - - - - - - -
    void pocketfft::detail::threading::thread_map (size_t nthreads,
    Func f )
    -
    - -

    Map a function f over nthreads.

    - -
    -
    -

    Variable Documentation

    - -

    ◆ max_threads

    - -
    -
    - - - - - -
    - - - - -
    const size_t pocketfft::detail::threading::max_threads = std::max(1u, std::thread::hardware_concurrency())
    -
    -static
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/namespaces.html b/docs/build/html/namespaces.html deleted file mode 100644 index 225ce3ca4..000000000 --- a/docs/build/html/namespaces.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - -MLX: Namespace List - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - -
    -
    Namespace List
    -
    -
    -
    Here is a list of all namespaces with brief descriptions:
    -
    [detail level 12345]
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     Nmetal
     Nfast
     Nprecise
     C_numeric_limits_impl< bfloat16_t >
     Nmlx
     Ncore
     Nsteel
     NMPS
     CKernel
     CMatrix
     CMatrixDescriptor
     CMatrixMultiplication
     CMatrixVectorMultiplication
     CVector
     CVectorDescriptor
     NMTL
     NPrivate
     Npocketfft
     Ndetail
    -
    -
    - - - - diff --git a/docs/build/html/nav_f.png b/docs/build/html/nav_f.png deleted file mode 100644 index 72a58a529ed3a9ed6aa0c51a79cf207e026deee2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI`!2~2XGqLUlQVE_ejv*C{Z|{2ZH7M}7UYxc) zn!W8uqtnIQ>_z8U diff --git a/docs/build/html/nav_fd.png b/docs/build/html/nav_fd.png deleted file mode 100644 index 032fbdd4c54f54fa9a2e6423b94ef4b2ebdfaceb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI`!2~2XGqLUlQU#tajv*C{Z|C~*H7f|XvG1G8 zt7aS*L7xwMeS}!z6R#{C5tIw-s~AJ==F^i}x3XyJseHR@yF& zerFf(Zf;Dd{+(0lDIROL@Sj-Ju2JQ8&-n%4%q?>|^bShc&lR?}7HeMo@BDl5N(aHY Uj$gdr1MOz;boFyt=akR{0D!zeaR2}S diff --git a/docs/build/html/nav_g.png b/docs/build/html/nav_g.png deleted file mode 100644 index 2093a237a94f6c83e19ec6e5fd42f7ddabdafa81..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^j6lrB!3HFm1ilyoDK$?Q$B+ufw|5PB85lU25BhtE tr?otc=hd~V+ws&_A@j8Fiv!KF$B+ufw|5=67#uj90@pIL wZ=Q8~_Ju`#59=RjDrmm`tMD@M=!-l18IR?&vFVdQ&MBb@0HFXL6W-eg#Jd_@e6*DPn)w;=|1H}Zvm9l6xXXB%>yL=NQU;mg M>FVdQ&MBb@0Bdt1Qvd(} diff --git a/docs/build/html/objects.inv b/docs/build/html/objects.inv index 62853102ba4e5a22ddefef345a650fa254c3a234..ed621c6f70bd9f0c1326a9121398a328ad5063c8 100644 GIT binary patch delta 23997 zcmaHQV{j$VvTkhKwrx8Tb7I?evSaPowylY6dt%!YJCir()T{gFR^4B#YOU((ue(<3 z>)&0ViQS+HeBc~REQx}GfTp9-M#@(MLlsj#cI2g2+AZdm8?I!TAB_AIBSS^<4;v&t2%=0g}oOu9xt;zus*< zLLSho*8+sJdN6QKrPdEW5!jHVCd+uOnxL$D1kM5+m9qk}8$!;%zvsR)_W^uHViU7e zYlL|}sbw{(QD!bOWmc&wR>{|{V|+dxxL1}ZNQA#nv~xxMc$&7$j7Bcxf7@bc^MXDH57c+$<*&4|dpQwA!K(I5kWu8qH#io!?=w~GR0+PCnirD<;a|@rzDXIf6 zriu-k=xcPVrm#+fkF^?2Y!4V9^ndh1gn!#Vypg1d=t$&JK50u89&=2l_iI5(#NR)y z>RGI|sNi!IXI9t_C?2k;Pg6FgtvaYYt;{=WL#D5?7^2x~H>k9PYs?hInq%#`xlae{ z8!WhU=yyk#0qFDzu$ZQJ1EC~k!*eISytNh`<^tKrISAdXDSs}yICK77aNUPWVU8<@ zl3!}#dbl;4Yy_!R5P{jBA-yam%|~=0$V*ZTLA{p;txboleHd)WOLRet)|#_Ocv?&- zdtylb_jtLE(PDtrVqEqVlaj0)XAC=8LZyq}nKGONC<&&v4PLDdLjOpSeM0?6fjw&W z24*-^&ON3XLFh2Ub#6B+S@{1b(*vc`MxkE~S->k$F*p^kD?IVqfpvYu(7Wj7DI_2Y zCDQ0J=%uYufdHOvFDoR`Qr`s7vIwUTB!LS0l+^A zxzn%yDk?|*CAYbz+}?gjZ_YhhGqJIZ^7lgsD1=Z4p6nz4hi(s9K}FUXmHOPMRGT8E zKNf|*0=%-_wpykk@Ks{5060~zAZP7Wp?}4|>Q-q&!Zb#J3SFzS!xbAnk5YFpCT9~o z0wXoEbHl0($(gbSl0RX`ZW|1&Ui(W?yNzM)7fVO)aJEFxATKmZ*XZq_b zv+PI=ST&<4{#=^*r@@99MUwqdE)JgbBhywFA&Ytyx7%HR?jIuT8XU)#0MjLQmHLdR zcTTqb`Kk?8l>jIzjdN`cyNXXcJ0GeGOm>w%DJnf3jV`Lmx&9J5!Rlzl)cjb5If)(< zstZo`#G{$9ZY+FFoZr8;A5ijj4acm)cEw0BR2G=`@!kKIrRuol1rO zCZ>EnLelG|#+1AG{8G@&Mx6E(8+~Zi$_v^&GX~f%10)@q1ZR@Zr7T{LY{gPD27UtvuJ1!ss1k3=uEJL&AGE}O&?RAx zbH9{#7#Ie1zY1bj0I2VqWVFfQJ}p~77UUdl+|tX&$9R>~hn!vAqV^gE80WZiMJFeM z#?B2IX;$Y}>c?ue#bcPG#;%@t5eEWPgDy*h3}ae-A@wJH0WVxX4NDg&|GwMi{aM?) znp@jx(`L9PknCZSzJ#flb2iF39r4glN(EMKa(6O~Nhdny|Ez%@YZvD6!+9Qf_JU3u za-2~juYWE#2+9<+l=QcFY{dLk_%e!_nz`ioQ~eZJS%TYYBx!G<6`R`P9D5C{*6eqT zi^v5T%XEDV0vN<*YFfD0TC8RLb}!P+`K^&<>Z$qj0=~Kxm&?jM*FvjE!+pa}l9aA_ zDNoUG&*4eiUn=rZ&YOQgoR9A0aCPD8vcCCay>r2PZnuMkSmgzCDuoNf547|>aj zu4MlTo@NF5(f?X?TRFFixzvkT{S$NQt)~L6@q--e5kQvJXCjO4KfS9vH{<#j+6KY0 z)bp5F=KTHpyR+A%t8|3gP%KfX;Fdm(o^kXYZ1M>;>?hOekY%wTj0|_vwA-uvh8hc^ zCNrePBklbiaM{|kCp+->RFGiy@13*M^Wp66nZ1jVy*S^YO+Z)5Y8MJRBi?Z|DjMB! zs{)*p0idMIG`BBOW1jwwtjdS*>Ue7CDqxMN6c+CnD^9U0ehBSt_oz{{P&sRc39|uF zL=}g&Bdn5a>@AHa9-1?48{T5Ugne+Nk{zbR_F{WCLAg9mzaCPpq6{(wWhn7s)Osq3GYL1&y=Bk(DIc(WSYpKtcJ%DYY zq!F&0OKYx`EudYB-L_}gRU=bi?|y+l{0%&q(0_w6$Ie}PerAayLHm&yhmbyOfVr)W z2*~viWyI|@Ab2|t7}PktaHB=6E~f@kj~Q9doGN)uh6_n7bC?UHIvsoph@E`1UYZkH4pPM`umhatA_xG{?+0Zl6rf+4q)Ij2)hrdb?>aT$QX@md7#pIKJ7;)K?yvH zaC352Of%pXt~Rr9#7E3x+xJS}+$1LH2~_A(Q&ie%58@ctF|I>hQM z&dDN<&i!pi^th8g3jGrYI4x%QcGkS%mfYUJfn{l7-gAfA2(P4{2bHUbyf-m7b4lk8 z#Rb1fo}hLRUWr#c8Cz}8YrducI_<~uVys#)+95-5MUv`8OhErGh>-fotzF(gyoEg#&?=Y)_-c-|#^>sf027M-oD1SJ= z!En+UZ&s(@u#-;-1KKv<3^-rl8<^CQUbk^FH*QmwNnH3#OQ!!$gD9;))USf?X56qh zZsWt!ft%OutCSu6&bWBWaAAt3a+IGGh_$MX6^Ia@@LFuf(+iEjc znycVwtMn;YE#jE-O?J})PF4KAF-y_DoRLTNF>ct!sRcg<78$8Y=FW)K+X#YpqG-M$Yt7s@}MfsHXvHeuxB{2 zVKUsH;&|W+dl!)VH08lmAE4&MrxZAcTUTdlezJCKNI6TYy^|ctB-+^p20#*}b%!B1 z2RF^Ce}!9-Z}<^J?w*d}X@fy>J>dfUd`8*wH#lgI0sOYrE(5`coQs%sa_gcHQh#DM zm~;=3wEtGN?m1KPA_5)2mlP=^WX{&&)OqkXY}sUuLG@;j0b|Y2Pr3AuJkF2eiBGNh zQVyKV&d`+F0JAeQ!80F3t7QJf?VZ?8U|>dzHs1vsO;)Q+$F+B7w?!~++NS)Y`GVAB zB1`1#l%Vk*hgv3I%e3kTYLbS?)3FNkI_3)FZ*!pQg3I)a)C)WyqP)c7S+A_*sv;9K zuLjnj9+WAjRnCiTdyqxy+70SPm8SzKl1)vy6Z?85QEg0lQq|_>WlLVPY>K~0U^LQ^_;U~tG>{7NHYCbaq zK3esa!Ae-uMomUg$&zfZ09=llzhK8G{V+kXWGFVaXtdf;QAMh(NGS|pkAUp;!Y_vs zNHo?I#yJSnKKv<|nZGfXRzzuh$w$Z}D9RS&5Qi*Ts5;F=bMpcW?#UP^Bmnbpd6wrl z`TObuxIiAWn6%-44^b!)F|a)+MuIizoud|@6+uamax~fvp-KM`ScbID7-E6%naS22 zP^kZDzi$qFwS!QwNGfGZ7RbpwYMlP`Wasa(m3oIo6<-&YXYrVkG5+hBl}Y$tougJ3 z9zW`NwU944HEt(@aRKuGF-{&TcEdt2T7>qBw!{pVV(9H_do6_tQ$k;biiDpv3)>`u zaBfL}MPVmW-{VI!uTi`$m-hQV-^r&NW1eMcCJV-ri=OF^ofOu$I^;mp9-1}Pm` z6J=02wm=D0t`jtjab`1onN0{#$(^ujQ^bES)#N&k>4A~~!r7#$a5ftYzX6N?m+#Hl ztaz~O#-QZrBKhQ~NOb=LYKiFogNpV2U!dfP6d1fU;>naXKgtu5BoqD`qAS%AfEVyk zqKizBiG1gariH)2K7#^aw6nl|q=B+cE?E^OuyKZ^2!y+FeB9>jQgN)k?vxd8?aD(a zu7K5HLkqDaKU^^-ZRfx~A~DqeO>E0Y(!=}cc6|=FP$=?y4~YaOogP}H6!*Jc9;3!- zKQ%+_4?S_HMV-GF<@_>W^_+Wq_73UWKn@Rpg}a`NH%t*yO~(eb@<;zXGm3Yexw4u< z{obL>%Ps&+dp~^sczVNG1%Kkr_G*H;{7KXK{tI{oY#4pIf70N5+pFk2xt*cBgY@963 z@;In^kz(!6tTPPWSiY_(Go%Ycu?{@B6O9&dVa`9cQQGC!$fT7=99Ls?18zSv!*JSC zOn%Ob8eY-O+V>O|*;6}t7{nniVy>m|6n_cw5PL^Wd9`P77J$+B&CObrrZHX zvET=)Gmn4n)9D8~qEc@6Ldg+VW)k)(@`9~QPYeKH3iY(YVIK0*^&feRs4XVmeWU<_ zU8>1ITMW?DOL(OYmv4*LR*$4IO8z`2HeQZ2zR2(3*rPfB%Q;YmCzOolt(H`xOK7F%O&-nLj6hIaB@9( za^4*8H@|kN^ayBHNmWkfV%4(|d5Xv)#+og=e4O`u&byf_O}+|kV(4_J2-FmMsWpJO zMm;zrgDazU^u}I4s(=yqVGEeVmFYO1gxE!JZKuIqHiR^8VVu6#Lb0h;^M*`h8)3D|ws;u!+K^3kkC#W{C3Z zVs>?C>0PHJ)Q!GYO~68*5xq1QRR~5>D$5Qm%n4%)u1*hOpD5NnMJGwY=R)YeIPTAz zxoGgp3oQIy2&&hEv&E#Oz%~44FZP5~-)IO_Q6#KcMOArDW5^j>Uw(Md`3~@|H59Bz z?Ai=@?0m~r`j*K9Obz|XJnp!PKWd-sc-`K3DtjoJHkr)p@9BCjbxGzZeEWTwGFp8m z^1I?kU#N>WB4Y)gO3YD~`2(L%!Y{VA@@lME+X_+5XtNhX1?Dh?zy3DYzc4a2tEcgr zw=woL&BSHtfQsO_Q=!Lm;p<|9L2_sXeo1vW>fk~Sigo`vy2xa2yqp(PhsZ`X1%iUDQD#e{pbl!5@ z5WXDQoEe%2kgrvzf4@`q`2{iS%n~CAhDRmW5l51D!|L@AY$a+?B^QdO|D*B}G+f7h zRAfkF98TbsWPgIPpNBUOxC-LYvT)9PgBP3}--1kdc_)xvK(|msE{7s4+p3>cV@xz1 zFEl*%B+@gW(|PXIgj8v?_6SG$Q^jbT&0v?{OhHW~Yhfb*Jc|$6QB7FBnnMkMfk%88 z!N&P?RocpBl3eh9Dh-Wf6fq{vO^Rm+QgE&Y7PfQ($N=l^M6iOL1Hp2X6W5v`UR9hY z7c8USVEQc-*bIaB4eOJes*=WTFWJ82tU5(KZYe`3uDBPNIB~LSjmsrQMXov_m)ojmJw2k8wkNI= zzm*<%ZK0f;HQ(QtoGB_E<(^hpOi*eNn&?yHjk@^jJZ4srY~4znDmRzoKhv%+7yD^( zIr_0}RtINbHFgNPq`qc1N7U+}+`-4nUH+TRJiDU4eglo6a%N_mBn{Ct`Bu(MdZFa~ zhb=(#HS+F?PU$ZSMttfKJ%;Jm#}VspruVsw!OH!N|_y$(og^qSe}MzJX=;ejxmvcN4MY)o17k>TBy7C zuvUktW2r{B)YHFhGp8Y52&M#KMys*&&%h!~iWbVoviS>0&T8!6^1Zssylh)Md$Z%U z;+=^LM2@mIk)S#~G#ll|^Ks$F?gY}LX{!|fy$G8($e2i<(4)Y|^*key>dH9-G{6rW z@exewU702R{5coE4ZU@w5Svze4rejRzV$ zxoCE`<%o_qts@Lo;oiHs+>j5zhzKB({KEOP=}-1i>m^fM`EtH>{^IW1vQkR2*H2dB zyyQYPAA=(7GQjce`*_sQ(LAVLN*+3`Um~ow4I~oco-@BYMdar)_uu-X{q#2HIl({p zjdS4lYkge1WJU_?1~Tx~Z@3j6kDf~HQu(BUGyDb7cDS`hXsLx?PN5Jm``ZJeulk$T z{gUf#74-9ObXjGxwnd2C@#gP**gVQ=5dZJecO)>Oc>Ev}uQOC|OSz^WgC1 z$%?(`If@do-vLIB(Tobknqsi2Wt6oiy0DDP?1Y!vh*b5x<;J37@K5q%i)WN=sS6Dx zg<&pdT5(ucnMh@`N16tJJ(AaJ6kJFK_||N2y5q73Cpb~Ud z5z4}#Ise;lY8PL=C~M;fsf0`Y$r!MeH%Ip92ZqY9oz$aeh(uPN%`8wW-Qt7@-h>EN z8B3@lb|{!e+}Z~KSw&c$vBVg|nE{K7Z#tWgNT(nX`{>8LWJ|T0`gC#*R=bSQ6!T!B zuQGLc#PM4I6irD>f-6+T`X7O|6l=_OmRdKbR8aAsjQ%4Xmayt-c)`je~*tp3NSns&8BAxd3Sx7wa^Apf| z_CO4pQs1rY7jh$Ovf4{KVoYKV$fD$L%w(0?ilQ4Z+@oG(DGkN5 zQM#l9UGsJjO+3~J#G89-#{I(W zt!u;^vR?h!tS_6*V-4vhg5MdkoUS%NWbKP@?gNQ1xNnI-(z2cgOdz@)Vi-oY8IMi` ze2Qioz>=eU{NyOnlt7lsujoNl2Ptl4mEtTBEV9JK)Ki&n+JdVHw7I8ROO8ZiU}nR^ zfJhO6v}d-UFMvYRZBosRLAz02d{~>H*}pJ#SwAsB@=8+``TH*BGM}gi+JugK@OYZT zHLh2hlHjfYuI6Bo9)F(uKvx<(jjH7c==+f`N8zhi?aWLG&oj z34SkL3SDFPiXb6VNqPxhJY$(_uI@x>|C)H7%A$)msfoB~??cv4!!4lS%BK>DWJ3}W zd01hLb2_XY0!+YTk%p1cFT0G24a72MhsH1=FW~U}r#HOY0gar*hCA|FyIB~JByUY! z82T`?Wfpr5cDK`++T(olekccmeT5|IW zdyadaDQ>}e4QWR7S%}~#z_qK9ziu+|QtW{^l(r8aC_jmfQ!Yr>J|Z%FKy-?_cN(zM z{v5?{!I+m`eD{O5uZ|I8gj-tVFV?Ki53P ziP(}M)u2>8!CX8(kVy=#zo~$+bMg@{<7QbHwHi|ulqhP6uQm|uOa$Qii2OqsumU^M zco-FNPtNFD8weNK4k_CFZ8YoiHg5CwhPgYRJMF6t+5JgGLN9auOi=_u@73{5hpM4M zNCCq)7L;JJ-Puop*>P0 zvY<9=kqMUeeI&^a{sy3^jHrXO_jFXUgLv%z%8RaA4+8jXtB-jkljIxbzo7UunI>8e z^ET+pVm{9BVw8(@c^Pnz zevxB1imrjDE^cEuGOk=D796L_Wvl&mt(&G&BQ{}fft*tkFMx^YteDN@-~HcGBcBS; z%QyXEYE{;)*9Mx9%tt399h<}vi|80`y8$${MdNKBNnFQnXeuF?5+!1=;t~si0_ZC0 zn?aXswvp&@)Top=Gi+84Fr@L7odYR0m2Tk|E`BovGOlj5o>sAerMwNA+zkFo!AW30 zNOYjBQ*sYavH=$q?Rf=g8FsiWD|?^ju5fFzQn1o$a=gGLVN$D@5@A9u0Mp`W6+`5m zrII}8MgUf7Ak~ts(Ys+81=+Ji>K-IwgL24!U}!$QZwtV!Xv;v#Y~^iNaGSU78W#1F z^uU#oF%h+a*%VxQtAS-a*HnH6K*7@e47rM=;pdzNB*M6=_jfmJHwt2Q6goU~rmBnm zOp>v1V#xVRk{`jo# zICyUn3vyQ!g79AdtDe?%BalxzuPp(6GCz<*x@M@IEcES_70UwN6^YQ_+mWNqA^tAq zY;yMqSR)ovVt?SwV90$4j zv+MuO>`IX719Qg?xo-(6qCte*qUn!{8~9ZmNNiXV9KM>4Clc^|lTJKcXm&vwDqtzD zc233yF$KR6s}L?@{|-8he1-mdT3^D=2#HW0u%I6>-Zj)6&hz%AV(`{*G?uFza<%D+ zmsr2H-|}xgiyINwOU)JCVLhoJtv?s~hx9CC@zigO{z<|45W!NG@czw=7}4FU_s=`i zl&1@Qm)n3M5)$HvrooizIn!XKNPRdu{AwHjK-1f=_4F0Clo&@LI9_|fh(hXG(~R1` zfY1}j%_+*?9cSDJd~qS&Y=#BzmMD7W?q}B$PghNUtS73GVZribT z%h-Z-;BGlM`$zS&AI#ZlM%mG{)lR? z-Qv0UjPs!vHcON{`Ick(oBo$pZ-~{O1i&BoeQqi0tiO2#p77202PAV}9ohWpRz3Y% z(Fx@90r`*B&XKGU%;RA^L;^8@04%{qR2x<}UD#hbP~-x1m|qp=K@oGb8=W|=snXpb zj&xqq0wz6~V^Ra}c%+fZb=E^T)xE0+c->3Cn6x54rW~GPzOp>0VbD#DqGuNF1c>E9 z2~6+-xdZ0RrEJnb6n;F0LIr;FE!zR+N1*6hnukGtT*WQXWIwcMew|jYf!Oe)+g5{b zl9*IXD!H;M9oSfTiw_pR3dWF5OgAZGjIdXGeJ#-B5r7$lLO0y&!rUv;^V$|@kIr+H z;mdN~c>L5fXYXvYM);KSOEGq{1tf!pxr8k7&NOG_hFG#z2^!3;e9~2q5(x_nhSvy5 z`Umj0(Tq+Sdyt;}DCj{f`&%VQKeUnO#4Y@4CM3F+Z%9Dio_p!dmVb3VhZ&2y^%kWB zA$>QxL~ux=ihx4}yR%TWzwOW2om~~K>v=q}Wq97jUkm{^cMx@_=#3c-E2yc82u#k~`Im$SM(A+ZYix)TDbF=)e@!Q#I-ld+@Nuw!a$W{W~OC9Hw; zg#Npji0>3`G~LD1&UE;LvX*)>YvsCW4I@^()H$4EmLpcK)H#CVCLuguvj=L*T&d)# zsY|jA7E3j8o3RX0^O&lA3xKOvmn5g+bAWbBUxt_$33Lw8=<#jU=Z16=4!f1me(uoc z?X*10iTP|>*{ZpPBWEjHyy2yt~6|q9`c2at~ZOoBt3C_2I#<;Dp4ACUmOU& zgh*!(nNo3~eQ?i%+=zVOnBQ*Aq#o?e%#P)z(rat>S2|hp|5_JACu=@$E+0FclP|lx z!R#dvB*+a8$l`~t&EMft4i#9Wv8?7)+k5#;m5JA&eBs)?BKKz7ky+dfD;n$F9=tQ_ zjVSJelt2cs1OJ){0AhEtL;A)XeAqKg;c1mzf2uwLIZUf)EKT#rml~rxwtZI)y%*hi z3_m2Y8+!6zde~r}|2~vu@jm#Z63rH;Y%2V*Ld1Qes|)YV`;iG*%U8JATWuR;#ll=- zrIUKk)?5^X{pn4Vilr!>I|+XUao;=VSu>eEhyQi}>cUx&1_&r*z(01MigV9xHc`9s zh_`SJEG73Jg&`p_?+UiEj*F@wD(eV5v)cJ{^i>vr|ETOH!T+I>gdUs*vaK4Bcwn3* z6c>j8v)R4Y|J*CBAoQbBWC?8*xvhsiG|nVwmg9HCg}*iz&3?q@Fk?boU8M_x&P=hH ze+KC9fRpz%1Hdm1j|~0-q7+lwyUv8XVGx@-lOH`tLq<$GEP>UQ7n;>>zWp!rZ-nkb zYJGa8yMEA8r`_YH5!;Pfjx^ zYxnd0pdSi8Pk{X^-A3CCv0d9L(jYM77&239HBDq^Hvoz$#p!*f0;`7dN5uR~@%(oH z!pCm$-ejJFNZ+5Gp4HuIPgJ~Mfbg31n(y1(L;m4wx^Q`rV)pY~L|ZC910v_D37!>c z`X_eb4VSX~eXN}@l^UG~1^v=F_jnSmhOdP$Ea2~c?)2)Xlo!}MTKC6C+rt294P+Xz zza2i(F~C+%kDb z%o?}LykBlGg62;{OHMKQ%aW;h+bnyA@2(*G?ORvw>yPYBuj}1oq-UXr-soB1Dqy-hxd%B_ja{n7Ng)rx54|>oeUuYt zH;)K!kE8fB1Bx4bZ|MqEnY9K<%Us}Be}i*a$FGtxs@;i7Y*Mb4csWGKU;QUP#kb&M zK^=rnW*$!Zvre_=e>yYDhB=SDCZz=BU_EP1Go1p@Fmp68@uaqI>pkTSJbmne*V(Rv zeSmRdM~X+?Jj?ak{zePkyVGX6>?xfM>zs5|rP}4C?4yi7ubc1MR~~IR9b0-Xe?K*| zFDm8SlM<&oo5pv`e7(^ZVi~ZR0a*D*$Gq2ygY*!gc_s5|)Q_w91&#sz&D_=*En1_d)R0fJpC>kfl2yAo!hohKn(nUpih!lRcAl->vdGZ4o<4VMschxa z_BJSyRh#0p$quu!%n)D0fWdg`%p&SgnLzs^6*>2n`g(qdw~tD>zl?wVK7gMOGxnH| z?i%W|n~rhrYB#$9o|xmnHetW-?-rJ8jjINZ3Fodb!oHAB|IL9flKh^p=f^7rPr$m- zw&JqeOQ5w2m%Qhs$;$yObKWe-uE*TYq+@CKWnK?z{>I44`yBPp<|ISqI`i;%ol75;tfJvaddXY>R-V@gh?867~jscPW-E&t68u*+NCGF42{0+gMjsP?b zIwS?iup?e9bJW&+RKZ{Cefxj7?*Y2elcB5lvfs~bhC4KNkP{_2h5}DV-yU3H>6kC? z|0d@9i&dqzz0-32yl>KPzvk5J3$CUYyDP?KySX1Gy2G?{s@&+ABia;ts}o@PBV>5z z#)}m@K^@v@6j5V`G!_PX(bKN%b6B!ia3W?LEW*)tC+h(jE}I@pYq5k5&;V3;Q&fmT zIS9FKjt0MYT}3lpV~pWmd&@?27Yxx!Ya>x3Xpa+@pY4rvc0^Ftds5bD5?C(+@i1v` zg(KqJE#N0!b;r?x@ac`A-g(4S91RJLy;;>R_=v1htxSsZ+;6Sv*aBCA? z>mzT`JxSvOUE{QOS*!?S5def-CLv#CB!hNwBVmckbVsV!{F0JC9*$hk_;F%BZ`~n3 zEl^At!}$tg%aRF`0g;_sVJpy=_M!0SxZdh>4ny=jD_J(o=oLv27i*^)##m-{814%L z^tu_T2K&tj*oAiM45P4{8h51HV<=6tK)yCBDnpBRT1hK4+fOIqTL2pUQ*hG8=y&mG9WM(<#oo>5G6FFXVEoJ-#EXQVY*Zkeyz)(7>ZqBXwi5r zi3IPJP+0kvmR>T0&q@r3kPKK|X`}LipfeZ^vzZPe+99}+#*1-B6P|QowJpSu3x^Jr1{K~} zTI0by4lTz8v$*-MO^pM+twc4*aNyC+W@jO;jHe4o9^sRx#rAngXCT(e{(YHij^;0Q z2*s55Jk!DUEiwUoNJIXJ!=8nM-3P8I2g|>P9L5t`b0N5XPp2^?fOypE zucpk{Km<6No{L8Iv+x;1dk?!V3;Jt5Q~F16CdBy z-rk@QKnv@TA63$x&0)BtFBagebYsLVxAfQ~V4HrR3jt1n>!=iUZIZN!{gZC;7jEdY|cFDvK1?_f3 zpmP#8ohvh6lAJ|(vw#iZY)&v{7Ue)4>NfV1`ji0=DYk+nixCV8KZa2X)hoFr_J;b7 zKO<_#At%r4WQY@YlY&3YxptDHaQT!6@YuV#phkAx8bcm>;7G%~4{1q7GNB7N|D%CM zb>Lx@F!HjnjY#fL%*Yd>O-|4_Lzez@L~0*00R6GaS?E^ciy_)GvC%oFm))F0zruAieTj&PYlB&M5qk1tVnAFsR^)v;T&2Z z?jYP;GE%969iC`-IB=djgg@K6^^~m7>PvAlHxL~fW4H^IY>)%i$a1Ow7zxY`8HrZh zD4~=??sBpL^9$x4X%t;TPBzT~HCT{7MnnP}xUXwgnEV=Gw2maMJHgh%zdiw8RqCE; zDeZ(#NX(>7F(ZY54}@m(dFcTJ!eHqHpim2exdqA&&7tN#%+Dn8ki6qD9WoX1Ldoqz z+&&12AL$0%1M<5+Vb&Kr`(pm|{`z$PGfrho{i6 zPl7i^%52i2IE))}Dx*=En_`NQy;#H5j(92ge2Mhj+~m^V1_wc|NXG!AG0;~q^5{9L zWEqhv97qVbgVP+%TgwXjT%%+X%qUE#2&S-hj3IyiP=O-IP_zT9W|ZrN%Dv+Z5_GsM zr{M%&{fGo=SR}q7s(|w(WNEmcpb!IC(t+`OlKapE#d4E}F_b})5Xo2@vtnA(j}TN0 za_>pg2bF}KSPP=h2cZCMO`8!cc}XZG$OW}v6uK4xdQxsgixJr~lIc5eH>byIm@@8^ zAz~ub(>Vc-r8TMaR!Dh9f-#10cKlZ_Dt(9|3nwntwRM=}d32P&ChDS%lxz;hIXuhW z)+rK^qo~o|L~^+3y{X!IB*E^+vR2R2hcIWKB(f&hh@3Dc{DFWd1$O)(3;|~{92*pJ z>QQ$$lC}8$Ap9eW+fCLM&?5S zybMN^_>an#HO;HF%0FQq{bARXkyfVJFyTf_P9=aGzP#)vlp#1hIs~^w;9psASCl!@ zP)U0oR^SmHne;+A(ImYnGi5MkK+eD$s*^nOZcVDMo6wOTv~&mk~Wp?i6MiZ5l3WI|yA_nZrG z#2?}CGU9{S#KI*~Sco>*l1#8n6oRJ5kp5-nL|#vUeM`MpRx(8`M`ou2(<`U=wOO%_ z4QL?F+bw|A4w(xJv=Ot#^^c+myr*9#Key!Aexe?COsOzXCT!qOpr=T7^zHGQF=bvP zp#)Z?DWw&$lQ62isas>DkyW!OgRWG{J;#AFjaR>SGz(;5yf}wwgDy)WQ^YRLYvpC} z1R0zY8itT(R5Nt%IGPuO6VuTaPkaWwKF%O~EQq}>gfvNIuZU850}otGE{{K60+{T>XDed3!jfsX+L#5->|#s&^bdtz?* zVm-h~51KRZ(_*~f8VUiNrjZ|##e(b?I1SjJ?N~-HCeRcYEwT_kGA)WW)lkv!XR5t8 z9cL7>cKAIoK2f}R2K$6iQMz<()a|J=vi?2W4;b!!ejQk61eiUPenc_OL9Bs=IF_nS z2C05xQUn+VGA%jYQwBGRV=CUH9~GZbI?B8-EtIhyBwi>aQI zs+&fKo+!k_0;Bz_hjutl;KUpIV<|vH5t2297?oj~CECkLbO~k1AsS{VY&S!v!D(6Y z4W$;|ds?7l?}%mHMX)1sBqP^MsL?Up!GsspiB$^cv3s{!298(qeq{-~pFsKY38^oY)RPl_zc83lmJ+m_4z zw_Jp{k7f*yKe*?DYl#}E)`4XdPztz^4sA?!%W$O55?3*3`Kt8n{peyyvM8%uAIvW? z1E#gC%v4-VUm7@N6r+VrT;vfY2x0*qSDXx$hwe4_)K1P4SI{wv)rme+8l1nwLGuntbUpoWRL zMhU3kNU|Cjmcoxf3g^T@hM?{xcFk}&x8YZd9=w?UtC-UFkhhTUs)((KwA^6yQD%8q?KVZ0L zbDJ4|`ou8sJVLWX76ZhHTUi@mx#9pxrU~dB4%tF6amnk7BlH}2_tF@}a2ud*u(YbC?~1ne5Q-u&UPJpp=Z?atbE?X9^qOOk`?F!!oV+>Us*2v$vbRCU|zuz z4KQ$_LCm^R{b(`8Dp$_0ggK;Q|FS#TXhkR!Mccf~)I&GL5x@Ztp8ljV7wuXb%gdQS z$7y7bNcs!~>^&4qj1D`q7l?^A#egmV$LnJjz2AR= ziYF|foF>IIDkOTDod|9@od`)`G8O)kRO%$d{#p<@vbaVb%sPB{Cd#sNcF+qnaosQB zZIFpOUFbw702tHD3gnZgW10Bl$7M0L2~b7C`bpWg;NY_gg`I&o=`KQOA|Rz6>M}{G zy=u2OH^*ucD)lQV5+G;{h6|Cv91-QD@HAqCxnP1IVi`d3VZEo=TM|v1fvokHaUy1% zkIOc(+?z;Tv<7YlUBP;(XQoOap~g%wifW=w^lUg20GxoO2se2VTtKZ!vfx4mh{&UP zNqzd(9(5*zi4g_t@KByMLe}<8A}KB}wKJGT5wjT8L(tA3M}8qxhKD004*DPV{7+2? znlf>dy$$nAQMyL^EbpRr-UuF8rf_=TyOv-`f+2CVtXolDG?rehb?_17AkQFCTD!pu zX0mvwfaVFwP*TZp1<6Wct+X%!9c?3a>s=F*;^RzUnPW#(&i(zT@{MN1w$w|D>V?o4 z4BcDfB@`IA48$069s(Ym6!>cRm^`E$A%c7FE$h|*4kT;$D}+$i^#c!Co#QA>wLLKt zu3xZ(m-BEp$^Aa;#1b*-f?Y8$50PCVb4YF|AOc2PpBnyH1sj2L*q+wK7p+?XV)!ge z9_o8q6a`OO#m@4!#mXo$oyFn(o&oaEp^J*xSp6Ukvpj~!VblQ2nY;1u*$(6fT%!fq z7EcH&9Ph$vq>8nO8;W6P6mxs*yc$KCxipa&Sd|4#A>kM-O94rL!t>a%2Z?DXj!>Ht z;4-^WZ#>agwg_j0x~*O(D7`EX;g`SY6==hTY;=o2E5T~3cNXO;rTpa2W zPm_vP3*0@wy z69^`7f6Ey5s($N$DpGEjRlw%NveA?mfTJRSkvwKfY8eqa<#!NC1piY?sZJ(@Lc%to zna2f9tA96~wa`3S+XWNNA(!$eS<0&QSCyPR!RwVlF~S$9XxqJ;KL~pg&tN5{``g#B$}m4q5|K<9u9w? zUEnbRmKQa2Z)v7ICn?PV&sh+}NcJKuMwXaA1>Fh^HAO(q1k!=Z$|BpGAw-Q7tpgr~ z5QK~IUNBv^GDifZB`$9qoFRY)KyA(&E;|hB@PL0{*O!X?^sPSZBLO~MLIyA zZQnY|Bt?n8Wf*0qUlFVYez!4u4!Mia@x6}T1l|P#1Q8#f; z8xR)fmLA6$6}=j_MlS-S^~)5)Lu`p3kt-2H!$9iQZ~q=uJIMSQn#z=8%j4@(DGYCq z>+KSA89<|K#bL>um_2#~ND(Yz?Enl+g$}0!>0DkwXPgtEaUk{B@JrL7;-Gzx;FL-< zqraP*Lt&`OZH#RtuO>9VCi0EWWP);s09+TRX#a} zy<#k|C6NS-G5m3m+Ze;%$ILFvN(Vg;Ij;fL9`-nth4X2l{mKOz-$wHw zf-yOWqltMU@(}9;u7`0X#&9CrAW<_98pr}i$%innGGIiG(M*!q4}YoM38mwtf~Odz zGI{!p^T>}pIVE9-9x)J0nI|l{Ya4@HEaJ?GxjdbOQjAkn0x_E@w^)!sJ4ES-gEO8w zTwaTjMnX=q(!k`QY&h0wCfD;lHOoJVW6kkaZK0!YT9YIN}M*;)G@# z;X_4xpJ=;Mgk&OV7orX zA(&MUhO#}eDtFo0jw8=S)4;+EjW+Rv0G<_`>@aX+R0iC3n19BEIIqDYD+^@@jZ%b4 zK?)SX041Pl!bmSyf&KEkc+tT#CROVh~f}Rx#$pbj*2_- zQXOIiAc_|7FMl%L9`=(LlO%SK$%C9i&bSi6V#^mIc0?lA!-TxH$#$6FJVTctj+>Cd z_=KL6NC(tO;mKO4S|&H?!Uv%ZC<4vOMoq>MM!Ps*5gM2r=FnV{EG6!W5DxdV6lOM% zMiFro95l3zBuqSpL4`KuB@lJNon`RMvM@x59>IKYd4JZ!POO+Xg%3*@#Hnlvav!YA zk~oyxsWK;W@Ft=Sbt145x$oGGlQ{LQM6M{ptwQ7uYa)pIf`$&S=PFU>QzGXXb zNu^JPy7U5{2$sp?U>J5?$4XpyD?E*5#AwOOgHmGCNRrG>GcMdHN<&ZH0TnX~(IG~6 z<`P#bFn?NFFkW(CaoZipG0)sEl2+D5pg{}xg|NA75{V@z87=%^a?^|-VlW|}UK2uE zvo!KTSc^>F$efWtIzP3f>voE)^^ZBXBN?HBVcu02lh5aun6lf&*UO%&mxxbEXatO*|v{nC0996T+H`E7$medKaCNl z#~~36zA=K!NFET7(Orf%Ap$RrQ6;fY8|pH7!wCS>D6s;L{@`bD*kT049(afYO6FP! zmVe-0!0NyXwYUE9)Nc>FvxvAY1x_eTqugH2ZMjv$&g6lc%nn0GWR^z+^DX%6@K+K< ztLOpf?T$PK=fd_napDlc01(O@P=U*3MC>~99sr(M4k9#SRG0Z7{9#m|oOwum*jzNZ z7&bR@V>=~|n{ovubp1>&-^x3OV7M(|d4KTWql^jS407gkj6)GRl_Mci*Tn#zibMt* z0d;CMlgp%tgHyzI2z)Fd&&?w?_BbLuas>ndPu(;OVT6P{z$Pr%3&9!8T*`>?W){lh z9ZqPc%(5+?hlve4gtlvOj88Vr4b9{kbT{>UHwhX2 zgA*T?0z(xKJ-HPv5U5`oSd3^61!u{rDh|_cdraQN=%ZRz<_?ZBy>ciWwXgc-e6f#((nEj9g132Cr~>5}2(Jai)jh5Y|7otT19>$mMnc znj4x4mzjvd$XtyZ--2a5lKk#=hzmhKRpFZ8OeXG*-+U@Rs?DmG^e{_%Ebl<7f5uLtb zd!lM@4Xz>b+vm69h3!Xe zyRAqn_C|dl^95q!M&>_tkAI(f;=?&y#lYvxevEiR(A#TbPIXobO?V zjOHfhz5LSl;6mfW=cn_FQ}Zg@&!==(8}Hj6o9Tr3#J^Q+FFM5rSEOHVdB0Ry?|yXStKqM*mmA-E6*Ey|KecGL z6{ow=KP@ZqRd*qIzb_jk@3`(BPVmUP-py%b>U$RX%z)$@)`)FceWsC}rBtNncjM$N zsf{U-_KpZoCg4xOf`1V_=lAfOPr~o_6oUPJNU`5fklc83q~E*WLaJxizwC&%9|SwXEe#prl`ZbV4! z-B%$stx-=ur+*~%_p6YWdAjenDQl8H-4{|b*VEqhDP==tZPbh=-Ty0^YjToM@)eEXT{v!F@2r7Fgq~z{i88P#mYMG^oniVfhIA^$4TEEKFsj5Vp zBW+4{G_Hb5{_ATqE$U}Rb~jE^8vgd35qWtmsO8?usEOqpBii~yMU9YJ88xkZV?sNp zp!LOUT*x)qbk!QuRhyZv87_|2y)kud>ccLlR)1+Lqh^(FjA-c%N!yN$o6(0OtH=f1 z3Tb%dD??@>ew#rprF7i#oe?=X0M$jGhM{Nuksa74@)&p)Q&XQ_n(#N}F0ZMrs}oXk zcdv|?6*$0Q$3Fzj;ki42+eo&k?0 z7|Q)2-OF9N5$h9@NBlC5Ea4Y=nE-0&#$JL%iRm9=2`&-qkKHYR(}(S z>H$YR3I9yNe;yJ{>`5UmG%A-EO%@l4%ZkbcMU$mO>LQ|g`Os+Lkho;1Tr4zMCgdVx z$6d4Gv^}!7Vt2f^FU|Pje+#xJ^LJtz{_f=z|F#l@AoY}fz}P;WqC!+tG?dw$tH^-x z{9=NWvi_@B`JG<#C9n2s)_KiVcz=0bvqbLDC;B0Gas%$0w^J&-Nm6=mi**!s(O~U8J3xxs6ha`A7 z!Sg~Xs+VC&y-XGqVJURD{5iSgi3AAAH$30h6q>Wlkna3ul6G%X2>14oYJYD}kbEZe zp3j3W^Le75WQZ}pYR{2vin1~vD(~d(Xz$({s8H?e848@GRP^U}Cgdey3FsoBBrOjn z1zx9YC(y*oW+R=pW7=%mJu;+i$&*Mb1;^4)D4sR)KXdiE^!G}1PmQP?Dwm@sbBx#u zDqEpuGbqNKT8_E8AakRV%zw#6nQO{2H!IAXT$;J2ICI1DtjGmgX-c#*E7FQyrj@Qx zE5lN)=*3#;%C#~pSaP{)iq))C>4mB*Q^O*qm#D5lP0EwFu~NOI(r7bfwkrvX0B!04 zO*u93-zM1*Oo$qbqJp6NJs9%IYok!8wS!bRea>wogxi0}iQ@q>=? z!z5?L%mYE0_?`!krWgckL`5KJ(+_ysr$$u772_KzHLc02Fwg3WY~AB2w)&XR4nbT+28`zy~m`@uZ?HvoAjKl9l)@_l zT}9NylM`pBbfkHUo{XAxdd}jM@Iyr<{ZOeXKU7A9^$VvmLVrX}i5HWc^??x^H?9P=3-@R>Z?Lp#)?I?iKokcW1JM|F6|;Mfl7z>eam&h#N2 zq+py==AgR2ha{@~zFktE)Pq8)dm(rcQz%FI!vmnskNe=k$-kT`WZHw5zk1vUe^dyyv^xm5& zvK7sSrA_`KHhZzBTqmZHS1L6~WvW_Rpz}5Bi)$6@Cx0^4>mbWgdD>L)VNt6`PQ%%M3})JAn9tJbKW!c3j=Fk73es79GhWmJ!DzE1(R+DA>tRQ*1t)=fw$tNrwnA)~9Bz!+&H{IA=f_iQAE}!c zuOb7+k4Bpo;n)-BjV==RjOXX$gk?e4A}JH!(a1;B46sh`1&OAWP;j-+CkT&}^^P|6 zJ<)M;t>ZwLt2hj%Dh^XK74!@8bhqOfUX6DsKYtPmtxbJTB%e)?P_|er_E%4Dt|srp z)$GDG+k<;f#W%!I^j=WIettc!Ma6i|3iDokN`J?BdOAf_@N)lEBC4W1?shqW^Hy*` ze*4-;i?qAgIH%kbF%(s6(o0~Z%l5dJms%6m=%mydbnlGF-;2*wW{9Y1@xq9+9k5?m zm4Bn4+AV(cN>D(kby6fW(s72PLQ_7|~wg&2m62-4BF`x6Q@3JjMNTg#_~|$4Xz$Q5y*;NA zdnWJnuLzVUi2>v3`4r(n5bpKtk`Jil!+$9r+C4SutALCy0jl!tGj&I-%-d%(+r#K_Lz}qS_uVL``m!AW|?S2QI}Os zn3zYsb_Vju~Aw zRyQntZ%!mr-_yuvQzQhd(hMw0Gk;}GN#LIA^mvMmkfp(b#^fCa*#68#f z`2->5%ziUGsozYV&xi3cH|a9*Jp&$1FjSP?qiyPYj%sq>DE(4K-F1wH7cn+fPN2#M zB>5!#j)K1%66_`!jueLDkl{GaAU|K)-qE)qop8DpyJNk5ImKTQNUH(U#FW#^ujZQ^ zk@g<`*NKgdFMCG7N8)<|JbxNz`1mXc4r-hFj-!1xPV$?m2=`pIsqaYIX9gs+_2sLG zif(*`xhP0$jJ@PnuHM5j9(o@d2;FcR_MhIjT;;8SZDQkVA+*9*O|(h08XYl|)i63j zYzPN%f|&-USy(xYVS8`W&g&mS8A(o zFt}V(@VCERK0es{*njzL;@+pu?>}^YO3`llQ%H7O0lP1P%Rk>-KD@0+eEN|0;4|LW zk9Dhz?q9yo|C%e&^vQ2bbNgh9GO~3 zk!DKdhVb%qg76#N^{J!jZ>YYxxjl76&LQ$RLmtP3$0hQ(Lw_E3is##^Je0@AoaiKQ z!*qIPMnx&Ti-?NOG0dAwCv=sBlZE-+J`tSf#nzngB634`c{)M(_wT;{mpPYAeM2K3 zOfmdSA^7St>i!L);|N*4lb7v!gs@$e9RI1V}g_?*d zm8klwqT?t#!Lr#+v@fhur2pPfos#j*MA>-b|gj1v646q~a*pUT&qI zsl|=7N|&1iW*Qw>1tGL?x;j@;l`hw}W{R|%zvi}-zOYJ}{(D1pA`Z=>tkDrDASh5SZJmy&q_sDiEz+cj*Xfl47MhL9IH| zanmXFv6wm3oCQ@XoZlI$aNu)VXeXwmZ{JYJXPeVoalJC8234L7`Co$Zzl_}7Y%F`L z&fxWgE)?-!SIXR_#=-~34#&p3ElAZo=?#J z>rk`(VMiFr&k{F;=Z6z)@NpXXeKI-uNSM375xe2Nd1FGp-IZ0@=+EaF%MR7Jc}>to ze>BfrSgXz58ND&YXECo>o`tqZo&}*eo`1#6qPPkwH6Rqh$PLaWVnh1-tDMJBW);4! z6A8Y_~K z^{yZ8$!7?qhV{H&ynrnnGl6q0U%fBO1`XulZgLBxQt>tgRnex(4?EF3s()r5Mx|u` zy|Ie>nSS&B-eulXyye4ONBJ=Dkq;#IcrNdNmdqN=r40tWfiZDCGrRSDc56y@ABaCx zu?IEosPmbb&hImwQ!+h2(osb@)CfnWKkSb6Tz)A#P(VH;X<$05KPElUVsw6Afn+q( zua>*z*3bD5r8S4gjpS}v`+uj%A$<{0gI`{sPQjdi_7LQxo?5t@UzKwIz+XArwI}L& zqV1QTHO$?+(_xzS@4jF=B54FqetRn@M?{s<-NL;ZpnG>Zjnn>p7Ay}cPCV@r|MMU! zcEfZ%N2rv$95OtKpMMXSg|lzPu3@7bMhMCikmr|ltumH2%73rBP$6`Bb#Lj4 zX%4H>0CYpeXriSLy%VL z@_ldHjv>~?R-875pYQjn=c}iMRO+lvJv$?sabyY&~^5FXsVGXnM0Rlgyyq zgEtdtLfP9LdWIZ7|9|lAP?d-IN}d3ex}Dw;ReJaLZ|AE6VWlc~PE_MGFV01(JdQmB zMSa0RF9A_Q@##<&-S(tM)f_-6bseN4D*S7i7n?eL7P@_*vv8EE-X^Xe6d z=OUj{`kJo8e0TYM2JJ4~R-l}2;%>!$ZvQ@uH0Lc~D)Q^gPV};0tiFoN+bQHl6-x2* z%d@x;Z~rBKzv*eZWAb|hN?rf-A7^cA_9Cadjm`>4Gy;(z?7Xx;=`0S2d*RCP`^yYs9BieF; Dgv1iU delta 23869 zcmZU(RahKMuq}$aySwY)?t=uk5FjMDyE}t3xVtkzkU(&EcXtWyPH+h)```DTm-Esu z-ThT{cde>b)s@%*z1R+&APmdH!IdZ`21?qOOQL_uGfZUNY{wMAVcXzL$;2*a&=aFq zsasV}TM(~`hPJqdnkRSa+fF1-d4Cc@c!IwKK$SXCWf&xymt~CseShYwBivR$*u0ap>bo#jg<;n)ghD_P`GsqFsXEZTIqB9_&E9) zx$dSmk{+F6SRv2*!uUyt5$pamQ(>7Q;SBrSLryH9nbh{wEFu46Zy3}4nr5!;=ifZg zazv`SadpBOzUfa_r{N2X3RFhZd#<~y3^7fRi)9z|H1o~z^i?5#$T8-U z;Tm0kvntQC_-*X%`*l>_{5^7Dh0Ru!PRLF1je99S#$6tk7`nDhwxiw88p5aoHPbR8FZcET^N_+o?( zlFz$dK0UnbC7BUFG~?iPRbZr%95I;F!~OV2oV^r<(d9;X;I%nWS^o6ZXt4g0H76WNW;Bt8CJxy3kC!7Nlw0(#0=`nbcAjHulDSLrCvjvAFt zoujNVT0IzaDv)j zYBY+R#O_`V&Llf~Md{_{N0#U^@FaJ9vPfzkMe}AnG6lKas*I^trxUj(x~IAtyWEa9 zRgZohSy%a-YZx>EBFuhizfuLoXlm)d*s!GNG046TpHX*1;pb&OcV*%)TK#?MAA>Y| zTQR9xYv#p$MX&zEAE}TCfKO|gkAz_-46pKpK^AB#>}{o^tWW*JB@$Z{_Ho&+0h3i; z#4JIYod-g0HDTEQYSvfyxzV)f4NbXXuD)VL{dslePI&~MhkA7i0f>FNyRRttutj=w2NwZ>r@-_~>Q5I8`Le9RBNf%M+E1g-o^dc^LXwk|mQ z<(3nN3cmwoswZw%f6|<*`jEW*4B!g+ZxzWns9IUV;Xye7&(G8iJ@R5})a_UNh%q_j zwxD?R(u8u7Qq@+Wd|5(&et#Nb{YNsa1w@j%n4i5_|K`eUKyfCK-nW=v7TWEkauD`yJUA8yjS%G(^%PMb&HuefFZnF5n{>j-tmCywt0W}*6Tj?G7FipuKc^yd!uK@{(n z?%h+=FE8`?pH`<0YwA9adR3Hu$u^s_GwQsNl@;G`X3Sy9;*xw}4a!p#;O_tN9k*ftO_c+oc^p$N6WEqrclI?s zXc)G*m_{$i&lQw)c7Z<bw#`K{+V#chCCsH7kR38u^d?~V$^0hDpUQ0`%w`>=!m z_w3iY1TgV1xacozOoJ9GPiufkT~U_=p@19u2;cLJ6!wKjaV637&pqyx`*oZtLHicC zi*<`6FBp5|F}1V$13OzBs|q($PtwZA6oq-TtGzxi7Y)%y)~$l`BGb##6nR7v6+5VIsJf$*N#AUcgp9E6u_l!ILM{s^B~h zAN`d>Yr~~*7nG)i@7ZMP&aRyH)~_{}Xlx~(!T;k2Z^|N-DLEw+`SRx;9%^=A^2`Cr zzc60SS9!`eR>a%3v+0Nvci2t$?a%>*DII=;NX=wT^-GV@DI`0`t$9gCbd>aFxl5?dDf2bwHbNouQ~gMMpgIU7f^b50l_Qmc`#9VuihGGxI`kV zCKTXTa3me3xx9EzDt=-5oWDg#lA{)EiV}?FLLbew(xI_~J=-u>Vs?7_V&=i0I--6z zRh{$g=mN|`qw!Nq<6RO2`?24@(L#jApUJddA-8|8qyolBCLrGap|(4sxQ8oWzR;&T z>cS5APJ+6jhRma1*Tae*Gus9B=hwi z_-vET`!h88(n^^ZOz?@0rF0M{8^kjo6_x#2+h?=_%mi}Wk#hpD%HEvQHOrfdSTa7d09T^$s2ud!<~U z%O}ZNzRH#3oF%9@m)jsX*7Pv3lsUma_WH1b`iIChE}vF%M^0n?rs~&@pEmefd%+$m z$}gbZC%d?PbisWavNc>_t(vojBDZ3C9L`+ z2oH3gMT0&l3Pha$Nl_YDrpE{M?=^+xOsPS0Dm@89lDLAcRAdL*GiDM6=X*JDra9T< z{!yHfDnmi8`eR=*EpX^;aYq`FZc{G!e{RcJmI$9%9~a9gW7g0)_R%a`Fpp(vQz|%y z3s+Jg9lNl*LHz5T@Hj`2OH|erU!ml05y)J`FuXUizn<{l*aSXC*NpC>jnf`N5(bjb z&`3e@)EJ#1)3z2z&V7r>rDMv~ix|y`_usbsY}`+-6p&kV{!q{KcA7tf4KTNxvYo zO~0HQY_swnJF-vB{>cJ7YFL{mjPxlL7yoS6O}Zn+sc|xy-j+^1iOM04+m+l5!n*is zsYOAwBlj_^5Zkr0>(K>OhXmI6K?~ssNy6+&Fli~j%|f=&b>NvzmnCJE*Sr>Hd@SBx z1e*IG3Cdi^E9gLzb6~cbebH^!PG_Hz9iJ8SvQN$eTH7mXUMnL0?~&3ui!AZN!{@cu zW-CjkBAM2EB6|!*ggF(qK%AwTBa4CKrm0b3v+?c166Z0hbb0exys=uEnkrL4YD;11 zwmpO<(Fji_4b6}LW8j)gbh@ofc6y{&obmt6MDac+t!_#@nMyBPvRcMzgRy8WWmWEc z;5%O9?7^;vq4G!VZ!@Po7s{YIJ!^J&rZ3^YieasJ{^~344@Q^S+Vp-{iT!TiAL~1Y zc;_ivI(;3Yb%F?MUj53JqN0Q`MD|d$oTInq?W7E+SoE(Sm&ihUzoEYY%XSwRqWJ)g zTG_6pw9yXkKyR4!>#V5G!7m4BFHj@0zYNQ$WUqccqQhKpj7N%2!jg_8J77{{t&wFK zX}{LS%#b{Kg&!K9B(^6E&xo@5CsSfkf$YPT0T0j0x0MALfr4f+X#@WzBC#T3kUI~J#D1oC4Ou`R z2PMHPG3nKWCdqO?5r#BP8WO;6n|-R@qtm`>xvdX;vI`BGpi?qu@D}75HO+j!vheWv z5`TwF6W#>MFgia??0dW7wkXVTuI@;2O4THP>FD55t>AhPtS|i1a)AypQl*3_E0R_)!il2|H)v> z95zc7{fpTj&JjR5N{SE6W~9ZsS-1Lbh3-eA_NNEoR?c=iIcpNy*PwoMPAzT1w9bqo zS@!lxVsh=-V*;NFWMbuN7Fgy;2b#d!GdU#}fpvgEDh0JrmCll?yzLyzd`7p53+ry_nyl0OCFn!aJvGIZe<{&B zQ^1F#39zan=Tl!86YHr42wH!J^u(vl4|1}6`SFt-QUcvRq!FNoD`x$bNQ6C zLbcFQTr%-6L8q|9kid#f2FLSUW-(JrmYt9p%ZIkKVd(J2%%p`+DNP?M$5Zws>&gQuV<_ z^;A)L8M}gI8_lj6S=1ea%zFNMXV}@5e8$2t|GS~kxEe^y;^HOh+msv)J6`gqt2pYm zxq`pKD%DAu?>oaaE`9A9H4+7$cNh_R}`Aa&XDW#BZo zINK8n$Z;6W(Q?oR!P>h#H+`0BC^5u22|oBc^!yR*qT0|rz7HavGgs_Aha7&vcM#9E z%e#uOA{akmn-`H7j-O}G{G*o^Aoky0uJz-;H^thhX|JS5AE;x`c92(vzvk zpw={~IV}!ev9ktUgs1POrf&A!ln(v!N(@!94Z7?y4ASrDMy`CU2h^9&s5H2GY3=1gM2+NlnxlIrTy5d86G{%bZCJc!t8T-nG`RYIUML)wopV4oMk5^pd*AXx})V(N0d_9_>Q9c46TJ z^CHP+8DwkaMPsw&hv8!lQz3tI3-~m_K&+M90>Tq+E@V^WNy^=A+2RF_4X#i2&(N+^ zrhmN9cl!l#>Q8kO`=H@6ego0QT{Aej2({2wDl^E0@E_3OQCA)&xM(O)$2c6Ks(tzb z&2ti7-}}dySJTKQ>jP18a(o9m>E@P7b^+5$4W$g3IKfu?I2&)Y?m(md4wA_F6UWAL z8}u_oxXjKKgyTyeqh~frSWGmIFglsjU*kYr^`m2ypb8VR$AeuY@LnJKJvwk-h6%1; z{Ihm_fpWAR!BdfusjLFgpoMwv%wR0uVaLRhwim_UIWJmx$<9GvRqBZ&U0By*z`hHC z(IU*Z20B8vzT2ABigis{W4Fg_Us^8xB2cbdN@jeRLaB;P+jV54LsH*qg;ix!N zGZQiYCo1Q1&=#q^iTEWUJeU3(&Hu-n9<0^=|2pq~WnRs$cR|)iIK~lW^HU>XrT>RG z!H?hIiro41CCEyYkmn;x(9@v10gc?)d_gKsmh4WgY)+HnS;|j7EV;daH>8aOpOi+l z;H>z*xH6?xG^r2<4vo1nQ{-#o#V?vZ4nF+r1)UV zokkwYDlC`s2#Z9TLC`bZJm&rv5f)SOYK#@jysoxTjD#V$VQj45vj)!oF&&Wq*;Bk9 z-!buzY7X5L&a#P#bs9X(Lu`ks!|@rK=eL&BPI4crjl#VIj%wN-IozeXEW zH7?~fKRXaDIpSuE7t}=CCnv0r+Qt5dX89-}hc&Sd$4Z!zTW`_Z9a~Hs)Qd`AVWn$C zVE12PcGNt9n$lr53woT&^yDb;b3@?+K zLqFDrpKaJ_qMVKz{qZl1v^guFV+B^1(`kR_tu0zV1X>wHSAJ=3zJb1N^90=|A| zosKaqmVV+!GO6B#BUAcEs@(c#*=SlZLS1n{NJl;i?|De|TW5hDA~+KcKM+58+L#B2 zFN_>-M}5K3EVPxV5g1G>)u1g5Q=CuI`4c-pwZKDuriWQt-Sxv*$^`2)GmftyeN9KM zKX`yDMP}Fqp*Qcu=tbFK5k8KNjh+iiwo0D9FhaPd!od`gWLs7hbA1CrUPhZnAAoiZ z8roA&_CY$RG{l=KWWg+|Fq|w1Aclirn(U3`hNGe^^d!u7*{bj%t2$P%dsd~=_u|uL zcHSZ4>^kKOc02eY;JX!g^8PwlRiOg2_m)W|K^vUI5L{;ids$Og_8g z$*+I~B~hxy?nl=P&_Ru{R%)e#VBhBpHzbhz!(Yxhj~=nmlfG3<$_#C)$pUI^iD};$ zW8WBUE;Hyj23p!q?yLg|LwXueWJ=)1Nz~fOnrSTACPu+C^m;4HTdAczk-R|#a!Tx| z;OtBERc94I8~^i;rmlc4Jw+TNCr{%J&yQ2=#tKR$gLbr}9UX~X0oZx7jg-tFq08`l z%KlS&hH9Vwtl^Y$x~=$;NoWpoh)xCxk@GF&`Ycb+izWnd7^*DoUHsR6hEi#T{4i5FvS;o!3} zB8$L9`gg13dO~J$vrb$vi2y(PEe#*c$waW*5Y?t$LNx~W=$Tq89;r?OK*WT$z?=`U z{-+$3#B~4LPsGjCli|s{(fD9TE7v>EqLA&|9+vBA=x*?7Pi4{#NPE%dTT+6E3(1Q1 zesMs>+?kQba}Zp}op6Q=NIhbhNudf%@Kb>}Snd9u7H3;l8S{k|`(hb7V=t{*kF^-l zuQ0Pt#{_DOT1H4lJ-dntC`*do<^o%Da2clW6&pjKI+svPv7ZSp`r6Vm1y2HtJ_-BX z5{g+}|FMPVO1_5#1a7FV_lINa#2uC$ifi}j=gh`Xrgo&4FE}tS$wt{!v?**(#Yzfa z1zYuQ^WfhzyKoJQD4kHL@%$JvdeNJ|^kas%F{(~EN}?C3&E%5Xh_vZ7+-95uq=r)1 zsGYG?g(9GY%uJANDV`RTW4t8Ta#X~?X_@;Zba+wkN=hSw?xiP|qs71GfBG8}ppT=r z!{L|}+s9i|pF!c~h`aO9gmIj@RQ%ojf+@uEc`>dt%0?>%e^m8%Bu3B|Um?sFHbEo< z3OMoxQ8a=OBvhnw1BVqVD{df5yYuWJL9Ac{}fB_e*15@R5 zOvhn==H$^nh@W!QL7cJsSvR~=NT^z_&R}xPl`rkYMyI+m(QbP5UZK?Tz?*Hn-bFNH z=ZvJ1Yh(Mxris-Wmoc^nYbN}X%KgBtMt<$LTN z8B!^9fFjOAH^W7@==eXE5}bA*Cy7WmN~)|zqhHej8nIHxnt{P@@Q;fPq)@OMRcz$e zZ;|;lZORG>OCH{@3mYK2W-AGLyARucqiIDjW8@y_nHHK1G%RUI(46aOARSyZ^*QQL zJfU)ht6KjxcZ4%4o+Nyndkhfdl5SH(m(hGbjava6J1(M)Y*iRbKKEHtNh@M9W5)1* zaZ8&8^`kO<=(T-w{{1PXw>m+Uu~ zGjMDmfw>qW-ak9%{c_1t64Bw%Lqmn((6v_Y1ER~E(~(BK&kX;ghnaL`jXS}JO`cKk zj0H>D^B^tmSeY|lpij(h5Nph|iL7II&M@m_rus3xWHp;Yb89 z9I)Vg_yOz0n?*6eq?f!E(b9$l(MIeQ7av%FCZZcV2=A=%`(fdG!uIV%DoSxg-gQ2N zh%PxD=l8*DN2%5(bPP^on`qyHEKzBNUP+4Z!my1T{U$g*AtgdyuzF4yWsSQi0392o zHfqs|KO5x!&_x14zw#Zl(mskHud>cJ<8?xM&!|(tYpIVRxSWqMAE`{isQY<>JtM0C zt4q)TuaX)7RVt>THeeI#7AU{lph{Z+Ej&Z^9qhm@kYyn_q8fvJUN^3f4vh~wswg63Q$|4g+=VM=14EC8$ z2#p=y{>V<=4(_g_F*i!Mrv3e{tvYTJK~%h3{E9k!G)^`T`>4l(-hD>EQXvLpJUkVz zZ8CiuJg@vNtAL8+n4{wz8%l8M($G(4d#o#;>X>giLE<^!R&WH%J>&!%VahRV5)*_l z^-V#}731>@bjGBI??jny>2}x} zk)Wrov7t|J@a6hri96o2hv6KkG)I-jrzRMzZDkB*f~A@U;%(}D)wAGp?z^EYf`{mZ z2dxW?n4ZoUDK=`$grB*^j!5<%N;12TTQH^dn=$sfG{)7*3 z@of+;M@|xU;k%&{lnn?jJaELd=1ck4k)o&5Ut32XX|@h{th~BM`~C^(7i#9Mw(%{* zFuAhfJ!HZe^N6nkIzOf*@))oudN^prY8*L+pC%HzX32I%#5}-&IEo?qz83!s$I4rE z3R~BlFBQKE6^#A@T+T0v;yY&R`=^)%0rMKi#z46B}(5kNnnL2 zg;muH%^d8jFZ5%(0zCRJ*2R#wzx|vN88YPy{z&e3p`~-O#h7V?MdaCNiCK4I8I&uQ z6`Ac|v>+ijfQsicwc~U%$?pE+kFSgUNtB+_n01c7(ZPO$7(WJAUtgKSk3~!%8QEXUCjj9{-e68kw{>r3a+&A-?0=mie>lh2$5GmC@cp$yg&Z)@j@nA|Bbj^fCC>!J~bv|Ep*g9yk6s@2lP?yf*-S(4ShgyIHT<+tUAT>2Q*|;c!zR^LLP{7kluzY~ku9+sf~RkBKCD}o8myZiN`Sx1 zm%ZBkT%C;TAs;7}QqJG9_r(%EgdI0BcC;V=fw`RHpU#+1N0j0-9iz#Tl*hxA$W#)4 zR}iTdgF#I=0UV&0IH;fnF)(H^;4p+E=9wx$q@r}mM<`s9FjL$>b&hG-I)zYP?=a^g zfW^F?HTt59buMX1d071=#aw6nh=o%e2Z@8*zeS%6Nm5}mBGZURfbrdNbW?=fthGU=_a^!I>eDP(PG0JMe?WRJzAeQ?y8!RRd3(8jy1@rEIn zZ)Txq6}6lB*&u*Bit#m&aEIdOi)dim;ipLww4dT=yrra{#4bI)=$MPO(OaXv$@!%i zyU8a(hy8=J&}4l^ZippUh1mD$r8kz!VG4-{(eR%VZ+-zH%}hgM#vasYsgkZzQEwGO zyP&?TJSPE(Co^%Wm0UwI+LqiiZ|?l_lPUaI?2YG0H8}a3p?R`BD$P4024wM>ik*Ic zKEI5L@UNZ+qZ@`NZ6XjjlIh*ZQ~kTn6pb;`tG&^U_hTPUQ#gUWh54AE3ZCDwH#zC! zqrheNKT{zTpZkiBRWiiUCo_Jl*8Da#HUm{+(^pEkW8C8|LM}y)NQTl~Jnc*dUg@hC z$Fi0#>Q?Y#WlEf1c&B({l}emnc^&e@^L09X#?94=@9WxSn~@1L6F1pQ?{y9sS~iFc zs?(ITe0FiJZA;Pfz|qc~pF4eULN^nOL0xTiYg!{vNRL23hyJ->@~1x+36jw5-$x(OV(O}jIV z=h{qUeZy57u*dCuC&V?FLgSDhKR|P}PWzM(J}d5oUqV*mjy<}KCYr}HzFmp57cgt!ES;oo^ZF?_sy)+MoT z6(G4)6d5qxN56nRKUo^-pDidylW*jbrZ`fJ&)3<>)DC?G+rCPM?>Jh_=EwY)6>+_O zTyeKVaJ8d8u)b6ryQZ1UU|CyTVZ3$wY2omgckh+wb}_vyKFeTtb>#m`IT+;cx2erz z`Tf`2yLXC9`$-O%n$~deerCC!uD-w>Q7Ow)69pLJT?m}7(DqEg=j+&B_SOz@l36Hk z^Him}di5Kw=m^*>Bg9NNgGM|d9IMm#-h9qvJ{6@>yDpYBNwI`=!XpQD!?ccXmT;H> zJ~hrl9l@F$&TYH>qmhR(h6S3P3P{-x1t7?X0yz$hr7|#t|X$}l6OVk2D_bi*-qelb;nD$%R|-5qB7)) z?{mIn2tY2ewt=HELQo&fmE`(7QJTS0_AYb$s&Nbw4}YK5aI&9fDA@A6nmW6>Z%0D! z?Y_F8J@0s%{*%A=1WK3q5u}>^Fl|}gD8h!$M>)VdBhCKIDZS}Xkg-p?8lYUdaIUaa zO8T2hsdV8Y^MdZ}IRcZ#@DJ$@vQffze>X^klB_SJ=Tro&(qHJeYoQ*HQ5xIYs<7I_ zLDJvh7KE@ma3rJGz}k8@bancu<{Y=nNw<1KFiRb0Sj~b@Y?$laaUP zQ;@brh=w53Uk*R~Ktz0$x-yoIU*GvSDZByov}Vj0eGt6|fPE!Cy-g!#eh4YNPk*|s zcD=a+dlq^c3>|kl`r_#4>thv2N+dSS+d>SLZxJ7u zW!yMiv0Dxw4vJ-+sG=8JdRA5GM5-pHg+CJ3!F5!srGawJ%AD@!0 z9B@gr<+hYe8Y)ImKmJVP1Mk>{`|*A0?TlQjIpzDh$*abTR$q4oZCdQ1@9DV`473%lW#5)o^PFg1nryba@G9lIiPNZ#bO^Dtz5H(x@wl&$CK~h zsN87B2geNuEZvV(>XWZgpbHu4?-o$r*U@JLB(_)E8#b;A|1=ibju*|#`@papzCM+Q z{89O{|2{}F>Une(XM=Ke**1w3DCd4Yw{E4& zt1tQoPfznj{o^SvBjuXq)xeQO?dQJ-`!+hKkUo&6d0FMXQ-#j!d|psKXS_&@NX)XD zcVeU>Uil2WT9M*lVRb=*@Nf}(-{E-H z5B^tyw|7w0Vymb!Q~pH%h9Ep)JZ_d^W`SUY^a zI-Lf2er+swfcQ)g{pKEj_(|6!n{&(N&XcH@BirYm%XY2DR+LCl8gojXk!}7d$xAfO z;tC3oq zh?O#qo{gnpQHi73BrHUY18{g!jLd|Lak$c)mkD@ln6Rxg7@AV$@(AI+<1uvMTa@RU zITIlOYf@GVlcPp7`AF8KNCtDhMk0#6FZ>9qU5GZIc+T7t?nx|6{kR_*aW)a(V# z0bJ(?&|A{EDSg5w-0i1Fi;&1^>mrRNFmSAJAtJKQIjwpb&eJXlDg>H*d*9g#^32ya zZe;}ALj+~jz}(}1GVyVHrL!$R+4$19!au@t)@m9eF&YuCvDZ4HNGOtHs!$`*?C@;W z!uw=!(g-x@ZYT8EjZ2AfTS!sgF*AZNGR{`4v3!GKACxPh)-8yA_(_1;E!}p=-ZO&P}r)C}#ouP~YILL?2`)LS=dU*<3iROvfH$?X1v9p?FtbhEC z2cfYiTyww?aj@CP^%LezsGT^d=y5{)lQt_|gS$X4=ofQ>_3!&Nfr!LeS&ks@Pl{|j z=D+$Eoa+UhjW=fc;N+kfBaviq9 z9LhCq8`Jo)Ue7Ki^!H42ry~&*!0K)s=%ks9pxP6r5m<~8HaWIy*DR>kQF-ht14WT= zVuteY3t<7hFmh}>3>!T|l7ygJCO626ahI(#>7?MT43Pl|5eX=*G)PiH`GN^aW;voW zrXwSQK$||e79e$auG~X0goYyB4H#v^%fp>hPGIMDlUY~gSyz+Y29{q55eRo2g?`y4w_#(%T#xaMEVf^-PE@T2&;^D38 zPjOB(;RHFt9#}6MeS-gPQUI-JCNdN;ABvuEom%vhl2i28a#~H23`=^$RI+XFnnf@!AL@2nPix#e6oZI50oUFq zyI$BRQB^n094Ph7{9E9vO|(d1|BOPYsqBoFE)amWmv&SHsYk=$KnpkLn$pZ*@S+^B z3nvPNC4gx4M+Es!a4ne=3=w49jL`G1F}da}9F?^Q5=cKefN1*Q`VCMf?V@$F0TI<_ zkTA22BccN`38fkAYmq;)(rooaX;`N%qD?>&F6>p+?LI!$jDBxvR|7IQW$3p7Ht9cO zz@)zTTY%iN@wPYf=lX%zZ!0-Ws8|8LRD~2XVzc@Hvq5TXw%DDZwkB@dYhzl*=pFJ` ziZ_0*;vC#w5WrxKC<#z1pGa#kE^`ML4E32!y2v@Sd1R;2%*w=gpJ#xOq7O#b&aE^d z0$78knw!nsZv|gV>J5XfxW5{7^#n$;GJ=6d7G@%m*aeDcb_J35Oe1OD!Q`*x0*8XJ zCSm!qN}N`>XllXz=C$02K@`YnU4eus8Q>Ka_ViYe6j9IXPyvhp?}ME_|F?a#M8`CM zE)Od40}c?EYl3vhav+`;AQ+`X)whCcr5kq*9Fax&NVL5E0AB`0b8+vMkM9ZsEgJw+ zs~F9|qM_-~c{xVHpcYh09e_iGb7+A?%;(T!?p|Dh$TFj!wF%e2opNtz1RP8$ewcD5 z3l5M5kKlV=bOzs4-HIm{48-JJP%$vun@gj<2U&(vg&&0m|J*fg1=+7*;?_F{ht^mC zY=YMc-bQgA!d(IE&^ak;O-mb`WA`TE?FCM1AZJQWWY%R+|GXAGP+uD;#Wu5QLGtHm zsn4|Z<+zPrx+>m47Ic=B>L8`2QBH>P;0K`_TvACsZYOZVA?PXAH&mm1osFluG7^<) zNHMb}pkAr(Ljv;F5Ov8C2uEHardUdpZ+4Po$Lt1bYP|}I zJhxE6Mui86&bzddh#A~(WV1q;n{1J=MZb2qFKMz&Yw%Q|B&I`Ly6}5%a5?JBhCtZp z6sF!5B89&WD`B?OU^1MB5hIbn_zA0Nr*lY!T)VPh31yyfl}$Vc zQ#R>4m>ry6Kw8fd_tReooSr~nFsQw34ekEaHS6dYzTDh(=;utx^igj=ip-r_K^qb} zjY(!Nr6iV}Gu%^|7G6LPS6i{@lrGLc$e9;ju!Xt<)r|V;QaDH1^41D%vB}LiRWr;> zbnJSy&91ev#ORRJsm-`fIMOK(`RGY%J^EGo2 zo<^52E!1LKG%j!oGl|Y)Ry~BO2{vPew;o%e7nd=(5P{3Z#6TV~_#KI?MM@Q>n;hat zfKwkCkoydFOCmC@F7d&h04b1M^G+I^z7hXS4{W_pl;LASCcODFaRHUtXu4cmZj{No z!6xU%D2k6+&!(x09gI)lYBE34a&Xfl1H~pi&|izVeu12aoI>x$5M+EE=#3GKhTYYV zRb}>_2b&C@E!uRK>b!EpNc$0I+9PQIQwz;YkIDf1m1PPNvHzSqi(%Js9Sq)(Et^*EmwfOtbDt-DZ)U$0O_?SkijTG)Ye zr%9u`J4~EI3B9~@s}TZ_&CI7Ozg-9W<36y$Y2(pw<8__&N}AM+aqom>ras3YrR_@G zozf|3OYSh%P|Ykyfx`NYB)~?}NSDvzZE@0ZKrj>%1!5Ez@K-_5GZ7Q5nF0`buds@S z*@AirZ^Z8$iw_km({&g(U?_}|b~p6?0R~Zc2;&ia!KPj5Ujt6Wr0jn%GR4OFD#i17 z3D@8>{H4`Z%Z-ep+`V7-xgM-d^oHSu*iepS7)!3R8@VC{GD{TJ34VZn#GU1rBaB80 z=O-PgFb6WL(NaVNBj)@-(!zQX1meQA!{eU0JjDj(w~1%56+tmd?YO23`ff+F1r5U- zNl(W90k@8YN!dXWiiX9})j$n#U286qbJ+>ATw{t2$K@hX({!Md5b67lBm;0V&uDG= zY1{@1tlH>u@xCJWJ1kRL(?SK~B>;^xp{mFbJfrNF&*S(&0OjUfxMR9G7&;?M zLdFnfK^sfv8N0U+4FX0a(|pZ2@_@{LW>l{_=%-V;gj7)9i$QyIllREC<2!0#1Zt@@vIYNxXBl~J$I29*pbBeO!09LcT)7O187h!n5JkrWtL+Mrqy=b(+3hM@j4ak{m`USa@F8aLB`*Oig`+N2#0l0 zRlxyuSde6SJ4!K=THpl0yQh@Vi#;8d0-7( zFTgCMCqm}@x<^h0)Phuxjj2mrJHg!xNr1?g5@Fa;6yEg1np^LioZ~ih5eqpDk$sk= zX|nU;)I*8j4Z)1kWs4P~A(9b|qk!9s<+yBT;wMzif{otyqNoz-#coO(_#@-oU->5A>?j+a1FO zOJ4MTio{jYDAR$SG1@UNFfCMD^*HQRMhHZ=)1ME_jLV@zrR9_>c0g?*AIS@pPt~*D z$Lh^k!!e^zT&pA>hHlm!+rIR+st1>_(GaZx0~Ij7Ei{^}D=qG(>TkFiD}Y_su|wJ~ zjLkv>!s4(%sK6m6K8ga;r=~sJUT(Du$@-#&CN0i!qp*dtb5vBZ+!lBO3<%{w+OUx& zS7{I5wLio549{@}PJb>q!X}(>ugysi#t1V3e9um#l2(k(m2Chd(hObGPI(D3*BgPP z!t-lAuru)M=e1hBq-B>eb53I}I=HXcyQ#63T)Ki{3X&+>9jE|-K&Q9u(SkxFUMG96 ziGNvJulf-xWj}e023CKx+BRfWJf3#<#UiF=?O`XWmr)^IAPJfPMzGnS6yZ!t*D8ycO57hQ$4DEJxvBz=!`e$fuI(R5blM%SNdy8 z69Bs8x4p%dqj%7A9s}=LoSS2N;)*y-Arus2*)sIS@(>j!;QGfBr6K?kZ%VSC{xv0t z$(rbS>{HVf*o0%PIp;vZqQIb;gA5!HSxTdKTwniLOl25ZV>(@whM&!A1-_T{X}S73 z;Q$3xWp1&;xaqjFefAH%UBI=U#BUC`w*5mzjPBrH`pVB1LjX50T&BRmaNKDLaw z?*#9GP3tSdTcB*ynz)52RhX|G?vLvoG@j{LJ8dRZ^;)7S^0c1673>bdEqCPo5Q_i; zk+cx(K^ZP@Q34weg_a4%xZ_%<&v*M#yb96{2z=2Hh9LMidm>zY{>%~`>YXJ$8xZ|m zwAd58&T*xyDVa(v!6nt4ay`}50-SMp?cf8C6}}Pgq4>F@9K0<*g*=DJF`aw8I@Oc5 zYE`n4Q6aJX09_Awo@sQG7*N3f-O|im1=T_SE!HU z0TuxePt;=~BGo1ZHmYBKhbcgUfD}X9sFzA>uwyD^Ff-M0rI5roV=9@g4@$9@VWHBB zzmH_x*2?e&F0?UH-|h+4fymtTXF?!o zUlz1@!krdFsg^8Y;^{}XX)7msIh)uTFM2F6!ZTvp>~-O@%5i&H_mKVyJ#GN2e4ma9 ziDV<|3nQ}-ZcXKL=OhKOUFD07@#LkAuK&*n1$||e0BwDY8 z9m-68jb%k1lrv<6?tvOT^z|A(*4th+^3~Tso02C95hbvZO$9*{NN1pW4f_aaQwS}S zmruvy_amsh@iC@61JRUp0vH9wbZ6qeK-&;`W07R;q?PfDE%Xc!Hx$h+qoL3LwwJ*F zE0Ja>hAWF!Ub(=uT*yBil}{dSx%Y>48V#VCb}J6ZbGW986tBikN#C_*HV!sQB$-a0 zi85~38<1I7*N}_?6;e4xTC!-0Sa|foHWCl2$;1p>d1&nS$i#U|=P)SShaM(Y63mk| ziXKtfXhtV*d@>lW2ODAJh@!bzA#=e9Gx!NMgL^jcViC|Yk{Ws~lA0PT+bNM`8>ostpn~ z^Pqt$aFl!q^Qr~5k6Fu2>5tbf`2g=&}pDfV5&n#j?am1 zsG5sQT`NN{5^{uLh;}SLfRn5CdSN6Wf(5qgV;q86^Mo$Wa4Tr>?V%+P2P zKM3Gi!O0E-H%4W^ZHH-0i1Qjeva(Qh&?rTy6r?cXEQ0wCUCV;sMjO$&I`;z?Hihk1 zJ3|wAvjJiq1b;zr8XQ`q2Ull3?8J(RQ~0oiL7b|Vp!UJKEQv$4ohox82X7+UP$vQ_QTvYFIEho= zO4N!X+MzU^DK1D90!RH#cY@QGlVIu3?m*LAGKg}1`f zSVfGMx;!W)HjO07>@?%TjiNO4)E!VUvk)C(bZ0Jcr2?a+1>>a#7Pr}f9P`W#BV}b> z1RAt}UkID4CXrZblF`BsrZ&y^AqErj=`|sgHGfMZFNC$o)J-lyl5&(+lKQdjQNh&F zeGF}Znk_*kSXpMdaHim$q3u$^l29F?h$6-iJHf+K=NB@JDt;DOQAh;i=tdbljKqyS z&xtczEr%o23nN%>nmx;`lsDxqLSLN}#%RnkAN|6Ib7m3EHUd`1bzpB(1dFi#>P#-8 z_J1s58P9@@sF`j1XjW>K1I5LBFN8rtYxC0>VR{@A!QdMsxQx^R0Ttb4XcHpv(il|| z`?R4hQ#YIdFpUx`;OGy228S(1K`WcF$?Pz6L}qzJFyDf|4u5|oL9~hfAhHV}Fk$ z!XsBe5b)GZ!w^PDr~_=mg1r!&!OW$M7;k2wI^N-gcFHW<@_CrputR9O7RUHx)7;QZ zok4d~&v!Ew;lPA3RD*|s-FIUQ%|x)w5wNamF*xyIDKJ#=&{JE{0)hIafyIdCP;i!- zs^T#Hw#U?6j6SL*7R1}1GE`uKD1XU^!xCV~%V5X+n0vOT79?Y0J7aDLKM{7@Rp%c< z48W>B98__LmO&ex;Lt_Bn(yMFnu&mm5Cw4DEwxt7sk81`%F#B}zO0zRQGu5o2VtyE z&8W3RV(<#5CxO`t5odY`4q^Rc%L*eFhFonIpt+%$fSK?k%Tp&$;L~DMiGN|R1KWw= zZxh$*GLfl`N^qpq0iM9ZAmW8qiWmsykrOA%Gj&shr{+{Ko?AfU=$4ihAlR`&Z*uV>dS(|9`!G{I2~@?GVxFE4C-9=GI^dk>6k6ix;-jWlO!>sFz1} z{YtNT_|!;zuVlZwyneUK3%1*8>DyNq?)DDlzwWjosn|RHeash#i5r>!rG5O=5%1s8 z+;y+-@@G2=X?({WCm_x-m5Qd_bxO(ynjBOU!0m(*?c~w zz1n!+{MfYL8qh0z`kFwK@TpDs%dI98~{A4UDCtUfA%>-X4( z3hI)e1u2TBtH`y)isSz9s%uZpi|eK7#S2=Xs;|0y|KoB0(`(b1|FeEZA^xpmd(kS^ zyCVH^%loCuI`^X+Uw;jMmA%~f-l>?08vCh1yREpP8~xL=5?{3!l6U*ELGqUC?%@QF zy6fGXMy0-IQO^uWzG1c4menhb>@1}tJ--_#XNfeXMA|zdJehz$1q(*-oZrK9J_*0y zQwa9^KE-}NL2^54Or^aiz(_JBlEP#P3P&T*Cu$x~uodP_41a0wIf|*~RIy@9$V!v^ zo}_s=#gnEbq2)Hodpzo)3C}Z;=vmA3JV_<>%$c_5PhY*idpONQYIrKShG)9rZ4a!f^ZM=^ zA;v;|&daMwW`9{$HHB2A@AIjrQ&i_q3Yig|KQr|H_L%|6SHBQxe$f$q^@|A=$xAp( zXz8XshBg^x%sor!2`9(jHd#TfHO=UFer`la?cG-)J*`nsKc^)1_p8t#^K{>DQc99P z-4)U^%W3cWl(MF>)_O*h?*A3dH91LW`3xMCCYgFnZGTLyke;@AWy(x$Os&u$vsq(8 z%0pFhI<=A-;#Thr$?=BHjWM#hXo$}TA}J)alz47Jc>cB_jkNn&!}t1kCggc7s0~_)Xld08Q%;%xE@tp5u|aP2 z(u99kQh)mrB($t}Zb)cbbV}PABDF13+QSUm!yxU!kk+BIIzyz6At&C@yY5A9h`oJl zq5^#=9vX)Y2jRV7RHLCp^pt`bnG5=;KQ!bUj`#cWMX=8~)w4Q_>8VdIP56uCwH8$N zR!Ga;zA|FwIn^>N5j`tjm~hT;tp@!nQ>UsDX@8EiDcRAu3TpYUug$cO&y4JDoTLW$ zn|DU!<*}fadn2PKR&R`GeEXT{<_@dlG?gjAuV_N%7|HgRrx?#q`Q^V^Pk_EsPMun zA~__qw0LenxDn_D#DTb#(UG=qCTOMl5_!%AVF0{{+>>5jOmNma!DPL$37i*^d(O)X zGfs!j=?rl?hMX>)(;eb;CpeS5{*+6hK7TQ9OxlsTW9_^#qb(~kYgrADmX#Uj=NY7* z2U$N)((cOi<7Us~N5MCQjSzQo_w=`KO;nHvRzYF13Ku!83YWJNDpV!oscMmRY0lpf zx+m|v8fQ*LZf+q};yWhwXo6vvn@?n@#Pj9_8iDB<-&hzF+%9zfLn8x5R9<5*n`N`6S^BVaRHe_o-f{hANfDq47969>;)Z zvlWG?2rfrgNW*!4HO*Y^UPv|92xu79<0&>tAd)=}ISKzv!GG=(OzcS^E;MSF7)=%z ziOY)G1x1skMCu}HCy53 zxnzmjp-=Qf?&NyhH*cp@c*!}1Staigs)v(2dxEWLllOV{QL@ff-0MY&x;od1CsYi@Nk0Xg;G>6{gQf_EGWWKXn*;0a>)}3 z5Rz|rzLyl5vrM1v{AQANZ&L{OcAsi*PmsJ4de3XG%e+qXlMFHDSIs%HO;J|nL*<>^ z9qrv)0~M;hoT0#3N=JWwXMaLo5|)525?a#oU{c^RWjlc;R@NKkv>nrW)9jHUZA+d+ z(kVEWenRoAR{xo+*QUQ$qJ3&a=G1b`^#z$5m1IsX%6y6DHX(syL^tkdEADdBGwmGrktPx)JAL?~Z4l@TI(O1zlllm|vw zS2+vx`I^TQY$d@LQi<G_QrZBf=_TF4C0;*A+CAv(K?43JL6 zY4pQLL&uN|4{mY0eP)by;P>EH3d3fv#$7{V%HI&zEjK5M2)(lT6MY!OmwM)e5i;EWsZ3Opm-^o2d%{5=t+ZCHyELXs zwON?0Rex7}P_1qvBfV-?smvVeV?}LLH?n$-x+%=mDG#%?xrz=bb4@Uz3t|6VfAihs z&O0Qa4e@RIK8?W;Pdzz2aAw%-wD4YCUV7LOY{5z3p6&E_oUIUBriL41wzI$;+xhVn z+b8P2zN<)&@srVhJ~;Nod83QOJ>&WLIAK{3c7G45#CJ66(KG|B(?>y~X(TjU&GQMu zBW1m#NqtXroLuWT5aucly{U@B)Jz5a?zo|g;|y<&JCvUYh1R6LCsNNQNGQ9HHCvCT z_Z^eBs19sUHQSzgPQ^FGQ1o7Kfc^Y>T#JhFoE7H1_>}&R^YnCzs^I1Rt3*^qdED)C z0)OYNV2}LvwUHKSd*^RXxk8~Ys@J5Gz(|+vaj))sCaTd&={0EI8IgY!uT*A;=xOo7 zh_e~6Us#o+pqkxp^h(e`=ylR0G}3XNT4S0J$kji2QB&DZVtV@1OCx?M2uF)MGJ0n9 z#*CJ96GK;MfOz^YhEvMAIyPtI_{`>bFMqGs=RTE@YR4kaDC<+VVtPeRFDLlvm&^=a zFJpSKOeOYAU3Xs*C{GeS#?$jD!h;}OdD$lKQK^ShJhUrZ^ta>~-H%h{+h^*sct_@* z^7>|imUJPH?kXOGOL%D4@8~YxF}QL^GD4K765mm%N7D?O?e>_FXc`F(SM%I}P=B&a z)S{4OC271JK^=YP^|Thhlc;~!@cnK;(j320A7LSkWA}nO>dxy4ErdD)IO}|2U-Vv+ zUIKGnh;tHs(Ggut<|t&o-Is(Fo>TgJ*7oTnRYBn?`Xt2^1BIZEKMns(!GG=(OdL{{ zWmZ!bC{O9{dD^E_R0PAVxl?}nLVtOh_o#Cl4g5vY_@fzq3`QT?9bMYnxlHcmqTa}* zzl+Q07A{${^rJbEN_|hGo=uSutV-RpDD{*zQOf~p$8;_Tf!U2zkFxV_ikxP(wU*k% zIvNLY8_98k5KS$(OJVT)$>^@tS-s(&wryDD#IMnSXoE>zi@f zni1y4RpL7$^=O)5!**q{-H?`s?&LJQowrje6a?C$M^#M1KU46Z`veo?Z0j9!!Zxmp z#68#f`2->5ID6ec#9mJxU5D{9H|Z+zJp&$1Fp#ej9J)l%@cO{I$_Z3?k0hUj-%;>) zeS+O2!;!*p>@yt48PrENn}3_-Hl)Kxw_3{RPk=|`44<9_!FOy@-*Gh0#z}q`72$TKCiNXj^UQ#Rw)A@y(b0`B{uTvk z`LC1w%GG%|#zXHzJ)s*;!~WCx0;#&|u1RcsnZcm&Rg=LagBl$%%6~{09U(S^W2b$o zs}B8lCgg^_@>W7iI@UjLlWjib_4DSy>SsFjRdz^;YYG!}D#4Ft^HV(`tpe>U6Xs(v zui`IqTK>yhtqN@%)cMZw2yHj*olW_06HX0%%&zmxV*HtPJGPKE2sR`Of? ze*cU5eGzYF{bbYWTYnw3IQ>*7!1hJ++2b}J7i4w)h6bv+m7|gU8@pZvtv`2vIb8p@ zzg<3=*ZD;EZQ{-cy6->FeM-^n#?wf)yY$-cSgSwZT|O7BNqqYJbnoNS*H29AjP75* z&;Kpgq75g%G0n}BDUz4%Pi48&UQ#(Fa!Yo8YDVbL2^}q=Gk-<+Z>&zAf7FjOQzAEn zm!}hi-wa*)Ihy{4>YJN8KS$&oB9GJOaZGqzB9GhWai@5`t;$1rtj&o|0yj*jXJ%BC z(z}T0=p4hmxpYETOE_7W-|Z8@d0uSI2`?fygqNoig#Z5C_x~{GQmJof)PpI8pD6@C z-{Jo}315}R1AomE38U$KLJ_q~DCEo0{efq7Gxn|2tp0l_?Yb3)+y3`Z>Ubm_~w&PJF;e|(-GFH(|K>E&fJ0-DHBq06l||{xzE(%Mp~!K zO#(BG4u7nI5ZX9hovWx$m+MT>P*K?r_{${ z=1_AM)TwZOXQ;w~&uO8pn3leILm{7SPH)ABm47icsOs3p{}PPzljW7%7EdaoyR z`RQjtiL9ICH;m1b36lRhAKRKSZ_t;$q3^#o)rA_<-3jWoFpBbi{^0{Hcs&W+P@bMm zQT_NMf#$~_Zz+EKaSEQ)czSKepy~Wv{`4Jz0jX~p@L+=B18HjM!~N9Khv})M58}6@ z>VJ%sz~?G+%XWD@#hH_GmEY$opUzcY9A%kvw)?4+%|TkW`>se!TK679xzlJk;gqIj zR?FuqFFq3Vy2#vWad|w&SqnmxsZ!ta;K2mLFKXkDI_V?`Myw-r!`FE}LHmz`Wc$O8 zFp{4oZV1m0C)nWQ)at8RYVwgVcYh;x!+(48#)N#kE32{|K00SC+gIb}H9?o*Q*-9R zgWB93pBqDb7W0bbSqv7*vmg}5vzS>FS3#`?gd!NZT-ijdPk(>Q@)*jj!XGMm^J1S@ z=7R-3UfP@NSft9@%QKqT9jB?aVmI9QZA`hH$+^8J-BMXM>~N^c&vVI7;yoQs&wpvE zsC^QT>eIpKE7f^vuG!3*xvv;Py*#su%TGq@7$d?r^p~f`O6&yt_`0cPHq5K^jT+a- z=6aOd&G5N5iukQ2*XJ}<1`mBv#QUn;o&qz#l2XX8lDtr_)2dWARTp(t9$x3EHVAj8 z>R>vm>Z!VQU7!y3`Hoc>kT&YY1Aofv0d?x@Q<5{VP@zwj_Cv+IWk)G z_M^I;5OjK-UXgWz@m1d=eps_Ej#j^J0;-mHxy_3WV(5=(x{vCrLDOlhNqxdqaxc$I~WSkBC@yw9$rWcPviLl=8c;|`h6 z%yfRA>70`3`H_w;%ArO$Du4Z9ca(Gam26J|^^l~2>8$>kbWe-X`F#zN(M-Qy?v{Ia z&c81`aIV`(?uNB{z#GyR0X_KT_30GM`DX_~P3q}|+xb-`_jml2vt4tdt|QufuXupD zeRn!c)BN2PY(}I3!IR(K2&xfLr*yk;uLo$~olfI4f1d@*gN_qV+keFWc@P!5VY;3p z)XH5B8J@(?zx(2&rx^dr*|%a>vr!Hs1nmjP^Gmu`8B1&JhgYZ&LwdDu>52^;R;2+9 zDb+o>YL2*nNT2gX&y|KSR9l^;>rc(pp`a?ww^;fFXsVGXnM0Rlgu!<2X7|Q zgtE6g^b9$E{^7%+Di8COJOOBRJG~>S^x@yXov#jrwW{DbQH|5QI2Wn*IQ9$_{RIb| z1VjzR=R;Yv+mjwuvj?TswU>&h@ULZFY-IW@hW3Td!qKXFn}39;=dRgScoCnk=pB$& z)4Mc8RaF%8Xysoqvcq7wBqNNXK^9k z|3m$L*U@yx)PJV}w7UMwzn-;~>_ts?t8-TBRL^;{;YIc+*;f3epQ?pvpFiRG(^>jM z^QgHm;``I1<~j@c?yfrS)f=u5Xxph0iQbex-$Jy{PPNy*{|S1(yQ_qI%DZX+Pp2Z( zMw(om>bZV|?5G4j$S4-g|9=^PI!)ukXLR zJUn3)$NlZ1|%O$WD@{VPM$7~Ar*{o?;hlAFyLXmaDC0y znK1_#cQqJWPES%4Uujug^TE?jMft$}Eq^WaR~)%f)vSNs&gek&x%A9X9sM - - - - - - -MLX: mlx/ops.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    ops.h File Reference
    -
    -
    -
    #include <optional>
    -#include "mlx/array.h"
    -#include "mlx/device.h"
    -#include "mlx/stream.h"
    -#include "mlx/utils.h"
    -
    -

    Go to the source code of this file.

    - - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    array mlx::core::arange (double start, double stop, double step, Dtype dtype, StreamOrDevice s={})
     A 1D array of numbers starting at start (optional), stopping at stop, stepping by step (optional).
     
    array mlx::core::arange (double start, double stop, double step, StreamOrDevice s={})
     
    array mlx::core::arange (double start, double stop, Dtype dtype, StreamOrDevice s={})
     
    array mlx::core::arange (double start, double stop, StreamOrDevice s={})
     
    array mlx::core::arange (double stop, Dtype dtype, StreamOrDevice s={})
     
    array mlx::core::arange (double stop, StreamOrDevice s={})
     
    array mlx::core::arange (int start, int stop, int step, StreamOrDevice s={})
     
    array mlx::core::arange (int start, int stop, StreamOrDevice s={})
     
    array mlx::core::arange (int stop, StreamOrDevice s={})
     
    array mlx::core::linspace (double start, double stop, int num=50, Dtype dtype=float32, StreamOrDevice s={})
     A 1D array of num evenly spaced numbers in the range [start, stop]
     
    array mlx::core::astype (array a, Dtype dtype, StreamOrDevice s={})
     Convert an array to the given data type.
     
    array mlx::core::as_strided (array a, std::vector< int > shape, std::vector< size_t > strides, size_t offset, StreamOrDevice s={})
     Create a view of an array with the given shape and strides.
     
    array mlx::core::copy (array a, StreamOrDevice s={})
     Copy another array.
     
    array mlx::core::full (std::vector< int > shape, array vals, Dtype dtype, StreamOrDevice s={})
     Fill an array of the given shape with the given value(s).
     
    array mlx::core::full (std::vector< int > shape, array vals, StreamOrDevice s={})
     
    template<typename T >
    array mlx::core::full (std::vector< int > shape, T val, Dtype dtype, StreamOrDevice s={})
     
    template<typename T >
    array mlx::core::full (std::vector< int > shape, T val, StreamOrDevice s={})
     
    array mlx::core::zeros (const std::vector< int > &shape, Dtype dtype, StreamOrDevice s={})
     Fill an array of the given shape with zeros.
     
    array mlx::core::zeros (const std::vector< int > &shape, StreamOrDevice s={})
     
    array mlx::core::zeros_like (const array &a, StreamOrDevice s={})
     
    array mlx::core::ones (const std::vector< int > &shape, Dtype dtype, StreamOrDevice s={})
     Fill an array of the given shape with ones.
     
    array mlx::core::ones (const std::vector< int > &shape, StreamOrDevice s={})
     
    array mlx::core::ones_like (const array &a, StreamOrDevice s={})
     
    array mlx::core::eye (int n, int m, int k, Dtype dtype, StreamOrDevice s={})
     Fill an array of the given shape (n,m) with ones in the specified diagonal k, and zeros everywhere else.
     
    array mlx::core::eye (int n, Dtype dtype, StreamOrDevice s={})
     
    array mlx::core::eye (int n, int m, StreamOrDevice s={})
     
    array mlx::core::eye (int n, int m, int k, StreamOrDevice s={})
     
    array mlx::core::eye (int n, StreamOrDevice s={})
     
    array mlx::core::identity (int n, Dtype dtype, StreamOrDevice s={})
     Create a square matrix of shape (n,n) of zeros, and ones in the major diagonal.
     
    array mlx::core::identity (int n, StreamOrDevice s={})
     
    array mlx::core::tri (int n, int m, int k, Dtype type, StreamOrDevice s={})
     
    array mlx::core::tri (int n, Dtype type, StreamOrDevice s={})
     
    array mlx::core::tril (array x, int k=0, StreamOrDevice s={})
     
    array mlx::core::triu (array x, int k=0, StreamOrDevice s={})
     
    array mlx::core::reshape (const array &a, std::vector< int > shape, StreamOrDevice s={})
     Reshape an array to the given shape.
     
    array mlx::core::flatten (const array &a, int start_axis, int end_axis=-1, StreamOrDevice s={})
     Flatten the dimensions in the range [start_axis, end_axis] .
     
    array mlx::core::flatten (const array &a, StreamOrDevice s={})
     Flatten the array to 1D.
     
    array mlx::core::squeeze (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     Remove singleton dimensions at the given axes.
     
    array mlx::core::squeeze (const array &a, int axis, StreamOrDevice s={})
     Remove singleton dimensions at the given axis.
     
    array mlx::core::squeeze (const array &a, StreamOrDevice s={})
     Remove all singleton dimensions.
     
    array mlx::core::expand_dims (const array &a, const std::vector< int > &axes, StreamOrDevice s={})
     Add a singleton dimension at the given axes.
     
    array mlx::core::expand_dims (const array &a, int axis, StreamOrDevice s={})
     Add a singleton dimension at the given axis.
     
    array mlx::core::slice (const array &a, std::vector< int > start, std::vector< int > stop, std::vector< int > strides, StreamOrDevice s={})
     Slice an array.
     
    array mlx::core::slice (const array &a, const std::vector< int > &start, const std::vector< int > &stop, StreamOrDevice s={})
     Slice an array with a stride of 1 in each dimension.
     
    array mlx::core::slice_update (const array &src, const array &update, std::vector< int > start, std::vector< int > stop, std::vector< int > strides, StreamOrDevice s={})
     Update a slice from the source array.
     
    array mlx::core::slice_update (const array &src, const array &update, std::vector< int > start, std::vector< int > stop, StreamOrDevice s={})
     Update a slice from the source array with stride 1 in each dimension.
     
    std::vector< arraymlx::core::split (const array &a, int num_splits, int axis, StreamOrDevice s={})
     Split an array into sub-arrays along a given axis.
     
    std::vector< arraymlx::core::split (const array &a, int num_splits, StreamOrDevice s={})
     
    std::vector< arraymlx::core::split (const array &a, const std::vector< int > &indices, int axis, StreamOrDevice s={})
     
    std::vector< arraymlx::core::split (const array &a, const std::vector< int > &indices, StreamOrDevice s={})
     
    std::vector< arraymlx::core::meshgrid (const std::vector< array > &arrays, bool sparse=false, std::string indexing="xy", StreamOrDevice s={})
     A vector of coordinate arrays from coordinate vectors.
     
    array mlx::core::clip (const array &a, const std::optional< array > &a_min=std::nullopt, const std::optional< array > &a_max=std::nullopt, StreamOrDevice s={})
     Clip (limit) the values in an array.
     
    array mlx::core::concatenate (const std::vector< array > &arrays, int axis, StreamOrDevice s={})
     Concatenate arrays along a given axis.
     
    array mlx::core::concatenate (const std::vector< array > &arrays, StreamOrDevice s={})
     
    array mlx::core::stack (const std::vector< array > &arrays, int axis, StreamOrDevice s={})
     Stack arrays along a new axis.
     
    array mlx::core::stack (const std::vector< array > &arrays, StreamOrDevice s={})
     
    array mlx::core::repeat (const array &arr, int repeats, int axis, StreamOrDevice s={})
     Repeat an array along an axis.
     
    array mlx::core::repeat (const array &arr, int repeats, StreamOrDevice s={})
     
    array mlx::core::tile (const array &arr, std::vector< int > reps, StreamOrDevice s={})
     
    array mlx::core::transpose (const array &a, std::vector< int > axes, StreamOrDevice s={})
     Permutes the dimensions according to the given axes.
     
    array mlx::core::transpose (const array &a, std::initializer_list< int > axes, StreamOrDevice s={})
     
    array mlx::core::swapaxes (const array &a, int axis1, int axis2, StreamOrDevice s={})
     Swap two axes of an array.
     
    array mlx::core::moveaxis (const array &a, int source, int destination, StreamOrDevice s={})
     Move an axis of an array.
     
    array mlx::core::pad (const array &a, const std::vector< int > &axes, const std::vector< int > &low_pad_size, const std::vector< int > &high_pad_size, const array &pad_value=array(0), StreamOrDevice s={})
     Pad an array with a constant value.
     
    array mlx::core::pad (const array &a, const std::vector< std::pair< int, int > > &pad_width, const array &pad_value=array(0), StreamOrDevice s={})
     Pad an array with a constant value along all axes.
     
    array mlx::core::pad (const array &a, const std::pair< int, int > &pad_width, const array &pad_value=array(0), StreamOrDevice s={})
     
    array mlx::core::pad (const array &a, int pad_width, const array &pad_value=array(0), StreamOrDevice s={})
     
    array mlx::core::transpose (const array &a, StreamOrDevice s={})
     Permutes the dimensions in reverse order.
     
    array mlx::core::broadcast_to (const array &a, const std::vector< int > &shape, StreamOrDevice s={})
     Broadcast an array to a given shape.
     
    std::vector< arraymlx::core::broadcast_arrays (const std::vector< array > &inputs, StreamOrDevice s={})
     Broadcast a vector of arrays against one another.
     
    array mlx::core::equal (const array &a, const array &b, StreamOrDevice s={})
     Returns the bool array with (a == b) element-wise.
     
    array mlx::core::operator== (const array &a, const array &b)
     
    template<typename T >
    array mlx::core::operator== (T a, const array &b)
     
    template<typename T >
    array mlx::core::operator== (const array &a, T b)
     
    array mlx::core::not_equal (const array &a, const array &b, StreamOrDevice s={})
     Returns the bool array with (a != b) element-wise.
     
    array mlx::core::operator!= (const array &a, const array &b)
     
    template<typename T >
    array mlx::core::operator!= (T a, const array &b)
     
    template<typename T >
    array mlx::core::operator!= (const array &a, T b)
     
    array mlx::core::greater (const array &a, const array &b, StreamOrDevice s={})
     Returns bool array with (a > b) element-wise.
     
    array mlx::core::operator> (const array &a, const array &b)
     
    template<typename T >
    array mlx::core::operator> (T a, const array &b)
     
    template<typename T >
    array mlx::core::operator> (const array &a, T b)
     
    array mlx::core::greater_equal (const array &a, const array &b, StreamOrDevice s={})
     Returns bool array with (a >= b) element-wise.
     
    array mlx::core::operator>= (const array &a, const array &b)
     
    template<typename T >
    array mlx::core::operator>= (T a, const array &b)
     
    template<typename T >
    array mlx::core::operator>= (const array &a, T b)
     
    array mlx::core::less (const array &a, const array &b, StreamOrDevice s={})
     Returns bool array with (a < b) element-wise.
     
    array mlx::core::operator< (const array &a, const array &b)
     
    template<typename T >
    array mlx::core::operator< (T a, const array &b)
     
    template<typename T >
    array mlx::core::operator< (const array &a, T b)
     
    array mlx::core::less_equal (const array &a, const array &b, StreamOrDevice s={})
     Returns bool array with (a <= b) element-wise.
     
    array mlx::core::operator<= (const array &a, const array &b)
     
    template<typename T >
    array mlx::core::operator<= (T a, const array &b)
     
    template<typename T >
    array mlx::core::operator<= (const array &a, T b)
     
    array mlx::core::array_equal (const array &a, const array &b, bool equal_nan, StreamOrDevice s={})
     True if two arrays have the same shape and elements.
     
    array mlx::core::array_equal (const array &a, const array &b, StreamOrDevice s={})
     
    array mlx::core::isnan (const array &a, StreamOrDevice s={})
     
    array mlx::core::isinf (const array &a, StreamOrDevice s={})
     
    array mlx::core::isposinf (const array &a, StreamOrDevice s={})
     
    array mlx::core::isneginf (const array &a, StreamOrDevice s={})
     
    array mlx::core::where (const array &condition, const array &x, const array &y, StreamOrDevice s={})
     Select from x or y depending on condition.
     
    array mlx::core::all (const array &a, bool keepdims, StreamOrDevice s={})
     True if all elements in the array are true (or non-zero).
     
    array mlx::core::all (const array &a, StreamOrDevice s={})
     
    array mlx::core::allclose (const array &a, const array &b, double rtol=1e-5, double atol=1e-8, bool equal_nan=false, StreamOrDevice s={})
     True if the two arrays are equal within the specified tolerance.
     
    array mlx::core::isclose (const array &a, const array &b, double rtol=1e-5, double atol=1e-8, bool equal_nan=false, StreamOrDevice s={})
     Returns a boolean array where two arrays are element-wise equal within the specified tolerance.
     
    array mlx::core::all (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     Reduces the input along the given axes.
     
    array mlx::core::all (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Reduces the input along the given axis.
     
    array mlx::core::any (const array &a, bool keepdims, StreamOrDevice s={})
     True if any elements in the array are true (or non-zero).
     
    array mlx::core::any (const array &a, StreamOrDevice s={})
     
    array mlx::core::any (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     Reduces the input along the given axes.
     
    array mlx::core::any (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Reduces the input along the given axis.
     
    array mlx::core::sum (const array &a, bool keepdims, StreamOrDevice s={})
     Sums the elements of an array.
     
    array mlx::core::sum (const array &a, StreamOrDevice s={})
     
    array mlx::core::sum (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     Sums the elements of an array along the given axes.
     
    array mlx::core::sum (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Sums the elements of an array along the given axis.
     
    array mlx::core::mean (const array &a, bool keepdims, StreamOrDevice s={})
     Computes the mean of the elements of an array.
     
    array mlx::core::mean (const array &a, StreamOrDevice s={})
     
    array mlx::core::mean (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     Computes the mean of the elements of an array along the given axes.
     
    array mlx::core::mean (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Computes the mean of the elements of an array along the given axis.
     
    array mlx::core::var (const array &a, bool keepdims, int ddof=0, StreamOrDevice s={})
     Computes the variance of the elements of an array.
     
    array mlx::core::var (const array &a, StreamOrDevice s={})
     
    array mlx::core::var (const array &a, const std::vector< int > &axes, bool keepdims=false, int ddof=0, StreamOrDevice s={})
     Computes the variance of the elements of an array along the given axes.
     
    array mlx::core::var (const array &a, int axis, bool keepdims=false, int ddof=0, StreamOrDevice s={})
     Computes the variance of the elements of an array along the given axis.
     
    array mlx::core::std (const array &a, bool keepdims, int ddof=0, StreamOrDevice s={})
     Computes the standard deviation of the elements of an array.
     
    array mlx::core::std (const array &a, StreamOrDevice s={})
     
    array mlx::core::std (const array &a, const std::vector< int > &axes, bool keepdims=false, int ddof=0, StreamOrDevice s={})
     Computes the standard deviatoin of the elements of an array along the given axes.
     
    array mlx::core::std (const array &a, int axis, bool keepdims=false, int ddof=0, StreamOrDevice s={})
     Computes the standard deviation of the elements of an array along the given axis.
     
    array mlx::core::prod (const array &a, bool keepdims, StreamOrDevice s={})
     The product of all elements of the array.
     
    array mlx::core::prod (const array &a, StreamOrDevice s={})
     
    array mlx::core::prod (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     The product of the elements of an array along the given axes.
     
    array mlx::core::prod (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     The product of the elements of an array along the given axis.
     
    array mlx::core::max (const array &a, bool keepdims, StreamOrDevice s={})
     The maximum of all elements of the array.
     
    array mlx::core::max (const array &a, StreamOrDevice s={})
     
    array mlx::core::max (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     The maximum of the elements of an array along the given axes.
     
    array mlx::core::max (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     The maximum of the elements of an array along the given axis.
     
    array mlx::core::min (const array &a, bool keepdims, StreamOrDevice s={})
     The minimum of all elements of the array.
     
    array mlx::core::min (const array &a, StreamOrDevice s={})
     
    array mlx::core::min (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     The minimum of the elements of an array along the given axes.
     
    array mlx::core::min (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     The minimum of the elements of an array along the given axis.
     
    array mlx::core::argmin (const array &a, bool keepdims, StreamOrDevice s={})
     Returns the index of the minimum value in the array.
     
    array mlx::core::argmin (const array &a, StreamOrDevice s={})
     
    array mlx::core::argmin (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Returns the indices of the minimum values along a given axis.
     
    array mlx::core::argmax (const array &a, bool keepdims, StreamOrDevice s={})
     Returns the index of the maximum value in the array.
     
    array mlx::core::argmax (const array &a, StreamOrDevice s={})
     
    array mlx::core::argmax (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     Returns the indices of the maximum values along a given axis.
     
    array mlx::core::sort (const array &a, StreamOrDevice s={})
     Returns a sorted copy of the flattened array.
     
    array mlx::core::sort (const array &a, int axis, StreamOrDevice s={})
     Returns a sorted copy of the array along a given axis.
     
    array mlx::core::argsort (const array &a, StreamOrDevice s={})
     Returns indices that sort the flattened array.
     
    array mlx::core::argsort (const array &a, int axis, StreamOrDevice s={})
     Returns indices that sort the array along a given axis.
     
    array mlx::core::partition (const array &a, int kth, StreamOrDevice s={})
     Returns a partitioned copy of the flattened array such that the smaller kth elements are first.
     
    array mlx::core::partition (const array &a, int kth, int axis, StreamOrDevice s={})
     Returns a partitioned copy of the array along a given axis such that the smaller kth elements are first.
     
    array mlx::core::argpartition (const array &a, int kth, StreamOrDevice s={})
     Returns indices that partition the flattened array such that the smaller kth elements are first.
     
    array mlx::core::argpartition (const array &a, int kth, int axis, StreamOrDevice s={})
     Returns indices that partition the array along a given axis such that the smaller kth elements are first.
     
    array mlx::core::topk (const array &a, int k, StreamOrDevice s={})
     Returns topk elements of the flattened array.
     
    array mlx::core::topk (const array &a, int k, int axis, StreamOrDevice s={})
     Returns topk elements of the array along a given axis.
     
    array mlx::core::logsumexp (const array &a, bool keepdims, StreamOrDevice s={})
     The logsumexp of all elements of the array.
     
    array mlx::core::logsumexp (const array &a, StreamOrDevice s={})
     
    array mlx::core::logsumexp (const array &a, const std::vector< int > &axes, bool keepdims=false, StreamOrDevice s={})
     The logsumexp of the elements of an array along the given axes.
     
    array mlx::core::logsumexp (const array &a, int axis, bool keepdims=false, StreamOrDevice s={})
     The logsumexp of the elements of an array along the given axis.
     
    array mlx::core::abs (const array &a, StreamOrDevice s={})
     Absolute value of elements in an array.
     
    array mlx::core::negative (const array &a, StreamOrDevice s={})
     Negate an array.
     
    array mlx::core::operator- (const array &a)
     
    array mlx::core::sign (const array &a, StreamOrDevice s={})
     The sign of the elements in an array.
     
    array mlx::core::logical_not (const array &a, StreamOrDevice s={})
     Logical not of an array.
     
    array mlx::core::logical_and (const array &a, const array &b, StreamOrDevice s={})
     Logical and of two arrays.
     
    array mlx::core::operator&& (const array &a, const array &b)
     
    array mlx::core::logical_or (const array &a, const array &b, StreamOrDevice s={})
     Logical or of two arrays.
     
    array mlx::core::operator|| (const array &a, const array &b)
     
    array mlx::core::reciprocal (const array &a, StreamOrDevice s={})
     The reciprocal (1/x) of the elements in an array.
     
    array mlx::core::add (const array &a, const array &b, StreamOrDevice s={})
     Add two arrays.
     
    array mlx::core::operator+ (const array &a, const array &b)
     
    template<typename T >
    array mlx::core::operator+ (T a, const array &b)
     
    template<typename T >
    array mlx::core::operator+ (const array &a, T b)
     
    array mlx::core::subtract (const array &a, const array &b, StreamOrDevice s={})
     Subtract two arrays.
     
    array mlx::core::operator- (const array &a, const array &b)
     
    template<typename T >
    array mlx::core::operator- (T a, const array &b)
     
    template<typename T >
    array mlx::core::operator- (const array &a, T b)
     
    array mlx::core::multiply (const array &a, const array &b, StreamOrDevice s={})
     Multiply two arrays.
     
    array mlx::core::operator* (const array &a, const array &b)
     
    template<typename T >
    array mlx::core::operator* (T a, const array &b)
     
    template<typename T >
    array mlx::core::operator* (const array &a, T b)
     
    array mlx::core::divide (const array &a, const array &b, StreamOrDevice s={})
     Divide two arrays.
     
    array mlx::core::operator/ (const array &a, const array &b)
     
    array mlx::core::operator/ (double a, const array &b)
     
    array mlx::core::operator/ (const array &a, double b)
     
    std::vector< arraymlx::core::divmod (const array &a, const array &b, StreamOrDevice s={})
     Compute the element-wise quotient and remainder.
     
    array mlx::core::floor_divide (const array &a, const array &b, StreamOrDevice s={})
     Compute integer division.
     
    array mlx::core::remainder (const array &a, const array &b, StreamOrDevice s={})
     Compute the element-wise remainder of division.
     
    array mlx::core::operator% (const array &a, const array &b)
     
    template<typename T >
    array mlx::core::operator% (T a, const array &b)
     
    template<typename T >
    array mlx::core::operator% (const array &a, T b)
     
    array mlx::core::maximum (const array &a, const array &b, StreamOrDevice s={})
     Element-wise maximum between two arrays.
     
    array mlx::core::minimum (const array &a, const array &b, StreamOrDevice s={})
     Element-wise minimum between two arrays.
     
    array mlx::core::floor (const array &a, StreamOrDevice s={})
     Floor the element of an array.
     
    array mlx::core::ceil (const array &a, StreamOrDevice s={})
     Ceil the element of an array.
     
    array mlx::core::square (const array &a, StreamOrDevice s={})
     Square the elements of an array.
     
    array mlx::core::exp (const array &a, StreamOrDevice s={})
     Exponential of the elements of an array.
     
    array mlx::core::sin (const array &a, StreamOrDevice s={})
     Sine of the elements of an array.
     
    array mlx::core::cos (const array &a, StreamOrDevice s={})
     Cosine of the elements of an array.
     
    array mlx::core::tan (const array &a, StreamOrDevice s={})
     Tangent of the elements of an array.
     
    array mlx::core::arcsin (const array &a, StreamOrDevice s={})
     Arc Sine of the elements of an array.
     
    array mlx::core::arccos (const array &a, StreamOrDevice s={})
     Arc Cosine of the elements of an array.
     
    array mlx::core::arctan (const array &a, StreamOrDevice s={})
     Arc Tangent of the elements of an array.
     
    array mlx::core::arctan2 (const array &a, const array &b, StreamOrDevice s={})
     Inverse tangent of the ratio of two arrays.
     
    array mlx::core::sinh (const array &a, StreamOrDevice s={})
     Hyperbolic Sine of the elements of an array.
     
    array mlx::core::cosh (const array &a, StreamOrDevice s={})
     Hyperbolic Cosine of the elements of an array.
     
    array mlx::core::tanh (const array &a, StreamOrDevice s={})
     Hyperbolic Tangent of the elements of an array.
     
    array mlx::core::arcsinh (const array &a, StreamOrDevice s={})
     Inverse Hyperbolic Sine of the elements of an array.
     
    array mlx::core::arccosh (const array &a, StreamOrDevice s={})
     Inverse Hyperbolic Cosine of the elements of an array.
     
    array mlx::core::arctanh (const array &a, StreamOrDevice s={})
     Inverse Hyperbolic Tangent of the elements of an array.
     
    array mlx::core::degrees (const array &a, StreamOrDevice s={})
     Convert the elements of an array from Radians to Degrees.
     
    array mlx::core::radians (const array &a, StreamOrDevice s={})
     Convert the elements of an array from Degrees to Radians.
     
    array mlx::core::log (const array &a, StreamOrDevice s={})
     Natural logarithm of the elements of an array.
     
    array mlx::core::log2 (const array &a, StreamOrDevice s={})
     Log base 2 of the elements of an array.
     
    array mlx::core::log10 (const array &a, StreamOrDevice s={})
     Log base 10 of the elements of an array.
     
    array mlx::core::log1p (const array &a, StreamOrDevice s={})
     Natural logarithm of one plus elements in the array: log(1 + a).
     
    array mlx::core::logaddexp (const array &a, const array &b, StreamOrDevice s={})
     Log-add-exp of one elements in the array: log(exp(a) + exp(b)).
     
    array mlx::core::sigmoid (const array &a, StreamOrDevice s={})
     Element-wise logistic sigmoid of the array: 1 / (1 + exp(-x).
     
    array mlx::core::erf (const array &a, StreamOrDevice s={})
     Computes the error function of the elements of an array.
     
    array mlx::core::erfinv (const array &a, StreamOrDevice s={})
     Computes the inverse error function of the elements of an array.
     
    array mlx::core::expm1 (const array &a, StreamOrDevice s={})
     Computes the expm1 function of the elements of an array.
     
    array mlx::core::stop_gradient (const array &a, StreamOrDevice s={})
     Stop the flow of gradients.
     
    array mlx::core::round (const array &a, int decimals, StreamOrDevice s={})
     Round a floating point number.
     
    array mlx::core::round (const array &a, StreamOrDevice s={})
     
    array mlx::core::matmul (const array &a, const array &b, StreamOrDevice s={})
     Matrix-matrix multiplication.
     
    array mlx::core::gather (const array &a, const std::vector< array > &indices, const std::vector< int > &axes, const std::vector< int > &slice_sizes, StreamOrDevice s={})
     Gather array entries given indices and slices.
     
    array mlx::core::gather (const array &a, const array &indices, int axis, const std::vector< int > &slice_sizes, StreamOrDevice s={})
     
    array mlx::core::take (const array &a, const array &indices, int axis, StreamOrDevice s={})
     Take array slices at the given indices of the specified axis.
     
    array mlx::core::take (const array &a, const array &indices, StreamOrDevice s={})
     Take array entries at the given indices treating the array as flattened.
     
    array mlx::core::take_along_axis (const array &a, const array &indices, int axis, StreamOrDevice s={})
     Take array entries given indices along the axis.
     
    array mlx::core::scatter (const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
     Scatter updates to given linear indices.
     
    array mlx::core::scatter (const array &a, const array &indices, const array &updates, int axis, StreamOrDevice s={})
     
    array mlx::core::scatter_add (const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
     Scatter and add updates to given indices.
     
    array mlx::core::scatter_add (const array &a, const array &indices, const array &updates, int axis, StreamOrDevice s={})
     
    array mlx::core::scatter_prod (const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
     Scatter and prod updates to given indices.
     
    array mlx::core::scatter_prod (const array &a, const array &indices, const array &updates, int axis, StreamOrDevice s={})
     
    array mlx::core::scatter_max (const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
     Scatter and max updates to given linear indices.
     
    array mlx::core::scatter_max (const array &a, const array &indices, const array &updates, int axis, StreamOrDevice s={})
     
    array mlx::core::scatter_min (const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
     Scatter and min updates to given linear indices.
     
    array mlx::core::scatter_min (const array &a, const array &indices, const array &updates, int axis, StreamOrDevice s={})
     
    array mlx::core::sqrt (const array &a, StreamOrDevice s={})
     Square root the elements of an array.
     
    array mlx::core::rsqrt (const array &a, StreamOrDevice s={})
     Square root and reciprocal the elements of an array.
     
    array mlx::core::softmax (const array &a, const std::vector< int > &axes, bool precise=false, StreamOrDevice s={})
     Softmax of an array.
     
    array mlx::core::softmax (const array &a, bool precise=false, StreamOrDevice s={})
     Softmax of an array.
     
    array mlx::core::softmax (const array &a, int axis, bool precise=false, StreamOrDevice s={})
     Softmax of an array.
     
    array mlx::core::power (const array &a, const array &b, StreamOrDevice s={})
     Raise elements of a to the power of b element-wise.
     
    array mlx::core::cumsum (const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
     Cumulative sum of an array.
     
    array mlx::core::cumprod (const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
     Cumulative product of an array.
     
    array mlx::core::cummax (const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
     Cumulative max of an array.
     
    array mlx::core::cummin (const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
     Cumulative min of an array.
     
    array mlx::core::conv_general (array input, array weight, std::vector< int > stride={}, std::vector< int > padding_lo={}, std::vector< int > padding_hi={}, std::vector< int > kernel_dilation={}, std::vector< int > input_dilation={}, int groups=1, bool flip=false, StreamOrDevice s={})
     General convolution with a filter.
     
    array mlx::core::conv_general (const array &input, const array &weight, std::vector< int > stride={}, std::vector< int > padding={}, std::vector< int > kernel_dilation={}, std::vector< int > input_dilation={}, int groups=1, bool flip=false, StreamOrDevice s={})
     General convolution with a filter.
     
    array mlx::core::conv1d (const array &input, const array &weight, int stride=1, int padding=0, int dilation=1, int groups=1, StreamOrDevice s={})
     1D convolution with a filter
     
    array mlx::core::conv2d (const array &input, const array &weight, const std::pair< int, int > &stride={1, 1}, const std::pair< int, int > &padding={0, 0}, const std::pair< int, int > &dilation={1, 1}, int groups=1, StreamOrDevice s={})
     2D convolution with a filter
     
    array mlx::core::conv3d (const array &input, const array &weight, const std::tuple< int, int, int > &stride={1, 1, 1}, const std::tuple< int, int, int > &padding={0, 0, 0}, const std::tuple< int, int, int > &dilation={1, 1, 1}, int groups=1, StreamOrDevice s={})
     3D convolution with a filter
     
    array mlx::core::quantized_matmul (const array &x, const array &w, const array &scales, const array &biases, bool transpose=true, int group_size=64, int bits=4, StreamOrDevice s={})
     Quantized matmul multiplies x with a quantized matrix w.
     
    std::tuple< array, array, arraymlx::core::quantize (const array &w, int group_size=64, int bits=4, StreamOrDevice s={})
     Quantize a matrix along its last axis.
     
    array mlx::core::dequantize (const array &w, const array &scales, const array &biases, int group_size=64, int bits=4, StreamOrDevice s={})
     Dequantize a matrix produced by quantize()
     
    array mlx::core::block_sparse_qmm (const array &x, const array &w, const array &scales, const array &biases, std::optional< array > lhs_indices=std::nullopt, std::optional< array > rhs_indices=std::nullopt, bool transpose=true, int group_size=64, int bits=4, StreamOrDevice s={})
     Compute matrix products with matrix-level gather.
     
    array mlx::core::tensordot (const array &a, const array &b, const int axis=2, StreamOrDevice s={})
     Returns a contraction of a and b over multiple dimensions.
     
    array mlx::core::tensordot (const array &a, const array &b, const std::vector< int > &axes_a, const std::vector< int > &axes_b, StreamOrDevice s={})
     
    array mlx::core::outer (const array &a, const array &b, StreamOrDevice s={})
     Compute the outer product of two vectors.
     
    array mlx::core::inner (const array &a, const array &b, StreamOrDevice s={})
     Compute the inner product of two vectors.
     
    array mlx::core::addmm (array c, array a, array b, const float &alpha=1.f, const float &beta=1.f, StreamOrDevice s={})
     Compute D = beta * C + alpha * (A @ B)
     
    array mlx::core::block_masked_mm (array a, array b, int block_size, std::optional< array > mask_out=std::nullopt, std::optional< array > mask_lhs=std::nullopt, std::optional< array > mask_rhs=std::nullopt, StreamOrDevice s={})
     Compute matrix product with block masking.
     
    array mlx::core::block_sparse_mm (array a, array b, std::optional< array > lhs_indices=std::nullopt, std::optional< array > rhs_indices=std::nullopt, StreamOrDevice s={})
     Compute matrix product with matrix-level gather.
     
    array mlx::core::diagonal (const array &a, int offset=0, int axis1=0, int axis2=1, StreamOrDevice s={})
     Extract a diagonal or construct a diagonal array.
     
    array mlx::core::diag (const array &a, int k=0, StreamOrDevice s={})
     Extract diagonal from a 2d array or create a diagonal matrix.
     
    std::vector< arraymlx::core::depends (const std::vector< array > &inputs, const std::vector< array > &dependencies)
     Implements the identity function but allows injecting dependencies to other arrays.
     
    array mlx::core::atleast_1d (const array &a, StreamOrDevice s={})
     convert an array to an atleast ndim array
     
    std::vector< arraymlx::core::atleast_1d (const std::vector< array > &a, StreamOrDevice s={})
     
    array mlx::core::atleast_2d (const array &a, StreamOrDevice s={})
     
    std::vector< arraymlx::core::atleast_2d (const std::vector< array > &a, StreamOrDevice s={})
     
    array mlx::core::atleast_3d (const array &a, StreamOrDevice s={})
     
    std::vector< arraymlx::core::atleast_3d (const std::vector< array > &a, StreamOrDevice s={})
     
    array mlx::core::number_of_elements (const array &a, std::vector< int > axes, bool inverted, Dtype dtype=int32, StreamOrDevice s={})
     Extract the number of elements along some axes as a scalar array.
     
    array mlx::core::conjugate (const array &a, StreamOrDevice s={})
     
    array mlx::core::bitwise_and (const array &a, const array &b, StreamOrDevice s={})
     Bitwise and.
     
    array mlx::core::operator& (const array &a, const array &b)
     
    array mlx::core::bitwise_or (const array &a, const array &b, StreamOrDevice s={})
     Bitwise inclusive or.
     
    array mlx::core::operator| (const array &a, const array &b)
     
    array mlx::core::bitwise_xor (const array &a, const array &b, StreamOrDevice s={})
     Bitwise exclusive or.
     
    array mlx::core::operator^ (const array &a, const array &b)
     
    array mlx::core::left_shift (const array &a, const array &b, StreamOrDevice s={})
     Shift bits to the left.
     
    array mlx::core::operator<< (const array &a, const array &b)
     
    array mlx::core::right_shift (const array &a, const array &b, StreamOrDevice s={})
     Shift bits to the right.
     
    array mlx::core::operator>> (const array &a, const array &b)
     
    -
    - - - - diff --git a/docs/build/html/ops_8h_source.html b/docs/build/html/ops_8h_source.html deleted file mode 100644 index 54ab050db..000000000 --- a/docs/build/html/ops_8h_source.html +++ /dev/null @@ -1,1455 +0,0 @@ - - - - - - - -MLX: mlx/ops.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    ops.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <optional>
    -
    6
    -
    7#include "mlx/array.h"
    -
    8#include "mlx/device.h"
    -
    9#include "mlx/stream.h"
    -
    10#include "mlx/utils.h"
    -
    11
    -
    12namespace mlx::core {
    -
    13
    - -
    23 double start,
    -
    24 double stop,
    -
    25 double step,
    -
    26 Dtype dtype,
    -
    27 StreamOrDevice s = {});
    -
    28array arange(double start, double stop, double step, StreamOrDevice s = {});
    -
    29array arange(double start, double stop, Dtype dtype, StreamOrDevice s = {});
    -
    30array arange(double start, double stop, StreamOrDevice s = {});
    -
    31array arange(double stop, Dtype dtype, StreamOrDevice s = {});
    -
    32array arange(double stop, StreamOrDevice s = {});
    -
    33
    -
    34array arange(int start, int stop, int step, StreamOrDevice s = {});
    -
    35array arange(int start, int stop, StreamOrDevice s = {});
    -
    36array arange(int stop, StreamOrDevice s = {});
    -
    37
    - -
    40 double start,
    -
    41 double stop,
    -
    42 int num = 50,
    -
    43 Dtype dtype = float32,
    -
    44 StreamOrDevice s = {});
    -
    45
    - -
    48
    - -
    51 array a,
    -
    52 std::vector<int> shape,
    -
    53 std::vector<size_t> strides,
    -
    54 size_t offset,
    -
    55 StreamOrDevice s = {});
    -
    56
    - -
    59
    - -
    62 std::vector<int> shape,
    -
    63 array vals,
    -
    64 Dtype dtype,
    -
    65 StreamOrDevice s = {});
    -
    66array full(std::vector<int> shape, array vals, StreamOrDevice s = {});
    -
    67template <typename T>
    -
    -
    68array full(std::vector<int> shape, T val, Dtype dtype, StreamOrDevice s = {}) {
    -
    69 return full(std::move(shape), array(val, dtype), to_stream(s));
    -
    70}
    -
    -
    71template <typename T>
    -
    -
    72array full(std::vector<int> shape, T val, StreamOrDevice s = {}) {
    -
    73 return full(std::move(shape), array(val), to_stream(s));
    -
    74}
    -
    -
    75
    -
    77array zeros(const std::vector<int>& shape, Dtype dtype, StreamOrDevice s = {});
    -
    -
    78inline array zeros(const std::vector<int>& shape, StreamOrDevice s = {}) {
    -
    79 return zeros(shape, float32, s);
    -
    80}
    -
    - -
    82
    -
    84array ones(const std::vector<int>& shape, Dtype dtype, StreamOrDevice s = {});
    -
    -
    85inline array ones(const std::vector<int>& shape, StreamOrDevice s = {}) {
    -
    86 return ones(shape, float32, s);
    -
    87}
    -
    - -
    89
    -
    92array eye(int n, int m, int k, Dtype dtype, StreamOrDevice s = {});
    -
    -
    93inline array eye(int n, Dtype dtype, StreamOrDevice s = {}) {
    -
    94 return eye(n, n, 0, dtype, s);
    -
    95}
    -
    -
    -
    96inline array eye(int n, int m, StreamOrDevice s = {}) {
    -
    97 return eye(n, m, 0, float32, s);
    -
    98}
    -
    -
    -
    99inline array eye(int n, int m, int k, StreamOrDevice s = {}) {
    -
    100 return eye(n, m, k, float32, s);
    -
    101}
    -
    -
    -
    102inline array eye(int n, StreamOrDevice s = {}) {
    -
    103 return eye(n, n, 0, float32, s);
    -
    104}
    -
    -
    105
    -
    108array identity(int n, Dtype dtype, StreamOrDevice s = {});
    -
    -
    109inline array identity(int n, StreamOrDevice s = {}) {
    -
    110 return identity(n, float32, s);
    -
    111}
    -
    -
    112
    -
    113array tri(int n, int m, int k, Dtype type, StreamOrDevice s = {});
    -
    -
    114inline array tri(int n, Dtype type, StreamOrDevice s = {}) {
    -
    115 return tri(n, n, 0, type, s);
    -
    116}
    -
    -
    117
    -
    118array tril(array x, int k = 0, StreamOrDevice s = {});
    -
    119array triu(array x, int k = 0, StreamOrDevice s = {});
    -
    120
    -
    122array reshape(const array& a, std::vector<int> shape, StreamOrDevice s = {});
    -
    123
    - -
    126 const array& a,
    -
    127 int start_axis,
    -
    128 int end_axis = -1,
    -
    129 StreamOrDevice s = {});
    -
    130
    - -
    133
    - -
    136 const array& a,
    -
    137 const std::vector<int>& axes,
    -
    138 StreamOrDevice s = {});
    -
    139
    -
    -
    141inline array squeeze(const array& a, int axis, StreamOrDevice s = {}) {
    -
    142 return squeeze(a, std::vector<int>{axis}, s);
    -
    143}
    -
    -
    144
    - -
    147
    - -
    150 const array& a,
    -
    151 const std::vector<int>& axes,
    -
    152 StreamOrDevice s = {});
    -
    153
    -
    155array expand_dims(const array& a, int axis, StreamOrDevice s = {});
    -
    156
    - -
    159 const array& a,
    -
    160 std::vector<int> start,
    -
    161 std::vector<int> stop,
    -
    162 std::vector<int> strides,
    -
    163 StreamOrDevice s = {});
    -
    164
    - -
    167 const array& a,
    -
    168 const std::vector<int>& start,
    -
    169 const std::vector<int>& stop,
    -
    170 StreamOrDevice s = {});
    -
    171
    - -
    174 const array& src,
    -
    175 const array& update,
    -
    176 std::vector<int> start,
    -
    177 std::vector<int> stop,
    -
    178 std::vector<int> strides,
    -
    179 StreamOrDevice s = {});
    -
    180
    - -
    183 const array& src,
    -
    184 const array& update,
    -
    185 std::vector<int> start,
    -
    186 std::vector<int> stop,
    -
    187 StreamOrDevice s = {});
    -
    188
    -
    190std::vector<array>
    -
    191split(const array& a, int num_splits, int axis, StreamOrDevice s = {});
    -
    192std::vector<array> split(const array& a, int num_splits, StreamOrDevice s = {});
    -
    193std::vector<array> split(
    -
    194 const array& a,
    -
    195 const std::vector<int>& indices,
    -
    196 int axis,
    -
    197 StreamOrDevice s = {});
    -
    198std::vector<array>
    -
    199split(const array& a, const std::vector<int>& indices, StreamOrDevice s = {});
    -
    200
    -
    202std::vector<array> meshgrid(
    -
    203 const std::vector<array>& arrays,
    -
    204 bool sparse = false,
    -
    205 std::string indexing = "xy",
    -
    206 StreamOrDevice s = {});
    -
    207
    - -
    212 const array& a,
    -
    213 const std::optional<array>& a_min = std::nullopt,
    -
    214 const std::optional<array>& a_max = std::nullopt,
    -
    215 StreamOrDevice s = {});
    -
    216
    - -
    219 const std::vector<array>& arrays,
    -
    220 int axis,
    -
    221 StreamOrDevice s = {});
    -
    222array concatenate(const std::vector<array>& arrays, StreamOrDevice s = {});
    -
    223
    -
    225array stack(const std::vector<array>& arrays, int axis, StreamOrDevice s = {});
    -
    226array stack(const std::vector<array>& arrays, StreamOrDevice s = {});
    -
    227
    -
    229array repeat(const array& arr, int repeats, int axis, StreamOrDevice s = {});
    -
    230array repeat(const array& arr, int repeats, StreamOrDevice s = {});
    -
    231
    -
    232array tile(const array& arr, std::vector<int> reps, StreamOrDevice s = {});
    -
    233
    -
    235array transpose(const array& a, std::vector<int> axes, StreamOrDevice s = {});
    -
    - -
    237 const array& a,
    -
    238 std::initializer_list<int> axes,
    -
    239 StreamOrDevice s = {}) {
    -
    240 return transpose(a, std::vector<int>(axes), s);
    -
    241}
    -
    -
    242
    -
    244array swapaxes(const array& a, int axis1, int axis2, StreamOrDevice s = {});
    -
    245
    - -
    248 const array& a,
    -
    249 int source,
    -
    250 int destination,
    -
    251 StreamOrDevice s = {});
    -
    252
    - -
    255 const array& a,
    -
    256 const std::vector<int>& axes,
    -
    257 const std::vector<int>& low_pad_size,
    -
    258 const std::vector<int>& high_pad_size,
    -
    259 const array& pad_value = array(0),
    -
    260 StreamOrDevice s = {});
    -
    261
    - -
    264 const array& a,
    -
    265 const std::vector<std::pair<int, int>>& pad_width,
    -
    266 const array& pad_value = array(0),
    -
    267 StreamOrDevice s = {});
    - -
    269 const array& a,
    -
    270 const std::pair<int, int>& pad_width,
    -
    271 const array& pad_value = array(0),
    -
    272 StreamOrDevice s = {});
    - -
    274 const array& a,
    -
    275 int pad_width,
    -
    276 const array& pad_value = array(0),
    -
    277 StreamOrDevice s = {});
    -
    278
    - -
    281
    - -
    284 const array& a,
    -
    285 const std::vector<int>& shape,
    -
    286 StreamOrDevice s = {});
    -
    287
    -
    289std::vector<array> broadcast_arrays(
    -
    290 const std::vector<array>& inputs,
    -
    291 StreamOrDevice s = {});
    -
    292
    -
    294array equal(const array& a, const array& b, StreamOrDevice s = {});
    -
    -
    295inline array operator==(const array& a, const array& b) {
    -
    296 return equal(a, b);
    -
    297}
    -
    -
    298template <typename T>
    -
    -
    299array operator==(T a, const array& b) {
    -
    300 return equal(array(a), b);
    -
    301}
    -
    -
    302template <typename T>
    -
    -
    303array operator==(const array& a, T b) {
    -
    304 return equal(a, array(b));
    -
    305}
    -
    -
    306
    -
    308array not_equal(const array& a, const array& b, StreamOrDevice s = {});
    -
    -
    309inline array operator!=(const array& a, const array& b) {
    -
    310 return not_equal(a, b);
    -
    311}
    -
    -
    312template <typename T>
    -
    -
    313array operator!=(T a, const array& b) {
    -
    314 return not_equal(array(a), b);
    -
    315}
    -
    -
    316template <typename T>
    -
    -
    317array operator!=(const array& a, T b) {
    -
    318 return not_equal(a, array(b));
    -
    319}
    -
    -
    320
    -
    322array greater(const array& a, const array& b, StreamOrDevice s = {});
    -
    -
    323inline array operator>(const array& a, const array& b) {
    -
    324 return greater(a, b);
    -
    325}
    -
    -
    326template <typename T>
    -
    -
    327array operator>(T a, const array& b) {
    -
    328 return greater(array(a), b);
    -
    329}
    -
    -
    330template <typename T>
    -
    -
    331array operator>(const array& a, T b) {
    -
    332 return greater(a, array(b));
    -
    333}
    -
    -
    334
    -
    336array greater_equal(const array& a, const array& b, StreamOrDevice s = {});
    -
    -
    337inline array operator>=(const array& a, const array& b) {
    -
    338 return greater_equal(a, b);
    -
    339}
    -
    -
    340template <typename T>
    -
    -
    341array operator>=(T a, const array& b) {
    -
    342 return greater_equal(array(a), b);
    -
    343}
    -
    -
    344template <typename T>
    -
    -
    345array operator>=(const array& a, T b) {
    -
    346 return greater_equal(a, array(b));
    -
    347}
    -
    -
    348
    -
    350array less(const array& a, const array& b, StreamOrDevice s = {});
    -
    -
    351inline array operator<(const array& a, const array& b) {
    -
    352 return less(a, b);
    -
    353}
    -
    -
    354template <typename T>
    -
    -
    355array operator<(T a, const array& b) {
    -
    356 return less(array(a), b);
    -
    357}
    -
    -
    358template <typename T>
    -
    -
    359array operator<(const array& a, T b) {
    -
    360 return less(a, array(b));
    -
    361}
    -
    -
    362
    -
    364array less_equal(const array& a, const array& b, StreamOrDevice s = {});
    -
    -
    365inline array operator<=(const array& a, const array& b) {
    -
    366 return less_equal(a, b);
    -
    367}
    -
    -
    368template <typename T>
    -
    -
    369array operator<=(T a, const array& b) {
    -
    370 return less_equal(array(a), b);
    -
    371}
    -
    -
    372template <typename T>
    -
    -
    373array operator<=(const array& a, T b) {
    -
    374 return less_equal(a, array(b));
    -
    375}
    -
    -
    376
    - -
    379 const array& a,
    -
    380 const array& b,
    -
    381 bool equal_nan,
    -
    382 StreamOrDevice s = {});
    -
    383inline array
    -
    -
    384array_equal(const array& a, const array& b, StreamOrDevice s = {}) {
    -
    385 return array_equal(a, b, false, s);
    -
    386}
    -
    -
    387
    -
    388array isnan(const array& a, StreamOrDevice s = {});
    -
    389
    -
    390array isinf(const array& a, StreamOrDevice s = {});
    -
    391
    - -
    393
    - -
    395
    - -
    398 const array& condition,
    -
    399 const array& x,
    -
    400 const array& y,
    -
    401 StreamOrDevice s = {});
    -
    402
    -
    404array all(const array& a, bool keepdims, StreamOrDevice s = {});
    -
    -
    405inline array all(const array& a, StreamOrDevice s = {}) {
    -
    406 return all(a, false, to_stream(s));
    -
    407}
    -
    -
    408
    - -
    411 const array& a,
    -
    412 const array& b,
    -
    413 double rtol = 1e-5,
    -
    414 double atol = 1e-8,
    -
    415 bool equal_nan = false,
    -
    416 StreamOrDevice s = {});
    -
    417
    - -
    421 const array& a,
    -
    422 const array& b,
    -
    423 double rtol = 1e-5,
    -
    424 double atol = 1e-8,
    -
    425 bool equal_nan = false,
    -
    426 StreamOrDevice s = {});
    -
    427
    - -
    433 const array& a,
    -
    434 const std::vector<int>& axes,
    -
    435 bool keepdims = false,
    -
    436 StreamOrDevice s = {});
    -
    437
    - -
    443 const array& a,
    -
    444 int axis,
    -
    445 bool keepdims = false,
    -
    446 StreamOrDevice s = {});
    -
    447
    -
    449array any(const array& a, bool keepdims, StreamOrDevice s = {});
    -
    -
    450inline array any(const array& a, StreamOrDevice s = {}) {
    -
    451 return any(a, false, to_stream(s));
    -
    452}
    -
    -
    453
    - -
    459 const array& a,
    -
    460 const std::vector<int>& axes,
    -
    461 bool keepdims = false,
    -
    462 StreamOrDevice s = {});
    -
    463
    - -
    469 const array& a,
    -
    470 int axis,
    -
    471 bool keepdims = false,
    -
    472 StreamOrDevice s = {});
    -
    473
    -
    475array sum(const array& a, bool keepdims, StreamOrDevice s = {});
    -
    -
    476inline array sum(const array& a, StreamOrDevice s = {}) {
    -
    477 return sum(a, false, to_stream(s));
    -
    478}
    -
    -
    479
    - -
    482 const array& a,
    -
    483 const std::vector<int>& axes,
    -
    484 bool keepdims = false,
    -
    485 StreamOrDevice s = {});
    -
    486
    - -
    489 const array& a,
    -
    490 int axis,
    -
    491 bool keepdims = false,
    -
    492 StreamOrDevice s = {});
    -
    493
    -
    495array mean(const array& a, bool keepdims, StreamOrDevice s = {});
    -
    -
    496inline array mean(const array& a, StreamOrDevice s = {}) {
    -
    497 return mean(a, false, to_stream(s));
    -
    498}
    -
    -
    499
    - -
    502 const array& a,
    -
    503 const std::vector<int>& axes,
    -
    504 bool keepdims = false,
    -
    505 StreamOrDevice s = {});
    -
    506
    - -
    509 const array& a,
    -
    510 int axis,
    -
    511 bool keepdims = false,
    -
    512 StreamOrDevice s = {});
    -
    513
    -
    515array var(const array& a, bool keepdims, int ddof = 0, StreamOrDevice s = {});
    -
    -
    516inline array var(const array& a, StreamOrDevice s = {}) {
    -
    517 return var(a, false, 0, to_stream(s));
    -
    518}
    -
    -
    519
    - -
    523 const array& a,
    -
    524 const std::vector<int>& axes,
    -
    525 bool keepdims = false,
    -
    526 int ddof = 0,
    -
    527 StreamOrDevice s = {});
    -
    528
    - -
    532 const array& a,
    -
    533 int axis,
    -
    534 bool keepdims = false,
    -
    535 int ddof = 0,
    -
    536 StreamOrDevice s = {});
    -
    537
    -
    539array std(const array& a, bool keepdims, int ddof = 0, StreamOrDevice s = {});
    -
    -
    540inline array std(const array& a, StreamOrDevice s = {}) {
    -
    541 return std(a, false, 0, to_stream(s));
    -
    542}
    -
    -
    543
    - -
    547 const array& a,
    -
    548 const std::vector<int>& axes,
    -
    549 bool keepdims = false,
    -
    550 int ddof = 0,
    -
    551 StreamOrDevice s = {});
    -
    552
    - -
    556 const array& a,
    -
    557 int axis,
    -
    558 bool keepdims = false,
    -
    559 int ddof = 0,
    -
    560 StreamOrDevice s = {});
    -
    561
    -
    563array prod(const array& a, bool keepdims, StreamOrDevice s = {});
    -
    -
    564inline array prod(const array& a, StreamOrDevice s = {}) {
    -
    565 return prod(a, false, to_stream(s));
    -
    566}
    -
    -
    567
    - -
    570 const array& a,
    -
    571 const std::vector<int>& axes,
    -
    572 bool keepdims = false,
    -
    573 StreamOrDevice s = {});
    -
    574
    - -
    577 const array& a,
    -
    578 int axis,
    -
    579 bool keepdims = false,
    -
    580 StreamOrDevice s = {});
    -
    581
    -
    583array max(const array& a, bool keepdims, StreamOrDevice s = {});
    -
    -
    584inline array max(const array& a, StreamOrDevice s = {}) {
    -
    585 return max(a, false, to_stream(s));
    -
    586}
    -
    -
    587
    - -
    590 const array& a,
    -
    591 const std::vector<int>& axes,
    -
    592 bool keepdims = false,
    -
    593 StreamOrDevice s = {});
    -
    594
    - -
    597 const array& a,
    -
    598 int axis,
    -
    599 bool keepdims = false,
    -
    600 StreamOrDevice s = {});
    -
    601
    -
    603array min(const array& a, bool keepdims, StreamOrDevice s = {});
    -
    -
    604inline array min(const array& a, StreamOrDevice s = {}) {
    -
    605 return min(a, false, to_stream(s));
    -
    606}
    -
    -
    607
    - -
    610 const array& a,
    -
    611 const std::vector<int>& axes,
    -
    612 bool keepdims = false,
    -
    613 StreamOrDevice s = {});
    -
    614
    - -
    617 const array& a,
    -
    618 int axis,
    -
    619 bool keepdims = false,
    -
    620 StreamOrDevice s = {});
    -
    621
    -
    623array argmin(const array& a, bool keepdims, StreamOrDevice s = {});
    -
    -
    624inline array argmin(const array& a, StreamOrDevice s = {}) {
    -
    625 return argmin(a, false, s);
    -
    626}
    -
    -
    627
    - -
    630 const array& a,
    -
    631 int axis,
    -
    632 bool keepdims = false,
    -
    633 StreamOrDevice s = {});
    -
    634
    -
    636array argmax(const array& a, bool keepdims, StreamOrDevice s = {});
    -
    -
    637inline array argmax(const array& a, StreamOrDevice s = {}) {
    -
    638 return argmax(a, false, s);
    -
    639}
    -
    -
    640
    - -
    643 const array& a,
    -
    644 int axis,
    -
    645 bool keepdims = false,
    -
    646 StreamOrDevice s = {});
    -
    647
    -
    649array sort(const array& a, StreamOrDevice s = {});
    -
    650
    -
    652array sort(const array& a, int axis, StreamOrDevice s = {});
    -
    653
    - -
    656
    -
    658array argsort(const array& a, int axis, StreamOrDevice s = {});
    -
    659
    -
    664array partition(const array& a, int kth, StreamOrDevice s = {});
    -
    665
    -
    670array partition(const array& a, int kth, int axis, StreamOrDevice s = {});
    -
    671
    -
    676array argpartition(const array& a, int kth, StreamOrDevice s = {});
    -
    677
    -
    682array argpartition(const array& a, int kth, int axis, StreamOrDevice s = {});
    -
    683
    -
    685array topk(const array& a, int k, StreamOrDevice s = {});
    -
    686
    -
    688array topk(const array& a, int k, int axis, StreamOrDevice s = {});
    -
    689
    -
    691array logsumexp(const array& a, bool keepdims, StreamOrDevice s = {});
    -
    -
    692inline array logsumexp(const array& a, StreamOrDevice s = {}) {
    -
    693 return logsumexp(a, false, to_stream(s));
    -
    694}
    -
    -
    695
    - -
    698 const array& a,
    -
    699 const std::vector<int>& axes,
    -
    700 bool keepdims = false,
    -
    701 StreamOrDevice s = {});
    -
    702
    - -
    705 const array& a,
    -
    706 int axis,
    -
    707 bool keepdims = false,
    -
    708 StreamOrDevice s = {});
    -
    709
    -
    711array abs(const array& a, StreamOrDevice s = {});
    -
    712
    - - -
    716
    -
    718array sign(const array& a, StreamOrDevice s = {});
    -
    719
    - -
    722
    -
    724array logical_and(const array& a, const array& b, StreamOrDevice s = {});
    -
    725array operator&&(const array& a, const array& b);
    -
    726
    -
    728array logical_or(const array& a, const array& b, StreamOrDevice s = {});
    -
    729array operator||(const array& a, const array& b);
    -
    730
    - -
    733
    -
    735array add(const array& a, const array& b, StreamOrDevice s = {});
    -
    736array operator+(const array& a, const array& b);
    -
    737template <typename T>
    -
    -
    738array operator+(T a, const array& b) {
    -
    739 return add(array(a), b);
    -
    740}
    -
    -
    741template <typename T>
    -
    -
    742array operator+(const array& a, T b) {
    -
    743 return add(a, array(b));
    -
    744}
    -
    -
    745
    -
    747array subtract(const array& a, const array& b, StreamOrDevice s = {});
    -
    748array operator-(const array& a, const array& b);
    -
    749template <typename T>
    -
    -
    750array operator-(T a, const array& b) {
    -
    751 return subtract(array(a), b);
    -
    752}
    -
    -
    753template <typename T>
    -
    -
    754array operator-(const array& a, T b) {
    -
    755 return subtract(a, array(b));
    -
    756}
    -
    -
    757
    -
    759array multiply(const array& a, const array& b, StreamOrDevice s = {});
    -
    760array operator*(const array& a, const array& b);
    -
    761template <typename T>
    -
    -
    762array operator*(T a, const array& b) {
    -
    763 return multiply(array(a), b);
    -
    764}
    -
    -
    765template <typename T>
    -
    -
    766array operator*(const array& a, T b) {
    -
    767 return multiply(a, array(b));
    -
    768}
    -
    -
    769
    -
    771array divide(const array& a, const array& b, StreamOrDevice s = {});
    -
    772array operator/(const array& a, const array& b);
    -
    773array operator/(double a, const array& b);
    -
    774array operator/(const array& a, double b);
    -
    775
    -
    777std::vector<array>
    -
    778divmod(const array& a, const array& b, StreamOrDevice s = {});
    -
    779
    -
    781array floor_divide(const array& a, const array& b, StreamOrDevice s = {});
    -
    782
    -
    784array remainder(const array& a, const array& b, StreamOrDevice s = {});
    -
    785array operator%(const array& a, const array& b);
    -
    786template <typename T>
    -
    -
    787array operator%(T a, const array& b) {
    -
    788 return remainder(array(a), b);
    -
    789}
    -
    -
    790template <typename T>
    -
    -
    791array operator%(const array& a, T b) {
    -
    792 return remainder(a, array(b));
    -
    793}
    -
    -
    794
    -
    796array maximum(const array& a, const array& b, StreamOrDevice s = {});
    -
    797
    -
    799array minimum(const array& a, const array& b, StreamOrDevice s = {});
    -
    800
    -
    802array floor(const array& a, StreamOrDevice s = {});
    -
    803
    -
    805array ceil(const array& a, StreamOrDevice s = {});
    -
    806
    - -
    809
    -
    811array exp(const array& a, StreamOrDevice s = {});
    -
    812
    -
    814array sin(const array& a, StreamOrDevice s = {});
    -
    815
    -
    817array cos(const array& a, StreamOrDevice s = {});
    -
    818
    -
    820array tan(const array& a, StreamOrDevice s = {});
    -
    821
    - -
    824
    - -
    827
    - -
    830
    -
    832array arctan2(const array& a, const array& b, StreamOrDevice s = {});
    -
    833
    -
    835array sinh(const array& a, StreamOrDevice s = {});
    -
    836
    -
    838array cosh(const array& a, StreamOrDevice s = {});
    -
    839
    -
    841array tanh(const array& a, StreamOrDevice s = {});
    -
    842
    - -
    845
    - -
    848
    - -
    851
    - -
    854
    - -
    857
    -
    859array log(const array& a, StreamOrDevice s = {});
    -
    860
    -
    862array log2(const array& a, StreamOrDevice s = {});
    -
    863
    -
    865array log10(const array& a, StreamOrDevice s = {});
    -
    866
    -
    868array log1p(const array& a, StreamOrDevice s = {});
    -
    869
    -
    871array logaddexp(const array& a, const array& b, StreamOrDevice s = {});
    -
    872
    - -
    875
    -
    877array erf(const array& a, StreamOrDevice s = {});
    -
    878
    - -
    881
    -
    883array expm1(const array& a, StreamOrDevice s = {});
    -
    884
    - -
    887
    -
    889array round(const array& a, int decimals, StreamOrDevice s = {});
    -
    -
    890inline array round(const array& a, StreamOrDevice s = {}) {
    -
    891 return round(a, 0, s);
    -
    892}
    -
    -
    893
    -
    895array matmul(const array& a, const array& b, StreamOrDevice s = {});
    -
    896
    - -
    899 const array& a,
    -
    900 const std::vector<array>& indices,
    -
    901 const std::vector<int>& axes,
    -
    902 const std::vector<int>& slice_sizes,
    -
    903 StreamOrDevice s = {});
    -
    - -
    905 const array& a,
    -
    906 const array& indices,
    -
    907 int axis,
    -
    908 const std::vector<int>& slice_sizes,
    -
    909 StreamOrDevice s = {}) {
    -
    910 return gather(a, {indices}, std::vector<int>{axis}, slice_sizes, s);
    -
    911}
    -
    -
    912
    - -
    915 const array& a,
    -
    916 const array& indices,
    -
    917 int axis,
    -
    918 StreamOrDevice s = {});
    -
    919
    -
    921array take(const array& a, const array& indices, StreamOrDevice s = {});
    -
    922
    - -
    925 const array& a,
    -
    926 const array& indices,
    -
    927 int axis,
    -
    928 StreamOrDevice s = {});
    -
    929
    - -
    932 const array& a,
    -
    933 const std::vector<array>& indices,
    -
    934 const array& updates,
    -
    935 const std::vector<int>& axes,
    -
    936 StreamOrDevice s = {});
    -
    - -
    938 const array& a,
    -
    939 const array& indices,
    -
    940 const array& updates,
    -
    941 int axis,
    -
    942 StreamOrDevice s = {}) {
    -
    943 return scatter(a, {indices}, updates, std::vector<int>{axis}, s);
    -
    944}
    -
    -
    945
    - -
    948 const array& a,
    -
    949 const std::vector<array>& indices,
    -
    950 const array& updates,
    -
    951 const std::vector<int>& axes,
    -
    952 StreamOrDevice s = {});
    -
    - -
    954 const array& a,
    -
    955 const array& indices,
    -
    956 const array& updates,
    -
    957 int axis,
    -
    958 StreamOrDevice s = {}) {
    -
    959 return scatter_add(a, {indices}, updates, std::vector<int>{axis}, s);
    -
    960}
    -
    -
    961
    - -
    964 const array& a,
    -
    965 const std::vector<array>& indices,
    -
    966 const array& updates,
    -
    967 const std::vector<int>& axes,
    -
    968 StreamOrDevice s = {});
    -
    - -
    970 const array& a,
    -
    971 const array& indices,
    -
    972 const array& updates,
    -
    973 int axis,
    -
    974 StreamOrDevice s = {}) {
    -
    975 return scatter_prod(a, {indices}, updates, std::vector<int>{axis}, s);
    -
    976}
    -
    -
    977
    - -
    980 const array& a,
    -
    981 const std::vector<array>& indices,
    -
    982 const array& updates,
    -
    983 const std::vector<int>& axes,
    -
    984 StreamOrDevice s = {});
    -
    - -
    986 const array& a,
    -
    987 const array& indices,
    -
    988 const array& updates,
    -
    989 int axis,
    -
    990 StreamOrDevice s = {}) {
    -
    991 return scatter_max(a, {indices}, updates, std::vector<int>{axis}, s);
    -
    992}
    -
    - -
    995 const array& a,
    -
    996 const std::vector<array>& indices,
    -
    997 const array& updates,
    -
    998 const std::vector<int>& axes,
    -
    999 StreamOrDevice s = {});
    -
    - -
    1001 const array& a,
    -
    1002 const array& indices,
    -
    1003 const array& updates,
    -
    1004 int axis,
    -
    1005 StreamOrDevice s = {}) {
    -
    1006 return scatter_min(a, {indices}, updates, std::vector<int>{axis}, s);
    -
    1007}
    -
    -
    1008
    -
    1010array sqrt(const array& a, StreamOrDevice s = {});
    -
    1011
    - -
    1014
    - -
    1017 const array& a,
    -
    1018 const std::vector<int>& axes,
    -
    1019 bool precise = false,
    -
    1020 StreamOrDevice s = {});
    -
    1021
    -
    1023array softmax(const array& a, bool precise = false, StreamOrDevice s = {});
    -
    1024
    -
    1026inline array
    -
    -
    1027softmax(const array& a, int axis, bool precise = false, StreamOrDevice s = {}) {
    -
    1028 return softmax(a, std::vector<int>{axis}, precise, s);
    -
    1029}
    -
    -
    1030
    -
    1032array power(const array& a, const array& b, StreamOrDevice s = {});
    -
    1033
    - -
    1036 const array& a,
    -
    1037 int axis,
    -
    1038 bool reverse = false,
    -
    1039 bool inclusive = true,
    -
    1040 StreamOrDevice s = {});
    -
    1041
    - -
    1044 const array& a,
    -
    1045 int axis,
    -
    1046 bool reverse = false,
    -
    1047 bool inclusive = true,
    -
    1048 StreamOrDevice s = {});
    -
    1049
    - -
    1052 const array& a,
    -
    1053 int axis,
    -
    1054 bool reverse = false,
    -
    1055 bool inclusive = true,
    -
    1056 StreamOrDevice s = {});
    -
    1057
    - -
    1060 const array& a,
    -
    1061 int axis,
    -
    1062 bool reverse = false,
    -
    1063 bool inclusive = true,
    -
    1064 StreamOrDevice s = {});
    -
    1065
    - -
    1068 array input,
    -
    1069 array weight,
    -
    1070 std::vector<int> stride = {},
    -
    1071 std::vector<int> padding_lo = {},
    -
    1072 std::vector<int> padding_hi = {},
    -
    1073 std::vector<int> kernel_dilation = {},
    -
    1074 std::vector<int> input_dilation = {},
    -
    1075 int groups = 1,
    -
    1076 bool flip = false,
    -
    1077 StreamOrDevice s = {});
    -
    1078
    -
    - -
    1081 const array& input,
    -
    1082 const array& weight,
    -
    1083 std::vector<int> stride = {},
    -
    1084 std::vector<int> padding = {},
    -
    1085 std::vector<int> kernel_dilation = {},
    -
    1086 std::vector<int> input_dilation = {},
    -
    1087 int groups = 1,
    -
    1088 bool flip = false,
    -
    1089 StreamOrDevice s = {}) {
    -
    1090 return conv_general(
    -
    1091 /* const array& input = */ input,
    -
    1092 /* const array& weight = */ weight,
    -
    1093 /* std::vector<int> stride = */ stride,
    -
    1094 /* std::vector<int> padding_lo = */ padding,
    -
    1095 /* std::vector<int> padding_hi = */ padding,
    -
    1096 /* std::vector<int> kernel_dilation = */ kernel_dilation,
    -
    1097 /* std::vector<int> input_dilation = */ input_dilation,
    -
    1098 /* int groups = */ groups,
    -
    1099 /* bool flip = */ flip,
    -
    1100 /* StreamOrDevice s = */ s);
    -
    1101}
    -
    -
    1102
    - -
    1105 const array& input,
    -
    1106 const array& weight,
    -
    1107 int stride = 1,
    -
    1108 int padding = 0,
    -
    1109 int dilation = 1,
    -
    1110 int groups = 1,
    -
    1111 StreamOrDevice s = {});
    -
    1112
    - -
    1115 const array& input,
    -
    1116 const array& weight,
    -
    1117 const std::pair<int, int>& stride = {1, 1},
    -
    1118 const std::pair<int, int>& padding = {0, 0},
    -
    1119 const std::pair<int, int>& dilation = {1, 1},
    -
    1120 int groups = 1,
    -
    1121 StreamOrDevice s = {});
    -
    1122
    - -
    1125 const array& input,
    -
    1126 const array& weight,
    -
    1127 const std::tuple<int, int, int>& stride = {1, 1, 1},
    -
    1128 const std::tuple<int, int, int>& padding = {0, 0, 0},
    -
    1129 const std::tuple<int, int, int>& dilation = {1, 1, 1},
    -
    1130 int groups = 1,
    -
    1131 StreamOrDevice s = {});
    -
    1132
    - -
    1135 const array& x,
    -
    1136 const array& w,
    -
    1137 const array& scales,
    -
    1138 const array& biases,
    -
    1139 bool transpose = true,
    -
    1140 int group_size = 64,
    -
    1141 int bits = 4,
    -
    1142 StreamOrDevice s = {});
    -
    1143
    -
    1145std::tuple<array, array, array> quantize(
    -
    1146 const array& w,
    -
    1147 int group_size = 64,
    -
    1148 int bits = 4,
    -
    1149 StreamOrDevice s = {});
    -
    1150
    - -
    1153 const array& w,
    -
    1154 const array& scales,
    -
    1155 const array& biases,
    -
    1156 int group_size = 64,
    -
    1157 int bits = 4,
    -
    1158 StreamOrDevice s = {});
    -
    1159
    - -
    1162 const array& x,
    -
    1163 const array& w,
    -
    1164 const array& scales,
    -
    1165 const array& biases,
    -
    1166 std::optional<array> lhs_indices = std::nullopt,
    -
    1167 std::optional<array> rhs_indices = std::nullopt,
    -
    1168 bool transpose = true,
    -
    1169 int group_size = 64,
    -
    1170 int bits = 4,
    -
    1171 StreamOrDevice s = {});
    -
    1172
    - -
    1175 const array& a,
    -
    1176 const array& b,
    -
    1177 const int axis = 2,
    -
    1178 StreamOrDevice s = {});
    -
    1179
    - -
    1181 const array& a,
    -
    1182 const array& b,
    -
    1183 const std::vector<int>& axes_a,
    -
    1184 const std::vector<int>& axes_b,
    -
    1185 StreamOrDevice s = {});
    -
    1186
    -
    1188array outer(const array& a, const array& b, StreamOrDevice s = {});
    -
    1189
    -
    1191array inner(const array& a, const array& b, StreamOrDevice s = {});
    -
    1192
    - -
    1195 array c,
    -
    1196 array a,
    -
    1197 array b,
    -
    1198 const float& alpha = 1.f,
    -
    1199 const float& beta = 1.f,
    -
    1200 StreamOrDevice s = {});
    -
    1201
    - -
    1204 array a,
    -
    1205 array b,
    -
    1206 int block_size,
    -
    1207 std::optional<array> mask_out = std::nullopt,
    -
    1208 std::optional<array> mask_lhs = std::nullopt,
    -
    1209 std::optional<array> mask_rhs = std::nullopt,
    -
    1210 StreamOrDevice s = {});
    -
    1211
    - -
    1214 array a,
    -
    1215 array b,
    -
    1216 std::optional<array> lhs_indices = std::nullopt,
    -
    1217 std::optional<array> rhs_indices = std::nullopt,
    -
    1218 StreamOrDevice s = {});
    -
    1219
    - -
    1222 const array& a,
    -
    1223 int offset = 0,
    -
    1224 int axis1 = 0,
    -
    1225 int axis2 = 1,
    -
    1226 StreamOrDevice s = {});
    -
    1227
    -
    1229array diag(const array& a, int k = 0, StreamOrDevice s = {});
    -
    1230
    -
    1236std::vector<array> depends(
    -
    1237 const std::vector<array>& inputs,
    -
    1238 const std::vector<array>& dependencies);
    -
    1239
    - -
    1242std::vector<array> atleast_1d(
    -
    1243 const std::vector<array>& a,
    -
    1244 StreamOrDevice s = {});
    - -
    1246std::vector<array> atleast_2d(
    -
    1247 const std::vector<array>& a,
    -
    1248 StreamOrDevice s = {});
    - -
    1250std::vector<array> atleast_3d(
    -
    1251 const std::vector<array>& a,
    -
    1252 StreamOrDevice s = {});
    -
    1253
    - -
    1259 const array& a,
    -
    1260 std::vector<int> axes,
    -
    1261 bool inverted,
    -
    1262 Dtype dtype = int32,
    -
    1263 StreamOrDevice s = {});
    -
    1264
    - -
    1266
    -
    1268array bitwise_and(const array& a, const array& b, StreamOrDevice s = {});
    -
    1269array operator&(const array& a, const array& b);
    -
    1270
    -
    1272array bitwise_or(const array& a, const array& b, StreamOrDevice s = {});
    -
    1273array operator|(const array& a, const array& b);
    -
    1274
    -
    1276array bitwise_xor(const array& a, const array& b, StreamOrDevice s = {});
    -
    1277array operator^(const array& a, const array& b);
    -
    1278
    -
    1280array left_shift(const array& a, const array& b, StreamOrDevice s = {});
    -
    1281array operator<<(const array& a, const array& b);
    -
    1282
    -
    1284array right_shift(const array& a, const array& b, StreamOrDevice s = {});
    -
    1285array operator>>(const array& a, const array& b);
    -
    1286
    -
    1289} // namespace mlx::core
    - -
    Definition array.h:20
    - -
    array scatter_max(const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
    Scatter and max updates to given linear indices.
    -
    array floor_divide(const array &a, const array &b, StreamOrDevice s={})
    Compute integer division.
    -
    array radians(const array &a, StreamOrDevice s={})
    Convert the elements of an array from Degrees to Radians.
    -
    array arccos(const array &a, StreamOrDevice s={})
    Arc Cosine of the elements of an array.
    -
    array scatter_min(const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
    Scatter and min updates to given linear indices.
    -
    array less_equal(const array &a, const array &b, StreamOrDevice s={})
    Returns bool array with (a <= b) element-wise.
    -
    array cumprod(const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
    Cumulative product of an array.
    -
    array astype(array a, Dtype dtype, StreamOrDevice s={})
    Convert an array to the given data type.
    -
    array rsqrt(const array &a, StreamOrDevice s={})
    Square root and reciprocal the elements of an array.
    -
    array diag(const array &a, int k=0, StreamOrDevice s={})
    Extract diagonal from a 2d array or create a diagonal matrix.
    -
    array square(const array &a, StreamOrDevice s={})
    Square the elements of an array.
    -
    array ceil(const array &a, StreamOrDevice s={})
    Ceil the element of an array.
    -
    array log2(const array &a, StreamOrDevice s={})
    Log base 2 of the elements of an array.
    -
    array clip(const array &a, const std::optional< array > &a_min=std::nullopt, const std::optional< array > &a_max=std::nullopt, StreamOrDevice s={})
    Clip (limit) the values in an array.
    -
    array isnan(const array &a, StreamOrDevice s={})
    -
    array isneginf(const array &a, StreamOrDevice s={})
    -
    array subtract(const array &a, const array &b, StreamOrDevice s={})
    Subtract two arrays.
    -
    array cummin(const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
    Cumulative min of an array.
    -
    array log10(const array &a, StreamOrDevice s={})
    Log base 10 of the elements of an array.
    -
    array log1p(const array &a, StreamOrDevice s={})
    Natural logarithm of one plus elements in the array: log(1 + a).
    -
    array sign(const array &a, StreamOrDevice s={})
    The sign of the elements in an array.
    -
    array cosh(const array &a, StreamOrDevice s={})
    Hyperbolic Cosine of the elements of an array.
    -
    array conv_general(array input, array weight, std::vector< int > stride={}, std::vector< int > padding_lo={}, std::vector< int > padding_hi={}, std::vector< int > kernel_dilation={}, std::vector< int > input_dilation={}, int groups=1, bool flip=false, StreamOrDevice s={})
    General convolution with a filter.
    -
    array logical_or(const array &a, const array &b, StreamOrDevice s={})
    Logical or of two arrays.
    -
    array moveaxis(const array &a, int source, int destination, StreamOrDevice s={})
    Move an axis of an array.
    -
    array operator*(const array &a, const array &b)
    -
    array operator+(const array &a, const array &b)
    -
    array operator||(const array &a, const array &b)
    -
    array not_equal(const array &a, const array &b, StreamOrDevice s={})
    Returns the bool array with (a != b) element-wise.
    -
    array erf(const array &a, StreamOrDevice s={})
    Computes the error function of the elements of an array.
    -
    array sqrt(const array &a, StreamOrDevice s={})
    Square root the elements of an array.
    -
    array std(const array &a, bool keepdims, int ddof=0, StreamOrDevice s={})
    Computes the standard deviation of the elements of an array.
    -
    array add(const array &a, const array &b, StreamOrDevice s={})
    Add two arrays.
    -
    array round(const array &a, int decimals, StreamOrDevice s={})
    Round a floating point number.
    -
    array conv1d(const array &input, const array &weight, int stride=1, int padding=0, int dilation=1, int groups=1, StreamOrDevice s={})
    1D convolution with a filter
    -
    array bitwise_xor(const array &a, const array &b, StreamOrDevice s={})
    Bitwise exclusive or.
    -
    array equal(const array &a, const array &b, StreamOrDevice s={})
    Returns the bool array with (a == b) element-wise.
    -
    array zeros(const std::vector< int > &shape, Dtype dtype, StreamOrDevice s={})
    Fill an array of the given shape with zeros.
    -
    array stop_gradient(const array &a, StreamOrDevice s={})
    Stop the flow of gradients.
    -
    array scatter_prod(const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
    Scatter and prod updates to given indices.
    -
    array slice_update(const array &src, const array &update, std::vector< int > start, std::vector< int > stop, std::vector< int > strides, StreamOrDevice s={})
    Update a slice from the source array.
    -
    array cos(const array &a, StreamOrDevice s={})
    Cosine of the elements of an array.
    -
    array operator>=(const array &a, const array &b)
    Definition ops.h:337
    -
    array degrees(const array &a, StreamOrDevice s={})
    Convert the elements of an array from Radians to Degrees.
    -
    array all(const array &a, bool keepdims, StreamOrDevice s={})
    True if all elements in the array are true (or non-zero).
    -
    array tan(const array &a, StreamOrDevice s={})
    Tangent of the elements of an array.
    -
    array eye(int n, int m, int k, Dtype dtype, StreamOrDevice s={})
    Fill an array of the given shape (n,m) with ones in the specified diagonal k, and zeros everywhere el...
    -
    array identity(int n, Dtype dtype, StreamOrDevice s={})
    Create a square matrix of shape (n,n) of zeros, and ones in the major diagonal.
    -
    array operator>>(const array &a, const array &b)
    -
    array minimum(const array &a, const array &b, StreamOrDevice s={})
    Element-wise minimum between two arrays.
    -
    array prod(const array &a, bool keepdims, StreamOrDevice s={})
    The product of all elements of the array.
    -
    array atleast_3d(const array &a, StreamOrDevice s={})
    -
    array operator<=(const array &a, const array &b)
    Definition ops.h:365
    -
    array reciprocal(const array &a, StreamOrDevice s={})
    The reciprocal (1/x) of the elements in an array.
    -
    array tri(int n, int m, int k, Dtype type, StreamOrDevice s={})
    -
    array pad(const array &a, const std::vector< int > &axes, const std::vector< int > &low_pad_size, const std::vector< int > &high_pad_size, const array &pad_value=array(0), StreamOrDevice s={})
    Pad an array with a constant value.
    -
    array flatten(const array &a, int start_axis, int end_axis=-1, StreamOrDevice s={})
    Flatten the dimensions in the range [start_axis, end_axis] .
    -
    array isclose(const array &a, const array &b, double rtol=1e-5, double atol=1e-8, bool equal_nan=false, StreamOrDevice s={})
    Returns a boolean array where two arrays are element-wise equal within the specified tolerance.
    -
    array operator|(const array &a, const array &b)
    -
    array topk(const array &a, int k, StreamOrDevice s={})
    Returns topk elements of the flattened array.
    -
    array expm1(const array &a, StreamOrDevice s={})
    Computes the expm1 function of the elements of an array.
    -
    array ones(const std::vector< int > &shape, Dtype dtype, StreamOrDevice s={})
    Fill an array of the given shape with ones.
    -
    array abs(const array &a, StreamOrDevice s={})
    Absolute value of elements in an array.
    -
    std::vector< array > meshgrid(const std::vector< array > &arrays, bool sparse=false, std::string indexing="xy", StreamOrDevice s={})
    A vector of coordinate arrays from coordinate vectors.
    -
    array conjugate(const array &a, StreamOrDevice s={})
    -
    array tanh(const array &a, StreamOrDevice s={})
    Hyperbolic Tangent of the elements of an array.
    -
    array quantized_matmul(const array &x, const array &w, const array &scales, const array &biases, bool transpose=true, int group_size=64, int bits=4, StreamOrDevice s={})
    Quantized matmul multiplies x with a quantized matrix w.
    -
    array inner(const array &a, const array &b, StreamOrDevice s={})
    Compute the inner product of two vectors.
    -
    array block_masked_mm(array a, array b, int block_size, std::optional< array > mask_out=std::nullopt, std::optional< array > mask_lhs=std::nullopt, std::optional< array > mask_rhs=std::nullopt, StreamOrDevice s={})
    Compute matrix product with block masking.
    -
    array arctan2(const array &a, const array &b, StreamOrDevice s={})
    Inverse tangent of the ratio of two arrays.
    -
    array number_of_elements(const array &a, std::vector< int > axes, bool inverted, Dtype dtype=int32, StreamOrDevice s={})
    Extract the number of elements along some axes as a scalar array.
    -
    array conv3d(const array &input, const array &weight, const std::tuple< int, int, int > &stride={1, 1, 1}, const std::tuple< int, int, int > &padding={0, 0, 0}, const std::tuple< int, int, int > &dilation={1, 1, 1}, int groups=1, StreamOrDevice s={})
    3D convolution with a filter
    -
    array log(const array &a, StreamOrDevice s={})
    Natural logarithm of the elements of an array.
    -
    array sigmoid(const array &a, StreamOrDevice s={})
    Element-wise logistic sigmoid of the array: 1 / (1 + exp(-x).
    -
    array squeeze(const array &a, const std::vector< int > &axes, StreamOrDevice s={})
    Remove singleton dimensions at the given axes.
    -
    array greater_equal(const array &a, const array &b, StreamOrDevice s={})
    Returns bool array with (a >= b) element-wise.
    -
    array expand_dims(const array &a, const std::vector< int > &axes, StreamOrDevice s={})
    Add a singleton dimension at the given axes.
    -
    array conv2d(const array &input, const array &weight, const std::pair< int, int > &stride={1, 1}, const std::pair< int, int > &padding={0, 0}, const std::pair< int, int > &dilation={1, 1}, int groups=1, StreamOrDevice s={})
    2D convolution with a filter
    -
    array operator>(const array &a, const array &b)
    Definition ops.h:323
    -
    array bitwise_and(const array &a, const array &b, StreamOrDevice s={})
    Bitwise and.
    -
    std::vector< array > split(const array &a, int num_splits, int axis, StreamOrDevice s={})
    Split an array into sub-arrays along a given axis.
    -
    array matmul(const array &a, const array &b, StreamOrDevice s={})
    Matrix-matrix multiplication.
    -
    array logical_and(const array &a, const array &b, StreamOrDevice s={})
    Logical and of two arrays.
    -
    array erfinv(const array &a, StreamOrDevice s={})
    Computes the inverse error function of the elements of an array.
    -
    array divide(const array &a, const array &b, StreamOrDevice s={})
    Divide two arrays.
    -
    array power(const array &a, const array &b, StreamOrDevice s={})
    Raise elements of a to the power of b element-wise.
    -
    array maximum(const array &a, const array &b, StreamOrDevice s={})
    Element-wise maximum between two arrays.
    -
    array reshape(const array &a, std::vector< int > shape, StreamOrDevice s={})
    Reshape an array to the given shape.
    -
    array argmin(const array &a, bool keepdims, StreamOrDevice s={})
    Returns the index of the minimum value in the array.
    -
    array var(const array &a, bool keepdims, int ddof=0, StreamOrDevice s={})
    Computes the variance of the elements of an array.
    -
    array full(std::vector< int > shape, array vals, Dtype dtype, StreamOrDevice s={})
    Fill an array of the given shape with the given value(s).
    -
    array softmax(const array &a, const std::vector< int > &axes, bool precise=false, StreamOrDevice s={})
    Softmax of an array.
    -
    array sort(const array &a, StreamOrDevice s={})
    Returns a sorted copy of the flattened array.
    -
    array max(const array &a, bool keepdims, StreamOrDevice s={})
    The maximum of all elements of the array.
    -
    array addmm(array c, array a, array b, const float &alpha=1.f, const float &beta=1.f, StreamOrDevice s={})
    Compute D = beta * C + alpha * (A @ B)
    -
    array tril(array x, int k=0, StreamOrDevice s={})
    -
    array any(const array &a, bool keepdims, StreamOrDevice s={})
    True if any elements in the array are true (or non-zero).
    -
    array outer(const array &a, const array &b, StreamOrDevice s={})
    Compute the outer product of two vectors.
    -
    array arcsin(const array &a, StreamOrDevice s={})
    Arc Sine of the elements of an array.
    -
    array left_shift(const array &a, const array &b, StreamOrDevice s={})
    Shift bits to the left.
    -
    array where(const array &condition, const array &x, const array &y, StreamOrDevice s={})
    Select from x or y depending on condition.
    -
    array exp(const array &a, StreamOrDevice s={})
    Exponential of the elements of an array.
    -
    array bitwise_or(const array &a, const array &b, StreamOrDevice s={})
    Bitwise inclusive or.
    -
    array floor(const array &a, StreamOrDevice s={})
    Floor the element of an array.
    -
    array as_strided(array a, std::vector< int > shape, std::vector< size_t > strides, size_t offset, StreamOrDevice s={})
    Create a view of an array with the given shape and strides.
    -
    array argsort(const array &a, StreamOrDevice s={})
    Returns indices that sort the flattened array.
    -
    array array_equal(const array &a, const array &b, bool equal_nan, StreamOrDevice s={})
    True if two arrays have the same shape and elements.
    -
    array isinf(const array &a, StreamOrDevice s={})
    -
    array less(const array &a, const array &b, StreamOrDevice s={})
    Returns bool array with (a < b) element-wise.
    -
    array diagonal(const array &a, int offset=0, int axis1=0, int axis2=1, StreamOrDevice s={})
    Extract a diagonal or construct a diagonal array.
    -
    array ones_like(const array &a, StreamOrDevice s={})
    -
    array negative(const array &a, StreamOrDevice s={})
    Negate an array.
    -
    array linspace(double start, double stop, int num=50, Dtype dtype=float32, StreamOrDevice s={})
    A 1D array of num evenly spaced numbers in the range [start, stop]
    -
    array remainder(const array &a, const array &b, StreamOrDevice s={})
    Compute the element-wise remainder of division.
    -
    array block_sparse_qmm(const array &x, const array &w, const array &scales, const array &biases, std::optional< array > lhs_indices=std::nullopt, std::optional< array > rhs_indices=std::nullopt, bool transpose=true, int group_size=64, int bits=4, StreamOrDevice s={})
    Compute matrix products with matrix-level gather.
    -
    array arctan(const array &a, StreamOrDevice s={})
    Arc Tangent of the elements of an array.
    -
    std::vector< array > divmod(const array &a, const array &b, StreamOrDevice s={})
    Compute the element-wise quotient and remainder.
    -
    array triu(array x, int k=0, StreamOrDevice s={})
    -
    array arccosh(const array &a, StreamOrDevice s={})
    Inverse Hyperbolic Cosine of the elements of an array.
    -
    array tile(const array &arr, std::vector< int > reps, StreamOrDevice s={})
    -
    array min(const array &a, bool keepdims, StreamOrDevice s={})
    The minimum of all elements of the array.
    -
    array operator%(const array &a, const array &b)
    -
    std::tuple< array, array, array > quantize(const array &w, int group_size=64, int bits=4, StreamOrDevice s={})
    Quantize a matrix along its last axis.
    -
    array arctanh(const array &a, StreamOrDevice s={})
    Inverse Hyperbolic Tangent of the elements of an array.
    -
    array repeat(const array &arr, int repeats, int axis, StreamOrDevice s={})
    Repeat an array along an axis.
    -
    array gather(const array &a, const std::vector< array > &indices, const std::vector< int > &axes, const std::vector< int > &slice_sizes, StreamOrDevice s={})
    Gather array entries given indices and slices.
    -
    std::vector< array > broadcast_arrays(const std::vector< array > &inputs, StreamOrDevice s={})
    Broadcast a vector of arrays against one another.
    -
    array atleast_1d(const array &a, StreamOrDevice s={})
    convert an array to an atleast ndim array
    -
    array swapaxes(const array &a, int axis1, int axis2, StreamOrDevice s={})
    Swap two axes of an array.
    -
    array logical_not(const array &a, StreamOrDevice s={})
    Logical not of an array.
    -
    array concatenate(const std::vector< array > &arrays, int axis, StreamOrDevice s={})
    Concatenate arrays along a given axis.
    -
    array dequantize(const array &w, const array &scales, const array &biases, int group_size=64, int bits=4, StreamOrDevice s={})
    Dequantize a matrix produced by quantize()
    -
    array transpose(const array &a, std::vector< int > axes, StreamOrDevice s={})
    Permutes the dimensions according to the given axes.
    -
    array partition(const array &a, int kth, StreamOrDevice s={})
    Returns a partitioned copy of the flattened array such that the smaller kth elements are first.
    -
    array take(const array &a, const array &indices, int axis, StreamOrDevice s={})
    Take array slices at the given indices of the specified axis.
    -
    array operator^(const array &a, const array &b)
    -
    std::vector< array > depends(const std::vector< array > &inputs, const std::vector< array > &dependencies)
    Implements the identity function but allows injecting dependencies to other arrays.
    -
    array arcsinh(const array &a, StreamOrDevice s={})
    Inverse Hyperbolic Sine of the elements of an array.
    -
    array scatter_add(const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
    Scatter and add updates to given indices.
    -
    array logsumexp(const array &a, bool keepdims, StreamOrDevice s={})
    The logsumexp of all elements of the array.
    -
    array broadcast_to(const array &a, const std::vector< int > &shape, StreamOrDevice s={})
    Broadcast an array to a given shape.
    -
    array scatter(const array &a, const std::vector< array > &indices, const array &updates, const std::vector< int > &axes, StreamOrDevice s={})
    Scatter updates to given linear indices.
    -
    array operator<<(const array &a, const array &b)
    -
    array slice(const array &a, std::vector< int > start, std::vector< int > stop, std::vector< int > strides, StreamOrDevice s={})
    Slice an array.
    -
    array isposinf(const array &a, StreamOrDevice s={})
    -
    array cumsum(const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
    Cumulative sum of an array.
    -
    array operator-(const array &a)
    -
    array mean(const array &a, bool keepdims, StreamOrDevice s={})
    Computes the mean of the elements of an array.
    -
    array sum(const array &a, bool keepdims, StreamOrDevice s={})
    Sums the elements of an array.
    -
    array take_along_axis(const array &a, const array &indices, int axis, StreamOrDevice s={})
    Take array entries given indices along the axis.
    -
    array argmax(const array &a, bool keepdims, StreamOrDevice s={})
    Returns the index of the maximum value in the array.
    -
    array sin(const array &a, StreamOrDevice s={})
    Sine of the elements of an array.
    -
    array operator&&(const array &a, const array &b)
    -
    array cummax(const array &a, int axis, bool reverse=false, bool inclusive=true, StreamOrDevice s={})
    Cumulative max of an array.
    -
    array operator<(const array &a, const array &b)
    Definition ops.h:351
    -
    array atleast_2d(const array &a, StreamOrDevice s={})
    -
    array operator/(const array &a, const array &b)
    -
    array allclose(const array &a, const array &b, double rtol=1e-5, double atol=1e-8, bool equal_nan=false, StreamOrDevice s={})
    True if the two arrays are equal within the specified tolerance.
    -
    array operator&(const array &a, const array &b)
    -
    array argpartition(const array &a, int kth, StreamOrDevice s={})
    Returns indices that partition the flattened array such that the smaller kth elements are first.
    -
    array greater(const array &a, const array &b, StreamOrDevice s={})
    Returns bool array with (a > b) element-wise.
    -
    array sinh(const array &a, StreamOrDevice s={})
    Hyperbolic Sine of the elements of an array.
    -
    array multiply(const array &a, const array &b, StreamOrDevice s={})
    Multiply two arrays.
    -
    array tensordot(const array &a, const array &b, const int axis=2, StreamOrDevice s={})
    Returns a contraction of a and b over multiple dimensions.
    -
    array block_sparse_mm(array a, array b, std::optional< array > lhs_indices=std::nullopt, std::optional< array > rhs_indices=std::nullopt, StreamOrDevice s={})
    Compute matrix product with matrix-level gather.
    -
    array stack(const std::vector< array > &arrays, int axis, StreamOrDevice s={})
    Stack arrays along a new axis.
    -
    array logaddexp(const array &a, const array &b, StreamOrDevice s={})
    Log-add-exp of one elements in the array: log(exp(a) + exp(b)).
    -
    array right_shift(const array &a, const array &b, StreamOrDevice s={})
    Shift bits to the right.
    -
    array zeros_like(const array &a, StreamOrDevice s={})
    -
    Definition allocator.h:7
    -
    void arange(const std::vector< array > &inputs, array &out, double start, double step)
    Definition arange.h:24
    -
    Stream to_stream(StreamOrDevice s)
    -
    void copy(const array &src, array &dst, CopyType ctype)
    -
    constexpr Dtype int32
    Definition dtype.h:69
    -
    constexpr Dtype float32
    Definition dtype.h:73
    -
    bool operator==(const Device &lhs, const Device &rhs)
    -
    bool operator!=(const Device &lhs, const Device &rhs)
    -
    std::variant< std::monostate, Stream, Device > StreamOrDevice
    Definition utils.h:14
    - -
    Definition dtype.h:15
    - -
    - - - - diff --git a/docs/build/html/plus.svg b/docs/build/html/plus.svg deleted file mode 100644 index 075201655..000000000 --- a/docs/build/html/plus.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/build/html/plusd.svg b/docs/build/html/plusd.svg deleted file mode 100644 index 0c65bfe94..000000000 --- a/docs/build/html/plusd.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/docs/build/html/pocketfft_8h.html b/docs/build/html/pocketfft_8h.html deleted file mode 100644 index 1faed2871..000000000 --- a/docs/build/html/pocketfft_8h.html +++ /dev/null @@ -1,1134 +0,0 @@ - - - - - - - -MLX: mlx/3rdparty/pocketfft.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    pocketfft.h File Reference
    -
    -
    -
    #include <cmath>
    -#include <cstdlib>
    -#include <stdexcept>
    -#include <memory>
    -#include <vector>
    -#include <complex>
    -#include <algorithm>
    -#include <mutex>
    -#include <condition_variable>
    -#include <thread>
    -#include <queue>
    -#include <atomic>
    -#include <functional>
    -#include <new>
    -
    -

    Go to the source code of this file.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Classes

    struct  pocketfft::detail::VLEN< T >
     
    class  pocketfft::detail::arr< T >
     
    struct  pocketfft::detail::cmplx< T >
     
    class  pocketfft::detail::sincos_2pibyn< T >
     
    struct  pocketfft::detail::util
     
    class  pocketfft::detail::threading::latch
     
    class  pocketfft::detail::threading::concurrent_queue< T >
     
    struct  pocketfft::detail::threading::aligned_allocator< T >
     
    class  pocketfft::detail::threading::thread_pool
     
    class  pocketfft::detail::cfftp< T0 >
     
    class  pocketfft::detail::rfftp< T0 >
     
    class  pocketfft::detail::fftblue< T0 >
     
    class  pocketfft::detail::pocketfft_c< T0 >
     
    class  pocketfft::detail::pocketfft_r< T0 >
     
    class  pocketfft::detail::T_dct1< T0 >
     
    class  pocketfft::detail::T_dst1< T0 >
     
    class  pocketfft::detail::T_dcst23< T0 >
     
    class  pocketfft::detail::T_dcst4< T0 >
     
    class  pocketfft::detail::arr_info
     
    class  pocketfft::detail::cndarr< T >
     
    class  pocketfft::detail::ndarr< T >
     
    class  pocketfft::detail::multi_iter< N >
     
    class  pocketfft::detail::simple_iter
     
    class  pocketfft::detail::rev_iter
     
    struct  pocketfft::detail::VTYPE< T >
     
    struct  pocketfft::detail::add_vec< T >
     
    struct  pocketfft::detail::add_vec< cmplx< T > >
     
    struct  pocketfft::detail::ExecC2C
     
    struct  pocketfft::detail::ExecHartley
     
    struct  pocketfft::detail::ExecDcst
     
    struct  pocketfft::detail::ExecR2R
     
    - - - - - - - -

    -Namespaces

    namespace  pocketfft
     
    namespace  pocketfft::detail
     
    namespace  pocketfft::detail::threading
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Macros

    #define POCKETFFT_CACHE_SIZE   0
     
    #define POCKETFFT_NOINLINE
     
    #define POCKETFFT_RESTRICT
     
    #define POCKETFFT_NO_VECTORS
     
    #define POCKETFFT_PREP3(idx)
     
    #define POCKETFFT_PARTSTEP3a(u1, u2, twr, twi)
     
    #define POCKETFFT_PARTSTEP3b(u1, u2, twr, twi)
     
    #define POCKETFFT_PREP5(idx)
     
    #define POCKETFFT_PARTSTEP5a(u1, u2, twar, twbr, twai, twbi)
     
    #define POCKETFFT_PARTSTEP5b(u1, u2, twar, twbr, twai, twbi)
     
    #define POCKETFFT_PREP7(idx)
     
    #define POCKETFFT_PARTSTEP7a0(u1, u2, x1, x2, x3, y1, y2, y3, out1, out2)
     
    #define POCKETFFT_PARTSTEP7a(u1, u2, x1, x2, x3, y1, y2, y3)    POCKETFFT_PARTSTEP7a0(u1,u2,x1,x2,x3,y1,y2,y3,CH(0,k,u1),CH(0,k,u2))
     
    #define POCKETFFT_PARTSTEP7(u1, u2, x1, x2, x3, y1, y2, y3)
     
    #define POCKETFFT_PREP11(idx)
     
    #define POCKETFFT_PARTSTEP11a0(u1, u2, x1, x2, x3, x4, x5, y1, y2, y3, y4, y5, out1, out2)
     
    #define POCKETFFT_PARTSTEP11a(u1, u2, x1, x2, x3, x4, x5, y1, y2, y3, y4, y5)    POCKETFFT_PARTSTEP11a0(u1,u2,x1,x2,x3,x4,x5,y1,y2,y3,y4,y5,CH(0,k,u1),CH(0,k,u2))
     
    #define POCKETFFT_PARTSTEP11(u1, u2, x1, x2, x3, x4, x5, y1, y2, y3, y4, y5)
     
    #define POCKETFFT_REARRANGE(rx, ix, ry, iy)
     
    - - - - - - - - - - - -

    -Typedefs

    using pocketfft::detail::shape_t = std::vector<size_t>
     
    using pocketfft::detail::stride_t = std::vector<ptrdiff_t>
     
    template<typename T >
    using pocketfft::detail::vtype_t = typename VTYPE<T>::type
     
    template<typename T >
    using pocketfft::detail::add_vec_t = typename add_vec<T>::type
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    template<typename T >
    T pocketfft::detail::cos (T)=delete
     
    template<typename T >
    T pocketfft::detail::sin (T)=delete
     
    template<typename T >
    T pocketfft::detail::sqrt (T)=delete
     
    voidpocketfft::detail::aligned_alloc (size_t align, size_t size)
     
    void pocketfft::detail::aligned_dealloc (void *ptr)
     
    template<typename T >
    void pocketfft::detail::PM (T &a, T &b, T c, T d)
     
    template<typename T >
    void pocketfft::detail::PMINPLACE (T &a, T &b)
     
    template<typename T >
    void pocketfft::detail::MPINPLACE (T &a, T &b)
     
    template<typename T >
    cmplx< Tpocketfft::detail::conj (const cmplx< T > &a)
     
    template<bool fwd, typename T , typename T2 >
    void pocketfft::detail::special_mul (const cmplx< T > &v1, const cmplx< T2 > &v2, cmplx< T > &res)
     
    template<typename T >
    void pocketfft::detail::ROT90 (cmplx< T > &a)
     
    template<bool fwd, typename T >
    void pocketfft::detail::ROTX90 (cmplx< T > &a)
     
    size_t & pocketfft::detail::threading::thread_id ()
     
    size_t & pocketfft::detail::threading::num_threads ()
     
    thread_poolpocketfft::detail::threading::get_pool ()
     
    template<typename Func >
    void pocketfft::detail::threading::thread_map (size_t nthreads, Func f)
     Map a function f over nthreads.
     
    template<typename T >
    std::shared_ptr< Tpocketfft::detail::get_plan (size_t length)
     
    template<typename T >
    arr< charpocketfft::detail::alloc_tmp (const shape_t &shape, size_t axsize, size_t elemsize)
     
    template<typename T >
    arr< charpocketfft::detail::alloc_tmp (const shape_t &shape, const shape_t &axes, size_t elemsize)
     
    template<typename T , size_t vlen>
    void pocketfft::detail::copy_input (const multi_iter< vlen > &it, const cndarr< cmplx< T > > &src, cmplx< vtype_t< T > > *dst)
     
    template<typename T , size_t vlen>
    void pocketfft::detail::copy_input (const multi_iter< vlen > &it, const cndarr< T > &src, vtype_t< T > *dst)
     
    template<typename T , size_t vlen>
    void pocketfft::detail::copy_input (const multi_iter< vlen > &it, const cndarr< T > &src, T *dst)
     
    template<typename T , size_t vlen>
    void pocketfft::detail::copy_output (const multi_iter< vlen > &it, const cmplx< vtype_t< T > > *src, ndarr< cmplx< T > > &dst)
     
    template<typename T , size_t vlen>
    void pocketfft::detail::copy_output (const multi_iter< vlen > &it, const vtype_t< T > *src, ndarr< T > &dst)
     
    template<typename T , size_t vlen>
    void pocketfft::detail::copy_output (const multi_iter< vlen > &it, const T *src, ndarr< T > &dst)
     
    template<typename Tplan , typename T , typename T0 , typename Exec >
    void pocketfft::detail::general_nd (const cndarr< T > &in, ndarr< T > &out, const shape_t &axes, T0 fct, size_t nthreads, const Exec &exec, const bool allow_inplace=true)
     
    template<typename T , size_t vlen>
    void pocketfft::detail::copy_hartley (const multi_iter< vlen > &it, const vtype_t< T > *src, ndarr< T > &dst)
     
    template<typename T , size_t vlen>
    void pocketfft::detail::copy_hartley (const multi_iter< vlen > &it, const T *src, ndarr< T > &dst)
     
    template<typename T >
    void pocketfft::detail::general_r2c (const cndarr< T > &in, ndarr< cmplx< T > > &out, size_t axis, bool forward, T fct, size_t nthreads)
     
    template<typename T >
    void pocketfft::detail::general_c2r (const cndarr< cmplx< T > > &in, ndarr< T > &out, size_t axis, bool forward, T fct, size_t nthreads)
     
    template<typename T >
    void pocketfft::detail::c2c (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, bool forward, const std::complex< T > *data_in, std::complex< T > *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void pocketfft::detail::dct (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, int type, const T *data_in, T *data_out, T fct, bool ortho, size_t nthreads=1)
     
    template<typename T >
    void pocketfft::detail::dst (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, int type, const T *data_in, T *data_out, T fct, bool ortho, size_t nthreads=1)
     
    template<typename T >
    void pocketfft::detail::r2c (const shape_t &shape_in, const stride_t &stride_in, const stride_t &stride_out, size_t axis, bool forward, const T *data_in, std::complex< T > *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void pocketfft::detail::r2c (const shape_t &shape_in, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, bool forward, const T *data_in, std::complex< T > *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void pocketfft::detail::c2r (const shape_t &shape_out, const stride_t &stride_in, const stride_t &stride_out, size_t axis, bool forward, const std::complex< T > *data_in, T *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void pocketfft::detail::c2r (const shape_t &shape_out, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, bool forward, const std::complex< T > *data_in, T *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void pocketfft::detail::r2r_fftpack (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, bool real2hermitian, bool forward, const T *data_in, T *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void pocketfft::detail::r2r_separable_hartley (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, const T *data_in, T *data_out, T fct, size_t nthreads=1)
     
    template<typename T >
    void pocketfft::detail::r2r_genuine_hartley (const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes, const T *data_in, T *data_out, T fct, size_t nthreads=1)
     
    - - - - - - - -

    -Variables

    constexpr bool pocketfft::detail::FORWARD = true
     
    constexpr bool pocketfft::detail::BACKWARD = false
     
    static const size_t pocketfft::detail::threading::max_threads = std::max(1u, std::thread::hardware_concurrency())
     
    -

    Macro Definition Documentation

    - -

    ◆ POCKETFFT_CACHE_SIZE

    - -
    -
    - - - - -
    #define POCKETFFT_CACHE_SIZE   0
    -
    - -
    -
    - -

    ◆ POCKETFFT_NO_VECTORS

    - -
    -
    - - - - -
    #define POCKETFFT_NO_VECTORS
    -
    - -
    -
    - -

    ◆ POCKETFFT_NOINLINE

    - -
    -
    - - - - -
    #define POCKETFFT_NOINLINE
    -
    - -
    -
    - -

    ◆ POCKETFFT_PARTSTEP11

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define POCKETFFT_PARTSTEP11( u1,
    u2,
    x1,
    x2,
    x3,
    x4,
    x5,
    y1,
    y2,
    y3,
    y4,
    y5 )
    -
    -Value:
    { \
    -
    T da,db; \
    -
    POCKETFFT_PARTSTEP11a0(u1,u2,x1,x2,x3,x4,x5,y1,y2,y3,y4,y5,da,db) \
    -
    special_mul<fwd>(da,WA(u1-1,i),CH(i,k,u1)); \
    -
    special_mul<fwd>(db,WA(u2-1,i),CH(i,k,u2)); \
    -
    }
    -
    -
    -
    - -

    ◆ POCKETFFT_PARTSTEP11a

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define POCKETFFT_PARTSTEP11a( u1,
    u2,
    x1,
    x2,
    x3,
    x4,
    x5,
    y1,
    y2,
    y3,
    y4,
    y5 )    POCKETFFT_PARTSTEP11a0(u1,u2,x1,x2,x3,x4,x5,y1,y2,y3,y4,y5,CH(0,k,u1),CH(0,k,u2))
    -
    - -
    -
    - -

    ◆ POCKETFFT_PARTSTEP11a0

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define POCKETFFT_PARTSTEP11a0( u1,
    u2,
    x1,
    x2,
    x3,
    x4,
    x5,
    y1,
    y2,
    y3,
    y4,
    y5,
    out1,
    out2 )
    -
    -Value:
    { \
    -
    T ca = t1 + t2*x1 + t3*x2 + t4*x3 + t5*x4 +t6*x5, \
    -
    cb; \
    -
    cb.i=y1*t11.r y2*t10.r y3*t9.r y4*t8.r y5*t7.r; \
    -
    cb.r=-(y1*t11.i y2*t10.i y3*t9.i y4*t8.i y5*t7.i ); \
    -
    PM(out1,out2,ca,cb); \
    -
    }
    -
    -
    -
    - -

    ◆ POCKETFFT_PARTSTEP3a

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    #define POCKETFFT_PARTSTEP3a( u1,
    u2,
    twr,
    twi )
    -
    -Value:
    { \
    -
    T ca=t0+t1*twr; \
    -
    T cb{-t2.i*twi, t2.r*twi}; \
    -
    PM(CH(0,k,u1),CH(0,k,u2),ca,cb) ;\
    -
    }
    -
    -
    -
    - -

    ◆ POCKETFFT_PARTSTEP3b

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    #define POCKETFFT_PARTSTEP3b( u1,
    u2,
    twr,
    twi )
    -
    -Value:
    { \
    -
    T ca=t0+t1*twr; \
    -
    T cb{-t2.i*twi, t2.r*twi}; \
    -
    special_mul<fwd>(ca+cb,WA(u1-1,i),CH(i,k,u1)); \
    -
    special_mul<fwd>(ca-cb,WA(u2-1,i),CH(i,k,u2)); \
    -
    }
    -
    -
    -
    - -

    ◆ POCKETFFT_PARTSTEP5a

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define POCKETFFT_PARTSTEP5a( u1,
    u2,
    twar,
    twbr,
    twai,
    twbi )
    -
    -Value:
    { \
    -
    T ca,cb; \
    -
    ca.r=t0.r+twar*t1.r+twbr*t2.r; \
    -
    ca.i=t0.i+twar*t1.i+twbr*t2.i; \
    -
    cb.i=twai*t4.r twbi*t3.r; \
    -
    cb.r=-(twai*t4.i twbi*t3.i); \
    -
    PM(CH(0,k,u1),CH(0,k,u2),ca,cb); \
    -
    }
    -
    -
    -
    - -

    ◆ POCKETFFT_PARTSTEP5b

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define POCKETFFT_PARTSTEP5b( u1,
    u2,
    twar,
    twbr,
    twai,
    twbi )
    -
    -Value:
    { \
    -
    T ca,cb,da,db; \
    -
    ca.r=t0.r+twar*t1.r+twbr*t2.r; \
    -
    ca.i=t0.i+twar*t1.i+twbr*t2.i; \
    -
    cb.i=twai*t4.r twbi*t3.r; \
    -
    cb.r=-(twai*t4.i twbi*t3.i); \
    -
    special_mul<fwd>(ca+cb,WA(u1-1,i),CH(i,k,u1)); \
    -
    special_mul<fwd>(ca-cb,WA(u2-1,i),CH(i,k,u2)); \
    -
    }
    -
    -
    -
    - -

    ◆ POCKETFFT_PARTSTEP7

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define POCKETFFT_PARTSTEP7( u1,
    u2,
    x1,
    x2,
    x3,
    y1,
    y2,
    y3 )
    -
    -Value:
    { \
    -
    T da,db; \
    -
    POCKETFFT_PARTSTEP7a0(u1,u2,x1,x2,x3,y1,y2,y3,da,db) \
    -
    special_mul<fwd>(da,WA(u1-1,i),CH(i,k,u1)); \
    -
    special_mul<fwd>(db,WA(u2-1,i),CH(i,k,u2)); \
    -
    }
    -
    -
    -
    - -

    ◆ POCKETFFT_PARTSTEP7a

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define POCKETFFT_PARTSTEP7a( u1,
    u2,
    x1,
    x2,
    x3,
    y1,
    y2,
    y3 )    POCKETFFT_PARTSTEP7a0(u1,u2,x1,x2,x3,y1,y2,y3,CH(0,k,u1),CH(0,k,u2))
    -
    - -
    -
    - -

    ◆ POCKETFFT_PARTSTEP7a0

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #define POCKETFFT_PARTSTEP7a0( u1,
    u2,
    x1,
    x2,
    x3,
    y1,
    y2,
    y3,
    out1,
    out2 )
    -
    -Value:
    { \
    -
    T ca,cb; \
    -
    ca.r=t1.r+x1*t2.r+x2*t3.r+x3*t4.r; \
    -
    ca.i=t1.i+x1*t2.i+x2*t3.i+x3*t4.i; \
    -
    cb.i=y1*t7.r y2*t6.r y3*t5.r; \
    -
    cb.r=-(y1*t7.i y2*t6.i y3*t5.i); \
    -
    PM(out1,out2,ca,cb); \
    -
    }
    -
    -
    -
    - -

    ◆ POCKETFFT_PREP11

    - -
    -
    - - - - - - - -
    #define POCKETFFT_PREP11( idx)
    -
    -Value:
    T t1 = CC(idx,0,k), t2, t3, t4, t5, t6, t7, t8, t9, t10, t11; \
    -
    PM (t2,t11,CC(idx,1,k),CC(idx,10,k)); \
    -
    PM (t3,t10,CC(idx,2,k),CC(idx, 9,k)); \
    -
    PM (t4,t9 ,CC(idx,3,k),CC(idx, 8,k)); \
    -
    PM (t5,t8 ,CC(idx,4,k),CC(idx, 7,k)); \
    -
    PM (t6,t7 ,CC(idx,5,k),CC(idx, 6,k)); \
    -
    CH(idx,k,0).r=t1.r+t2.r+t3.r+t4.r+t5.r+t6.r; \
    -
    CH(idx,k,0).i=t1.i+t2.i+t3.i+t4.i+t5.i+t6.i;
    -
    -
    -
    - -

    ◆ POCKETFFT_PREP3

    - -
    -
    - - - - - - - -
    #define POCKETFFT_PREP3( idx)
    -
    -Value:
    T t0 = CC(idx,0,k), t1, t2; \
    -
    PM (t1,t2,CC(idx,1,k),CC(idx,2,k)); \
    -
    CH(idx,k,0)=t0+t1;
    -
    -
    -
    - -

    ◆ POCKETFFT_PREP5

    - -
    -
    - - - - - - - -
    #define POCKETFFT_PREP5( idx)
    -
    -Value:
    T t0 = CC(idx,0,k), t1, t2, t3, t4; \
    -
    PM (t1,t4,CC(idx,1,k),CC(idx,4,k)); \
    -
    PM (t2,t3,CC(idx,2,k),CC(idx,3,k)); \
    -
    CH(idx,k,0).r=t0.r+t1.r+t2.r; \
    -
    CH(idx,k,0).i=t0.i+t1.i+t2.i;
    -
    -
    -
    - -

    ◆ POCKETFFT_PREP7

    - -
    -
    - - - - - - - -
    #define POCKETFFT_PREP7( idx)
    -
    -Value:
    T t1 = CC(idx,0,k), t2, t3, t4, t5, t6, t7; \
    -
    PM (t2,t7,CC(idx,1,k),CC(idx,6,k)); \
    -
    PM (t3,t6,CC(idx,2,k),CC(idx,5,k)); \
    -
    PM (t4,t5,CC(idx,3,k),CC(idx,4,k)); \
    -
    CH(idx,k,0).r=t1.r+t2.r+t3.r+t4.r; \
    -
    CH(idx,k,0).i=t1.i+t2.i+t3.i+t4.i;
    -
    -
    -
    - -

    ◆ POCKETFFT_REARRANGE

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    #define POCKETFFT_REARRANGE( rx,
    ix,
    ry,
    iy )
    -
    -Value:
    {\
    -
    auto t1=rx+ry, t2=ry-rx, t3=ix+iy, t4=ix-iy; \
    -
    rx=t1; ix=t3; ry=t4; iy=t2; \
    -
    }
    -
    -
    -
    - -

    ◆ POCKETFFT_RESTRICT

    - -
    -
    - - - - -
    #define POCKETFFT_RESTRICT
    -
    - -
    -
    -
    - - - - diff --git a/docs/build/html/pocketfft_8h_source.html b/docs/build/html/pocketfft_8h_source.html deleted file mode 100644 index 990346881..000000000 --- a/docs/build/html/pocketfft_8h_source.html +++ /dev/null @@ -1,4170 +0,0 @@ - - - - - - - -MLX: mlx/3rdparty/pocketfft.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    pocketfft.h
    -
    -
    -Go to the documentation of this file.
    1/*
    -
    2This file is part of pocketfft.
    -
    3
    -
    4Copyright (C) 2010-2022 Max-Planck-Society
    -
    5Copyright (C) 2019-2020 Peter Bell
    -
    6
    -
    7For the odd-sized DCT-IV transforms:
    -
    8 Copyright (C) 2003, 2007-14 Matteo Frigo
    -
    9 Copyright (C) 2003, 2007-14 Massachusetts Institute of Technology
    -
    10
    -
    11Authors: Martin Reinecke, Peter Bell
    -
    12
    -
    13All rights reserved.
    -
    14
    -
    15Redistribution and use in source and binary forms, with or without modification,
    -
    16are permitted provided that the following conditions are met:
    -
    17
    -
    18* Redistributions of source code must retain the above copyright notice, this
    -
    19 list of conditions and the following disclaimer.
    -
    20* Redistributions in binary form must reproduce the above copyright notice, this
    -
    21 list of conditions and the following disclaimer in the documentation and/or
    -
    22 other materials provided with the distribution.
    -
    23* Neither the name of the copyright holder nor the names of its contributors may
    -
    24 be used to endorse or promote products derived from this software without
    -
    25 specific prior written permission.
    -
    26
    -
    27THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    -
    28ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    -
    29WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    -
    30DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
    -
    31ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    -
    32(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    -
    33LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
    -
    34ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    -
    35(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    -
    36SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    -
    37*/
    -
    38
    -
    39#ifndef POCKETFFT_HDRONLY_H
    -
    40#define POCKETFFT_HDRONLY_H
    -
    41
    -
    42#ifndef __cplusplus
    -
    43#error This file is C++ and requires a C++ compiler.
    -
    44#endif
    -
    45
    -
    46#if !(__cplusplus >= 201103L || _MSVC_LANG+0L >= 201103L)
    -
    47#error This file requires at least C++11 support.
    -
    48#endif
    -
    49
    -
    50#ifndef POCKETFFT_CACHE_SIZE
    -
    51#define POCKETFFT_CACHE_SIZE 0
    -
    52#endif
    -
    53
    -
    54#include <cmath>
    -
    55#include <cstdlib>
    -
    56#include <stdexcept>
    -
    57#include <memory>
    -
    58#include <vector>
    -
    59#include <complex>
    -
    60#include <algorithm>
    -
    61#if POCKETFFT_CACHE_SIZE!=0
    -
    62#include <array>
    -
    63#include <mutex>
    -
    64#endif
    -
    65
    -
    66#ifndef POCKETFFT_NO_MULTITHREADING
    -
    67#include <mutex>
    -
    68#include <condition_variable>
    -
    69#include <thread>
    -
    70#include <queue>
    -
    71#include <atomic>
    -
    72#include <functional>
    -
    73#include <new>
    -
    74
    -
    75#ifdef POCKETFFT_PTHREADS
    -
    76# include <pthread.h>
    -
    77#endif
    -
    78#endif
    -
    79
    -
    80#if defined(__GNUC__)
    -
    81#define POCKETFFT_NOINLINE __attribute__((noinline))
    -
    82#define POCKETFFT_RESTRICT __restrict__
    -
    83#elif defined(_MSC_VER)
    -
    84#define POCKETFFT_NOINLINE __declspec(noinline)
    -
    85#define POCKETFFT_RESTRICT __restrict
    -
    86#else
    -
    87#define POCKETFFT_NOINLINE
    -
    88#define POCKETFFT_RESTRICT
    -
    89#endif
    -
    90
    -
    -
    91namespace pocketfft {
    -
    92
    -
    -
    93namespace detail {
    -
    94using std::size_t;
    -
    95using std::ptrdiff_t;
    -
    96
    -
    97// Always use std:: for <cmath> functions
    -
    98template <typename T> T cos(T) = delete;
    -
    99template <typename T> T sin(T) = delete;
    -
    100template <typename T> T sqrt(T) = delete;
    -
    101
    -
    102using shape_t = std::vector<size_t>;
    -
    103using stride_t = std::vector<ptrdiff_t>;
    -
    104
    -
    105constexpr bool FORWARD = true,
    -
    106 BACKWARD = false;
    -
    107
    -
    108// only enable vector support for gcc>=5.0 and clang>=5.0
    -
    109#ifndef POCKETFFT_NO_VECTORS
    -
    110#define POCKETFFT_NO_VECTORS
    -
    111#if defined(__INTEL_COMPILER)
    -
    112// do nothing. This is necessary because this compiler also sets __GNUC__.
    -
    113#elif defined(__clang__)
    -
    114// AppleClang has their own version numbering
    -
    115#ifdef __apple_build_version__
    -
    116# if (__clang_major__ > 9) || (__clang_major__ == 9 && __clang_minor__ >= 1)
    -
    117# undef POCKETFFT_NO_VECTORS
    -
    118# endif
    -
    119#elif __clang_major__ >= 5
    -
    120# undef POCKETFFT_NO_VECTORS
    -
    121#endif
    -
    122#elif defined(__GNUC__)
    -
    123#if __GNUC__>=5
    -
    124#undef POCKETFFT_NO_VECTORS
    -
    125#endif
    -
    126#endif
    -
    127#endif
    -
    128
    -
    129template<typename T> struct VLEN { static constexpr size_t val=1; };
    -
    130
    -
    131#ifndef POCKETFFT_NO_VECTORS
    -
    132#if (defined(__AVX512F__))
    -
    133template<> struct VLEN<float> { static constexpr size_t val=16; };
    -
    134template<> struct VLEN<double> { static constexpr size_t val=8; };
    -
    135#elif (defined(__AVX__))
    -
    136template<> struct VLEN<float> { static constexpr size_t val=8; };
    -
    137template<> struct VLEN<double> { static constexpr size_t val=4; };
    -
    138#elif (defined(__SSE2__))
    -
    139template<> struct VLEN<float> { static constexpr size_t val=4; };
    -
    140template<> struct VLEN<double> { static constexpr size_t val=2; };
    -
    141#elif (defined(__VSX__))
    -
    142template<> struct VLEN<float> { static constexpr size_t val=4; };
    -
    143template<> struct VLEN<double> { static constexpr size_t val=2; };
    -
    144#elif (defined(__ARM_NEON__) || defined(__ARM_NEON))
    -
    145template<> struct VLEN<float> { static constexpr size_t val=4; };
    -
    146template<> struct VLEN<double> { static constexpr size_t val=2; };
    -
    147#else
    -
    148#define POCKETFFT_NO_VECTORS
    -
    149#endif
    -
    150#endif
    -
    151
    -
    152// the __MINGW32__ part in the conditional below works around the problem that
    -
    153// the standard C++ library on Windows does not provide aligned_alloc() even
    -
    154// though the MinGW compiler and MSVC may advertise C++17 compliance.
    -
    155#if (__cplusplus >= 201703L) && (!defined(__MINGW32__)) && (!defined(_MSC_VER))
    -
    156inline void *aligned_alloc(size_t align, size_t size)
    -
    157 {
    -
    158 // aligned_alloc() requires that the requested size is a multiple of "align"
    -
    159 void *ptr = ::aligned_alloc(align,(size+align-1)&(~(align-1)));
    -
    160 if (!ptr) throw std::bad_alloc();
    -
    161 return ptr;
    -
    162 }
    -
    163inline void aligned_dealloc(void *ptr)
    -
    164 { free(ptr); }
    -
    165#else // portable emulation
    -
    -
    166inline void *aligned_alloc(size_t align, size_t size)
    -
    167 {
    -
    168 align = std::max(align, alignof(max_align_t));
    -
    169 void *ptr = malloc(size+align);
    -
    170 if (!ptr) throw std::bad_alloc();
    -
    171 void *res = reinterpret_cast<void *>
    -
    172 ((reinterpret_cast<uintptr_t>(ptr) & ~(uintptr_t(align-1))) + uintptr_t(align));
    -
    173 (reinterpret_cast<void**>(res))[-1] = ptr;
    -
    174 return res;
    -
    175 }
    -
    -
    -
    176inline void aligned_dealloc(void *ptr)
    -
    177 { if (ptr) free((reinterpret_cast<void**>(ptr))[-1]); }
    -
    -
    178#endif
    -
    179
    -
    -
    180template<typename T> class arr
    -
    181 {
    -
    182 private:
    -
    183 T *p;
    -
    184 size_t sz;
    -
    185
    -
    186#if defined(POCKETFFT_NO_VECTORS)
    -
    187 static T *ralloc(size_t num)
    -
    188 {
    -
    189 if (num==0) return nullptr;
    -
    190 void *res = malloc(num*sizeof(T));
    -
    191 if (!res) throw std::bad_alloc();
    -
    192 return reinterpret_cast<T *>(res);
    -
    193 }
    -
    194 static void dealloc(T *ptr)
    -
    195 { free(ptr); }
    -
    196#else
    -
    197 static T *ralloc(size_t num)
    -
    198 {
    -
    199 if (num==0) return nullptr;
    -
    200 void *ptr = aligned_alloc(64, num*sizeof(T));
    -
    201 return static_cast<T*>(ptr);
    -
    202 }
    -
    203 static void dealloc(T *ptr)
    -
    204 { aligned_dealloc(ptr); }
    -
    205#endif
    -
    206
    -
    207 public:
    -
    208 arr() : p(0), sz(0) {}
    -
    209 arr(size_t n) : p(ralloc(n)), sz(n) {}
    -
    -
    210 arr(arr &&other)
    -
    211 : p(other.p), sz(other.sz)
    -
    212 { other.p=nullptr; other.sz=0; }
    -
    -
    213 ~arr() { dealloc(p); }
    -
    214
    -
    -
    215 void resize(size_t n)
    -
    216 {
    -
    217 if (n==sz) return;
    -
    218 dealloc(p);
    -
    219 p = ralloc(n);
    -
    220 sz = n;
    -
    221 }
    -
    -
    222
    -
    223 T &operator[](size_t idx) { return p[idx]; }
    -
    224 const T &operator[](size_t idx) const { return p[idx]; }
    -
    225
    -
    226 T *data() { return p; }
    -
    227 const T *data() const { return p; }
    -
    228
    -
    229 size_t size() const { return sz; }
    -
    230 };
    -
    -
    231
    -
    -
    232template<typename T> struct cmplx {
    -
    233 T r, i;
    -
    234 cmplx() {}
    -
    235 cmplx(T r_, T i_) : r(r_), i(i_) {}
    -
    236 void Set(T r_, T i_) { r=r_; i=i_; }
    -
    237 void Set(T r_) { r=r_; i=T(0); }
    -
    -
    238 cmplx &operator+= (const cmplx &other)
    -
    239 { r+=other.r; i+=other.i; return *this; }
    -
    -
    -
    240 template<typename T2>cmplx &operator*= (T2 other)
    -
    241 { r*=other; i*=other; return *this; }
    -
    -
    -
    242 template<typename T2>cmplx &operator*= (const cmplx<T2> &other)
    -
    243 {
    -
    244 T tmp = r*other.r - i*other.i;
    -
    245 i = r*other.i + i*other.r;
    -
    246 r = tmp;
    -
    247 return *this;
    -
    248 }
    -
    -
    -
    249 template<typename T2>cmplx &operator+= (const cmplx<T2> &other)
    -
    250 { r+=other.r; i+=other.i; return *this; }
    -
    -
    -
    251 template<typename T2>cmplx &operator-= (const cmplx<T2> &other)
    -
    252 { r-=other.r; i-=other.i; return *this; }
    -
    -
    -
    253 template<typename T2> auto operator* (const T2 &other) const
    -
    254 -> cmplx<decltype(r*other)>
    -
    255 { return {r*other, i*other}; }
    -
    -
    -
    256 template<typename T2> auto operator+ (const cmplx<T2> &other) const
    -
    257 -> cmplx<decltype(r+other.r)>
    -
    258 { return {r+other.r, i+other.i}; }
    -
    -
    -
    259 template<typename T2> auto operator- (const cmplx<T2> &other) const
    -
    260 -> cmplx<decltype(r+other.r)>
    -
    261 { return {r-other.r, i-other.i}; }
    -
    -
    -
    262 template<typename T2> auto operator* (const cmplx<T2> &other) const
    -
    263 -> cmplx<decltype(r+other.r)>
    -
    264 { return {r*other.r-i*other.i, r*other.i + i*other.r}; }
    -
    -
    -
    265 template<bool fwd, typename T2> auto special_mul (const cmplx<T2> &other) const
    -
    266 -> cmplx<decltype(r+other.r)>
    -
    267 {
    -
    268 using Tres = cmplx<decltype(r+other.r)>;
    -
    269 return fwd ? Tres(r*other.r+i*other.i, i*other.r-r*other.i)
    -
    270 : Tres(r*other.r-i*other.i, r*other.i+i*other.r);
    -
    271 }
    -
    -
    272};
    -
    -
    -
    273template<typename T> inline void PM(T &a, T &b, T c, T d)
    -
    274 { a=c+d; b=c-d; }
    -
    -
    -
    275template<typename T> inline void PMINPLACE(T &a, T &b)
    -
    276 { T t = a; a+=b; b=t-b; }
    -
    -
    -
    277template<typename T> inline void MPINPLACE(T &a, T &b)
    -
    278 { T t = a; a-=b; b=t+b; }
    -
    -
    -
    279template<typename T> cmplx<T> conj(const cmplx<T> &a)
    -
    280 { return {a.r, -a.i}; }
    -
    -
    -
    281template<bool fwd, typename T, typename T2> void special_mul (const cmplx<T> &v1, const cmplx<T2> &v2, cmplx<T> &res)
    -
    282 {
    -
    283 res = fwd ? cmplx<T>(v1.r*v2.r+v1.i*v2.i, v1.i*v2.r-v1.r*v2.i)
    -
    284 : cmplx<T>(v1.r*v2.r-v1.i*v2.i, v1.r*v2.i+v1.i*v2.r);
    -
    285 }
    -
    -
    286
    -
    -
    287template<typename T> void ROT90(cmplx<T> &a)
    -
    288 { auto tmp_=a.r; a.r=-a.i; a.i=tmp_; }
    -
    -
    -
    289template<bool fwd, typename T> void ROTX90(cmplx<T> &a)
    -
    290 { auto tmp_= fwd ? -a.r : a.r; a.r = fwd ? a.i : -a.i; a.i=tmp_; }
    -
    -
    291
    -
    292//
    -
    293// twiddle factor section
    -
    294//
    -
    -
    295template<typename T> class sincos_2pibyn
    -
    296 {
    -
    297 private:
    -
    298 using Thigh = typename std::conditional<(sizeof(T)>sizeof(double)), T, double>::type;
    -
    299 size_t N, mask, shift;
    -
    300 arr<cmplx<Thigh>> v1, v2;
    -
    301
    -
    302 static cmplx<Thigh> calc(size_t x, size_t n, Thigh ang)
    -
    303 {
    -
    304 x<<=3;
    -
    305 if (x<4*n) // first half
    -
    306 {
    -
    307 if (x<2*n) // first quadrant
    -
    308 {
    -
    309 if (x<n) return cmplx<Thigh>(std::cos(Thigh(x)*ang), std::sin(Thigh(x)*ang));
    -
    310 return cmplx<Thigh>(std::sin(Thigh(2*n-x)*ang), std::cos(Thigh(2*n-x)*ang));
    -
    311 }
    -
    312 else // second quadrant
    -
    313 {
    -
    314 x-=2*n;
    -
    315 if (x<n) return cmplx<Thigh>(-std::sin(Thigh(x)*ang), std::cos(Thigh(x)*ang));
    -
    316 return cmplx<Thigh>(-std::cos(Thigh(2*n-x)*ang), std::sin(Thigh(2*n-x)*ang));
    -
    317 }
    -
    318 }
    -
    319 else
    -
    320 {
    -
    321 x=8*n-x;
    -
    322 if (x<2*n) // third quadrant
    -
    323 {
    -
    324 if (x<n) return cmplx<Thigh>(std::cos(Thigh(x)*ang), -std::sin(Thigh(x)*ang));
    -
    325 return cmplx<Thigh>(std::sin(Thigh(2*n-x)*ang), -std::cos(Thigh(2*n-x)*ang));
    -
    326 }
    -
    327 else // fourth quadrant
    -
    328 {
    -
    329 x-=2*n;
    -
    330 if (x<n) return cmplx<Thigh>(-std::sin(Thigh(x)*ang), -std::cos(Thigh(x)*ang));
    -
    331 return cmplx<Thigh>(-std::cos(Thigh(2*n-x)*ang), -std::sin(Thigh(2*n-x)*ang));
    -
    332 }
    -
    333 }
    -
    334 }
    -
    335
    -
    336 public:
    -
    - -
    338 : N(n)
    -
    339 {
    -
    340 constexpr auto pi = 3.141592653589793238462643383279502884197L;
    -
    341 Thigh ang = Thigh(0.25L*pi/n);
    -
    342 size_t nval = (n+2)/2;
    -
    343 shift = 1;
    -
    344 while((size_t(1)<<shift)*(size_t(1)<<shift) < nval) ++shift;
    -
    345 mask = (size_t(1)<<shift)-1;
    -
    346 v1.resize(mask+1);
    -
    347 v1[0].Set(Thigh(1), Thigh(0));
    -
    348 for (size_t i=1; i<v1.size(); ++i)
    -
    349 v1[i]=calc(i,n,ang);
    -
    350 v2.resize((nval+mask)/(mask+1));
    -
    351 v2[0].Set(Thigh(1), Thigh(0));
    -
    352 for (size_t i=1; i<v2.size(); ++i)
    -
    353 v2[i]=calc(i*(mask+1),n,ang);
    -
    354 }
    -
    -
    355
    -
    -
    356 cmplx<T> operator[](size_t idx) const
    -
    357 {
    -
    358 if (2*idx<=N)
    -
    359 {
    -
    360 auto x1=v1[idx&mask], x2=v2[idx>>shift];
    -
    361 return cmplx<T>(T(x1.r*x2.r-x1.i*x2.i), T(x1.r*x2.i+x1.i*x2.r));
    -
    362 }
    -
    363 idx = N-idx;
    -
    364 auto x1=v1[idx&mask], x2=v2[idx>>shift];
    -
    365 return cmplx<T>(T(x1.r*x2.r-x1.i*x2.i), -T(x1.r*x2.i+x1.i*x2.r));
    -
    366 }
    -
    -
    367 };
    -
    -
    368
    -
    -
    369struct util // hack to avoid duplicate symbols
    -
    370 {
    -
    - -
    372 {
    -
    373 size_t res=1;
    -
    374 while ((n&1)==0)
    -
    375 { res=2; n>>=1; }
    -
    376 for (size_t x=3; x*x<=n; x+=2)
    -
    377 while ((n%x)==0)
    -
    378 { res=x; n/=x; }
    -
    379 if (n>1) res=n;
    -
    380 return res;
    -
    381 }
    -
    -
    382
    -
    -
    383 static POCKETFFT_NOINLINE double cost_guess (size_t n)
    -
    384 {
    -
    385 constexpr double lfp=1.1; // penalty for non-hardcoded larger factors
    -
    386 size_t ni=n;
    -
    387 double result=0.;
    -
    388 while ((n&1)==0)
    -
    389 { result+=2; n>>=1; }
    -
    390 for (size_t x=3; x*x<=n; x+=2)
    -
    391 while ((n%x)==0)
    -
    392 {
    -
    393 result+= (x<=5) ? double(x) : lfp*double(x); // penalize larger prime factors
    -
    394 n/=x;
    -
    395 }
    -
    396 if (n>1) result+=(n<=5) ? double(n) : lfp*double(n);
    -
    397 return result*double(ni);
    -
    398 }
    -
    -
    399
    -
    400 /* returns the smallest composite of 2, 3, 5, 7 and 11 which is >= n */
    -
    -
    401 static POCKETFFT_NOINLINE size_t good_size_cmplx(size_t n)
    -
    402 {
    -
    403 if (n<=12) return n;
    -
    404
    -
    405 size_t bestfac=2*n;
    -
    406 for (size_t f11=1; f11<bestfac; f11*=11)
    -
    407 for (size_t f117=f11; f117<bestfac; f117*=7)
    -
    408 for (size_t f1175=f117; f1175<bestfac; f1175*=5)
    -
    409 {
    -
    410 size_t x=f1175;
    -
    411 while (x<n) x*=2;
    -
    412 for (;;)
    -
    413 {
    -
    414 if (x<n)
    -
    415 x*=3;
    -
    416 else if (x>n)
    -
    417 {
    -
    418 if (x<bestfac) bestfac=x;
    -
    419 if (x&1) break;
    -
    420 x>>=1;
    -
    421 }
    -
    422 else
    -
    423 return n;
    -
    424 }
    -
    425 }
    -
    426 return bestfac;
    -
    427 }
    -
    -
    428
    -
    429 /* returns the smallest composite of 2, 3, 5 which is >= n */
    -
    -
    430 static POCKETFFT_NOINLINE size_t good_size_real(size_t n)
    -
    431 {
    -
    432 if (n<=6) return n;
    -
    433
    -
    434 size_t bestfac=2*n;
    -
    435 for (size_t f5=1; f5<bestfac; f5*=5)
    -
    436 {
    -
    437 size_t x = f5;
    -
    438 while (x<n) x *= 2;
    -
    439 for (;;)
    -
    440 {
    -
    441 if (x<n)
    -
    442 x*=3;
    -
    443 else if (x>n)
    -
    444 {
    -
    445 if (x<bestfac) bestfac=x;
    -
    446 if (x&1) break;
    -
    447 x>>=1;
    -
    448 }
    -
    449 else
    -
    450 return n;
    -
    451 }
    -
    452 }
    -
    453 return bestfac;
    -
    454 }
    -
    -
    455
    -
    -
    456 static size_t prod(const shape_t &shape)
    -
    457 {
    -
    458 size_t res=1;
    -
    459 for (auto sz: shape)
    -
    460 res*=sz;
    -
    461 return res;
    -
    462 }
    -
    -
    463
    -
    -
    464 static POCKETFFT_NOINLINE void sanity_check(const shape_t &shape,
    -
    465 const stride_t &stride_in, const stride_t &stride_out, bool inplace)
    -
    466 {
    -
    467 auto ndim = shape.size();
    -
    468 if (ndim<1) throw std::runtime_error("ndim must be >= 1");
    -
    469 if ((stride_in.size()!=ndim) || (stride_out.size()!=ndim))
    -
    470 throw std::runtime_error("stride dimension mismatch");
    -
    471 if (inplace && (stride_in!=stride_out))
    -
    472 throw std::runtime_error("stride mismatch");
    -
    473 }
    -
    -
    474
    -
    -
    475 static POCKETFFT_NOINLINE void sanity_check(const shape_t &shape,
    -
    476 const stride_t &stride_in, const stride_t &stride_out, bool inplace,
    -
    477 const shape_t &axes)
    -
    478 {
    -
    479 sanity_check(shape, stride_in, stride_out, inplace);
    -
    480 auto ndim = shape.size();
    -
    481 shape_t tmp(ndim,0);
    -
    482 for (auto ax : axes)
    -
    483 {
    -
    484 if (ax>=ndim) throw std::invalid_argument("bad axis number");
    -
    485 if (++tmp[ax]>1) throw std::invalid_argument("axis specified repeatedly");
    -
    486 }
    -
    487 }
    -
    -
    488
    -
    -
    489 static POCKETFFT_NOINLINE void sanity_check(const shape_t &shape,
    -
    490 const stride_t &stride_in, const stride_t &stride_out, bool inplace,
    -
    491 size_t axis)
    -
    492 {
    -
    493 sanity_check(shape, stride_in, stride_out, inplace);
    -
    494 if (axis>=shape.size()) throw std::invalid_argument("bad axis number");
    -
    495 }
    -
    -
    496
    -
    497#ifdef POCKETFFT_NO_MULTITHREADING
    -
    498 static size_t thread_count (size_t /*nthreads*/, const shape_t &/*shape*/,
    -
    499 size_t /*axis*/, size_t /*vlen*/)
    -
    500 { return 1; }
    -
    501#else
    -
    -
    502 static size_t thread_count (size_t nthreads, const shape_t &shape,
    -
    503 size_t axis, size_t vlen)
    -
    504 {
    -
    505 if (nthreads==1) return 1;
    -
    506 size_t size = prod(shape);
    -
    507 size_t parallel = size / (shape[axis] * vlen);
    -
    508 if (shape[axis] < 1000)
    -
    509 parallel /= 4;
    -
    510 size_t max_threads = nthreads == 0 ?
    -
    511 std::thread::hardware_concurrency() : nthreads;
    -
    512 return std::max(size_t(1), std::min(parallel, max_threads));
    -
    513 }
    -
    -
    514#endif
    -
    515 };
    -
    -
    516
    -
    -
    517namespace threading {
    -
    518
    -
    519#ifdef POCKETFFT_NO_MULTITHREADING
    -
    520
    -
    521constexpr inline size_t thread_id() { return 0; }
    -
    522constexpr inline size_t num_threads() { return 1; }
    -
    523
    -
    524template <typename Func>
    -
    525void thread_map(size_t /* nthreads */, Func f)
    -
    526 { f(); }
    -
    527
    -
    528#else
    -
    529
    -
    -
    530inline size_t &thread_id()
    -
    531 {
    -
    532 static thread_local size_t thread_id_=0;
    -
    533 return thread_id_;
    -
    534 }
    -
    -
    -
    535inline size_t &num_threads()
    -
    536 {
    -
    537 static thread_local size_t num_threads_=1;
    -
    538 return num_threads_;
    -
    539 }
    -
    -
    540static const size_t max_threads = std::max(1u, std::thread::hardware_concurrency());
    -
    541
    -
    -
    542class latch
    -
    543 {
    -
    544 std::atomic<size_t> num_left_;
    -
    545 std::mutex mut_;
    -
    546 std::condition_variable completed_;
    -
    547 using lock_t = std::unique_lock<std::mutex>;
    -
    548
    -
    549 public:
    -
    550 latch(size_t n): num_left_(n) {}
    -
    551
    -
    - -
    553 {
    -
    554 lock_t lock(mut_);
    -
    555 if (--num_left_)
    -
    556 return;
    -
    557 completed_.notify_all();
    -
    558 }
    -
    -
    559
    -
    -
    560 void wait()
    -
    561 {
    -
    562 lock_t lock(mut_);
    -
    563 completed_.wait(lock, [this]{ return is_ready(); });
    -
    564 }
    -
    -
    565 bool is_ready() { return num_left_ == 0; }
    -
    566 };
    -
    -
    567
    -
    -
    568template <typename T> class concurrent_queue
    -
    569 {
    -
    570 std::queue<T> q_;
    -
    571 std::mutex mut_;
    -
    572 std::atomic<size_t> size_;
    -
    573 using lock_t = std::lock_guard<std::mutex>;
    -
    574
    -
    575 public:
    -
    576
    -
    -
    577 void push(T val)
    -
    578 {
    -
    579 lock_t lock(mut_);
    -
    580 ++size_;
    -
    581 q_.push(std::move(val));
    -
    582 }
    -
    -
    583
    -
    -
    584 bool try_pop(T &val)
    -
    585 {
    -
    586 if (size_ == 0) return false;
    -
    587 lock_t lock(mut_);
    -
    588 // Queue might have been emptied while we acquired the lock
    -
    589 if (q_.empty()) return false;
    -
    590
    -
    591 val = std::move(q_.front());
    -
    592 --size_;
    -
    593 q_.pop();
    -
    594 return true;
    -
    595 }
    -
    -
    596
    -
    597 bool empty() const { return size_==0; }
    -
    598 };
    -
    -
    599
    -
    600// C++ allocator with support for over-aligned types
    -
    -
    601template <typename T> struct aligned_allocator
    -
    602 {
    -
    603 using value_type = T;
    -
    604 template <class U>
    - -
    606 aligned_allocator() = default;
    -
    607
    -
    -
    608 T *allocate(size_t n)
    -
    609 {
    -
    610 void* mem = aligned_alloc(alignof(T), n*sizeof(T));
    -
    611 return static_cast<T*>(mem);
    -
    612 }
    -
    -
    613
    -
    -
    614 void deallocate(T *p, size_t /*n*/)
    -
    615 { aligned_dealloc(p); }
    -
    -
    616 };
    -
    -
    617
    -
    - -
    619 {
    -
    620 // A reasonable guess, probably close enough for most hardware
    -
    621 static constexpr size_t cache_line_size = 64;
    -
    622 struct alignas(cache_line_size) worker
    -
    623 {
    -
    624 std::thread thread;
    -
    625 std::condition_variable work_ready;
    -
    626 std::mutex mut;
    -
    627 std::atomic_flag busy_flag = ATOMIC_FLAG_INIT;
    -
    628 std::function<void()> work;
    -
    629
    -
    630 void worker_main(
    -
    631 std::atomic<bool> &shutdown_flag,
    -
    632 std::atomic<size_t> &unscheduled_tasks,
    -
    633 concurrent_queue<std::function<void()>> &overflow_work)
    -
    634 {
    -
    635 using lock_t = std::unique_lock<std::mutex>;
    -
    636 bool expect_work = true;
    -
    637 while (!shutdown_flag || expect_work)
    -
    638 {
    -
    639 std::function<void()> local_work;
    -
    640 if (expect_work || unscheduled_tasks == 0)
    -
    641 {
    -
    642 lock_t lock(mut);
    -
    643 // Wait until there is work to be executed
    -
    644 work_ready.wait(lock, [&]{ return (work || shutdown_flag); });
    -
    645 local_work.swap(work);
    -
    646 expect_work = false;
    -
    647 }
    -
    648
    -
    649 bool marked_busy = false;
    -
    650 if (local_work)
    -
    651 {
    -
    652 marked_busy = true;
    -
    653 local_work();
    -
    654 }
    -
    655
    -
    656 if (!overflow_work.empty())
    -
    657 {
    -
    658 if (!marked_busy && busy_flag.test_and_set())
    -
    659 {
    -
    660 expect_work = true;
    -
    661 continue;
    -
    662 }
    -
    663 marked_busy = true;
    -
    664
    -
    665 while (overflow_work.try_pop(local_work))
    -
    666 {
    - -
    668 local_work();
    -
    669 }
    -
    670 }
    -
    671
    -
    672 if (marked_busy) busy_flag.clear();
    -
    673 }
    -
    674 }
    -
    675 };
    -
    676
    -
    677 concurrent_queue<std::function<void()>> overflow_work_;
    -
    678 std::mutex mut_;
    -
    679 std::vector<worker, aligned_allocator<worker>> workers_;
    -
    680 std::atomic<bool> shutdown_;
    -
    681 std::atomic<size_t> unscheduled_tasks_;
    -
    682 using lock_t = std::lock_guard<std::mutex>;
    -
    683
    -
    684 void create_threads()
    -
    685 {
    -
    686 lock_t lock(mut_);
    -
    687 size_t nthreads=workers_.size();
    -
    688 for (size_t i=0; i<nthreads; ++i)
    -
    689 {
    -
    690 try
    -
    691 {
    -
    692 auto *worker = &workers_[i];
    -
    693 worker->busy_flag.clear();
    -
    694 worker->work = nullptr;
    -
    695 worker->thread = std::thread([worker, this]
    -
    696 {
    -
    697 worker->worker_main(shutdown_, unscheduled_tasks_, overflow_work_);
    -
    698 });
    -
    699 }
    -
    700 catch (...)
    -
    701 {
    -
    702 shutdown_locked();
    -
    703 throw;
    -
    704 }
    -
    705 }
    -
    706 }
    -
    707
    -
    708 void shutdown_locked()
    -
    709 {
    -
    710 shutdown_ = true;
    -
    711 for (auto &worker : workers_)
    -
    712 worker.work_ready.notify_all();
    -
    713
    -
    714 for (auto &worker : workers_)
    -
    715 if (worker.thread.joinable())
    -
    716 worker.thread.join();
    -
    717 }
    -
    718
    -
    719 public:
    -
    -
    720 explicit thread_pool(size_t nthreads):
    -
    721 workers_(nthreads)
    -
    722 { create_threads(); }
    -
    -
    723
    - -
    725
    -
    726 ~thread_pool() { shutdown(); }
    -
    727
    -
    -
    728 void submit(std::function<void()> work)
    -
    729 {
    -
    730 lock_t lock(mut_);
    -
    731 if (shutdown_)
    -
    732 throw std::runtime_error("Work item submitted after shutdown");
    -
    733
    -
    734 ++unscheduled_tasks_;
    -
    735
    -
    736 // First check for any idle workers and wake those
    -
    737 for (auto &worker : workers_)
    -
    738 if (!worker.busy_flag.test_and_set())
    -
    739 {
    -
    740 --unscheduled_tasks_;
    -
    741 {
    -
    742 lock_t lock(worker.mut);
    -
    743 worker.work = std::move(work);
    -
    744 }
    -
    745 worker.work_ready.notify_one();
    -
    746 return;
    -
    747 }
    -
    748
    -
    749 // If no workers were idle, push onto the overflow queue for later
    -
    750 overflow_work_.push(std::move(work));
    -
    751 }
    -
    -
    752
    -
    -
    753 void shutdown()
    -
    754 {
    -
    755 lock_t lock(mut_);
    -
    756 shutdown_locked();
    -
    757 }
    -
    -
    758
    -
    -
    759 void restart()
    -
    760 {
    -
    761 shutdown_ = false;
    -
    762 create_threads();
    -
    763 }
    -
    -
    764 };
    -
    -
    765
    -
    - -
    767 {
    -
    768 static thread_pool pool;
    -
    769#ifdef POCKETFFT_PTHREADS
    -
    770 static std::once_flag f;
    -
    771 std::call_once(f,
    -
    772 []{
    - -
    774 +[]{ get_pool().shutdown(); }, // prepare
    -
    775 +[]{ get_pool().restart(); }, // parent
    -
    776 +[]{ get_pool().restart(); } // child
    -
    777 );
    -
    778 });
    -
    779#endif
    -
    780
    -
    781 return pool;
    -
    782 }
    -
    -
    783
    -
    785template <typename Func>
    -
    - -
    787 {
    -
    788 if (nthreads == 0)
    - -
    790
    -
    791 if (nthreads == 1)
    -
    792 { f(); return; }
    -
    793
    -
    794 auto & pool = get_pool();
    - -
    796 std::exception_ptr ex;
    -
    797 std::mutex ex_mut;
    -
    798 for (size_t i=0; i<nthreads; ++i)
    -
    799 {
    -
    800 pool.submit(
    -
    801 [&f, &counter, &ex, &ex_mut, i, nthreads] {
    -
    802 thread_id() = i;
    - -
    804 try { f(); }
    -
    805 catch (...)
    -
    806 {
    -
    807 std::lock_guard<std::mutex> lock(ex_mut);
    -
    808 ex = std::current_exception();
    -
    809 }
    -
    810 counter.count_down();
    -
    811 });
    -
    812 }
    -
    813 counter.wait();
    -
    814 if (ex)
    -
    815 std::rethrow_exception(ex);
    -
    816 }
    -
    -
    817
    -
    818#endif
    -
    819
    -
    820}
    -
    -
    821
    -
    822//
    -
    823// complex FFTPACK transforms
    -
    824//
    -
    825
    -
    -
    826template<typename T0> class cfftp
    -
    827 {
    -
    828 private:
    -
    829 struct fctdata
    -
    830 {
    -
    831 size_t fct;
    -
    832 cmplx<T0> *tw, *tws;
    -
    833 };
    -
    834
    -
    835 size_t length;
    -
    836 arr<cmplx<T0>> mem;
    -
    837 std::vector<fctdata> fact;
    -
    838
    -
    839 void add_factor(size_t factor)
    -
    840 { fact.push_back({factor, nullptr, nullptr}); }
    -
    841
    -
    842template<bool fwd, typename T> void pass2 (size_t ido, size_t l1,
    - -
    844 const cmplx<T0> * POCKETFFT_RESTRICT wa) const
    -
    845 {
    -
    846 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    847 { return ch[a+ido*(b+l1*c)]; };
    -
    848 auto CC = [cc,ido](size_t a, size_t b, size_t c) -> const T&
    -
    849 { return cc[a+ido*(b+2*c)]; };
    -
    850 auto WA = [wa, ido](size_t x, size_t i)
    -
    851 { return wa[i-1+x*(ido-1)]; };
    -
    852
    -
    853 if (ido==1)
    -
    854 for (size_t k=0; k<l1; ++k)
    -
    855 {
    -
    856 CH(0,k,0) = CC(0,0,k)+CC(0,1,k);
    -
    857 CH(0,k,1) = CC(0,0,k)-CC(0,1,k);
    -
    858 }
    -
    859 else
    -
    860 for (size_t k=0; k<l1; ++k)
    -
    861 {
    -
    862 CH(0,k,0) = CC(0,0,k)+CC(0,1,k);
    -
    863 CH(0,k,1) = CC(0,0,k)-CC(0,1,k);
    -
    864 for (size_t i=1; i<ido; ++i)
    -
    865 {
    -
    866 CH(i,k,0) = CC(i,0,k)+CC(i,1,k);
    -
    867 special_mul<fwd>(CC(i,0,k)-CC(i,1,k),WA(0,i),CH(i,k,1));
    -
    868 }
    -
    869 }
    -
    870 }
    -
    871
    -
    -
    872#define POCKETFFT_PREP3(idx) \
    -
    873 T t0 = CC(idx,0,k), t1, t2; \
    -
    874 PM (t1,t2,CC(idx,1,k),CC(idx,2,k)); \
    -
    875 CH(idx,k,0)=t0+t1;
    -
    -
    -
    876#define POCKETFFT_PARTSTEP3a(u1,u2,twr,twi) \
    -
    877 { \
    -
    878 T ca=t0+t1*twr; \
    -
    879 T cb{-t2.i*twi, t2.r*twi}; \
    -
    880 PM(CH(0,k,u1),CH(0,k,u2),ca,cb) ;\
    -
    881 }
    -
    -
    -
    882#define POCKETFFT_PARTSTEP3b(u1,u2,twr,twi) \
    -
    883 { \
    -
    884 T ca=t0+t1*twr; \
    -
    885 T cb{-t2.i*twi, t2.r*twi}; \
    -
    886 special_mul<fwd>(ca+cb,WA(u1-1,i),CH(i,k,u1)); \
    -
    887 special_mul<fwd>(ca-cb,WA(u2-1,i),CH(i,k,u2)); \
    -
    888 }
    -
    -
    889template<bool fwd, typename T> void pass3 (size_t ido, size_t l1,
    -
    890 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    891 const cmplx<T0> * POCKETFFT_RESTRICT wa) const
    -
    892 {
    -
    893 constexpr T0 tw1r=-0.5,
    -
    894 tw1i= (fwd ? -1: 1) * T0(0.8660254037844386467637231707529362L);
    -
    895
    -
    896 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    897 { return ch[a+ido*(b+l1*c)]; };
    -
    898 auto CC = [cc,ido](size_t a, size_t b, size_t c) -> const T&
    -
    899 { return cc[a+ido*(b+3*c)]; };
    -
    900 auto WA = [wa, ido](size_t x, size_t i)
    -
    901 { return wa[i-1+x*(ido-1)]; };
    -
    902
    -
    903 if (ido==1)
    -
    904 for (size_t k=0; k<l1; ++k)
    -
    905 {
    - -
    907 POCKETFFT_PARTSTEP3a(1,2,tw1r,tw1i)
    -
    908 }
    -
    909 else
    -
    910 for (size_t k=0; k<l1; ++k)
    -
    911 {
    -
    912 {
    - -
    914 POCKETFFT_PARTSTEP3a(1,2,tw1r,tw1i)
    -
    915 }
    -
    916 for (size_t i=1; i<ido; ++i)
    -
    917 {
    - -
    919 POCKETFFT_PARTSTEP3b(1,2,tw1r,tw1i)
    -
    920 }
    -
    921 }
    -
    922 }
    -
    923
    -
    924#undef POCKETFFT_PARTSTEP3b
    -
    925#undef POCKETFFT_PARTSTEP3a
    -
    926#undef POCKETFFT_PREP3
    -
    927
    -
    928template<bool fwd, typename T> void pass4 (size_t ido, size_t l1,
    -
    929 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    930 const cmplx<T0> * POCKETFFT_RESTRICT wa) const
    -
    931 {
    -
    932 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    933 { return ch[a+ido*(b+l1*c)]; };
    -
    934 auto CC = [cc,ido](size_t a, size_t b, size_t c) -> const T&
    -
    935 { return cc[a+ido*(b+4*c)]; };
    -
    936 auto WA = [wa, ido](size_t x, size_t i)
    -
    937 { return wa[i-1+x*(ido-1)]; };
    -
    938
    -
    939 if (ido==1)
    -
    940 for (size_t k=0; k<l1; ++k)
    -
    941 {
    -
    942 T t1, t2, t3, t4;
    -
    943 PM(t2,t1,CC(0,0,k),CC(0,2,k));
    -
    944 PM(t3,t4,CC(0,1,k),CC(0,3,k));
    -
    945 ROTX90<fwd>(t4);
    -
    946 PM(CH(0,k,0),CH(0,k,2),t2,t3);
    -
    947 PM(CH(0,k,1),CH(0,k,3),t1,t4);
    -
    948 }
    -
    949 else
    -
    950 for (size_t k=0; k<l1; ++k)
    -
    951 {
    -
    952 {
    -
    953 T t1, t2, t3, t4;
    -
    954 PM(t2,t1,CC(0,0,k),CC(0,2,k));
    -
    955 PM(t3,t4,CC(0,1,k),CC(0,3,k));
    -
    956 ROTX90<fwd>(t4);
    -
    957 PM(CH(0,k,0),CH(0,k,2),t2,t3);
    -
    958 PM(CH(0,k,1),CH(0,k,3),t1,t4);
    -
    959 }
    -
    960 for (size_t i=1; i<ido; ++i)
    -
    961 {
    -
    962 T t1, t2, t3, t4;
    -
    963 T cc0=CC(i,0,k), cc1=CC(i,1,k),cc2=CC(i,2,k),cc3=CC(i,3,k);
    -
    964 PM(t2,t1,cc0,cc2);
    -
    965 PM(t3,t4,cc1,cc3);
    -
    966 ROTX90<fwd>(t4);
    -
    967 CH(i,k,0) = t2+t3;
    -
    968 special_mul<fwd>(t1+t4,WA(0,i),CH(i,k,1));
    -
    969 special_mul<fwd>(t2-t3,WA(1,i),CH(i,k,2));
    -
    970 special_mul<fwd>(t1-t4,WA(2,i),CH(i,k,3));
    -
    971 }
    -
    972 }
    -
    973 }
    -
    974
    -
    -
    975#define POCKETFFT_PREP5(idx) \
    -
    976 T t0 = CC(idx,0,k), t1, t2, t3, t4; \
    -
    977 PM (t1,t4,CC(idx,1,k),CC(idx,4,k)); \
    -
    978 PM (t2,t3,CC(idx,2,k),CC(idx,3,k)); \
    -
    979 CH(idx,k,0).r=t0.r+t1.r+t2.r; \
    -
    980 CH(idx,k,0).i=t0.i+t1.i+t2.i;
    -
    -
    981
    -
    -
    982#define POCKETFFT_PARTSTEP5a(u1,u2,twar,twbr,twai,twbi) \
    -
    983 { \
    -
    984 T ca,cb; \
    -
    985 ca.r=t0.r+twar*t1.r+twbr*t2.r; \
    -
    986 ca.i=t0.i+twar*t1.i+twbr*t2.i; \
    -
    987 cb.i=twai*t4.r twbi*t3.r; \
    -
    988 cb.r=-(twai*t4.i twbi*t3.i); \
    -
    989 PM(CH(0,k,u1),CH(0,k,u2),ca,cb); \
    -
    990 }
    -
    -
    991
    -
    -
    992#define POCKETFFT_PARTSTEP5b(u1,u2,twar,twbr,twai,twbi) \
    -
    993 { \
    -
    994 T ca,cb,da,db; \
    -
    995 ca.r=t0.r+twar*t1.r+twbr*t2.r; \
    -
    996 ca.i=t0.i+twar*t1.i+twbr*t2.i; \
    -
    997 cb.i=twai*t4.r twbi*t3.r; \
    -
    998 cb.r=-(twai*t4.i twbi*t3.i); \
    -
    999 special_mul<fwd>(ca+cb,WA(u1-1,i),CH(i,k,u1)); \
    -
    1000 special_mul<fwd>(ca-cb,WA(u2-1,i),CH(i,k,u2)); \
    -
    1001 }
    -
    -
    1002template<bool fwd, typename T> void pass5 (size_t ido, size_t l1,
    -
    1003 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    1004 const cmplx<T0> * POCKETFFT_RESTRICT wa) const
    -
    1005 {
    -
    1006 constexpr T0 tw1r= T0(0.3090169943749474241022934171828191L),
    -
    1007 tw1i= (fwd ? -1: 1) * T0(0.9510565162951535721164393333793821L),
    -
    1008 tw2r= T0(-0.8090169943749474241022934171828191L),
    -
    1009 tw2i= (fwd ? -1: 1) * T0(0.5877852522924731291687059546390728L);
    -
    1010
    -
    1011 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    1012 { return ch[a+ido*(b+l1*c)]; };
    -
    1013 auto CC = [cc,ido](size_t a, size_t b, size_t c) -> const T&
    -
    1014 { return cc[a+ido*(b+5*c)]; };
    -
    1015 auto WA = [wa, ido](size_t x, size_t i)
    -
    1016 { return wa[i-1+x*(ido-1)]; };
    -
    1017
    -
    1018 if (ido==1)
    -
    1019 for (size_t k=0; k<l1; ++k)
    -
    1020 {
    - -
    1022 POCKETFFT_PARTSTEP5a(1,4,tw1r,tw2r,+tw1i,+tw2i)
    -
    1023 POCKETFFT_PARTSTEP5a(2,3,tw2r,tw1r,+tw2i,-tw1i)
    -
    1024 }
    -
    1025 else
    -
    1026 for (size_t k=0; k<l1; ++k)
    -
    1027 {
    -
    1028 {
    - -
    1030 POCKETFFT_PARTSTEP5a(1,4,tw1r,tw2r,+tw1i,+tw2i)
    -
    1031 POCKETFFT_PARTSTEP5a(2,3,tw2r,tw1r,+tw2i,-tw1i)
    -
    1032 }
    -
    1033 for (size_t i=1; i<ido; ++i)
    -
    1034 {
    - -
    1036 POCKETFFT_PARTSTEP5b(1,4,tw1r,tw2r,+tw1i,+tw2i)
    -
    1037 POCKETFFT_PARTSTEP5b(2,3,tw2r,tw1r,+tw2i,-tw1i)
    -
    1038 }
    -
    1039 }
    -
    1040 }
    -
    1041
    -
    1042#undef POCKETFFT_PARTSTEP5b
    -
    1043#undef POCKETFFT_PARTSTEP5a
    -
    1044#undef POCKETFFT_PREP5
    -
    1045
    -
    -
    1046#define POCKETFFT_PREP7(idx) \
    -
    1047 T t1 = CC(idx,0,k), t2, t3, t4, t5, t6, t7; \
    -
    1048 PM (t2,t7,CC(idx,1,k),CC(idx,6,k)); \
    -
    1049 PM (t3,t6,CC(idx,2,k),CC(idx,5,k)); \
    -
    1050 PM (t4,t5,CC(idx,3,k),CC(idx,4,k)); \
    -
    1051 CH(idx,k,0).r=t1.r+t2.r+t3.r+t4.r; \
    -
    1052 CH(idx,k,0).i=t1.i+t2.i+t3.i+t4.i;
    -
    -
    1053
    -
    -
    1054#define POCKETFFT_PARTSTEP7a0(u1,u2,x1,x2,x3,y1,y2,y3,out1,out2) \
    -
    1055 { \
    -
    1056 T ca,cb; \
    -
    1057 ca.r=t1.r+x1*t2.r+x2*t3.r+x3*t4.r; \
    -
    1058 ca.i=t1.i+x1*t2.i+x2*t3.i+x3*t4.i; \
    -
    1059 cb.i=y1*t7.r y2*t6.r y3*t5.r; \
    -
    1060 cb.r=-(y1*t7.i y2*t6.i y3*t5.i); \
    -
    1061 PM(out1,out2,ca,cb); \
    -
    1062 }
    -
    -
    -
    1063#define POCKETFFT_PARTSTEP7a(u1,u2,x1,x2,x3,y1,y2,y3) \
    -
    1064 POCKETFFT_PARTSTEP7a0(u1,u2,x1,x2,x3,y1,y2,y3,CH(0,k,u1),CH(0,k,u2))
    -
    -
    -
    1065#define POCKETFFT_PARTSTEP7(u1,u2,x1,x2,x3,y1,y2,y3) \
    -
    1066 { \
    -
    1067 T da,db; \
    -
    1068 POCKETFFT_PARTSTEP7a0(u1,u2,x1,x2,x3,y1,y2,y3,da,db) \
    -
    1069 special_mul<fwd>(da,WA(u1-1,i),CH(i,k,u1)); \
    -
    1070 special_mul<fwd>(db,WA(u2-1,i),CH(i,k,u2)); \
    -
    1071 }
    -
    -
    1072
    -
    1073template<bool fwd, typename T> void pass7(size_t ido, size_t l1,
    -
    1074 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    1075 const cmplx<T0> * POCKETFFT_RESTRICT wa) const
    -
    1076 {
    -
    1077 constexpr T0 tw1r= T0(0.6234898018587335305250048840042398L),
    -
    1078 tw1i= (fwd ? -1 : 1) * T0(0.7818314824680298087084445266740578L),
    -
    1079 tw2r= T0(-0.2225209339563144042889025644967948L),
    -
    1080 tw2i= (fwd ? -1 : 1) * T0(0.9749279121818236070181316829939312L),
    -
    1081 tw3r= T0(-0.9009688679024191262361023195074451L),
    -
    1082 tw3i= (fwd ? -1 : 1) * T0(0.433883739117558120475768332848359L);
    -
    1083
    -
    1084 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    1085 { return ch[a+ido*(b+l1*c)]; };
    -
    1086 auto CC = [cc,ido](size_t a, size_t b, size_t c) -> const T&
    -
    1087 { return cc[a+ido*(b+7*c)]; };
    -
    1088 auto WA = [wa, ido](size_t x, size_t i)
    -
    1089 { return wa[i-1+x*(ido-1)]; };
    -
    1090
    -
    1091 if (ido==1)
    -
    1092 for (size_t k=0; k<l1; ++k)
    -
    1093 {
    - -
    1095 POCKETFFT_PARTSTEP7a(1,6,tw1r,tw2r,tw3r,+tw1i,+tw2i,+tw3i)
    -
    1096 POCKETFFT_PARTSTEP7a(2,5,tw2r,tw3r,tw1r,+tw2i,-tw3i,-tw1i)
    -
    1097 POCKETFFT_PARTSTEP7a(3,4,tw3r,tw1r,tw2r,+tw3i,-tw1i,+tw2i)
    -
    1098 }
    -
    1099 else
    -
    1100 for (size_t k=0; k<l1; ++k)
    -
    1101 {
    -
    1102 {
    - -
    1104 POCKETFFT_PARTSTEP7a(1,6,tw1r,tw2r,tw3r,+tw1i,+tw2i,+tw3i)
    -
    1105 POCKETFFT_PARTSTEP7a(2,5,tw2r,tw3r,tw1r,+tw2i,-tw3i,-tw1i)
    -
    1106 POCKETFFT_PARTSTEP7a(3,4,tw3r,tw1r,tw2r,+tw3i,-tw1i,+tw2i)
    -
    1107 }
    -
    1108 for (size_t i=1; i<ido; ++i)
    -
    1109 {
    - -
    1111 POCKETFFT_PARTSTEP7(1,6,tw1r,tw2r,tw3r,+tw1i,+tw2i,+tw3i)
    -
    1112 POCKETFFT_PARTSTEP7(2,5,tw2r,tw3r,tw1r,+tw2i,-tw3i,-tw1i)
    -
    1113 POCKETFFT_PARTSTEP7(3,4,tw3r,tw1r,tw2r,+tw3i,-tw1i,+tw2i)
    -
    1114 }
    -
    1115 }
    -
    1116 }
    -
    1117
    -
    1118#undef POCKETFFT_PARTSTEP7
    -
    1119#undef POCKETFFT_PARTSTEP7a0
    -
    1120#undef POCKETFFT_PARTSTEP7a
    -
    1121#undef POCKETFFT_PREP7
    -
    1122
    -
    1123template <bool fwd, typename T> void ROTX45(T &a) const
    -
    1124 {
    -
    1125 constexpr T0 hsqt2=T0(0.707106781186547524400844362104849L);
    -
    1126 if (fwd)
    -
    1127 { auto tmp_=a.r; a.r=hsqt2*(a.r+a.i); a.i=hsqt2*(a.i-tmp_); }
    -
    1128 else
    -
    1129 { auto tmp_=a.r; a.r=hsqt2*(a.r-a.i); a.i=hsqt2*(a.i+tmp_); }
    -
    1130 }
    -
    1131template <bool fwd, typename T> void ROTX135(T &a) const
    -
    1132 {
    -
    1133 constexpr T0 hsqt2=T0(0.707106781186547524400844362104849L);
    -
    1134 if (fwd)
    -
    1135 { auto tmp_=a.r; a.r=hsqt2*(a.i-a.r); a.i=hsqt2*(-tmp_-a.i); }
    -
    1136 else
    -
    1137 { auto tmp_=a.r; a.r=hsqt2*(-a.r-a.i); a.i=hsqt2*(tmp_-a.i); }
    -
    1138 }
    -
    1139
    -
    1140template<bool fwd, typename T> void pass8 (size_t ido, size_t l1,
    -
    1141 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    1142 const cmplx<T0> * POCKETFFT_RESTRICT wa) const
    -
    1143 {
    -
    1144 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    1145 { return ch[a+ido*(b+l1*c)]; };
    -
    1146 auto CC = [cc,ido](size_t a, size_t b, size_t c) -> const T&
    -
    1147 { return cc[a+ido*(b+8*c)]; };
    -
    1148 auto WA = [wa, ido](size_t x, size_t i)
    -
    1149 { return wa[i-1+x*(ido-1)]; };
    -
    1150
    -
    1151 if (ido==1)
    -
    1152 for (size_t k=0; k<l1; ++k)
    -
    1153 {
    -
    1154 T a0, a1, a2, a3, a4, a5, a6, a7;
    -
    1155 PM(a1,a5,CC(0,1,k),CC(0,5,k));
    -
    1156 PM(a3,a7,CC(0,3,k),CC(0,7,k));
    -
    1157 PMINPLACE(a1,a3);
    -
    1158 ROTX90<fwd>(a3);
    -
    1159
    -
    1160 ROTX90<fwd>(a7);
    -
    1161 PMINPLACE(a5,a7);
    -
    1162 ROTX45<fwd>(a5);
    -
    1163 ROTX135<fwd>(a7);
    -
    1164
    -
    1165 PM(a0,a4,CC(0,0,k),CC(0,4,k));
    -
    1166 PM(a2,a6,CC(0,2,k),CC(0,6,k));
    -
    1167 PM(CH(0,k,0),CH(0,k,4),a0+a2,a1);
    -
    1168 PM(CH(0,k,2),CH(0,k,6),a0-a2,a3);
    -
    1169 ROTX90<fwd>(a6);
    -
    1170 PM(CH(0,k,1),CH(0,k,5),a4+a6,a5);
    -
    1171 PM(CH(0,k,3),CH(0,k,7),a4-a6,a7);
    -
    1172 }
    -
    1173 else
    -
    1174 for (size_t k=0; k<l1; ++k)
    -
    1175 {
    -
    1176 {
    -
    1177 T a0, a1, a2, a3, a4, a5, a6, a7;
    -
    1178 PM(a1,a5,CC(0,1,k),CC(0,5,k));
    -
    1179 PM(a3,a7,CC(0,3,k),CC(0,7,k));
    -
    1180 PMINPLACE(a1,a3);
    -
    1181 ROTX90<fwd>(a3);
    -
    1182
    -
    1183 ROTX90<fwd>(a7);
    -
    1184 PMINPLACE(a5,a7);
    -
    1185 ROTX45<fwd>(a5);
    -
    1186 ROTX135<fwd>(a7);
    -
    1187
    -
    1188 PM(a0,a4,CC(0,0,k),CC(0,4,k));
    -
    1189 PM(a2,a6,CC(0,2,k),CC(0,6,k));
    -
    1190 PM(CH(0,k,0),CH(0,k,4),a0+a2,a1);
    -
    1191 PM(CH(0,k,2),CH(0,k,6),a0-a2,a3);
    -
    1192 ROTX90<fwd>(a6);
    -
    1193 PM(CH(0,k,1),CH(0,k,5),a4+a6,a5);
    -
    1194 PM(CH(0,k,3),CH(0,k,7),a4-a6,a7);
    -
    1195 }
    -
    1196 for (size_t i=1; i<ido; ++i)
    -
    1197 {
    -
    1198 T a0, a1, a2, a3, a4, a5, a6, a7;
    -
    1199 PM(a1,a5,CC(i,1,k),CC(i,5,k));
    -
    1200 PM(a3,a7,CC(i,3,k),CC(i,7,k));
    -
    1201 ROTX90<fwd>(a7);
    -
    1202 PMINPLACE(a1,a3);
    -
    1203 ROTX90<fwd>(a3);
    -
    1204 PMINPLACE(a5,a7);
    -
    1205 ROTX45<fwd>(a5);
    -
    1206 ROTX135<fwd>(a7);
    -
    1207 PM(a0,a4,CC(i,0,k),CC(i,4,k));
    -
    1208 PM(a2,a6,CC(i,2,k),CC(i,6,k));
    -
    1209 PMINPLACE(a0,a2);
    -
    1210 CH(i,k,0) = a0+a1;
    -
    1211 special_mul<fwd>(a0-a1,WA(3,i),CH(i,k,4));
    -
    1212 special_mul<fwd>(a2+a3,WA(1,i),CH(i,k,2));
    -
    1213 special_mul<fwd>(a2-a3,WA(5,i),CH(i,k,6));
    -
    1214 ROTX90<fwd>(a6);
    -
    1215 PMINPLACE(a4,a6);
    -
    1216 special_mul<fwd>(a4+a5,WA(0,i),CH(i,k,1));
    -
    1217 special_mul<fwd>(a4-a5,WA(4,i),CH(i,k,5));
    -
    1218 special_mul<fwd>(a6+a7,WA(2,i),CH(i,k,3));
    -
    1219 special_mul<fwd>(a6-a7,WA(6,i),CH(i,k,7));
    -
    1220 }
    -
    1221 }
    -
    1222 }
    -
    1223
    -
    1224
    -
    -
    1225#define POCKETFFT_PREP11(idx) \
    -
    1226 T t1 = CC(idx,0,k), t2, t3, t4, t5, t6, t7, t8, t9, t10, t11; \
    -
    1227 PM (t2,t11,CC(idx,1,k),CC(idx,10,k)); \
    -
    1228 PM (t3,t10,CC(idx,2,k),CC(idx, 9,k)); \
    -
    1229 PM (t4,t9 ,CC(idx,3,k),CC(idx, 8,k)); \
    -
    1230 PM (t5,t8 ,CC(idx,4,k),CC(idx, 7,k)); \
    -
    1231 PM (t6,t7 ,CC(idx,5,k),CC(idx, 6,k)); \
    -
    1232 CH(idx,k,0).r=t1.r+t2.r+t3.r+t4.r+t5.r+t6.r; \
    -
    1233 CH(idx,k,0).i=t1.i+t2.i+t3.i+t4.i+t5.i+t6.i;
    -
    -
    1234
    -
    -
    1235#define POCKETFFT_PARTSTEP11a0(u1,u2,x1,x2,x3,x4,x5,y1,y2,y3,y4,y5,out1,out2) \
    -
    1236 { \
    -
    1237 T ca = t1 + t2*x1 + t3*x2 + t4*x3 + t5*x4 +t6*x5, \
    -
    1238 cb; \
    -
    1239 cb.i=y1*t11.r y2*t10.r y3*t9.r y4*t8.r y5*t7.r; \
    -
    1240 cb.r=-(y1*t11.i y2*t10.i y3*t9.i y4*t8.i y5*t7.i ); \
    -
    1241 PM(out1,out2,ca,cb); \
    -
    1242 }
    -
    -
    -
    1243#define POCKETFFT_PARTSTEP11a(u1,u2,x1,x2,x3,x4,x5,y1,y2,y3,y4,y5) \
    -
    1244 POCKETFFT_PARTSTEP11a0(u1,u2,x1,x2,x3,x4,x5,y1,y2,y3,y4,y5,CH(0,k,u1),CH(0,k,u2))
    -
    -
    -
    1245#define POCKETFFT_PARTSTEP11(u1,u2,x1,x2,x3,x4,x5,y1,y2,y3,y4,y5) \
    -
    1246 { \
    -
    1247 T da,db; \
    -
    1248 POCKETFFT_PARTSTEP11a0(u1,u2,x1,x2,x3,x4,x5,y1,y2,y3,y4,y5,da,db) \
    -
    1249 special_mul<fwd>(da,WA(u1-1,i),CH(i,k,u1)); \
    -
    1250 special_mul<fwd>(db,WA(u2-1,i),CH(i,k,u2)); \
    -
    1251 }
    -
    -
    1252
    -
    1253template<bool fwd, typename T> void pass11 (size_t ido, size_t l1,
    -
    1254 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    1255 const cmplx<T0> * POCKETFFT_RESTRICT wa) const
    -
    1256 {
    -
    1257 constexpr T0 tw1r= T0(0.8412535328311811688618116489193677L),
    -
    1258 tw1i= (fwd ? -1 : 1) * T0(0.5406408174555975821076359543186917L),
    -
    1259 tw2r= T0(0.4154150130018864255292741492296232L),
    -
    1260 tw2i= (fwd ? -1 : 1) * T0(0.9096319953545183714117153830790285L),
    -
    1261 tw3r= T0(-0.1423148382732851404437926686163697L),
    -
    1262 tw3i= (fwd ? -1 : 1) * T0(0.9898214418809327323760920377767188L),
    -
    1263 tw4r= T0(-0.6548607339452850640569250724662936L),
    -
    1264 tw4i= (fwd ? -1 : 1) * T0(0.7557495743542582837740358439723444L),
    -
    1265 tw5r= T0(-0.9594929736144973898903680570663277L),
    -
    1266 tw5i= (fwd ? -1 : 1) * T0(0.2817325568414296977114179153466169L);
    -
    1267
    -
    1268 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    1269 { return ch[a+ido*(b+l1*c)]; };
    -
    1270 auto CC = [cc,ido](size_t a, size_t b, size_t c) -> const T&
    -
    1271 { return cc[a+ido*(b+11*c)]; };
    -
    1272 auto WA = [wa, ido](size_t x, size_t i)
    -
    1273 { return wa[i-1+x*(ido-1)]; };
    -
    1274
    -
    1275 if (ido==1)
    -
    1276 for (size_t k=0; k<l1; ++k)
    -
    1277 {
    - -
    1279 POCKETFFT_PARTSTEP11a(1,10,tw1r,tw2r,tw3r,tw4r,tw5r,+tw1i,+tw2i,+tw3i,+tw4i,+tw5i)
    -
    1280 POCKETFFT_PARTSTEP11a(2, 9,tw2r,tw4r,tw5r,tw3r,tw1r,+tw2i,+tw4i,-tw5i,-tw3i,-tw1i)
    -
    1281 POCKETFFT_PARTSTEP11a(3, 8,tw3r,tw5r,tw2r,tw1r,tw4r,+tw3i,-tw5i,-tw2i,+tw1i,+tw4i)
    -
    1282 POCKETFFT_PARTSTEP11a(4, 7,tw4r,tw3r,tw1r,tw5r,tw2r,+tw4i,-tw3i,+tw1i,+tw5i,-tw2i)
    -
    1283 POCKETFFT_PARTSTEP11a(5, 6,tw5r,tw1r,tw4r,tw2r,tw3r,+tw5i,-tw1i,+tw4i,-tw2i,+tw3i)
    -
    1284 }
    -
    1285 else
    -
    1286 for (size_t k=0; k<l1; ++k)
    -
    1287 {
    -
    1288 {
    - -
    1290 POCKETFFT_PARTSTEP11a(1,10,tw1r,tw2r,tw3r,tw4r,tw5r,+tw1i,+tw2i,+tw3i,+tw4i,+tw5i)
    -
    1291 POCKETFFT_PARTSTEP11a(2, 9,tw2r,tw4r,tw5r,tw3r,tw1r,+tw2i,+tw4i,-tw5i,-tw3i,-tw1i)
    -
    1292 POCKETFFT_PARTSTEP11a(3, 8,tw3r,tw5r,tw2r,tw1r,tw4r,+tw3i,-tw5i,-tw2i,+tw1i,+tw4i)
    -
    1293 POCKETFFT_PARTSTEP11a(4, 7,tw4r,tw3r,tw1r,tw5r,tw2r,+tw4i,-tw3i,+tw1i,+tw5i,-tw2i)
    -
    1294 POCKETFFT_PARTSTEP11a(5, 6,tw5r,tw1r,tw4r,tw2r,tw3r,+tw5i,-tw1i,+tw4i,-tw2i,+tw3i)
    -
    1295 }
    -
    1296 for (size_t i=1; i<ido; ++i)
    -
    1297 {
    - -
    1299 POCKETFFT_PARTSTEP11(1,10,tw1r,tw2r,tw3r,tw4r,tw5r,+tw1i,+tw2i,+tw3i,+tw4i,+tw5i)
    -
    1300 POCKETFFT_PARTSTEP11(2, 9,tw2r,tw4r,tw5r,tw3r,tw1r,+tw2i,+tw4i,-tw5i,-tw3i,-tw1i)
    -
    1301 POCKETFFT_PARTSTEP11(3, 8,tw3r,tw5r,tw2r,tw1r,tw4r,+tw3i,-tw5i,-tw2i,+tw1i,+tw4i)
    -
    1302 POCKETFFT_PARTSTEP11(4, 7,tw4r,tw3r,tw1r,tw5r,tw2r,+tw4i,-tw3i,+tw1i,+tw5i,-tw2i)
    -
    1303 POCKETFFT_PARTSTEP11(5, 6,tw5r,tw1r,tw4r,tw2r,tw3r,+tw5i,-tw1i,+tw4i,-tw2i,+tw3i)
    -
    1304 }
    -
    1305 }
    -
    1306 }
    -
    1307
    -
    1308#undef POCKETFFT_PARTSTEP11
    -
    1309#undef POCKETFFT_PARTSTEP11a0
    -
    1310#undef POCKETFFT_PARTSTEP11a
    -
    1311#undef POCKETFFT_PREP11
    -
    1312
    -
    1313template<bool fwd, typename T> void passg (size_t ido, size_t ip,
    -
    1314 size_t l1, T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    1315 const cmplx<T0> * POCKETFFT_RESTRICT wa,
    -
    1316 const cmplx<T0> * POCKETFFT_RESTRICT csarr) const
    -
    1317 {
    -
    1318 const size_t cdim=ip;
    -
    1319 size_t ipph = (ip+1)/2;
    -
    1320 size_t idl1 = ido*l1;
    -
    1321
    -
    1322 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    1323 { return ch[a+ido*(b+l1*c)]; };
    -
    1324 auto CC = [cc,ido,cdim](size_t a, size_t b, size_t c) -> const T&
    -
    1325 { return cc[a+ido*(b+cdim*c)]; };
    -
    1326 auto CX = [cc, ido, l1](size_t a, size_t b, size_t c) -> T&
    -
    1327 { return cc[a+ido*(b+l1*c)]; };
    -
    1328 auto CX2 = [cc, idl1](size_t a, size_t b) -> T&
    -
    1329 { return cc[a+idl1*b]; };
    -
    1330 auto CH2 = [ch, idl1](size_t a, size_t b) -> const T&
    -
    1331 { return ch[a+idl1*b]; };
    -
    1332
    -
    1333 arr<cmplx<T0>> wal(ip);
    -
    1334 wal[0] = cmplx<T0>(1., 0.);
    -
    1335 for (size_t i=1; i<ip; ++i)
    -
    1336 wal[i]=cmplx<T0>(csarr[i].r,fwd ? -csarr[i].i : csarr[i].i);
    -
    1337
    -
    1338 for (size_t k=0; k<l1; ++k)
    -
    1339 for (size_t i=0; i<ido; ++i)
    -
    1340 CH(i,k,0) = CC(i,0,k);
    -
    1341 for (size_t j=1, jc=ip-1; j<ipph; ++j, --jc)
    -
    1342 for (size_t k=0; k<l1; ++k)
    -
    1343 for (size_t i=0; i<ido; ++i)
    -
    1344 PM(CH(i,k,j),CH(i,k,jc),CC(i,j,k),CC(i,jc,k));
    -
    1345 for (size_t k=0; k<l1; ++k)
    -
    1346 for (size_t i=0; i<ido; ++i)
    -
    1347 {
    -
    1348 T tmp = CH(i,k,0);
    -
    1349 for (size_t j=1; j<ipph; ++j)
    -
    1350 tmp+=CH(i,k,j);
    -
    1351 CX(i,k,0) = tmp;
    -
    1352 }
    -
    1353 for (size_t l=1, lc=ip-1; l<ipph; ++l, --lc)
    -
    1354 {
    -
    1355 // j=0
    -
    1356 for (size_t ik=0; ik<idl1; ++ik)
    -
    1357 {
    -
    1358 CX2(ik,l).r = CH2(ik,0).r+wal[l].r*CH2(ik,1).r+wal[2*l].r*CH2(ik,2).r;
    -
    1359 CX2(ik,l).i = CH2(ik,0).i+wal[l].r*CH2(ik,1).i+wal[2*l].r*CH2(ik,2).i;
    -
    1360 CX2(ik,lc).r=-wal[l].i*CH2(ik,ip-1).i-wal[2*l].i*CH2(ik,ip-2).i;
    -
    1361 CX2(ik,lc).i=wal[l].i*CH2(ik,ip-1).r+wal[2*l].i*CH2(ik,ip-2).r;
    -
    1362 }
    -
    1363
    -
    1364 size_t iwal=2*l;
    -
    1365 size_t j=3, jc=ip-3;
    -
    1366 for (; j<ipph-1; j+=2, jc-=2)
    -
    1367 {
    -
    1368 iwal+=l; if (iwal>ip) iwal-=ip;
    -
    1369 cmplx<T0> xwal=wal[iwal];
    -
    1370 iwal+=l; if (iwal>ip) iwal-=ip;
    -
    1371 cmplx<T0> xwal2=wal[iwal];
    -
    1372 for (size_t ik=0; ik<idl1; ++ik)
    -
    1373 {
    -
    1374 CX2(ik,l).r += CH2(ik,j).r*xwal.r+CH2(ik,j+1).r*xwal2.r;
    -
    1375 CX2(ik,l).i += CH2(ik,j).i*xwal.r+CH2(ik,j+1).i*xwal2.r;
    -
    1376 CX2(ik,lc).r -= CH2(ik,jc).i*xwal.i+CH2(ik,jc-1).i*xwal2.i;
    -
    1377 CX2(ik,lc).i += CH2(ik,jc).r*xwal.i+CH2(ik,jc-1).r*xwal2.i;
    -
    1378 }
    -
    1379 }
    -
    1380 for (; j<ipph; ++j, --jc)
    -
    1381 {
    -
    1382 iwal+=l; if (iwal>ip) iwal-=ip;
    -
    1383 cmplx<T0> xwal=wal[iwal];
    -
    1384 for (size_t ik=0; ik<idl1; ++ik)
    -
    1385 {
    -
    1386 CX2(ik,l).r += CH2(ik,j).r*xwal.r;
    -
    1387 CX2(ik,l).i += CH2(ik,j).i*xwal.r;
    -
    1388 CX2(ik,lc).r -= CH2(ik,jc).i*xwal.i;
    -
    1389 CX2(ik,lc).i += CH2(ik,jc).r*xwal.i;
    -
    1390 }
    -
    1391 }
    -
    1392 }
    -
    1393
    -
    1394 // shuffling and twiddling
    -
    1395 if (ido==1)
    -
    1396 for (size_t j=1, jc=ip-1; j<ipph; ++j, --jc)
    -
    1397 for (size_t ik=0; ik<idl1; ++ik)
    -
    1398 {
    -
    1399 T t1=CX2(ik,j), t2=CX2(ik,jc);
    -
    1400 PM(CX2(ik,j),CX2(ik,jc),t1,t2);
    -
    1401 }
    -
    1402 else
    -
    1403 {
    -
    1404 for (size_t j=1, jc=ip-1; j<ipph; ++j,--jc)
    -
    1405 for (size_t k=0; k<l1; ++k)
    -
    1406 {
    -
    1407 T t1=CX(0,k,j), t2=CX(0,k,jc);
    -
    1408 PM(CX(0,k,j),CX(0,k,jc),t1,t2);
    -
    1409 for (size_t i=1; i<ido; ++i)
    -
    1410 {
    -
    1411 T x1, x2;
    -
    1412 PM(x1,x2,CX(i,k,j),CX(i,k,jc));
    -
    1413 size_t idij=(j-1)*(ido-1)+i-1;
    -
    1414 special_mul<fwd>(x1,wa[idij],CX(i,k,j));
    -
    1415 idij=(jc-1)*(ido-1)+i-1;
    -
    1416 special_mul<fwd>(x2,wa[idij],CX(i,k,jc));
    -
    1417 }
    -
    1418 }
    -
    1419 }
    -
    1420 }
    -
    1421
    -
    1422template<bool fwd, typename T> void pass_all(T c[], T0 fct) const
    -
    1423 {
    -
    1424 if (length==1) { c[0]*=fct; return; }
    -
    1425 size_t l1=1;
    -
    1426 arr<T> ch(length);
    -
    1427 T *p1=c, *p2=ch.data();
    -
    1428
    -
    1429 for(size_t k1=0; k1<fact.size(); k1++)
    -
    1430 {
    -
    1431 size_t ip=fact[k1].fct;
    -
    1432 size_t l2=ip*l1;
    -
    1433 size_t ido = length/l2;
    -
    1434 if (ip==4)
    -
    1435 pass4<fwd> (ido, l1, p1, p2, fact[k1].tw);
    -
    1436 else if(ip==8)
    -
    1437 pass8<fwd>(ido, l1, p1, p2, fact[k1].tw);
    -
    1438 else if(ip==2)
    -
    1439 pass2<fwd>(ido, l1, p1, p2, fact[k1].tw);
    -
    1440 else if(ip==3)
    -
    1441 pass3<fwd> (ido, l1, p1, p2, fact[k1].tw);
    -
    1442 else if(ip==5)
    -
    1443 pass5<fwd> (ido, l1, p1, p2, fact[k1].tw);
    -
    1444 else if(ip==7)
    -
    1445 pass7<fwd> (ido, l1, p1, p2, fact[k1].tw);
    -
    1446 else if(ip==11)
    -
    1447 pass11<fwd> (ido, l1, p1, p2, fact[k1].tw);
    -
    1448 else
    -
    1449 {
    -
    1450 passg<fwd>(ido, ip, l1, p1, p2, fact[k1].tw, fact[k1].tws);
    -
    1451 std::swap(p1,p2);
    -
    1452 }
    -
    1453 std::swap(p1,p2);
    -
    1454 l1=l2;
    -
    1455 }
    -
    1456 if (p1!=c)
    -
    1457 {
    -
    1458 if (fct!=1.)
    -
    1459 for (size_t i=0; i<length; ++i)
    -
    1460 c[i] = ch[i]*fct;
    -
    1461 else
    -
    1462 std::copy_n (p1, length, c);
    -
    1463 }
    -
    1464 else
    -
    1465 if (fct!=1.)
    -
    1466 for (size_t i=0; i<length; ++i)
    -
    1467 c[i] *= fct;
    -
    1468 }
    -
    1469
    -
    1470 public:
    -
    -
    1471 template<typename T> void exec(T c[], T0 fct, bool fwd) const
    -
    1472 { fwd ? pass_all<true>(c, fct) : pass_all<false>(c, fct); }
    -
    -
    1473
    -
    1474 private:
    -
    1475 POCKETFFT_NOINLINE void factorize()
    -
    1476 {
    -
    1477 size_t len=length;
    -
    1478 while ((len&7)==0)
    -
    1479 { add_factor(8); len>>=3; }
    -
    1480 while ((len&3)==0)
    -
    1481 { add_factor(4); len>>=2; }
    -
    1482 if ((len&1)==0)
    -
    1483 {
    -
    1484 len>>=1;
    -
    1485 // factor 2 should be at the front of the factor list
    -
    1486 add_factor(2);
    -
    1487 std::swap(fact[0].fct, fact.back().fct);
    -
    1488 }
    -
    1489 for (size_t divisor=3; divisor*divisor<=len; divisor+=2)
    -
    1490 while ((len%divisor)==0)
    -
    1491 {
    -
    1492 add_factor(divisor);
    -
    1493 len/=divisor;
    -
    1494 }
    -
    1495 if (len>1) add_factor(len);
    -
    1496 }
    -
    1497
    -
    1498 size_t twsize() const
    -
    1499 {
    -
    1500 size_t twsize=0, l1=1;
    -
    1501 for (size_t k=0; k<fact.size(); ++k)
    -
    1502 {
    -
    1503 size_t ip=fact[k].fct, ido= length/(l1*ip);
    -
    1504 twsize+=(ip-1)*(ido-1);
    -
    1505 if (ip>11)
    -
    1506 twsize+=ip;
    -
    1507 l1*=ip;
    -
    1508 }
    -
    1509 return twsize;
    -
    1510 }
    -
    1511
    -
    1512 void comp_twiddle()
    -
    1513 {
    -
    1514 sincos_2pibyn<T0> twiddle(length);
    -
    1515 size_t l1=1;
    -
    1516 size_t memofs=0;
    -
    1517 for (size_t k=0; k<fact.size(); ++k)
    -
    1518 {
    -
    1519 size_t ip=fact[k].fct, ido=length/(l1*ip);
    -
    1520 fact[k].tw=mem.data()+memofs;
    -
    1521 memofs+=(ip-1)*(ido-1);
    -
    1522 for (size_t j=1; j<ip; ++j)
    -
    1523 for (size_t i=1; i<ido; ++i)
    -
    1524 fact[k].tw[(j-1)*(ido-1)+i-1] = twiddle[j*l1*i];
    -
    1525 if (ip>11)
    -
    1526 {
    -
    1527 fact[k].tws=mem.data()+memofs;
    -
    1528 memofs+=ip;
    -
    1529 for (size_t j=0; j<ip; ++j)
    -
    1530 fact[k].tws[j] = twiddle[j*l1*ido];
    -
    1531 }
    -
    1532 l1*=ip;
    -
    1533 }
    -
    1534 }
    -
    1535
    -
    1536 public:
    -
    - -
    1538 : length(length_)
    -
    1539 {
    -
    1540 if (length==0) throw std::runtime_error("zero-length FFT requested");
    -
    1541 if (length==1) return;
    -
    1542 factorize();
    -
    1543 mem.resize(twsize());
    -
    1544 comp_twiddle();
    -
    1545 }
    -
    -
    1546 };
    -
    -
    1547
    -
    1548//
    -
    1549// real-valued FFTPACK transforms
    -
    1550//
    -
    1551
    -
    -
    1552template<typename T0> class rfftp
    -
    1553 {
    -
    1554 private:
    -
    1555 struct fctdata
    -
    1556 {
    -
    1557 size_t fct;
    -
    1558 T0 *tw, *tws;
    -
    1559 };
    -
    1560
    -
    1561 size_t length;
    -
    1562 arr<T0> mem;
    -
    1563 std::vector<fctdata> fact;
    -
    1564
    -
    1565 void add_factor(size_t factor)
    -
    1566 { fact.push_back({factor, nullptr, nullptr}); }
    -
    1567
    -
    1568/* (a+ib) = conj(c+id) * (e+if) */
    -
    1569template<typename T1, typename T2, typename T3> inline void MULPM
    -
    1570 (T1 &a, T1 &b, T2 c, T2 d, T3 e, T3 f) const
    -
    1571 { a=c*e+d*f; b=c*f-d*e; }
    -
    1572
    -
    1573template<typename T> void radf2 (size_t ido, size_t l1,
    - -
    1575 const T0 * POCKETFFT_RESTRICT wa) const
    -
    1576 {
    -
    1577 auto WA = [wa,ido](size_t x, size_t i) { return wa[i+x*(ido-1)]; };
    -
    1578 auto CC = [cc,ido,l1](size_t a, size_t b, size_t c) -> const T&
    -
    1579 { return cc[a+ido*(b+l1*c)]; };
    -
    1580 auto CH = [ch,ido](size_t a, size_t b, size_t c) -> T&
    -
    1581 { return ch[a+ido*(b+2*c)]; };
    -
    1582
    -
    1583 for (size_t k=0; k<l1; k++)
    -
    1584 PM (CH(0,0,k),CH(ido-1,1,k),CC(0,k,0),CC(0,k,1));
    -
    1585 if ((ido&1)==0)
    -
    1586 for (size_t k=0; k<l1; k++)
    -
    1587 {
    -
    1588 CH( 0,1,k) = -CC(ido-1,k,1);
    -
    1589 CH(ido-1,0,k) = CC(ido-1,k,0);
    -
    1590 }
    -
    1591 if (ido<=2) return;
    -
    1592 for (size_t k=0; k<l1; k++)
    -
    1593 for (size_t i=2; i<ido; i+=2)
    -
    1594 {
    -
    1595 size_t ic=ido-i;
    -
    1596 T tr2, ti2;
    -
    1597 MULPM (tr2,ti2,WA(0,i-2),WA(0,i-1),CC(i-1,k,1),CC(i,k,1));
    -
    1598 PM (CH(i-1,0,k),CH(ic-1,1,k),CC(i-1,k,0),tr2);
    -
    1599 PM (CH(i ,0,k),CH(ic ,1,k),ti2,CC(i ,k,0));
    -
    1600 }
    -
    1601 }
    -
    1602
    -
    1603// a2=a+b; b2=i*(b-a);
    -
    -
    1604#define POCKETFFT_REARRANGE(rx, ix, ry, iy) \
    -
    1605 {\
    -
    1606 auto t1=rx+ry, t2=ry-rx, t3=ix+iy, t4=ix-iy; \
    -
    1607 rx=t1; ix=t3; ry=t4; iy=t2; \
    -
    1608 }
    -
    -
    1609
    -
    1610template<typename T> void radf3(size_t ido, size_t l1,
    -
    1611 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    1612 const T0 * POCKETFFT_RESTRICT wa) const
    -
    1613 {
    -
    1614 constexpr T0 taur=-0.5, taui=T0(0.8660254037844386467637231707529362L);
    -
    1615
    -
    1616 auto WA = [wa,ido](size_t x, size_t i) { return wa[i+x*(ido-1)]; };
    -
    1617 auto CC = [cc,ido,l1](size_t a, size_t b, size_t c) -> const T&
    -
    1618 { return cc[a+ido*(b+l1*c)]; };
    -
    1619 auto CH = [ch,ido](size_t a, size_t b, size_t c) -> T&
    -
    1620 { return ch[a+ido*(b+3*c)]; };
    -
    1621
    -
    1622 for (size_t k=0; k<l1; k++)
    -
    1623 {
    -
    1624 T cr2=CC(0,k,1)+CC(0,k,2);
    -
    1625 CH(0,0,k) = CC(0,k,0)+cr2;
    -
    1626 CH(0,2,k) = taui*(CC(0,k,2)-CC(0,k,1));
    -
    1627 CH(ido-1,1,k) = CC(0,k,0)+taur*cr2;
    -
    1628 }
    -
    1629 if (ido==1) return;
    -
    1630 for (size_t k=0; k<l1; k++)
    -
    1631 for (size_t i=2; i<ido; i+=2)
    -
    1632 {
    -
    1633 size_t ic=ido-i;
    -
    1634 T di2, di3, dr2, dr3;
    -
    1635 MULPM (dr2,di2,WA(0,i-2),WA(0,i-1),CC(i-1,k,1),CC(i,k,1)); // d2=conj(WA0)*CC1
    -
    1636 MULPM (dr3,di3,WA(1,i-2),WA(1,i-1),CC(i-1,k,2),CC(i,k,2)); // d3=conj(WA1)*CC2
    -
    1637 POCKETFFT_REARRANGE(dr2, di2, dr3, di3);
    -
    1638 CH(i-1,0,k) = CC(i-1,k,0)+dr2; // c add
    -
    1639 CH(i ,0,k) = CC(i ,k,0)+di2;
    -
    1640 T tr2 = CC(i-1,k,0)+taur*dr2; // c add
    -
    1641 T ti2 = CC(i ,k,0)+taur*di2;
    -
    1642 T tr3 = taui*dr3; // t3 = taui*i*(d3-d2)?
    -
    1643 T ti3 = taui*di3;
    -
    1644 PM(CH(i-1,2,k),CH(ic-1,1,k),tr2,tr3); // PM(i) = t2+t3
    -
    1645 PM(CH(i ,2,k),CH(ic ,1,k),ti3,ti2); // PM(ic) = conj(t2-t3)
    -
    1646 }
    -
    1647 }
    -
    1648
    -
    1649template<typename T> void radf4(size_t ido, size_t l1,
    -
    1650 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    1651 const T0 * POCKETFFT_RESTRICT wa) const
    -
    1652 {
    -
    1653 constexpr T0 hsqt2=T0(0.707106781186547524400844362104849L);
    -
    1654
    -
    1655 auto WA = [wa,ido](size_t x, size_t i) { return wa[i+x*(ido-1)]; };
    -
    1656 auto CC = [cc,ido,l1](size_t a, size_t b, size_t c) -> const T&
    -
    1657 { return cc[a+ido*(b+l1*c)]; };
    -
    1658 auto CH = [ch,ido](size_t a, size_t b, size_t c) -> T&
    -
    1659 { return ch[a+ido*(b+4*c)]; };
    -
    1660
    -
    1661 for (size_t k=0; k<l1; k++)
    -
    1662 {
    -
    1663 T tr1,tr2;
    -
    1664 PM (tr1,CH(0,2,k),CC(0,k,3),CC(0,k,1));
    -
    1665 PM (tr2,CH(ido-1,1,k),CC(0,k,0),CC(0,k,2));
    -
    1666 PM (CH(0,0,k),CH(ido-1,3,k),tr2,tr1);
    -
    1667 }
    -
    1668 if ((ido&1)==0)
    -
    1669 for (size_t k=0; k<l1; k++)
    -
    1670 {
    -
    1671 T ti1=-hsqt2*(CC(ido-1,k,1)+CC(ido-1,k,3));
    -
    1672 T tr1= hsqt2*(CC(ido-1,k,1)-CC(ido-1,k,3));
    -
    1673 PM (CH(ido-1,0,k),CH(ido-1,2,k),CC(ido-1,k,0),tr1);
    -
    1674 PM (CH( 0,3,k),CH( 0,1,k),ti1,CC(ido-1,k,2));
    -
    1675 }
    -
    1676 if (ido<=2) return;
    -
    1677 for (size_t k=0; k<l1; k++)
    -
    1678 for (size_t i=2; i<ido; i+=2)
    -
    1679 {
    -
    1680 size_t ic=ido-i;
    -
    1681 T ci2, ci3, ci4, cr2, cr3, cr4, ti1, ti2, ti3, ti4, tr1, tr2, tr3, tr4;
    -
    1682 MULPM(cr2,ci2,WA(0,i-2),WA(0,i-1),CC(i-1,k,1),CC(i,k,1));
    -
    1683 MULPM(cr3,ci3,WA(1,i-2),WA(1,i-1),CC(i-1,k,2),CC(i,k,2));
    -
    1684 MULPM(cr4,ci4,WA(2,i-2),WA(2,i-1),CC(i-1,k,3),CC(i,k,3));
    -
    1685 PM(tr1,tr4,cr4,cr2);
    -
    1686 PM(ti1,ti4,ci2,ci4);
    -
    1687 PM(tr2,tr3,CC(i-1,k,0),cr3);
    -
    1688 PM(ti2,ti3,CC(i ,k,0),ci3);
    -
    1689 PM(CH(i-1,0,k),CH(ic-1,3,k),tr2,tr1);
    -
    1690 PM(CH(i ,0,k),CH(ic ,3,k),ti1,ti2);
    -
    1691 PM(CH(i-1,2,k),CH(ic-1,1,k),tr3,ti4);
    -
    1692 PM(CH(i ,2,k),CH(ic ,1,k),tr4,ti3);
    -
    1693 }
    -
    1694 }
    -
    1695
    -
    1696template<typename T> void radf5(size_t ido, size_t l1,
    -
    1697 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    1698 const T0 * POCKETFFT_RESTRICT wa) const
    -
    1699 {
    -
    1700 constexpr T0 tr11= T0(0.3090169943749474241022934171828191L),
    -
    1701 ti11= T0(0.9510565162951535721164393333793821L),
    -
    1702 tr12= T0(-0.8090169943749474241022934171828191L),
    -
    1703 ti12= T0(0.5877852522924731291687059546390728L);
    -
    1704
    -
    1705 auto WA = [wa,ido](size_t x, size_t i) { return wa[i+x*(ido-1)]; };
    -
    1706 auto CC = [cc,ido,l1](size_t a, size_t b, size_t c) -> const T&
    -
    1707 { return cc[a+ido*(b+l1*c)]; };
    -
    1708 auto CH = [ch,ido](size_t a, size_t b, size_t c) -> T&
    -
    1709 { return ch[a+ido*(b+5*c)]; };
    -
    1710
    -
    1711 for (size_t k=0; k<l1; k++)
    -
    1712 {
    -
    1713 T cr2, cr3, ci4, ci5;
    -
    1714 PM (cr2,ci5,CC(0,k,4),CC(0,k,1));
    -
    1715 PM (cr3,ci4,CC(0,k,3),CC(0,k,2));
    -
    1716 CH(0,0,k)=CC(0,k,0)+cr2+cr3;
    -
    1717 CH(ido-1,1,k)=CC(0,k,0)+tr11*cr2+tr12*cr3;
    -
    1718 CH(0,2,k)=ti11*ci5+ti12*ci4;
    -
    1719 CH(ido-1,3,k)=CC(0,k,0)+tr12*cr2+tr11*cr3;
    -
    1720 CH(0,4,k)=ti12*ci5-ti11*ci4;
    -
    1721 }
    -
    1722 if (ido==1) return;
    -
    1723 for (size_t k=0; k<l1;++k)
    -
    1724 for (size_t i=2, ic=ido-2; i<ido; i+=2, ic-=2)
    -
    1725 {
    -
    1726 T di2, di3, di4, di5, dr2, dr3, dr4, dr5;
    -
    1727 MULPM (dr2,di2,WA(0,i-2),WA(0,i-1),CC(i-1,k,1),CC(i,k,1));
    -
    1728 MULPM (dr3,di3,WA(1,i-2),WA(1,i-1),CC(i-1,k,2),CC(i,k,2));
    -
    1729 MULPM (dr4,di4,WA(2,i-2),WA(2,i-1),CC(i-1,k,3),CC(i,k,3));
    -
    1730 MULPM (dr5,di5,WA(3,i-2),WA(3,i-1),CC(i-1,k,4),CC(i,k,4));
    -
    1731 POCKETFFT_REARRANGE(dr2, di2, dr5, di5);
    -
    1732 POCKETFFT_REARRANGE(dr3, di3, dr4, di4);
    -
    1733 CH(i-1,0,k)=CC(i-1,k,0)+dr2+dr3;
    -
    1734 CH(i ,0,k)=CC(i ,k,0)+di2+di3;
    -
    1735 T tr2=CC(i-1,k,0)+tr11*dr2+tr12*dr3;
    -
    1736 T ti2=CC(i ,k,0)+tr11*di2+tr12*di3;
    -
    1737 T tr3=CC(i-1,k,0)+tr12*dr2+tr11*dr3;
    -
    1738 T ti3=CC(i ,k,0)+tr12*di2+tr11*di3;
    -
    1739 T tr5 = ti11*dr5 + ti12*dr4;
    -
    1740 T ti5 = ti11*di5 + ti12*di4;
    -
    1741 T tr4 = ti12*dr5 - ti11*dr4;
    -
    1742 T ti4 = ti12*di5 - ti11*di4;
    -
    1743 PM(CH(i-1,2,k),CH(ic-1,1,k),tr2,tr5);
    -
    1744 PM(CH(i ,2,k),CH(ic ,1,k),ti5,ti2);
    -
    1745 PM(CH(i-1,4,k),CH(ic-1,3,k),tr3,tr4);
    -
    1746 PM(CH(i ,4,k),CH(ic ,3,k),ti4,ti3);
    -
    1747 }
    -
    1748 }
    -
    1749
    -
    1750#undef POCKETFFT_REARRANGE
    -
    1751
    -
    1752template<typename T> void radfg(size_t ido, size_t ip, size_t l1,
    - -
    1754 const T0 * POCKETFFT_RESTRICT wa, const T0 * POCKETFFT_RESTRICT csarr) const
    -
    1755 {
    -
    1756 const size_t cdim=ip;
    -
    1757 size_t ipph=(ip+1)/2;
    -
    1758 size_t idl1 = ido*l1;
    -
    1759
    -
    1760 auto CC = [cc,ido,cdim](size_t a, size_t b, size_t c) -> T&
    -
    1761 { return cc[a+ido*(b+cdim*c)]; };
    -
    1762 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> const T&
    -
    1763 { return ch[a+ido*(b+l1*c)]; };
    -
    1764 auto C1 = [cc,ido,l1] (size_t a, size_t b, size_t c) -> T&
    -
    1765 { return cc[a+ido*(b+l1*c)]; };
    -
    1766 auto C2 = [cc,idl1] (size_t a, size_t b) -> T&
    -
    1767 { return cc[a+idl1*b]; };
    -
    1768 auto CH2 = [ch,idl1] (size_t a, size_t b) -> T&
    -
    1769 { return ch[a+idl1*b]; };
    -
    1770
    -
    1771 if (ido>1)
    -
    1772 {
    -
    1773 for (size_t j=1, jc=ip-1; j<ipph; ++j,--jc) // 114
    -
    1774 {
    -
    1775 size_t is=(j-1)*(ido-1),
    -
    1776 is2=(jc-1)*(ido-1);
    -
    1777 for (size_t k=0; k<l1; ++k) // 113
    -
    1778 {
    -
    1779 size_t idij=is;
    -
    1780 size_t idij2=is2;
    -
    1781 for (size_t i=1; i<=ido-2; i+=2) // 112
    -
    1782 {
    -
    1783 T t1=C1(i,k,j ), t2=C1(i+1,k,j ),
    -
    1784 t3=C1(i,k,jc), t4=C1(i+1,k,jc);
    -
    1785 T x1=wa[idij]*t1 + wa[idij+1]*t2,
    -
    1786 x2=wa[idij]*t2 - wa[idij+1]*t1,
    -
    1787 x3=wa[idij2]*t3 + wa[idij2+1]*t4,
    -
    1788 x4=wa[idij2]*t4 - wa[idij2+1]*t3;
    -
    1789 PM(C1(i,k,j),C1(i+1,k,jc),x3,x1);
    -
    1790 PM(C1(i+1,k,j),C1(i,k,jc),x2,x4);
    -
    1791 idij+=2;
    -
    1792 idij2+=2;
    -
    1793 }
    -
    1794 }
    -
    1795 }
    -
    1796 }
    -
    1797
    -
    1798 for (size_t j=1, jc=ip-1; j<ipph; ++j,--jc) // 123
    -
    1799 for (size_t k=0; k<l1; ++k) // 122
    -
    1800 MPINPLACE(C1(0,k,jc), C1(0,k,j));
    -
    1801
    -
    1802//everything in C
    -
    1803//memset(ch,0,ip*l1*ido*sizeof(double));
    -
    1804
    -
    1805 for (size_t l=1,lc=ip-1; l<ipph; ++l,--lc) // 127
    -
    1806 {
    -
    1807 for (size_t ik=0; ik<idl1; ++ik) // 124
    -
    1808 {
    -
    1809 CH2(ik,l ) = C2(ik,0)+csarr[2*l]*C2(ik,1)+csarr[4*l]*C2(ik,2);
    -
    1810 CH2(ik,lc) = csarr[2*l+1]*C2(ik,ip-1)+csarr[4*l+1]*C2(ik,ip-2);
    -
    1811 }
    -
    1812 size_t iang = 2*l;
    -
    1813 size_t j=3, jc=ip-3;
    -
    1814 for (; j<ipph-3; j+=4,jc-=4) // 126
    -
    1815 {
    -
    1816 iang+=l; if (iang>=ip) iang-=ip;
    -
    1817 T0 ar1=csarr[2*iang], ai1=csarr[2*iang+1];
    -
    1818 iang+=l; if (iang>=ip) iang-=ip;
    -
    1819 T0 ar2=csarr[2*iang], ai2=csarr[2*iang+1];
    -
    1820 iang+=l; if (iang>=ip) iang-=ip;
    -
    1821 T0 ar3=csarr[2*iang], ai3=csarr[2*iang+1];
    -
    1822 iang+=l; if (iang>=ip) iang-=ip;
    -
    1823 T0 ar4=csarr[2*iang], ai4=csarr[2*iang+1];
    -
    1824 for (size_t ik=0; ik<idl1; ++ik) // 125
    -
    1825 {
    -
    1826 CH2(ik,l ) += ar1*C2(ik,j )+ar2*C2(ik,j +1)
    -
    1827 +ar3*C2(ik,j +2)+ar4*C2(ik,j +3);
    -
    1828 CH2(ik,lc) += ai1*C2(ik,jc)+ai2*C2(ik,jc-1)
    -
    1829 +ai3*C2(ik,jc-2)+ai4*C2(ik,jc-3);
    -
    1830 }
    -
    1831 }
    -
    1832 for (; j<ipph-1; j+=2,jc-=2) // 126
    -
    1833 {
    -
    1834 iang+=l; if (iang>=ip) iang-=ip;
    -
    1835 T0 ar1=csarr[2*iang], ai1=csarr[2*iang+1];
    -
    1836 iang+=l; if (iang>=ip) iang-=ip;
    -
    1837 T0 ar2=csarr[2*iang], ai2=csarr[2*iang+1];
    -
    1838 for (size_t ik=0; ik<idl1; ++ik) // 125
    -
    1839 {
    -
    1840 CH2(ik,l ) += ar1*C2(ik,j )+ar2*C2(ik,j +1);
    -
    1841 CH2(ik,lc) += ai1*C2(ik,jc)+ai2*C2(ik,jc-1);
    -
    1842 }
    -
    1843 }
    -
    1844 for (; j<ipph; ++j,--jc) // 126
    -
    1845 {
    -
    1846 iang+=l; if (iang>=ip) iang-=ip;
    -
    1847 T0 ar=csarr[2*iang], ai=csarr[2*iang+1];
    -
    1848 for (size_t ik=0; ik<idl1; ++ik) // 125
    -
    1849 {
    -
    1850 CH2(ik,l ) += ar*C2(ik,j );
    -
    1851 CH2(ik,lc) += ai*C2(ik,jc);
    -
    1852 }
    -
    1853 }
    -
    1854 }
    -
    1855 for (size_t ik=0; ik<idl1; ++ik) // 101
    -
    1856 CH2(ik,0) = C2(ik,0);
    -
    1857 for (size_t j=1; j<ipph; ++j) // 129
    -
    1858 for (size_t ik=0; ik<idl1; ++ik) // 128
    -
    1859 CH2(ik,0) += C2(ik,j);
    -
    1860
    -
    1861// everything in CH at this point!
    -
    1862//memset(cc,0,ip*l1*ido*sizeof(double));
    -
    1863
    -
    1864 for (size_t k=0; k<l1; ++k) // 131
    -
    1865 for (size_t i=0; i<ido; ++i) // 130
    -
    1866 CC(i,0,k) = CH(i,k,0);
    -
    1867
    -
    1868 for (size_t j=1, jc=ip-1; j<ipph; ++j,--jc) // 137
    -
    1869 {
    -
    1870 size_t j2=2*j-1;
    -
    1871 for (size_t k=0; k<l1; ++k) // 136
    -
    1872 {
    -
    1873 CC(ido-1,j2,k) = CH(0,k,j);
    -
    1874 CC(0,j2+1,k) = CH(0,k,jc);
    -
    1875 }
    -
    1876 }
    -
    1877
    -
    1878 if (ido==1) return;
    -
    1879
    -
    1880 for (size_t j=1, jc=ip-1; j<ipph; ++j,--jc) // 140
    -
    1881 {
    -
    1882 size_t j2=2*j-1;
    -
    1883 for(size_t k=0; k<l1; ++k) // 139
    -
    1884 for(size_t i=1, ic=ido-i-2; i<=ido-2; i+=2, ic-=2) // 138
    -
    1885 {
    -
    1886 CC(i ,j2+1,k) = CH(i ,k,j )+CH(i ,k,jc);
    -
    1887 CC(ic ,j2 ,k) = CH(i ,k,j )-CH(i ,k,jc);
    -
    1888 CC(i+1 ,j2+1,k) = CH(i+1,k,j )+CH(i+1,k,jc);
    -
    1889 CC(ic+1,j2 ,k) = CH(i+1,k,jc)-CH(i+1,k,j );
    -
    1890 }
    -
    1891 }
    -
    1892 }
    -
    1893
    -
    1894template<typename T> void radb2(size_t ido, size_t l1,
    -
    1895 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    1896 const T0 * POCKETFFT_RESTRICT wa) const
    -
    1897 {
    -
    1898 auto WA = [wa,ido](size_t x, size_t i) { return wa[i+x*(ido-1)]; };
    -
    1899 auto CC = [cc,ido](size_t a, size_t b, size_t c) -> const T&
    -
    1900 { return cc[a+ido*(b+2*c)]; };
    -
    1901 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    1902 { return ch[a+ido*(b+l1*c)]; };
    -
    1903
    -
    1904 for (size_t k=0; k<l1; k++)
    -
    1905 PM (CH(0,k,0),CH(0,k,1),CC(0,0,k),CC(ido-1,1,k));
    -
    1906 if ((ido&1)==0)
    -
    1907 for (size_t k=0; k<l1; k++)
    -
    1908 {
    -
    1909 CH(ido-1,k,0) = 2*CC(ido-1,0,k);
    -
    1910 CH(ido-1,k,1) =-2*CC(0 ,1,k);
    -
    1911 }
    -
    1912 if (ido<=2) return;
    -
    1913 for (size_t k=0; k<l1;++k)
    -
    1914 for (size_t i=2; i<ido; i+=2)
    -
    1915 {
    -
    1916 size_t ic=ido-i;
    -
    1917 T ti2, tr2;
    -
    1918 PM (CH(i-1,k,0),tr2,CC(i-1,0,k),CC(ic-1,1,k));
    -
    1919 PM (ti2,CH(i ,k,0),CC(i ,0,k),CC(ic ,1,k));
    -
    1920 MULPM (CH(i,k,1),CH(i-1,k,1),WA(0,i-2),WA(0,i-1),ti2,tr2);
    -
    1921 }
    -
    1922 }
    -
    1923
    -
    1924template<typename T> void radb3(size_t ido, size_t l1,
    -
    1925 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    1926 const T0 * POCKETFFT_RESTRICT wa) const
    -
    1927 {
    -
    1928 constexpr T0 taur=-0.5, taui=T0(0.8660254037844386467637231707529362L);
    -
    1929
    -
    1930 auto WA = [wa,ido](size_t x, size_t i) { return wa[i+x*(ido-1)]; };
    -
    1931 auto CC = [cc,ido](size_t a, size_t b, size_t c) -> const T&
    -
    1932 { return cc[a+ido*(b+3*c)]; };
    -
    1933 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    1934 { return ch[a+ido*(b+l1*c)]; };
    -
    1935
    -
    1936 for (size_t k=0; k<l1; k++)
    -
    1937 {
    -
    1938 T tr2=2*CC(ido-1,1,k);
    -
    1939 T cr2=CC(0,0,k)+taur*tr2;
    -
    1940 CH(0,k,0)=CC(0,0,k)+tr2;
    -
    1941 T ci3=2*taui*CC(0,2,k);
    -
    1942 PM (CH(0,k,2),CH(0,k,1),cr2,ci3);
    -
    1943 }
    -
    1944 if (ido==1) return;
    -
    1945 for (size_t k=0; k<l1; k++)
    -
    1946 for (size_t i=2, ic=ido-2; i<ido; i+=2, ic-=2)
    -
    1947 {
    -
    1948 T tr2=CC(i-1,2,k)+CC(ic-1,1,k); // t2=CC(I) + conj(CC(ic))
    -
    1949 T ti2=CC(i ,2,k)-CC(ic ,1,k);
    -
    1950 T cr2=CC(i-1,0,k)+taur*tr2; // c2=CC +taur*t2
    -
    1951 T ci2=CC(i ,0,k)+taur*ti2;
    -
    1952 CH(i-1,k,0)=CC(i-1,0,k)+tr2; // CH=CC+t2
    -
    1953 CH(i ,k,0)=CC(i ,0,k)+ti2;
    -
    1954 T cr3=taui*(CC(i-1,2,k)-CC(ic-1,1,k));// c3=taui*(CC(i)-conj(CC(ic)))
    -
    1955 T ci3=taui*(CC(i ,2,k)+CC(ic ,1,k));
    -
    1956 T di2, di3, dr2, dr3;
    -
    1957 PM(dr3,dr2,cr2,ci3); // d2= (cr2-ci3, ci2+cr3) = c2+i*c3
    -
    1958 PM(di2,di3,ci2,cr3); // d3= (cr2+ci3, ci2-cr3) = c2-i*c3
    -
    1959 MULPM(CH(i,k,1),CH(i-1,k,1),WA(0,i-2),WA(0,i-1),di2,dr2); // ch = WA*d2
    -
    1960 MULPM(CH(i,k,2),CH(i-1,k,2),WA(1,i-2),WA(1,i-1),di3,dr3);
    -
    1961 }
    -
    1962 }
    -
    1963
    -
    1964template<typename T> void radb4(size_t ido, size_t l1,
    -
    1965 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    1966 const T0 * POCKETFFT_RESTRICT wa) const
    -
    1967 {
    -
    1968 constexpr T0 sqrt2=T0(1.414213562373095048801688724209698L);
    -
    1969
    -
    1970 auto WA = [wa,ido](size_t x, size_t i) { return wa[i+x*(ido-1)]; };
    -
    1971 auto CC = [cc,ido](size_t a, size_t b, size_t c) -> const T&
    -
    1972 { return cc[a+ido*(b+4*c)]; };
    -
    1973 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    1974 { return ch[a+ido*(b+l1*c)]; };
    -
    1975
    -
    1976 for (size_t k=0; k<l1; k++)
    -
    1977 {
    -
    1978 T tr1, tr2;
    -
    1979 PM (tr2,tr1,CC(0,0,k),CC(ido-1,3,k));
    -
    1980 T tr3=2*CC(ido-1,1,k);
    -
    1981 T tr4=2*CC(0,2,k);
    -
    1982 PM (CH(0,k,0),CH(0,k,2),tr2,tr3);
    -
    1983 PM (CH(0,k,3),CH(0,k,1),tr1,tr4);
    -
    1984 }
    -
    1985 if ((ido&1)==0)
    -
    1986 for (size_t k=0; k<l1; k++)
    -
    1987 {
    -
    1988 T tr1,tr2,ti1,ti2;
    -
    1989 PM (ti1,ti2,CC(0 ,3,k),CC(0 ,1,k));
    -
    1990 PM (tr2,tr1,CC(ido-1,0,k),CC(ido-1,2,k));
    -
    1991 CH(ido-1,k,0)=tr2+tr2;
    -
    1992 CH(ido-1,k,1)=sqrt2*(tr1-ti1);
    -
    1993 CH(ido-1,k,2)=ti2+ti2;
    -
    1994 CH(ido-1,k,3)=-sqrt2*(tr1+ti1);
    -
    1995 }
    -
    1996 if (ido<=2) return;
    -
    1997 for (size_t k=0; k<l1;++k)
    -
    1998 for (size_t i=2; i<ido; i+=2)
    -
    1999 {
    -
    2000 T ci2, ci3, ci4, cr2, cr3, cr4, ti1, ti2, ti3, ti4, tr1, tr2, tr3, tr4;
    -
    2001 size_t ic=ido-i;
    -
    2002 PM (tr2,tr1,CC(i-1,0,k),CC(ic-1,3,k));
    -
    2003 PM (ti1,ti2,CC(i ,0,k),CC(ic ,3,k));
    -
    2004 PM (tr4,ti3,CC(i ,2,k),CC(ic ,1,k));
    -
    2005 PM (tr3,ti4,CC(i-1,2,k),CC(ic-1,1,k));
    -
    2006 PM (CH(i-1,k,0),cr3,tr2,tr3);
    -
    2007 PM (CH(i ,k,0),ci3,ti2,ti3);
    -
    2008 PM (cr4,cr2,tr1,tr4);
    -
    2009 PM (ci2,ci4,ti1,ti4);
    -
    2010 MULPM (CH(i,k,1),CH(i-1,k,1),WA(0,i-2),WA(0,i-1),ci2,cr2);
    -
    2011 MULPM (CH(i,k,2),CH(i-1,k,2),WA(1,i-2),WA(1,i-1),ci3,cr3);
    -
    2012 MULPM (CH(i,k,3),CH(i-1,k,3),WA(2,i-2),WA(2,i-1),ci4,cr4);
    -
    2013 }
    -
    2014 }
    -
    2015
    -
    2016template<typename T> void radb5(size_t ido, size_t l1,
    -
    2017 const T * POCKETFFT_RESTRICT cc, T * POCKETFFT_RESTRICT ch,
    -
    2018 const T0 * POCKETFFT_RESTRICT wa) const
    -
    2019 {
    -
    2020 constexpr T0 tr11= T0(0.3090169943749474241022934171828191L),
    -
    2021 ti11= T0(0.9510565162951535721164393333793821L),
    -
    2022 tr12= T0(-0.8090169943749474241022934171828191L),
    -
    2023 ti12= T0(0.5877852522924731291687059546390728L);
    -
    2024
    -
    2025 auto WA = [wa,ido](size_t x, size_t i) { return wa[i+x*(ido-1)]; };
    -
    2026 auto CC = [cc,ido](size_t a, size_t b, size_t c) -> const T&
    -
    2027 { return cc[a+ido*(b+5*c)]; };
    -
    2028 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    2029 { return ch[a+ido*(b+l1*c)]; };
    -
    2030
    -
    2031 for (size_t k=0; k<l1; k++)
    -
    2032 {
    -
    2033 T ti5=CC(0,2,k)+CC(0,2,k);
    -
    2034 T ti4=CC(0,4,k)+CC(0,4,k);
    -
    2035 T tr2=CC(ido-1,1,k)+CC(ido-1,1,k);
    -
    2036 T tr3=CC(ido-1,3,k)+CC(ido-1,3,k);
    -
    2037 CH(0,k,0)=CC(0,0,k)+tr2+tr3;
    -
    2038 T cr2=CC(0,0,k)+tr11*tr2+tr12*tr3;
    -
    2039 T cr3=CC(0,0,k)+tr12*tr2+tr11*tr3;
    -
    2040 T ci4, ci5;
    -
    2041 MULPM(ci5,ci4,ti5,ti4,ti11,ti12);
    -
    2042 PM(CH(0,k,4),CH(0,k,1),cr2,ci5);
    -
    2043 PM(CH(0,k,3),CH(0,k,2),cr3,ci4);
    -
    2044 }
    -
    2045 if (ido==1) return;
    -
    2046 for (size_t k=0; k<l1;++k)
    -
    2047 for (size_t i=2, ic=ido-2; i<ido; i+=2, ic-=2)
    -
    2048 {
    -
    2049 T tr2, tr3, tr4, tr5, ti2, ti3, ti4, ti5;
    -
    2050 PM(tr2,tr5,CC(i-1,2,k),CC(ic-1,1,k));
    -
    2051 PM(ti5,ti2,CC(i ,2,k),CC(ic ,1,k));
    -
    2052 PM(tr3,tr4,CC(i-1,4,k),CC(ic-1,3,k));
    -
    2053 PM(ti4,ti3,CC(i ,4,k),CC(ic ,3,k));
    -
    2054 CH(i-1,k,0)=CC(i-1,0,k)+tr2+tr3;
    -
    2055 CH(i ,k,0)=CC(i ,0,k)+ti2+ti3;
    -
    2056 T cr2=CC(i-1,0,k)+tr11*tr2+tr12*tr3;
    -
    2057 T ci2=CC(i ,0,k)+tr11*ti2+tr12*ti3;
    -
    2058 T cr3=CC(i-1,0,k)+tr12*tr2+tr11*tr3;
    -
    2059 T ci3=CC(i ,0,k)+tr12*ti2+tr11*ti3;
    -
    2060 T ci4, ci5, cr5, cr4;
    -
    2061 MULPM(cr5,cr4,tr5,tr4,ti11,ti12);
    -
    2062 MULPM(ci5,ci4,ti5,ti4,ti11,ti12);
    -
    2063 T dr2, dr3, dr4, dr5, di2, di3, di4, di5;
    -
    2064 PM(dr4,dr3,cr3,ci4);
    -
    2065 PM(di3,di4,ci3,cr4);
    -
    2066 PM(dr5,dr2,cr2,ci5);
    -
    2067 PM(di2,di5,ci2,cr5);
    -
    2068 MULPM(CH(i,k,1),CH(i-1,k,1),WA(0,i-2),WA(0,i-1),di2,dr2);
    -
    2069 MULPM(CH(i,k,2),CH(i-1,k,2),WA(1,i-2),WA(1,i-1),di3,dr3);
    -
    2070 MULPM(CH(i,k,3),CH(i-1,k,3),WA(2,i-2),WA(2,i-1),di4,dr4);
    -
    2071 MULPM(CH(i,k,4),CH(i-1,k,4),WA(3,i-2),WA(3,i-1),di5,dr5);
    -
    2072 }
    -
    2073 }
    -
    2074
    -
    2075template<typename T> void radbg(size_t ido, size_t ip, size_t l1,
    - -
    2077 const T0 * POCKETFFT_RESTRICT wa, const T0 * POCKETFFT_RESTRICT csarr) const
    -
    2078 {
    -
    2079 const size_t cdim=ip;
    -
    2080 size_t ipph=(ip+1)/ 2;
    -
    2081 size_t idl1 = ido*l1;
    -
    2082
    -
    2083 auto CC = [cc,ido,cdim](size_t a, size_t b, size_t c) -> const T&
    -
    2084 { return cc[a+ido*(b+cdim*c)]; };
    -
    2085 auto CH = [ch,ido,l1](size_t a, size_t b, size_t c) -> T&
    -
    2086 { return ch[a+ido*(b+l1*c)]; };
    -
    2087 auto C1 = [cc,ido,l1](size_t a, size_t b, size_t c) -> const T&
    -
    2088 { return cc[a+ido*(b+l1*c)]; };
    -
    2089 auto C2 = [cc,idl1](size_t a, size_t b) -> T&
    -
    2090 { return cc[a+idl1*b]; };
    -
    2091 auto CH2 = [ch,idl1](size_t a, size_t b) -> T&
    -
    2092 { return ch[a+idl1*b]; };
    -
    2093
    -
    2094 for (size_t k=0; k<l1; ++k) // 102
    -
    2095 for (size_t i=0; i<ido; ++i) // 101
    -
    2096 CH(i,k,0) = CC(i,0,k);
    -
    2097 for (size_t j=1, jc=ip-1; j<ipph; ++j, --jc) // 108
    -
    2098 {
    -
    2099 size_t j2=2*j-1;
    -
    2100 for (size_t k=0; k<l1; ++k)
    -
    2101 {
    -
    2102 CH(0,k,j ) = 2*CC(ido-1,j2,k);
    -
    2103 CH(0,k,jc) = 2*CC(0,j2+1,k);
    -
    2104 }
    -
    2105 }
    -
    2106
    -
    2107 if (ido!=1)
    -
    2108 {
    -
    2109 for (size_t j=1, jc=ip-1; j<ipph; ++j,--jc) // 111
    -
    2110 {
    -
    2111 size_t j2=2*j-1;
    -
    2112 for (size_t k=0; k<l1; ++k)
    -
    2113 for (size_t i=1, ic=ido-i-2; i<=ido-2; i+=2, ic-=2) // 109
    -
    2114 {
    -
    2115 CH(i ,k,j ) = CC(i ,j2+1,k)+CC(ic ,j2,k);
    -
    2116 CH(i ,k,jc) = CC(i ,j2+1,k)-CC(ic ,j2,k);
    -
    2117 CH(i+1,k,j ) = CC(i+1,j2+1,k)-CC(ic+1,j2,k);
    -
    2118 CH(i+1,k,jc) = CC(i+1,j2+1,k)+CC(ic+1,j2,k);
    -
    2119 }
    -
    2120 }
    -
    2121 }
    -
    2122 for (size_t l=1,lc=ip-1; l<ipph; ++l,--lc)
    -
    2123 {
    -
    2124 for (size_t ik=0; ik<idl1; ++ik)
    -
    2125 {
    -
    2126 C2(ik,l ) = CH2(ik,0)+csarr[2*l]*CH2(ik,1)+csarr[4*l]*CH2(ik,2);
    -
    2127 C2(ik,lc) = csarr[2*l+1]*CH2(ik,ip-1)+csarr[4*l+1]*CH2(ik,ip-2);
    -
    2128 }
    -
    2129 size_t iang=2*l;
    -
    2130 size_t j=3,jc=ip-3;
    -
    2131 for(; j<ipph-3; j+=4,jc-=4)
    -
    2132 {
    -
    2133 iang+=l; if(iang>ip) iang-=ip;
    -
    2134 T0 ar1=csarr[2*iang], ai1=csarr[2*iang+1];
    -
    2135 iang+=l; if(iang>ip) iang-=ip;
    -
    2136 T0 ar2=csarr[2*iang], ai2=csarr[2*iang+1];
    -
    2137 iang+=l; if(iang>ip) iang-=ip;
    -
    2138 T0 ar3=csarr[2*iang], ai3=csarr[2*iang+1];
    -
    2139 iang+=l; if(iang>ip) iang-=ip;
    -
    2140 T0 ar4=csarr[2*iang], ai4=csarr[2*iang+1];
    -
    2141 for (size_t ik=0; ik<idl1; ++ik)
    -
    2142 {
    -
    2143 C2(ik,l ) += ar1*CH2(ik,j )+ar2*CH2(ik,j +1)
    -
    2144 +ar3*CH2(ik,j +2)+ar4*CH2(ik,j +3);
    -
    2145 C2(ik,lc) += ai1*CH2(ik,jc)+ai2*CH2(ik,jc-1)
    -
    2146 +ai3*CH2(ik,jc-2)+ai4*CH2(ik,jc-3);
    -
    2147 }
    -
    2148 }
    -
    2149 for(; j<ipph-1; j+=2,jc-=2)
    -
    2150 {
    -
    2151 iang+=l; if(iang>ip) iang-=ip;
    -
    2152 T0 ar1=csarr[2*iang], ai1=csarr[2*iang+1];
    -
    2153 iang+=l; if(iang>ip) iang-=ip;
    -
    2154 T0 ar2=csarr[2*iang], ai2=csarr[2*iang+1];
    -
    2155 for (size_t ik=0; ik<idl1; ++ik)
    -
    2156 {
    -
    2157 C2(ik,l ) += ar1*CH2(ik,j )+ar2*CH2(ik,j +1);
    -
    2158 C2(ik,lc) += ai1*CH2(ik,jc)+ai2*CH2(ik,jc-1);
    -
    2159 }
    -
    2160 }
    -
    2161 for(; j<ipph; ++j,--jc)
    -
    2162 {
    -
    2163 iang+=l; if(iang>ip) iang-=ip;
    -
    2164 T0 war=csarr[2*iang], wai=csarr[2*iang+1];
    -
    2165 for (size_t ik=0; ik<idl1; ++ik)
    -
    2166 {
    -
    2167 C2(ik,l ) += war*CH2(ik,j );
    -
    2168 C2(ik,lc) += wai*CH2(ik,jc);
    -
    2169 }
    -
    2170 }
    -
    2171 }
    -
    2172 for (size_t j=1; j<ipph; ++j)
    -
    2173 for (size_t ik=0; ik<idl1; ++ik)
    -
    2174 CH2(ik,0) += CH2(ik,j);
    -
    2175 for (size_t j=1, jc=ip-1; j<ipph; ++j,--jc) // 124
    -
    2176 for (size_t k=0; k<l1; ++k)
    -
    2177 PM(CH(0,k,jc),CH(0,k,j),C1(0,k,j),C1(0,k,jc));
    -
    2178
    -
    2179 if (ido==1) return;
    -
    2180
    -
    2181 for (size_t j=1, jc=ip-1; j<ipph; ++j, --jc) // 127
    -
    2182 for (size_t k=0; k<l1; ++k)
    -
    2183 for (size_t i=1; i<=ido-2; i+=2)
    -
    2184 {
    -
    2185 CH(i ,k,j ) = C1(i ,k,j)-C1(i+1,k,jc);
    -
    2186 CH(i ,k,jc) = C1(i ,k,j)+C1(i+1,k,jc);
    -
    2187 CH(i+1,k,j ) = C1(i+1,k,j)+C1(i ,k,jc);
    -
    2188 CH(i+1,k,jc) = C1(i+1,k,j)-C1(i ,k,jc);
    -
    2189 }
    -
    2190
    -
    2191// All in CH
    -
    2192
    -
    2193 for (size_t j=1; j<ip; ++j)
    -
    2194 {
    -
    2195 size_t is = (j-1)*(ido-1);
    -
    2196 for (size_t k=0; k<l1; ++k)
    -
    2197 {
    -
    2198 size_t idij = is;
    -
    2199 for (size_t i=1; i<=ido-2; i+=2)
    -
    2200 {
    -
    2201 T t1=CH(i,k,j), t2=CH(i+1,k,j);
    -
    2202 CH(i ,k,j) = wa[idij]*t1-wa[idij+1]*t2;
    -
    2203 CH(i+1,k,j) = wa[idij]*t2+wa[idij+1]*t1;
    -
    2204 idij+=2;
    -
    2205 }
    -
    2206 }
    -
    2207 }
    -
    2208 }
    -
    2209
    -
    2210 template<typename T> void copy_and_norm(T *c, T *p1, T0 fct) const
    -
    2211 {
    -
    2212 if (p1!=c)
    -
    2213 {
    -
    2214 if (fct!=1.)
    -
    2215 for (size_t i=0; i<length; ++i)
    -
    2216 c[i] = fct*p1[i];
    -
    2217 else
    -
    2218 std::copy_n (p1, length, c);
    -
    2219 }
    -
    2220 else
    -
    2221 if (fct!=1.)
    -
    2222 for (size_t i=0; i<length; ++i)
    -
    2223 c[i] *= fct;
    -
    2224 }
    -
    2225
    -
    2226 public:
    -
    -
    2227 template<typename T> void exec(T c[], T0 fct, bool r2hc) const
    -
    2228 {
    -
    2229 if (length==1) { c[0]*=fct; return; }
    -
    2230 size_t nf=fact.size();
    -
    2231 arr<T> ch(length);
    -
    2232 T *p1=c, *p2=ch.data();
    -
    2233
    -
    2234 if (r2hc)
    -
    2235 for(size_t k1=0, l1=length; k1<nf;++k1)
    -
    2236 {
    -
    2237 size_t k=nf-k1-1;
    -
    2238 size_t ip=fact[k].fct;
    -
    2239 size_t ido=length / l1;
    -
    2240 l1 /= ip;
    -
    2241 if(ip==4)
    -
    2242 radf4(ido, l1, p1, p2, fact[k].tw);
    -
    2243 else if(ip==2)
    -
    2244 radf2(ido, l1, p1, p2, fact[k].tw);
    -
    2245 else if(ip==3)
    -
    2246 radf3(ido, l1, p1, p2, fact[k].tw);
    -
    2247 else if(ip==5)
    -
    2248 radf5(ido, l1, p1, p2, fact[k].tw);
    -
    2249 else
    -
    2250 { radfg(ido, ip, l1, p1, p2, fact[k].tw, fact[k].tws); std::swap (p1,p2); }
    -
    2251 std::swap (p1,p2);
    -
    2252 }
    -
    2253 else
    -
    2254 for(size_t k=0, l1=1; k<nf; k++)
    -
    2255 {
    -
    2256 size_t ip = fact[k].fct,
    -
    2257 ido= length/(ip*l1);
    -
    2258 if(ip==4)
    -
    2259 radb4(ido, l1, p1, p2, fact[k].tw);
    -
    2260 else if(ip==2)
    -
    2261 radb2(ido, l1, p1, p2, fact[k].tw);
    -
    2262 else if(ip==3)
    -
    2263 radb3(ido, l1, p1, p2, fact[k].tw);
    -
    2264 else if(ip==5)
    -
    2265 radb5(ido, l1, p1, p2, fact[k].tw);
    -
    2266 else
    -
    2267 radbg(ido, ip, l1, p1, p2, fact[k].tw, fact[k].tws);
    -
    2268 std::swap (p1,p2);
    -
    2269 l1*=ip;
    -
    2270 }
    -
    2271
    -
    2272 copy_and_norm(c,p1,fct);
    -
    2273 }
    -
    -
    2274
    -
    2275 private:
    -
    2276 void factorize()
    -
    2277 {
    -
    2278 size_t len=length;
    -
    2279 while ((len%4)==0)
    -
    2280 { add_factor(4); len>>=2; }
    -
    2281 if ((len%2)==0)
    -
    2282 {
    -
    2283 len>>=1;
    -
    2284 // factor 2 should be at the front of the factor list
    -
    2285 add_factor(2);
    -
    2286 std::swap(fact[0].fct, fact.back().fct);
    -
    2287 }
    -
    2288 for (size_t divisor=3; divisor*divisor<=len; divisor+=2)
    -
    2289 while ((len%divisor)==0)
    -
    2290 {
    -
    2291 add_factor(divisor);
    -
    2292 len/=divisor;
    -
    2293 }
    -
    2294 if (len>1) add_factor(len);
    -
    2295 }
    -
    2296
    -
    2297 size_t twsize() const
    -
    2298 {
    -
    2299 size_t twsz=0, l1=1;
    -
    2300 for (size_t k=0; k<fact.size(); ++k)
    -
    2301 {
    -
    2302 size_t ip=fact[k].fct, ido=length/(l1*ip);
    -
    2303 twsz+=(ip-1)*(ido-1);
    -
    2304 if (ip>5) twsz+=2*ip;
    -
    2305 l1*=ip;
    -
    2306 }
    -
    2307 return twsz;
    -
    2308 }
    -
    2309
    -
    2310 void comp_twiddle()
    -
    2311 {
    -
    2312 sincos_2pibyn<T0> twid(length);
    -
    2313 size_t l1=1;
    -
    2314 T0 *ptr=mem.data();
    -
    2315 for (size_t k=0; k<fact.size(); ++k)
    -
    2316 {
    -
    2317 size_t ip=fact[k].fct, ido=length/(l1*ip);
    -
    2318 if (k<fact.size()-1) // last factor doesn't need twiddles
    -
    2319 {
    -
    2320 fact[k].tw=ptr; ptr+=(ip-1)*(ido-1);
    -
    2321 for (size_t j=1; j<ip; ++j)
    -
    2322 for (size_t i=1; i<=(ido-1)/2; ++i)
    -
    2323 {
    -
    2324 fact[k].tw[(j-1)*(ido-1)+2*i-2] = twid[j*l1*i].r;
    -
    2325 fact[k].tw[(j-1)*(ido-1)+2*i-1] = twid[j*l1*i].i;
    -
    2326 }
    -
    2327 }
    -
    2328 if (ip>5) // special factors required by *g functions
    -
    2329 {
    -
    2330 fact[k].tws=ptr; ptr+=2*ip;
    -
    2331 fact[k].tws[0] = 1.;
    -
    2332 fact[k].tws[1] = 0.;
    -
    2333 for (size_t i=2, ic=2*ip-2; i<=ic; i+=2, ic-=2)
    -
    2334 {
    -
    2335 fact[k].tws[i ] = twid[i/2*(length/ip)].r;
    -
    2336 fact[k].tws[i+1] = twid[i/2*(length/ip)].i;
    -
    2337 fact[k].tws[ic] = twid[i/2*(length/ip)].r;
    -
    2338 fact[k].tws[ic+1] = -twid[i/2*(length/ip)].i;
    -
    2339 }
    -
    2340 }
    -
    2341 l1*=ip;
    -
    2342 }
    -
    2343 }
    -
    2344
    -
    2345 public:
    -
    - -
    2347 : length(length_)
    -
    2348 {
    -
    2349 if (length==0) throw std::runtime_error("zero-length FFT requested");
    -
    2350 if (length==1) return;
    -
    2351 factorize();
    -
    2352 mem.resize(twsize());
    -
    2353 comp_twiddle();
    -
    2354 }
    -
    -
    2355};
    -
    -
    2356
    -
    2357//
    -
    2358// complex Bluestein transforms
    -
    2359//
    -
    2360
    -
    -
    2361template<typename T0> class fftblue
    -
    2362 {
    -
    2363 private:
    -
    2364 size_t n, n2;
    -
    2365 cfftp<T0> plan;
    -
    2366 arr<cmplx<T0>> mem;
    -
    2367 cmplx<T0> *bk, *bkf;
    -
    2368
    -
    2369 template<bool fwd, typename T> void fft(cmplx<T> c[], T0 fct) const
    -
    2370 {
    -
    2371 arr<cmplx<T>> akf(n2);
    -
    2372
    -
    2373 /* initialize a_k and FFT it */
    -
    2374 for (size_t m=0; m<n; ++m)
    -
    2375 special_mul<fwd>(c[m],bk[m],akf[m]);
    -
    2376 auto zero = akf[0]*T0(0);
    -
    2377 for (size_t m=n; m<n2; ++m)
    -
    2378 akf[m]=zero;
    -
    2379
    -
    2380 plan.exec (akf.data(),1.,true);
    -
    2381
    -
    2382 /* do the convolution */
    -
    2383 akf[0] = akf[0].template special_mul<!fwd>(bkf[0]);
    -
    2384 for (size_t m=1; m<(n2+1)/2; ++m)
    -
    2385 {
    -
    2386 akf[m] = akf[m].template special_mul<!fwd>(bkf[m]);
    -
    2387 akf[n2-m] = akf[n2-m].template special_mul<!fwd>(bkf[m]);
    -
    2388 }
    -
    2389 if ((n2&1)==0)
    -
    2390 akf[n2/2] = akf[n2/2].template special_mul<!fwd>(bkf[n2/2]);
    -
    2391
    -
    2392 /* inverse FFT */
    -
    2393 plan.exec (akf.data(),1.,false);
    -
    2394
    -
    2395 /* multiply by b_k */
    -
    2396 for (size_t m=0; m<n; ++m)
    -
    2397 c[m] = akf[m].template special_mul<fwd>(bk[m])*fct;
    -
    2398 }
    -
    2399
    -
    2400 public:
    -
    - -
    2402 : n(length), n2(util::good_size_cmplx(n*2-1)), plan(n2), mem(n+n2/2+1),
    -
    2403 bk(mem.data()), bkf(mem.data()+n)
    -
    2404 {
    -
    2405 /* initialize b_k */
    - -
    2407 bk[0].Set(1, 0);
    -
    2408
    -
    2409 size_t coeff=0;
    -
    2410 for (size_t m=1; m<n; ++m)
    -
    2411 {
    -
    2412 coeff+=2*m-1;
    -
    2413 if (coeff>=2*n) coeff-=2*n;
    -
    2414 bk[m] = tmp[coeff];
    -
    2415 }
    -
    2416
    -
    2417 /* initialize the zero-padded, Fourier transformed b_k. Add normalisation. */
    -
    2418 arr<cmplx<T0>> tbkf(n2);
    -
    2419 T0 xn2 = T0(1)/T0(n2);
    -
    2420 tbkf[0] = bk[0]*xn2;
    -
    2421 for (size_t m=1; m<n; ++m)
    -
    2422 tbkf[m] = tbkf[n2-m] = bk[m]*xn2;
    -
    2423 for (size_t m=n;m<=(n2-n);++m)
    -
    2424 tbkf[m].Set(0.,0.);
    -
    2425 plan.exec(tbkf.data(),1.,true);
    -
    2426 for (size_t i=0; i<n2/2+1; ++i)
    -
    2427 bkf[i] = tbkf[i];
    -
    2428 }
    -
    -
    2429
    -
    -
    2430 template<typename T> void exec(cmplx<T> c[], T0 fct, bool fwd) const
    -
    2431 { fwd ? fft<true>(c,fct) : fft<false>(c,fct); }
    -
    -
    2432
    -
    -
    2433 template<typename T> void exec_r(T c[], T0 fct, bool fwd)
    -
    2434 {
    -
    2435 arr<cmplx<T>> tmp(n);
    -
    2436 if (fwd)
    -
    2437 {
    -
    2438 auto zero = T0(0)*c[0];
    -
    2439 for (size_t m=0; m<n; ++m)
    -
    2440 tmp[m].Set(c[m], zero);
    -
    2441 fft<true>(tmp.data(),fct);
    -
    2442 c[0] = tmp[0].r;
    -
    2443 std::copy_n (&tmp[1].r, n-1, &c[1]);
    -
    2444 }
    -
    2445 else
    -
    2446 {
    -
    2447 tmp[0].Set(c[0],c[0]*0);
    -
    2448 std::copy_n (c+1, n-1, &tmp[1].r);
    -
    2449 if ((n&1)==0) tmp[n/2].i=T0(0)*c[0];
    -
    2450 for (size_t m=1; 2*m<n; ++m)
    -
    2451 tmp[n-m].Set(tmp[m].r, -tmp[m].i);
    -
    2452 fft<false>(tmp.data(),fct);
    -
    2453 for (size_t m=0; m<n; ++m)
    -
    2454 c[m] = tmp[m].r;
    -
    2455 }
    -
    2456 }
    -
    -
    2457 };
    -
    -
    2458
    -
    2459//
    -
    2460// flexible (FFTPACK/Bluestein) complex 1D transform
    -
    2461//
    -
    2462
    -
    -
    2463template<typename T0> class pocketfft_c
    -
    2464 {
    -
    2465 private:
    -
    2466 std::unique_ptr<cfftp<T0>> packplan;
    -
    2467 std::unique_ptr<fftblue<T0>> blueplan;
    -
    2468 size_t len;
    -
    2469
    -
    2470 public:
    -
    - -
    2472 : len(length)
    -
    2473 {
    -
    2474 if (length==0) throw std::runtime_error("zero-length FFT requested");
    -
    2475 size_t tmp = (length<50) ? 0 : util::largest_prime_factor(length);
    -
    2476 if (tmp*tmp <= length)
    -
    2477 {
    -
    2478 packplan=std::unique_ptr<cfftp<T0>>(new cfftp<T0>(length));
    -
    2479 return;
    -
    2480 }
    -
    2481 double comp1 = util::cost_guess(length);
    -
    2482 double comp2 = 2*util::cost_guess(util::good_size_cmplx(2*length-1));
    -
    2483 comp2*=1.5; /* fudge factor that appears to give good overall performance */
    -
    2484 if (comp2<comp1) // use Bluestein
    -
    2485 blueplan=std::unique_ptr<fftblue<T0>>(new fftblue<T0>(length));
    -
    2486 else
    -
    2487 packplan=std::unique_ptr<cfftp<T0>>(new cfftp<T0>(length));
    -
    2488 }
    -
    -
    2489
    -
    -
    2490 template<typename T> POCKETFFT_NOINLINE void exec(cmplx<T> c[], T0 fct, bool fwd) const
    -
    2491 { packplan ? packplan->exec(c,fct,fwd) : blueplan->exec(c,fct,fwd); }
    -
    -
    2492
    -
    2493 size_t length() const { return len; }
    -
    2494 };
    -
    -
    2495
    -
    2496//
    -
    2497// flexible (FFTPACK/Bluestein) real-valued 1D transform
    -
    2498//
    -
    2499
    -
    -
    2500template<typename T0> class pocketfft_r
    -
    2501 {
    -
    2502 private:
    -
    2503 std::unique_ptr<rfftp<T0>> packplan;
    -
    2504 std::unique_ptr<fftblue<T0>> blueplan;
    -
    2505 size_t len;
    -
    2506
    -
    2507 public:
    -
    - -
    2509 : len(length)
    -
    2510 {
    -
    2511 if (length==0) throw std::runtime_error("zero-length FFT requested");
    -
    2512 size_t tmp = (length<50) ? 0 : util::largest_prime_factor(length);
    -
    2513 if (tmp*tmp <= length)
    -
    2514 {
    -
    2515 packplan=std::unique_ptr<rfftp<T0>>(new rfftp<T0>(length));
    -
    2516 return;
    -
    2517 }
    -
    2518 double comp1 = 0.5*util::cost_guess(length);
    -
    2519 double comp2 = 2*util::cost_guess(util::good_size_cmplx(2*length-1));
    -
    2520 comp2*=1.5; /* fudge factor that appears to give good overall performance */
    -
    2521 if (comp2<comp1) // use Bluestein
    -
    2522 blueplan=std::unique_ptr<fftblue<T0>>(new fftblue<T0>(length));
    -
    2523 else
    -
    2524 packplan=std::unique_ptr<rfftp<T0>>(new rfftp<T0>(length));
    -
    2525 }
    -
    -
    2526
    -
    -
    2527 template<typename T> POCKETFFT_NOINLINE void exec(T c[], T0 fct, bool fwd) const
    -
    2528 { packplan ? packplan->exec(c,fct,fwd) : blueplan->exec_r(c,fct,fwd); }
    -
    -
    2529
    -
    2530 size_t length() const { return len; }
    -
    2531 };
    -
    -
    2532
    -
    2533
    -
    2534//
    -
    2535// sine/cosine transforms
    -
    2536//
    -
    2537
    -
    -
    2538template<typename T0> class T_dct1
    -
    2539 {
    -
    2540 private:
    -
    2541 pocketfft_r<T0> fftplan;
    -
    2542
    -
    2543 public:
    -
    - -
    2545 : fftplan(2*(length-1)) {}
    -
    -
    2546
    -
    -
    2547 template<typename T> POCKETFFT_NOINLINE void exec(T c[], T0 fct, bool ortho,
    -
    2548 int /*type*/, bool /*cosine*/) const
    -
    2549 {
    -
    2550 constexpr T0 sqrt2=T0(1.414213562373095048801688724209698L);
    -
    2551 size_t N=fftplan.length(), n=N/2+1;
    -
    2552 if (ortho)
    -
    2553 { c[0]*=sqrt2; c[n-1]*=sqrt2; }
    -
    2554 arr<T> tmp(N);
    -
    2555 tmp[0] = c[0];
    -
    2556 for (size_t i=1; i<n; ++i)
    -
    2557 tmp[i] = tmp[N-i] = c[i];
    -
    2558 fftplan.exec(tmp.data(), fct, true);
    -
    2559 c[0] = tmp[0];
    -
    2560 for (size_t i=1; i<n; ++i)
    -
    2561 c[i] = tmp[2*i-1];
    -
    2562 if (ortho)
    -
    2563 { c[0]*=sqrt2*T0(0.5); c[n-1]*=sqrt2*T0(0.5); }
    -
    2564 }
    -
    -
    2565
    -
    2566 size_t length() const { return fftplan.length()/2+1; }
    -
    2567 };
    -
    -
    2568
    -
    -
    2569template<typename T0> class T_dst1
    -
    2570 {
    -
    2571 private:
    -
    2572 pocketfft_r<T0> fftplan;
    -
    2573
    -
    2574 public:
    -
    - -
    2576 : fftplan(2*(length+1)) {}
    -
    -
    2577
    -
    -
    2578 template<typename T> POCKETFFT_NOINLINE void exec(T c[], T0 fct,
    -
    2579 bool /*ortho*/, int /*type*/, bool /*cosine*/) const
    -
    2580 {
    -
    2581 size_t N=fftplan.length(), n=N/2-1;
    -
    2582 arr<T> tmp(N);
    -
    2583 tmp[0] = tmp[n+1] = c[0]*0;
    -
    2584 for (size_t i=0; i<n; ++i)
    -
    2585 { tmp[i+1]=c[i]; tmp[N-1-i]=-c[i]; }
    -
    2586 fftplan.exec(tmp.data(), fct, true);
    -
    2587 for (size_t i=0; i<n; ++i)
    -
    2588 c[i] = -tmp[2*i+2];
    -
    2589 }
    -
    -
    2590
    -
    2591 size_t length() const { return fftplan.length()/2-1; }
    -
    2592 };
    -
    -
    2593
    -
    -
    2594template<typename T0> class T_dcst23
    -
    2595 {
    -
    2596 private:
    -
    2597 pocketfft_r<T0> fftplan;
    -
    2598 std::vector<T0> twiddle;
    -
    2599
    -
    2600 public:
    -
    - -
    2602 : fftplan(length), twiddle(length)
    -
    2603 {
    -
    2604 sincos_2pibyn<T0> tw(4*length);
    -
    2605 for (size_t i=0; i<length; ++i)
    -
    2606 twiddle[i] = tw[i+1].r;
    -
    2607 }
    -
    -
    2608
    -
    -
    2609 template<typename T> POCKETFFT_NOINLINE void exec(T c[], T0 fct, bool ortho,
    -
    2610 int type, bool cosine) const
    -
    2611 {
    -
    2612 constexpr T0 sqrt2=T0(1.414213562373095048801688724209698L);
    -
    2613 size_t N=length();
    -
    2614 size_t NS2 = (N+1)/2;
    -
    2615 if (type==2)
    -
    2616 {
    -
    2617 if (!cosine)
    -
    2618 for (size_t k=1; k<N; k+=2)
    -
    2619 c[k] = -c[k];
    -
    2620 c[0] *= 2;
    -
    2621 if ((N&1)==0) c[N-1]*=2;
    -
    2622 for (size_t k=1; k<N-1; k+=2)
    -
    2623 MPINPLACE(c[k+1], c[k]);
    -
    2624 fftplan.exec(c, fct, false);
    -
    2625 for (size_t k=1, kc=N-1; k<NS2; ++k, --kc)
    -
    2626 {
    -
    2627 T t1 = twiddle[k-1]*c[kc]+twiddle[kc-1]*c[k];
    -
    2628 T t2 = twiddle[k-1]*c[k]-twiddle[kc-1]*c[kc];
    -
    2629 c[k] = T0(0.5)*(t1+t2); c[kc]=T0(0.5)*(t1-t2);
    -
    2630 }
    -
    2631 if ((N&1)==0)
    -
    2632 c[NS2] *= twiddle[NS2-1];
    -
    2633 if (!cosine)
    -
    2634 for (size_t k=0, kc=N-1; k<kc; ++k, --kc)
    -
    2635 std::swap(c[k], c[kc]);
    -
    2636 if (ortho) c[0]*=sqrt2*T0(0.5);
    -
    2637 }
    -
    2638 else
    -
    2639 {
    -
    2640 if (ortho) c[0]*=sqrt2;
    -
    2641 if (!cosine)
    -
    2642 for (size_t k=0, kc=N-1; k<NS2; ++k, --kc)
    -
    2643 std::swap(c[k], c[kc]);
    -
    2644 for (size_t k=1, kc=N-1; k<NS2; ++k, --kc)
    -
    2645 {
    -
    2646 T t1=c[k]+c[kc], t2=c[k]-c[kc];
    -
    2647 c[k] = twiddle[k-1]*t2+twiddle[kc-1]*t1;
    -
    2648 c[kc]= twiddle[k-1]*t1-twiddle[kc-1]*t2;
    -
    2649 }
    -
    2650 if ((N&1)==0)
    -
    2651 c[NS2] *= 2*twiddle[NS2-1];
    -
    2652 fftplan.exec(c, fct, true);
    -
    2653 for (size_t k=1; k<N-1; k+=2)
    -
    2654 MPINPLACE(c[k], c[k+1]);
    -
    2655 if (!cosine)
    -
    2656 for (size_t k=1; k<N; k+=2)
    -
    2657 c[k] = -c[k];
    -
    2658 }
    -
    2659 }
    -
    -
    2660
    -
    2661 size_t length() const { return fftplan.length(); }
    -
    2662 };
    -
    -
    2663
    -
    -
    2664template<typename T0> class T_dcst4
    -
    2665 {
    -
    2666 private:
    -
    2667 size_t N;
    -
    2668 std::unique_ptr<pocketfft_c<T0>> fft;
    -
    2669 std::unique_ptr<pocketfft_r<T0>> rfft;
    -
    2670 arr<cmplx<T0>> C2;
    -
    2671
    -
    2672 public:
    -
    - -
    2674 : N(length),
    -
    2675 fft((N&1) ? nullptr : new pocketfft_c<T0>(N/2)),
    -
    2676 rfft((N&1)? new pocketfft_r<T0>(N) : nullptr),
    -
    2677 C2((N&1) ? 0 : N/2)
    -
    2678 {
    -
    2679 if ((N&1)==0)
    -
    2680 {
    -
    2681 sincos_2pibyn<T0> tw(16*N);
    -
    2682 for (size_t i=0; i<N/2; ++i)
    -
    2683 C2[i] = conj(tw[8*i+1]);
    -
    2684 }
    -
    2685 }
    -
    -
    2686
    -
    -
    2687 template<typename T> POCKETFFT_NOINLINE void exec(T c[], T0 fct,
    -
    2688 bool /*ortho*/, int /*type*/, bool cosine) const
    -
    2689 {
    -
    2690 size_t n2 = N/2;
    -
    2691 if (!cosine)
    -
    2692 for (size_t k=0, kc=N-1; k<n2; ++k, --kc)
    -
    2693 std::swap(c[k], c[kc]);
    -
    2694 if (N&1)
    -
    2695 {
    -
    2696 // The following code is derived from the FFTW3 function apply_re11()
    -
    2697 // and is released under the 3-clause BSD license with friendly
    -
    2698 // permission of Matteo Frigo and Steven G. Johnson.
    -
    2699
    -
    2700 arr<T> y(N);
    -
    2701 {
    -
    2702 size_t i=0, m=n2;
    -
    2703 for (; m<N; ++i, m+=4)
    -
    2704 y[i] = c[m];
    -
    2705 for (; m<2*N; ++i, m+=4)
    -
    2706 y[i] = -c[2*N-m-1];
    -
    2707 for (; m<3*N; ++i, m+=4)
    -
    2708 y[i] = -c[m-2*N];
    -
    2709 for (; m<4*N; ++i, m+=4)
    -
    2710 y[i] = c[4*N-m-1];
    -
    2711 for (; i<N; ++i, m+=4)
    -
    2712 y[i] = c[m-4*N];
    -
    2713 }
    -
    2714 rfft->exec(y.data(), fct, true);
    -
    2715 {
    -
    2716 auto SGN = [](size_t i)
    -
    2717 {
    -
    2718 constexpr T0 sqrt2=T0(1.414213562373095048801688724209698L);
    -
    2719 return (i&2) ? -sqrt2 : sqrt2;
    -
    2720 };
    -
    2721 c[n2] = y[0]*SGN(n2+1);
    -
    2722 size_t i=0, i1=1, k=1;
    -
    2723 for (; k<n2; ++i, ++i1, k+=2)
    -
    2724 {
    -
    2725 c[i ] = y[2*k-1]*SGN(i1) + y[2*k ]*SGN(i);
    -
    2726 c[N -i1] = y[2*k-1]*SGN(N -i) - y[2*k ]*SGN(N -i1);
    -
    2727 c[n2-i1] = y[2*k+1]*SGN(n2-i) - y[2*k+2]*SGN(n2-i1);
    -
    2728 c[n2+i1] = y[2*k+1]*SGN(n2+i+2) + y[2*k+2]*SGN(n2+i1);
    -
    2729 }
    -
    2730 if (k == n2)
    -
    2731 {
    -
    2732 c[i ] = y[2*k-1]*SGN(i+1) + y[2*k]*SGN(i);
    -
    2733 c[N-i1] = y[2*k-1]*SGN(i+2) + y[2*k]*SGN(i1);
    -
    2734 }
    -
    2735 }
    -
    2736
    -
    2737 // FFTW-derived code ends here
    -
    2738 }
    -
    2739 else
    -
    2740 {
    -
    2741 // even length algorithm from
    -
    2742 // https://www.appletonaudio.com/blog/2013/derivation-of-fast-dct-4-algorithm-based-on-dft/
    -
    2743 arr<cmplx<T>> y(n2);
    -
    2744 for(size_t i=0; i<n2; ++i)
    -
    2745 {
    -
    2746 y[i].Set(c[2*i],c[N-1-2*i]);
    -
    2747 y[i] *= C2[i];
    -
    2748 }
    -
    2749 fft->exec(y.data(), fct, true);
    -
    2750 for(size_t i=0, ic=n2-1; i<n2; ++i, --ic)
    -
    2751 {
    -
    2752 c[2*i ] = 2*(y[i ].r*C2[i ].r-y[i ].i*C2[i ].i);
    -
    2753 c[2*i+1] = -2*(y[ic].i*C2[ic].r+y[ic].r*C2[ic].i);
    -
    2754 }
    -
    2755 }
    -
    2756 if (!cosine)
    -
    2757 for (size_t k=1; k<N; k+=2)
    -
    2758 c[k] = -c[k];
    -
    2759 }
    -
    -
    2760
    -
    2761 size_t length() const { return N; }
    -
    2762 };
    -
    -
    2763
    -
    2764
    -
    2765//
    -
    2766// multi-D infrastructure
    -
    2767//
    -
    2768
    -
    -
    2769template<typename T> std::shared_ptr<T> get_plan(size_t length)
    -
    2770 {
    -
    2771#if POCKETFFT_CACHE_SIZE==0
    -
    2772 return std::make_shared<T>(length);
    -
    2773#else
    -
    2774 constexpr size_t nmax=POCKETFFT_CACHE_SIZE;
    -
    2775 static std::array<std::shared_ptr<T>, nmax> cache;
    -
    2776 static std::array<size_t, nmax> last_access{{0}};
    -
    2777 static size_t access_counter = 0;
    -
    2778 static std::mutex mut;
    -
    2779
    -
    2780 auto find_in_cache = [&]() -> std::shared_ptr<T>
    -
    2781 {
    -
    2782 for (size_t i=0; i<nmax; ++i)
    -
    2783 if (cache[i] && (cache[i]->length()==length))
    -
    2784 {
    -
    2785 // no need to update if this is already the most recent entry
    - -
    2787 {
    - -
    2789 // Guard against overflow
    -
    2790 if (access_counter == 0)
    -
    2791 last_access.fill(0);
    -
    2792 }
    -
    2793 return cache[i];
    -
    2794 }
    -
    2795
    -
    2796 return nullptr;
    -
    2797 };
    -
    2798
    -
    2799 {
    -
    2800 std::lock_guard<std::mutex> lock(mut);
    -
    2801 auto p = find_in_cache();
    -
    2802 if (p) return p;
    -
    2803 }
    -
    2804 auto plan = std::make_shared<T>(length);
    -
    2805 {
    -
    2806 std::lock_guard<std::mutex> lock(mut);
    -
    2807 auto p = find_in_cache();
    -
    2808 if (p) return p;
    -
    2809
    -
    2810 size_t lru = 0;
    -
    2811 for (size_t i=1; i<nmax; ++i)
    -
    2812 if (last_access[i] < last_access[lru])
    -
    2813 lru = i;
    -
    2814
    -
    2815 cache[lru] = plan;
    - -
    2817 }
    -
    2818 return plan;
    -
    2819#endif
    -
    2820 }
    -
    -
    2821
    -
    - -
    2823 {
    -
    2824 protected:
    - - -
    2827
    -
    2828 public:
    -
    -
    2829 arr_info(const shape_t &shape_, const stride_t &stride_)
    -
    2830 : shp(shape_), str(stride_) {}
    -
    -
    2831 size_t ndim() const { return shp.size(); }
    -
    2832 size_t size() const { return util::prod(shp); }
    -
    2833 const shape_t &shape() const { return shp; }
    -
    2834 size_t shape(size_t i) const { return shp[i]; }
    -
    2835 const stride_t &stride() const { return str; }
    -
    2836 const ptrdiff_t &stride(size_t i) const { return str[i]; }
    -
    2837 };
    -
    -
    2838
    -
    -
    2839template<typename T> class cndarr: public arr_info
    -
    2840 {
    -
    2841 protected:
    -
    2842 const char *d;
    -
    2843
    -
    2844 public:
    -
    -
    2845 cndarr(const void *data_, const shape_t &shape_, const stride_t &stride_)
    -
    2846 : arr_info(shape_, stride_),
    - -
    -
    -
    2848 const T &operator[](ptrdiff_t ofs) const
    -
    2849 { return *reinterpret_cast<const T *>(d+ofs); }
    -
    -
    2850 };
    -
    -
    2851
    -
    -
    2852template<typename T> class ndarr: public cndarr<T>
    -
    2853 {
    -
    2854 public:
    -
    -
    2855 ndarr(void *data_, const shape_t &shape_, const stride_t &stride_)
    -
    2856 : cndarr<T>::cndarr(const_cast<const void *>(data_), shape_, stride_)
    -
    2857 {}
    -
    -
    -
    2858 T &operator[](ptrdiff_t ofs)
    -
    2859 { return *reinterpret_cast<T *>(const_cast<char *>(cndarr<T>::d+ofs)); }
    -
    -
    2860 };
    -
    -
    2861
    -
    -
    2862template<size_t N> class multi_iter
    -
    2863 {
    -
    2864 private:
    -
    2865 shape_t pos;
    -
    2866 const arr_info &iarr, &oarr;
    -
    2867 ptrdiff_t p_ii, p_i[N], str_i, p_oi, p_o[N], str_o;
    -
    2868 size_t idim, rem;
    -
    2869
    -
    2870 void advance_i()
    -
    2871 {
    -
    2872 for (int i_=int(pos.size())-1; i_>=0; --i_)
    -
    2873 {
    -
    2874 auto i = size_t(i_);
    -
    2875 if (i==idim) continue;
    -
    2876 p_ii += iarr.stride(i);
    -
    2877 p_oi += oarr.stride(i);
    -
    2878 if (++pos[i] < iarr.shape(i))
    -
    2879 return;
    -
    2880 pos[i] = 0;
    -
    2881 p_ii -= ptrdiff_t(iarr.shape(i))*iarr.stride(i);
    -
    2882 p_oi -= ptrdiff_t(oarr.shape(i))*oarr.stride(i);
    -
    2883 }
    -
    2884 }
    -
    2885
    -
    2886 public:
    -
    - -
    2888 : pos(iarr_.ndim(), 0), iarr(iarr_), oarr(oarr_), p_ii(0),
    -
    2889 str_i(iarr.stride(idim_)), p_oi(0), str_o(oarr.stride(idim_)),
    -
    2890 idim(idim_), rem(iarr.size()/iarr.shape(idim))
    -
    2891 {
    -
    2892 auto nshares = threading::num_threads();
    -
    2893 if (nshares==1) return;
    -
    2894 if (nshares==0) throw std::runtime_error("can't run with zero threads");
    -
    2895 auto myshare = threading::thread_id();
    -
    2896 if (myshare>=nshares) throw std::runtime_error("impossible share requested");
    -
    2897 size_t nbase = rem/nshares;
    -
    2898 size_t additional = rem%nshares;
    -
    2899 size_t lo = myshare*nbase + ((myshare<additional) ? myshare : additional);
    -
    2900 size_t hi = lo+nbase+(myshare<additional);
    -
    2901 size_t todo = hi-lo;
    -
    2902
    -
    2903 size_t chunk = rem;
    -
    2904 for (size_t i=0; i<pos.size(); ++i)
    -
    2905 {
    -
    2906 if (i==idim) continue;
    -
    2907 chunk /= iarr.shape(i);
    -
    2908 size_t n_advance = lo/chunk;
    -
    2909 pos[i] += n_advance;
    -
    2910 p_ii += ptrdiff_t(n_advance)*iarr.stride(i);
    -
    2911 p_oi += ptrdiff_t(n_advance)*oarr.stride(i);
    -
    2912 lo -= n_advance*chunk;
    -
    2913 }
    -
    2914 rem = todo;
    -
    2915 }
    -
    -
    -
    2916 void advance(size_t n)
    -
    2917 {
    -
    2918 if (rem<n) throw std::runtime_error("underrun");
    -
    2919 for (size_t i=0; i<n; ++i)
    -
    2920 {
    -
    2921 p_i[i] = p_ii;
    -
    2922 p_o[i] = p_oi;
    -
    2923 advance_i();
    -
    2924 }
    -
    2925 rem -= n;
    -
    2926 }
    -
    -
    2927 ptrdiff_t iofs(size_t i) const { return p_i[0] + ptrdiff_t(i)*str_i; }
    -
    2928 ptrdiff_t iofs(size_t j, size_t i) const { return p_i[j] + ptrdiff_t(i)*str_i; }
    -
    2929 ptrdiff_t oofs(size_t i) const { return p_o[0] + ptrdiff_t(i)*str_o; }
    -
    2930 ptrdiff_t oofs(size_t j, size_t i) const { return p_o[j] + ptrdiff_t(i)*str_o; }
    -
    2931 size_t length_in() const { return iarr.shape(idim); }
    -
    2932 size_t length_out() const { return oarr.shape(idim); }
    -
    2933 ptrdiff_t stride_in() const { return str_i; }
    -
    2934 ptrdiff_t stride_out() const { return str_o; }
    -
    2935 size_t remaining() const { return rem; }
    -
    2936 };
    -
    -
    2937
    -
    - -
    2939 {
    -
    2940 private:
    -
    2941 shape_t pos;
    -
    2942 const arr_info &arr;
    -
    2943 ptrdiff_t p;
    -
    2944 size_t rem;
    -
    2945
    -
    2946 public:
    -
    - -
    2948 : pos(arr_.ndim(), 0), arr(arr_), p(0), rem(arr_.size()) {}
    -
    -
    -
    2949 void advance()
    -
    2950 {
    -
    2951 --rem;
    -
    2952 for (int i_=int(pos.size())-1; i_>=0; --i_)
    -
    2953 {
    -
    2954 auto i = size_t(i_);
    -
    2955 p += arr.stride(i);
    -
    2956 if (++pos[i] < arr.shape(i))
    -
    2957 return;
    -
    2958 pos[i] = 0;
    -
    2959 p -= ptrdiff_t(arr.shape(i))*arr.stride(i);
    -
    2960 }
    -
    2961 }
    -
    -
    2962 ptrdiff_t ofs() const { return p; }
    -
    2963 size_t remaining() const { return rem; }
    -
    2964 };
    -
    -
    2965
    -
    - -
    2967 {
    -
    2968 private:
    -
    2969 shape_t pos;
    -
    2970 const arr_info &arr;
    -
    2971 std::vector<char> rev_axis;
    -
    2972 std::vector<char> rev_jump;
    -
    2973 size_t last_axis, last_size;
    -
    2974 shape_t shp;
    -
    2975 ptrdiff_t p, rp;
    -
    2976 size_t rem;
    -
    2977
    -
    2978 public:
    -
    - -
    2980 : pos(arr_.ndim(), 0), arr(arr_), rev_axis(arr_.ndim(), 0),
    -
    2981 rev_jump(arr_.ndim(), 1), p(0), rp(0)
    -
    2982 {
    -
    2983 for (auto ax: axes)
    -
    2984 rev_axis[ax]=1;
    -
    2985 last_axis = axes.back();
    -
    2986 last_size = arr.shape(last_axis)/2 + 1;
    -
    2987 shp = arr.shape();
    -
    2988 shp[last_axis] = last_size;
    -
    2989 rem=1;
    -
    2990 for (auto i: shp)
    -
    2991 rem *= i;
    -
    2992 }
    -
    -
    -
    2993 void advance()
    -
    2994 {
    -
    2995 --rem;
    -
    2996 for (int i_=int(pos.size())-1; i_>=0; --i_)
    -
    2997 {
    -
    2998 auto i = size_t(i_);
    -
    2999 p += arr.stride(i);
    -
    3000 if (!rev_axis[i])
    -
    3001 rp += arr.stride(i);
    -
    3002 else
    -
    3003 {
    -
    3004 rp -= arr.stride(i);
    -
    3005 if (rev_jump[i])
    -
    3006 {
    -
    3007 rp += ptrdiff_t(arr.shape(i))*arr.stride(i);
    -
    3008 rev_jump[i] = 0;
    -
    3009 }
    -
    3010 }
    -
    3011 if (++pos[i] < shp[i])
    -
    3012 return;
    -
    3013 pos[i] = 0;
    -
    3014 p -= ptrdiff_t(shp[i])*arr.stride(i);
    -
    3015 if (rev_axis[i])
    -
    3016 {
    -
    3017 rp -= ptrdiff_t(arr.shape(i)-shp[i])*arr.stride(i);
    -
    3018 rev_jump[i] = 1;
    -
    3019 }
    -
    3020 else
    -
    3021 rp -= ptrdiff_t(shp[i])*arr.stride(i);
    -
    3022 }
    -
    3023 }
    -
    -
    3024 ptrdiff_t ofs() const { return p; }
    -
    3025 ptrdiff_t rev_ofs() const { return rp; }
    -
    3026 size_t remaining() const { return rem; }
    -
    3027 };
    -
    -
    3028
    -
    3029template<typename T> struct VTYPE {};
    -
    3030template <typename T> using vtype_t = typename VTYPE<T>::type;
    -
    3031
    -
    3032#ifndef POCKETFFT_NO_VECTORS
    -
    3033template<> struct VTYPE<float>
    -
    3034 {
    -
    3035 using type = float __attribute__ ((vector_size (VLEN<float>::val*sizeof(float))));
    -
    3036 };
    -
    3037template<> struct VTYPE<double>
    -
    3038 {
    -
    3039 using type = double __attribute__ ((vector_size (VLEN<double>::val*sizeof(double))));
    -
    3040 };
    -
    3041template<> struct VTYPE<long double>
    -
    3042 {
    -
    3043 using type = long double __attribute__ ((vector_size (VLEN<long double>::val*sizeof(long double))));
    -
    3044 };
    -
    3045#endif
    -
    3046
    -
    -
    3047template<typename T> arr<char> alloc_tmp(const shape_t &shape,
    -
    3048 size_t axsize, size_t elemsize)
    -
    3049 {
    -
    3050 auto othersize = util::prod(shape)/axsize;
    - -
    3052 return arr<char>(tmpsize*elemsize);
    -
    3053 }
    -
    -
    -
    3054template<typename T> arr<char> alloc_tmp(const shape_t &shape,
    -
    3055 const shape_t &axes, size_t elemsize)
    -
    3056 {
    -
    3057 size_t fullsize=util::prod(shape);
    -
    3058 size_t tmpsize=0;
    -
    3059 for (size_t i=0; i<axes.size(); ++i)
    -
    3060 {
    -
    3061 auto axsize = shape[axes[i]];
    -
    3062 auto othersize = fullsize/axsize;
    -
    3063 auto sz = axsize*((othersize>=VLEN<T>::val) ? VLEN<T>::val : 1);
    -
    3064 if (sz>tmpsize) tmpsize=sz;
    -
    3065 }
    -
    3066 return arr<char>(tmpsize*elemsize);
    -
    3067 }
    -
    -
    3068
    -
    -
    3069template <typename T, size_t vlen> void copy_input(const multi_iter<vlen> &it,
    - -
    3071 {
    -
    3072 for (size_t i=0; i<it.length_in(); ++i)
    -
    3073 for (size_t j=0; j<vlen; ++j)
    -
    3074 {
    -
    3075 dst[i].r[j] = src[it.iofs(j,i)].r;
    -
    3076 dst[i].i[j] = src[it.iofs(j,i)].i;
    -
    3077 }
    -
    3078 }
    -
    -
    3079
    -
    -
    3080template <typename T, size_t vlen> void copy_input(const multi_iter<vlen> &it,
    -
    3081 const cndarr<T> &src, vtype_t<T> *POCKETFFT_RESTRICT dst)
    -
    3082 {
    -
    3083 for (size_t i=0; i<it.length_in(); ++i)
    -
    3084 for (size_t j=0; j<vlen; ++j)
    -
    3085 dst[i][j] = src[it.iofs(j,i)];
    -
    3086 }
    -
    -
    3087
    -
    -
    3088template <typename T, size_t vlen> void copy_input(const multi_iter<vlen> &it,
    -
    3089 const cndarr<T> &src, T *POCKETFFT_RESTRICT dst)
    -
    3090 {
    -
    3091 if (dst == &src[it.iofs(0)]) return; // in-place
    -
    3092 for (size_t i=0; i<it.length_in(); ++i)
    -
    3093 dst[i] = src[it.iofs(i)];
    -
    3094 }
    -
    -
    3095
    -
    -
    3096template<typename T, size_t vlen> void copy_output(const multi_iter<vlen> &it,
    - -
    3098 {
    -
    3099 for (size_t i=0; i<it.length_out(); ++i)
    -
    3100 for (size_t j=0; j<vlen; ++j)
    -
    3101 dst[it.oofs(j,i)].Set(src[i].r[j],src[i].i[j]);
    -
    3102 }
    -
    -
    3103
    -
    -
    3104template<typename T, size_t vlen> void copy_output(const multi_iter<vlen> &it,
    -
    3105 const vtype_t<T> *POCKETFFT_RESTRICT src, ndarr<T> &dst)
    -
    3106 {
    -
    3107 for (size_t i=0; i<it.length_out(); ++i)
    -
    3108 for (size_t j=0; j<vlen; ++j)
    -
    3109 dst[it.oofs(j,i)] = src[i][j];
    -
    3110 }
    -
    -
    3111
    -
    -
    3112template<typename T, size_t vlen> void copy_output(const multi_iter<vlen> &it,
    -
    3113 const T *POCKETFFT_RESTRICT src, ndarr<T> &dst)
    -
    3114 {
    -
    3115 if (src == &dst[it.oofs(0)]) return; // in-place
    -
    3116 for (size_t i=0; i<it.length_out(); ++i)
    -
    3117 dst[it.oofs(i)] = src[i];
    -
    3118 }
    -
    -
    3119
    -
    3120template <typename T> struct add_vec { using type = vtype_t<T>; };
    -
    -
    3121template <typename T> struct add_vec<cmplx<T>>
    -
    3122 { using type = cmplx<vtype_t<T>>; };
    -
    -
    3123template <typename T> using add_vec_t = typename add_vec<T>::type;
    -
    3124
    -
    3125template<typename Tplan, typename T, typename T0, typename Exec>
    -
    - -
    3127 const shape_t &axes, T0 fct, size_t nthreads, const Exec & exec,
    -
    3128 const bool allow_inplace=true)
    -
    3129 {
    -
    3130 std::shared_ptr<Tplan> plan;
    -
    3131
    -
    3132 for (size_t iax=0; iax<axes.size(); ++iax)
    -
    3133 {
    -
    3134 size_t len=in.shape(axes[iax]);
    -
    3135 if ((!plan) || (len!=plan->length()))
    -
    3136 plan = get_plan<Tplan>(len);
    -
    3137
    - - -
    3140 [&] {
    -
    3141 constexpr auto vlen = VLEN<T0>::val;
    -
    3142 auto storage = alloc_tmp<T0>(in.shape(), len, sizeof(T));
    -
    3143 const auto &tin(iax==0? in : out);
    -
    3144 multi_iter<vlen> it(tin, out, axes[iax]);
    -
    3145#ifndef POCKETFFT_NO_VECTORS
    -
    3146 if (vlen>1)
    -
    3147 while (it.remaining()>=vlen)
    -
    3148 {
    -
    3149 it.advance(vlen);
    -
    3150 auto tdatav = reinterpret_cast<add_vec_t<T> *>(storage.data());
    -
    3151 exec(it, tin, out, tdatav, *plan, fct);
    -
    3152 }
    -
    3153#endif
    -
    3154 while (it.remaining()>0)
    -
    3155 {
    -
    3156 it.advance(1);
    -
    3157 auto buf = allow_inplace && it.stride_out() == sizeof(T) ?
    -
    3158 &out[it.oofs(0)] : reinterpret_cast<T *>(storage.data());
    -
    3159 exec(it, tin, out, buf, *plan, fct);
    -
    3160 }
    -
    3161 }); // end of parallel region
    -
    3162 fct = T0(1); // factor has been applied, use 1 for remaining axes
    -
    3163 }
    -
    3164 }
    -
    -
    3165
    -
    - -
    3167 {
    - -
    3169
    -
    -
    3170 template <typename T0, typename T, size_t vlen> void operator () (
    -
    3171 const multi_iter<vlen> &it, const cndarr<cmplx<T0>> &in,
    -
    3172 ndarr<cmplx<T0>> &out, T * buf, const pocketfft_c<T0> &plan, T0 fct) const
    -
    3173 {
    -
    3174 copy_input(it, in, buf);
    -
    3175 plan.exec(buf, fct, forward);
    -
    3176 copy_output(it, buf, out);
    -
    3177 }
    -
    -
    3178 };
    -
    -
    3179
    -
    -
    3180template <typename T, size_t vlen> void copy_hartley(const multi_iter<vlen> &it,
    -
    3181 const vtype_t<T> *POCKETFFT_RESTRICT src, ndarr<T> &dst)
    -
    3182 {
    -
    3183 for (size_t j=0; j<vlen; ++j)
    -
    3184 dst[it.oofs(j,0)] = src[0][j];
    -
    3185 size_t i=1, i1=1, i2=it.length_out()-1;
    -
    3186 for (i=1; i<it.length_out()-1; i+=2, ++i1, --i2)
    -
    3187 for (size_t j=0; j<vlen; ++j)
    -
    3188 {
    -
    3189 dst[it.oofs(j,i1)] = src[i][j]+src[i+1][j];
    -
    3190 dst[it.oofs(j,i2)] = src[i][j]-src[i+1][j];
    -
    3191 }
    -
    3192 if (i<it.length_out())
    -
    3193 for (size_t j=0; j<vlen; ++j)
    -
    3194 dst[it.oofs(j,i1)] = src[i][j];
    -
    3195 }
    -
    -
    3196
    -
    -
    3197template <typename T, size_t vlen> void copy_hartley(const multi_iter<vlen> &it,
    -
    3198 const T *POCKETFFT_RESTRICT src, ndarr<T> &dst)
    -
    3199 {
    -
    3200 dst[it.oofs(0)] = src[0];
    -
    3201 size_t i=1, i1=1, i2=it.length_out()-1;
    -
    3202 for (i=1; i<it.length_out()-1; i+=2, ++i1, --i2)
    -
    3203 {
    -
    3204 dst[it.oofs(i1)] = src[i]+src[i+1];
    -
    3205 dst[it.oofs(i2)] = src[i]-src[i+1];
    -
    3206 }
    -
    3207 if (i<it.length_out())
    -
    3208 dst[it.oofs(i1)] = src[i];
    -
    3209 }
    -
    -
    3210
    -
    - -
    3212 {
    -
    -
    3213 template <typename T0, typename T, size_t vlen> void operator () (
    -
    3214 const multi_iter<vlen> &it, const cndarr<T0> &in, ndarr<T0> &out,
    -
    3215 T * buf, const pocketfft_r<T0> &plan, T0 fct) const
    -
    3216 {
    -
    3217 copy_input(it, in, buf);
    -
    3218 plan.exec(buf, fct, true);
    - -
    3220 }
    -
    -
    3221 };
    -
    -
    3222
    -
    - -
    3224 {
    -
    3225 bool ortho;
    -
    3226 int type;
    - -
    3228
    -
    3229 template <typename T0, typename T, typename Tplan, size_t vlen>
    -
    - -
    3231 ndarr<T0> &out, T * buf, const Tplan &plan, T0 fct) const
    -
    3232 {
    -
    3233 copy_input(it, in, buf);
    -
    3234 plan.exec(buf, fct, ortho, type, cosine);
    -
    3235 copy_output(it, buf, out);
    -
    3236 }
    -
    -
    3237 };
    -
    -
    3238
    -
    -
    3239template<typename T> POCKETFFT_NOINLINE void general_r2c(
    -
    3240 const cndarr<T> &in, ndarr<cmplx<T>> &out, size_t axis, bool forward, T fct,
    -
    3241 size_t nthreads)
    -
    3242 {
    -
    3243 auto plan = get_plan<pocketfft_r<T>>(in.shape(axis));
    -
    3244 size_t len=in.shape(axis);
    - - -
    3247 [&] {
    -
    3248 constexpr auto vlen = VLEN<T>::val;
    -
    3249 auto storage = alloc_tmp<T>(in.shape(), len, sizeof(T));
    -
    3250 multi_iter<vlen> it(in, out, axis);
    -
    3251#ifndef POCKETFFT_NO_VECTORS
    -
    3252 if (vlen>1)
    -
    3253 while (it.remaining()>=vlen)
    -
    3254 {
    -
    3255 it.advance(vlen);
    -
    3256 auto tdatav = reinterpret_cast<vtype_t<T> *>(storage.data());
    -
    3257 copy_input(it, in, tdatav);
    -
    3258 plan->exec(tdatav, fct, true);
    -
    3259 for (size_t j=0; j<vlen; ++j)
    -
    3260 out[it.oofs(j,0)].Set(tdatav[0][j]);
    -
    3261 size_t i=1, ii=1;
    -
    3262 if (forward)
    -
    3263 for (; i<len-1; i+=2, ++ii)
    -
    3264 for (size_t j=0; j<vlen; ++j)
    -
    3265 out[it.oofs(j,ii)].Set(tdatav[i][j], tdatav[i+1][j]);
    -
    3266 else
    -
    3267 for (; i<len-1; i+=2, ++ii)
    -
    3268 for (size_t j=0; j<vlen; ++j)
    -
    3269 out[it.oofs(j,ii)].Set(tdatav[i][j], -tdatav[i+1][j]);
    -
    3270 if (i<len)
    -
    3271 for (size_t j=0; j<vlen; ++j)
    -
    3272 out[it.oofs(j,ii)].Set(tdatav[i][j]);
    -
    3273 }
    -
    3274#endif
    -
    3275 while (it.remaining()>0)
    -
    3276 {
    -
    3277 it.advance(1);
    -
    3278 auto tdata = reinterpret_cast<T *>(storage.data());
    -
    3279 copy_input(it, in, tdata);
    -
    3280 plan->exec(tdata, fct, true);
    -
    3281 out[it.oofs(0)].Set(tdata[0]);
    -
    3282 size_t i=1, ii=1;
    -
    3283 if (forward)
    -
    3284 for (; i<len-1; i+=2, ++ii)
    -
    3285 out[it.oofs(ii)].Set(tdata[i], tdata[i+1]);
    -
    3286 else
    -
    3287 for (; i<len-1; i+=2, ++ii)
    -
    3288 out[it.oofs(ii)].Set(tdata[i], -tdata[i+1]);
    -
    3289 if (i<len)
    -
    3290 out[it.oofs(ii)].Set(tdata[i]);
    -
    3291 }
    -
    3292 }); // end of parallel region
    -
    3293 }
    -
    -
    -
    3294template<typename T> POCKETFFT_NOINLINE void general_c2r(
    -
    3295 const cndarr<cmplx<T>> &in, ndarr<T> &out, size_t axis, bool forward, T fct,
    -
    3296 size_t nthreads)
    -
    3297 {
    -
    3298 auto plan = get_plan<pocketfft_r<T>>(out.shape(axis));
    -
    3299 size_t len=out.shape(axis);
    -
    3300 threading::thread_map(
    -
    3301 util::thread_count(nthreads, in.shape(), axis, VLEN<T>::val),
    -
    3302 [&] {
    -
    3303 constexpr auto vlen = VLEN<T>::val;
    -
    3304 auto storage = alloc_tmp<T>(out.shape(), len, sizeof(T));
    -
    3305 multi_iter<vlen> it(in, out, axis);
    -
    3306#ifndef POCKETFFT_NO_VECTORS
    -
    3307 if (vlen>1)
    -
    3308 while (it.remaining()>=vlen)
    -
    3309 {
    -
    3310 it.advance(vlen);
    -
    3311 auto tdatav = reinterpret_cast<vtype_t<T> *>(storage.data());
    -
    3312 for (size_t j=0; j<vlen; ++j)
    -
    3313 tdatav[0][j]=in[it.iofs(j,0)].r;
    -
    3314 {
    -
    3315 size_t i=1, ii=1;
    -
    3316 if (forward)
    -
    3317 for (; i<len-1; i+=2, ++ii)
    -
    3318 for (size_t j=0; j<vlen; ++j)
    -
    3319 {
    -
    3320 tdatav[i ][j] = in[it.iofs(j,ii)].r;
    -
    3321 tdatav[i+1][j] = -in[it.iofs(j,ii)].i;
    -
    3322 }
    -
    3323 else
    -
    3324 for (; i<len-1; i+=2, ++ii)
    -
    3325 for (size_t j=0; j<vlen; ++j)
    -
    3326 {
    -
    3327 tdatav[i ][j] = in[it.iofs(j,ii)].r;
    -
    3328 tdatav[i+1][j] = in[it.iofs(j,ii)].i;
    -
    3329 }
    -
    3330 if (i<len)
    -
    3331 for (size_t j=0; j<vlen; ++j)
    -
    3332 tdatav[i][j] = in[it.iofs(j,ii)].r;
    -
    3333 }
    -
    3334 plan->exec(tdatav, fct, false);
    -
    3335 copy_output(it, tdatav, out);
    -
    3336 }
    -
    3337#endif
    -
    3338 while (it.remaining()>0)
    -
    3339 {
    -
    3340 it.advance(1);
    -
    3341 auto tdata = reinterpret_cast<T *>(storage.data());
    -
    3342 tdata[0]=in[it.iofs(0)].r;
    -
    3343 {
    -
    3344 size_t i=1, ii=1;
    -
    3345 if (forward)
    -
    3346 for (; i<len-1; i+=2, ++ii)
    -
    3347 {
    -
    3348 tdata[i ] = in[it.iofs(ii)].r;
    -
    3349 tdata[i+1] = -in[it.iofs(ii)].i;
    -
    3350 }
    -
    3351 else
    -
    3352 for (; i<len-1; i+=2, ++ii)
    -
    3353 {
    -
    3354 tdata[i ] = in[it.iofs(ii)].r;
    -
    3355 tdata[i+1] = in[it.iofs(ii)].i;
    -
    3356 }
    -
    3357 if (i<len)
    -
    3358 tdata[i] = in[it.iofs(ii)].r;
    -
    3359 }
    -
    3360 plan->exec(tdata, fct, false);
    - -
    3362 }
    -
    3363 }); // end of parallel region
    -
    3364 }
    -
    -
    3365
    -
    - -
    3367 {
    -
    3368 bool r2h, forward;
    -
    3369
    -
    -
    3370 template <typename T0, typename T, size_t vlen> void operator () (
    -
    3371 const multi_iter<vlen> &it, const cndarr<T0> &in, ndarr<T0> &out, T * buf,
    -
    3372 const pocketfft_r<T0> &plan, T0 fct) const
    -
    3373 {
    -
    3374 copy_input(it, in, buf);
    -
    3375 if ((!r2h) && forward)
    -
    3376 for (size_t i=2; i<it.length_out(); i+=2)
    -
    3377 buf[i] = -buf[i];
    -
    3378 plan.exec(buf, fct, r2h);
    -
    3379 if (r2h && (!forward))
    -
    3380 for (size_t i=2; i<it.length_out(); i+=2)
    -
    3381 buf[i] = -buf[i];
    -
    3382 copy_output(it, buf, out);
    -
    3383 }
    -
    -
    3384 };
    -
    -
    3385
    -
    -
    3386template<typename T> void c2c(const shape_t &shape, const stride_t &stride_in,
    -
    3387 const stride_t &stride_out, const shape_t &axes, bool forward,
    -
    3388 const std::complex<T> *data_in, std::complex<T> *data_out, T fct,
    -
    3389 size_t nthreads=1)
    -
    3390 {
    -
    3391 if (util::prod(shape)==0) return;
    -
    3392 util::sanity_check(shape, stride_in, stride_out, data_in==data_out, axes);
    -
    3393 cndarr<cmplx<T>> ain(data_in, shape, stride_in);
    -
    3394 ndarr<cmplx<T>> aout(data_out, shape, stride_out);
    - -
    3396 }
    -
    -
    3397
    -
    -
    3398template<typename T> void dct(const shape_t &shape,
    -
    3399 const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes,
    -
    3400 int type, const T *data_in, T *data_out, T fct, bool ortho, size_t nthreads=1)
    -
    3401 {
    -
    3402 if ((type<1) || (type>4)) throw std::invalid_argument("invalid DCT type");
    -
    3403 if (util::prod(shape)==0) return;
    -
    3404 util::sanity_check(shape, stride_in, stride_out, data_in==data_out, axes);
    -
    3405 cndarr<T> ain(data_in, shape, stride_in);
    -
    3406 ndarr<T> aout(data_out, shape, stride_out);
    -
    3407 const ExecDcst exec{ortho, type, true};
    -
    3408 if (type==1)
    -
    3409 general_nd<T_dct1<T>>(ain, aout, axes, fct, nthreads, exec);
    -
    3410 else if (type==4)
    -
    3411 general_nd<T_dcst4<T>>(ain, aout, axes, fct, nthreads, exec);
    -
    3412 else
    - -
    3414 }
    -
    -
    3415
    -
    -
    3416template<typename T> void dst(const shape_t &shape,
    -
    3417 const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes,
    -
    3418 int type, const T *data_in, T *data_out, T fct, bool ortho, size_t nthreads=1)
    -
    3419 {
    -
    3420 if ((type<1) || (type>4)) throw std::invalid_argument("invalid DST type");
    -
    3421 if (util::prod(shape)==0) return;
    -
    3422 util::sanity_check(shape, stride_in, stride_out, data_in==data_out, axes);
    -
    3423 cndarr<T> ain(data_in, shape, stride_in);
    -
    3424 ndarr<T> aout(data_out, shape, stride_out);
    -
    3425 const ExecDcst exec{ortho, type, false};
    -
    3426 if (type==1)
    -
    3427 general_nd<T_dst1<T>>(ain, aout, axes, fct, nthreads, exec);
    -
    3428 else if (type==4)
    -
    3429 general_nd<T_dcst4<T>>(ain, aout, axes, fct, nthreads, exec);
    -
    3430 else
    - -
    3432 }
    -
    -
    3433
    -
    -
    3434template<typename T> void r2c(const shape_t &shape_in,
    -
    3435 const stride_t &stride_in, const stride_t &stride_out, size_t axis,
    -
    3436 bool forward, const T *data_in, std::complex<T> *data_out, T fct,
    -
    3437 size_t nthreads=1)
    -
    3438 {
    -
    3439 if (util::prod(shape_in)==0) return;
    -
    3440 util::sanity_check(shape_in, stride_in, stride_out, false, axis);
    -
    3441 cndarr<T> ain(data_in, shape_in, stride_in);
    - -
    3443 shape_out[axis] = shape_in[axis]/2 + 1;
    -
    3444 ndarr<cmplx<T>> aout(data_out, shape_out, stride_out);
    -
    3445 general_r2c(ain, aout, axis, forward, fct, nthreads);
    -
    3446 }
    -
    -
    3447
    -
    -
    3448template<typename T> void r2c(const shape_t &shape_in,
    -
    3449 const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes,
    -
    3450 bool forward, const T *data_in, std::complex<T> *data_out, T fct,
    -
    3451 size_t nthreads=1)
    -
    3452 {
    -
    3453 if (util::prod(shape_in)==0) return;
    -
    3454 util::sanity_check(shape_in, stride_in, stride_out, false, axes);
    -
    3455 r2c(shape_in, stride_in, stride_out, axes.back(), forward, data_in, data_out,
    -
    3456 fct, nthreads);
    -
    3457 if (axes.size()==1) return;
    -
    3458
    - -
    3460 shape_out[axes.back()] = shape_in[axes.back()]/2 + 1;
    -
    3461 auto newaxes = shape_t{axes.begin(), --axes.end()};
    -
    3462 c2c(shape_out, stride_out, stride_out, newaxes, forward, data_out, data_out,
    -
    3463 T(1), nthreads);
    -
    3464 }
    -
    -
    3465
    -
    -
    3466template<typename T> void c2r(const shape_t &shape_out,
    -
    3467 const stride_t &stride_in, const stride_t &stride_out, size_t axis,
    -
    3468 bool forward, const std::complex<T> *data_in, T *data_out, T fct,
    -
    3469 size_t nthreads=1)
    -
    3470 {
    -
    3471 if (util::prod(shape_out)==0) return;
    -
    3472 util::sanity_check(shape_out, stride_in, stride_out, false, axis);
    - -
    3474 shape_in[axis] = shape_out[axis]/2 + 1;
    -
    3475 cndarr<cmplx<T>> ain(data_in, shape_in, stride_in);
    -
    3476 ndarr<T> aout(data_out, shape_out, stride_out);
    -
    3477 general_c2r(ain, aout, axis, forward, fct, nthreads);
    -
    3478 }
    -
    -
    3479
    -
    -
    3480template<typename T> void c2r(const shape_t &shape_out,
    -
    3481 const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes,
    -
    3482 bool forward, const std::complex<T> *data_in, T *data_out, T fct,
    -
    3483 size_t nthreads=1)
    -
    3484 {
    -
    3485 if (util::prod(shape_out)==0) return;
    -
    3486 if (axes.size()==1)
    -
    3487 return c2r(shape_out, stride_in, stride_out, axes[0], forward,
    -
    3488 data_in, data_out, fct, nthreads);
    -
    3489 util::sanity_check(shape_out, stride_in, stride_out, false, axes);
    -
    3490 auto shape_in = shape_out;
    -
    3491 shape_in[axes.back()] = shape_out[axes.back()]/2 + 1;
    -
    3492 auto nval = util::prod(shape_in);
    - -
    3494 stride_inter.back() = sizeof(cmplx<T>);
    -
    3495 for (int i=int(shape_in.size())-2; i>=0; --i)
    -
    3496 stride_inter[size_t(i)] =
    -
    3497 stride_inter[size_t(i+1)]*ptrdiff_t(shape_in[size_t(i+1)]);
    - -
    3499 auto newaxes = shape_t{axes.begin(), --axes.end()};
    -
    3500 c2c(shape_in, stride_in, stride_inter, newaxes, forward, data_in, tmp.data(),
    -
    3501 T(1), nthreads);
    -
    3502 c2r(shape_out, stride_inter, stride_out, axes.back(), forward,
    -
    3503 tmp.data(), data_out, fct, nthreads);
    -
    3504 }
    -
    -
    3505
    -
    -
    3506template<typename T> void r2r_fftpack(const shape_t &shape,
    -
    3507 const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes,
    -
    3508 bool real2hermitian, bool forward, const T *data_in, T *data_out, T fct,
    -
    3509 size_t nthreads=1)
    -
    3510 {
    -
    3511 if (util::prod(shape)==0) return;
    -
    3512 util::sanity_check(shape, stride_in, stride_out, data_in==data_out, axes);
    -
    3513 cndarr<T> ain(data_in, shape, stride_in);
    -
    3514 ndarr<T> aout(data_out, shape, stride_out);
    - -
    3516 ExecR2R{real2hermitian, forward});
    -
    3517 }
    -
    -
    3518
    -
    -
    3519template<typename T> void r2r_separable_hartley(const shape_t &shape,
    -
    3520 const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes,
    -
    3521 const T *data_in, T *data_out, T fct, size_t nthreads=1)
    -
    3522 {
    -
    3523 if (util::prod(shape)==0) return;
    -
    3524 util::sanity_check(shape, stride_in, stride_out, data_in==data_out, axes);
    -
    3525 cndarr<T> ain(data_in, shape, stride_in);
    -
    3526 ndarr<T> aout(data_out, shape, stride_out);
    - -
    3528 false);
    -
    3529 }
    -
    -
    3530
    -
    -
    3531template<typename T> void r2r_genuine_hartley(const shape_t &shape,
    -
    3532 const stride_t &stride_in, const stride_t &stride_out, const shape_t &axes,
    -
    3533 const T *data_in, T *data_out, T fct, size_t nthreads=1)
    -
    3534 {
    -
    3535 if (util::prod(shape)==0) return;
    -
    3536 if (axes.size()==1)
    -
    3537 return r2r_separable_hartley(shape, stride_in, stride_out, axes, data_in,
    -
    3538 data_out, fct, nthreads);
    -
    3539 util::sanity_check(shape, stride_in, stride_out, data_in==data_out, axes);
    -
    3540 shape_t tshp(shape);
    -
    3541 tshp[axes.back()] = tshp[axes.back()]/2+1;
    -
    3542 arr<std::complex<T>> tdata(util::prod(tshp));
    -
    3543 stride_t tstride(shape.size());
    -
    3544 tstride.back()=sizeof(std::complex<T>);
    -
    3545 for (size_t i=tstride.size()-1; i>0; --i)
    -
    3546 tstride[i-1]=tstride[i]*ptrdiff_t(tshp[i]);
    -
    3547 r2c(shape, stride_in, tstride, axes, true, data_in, tdata.data(), fct, nthreads);
    - -
    3549 ndarr<T> aout(data_out, shape, stride_out);
    - - -
    3552 while(iin.remaining()>0)
    -
    3553 {
    -
    3554 auto v = atmp[iin.ofs()];
    -
    3555 aout[iout.ofs()] = v.r+v.i;
    -
    3556 aout[iout.rev_ofs()] = v.r-v.i;
    -
    3557 iin.advance(); iout.advance();
    -
    3558 }
    -
    3559 }
    -
    -
    3560
    -
    3561} // namespace detail
    -
    -
    3562
    -
    3563using detail::FORWARD;
    -
    3564using detail::BACKWARD;
    -
    3565using detail::shape_t;
    -
    3566using detail::stride_t;
    -
    3567using detail::c2c;
    -
    3568using detail::c2r;
    -
    3569using detail::r2c;
    -
    3570using detail::r2r_fftpack;
    -
    3571using detail::r2r_separable_hartley;
    -
    3572using detail::r2r_genuine_hartley;
    -
    3573using detail::dct;
    -
    3574using detail::dst;
    -
    3575
    -
    3576} // namespace pocketfft
    -
    -
    3577
    -
    3578#undef POCKETFFT_NOINLINE
    -
    3579#undef POCKETFFT_RESTRICT
    -
    3580
    -
    3581#endif // POCKETFFT_HDRONLY_H
    -
    MTL::Buffer * buf
    Definition allocator.h:38
    -
    Definition pocketfft.h:2595
    -
    void exec(T c[], T0 fct, bool ortho, int type, bool cosine) const
    Definition pocketfft.h:2609
    -
    size_t length() const
    Definition pocketfft.h:2661
    -
    T_dcst23(size_t length)
    Definition pocketfft.h:2601
    -
    Definition pocketfft.h:2665
    -
    T_dcst4(size_t length)
    Definition pocketfft.h:2673
    -
    size_t length() const
    Definition pocketfft.h:2761
    -
    void exec(T c[], T0 fct, bool, int, bool cosine) const
    Definition pocketfft.h:2687
    -
    Definition pocketfft.h:2539
    -
    void exec(T c[], T0 fct, bool ortho, int, bool) const
    Definition pocketfft.h:2547
    -
    T_dct1(size_t length)
    Definition pocketfft.h:2544
    -
    size_t length() const
    Definition pocketfft.h:2566
    -
    Definition pocketfft.h:2570
    -
    void exec(T c[], T0 fct, bool, int, bool) const
    Definition pocketfft.h:2578
    -
    size_t length() const
    Definition pocketfft.h:2591
    -
    T_dst1(size_t length)
    Definition pocketfft.h:2575
    -
    Definition pocketfft.h:2823
    -
    size_t size() const
    Definition pocketfft.h:2832
    -
    arr_info(const shape_t &shape_, const stride_t &stride_)
    Definition pocketfft.h:2829
    -
    shape_t shp
    Definition pocketfft.h:2825
    -
    const stride_t & stride() const
    Definition pocketfft.h:2835
    -
    stride_t str
    Definition pocketfft.h:2826
    -
    const ptrdiff_t & stride(size_t i) const
    Definition pocketfft.h:2836
    -
    size_t shape(size_t i) const
    Definition pocketfft.h:2834
    -
    size_t ndim() const
    Definition pocketfft.h:2831
    -
    const shape_t & shape() const
    Definition pocketfft.h:2833
    -
    Definition pocketfft.h:181
    -
    arr(size_t n)
    Definition pocketfft.h:209
    -
    arr(arr &&other)
    Definition pocketfft.h:210
    -
    ~arr()
    Definition pocketfft.h:213
    -
    void resize(size_t n)
    Definition pocketfft.h:215
    -
    size_t size() const
    Definition pocketfft.h:229
    -
    arr()
    Definition pocketfft.h:208
    -
    const T & operator[](size_t idx) const
    Definition pocketfft.h:224
    -
    const T * data() const
    Definition pocketfft.h:227
    -
    T & operator[](size_t idx)
    Definition pocketfft.h:223
    -
    T * data()
    Definition pocketfft.h:226
    -
    Definition pocketfft.h:827
    -
    cfftp(size_t length_)
    Definition pocketfft.h:1537
    -
    void exec(T c[], T0 fct, bool fwd) const
    Definition pocketfft.h:1471
    -
    Definition pocketfft.h:2840
    -
    cndarr(const void *data_, const shape_t &shape_, const stride_t &stride_)
    Definition pocketfft.h:2845
    -
    const char * d
    Definition pocketfft.h:2842
    -
    const T & operator[](ptrdiff_t ofs) const
    Definition pocketfft.h:2848
    -
    Definition pocketfft.h:2362
    -
    void exec(cmplx< T > c[], T0 fct, bool fwd) const
    Definition pocketfft.h:2430
    -
    void exec_r(T c[], T0 fct, bool fwd)
    Definition pocketfft.h:2433
    -
    fftblue(size_t length)
    Definition pocketfft.h:2401
    -
    Definition pocketfft.h:2863
    -
    size_t remaining() const
    Definition pocketfft.h:2935
    -
    size_t length_in() const
    Definition pocketfft.h:2931
    -
    void advance(size_t n)
    Definition pocketfft.h:2916
    -
    ptrdiff_t stride_out() const
    Definition pocketfft.h:2934
    -
    ptrdiff_t oofs(size_t j, size_t i) const
    Definition pocketfft.h:2930
    -
    size_t length_out() const
    Definition pocketfft.h:2932
    -
    ptrdiff_t iofs(size_t j, size_t i) const
    Definition pocketfft.h:2928
    -
    multi_iter(const arr_info &iarr_, const arr_info &oarr_, size_t idim_)
    Definition pocketfft.h:2887
    -
    ptrdiff_t oofs(size_t i) const
    Definition pocketfft.h:2929
    -
    ptrdiff_t stride_in() const
    Definition pocketfft.h:2933
    -
    ptrdiff_t iofs(size_t i) const
    Definition pocketfft.h:2927
    -
    Definition pocketfft.h:2853
    -
    T & operator[](ptrdiff_t ofs)
    Definition pocketfft.h:2858
    -
    ndarr(void *data_, const shape_t &shape_, const stride_t &stride_)
    Definition pocketfft.h:2855
    -
    Definition pocketfft.h:2464
    -
    size_t length() const
    Definition pocketfft.h:2493
    -
    void exec(cmplx< T > c[], T0 fct, bool fwd) const
    Definition pocketfft.h:2490
    -
    pocketfft_c(size_t length)
    Definition pocketfft.h:2471
    -
    Definition pocketfft.h:2501
    -
    void exec(T c[], T0 fct, bool fwd) const
    Definition pocketfft.h:2527
    -
    pocketfft_r(size_t length)
    Definition pocketfft.h:2508
    -
    size_t length() const
    Definition pocketfft.h:2530
    -
    Definition pocketfft.h:2967
    -
    size_t remaining() const
    Definition pocketfft.h:3026
    -
    ptrdiff_t ofs() const
    Definition pocketfft.h:3024
    -
    ptrdiff_t rev_ofs() const
    Definition pocketfft.h:3025
    -
    void advance()
    Definition pocketfft.h:2993
    -
    rev_iter(const arr_info &arr_, const shape_t &axes)
    Definition pocketfft.h:2979
    -
    Definition pocketfft.h:1553
    -
    void exec(T c[], T0 fct, bool r2hc) const
    Definition pocketfft.h:2227
    -
    rfftp(size_t length_)
    Definition pocketfft.h:2346
    -
    Definition pocketfft.h:2939
    -
    simple_iter(const arr_info &arr_)
    Definition pocketfft.h:2947
    -
    void advance()
    Definition pocketfft.h:2949
    -
    size_t remaining() const
    Definition pocketfft.h:2963
    -
    ptrdiff_t ofs() const
    Definition pocketfft.h:2962
    -
    Definition pocketfft.h:296
    -
    cmplx< T > operator[](size_t idx) const
    Definition pocketfft.h:356
    -
    sincos_2pibyn(size_t n)
    Definition pocketfft.h:337
    - -
    bool empty() const
    Definition pocketfft.h:597
    -
    bool try_pop(T &val)
    Definition pocketfft.h:584
    -
    void push(T val)
    Definition pocketfft.h:577
    -
    Definition pocketfft.h:543
    -
    void count_down()
    Definition pocketfft.h:552
    -
    latch(size_t n)
    Definition pocketfft.h:550
    -
    bool is_ready()
    Definition pocketfft.h:565
    -
    void wait()
    Definition pocketfft.h:560
    - -
    void shutdown()
    Definition pocketfft.h:753
    -
    thread_pool(size_t nthreads)
    Definition pocketfft.h:720
    -
    void restart()
    Definition pocketfft.h:759
    -
    ~thread_pool()
    Definition pocketfft.h:726
    -
    void submit(std::function< void()> work)
    Definition pocketfft.h:728
    -
    thread_pool()
    Definition pocketfft.h:724
    -
    void free(Buffer buffer)
    -
    static const size_t max_threads
    Definition pocketfft.h:540
    -
    void thread_map(size_t nthreads, Func f)
    Map a function f over nthreads.
    Definition pocketfft.h:786
    -
    thread_pool & get_pool()
    Definition pocketfft.h:766
    -
    size_t & thread_id()
    Definition pocketfft.h:530
    -
    size_t & num_threads()
    Definition pocketfft.h:535
    -
    void general_r2c(const cndarr< T > &in, ndarr< cmplx< T > > &out, size_t axis, bool forward, T fct, size_t nthreads)
    Definition pocketfft.h:3239
    -
    T sin(T)=delete
    -
    void copy_output(const multi_iter< vlen > &it, const cmplx< vtype_t< T > > *src, ndarr< cmplx< T > > &dst)
    Definition pocketfft.h:3096
    -
    typename VTYPE< T >::type vtype_t
    Definition pocketfft.h:3030
    -
    typename add_vec< T >::type add_vec_t
    Definition pocketfft.h:3123
    -
    T cos(T)=delete
    -
    arr< char > alloc_tmp(const shape_t &shape, size_t axsize, size_t elemsize)
    Definition pocketfft.h:3047
    -
    cmplx< T > conj(const cmplx< T > &a)
    Definition pocketfft.h:279
    -
    T sqrt(T)=delete
    -
    std::vector< size_t > shape_t
    Definition pocketfft.h:102
    -
    void PM(T &a, T &b, T c, T d)
    Definition pocketfft.h:273
    -
    void special_mul(const cmplx< T > &v1, const cmplx< T2 > &v2, cmplx< T > &res)
    Definition pocketfft.h:281
    -
    void ROT90(cmplx< T > &a)
    Definition pocketfft.h:287
    -
    void PMINPLACE(T &a, T &b)
    Definition pocketfft.h:275
    -
    std::shared_ptr< T > get_plan(size_t length)
    Definition pocketfft.h:2769
    -
    void general_nd(const cndarr< T > &in, ndarr< T > &out, const shape_t &axes, T0 fct, size_t nthreads, const Exec &exec, const bool allow_inplace=true)
    Definition pocketfft.h:3126
    -
    void ROTX90(cmplx< T > &a)
    Definition pocketfft.h:289
    -
    void copy_hartley(const multi_iter< vlen > &it, const vtype_t< T > *src, ndarr< T > &dst)
    Definition pocketfft.h:3180
    -
    void general_c2r(const cndarr< cmplx< T > > &in, ndarr< T > &out, size_t axis, bool forward, T fct, size_t nthreads)
    Definition pocketfft.h:3294
    -
    void * aligned_alloc(size_t align, size_t size)
    Definition pocketfft.h:166
    -
    void aligned_dealloc(void *ptr)
    Definition pocketfft.h:176
    -
    void MPINPLACE(T &a, T &b)
    Definition pocketfft.h:277
    -
    std::vector< ptrdiff_t > stride_t
    Definition pocketfft.h:103
    -
    void copy_input(const multi_iter< vlen > &it, const cndarr< cmplx< T > > &src, cmplx< vtype_t< T > > *dst)
    Definition pocketfft.h:3069
    -
    Definition pocketfft.h:91
    -
    #define POCKETFFT_PARTSTEP5a(u1, u2, twar, twbr, twai, twbi)
    Definition pocketfft.h:982
    -
    #define POCKETFFT_PARTSTEP11(u1, u2, x1, x2, x3, x4, x5, y1, y2, y3, y4, y5)
    Definition pocketfft.h:1245
    -
    #define POCKETFFT_PARTSTEP7a(u1, u2, x1, x2, x3, y1, y2, y3)
    Definition pocketfft.h:1063
    -
    #define POCKETFFT_PARTSTEP3b(u1, u2, twr, twi)
    Definition pocketfft.h:882
    -
    #define POCKETFFT_PREP11(idx)
    Definition pocketfft.h:1225
    -
    #define POCKETFFT_NOINLINE
    Definition pocketfft.h:87
    -
    #define POCKETFFT_PREP5(idx)
    Definition pocketfft.h:975
    -
    #define POCKETFFT_CACHE_SIZE
    Definition pocketfft.h:51
    -
    #define POCKETFFT_PARTSTEP5b(u1, u2, twar, twbr, twai, twbi)
    Definition pocketfft.h:992
    -
    #define POCKETFFT_RESTRICT
    Definition pocketfft.h:88
    -
    #define POCKETFFT_PARTSTEP3a(u1, u2, twr, twi)
    Definition pocketfft.h:876
    -
    #define POCKETFFT_PARTSTEP11a(u1, u2, x1, x2, x3, x4, x5, y1, y2, y3, y4, y5)
    Definition pocketfft.h:1243
    -
    #define POCKETFFT_REARRANGE(rx, ix, ry, iy)
    Definition pocketfft.h:1604
    -
    #define POCKETFFT_PREP3(idx)
    Definition pocketfft.h:872
    -
    #define POCKETFFT_PREP7(idx)
    Definition pocketfft.h:1046
    -
    #define POCKETFFT_PARTSTEP7(u1, u2, x1, x2, x3, y1, y2, y3)
    Definition pocketfft.h:1065
    -
    Definition pocketfft.h:3167
    -
    void operator()(const multi_iter< vlen > &it, const cndarr< cmplx< T0 > > &in, ndarr< cmplx< T0 > > &out, T *buf, const pocketfft_c< T0 > &plan, T0 fct) const
    Definition pocketfft.h:3170
    -
    bool forward
    Definition pocketfft.h:3168
    -
    Definition pocketfft.h:3224
    -
    bool cosine
    Definition pocketfft.h:3227
    -
    void operator()(const multi_iter< vlen > &it, const cndarr< T0 > &in, ndarr< T0 > &out, T *buf, const Tplan &plan, T0 fct) const
    Definition pocketfft.h:3230
    -
    int type
    Definition pocketfft.h:3226
    -
    bool ortho
    Definition pocketfft.h:3225
    -
    Definition pocketfft.h:3212
    -
    void operator()(const multi_iter< vlen > &it, const cndarr< T0 > &in, ndarr< T0 > &out, T *buf, const pocketfft_r< T0 > &plan, T0 fct) const
    Definition pocketfft.h:3213
    -
    Definition pocketfft.h:3367
    -
    bool forward
    Definition pocketfft.h:3368
    -
    Definition pocketfft.h:129
    -
    static constexpr size_t val
    Definition pocketfft.h:129
    -
    Definition pocketfft.h:3029
    -
    Definition pocketfft.h:3120
    -
    Definition pocketfft.h:232
    -
    cmplx(T r_, T i_)
    Definition pocketfft.h:235
    -
    cmplx & operator-=(const cmplx< T2 > &other)
    Definition pocketfft.h:251
    -
    auto operator*(const T2 &other) const -> cmplx< decltype(r *other)>
    Definition pocketfft.h:253
    -
    auto special_mul(const cmplx< T2 > &other) const -> cmplx< decltype(r+other.r)>
    Definition pocketfft.h:265
    -
    T i
    Definition pocketfft.h:233
    -
    void Set(T r_)
    Definition pocketfft.h:237
    -
    auto operator-(const cmplx< T2 > &other) const -> cmplx< decltype(r+other.r)>
    Definition pocketfft.h:259
    -
    cmplx()
    Definition pocketfft.h:234
    -
    void Set(T r_, T i_)
    Definition pocketfft.h:236
    -
    cmplx & operator*=(T2 other)
    Definition pocketfft.h:240
    -
    auto operator+(const cmplx< T2 > &other) const -> cmplx< decltype(r+other.r)>
    Definition pocketfft.h:256
    -
    cmplx & operator+=(const cmplx &other)
    Definition pocketfft.h:238
    -
    T r
    Definition pocketfft.h:233
    - - -
    void deallocate(T *p, size_t)
    Definition pocketfft.h:614
    -
    T * allocate(size_t n)
    Definition pocketfft.h:608
    -
    aligned_allocator(const aligned_allocator< U > &)
    Definition pocketfft.h:605
    -
    Definition pocketfft.h:370
    -
    static size_t largest_prime_factor(size_t n)
    Definition pocketfft.h:371
    -
    static size_t good_size_real(size_t n)
    Definition pocketfft.h:430
    -
    static void sanity_check(const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, bool inplace, const shape_t &axes)
    Definition pocketfft.h:475
    -
    static size_t prod(const shape_t &shape)
    Definition pocketfft.h:456
    -
    static size_t thread_count(size_t nthreads, const shape_t &shape, size_t axis, size_t vlen)
    Definition pocketfft.h:502
    -
    static void sanity_check(const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, bool inplace)
    Definition pocketfft.h:464
    -
    static void sanity_check(const shape_t &shape, const stride_t &stride_in, const stride_t &stride_out, bool inplace, size_t axis)
    Definition pocketfft.h:489
    -
    static size_t good_size_cmplx(size_t n)
    Definition pocketfft.h:401
    -
    static double cost_guess(size_t n)
    Definition pocketfft.h:383
    -
    float f
    Definition bf16.h:16
    -
    - - - - diff --git a/docs/build/html/primitives_8h.html b/docs/build/html/primitives_8h.html deleted file mode 100644 index f0bd5d9ac..000000000 --- a/docs/build/html/primitives_8h.html +++ /dev/null @@ -1,421 +0,0 @@ - - - - - - - -MLX: mlx/primitives.h File Reference - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    - -
    primitives.h File Reference
    -
    -
    -
    #include <unordered_set>
    -#include "mlx/array.h"
    -#include "mlx/device.h"
    -#include "mlx/io/load.h"
    -#include "mlx/stream.h"
    -
    -

    Go to the source code of this file.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Classes

    class  mlx::core::Primitive
     
    class  mlx::core::UnaryPrimitive
     
    class  mlx::core::Abs
     
    class  mlx::core::Add
     
    class  mlx::core::AddMM
     
    class  mlx::core::Arange
     
    class  mlx::core::ArcCos
     
    class  mlx::core::ArcCosh
     
    class  mlx::core::ArcSin
     
    class  mlx::core::ArcSinh
     
    class  mlx::core::ArcTan
     
    class  mlx::core::ArcTan2
     
    class  mlx::core::ArcTanh
     
    class  mlx::core::ArgPartition
     
    class  mlx::core::ArgReduce
     
    class  mlx::core::ArgSort
     
    class  mlx::core::AsType
     
    class  mlx::core::AsStrided
     
    class  mlx::core::BitwiseBinary
     
    class  mlx::core::BlockMaskedMM
     
    class  mlx::core::BlockSparseMM
     
    class  mlx::core::Broadcast
     
    class  mlx::core::Ceil
     
    class  mlx::core::Compiled
     
    class  mlx::core::Concatenate
     
    class  mlx::core::Conjugate
     
    class  mlx::core::Convolution
     
    class  mlx::core::Copy
     
    class  mlx::core::Cos
     
    class  mlx::core::Cosh
     
    class  mlx::core::CustomVJP
     
    class  mlx::core::Depends
     
    class  mlx::core::Divide
     
    class  mlx::core::DivMod
     
    class  mlx::core::Select
     
    class  mlx::core::Remainder
     
    class  mlx::core::Equal
     
    class  mlx::core::Erf
     
    class  mlx::core::ErfInv
     
    class  mlx::core::Exp
     
    class  mlx::core::Expm1
     
    class  mlx::core::FFT
     
    class  mlx::core::Floor
     
    class  mlx::core::Full
     
    class  mlx::core::Gather
     
    class  mlx::core::Greater
     
    class  mlx::core::GreaterEqual
     
    class  mlx::core::Less
     
    class  mlx::core::LessEqual
     
    class  mlx::core::Load
     
    class  mlx::core::Log
     
    class  mlx::core::Log1p
     
    class  mlx::core::LogicalNot
     
    class  mlx::core::LogicalAnd
     
    class  mlx::core::LogicalOr
     
    class  mlx::core::LogAddExp
     
    class  mlx::core::Matmul
     
    class  mlx::core::Maximum
     
    class  mlx::core::Minimum
     
    class  mlx::core::Multiply
     
    class  mlx::core::Negative
     
    class  mlx::core::NotEqual
     
    class  mlx::core::NumberOfElements
     
    class  mlx::core::Pad
     
    class  mlx::core::Partition
     
    class  mlx::core::Power
     
    class  mlx::core::QuantizedMatmul
     
    class  mlx::core::BlockSparseQMM
     
    class  mlx::core::RandomBits
     
    class  mlx::core::Reshape
     
    class  mlx::core::Reduce
     
    class  mlx::core::Round
     
    class  mlx::core::Scan
     
    class  mlx::core::Scatter
     
    class  mlx::core::Sigmoid
     
    class  mlx::core::Sign
     
    class  mlx::core::Sin
     
    class  mlx::core::Sinh
     
    class  mlx::core::Slice
     
    class  mlx::core::SliceUpdate
     
    class  mlx::core::Softmax
     
    class  mlx::core::Sort
     
    class  mlx::core::Split
     
    class  mlx::core::Square
     
    class  mlx::core::Sqrt
     
    class  mlx::core::StopGradient
     
    class  mlx::core::Subtract
     
    class  mlx::core::Tan
     
    class  mlx::core::Tanh
     
    class  mlx::core::Uniform
     
    class  mlx::core::Transpose
     
    class  mlx::core::QRF
     
    class  mlx::core::SVD
     
    class  mlx::core::Inverse
     
    class  mlx::core::Cholesky
     
    - - - - - -

    -Namespaces

    namespace  mlx
     
    namespace  mlx::core
     
    - - - - - - - - - - - -

    -Macros

    #define DEFINE_VMAP()
     
    #define DEFINE_GRADS()
     
    #define DEFINE_PRINT(PRIMITIVE)
     
    #define DEFINE_DEFAULT_IS_EQUIVALENT()
     
    #define DEFINE_INPUT_OUTPUT_SHAPE()
     
    -

    Macro Definition Documentation

    - -

    ◆ DEFINE_DEFAULT_IS_EQUIVALENT

    - -
    -
    - - - - - - - -
    #define DEFINE_DEFAULT_IS_EQUIVALENT()
    -
    -Value:
    bool is_equivalent(const Primitive& other) const override { \
    -
    return true; \
    -
    }
    -
    -
    -
    - -

    ◆ DEFINE_GRADS

    - -
    -
    - - - - - - - -
    #define DEFINE_GRADS()
    -
    -Value:
    std::vector<array> jvp( \
    -
    const std::vector<array>& primals, \
    -
    const std::vector<array>& tangents, \
    -
    const std::vector<int>& argnums) override; \
    -
    \
    -
    std::vector<array> vjp( \
    -
    const std::vector<array>& primals, \
    -
    const std::vector<array>& cotangents, \
    -
    const std::vector<int>& argnums, \
    -
    const std::vector<array>& outputs) override;
    -
    -
    -
    - -

    ◆ DEFINE_INPUT_OUTPUT_SHAPE

    - -
    -
    - - - - - - - -
    #define DEFINE_INPUT_OUTPUT_SHAPE()
    -
    -Value:
    std::vector<std::vector<int>> output_shapes( \
    -
    const std::vector<array>& inputs) override { \
    -
    return {inputs[0].shape()}; \
    -
    };
    -
    -
    -
    - -

    ◆ DEFINE_PRINT

    - -
    -
    - - - - - - - -
    #define DEFINE_PRINT( PRIMITIVE)
    -
    -Value:
    void print(std::ostream& os) override { \
    -
    os << #PRIMITIVE; \
    -
    }
    -
    -
    -
    - -

    ◆ DEFINE_VMAP

    - -
    -
    - - - - - - - -
    #define DEFINE_VMAP()
    -
    -Value:
    virtual std::pair<std::vector<array>, std::vector<int>> vmap( \
    -
    const std::vector<array>& inputs, const std::vector<int>& axes) \
    -
    override;
    -
    -
    -
    -
    - - - - diff --git a/docs/build/html/primitives_8h_source.html b/docs/build/html/primitives_8h_source.html deleted file mode 100644 index 5a092f3c8..000000000 --- a/docs/build/html/primitives_8h_source.html +++ /dev/null @@ -1,2932 +0,0 @@ - - - - - - - -MLX: mlx/primitives.h Source File - - - - - - - - - - - -
    -
    - - - - - - -
    -
    MLX -
    -
    -
    - - - - - - - - - -
    -
    - - -
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    -
    - - -
    -
    -
    primitives.h
    -
    -
    -Go to the documentation of this file.
    1// Copyright © 2023-2024 Apple Inc.
    -
    2
    -
    3#pragma once
    -
    4
    -
    5#include <unordered_set>
    -
    6
    -
    7#include "mlx/array.h"
    -
    8#include "mlx/device.h"
    -
    9#include "mlx/io/load.h"
    -
    10#include "mlx/stream.h"
    -
    11
    -
    -
    12#define DEFINE_VMAP() \
    -
    13 virtual std::pair<std::vector<array>, std::vector<int>> vmap( \
    -
    14 const std::vector<array>& inputs, const std::vector<int>& axes) \
    -
    15 override;
    -
    -
    16
    -
    -
    17#define DEFINE_GRADS() \
    -
    18 std::vector<array> jvp( \
    -
    19 const std::vector<array>& primals, \
    -
    20 const std::vector<array>& tangents, \
    -
    21 const std::vector<int>& argnums) override; \
    -
    22 \
    -
    23 std::vector<array> vjp( \
    -
    24 const std::vector<array>& primals, \
    -
    25 const std::vector<array>& cotangents, \
    -
    26 const std::vector<int>& argnums, \
    -
    27 const std::vector<array>& outputs) override;
    -
    -
    28
    -
    -
    29#define DEFINE_PRINT(PRIMITIVE) \
    -
    30 void print(std::ostream& os) override { \
    -
    31 os << #PRIMITIVE; \
    -
    32 }
    -
    -
    33
    -
    -
    34#define DEFINE_DEFAULT_IS_EQUIVALENT() \
    -
    35 bool is_equivalent(const Primitive& other) const override { \
    -
    36 return true; \
    -
    37 }
    -
    -
    38
    -
    -
    39#define DEFINE_INPUT_OUTPUT_SHAPE() \
    -
    40 std::vector<std::vector<int>> output_shapes( \
    -
    41 const std::vector<array>& inputs) override { \
    -
    42 return {inputs[0].shape()}; \
    -
    43 };
    -
    -
    44
    -
    45namespace mlx::core {
    -
    46
    -
    47// Abstract base class
    -
    -
    48class Primitive {
    -
    49 public:
    -
    50 explicit Primitive(Stream stream) : stream_(stream) {}
    -
    51
    -
    -
    53 const Device& device() {
    -
    54 return stream().device;
    -
    55 }
    -
    -
    56
    -
    -
    58 const Stream& stream() {
    -
    59 return stream_;
    -
    60 }
    -
    -
    61
    -
    69 virtual void eval_cpu(
    -
    70 const std::vector<array>& inputs,
    -
    71 std::vector<array>& outputs) = 0;
    -
    72 virtual void eval_gpu(
    -
    73 const std::vector<array>& inputs,
    -
    74 std::vector<array>& outputs) = 0;
    -
    75
    -
    79 virtual std::vector<array> jvp(
    -
    80 const std::vector<array>& primals,
    -
    81 const std::vector<array>& tangents,
    -
    82 const std::vector<int>& argnums);
    -
    83
    -
    87 virtual std::vector<array> vjp(
    -
    88 const std::vector<array>& primals,
    -
    89 const std::vector<array>& cotangents,
    -
    90 const std::vector<int>& argnums,
    -
    91 const std::vector<array>& outputs);
    -
    92
    -
    99 virtual std::pair<std::vector<array>, std::vector<int>> vmap(
    -
    100 const std::vector<array>& inputs,
    -
    101 const std::vector<int>& axes);
    -
    102
    -
    104 virtual void print(std::ostream& os) = 0;
    -
    105
    -
    -
    107 virtual bool is_equivalent(const Primitive& other) const {
    -
    108 return false;
    -
    109 }
    -
    -
    110
    -
    113 virtual std::vector<std::vector<int>> output_shapes(
    -
    114 const std::vector<array>& inputs);
    -
    115
    -
    116 virtual ~Primitive() = default;
    -
    117 Primitive(const Primitive& other) = delete;
    -
    118 Primitive(Primitive&& other) = delete;
    -
    119 Primitive& operator=(const Primitive& other) = delete;
    -
    120 Primitive& operator=(Primitive&& other) = delete;
    -
    121
    -
    122 private:
    -
    123 // Every primitive stores the stream it should run in
    -
    124 Stream stream_;
    -
    125};
    -
    -
    126
    -
    -
    127class UnaryPrimitive : public Primitive {
    -
    131 public:
    - -
    133
    -
    134 virtual void eval_cpu(const std::vector<array>& inputs, array& output) = 0;
    -
    135 virtual void eval_gpu(const std::vector<array>& inputs, array& output) = 0;
    -
    136
    -
    -
    137 inline void eval_cpu(
    -
    138 const std::vector<array>& inputs,
    -
    139 std::vector<array>& outputs) override {
    -
    140 eval_cpu(inputs, outputs[0]);
    -
    141 }
    -
    -
    -
    142 inline void eval_gpu(
    -
    143 const std::vector<array>& inputs,
    -
    144 std::vector<array>& outputs) override {
    -
    145 eval_gpu(inputs, outputs[0]);
    -
    146 }
    -
    -
    147
    -
    148 virtual ~UnaryPrimitive() = default;
    -
    149 UnaryPrimitive(const UnaryPrimitive& other) = delete;
    - -
    151 UnaryPrimitive& operator=(const UnaryPrimitive& other) = delete;
    - -
    153};
    -
    -
    154
    -
    -
    155class Abs : public UnaryPrimitive {
    -
    156 public:
    - -
    158
    -
    159 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    160 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    161
    - - - - - -
    167
    -
    168 private:
    -
    169 void eval(const std::vector<array>& inputs, array& out);
    -
    170};
    -
    -
    171
    -
    -
    172class Add : public UnaryPrimitive {
    -
    173 public:
    - -
    175
    -
    176 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    177 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    178
    - - - - - -
    184
    -
    185 private:
    -
    186 void eval(const std::vector<array>& inputs, array& out);
    -
    187};
    -
    -
    188
    -
    -
    189class AddMM : public UnaryPrimitive {
    -
    190 public:
    -
    -
    191 explicit AddMM(Stream stream, float alpha, float beta)
    -
    192 : UnaryPrimitive(stream), alpha_(alpha), beta_(beta) {};
    -
    -
    193
    -
    194 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    195 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    196
    -
    197 std::vector<array> vjp(
    -
    198 const std::vector<array>& primals,
    -
    199 const std::vector<array>& cotangents,
    -
    200 const std::vector<int>& argnums,
    -
    201 const std::vector<array>& outputs) override;
    -
    202
    - - -
    205
    -
    206 bool is_equivalent(const Primitive& other) const override;
    -
    207
    -
    208 private:
    -
    209 const float alpha_;
    -
    210 const float beta_;
    -
    211};
    -
    -
    212
    -
    -
    213class Arange : public UnaryPrimitive {
    -
    214 public:
    -
    -
    215 explicit Arange(Stream stream, double start, double stop, double step)
    -
    216 : UnaryPrimitive(stream), start_(start), stop_(stop), step_(step) {};
    -
    -
    217
    -
    218 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    219 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    220
    - -
    222 bool is_equivalent(const Primitive& other) const override;
    -
    223
    -
    224 private:
    -
    225 double start_;
    -
    226 double stop_;
    -
    227 double step_;
    -
    228
    -
    229 void eval(const std::vector<array>& inputs, array& out);
    -
    230};
    -
    -
    231
    -
    -
    232class ArcCos : public UnaryPrimitive {
    -
    233 public:
    - -
    235
    -
    236 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    237 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    238
    - - - - - -
    244
    -
    245 private:
    -
    246 void eval(const std::vector<array>& inputs, array& out);
    -
    247};
    -
    -
    248
    -
    -
    249class ArcCosh : public UnaryPrimitive {
    -
    250 public:
    - -
    252
    -
    253 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    254 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    255
    - - - - - -
    261
    -
    262 private:
    -
    263 void eval(const std::vector<array>& inputs, array& out);
    -
    264};
    -
    -
    265
    -
    -
    266class ArcSin : public UnaryPrimitive {
    -
    267 public:
    - -
    269
    -
    270 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    271 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    272
    - - - - - -
    278
    -
    279 private:
    -
    280 void eval(const std::vector<array>& inputs, array& out);
    -
    281};
    -
    -
    282
    -
    -
    283class ArcSinh : public UnaryPrimitive {
    -
    284 public:
    - -
    286
    -
    287 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    288 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    289
    - - - - - -
    295
    -
    296 private:
    -
    297 void eval(const std::vector<array>& inputs, array& out);
    -
    298};
    -
    -
    299
    -
    -
    300class ArcTan : public UnaryPrimitive {
    -
    301 public:
    - -
    303
    -
    304 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    305 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    306
    - - - - - -
    312
    -
    313 private:
    -
    314 void eval(const std::vector<array>& inputs, array& out);
    -
    315};
    -
    -
    316
    -
    -
    317class ArcTan2 : public UnaryPrimitive {
    -
    318 public:
    - -
    320
    -
    321 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    322 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    323
    - - - - - -
    329
    -
    330 private:
    -
    331 void eval(const std::vector<array>& inputs, array& out);
    -
    332};
    -
    -
    333
    -
    -
    334class ArcTanh : public UnaryPrimitive {
    -
    335 public:
    - -
    337
    -
    338 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    339 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    340
    - - - - - -
    346
    -
    347 private:
    -
    348 void eval(const std::vector<array>& inputs, array& out);
    -
    349};
    -
    -
    350
    -
    - -
    352 public:
    -
    -
    353 explicit ArgPartition(Stream stream, int kth, int axis)
    -
    354 : UnaryPrimitive(stream), kth_(kth), axis_(axis) {};
    -
    -
    355
    -
    356 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    357 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    358
    - - - -
    362 bool is_equivalent(const Primitive& other) const override;
    -
    363
    -
    364 private:
    -
    365 int kth_;
    -
    366 int axis_;
    -
    367
    -
    368 void eval(const std::vector<array>& inputs, array& out);
    -
    369};
    -
    -
    370
    -
    -
    371class ArgReduce : public UnaryPrimitive {
    -
    372 public:
    -
    - - - -
    376 };
    -
    -
    377
    -
    -
    378 explicit ArgReduce(Stream stream, ReduceType reduce_type, int axis)
    -
    379 : UnaryPrimitive(stream), reduce_type_(reduce_type), axis_(axis) {};
    -
    -
    380
    -
    381 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    382 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    383
    - - -
    386 bool is_equivalent(const Primitive& other) const override;
    -
    387 std::vector<std::vector<int>> output_shapes(
    -
    388 const std::vector<array>& inputs) override;
    -
    389
    -
    390 private:
    -
    391 ReduceType reduce_type_;
    -
    392 int axis_;
    -
    393
    -
    394 void eval(const std::vector<array>& inputs, array& out);
    -
    395};
    -
    -
    396
    -
    -
    397class ArgSort : public UnaryPrimitive {
    -
    398 public:
    -
    -
    399 explicit ArgSort(Stream stream, int axis)
    -
    400 : UnaryPrimitive(stream), axis_(axis) {};
    -
    -
    401
    -
    402 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    403 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    404
    - - - -
    408 bool is_equivalent(const Primitive& other) const override;
    -
    409
    -
    410 private:
    -
    411 int axis_;
    -
    412
    -
    413 void eval(const std::vector<array>& inputs, array& out);
    -
    414};
    -
    -
    415
    -
    -
    416class AsType : public UnaryPrimitive {
    -
    417 public:
    -
    -
    418 explicit AsType(Stream stream, Dtype dtype)
    -
    419 : UnaryPrimitive(stream), dtype_(dtype) {};
    -
    -
    420
    -
    421 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    422 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    423
    - - - - -
    428 bool is_equivalent(const Primitive& other) const override;
    -
    429
    -
    430 private:
    -
    431 Dtype dtype_;
    -
    432
    -
    433 void eval(const std::vector<array>& inputs, array& out);
    -
    434};
    -
    -
    435
    -
    -
    436class AsStrided : public UnaryPrimitive {
    -
    437 public:
    -
    -
    438 explicit AsStrided(
    - -
    440 std::vector<int> shape,
    -
    441 std::vector<size_t> strides,
    -
    442 size_t offset)
    - -
    444 shape_(std::move(shape)),
    -
    445 strides_(std::move(strides)),
    -
    446 offset_(offset) {};
    -
    -
    447
    -
    448 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    449 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    450
    - - -
    453 bool is_equivalent(const Primitive& other) const override;
    -
    454
    -
    455 private:
    -
    456 std::vector<int> shape_;
    -
    457 std::vector<size_t> strides_;
    -
    458 size_t offset_;
    -
    459
    -
    460 void eval(const std::vector<array>& inputs, array& out);
    -
    461};
    -
    -
    462
    -
    - -
    464 public:
    -
    465 enum Op { And, Or, Xor, LeftShift, RightShift };
    -
    466
    -
    - -
    468 : UnaryPrimitive(stream), op_(op) {};
    -
    -
    469
    -
    470 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    471 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    472
    - -
    474 bool is_equivalent(const Primitive& other) const override;
    -
    475 void print(std::ostream& os) override;
    - -
    477
    -
    478 private:
    -
    479 Op op_;
    -
    480};
    -
    -
    481
    -
    - -
    483 public:
    -
    -
    484 explicit BlockMaskedMM(Stream stream, int block_size)
    -
    485 : UnaryPrimitive(stream), block_size_(block_size) {};
    -
    -
    486
    -
    487 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    488 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    489
    -
    490 std::vector<array> vjp(
    -
    491 const std::vector<array>& primals,
    -
    492 const std::vector<array>& cotangents,
    -
    493 const std::vector<int>& argnums,
    -
    494 const std::vector<array>& outputs) override;
    -
    495
    - -
    497 bool is_equivalent(const Primitive& other) const override;
    -
    498
    -
    499 private:
    -
    500 int block_size_;
    -
    501
    -
    502 void eval(const std::vector<array>& inputs, array& out);
    -
    503};
    -
    -
    504
    -
    - -
    506 public:
    - -
    508
    -
    509 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    510 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    511
    -
    512 std::vector<array> vjp(
    -
    513 const std::vector<array>& primals,
    -
    514 const std::vector<array>& cotangents,
    -
    515 const std::vector<int>& argnums,
    -
    516 const std::vector<array>& outputs) override;
    -
    517
    - - -
    520
    -
    521 private:
    -
    522 void eval(const std::vector<array>& inputs, array& out);
    -
    523};
    -
    -
    524
    -
    -
    525class Broadcast : public UnaryPrimitive {
    -
    526 public:
    -
    -
    527 explicit Broadcast(Stream stream, const std::vector<int>& shape)
    -
    528 : UnaryPrimitive(stream), shape_(shape) {};
    -
    -
    529
    -
    530 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    531 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    532
    - - - -
    536 bool is_equivalent(const Primitive& other) const override;
    -
    537
    -
    538 private:
    -
    539 std::vector<int> shape_;
    -
    540
    -
    541 void eval(const std::vector<array>& inputs, array& out);
    -
    542};
    -
    -
    543
    -
    -
    544class Ceil : public UnaryPrimitive {
    -
    545 public:
    - -
    547
    -
    548 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    549 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    550
    - - - - - -
    556
    -
    557 private:
    -
    558 void eval(const std::vector<array>& inputs, array& out);
    -
    559};
    -
    -
    560
    -
    -
    561class Compiled : public Primitive {
    -
    562 public:
    -
    563 /*
    -
    564 * The inputs, outputs and tape are either tracers or constants.
    -
    565 * - The tape should not contain the inputs, but it should contain the
    -
    566 * outputs.
    -
    567 * - The tape should also have only one array per primitive for multi-output
    -
    568 * primitives.
    -
    569 * - The constant_ids contains ids of arrays in the input list that are safe
    -
    570 * to treat as scalar constants.
    -
    571 */
    -
    572 explicit Compiled(
    - -
    574 std::vector<array> inputs,
    -
    575 std::vector<array> outputs,
    -
    576 std::vector<array> tape,
    -
    577 std::unordered_set<uintptr_t> constant_ids);
    -
    578
    -
    579 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    580 override;
    -
    581 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    582 override;
    -
    583
    - - -
    586 std::vector<std::vector<int>> output_shapes(
    -
    587 const std::vector<array>& inputs) override;
    -
    588 void print(std::ostream& os) override;
    -
    589 bool is_equivalent(const Primitive& other) const override;
    -
    590
    -
    -
    591 std::string lib_name() const {
    -
    592 return kernel_lib_;
    -
    593 }
    -
    -
    594
    -
    595 private:
    -
    596 const std::vector<array> inputs_;
    -
    597 const std::vector<array> outputs_;
    -
    598 const std::vector<array> tape_;
    -
    599 const std::unordered_set<uintptr_t> constant_ids_;
    -
    600
    -
    601 std::string kernel_lib_;
    -
    602};
    -
    -
    603
    -
    - -
    605 public:
    -
    -
    606 explicit Concatenate(Stream stream, int axis)
    -
    607 : UnaryPrimitive(stream), axis_(axis) {};
    -
    -
    608
    -
    609 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    610 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    611
    - - - -
    615 bool is_equivalent(const Primitive& other) const override;
    -
    616
    -
    617 private:
    -
    618 int axis_;
    -
    619
    -
    620 void eval(const std::vector<array>& inputs, array& out);
    -
    621};
    -
    -
    622
    -
    -
    623class Conjugate : public UnaryPrimitive {
    -
    624 public:
    -
    625 explicit Conjugate(Stream stream) : UnaryPrimitive(stream) {};
    -
    626
    -
    627 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    628 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    629
    - - - - -
    634
    -
    635 private:
    -
    636 void eval(const std::vector<array>& inputs, array& out);
    -
    637};
    -
    -
    638
    -
    - -
    640 public:
    -
    -
    641 explicit Convolution(
    -
    642 Stream stream,
    -
    643 const std::vector<int>& kernel_strides,
    -
    644 const std::vector<int>& padding,
    -
    645 const std::vector<int>& kernel_dilation,
    -
    646 const std::vector<int>& input_dilation,
    -
    647 const int groups = 1,
    -
    648 const bool flip = false)
    -
    649 : UnaryPrimitive(stream),
    -
    650 padding_(padding),
    -
    651 kernel_strides_(kernel_strides),
    -
    652 kernel_dilation_(kernel_dilation),
    -
    653 input_dilation_(input_dilation),
    -
    654 groups_(groups),
    -
    655 flip_(flip) {};
    -
    -
    656
    -
    657 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    658 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    659
    -
    660 std::vector<array> vjp(
    -
    661 const std::vector<array>& primals,
    -
    662 const std::vector<array>& cotangents,
    -
    663 const std::vector<int>& argnums,
    -
    664 const std::vector<array>& outputs) override;
    -
    665
    - -
    667 bool is_equivalent(const Primitive& other) const override;
    -
    668
    -
    669 private:
    -
    670 std::vector<int> padding_;
    -
    671 std::vector<int> kernel_strides_;
    -
    672 std::vector<int> kernel_dilation_;
    -
    673 std::vector<int> input_dilation_;
    -
    674 int groups_;
    -
    675 bool flip_;
    -
    676
    -
    677 void eval(const std::vector<array>& inputs, array& out);
    -
    678};
    -
    -
    679
    -
    -
    680class Copy : public UnaryPrimitive {
    -
    681 public:
    -
    682 explicit Copy(Stream stream) : UnaryPrimitive(stream) {};
    -
    683
    -
    684 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    685 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    686
    - - - - - -
    692
    -
    693 private:
    -
    694 void eval(const std::vector<array>& inputs, array& out);
    -
    695};
    -
    -
    696
    -
    -
    697class Cos : public UnaryPrimitive {
    -
    698 public:
    -
    699 explicit Cos(Stream stream) : UnaryPrimitive(stream) {};
    -
    700
    -
    701 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    702 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    703
    - - - - - -
    709
    -
    710 private:
    -
    711 void eval(const std::vector<array>& inputs, array& out);
    -
    712};
    -
    -
    713
    -
    -
    714class Cosh : public UnaryPrimitive {
    -
    715 public:
    -
    716 explicit Cosh(Stream stream) : UnaryPrimitive(stream) {};
    -
    717
    -
    718 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    719 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    720
    - - - - - -
    726
    -
    727 private:
    -
    728 void eval(const std::vector<array>& inputs, array& out);
    -
    729};
    -
    -
    730
    -
    -
    731class CustomVJP : public Primitive {
    -
    732 public:
    -
    -
    733 explicit CustomVJP(
    -
    734 Stream stream,
    -
    735 std::function<std::vector<array>(
    -
    736 const std::vector<array>&,
    -
    737 const std::vector<array>&,
    -
    738 const std::vector<array>&)> fun)
    -
    739 : Primitive(stream), vjp_fun_(std::move(fun)) {}
    -
    -
    740
    -
    741 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    742 override;
    -
    743 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    744 override;
    -
    745
    -
    746 std::vector<array> vjp(
    -
    747 const std::vector<array>& primals,
    -
    748 const std::vector<array>& cotan,
    -
    749 const std::vector<int>& argnums,
    -
    750 const std::vector<array>& outputs) override;
    -
    751
    - -
    753
    -
    754 private:
    -
    755 void eval(const std::vector<array>& inputs, std::vector<array>& outputs);
    -
    756
    -
    757 std::function<std::vector<array>(
    -
    758 const std::vector<array>&,
    -
    759 const std::vector<array>&,
    -
    760 const std::vector<array>&)>
    -
    761 vjp_fun_;
    -
    762};
    -
    -
    763
    -
    -
    764class Depends : public Primitive {
    -
    765 public:
    -
    766 explicit Depends(Stream stream) : Primitive(stream) {}
    -
    767
    -
    768 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    769 override;
    -
    770 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    771 override;
    -
    772
    -
    773 std::vector<array> vjp(
    -
    774 const std::vector<array>& primals,
    -
    775 const std::vector<array>& cotan,
    -
    776 const std::vector<int>& argnums,
    -
    777 const std::vector<array>& outputs) override;
    -
    778
    - -
    780
    -
    781 private:
    -
    782 void eval(const std::vector<array>& inputs, std::vector<array>& outputs);
    -
    783};
    -
    -
    784
    -
    -
    785class Divide : public UnaryPrimitive {
    -
    786 public:
    -
    787 explicit Divide(Stream stream) : UnaryPrimitive(stream) {};
    -
    788
    -
    789 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    790 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    791
    - - - - - -
    797
    -
    798 private:
    -
    799 void eval(const std::vector<array>& inputs, array& out);
    -
    800};
    -
    -
    801
    -
    -
    802class DivMod : public Primitive {
    -
    803 public:
    -
    804 explicit DivMod(Stream stream) : Primitive(stream) {};
    -
    805
    -
    806 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    807 override;
    -
    808 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    809 override;
    -
    810
    - - - - -
    -
    815 std::vector<std::vector<int>> output_shapes(
    -
    816 const std::vector<array>& inputs) override {
    -
    817 return std::vector{inputs[0].shape(), inputs[0].shape()};
    -
    818 };
    -
    -
    819
    -
    820 private:
    -
    821 void eval(const std::vector<array>& inputs, std::vector<array>& outputs);
    -
    822};
    -
    -
    823
    -
    -
    824class Select : public UnaryPrimitive {
    -
    825 public:
    -
    826 explicit Select(Stream stream) : UnaryPrimitive(stream) {};
    -
    827
    -
    828 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    829 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    830
    - - - - - -
    836
    -
    837 private:
    -
    838 void eval(const std::vector<array>& inputs, array& out);
    -
    839};
    -
    -
    840
    -
    -
    841class Remainder : public UnaryPrimitive {
    -
    842 public:
    -
    843 explicit Remainder(Stream stream) : UnaryPrimitive(stream) {};
    -
    844
    -
    845 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    846 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    847
    - - - - - -
    853
    -
    854 private:
    -
    855 void eval(const std::vector<array>& inputs, array& out);
    -
    856};
    -
    -
    857
    -
    -
    858class Equal : public UnaryPrimitive {
    -
    859 public:
    -
    -
    860 explicit Equal(Stream stream, bool equal_nan = false)
    -
    861 : UnaryPrimitive(stream), equal_nan_(equal_nan) {};
    -
    -
    862
    -
    863 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    864 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    865
    - - - - -
    870
    -
    -
    871 void print(std::ostream& os) override {
    -
    872 if (equal_nan_) {
    -
    873 os << "NanEqual";
    -
    874 } else {
    -
    875 os << "Equal";
    -
    876 }
    -
    877 }
    -
    -
    878
    -
    879 private:
    -
    880 void eval(const std::vector<array>& inputs, array& out);
    -
    881 bool equal_nan_;
    -
    882};
    -
    -
    883
    -
    -
    884class Erf : public UnaryPrimitive {
    -
    885 public:
    -
    886 explicit Erf(Stream stream) : UnaryPrimitive(stream) {};
    -
    887
    -
    888 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    889 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    890
    - - - - - -
    896
    -
    897 private:
    -
    898 void eval(const std::vector<array>& inputs, array& out);
    -
    899};
    -
    -
    900
    -
    -
    901class ErfInv : public UnaryPrimitive {
    -
    902 public:
    -
    903 explicit ErfInv(Stream stream) : UnaryPrimitive(stream) {};
    -
    904
    -
    905 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    906 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    907
    - - - - - -
    913
    -
    914 private:
    -
    915 void eval(const std::vector<array>& inputs, array& out);
    -
    916};
    -
    -
    917
    -
    -
    918class Exp : public UnaryPrimitive {
    -
    919 public:
    -
    920 explicit Exp(Stream stream) : UnaryPrimitive(stream) {};
    -
    921
    -
    922 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    923 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    924
    - - - - - -
    930
    -
    931 private:
    -
    932 void eval(const std::vector<array>& inputs, array& out);
    -
    933};
    -
    -
    934
    -
    -
    935class Expm1 : public UnaryPrimitive {
    -
    936 public:
    -
    937 explicit Expm1(Stream stream) : UnaryPrimitive(stream) {};
    -
    938
    -
    939 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    940 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    941
    - - - - -
    946
    -
    947 private:
    -
    948 void eval(const std::vector<array>& inputs, array& out);
    -
    949};
    -
    -
    950
    -
    -
    951class FFT : public UnaryPrimitive {
    -
    952 public:
    -
    -
    953 explicit FFT(
    -
    954 Stream stream,
    -
    955 const std::vector<size_t>& axes,
    -
    956 bool inverse,
    -
    957 bool real)
    -
    958 : UnaryPrimitive(stream), axes_(axes), inverse_(inverse), real_(real) {};
    -
    -
    959
    -
    960 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    961 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    962
    - - - -
    966
    -
    967 bool is_equivalent(const Primitive& other) const override;
    -
    968
    -
    969 private:
    -
    970 std::vector<size_t> axes_;
    -
    971 bool inverse_;
    -
    972 bool real_;
    -
    973
    -
    974 void eval(const std::vector<array>& inputs, array& out);
    -
    975};
    -
    -
    976
    -
    -
    977class Floor : public UnaryPrimitive {
    -
    978 public:
    -
    979 explicit Floor(Stream stream) : UnaryPrimitive(stream) {};
    -
    980
    -
    981 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    982 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    983
    - - - - - -
    989
    -
    990 private:
    -
    991 void eval(const std::vector<array>& inputs, array& out);
    -
    992};
    -
    -
    993
    -
    -
    994class Full : public UnaryPrimitive {
    -
    995 public:
    -
    996 explicit Full(Stream stream) : UnaryPrimitive(stream) {};
    -
    997
    -
    998 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    999 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1000
    - - - - -
    1005
    -
    1006 private:
    -
    1007 void eval(const std::vector<array>& inputs, array& out);
    -
    1008};
    -
    -
    1009
    -
    -
    1010class Gather : public UnaryPrimitive {
    -
    1011 public:
    -
    -
    1012 explicit Gather(
    -
    1013 Stream stream,
    -
    1014 const std::vector<int>& axes,
    -
    1015 const std::vector<int>& slice_sizes)
    -
    1016 : UnaryPrimitive(stream), axes_(axes), slice_sizes_(slice_sizes) {};
    -
    -
    1017
    -
    1018 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1019 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1020
    - - - -
    1024 bool is_equivalent(const Primitive& other) const override;
    -
    1025
    -
    1026 private:
    -
    1027 void eval(const std::vector<array>& inputs, array& out);
    -
    1028 std::vector<int> axes_;
    -
    1029 std::vector<int> slice_sizes_;
    -
    1030};
    -
    -
    1031
    -
    -
    1032class Greater : public UnaryPrimitive {
    -
    1033 public:
    -
    1034 explicit Greater(Stream stream) : UnaryPrimitive(stream) {};
    -
    1035
    -
    1036 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1037 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1038
    - - - - - -
    1044
    -
    1045 private:
    -
    1046 void eval(const std::vector<array>& inputs, array& out);
    -
    1047};
    -
    -
    1048
    -
    - -
    1050 public:
    -
    1051 explicit GreaterEqual(Stream stream) : UnaryPrimitive(stream) {};
    -
    1052
    -
    1053 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1054 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1055
    - - - - - -
    1061
    -
    1062 private:
    -
    1063 void eval(const std::vector<array>& inputs, array& out);
    -
    1064};
    -
    -
    1065
    -
    -
    1066class Less : public UnaryPrimitive {
    -
    1067 public:
    -
    1068 explicit Less(Stream stream) : UnaryPrimitive(stream) {};
    -
    1069
    -
    1070 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1071 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1072
    - - - - - -
    1078
    -
    1079 private:
    -
    1080 void eval(const std::vector<array>& inputs, array& out);
    -
    1081};
    -
    -
    1082
    -
    - -
    1084 public:
    -
    1085 explicit LessEqual(Stream stream) : UnaryPrimitive(stream) {};
    -
    1086
    -
    1087 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1088 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1089
    - - - - - -
    1095
    -
    1096 private:
    -
    1097 void eval(const std::vector<array>& inputs, array& out);
    -
    1098};
    -
    -
    1099
    -
    -
    1100class Load : public UnaryPrimitive {
    -
    1101 public:
    -
    -
    1102 explicit Load(
    -
    1103 Stream stream,
    -
    1104 std::shared_ptr<io::Reader> reader,
    -
    1105 size_t offset,
    -
    1106 bool swap_endianness = false)
    -
    1107 : UnaryPrimitive(stream),
    -
    1108 reader_(reader),
    -
    1109 offset_(offset),
    -
    1110 swap_endianness_(swap_endianness) {};
    -
    -
    1111
    -
    1112 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1113 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1114
    - -
    1116
    -
    1117 private:
    -
    1118 void eval(const std::vector<array>& inputs, array& out);
    -
    1119 std::shared_ptr<io::Reader> reader_;
    -
    1120 size_t offset_;
    -
    1121 bool swap_endianness_;
    -
    1122};
    -
    -
    1123
    -
    -
    1124class Log : public UnaryPrimitive {
    -
    1125 public:
    -
    1126 enum Base { two, ten, e };
    -
    1127
    -
    -
    1128 explicit Log(Stream stream, Base base)
    -
    1129 : UnaryPrimitive(stream), base_(base) {};
    -
    -
    1130
    -
    1131 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1132 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1133
    - - - - -
    1138
    -
    -
    1139 void print(std::ostream& os) override {
    -
    1140 switch (base_) {
    -
    1141 case e:
    -
    1142 os << "Log";
    -
    1143 break;
    -
    1144 case two:
    -
    1145 os << "Log2";
    -
    1146 break;
    -
    1147 case ten:
    -
    1148 os << "Log10";
    -
    1149 break;
    -
    1150 }
    -
    1151 }
    -
    -
    1152
    -
    1153 private:
    -
    1154 Base base_;
    -
    1155 void eval(const std::vector<array>& inputs, array& out);
    -
    1156};
    -
    -
    1157
    -
    -
    1158class Log1p : public UnaryPrimitive {
    -
    1159 public:
    -
    1160 explicit Log1p(Stream stream) : UnaryPrimitive(stream) {};
    -
    1161
    -
    1162 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1163 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1164
    - - - - -
    1169
    -
    1170 private:
    -
    1171 void eval(const std::vector<array>& inputs, array& out);
    -
    1172};
    -
    -
    1173
    -
    - -
    1175 public:
    -
    1176 explicit LogicalNot(Stream stream) : UnaryPrimitive(stream) {};
    -
    1177
    -
    1178 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1179 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1180
    - - - - - -
    1186
    -
    1187 private:
    -
    1188 void eval(const std::vector<array>& inputs, array& out);
    -
    1189};
    -
    -
    1190
    -
    - -
    1192 public:
    -
    1193 explicit LogicalAnd(Stream stream) : UnaryPrimitive(stream) {};
    -
    1194
    -
    1195 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1196 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1197
    - - - - - -
    1203
    -
    1204 private:
    -
    1205 void eval(const std::vector<array>& inputs, array& out);
    -
    1206};
    -
    -
    1207
    -
    - -
    1209 public:
    -
    1210 explicit LogicalOr(Stream stream) : UnaryPrimitive(stream) {};
    -
    1211
    -
    1212 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1213 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1214
    - - - - - -
    1220
    -
    1221 private:
    -
    1222 void eval(const std::vector<array>& inputs, array& out);
    -
    1223};
    -
    -
    1224
    -
    - -
    1226 public:
    -
    1227 explicit LogAddExp(Stream stream) : UnaryPrimitive(stream) {};
    -
    1228
    -
    1229 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1230 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1231
    - - - - - -
    1237
    -
    1238 private:
    -
    1239 void eval(const std::vector<array>& inputs, array& out);
    -
    1240};
    -
    -
    1241
    -
    -
    1242class Matmul : public UnaryPrimitive {
    -
    1243 public:
    -
    1244 explicit Matmul(Stream stream) : UnaryPrimitive(stream) {};
    -
    1245
    -
    1246 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1247 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1248
    -
    1249 std::vector<array> vjp(
    -
    1250 const std::vector<array>& primals,
    -
    1251 const std::vector<array>& cotangents,
    -
    1252 const std::vector<int>& argnums,
    -
    1253 const std::vector<array>& outputs) override;
    -
    1254
    - - - -
    1258};
    -
    -
    1259
    -
    -
    1260class Maximum : public UnaryPrimitive {
    -
    1261 public:
    -
    1262 explicit Maximum(Stream stream) : UnaryPrimitive(stream) {};
    -
    1263
    -
    1264 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1265 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1266
    - - - - - -
    1272
    -
    1273 private:
    -
    1274 void eval(const std::vector<array>& inputs, array& out);
    -
    1275};
    -
    -
    1276
    -
    -
    1277class Minimum : public UnaryPrimitive {
    -
    1278 public:
    -
    1279 explicit Minimum(Stream stream) : UnaryPrimitive(stream) {};
    -
    1280
    -
    1281 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1282 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1283
    - - - - - -
    1289
    -
    1290 private:
    -
    1291 void eval(const std::vector<array>& inputs, array& out);
    -
    1292};
    -
    -
    1293
    -
    -
    1294class Multiply : public UnaryPrimitive {
    -
    1295 public:
    -
    1296 explicit Multiply(Stream stream) : UnaryPrimitive(stream) {};
    -
    1297
    -
    1298 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1299 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1300
    - - - - - -
    1306
    -
    1307 private:
    -
    1308 void eval(const std::vector<array>& inputs, array& out);
    -
    1309};
    -
    -
    1310
    -
    -
    1311class Negative : public UnaryPrimitive {
    -
    1312 public:
    -
    1313 explicit Negative(Stream stream) : UnaryPrimitive(stream) {};
    -
    1314
    -
    1315 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1316 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1317
    - - - - - -
    1323
    -
    1324 private:
    -
    1325 void eval(const std::vector<array>& inputs, array& out);
    -
    1326};
    -
    -
    1327
    -
    -
    1328class NotEqual : public UnaryPrimitive {
    -
    1329 public:
    -
    1330 explicit NotEqual(Stream stream) : UnaryPrimitive(stream) {};
    -
    1331
    -
    1332 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1333 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1334
    - - - - - -
    1340
    -
    1341 private:
    -
    1342 void eval(const std::vector<array>& inputs, array& out);
    -
    1343};
    -
    -
    1344
    -
    - -
    1346 public:
    -
    - -
    1348 Stream stream,
    -
    1349 std::vector<int> axes,
    -
    1350 bool inverted,
    -
    1351 Dtype dtype)
    -
    1352 : UnaryPrimitive(stream),
    -
    1353 axes_(std::move(axes)),
    -
    1354 inverted_(inverted),
    -
    1355 dtype_(dtype) {}
    -
    -
    1356
    -
    1357 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1358 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1359
    - - -
    1362 bool is_equivalent(const Primitive& other) const override;
    -
    -
    1363 std::vector<std::vector<int>> output_shapes(
    -
    1364 const std::vector<array>& inputs) override {
    -
    1365 return {{}};
    -
    1366 }
    -
    -
    1367
    -
    1368 private:
    -
    1369 std::vector<int> axes_;
    -
    1370 bool inverted_;
    -
    1371 Dtype dtype_;
    -
    1372
    -
    1373 void eval(const std::vector<array>& inputs, array& out);
    -
    1374};
    -
    -
    1375
    -
    -
    1376class Pad : public UnaryPrimitive {
    -
    1377 public:
    -
    -
    1378 explicit Pad(
    -
    1379 Stream stream,
    -
    1380 const std::vector<int>& axes,
    -
    1381 const std::vector<int>& low_pad_size,
    -
    1382 const std::vector<int>& high_pad_size)
    -
    1383 : UnaryPrimitive(stream),
    -
    1384 axes_(axes),
    -
    1385 low_pad_size_(low_pad_size),
    -
    1386 high_pad_size_(high_pad_size) {};
    -
    -
    1387
    -
    1388 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1389 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1390
    - - - -
    1394 bool is_equivalent(const Primitive& other) const override;
    -
    1395
    -
    1396 private:
    -
    1397 std::vector<int> axes_;
    -
    1398 std::vector<int> low_pad_size_;
    -
    1399 std::vector<int> high_pad_size_;
    -
    1400
    -
    1401 void eval(const std::vector<array>& inputs, array& out);
    -
    1402};
    -
    -
    1403
    -
    - -
    1405 public:
    -
    -
    1406 explicit Partition(Stream stream, int kth, int axis)
    -
    1407 : UnaryPrimitive(stream), kth_(kth), axis_(axis) {};
    -
    -
    1408
    -
    1409 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1410 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1411
    - - - - -
    1416 bool is_equivalent(const Primitive& other) const override;
    -
    1417
    -
    1418 private:
    -
    1419 int kth_;
    -
    1420 int axis_;
    -
    1421
    -
    1422 void eval(const std::vector<array>& inputs, array& out);
    -
    1423};
    -
    -
    1424
    -
    -
    1425class Power : public UnaryPrimitive {
    -
    1426 public:
    -
    1427 explicit Power(Stream stream) : UnaryPrimitive(stream) {};
    -
    1428
    -
    1429 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1430 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1431
    - - - - - -
    1437
    -
    1438 private:
    -
    1439 void eval(const std::vector<array>& inputs, array& out);
    -
    1440};
    -
    -
    1441
    -
    - -
    1443 public:
    -
    - -
    1445 Stream stream,
    -
    1446 int group_size,
    -
    1447 int bits,
    -
    1448 bool transpose)
    -
    1449 : UnaryPrimitive(stream),
    -
    1450 group_size_(group_size),
    -
    1451 bits_(bits),
    -
    1452 transpose_(transpose) {};
    -
    -
    1453
    -
    1454 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1455 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1456
    - - - -
    1460 bool is_equivalent(const Primitive& other) const override;
    -
    1461
    -
    1462 private:
    -
    1463 int group_size_;
    -
    1464 int bits_;
    -
    1465 bool transpose_;
    -
    1466
    -
    1467 void eval(const std::vector<array>& inputs, array& out);
    -
    1468};
    -
    -
    1469
    -
    - -
    1471 public:
    -
    - -
    1473 Stream stream,
    -
    1474 int group_size,
    -
    1475 int bits,
    -
    1476 bool transpose)
    -
    1477 : UnaryPrimitive(stream),
    -
    1478 group_size_(group_size),
    -
    1479 bits_(bits),
    -
    1480 transpose_(transpose) {};
    -
    -
    1481
    -
    1482 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1483 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1484
    - - - -
    1488 bool is_equivalent(const Primitive& other) const override;
    -
    1489
    -
    1490 private:
    -
    1491 int group_size_;
    -
    1492 int bits_;
    -
    1493 bool transpose_;
    -
    1494
    -
    1495 void eval(const std::vector<array>& inputs, array& out);
    -
    1496};
    -
    -
    1497
    -
    - -
    1499 public:
    -
    -
    1500 explicit RandomBits(Stream stream, const std::vector<int>& shape, int width)
    -
    1501 : UnaryPrimitive(stream), shape_(shape), width_(width) {};
    -
    -
    1502
    -
    1503 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1504 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1505
    - - -
    1508 bool is_equivalent(const Primitive& other) const override;
    -
    1509
    -
    1510 private:
    -
    1511 std::vector<int> shape_;
    -
    1512 int width_;
    -
    1513
    -
    1514 void eval(const std::vector<array>& inputs, array& out);
    -
    1515};
    -
    -
    1516
    -
    -
    1517class Reshape : public UnaryPrimitive {
    -
    1518 public:
    -
    -
    1519 explicit Reshape(Stream stream, const std::vector<int>& shape)
    -
    1520 : UnaryPrimitive(stream), shape_(shape) {};
    -
    -
    1521
    -
    1522 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1523 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1524
    - - - -
    1528 bool is_equivalent(const Primitive& other) const override;
    -
    1529
    -
    1530 private:
    -
    1531 std::vector<int> shape_;
    -
    1532
    -
    1533 void eval(const std::vector<array>& inputs, array& out);
    -
    1534
    -
    1535 std::pair<bool, std::vector<size_t>> prepare_reshape(
    -
    1536 const array& in,
    -
    1537 const array& out);
    -
    1538 void shared_buffer_reshape(
    -
    1539 const array& in,
    -
    1540 const std::vector<size_t>& out_strides,
    -
    1541 array& out);
    -
    1542};
    -
    -
    1543
    -
    -
    1544class Reduce : public UnaryPrimitive {
    -
    1545 public:
    -
    1546 enum ReduceType { And, Or, Sum, Prod, Min, Max };
    -
    1547
    -
    -
    1548 explicit Reduce(
    -
    1549 Stream stream,
    -
    1550 ReduceType reduce_type,
    -
    1551 const std::vector<int>& axes)
    -
    1552 : UnaryPrimitive(stream), reduce_type_(reduce_type), axes_(axes) {};
    -
    -
    1553
    -
    1554 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1555 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1556
    - -
    1558
    -
    1559 std::vector<array> vjp(
    -
    1560 const std::vector<array>& primals,
    -
    1561 const std::vector<array>& cotangents,
    -
    1562 const std::vector<int>& argnums,
    -
    1563 const std::vector<array>& outputs) override;
    -
    1564
    -
    1565 std::vector<std::vector<int>> output_shapes(
    -
    1566 const std::vector<array>& inputs) override;
    -
    1567
    -
    -
    1568 void print(std::ostream& os) override {
    -
    1569 switch (reduce_type_) {
    -
    1570 case And:
    -
    1571 os << "And";
    -
    1572 case Or:
    -
    1573 os << "And";
    -
    1574 break;
    -
    1575 case Sum:
    -
    1576 os << "Sum";
    -
    1577 break;
    -
    1578 case Prod:
    -
    1579 os << "Prod";
    -
    1580 break;
    -
    1581 case Min:
    -
    1582 os << "Min";
    -
    1583 break;
    -
    1584 case Max:
    -
    1585 os << "Max";
    -
    1586 break;
    -
    1587 }
    -
    1588 os << " Reduce";
    -
    1589 }
    -
    -
    1590 bool is_equivalent(const Primitive& other) const override;
    -
    1591
    -
    1592 private:
    -
    1593 ReduceType reduce_type_;
    -
    1594 std::vector<int> axes_;
    -
    1595
    -
    1596 void eval(const std::vector<array>& inputs, array& out);
    -
    1597};
    -
    -
    1598
    -
    -
    1599class Round : public UnaryPrimitive {
    -
    1600 public:
    -
    1601 explicit Round(Stream stream) : UnaryPrimitive(stream) {};
    -
    1602
    -
    1603 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1604 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1605
    - - - - - -
    1611
    -
    1612 private:
    -
    1613 void eval(const std::vector<array>& inputs, array& out);
    -
    1614};
    -
    -
    1615
    -
    -
    1616class Scan : public UnaryPrimitive {
    -
    1617 public:
    - -
    1619
    -
    -
    1620 explicit Scan(
    -
    1621 Stream stream,
    -
    1622 ReduceType reduce_type,
    -
    1623 int axis,
    -
    1624 bool reverse,
    -
    1625 bool inclusive)
    -
    1626 : UnaryPrimitive(stream),
    -
    1627 reduce_type_(reduce_type),
    -
    1628 axis_(axis),
    -
    1629 reverse_(reverse),
    -
    1630 inclusive_(inclusive) {};
    -
    -
    1631
    -
    1632 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1633 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1634
    - - -
    1637
    -
    -
    1638 void print(std::ostream& os) override {
    -
    1639 os << "Cum";
    -
    1640 switch (reduce_type_) {
    -
    1641 case Sum:
    -
    1642 os << "Sum";
    -
    1643 break;
    -
    1644 case Prod:
    -
    1645 os << "Prod";
    -
    1646 break;
    -
    1647 case Min:
    -
    1648 os << "Min";
    -
    1649 break;
    -
    1650 case Max:
    -
    1651 os << "Max";
    -
    1652 break;
    -
    1653 }
    -
    1654 os << " Reduce";
    -
    1655 }
    -
    -
    1656 bool is_equivalent(const Primitive& other) const override;
    -
    1657
    -
    1658 private:
    -
    1659 ReduceType reduce_type_;
    -
    1660 int axis_;
    -
    1661 bool reverse_;
    -
    1662 bool inclusive_;
    -
    1663
    -
    1664 void eval(const std::vector<array>& inputs, array& out);
    -
    1665};
    -
    -
    1666
    -
    -
    1667class Scatter : public UnaryPrimitive {
    -
    1668 public:
    - -
    1670
    -
    -
    1671 explicit Scatter(
    -
    1672 Stream stream,
    -
    1673 ReduceType reduce_type,
    -
    1674 const std::vector<int>& axes)
    -
    1675 : UnaryPrimitive(stream), reduce_type_(reduce_type), axes_(axes) {};
    -
    -
    1676
    -
    1677 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1678 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1679
    - -
    -
    1681 void print(std::ostream& os) override {
    -
    1682 os << "Scatter";
    -
    1683 switch (reduce_type_) {
    -
    1684 case Sum:
    -
    1685 os << " Sum";
    -
    1686 break;
    -
    1687 case Prod:
    -
    1688 os << " Prod";
    -
    1689 break;
    -
    1690 case Min:
    -
    1691 os << " Min";
    -
    1692 break;
    -
    1693 case Max:
    -
    1694 os << " Max";
    -
    1695 break;
    -
    1696 case None:
    -
    1697 break;
    -
    1698 }
    -
    1699 }
    -
    -
    1700 bool is_equivalent(const Primitive& other) const override;
    -
    1701
    -
    1702 private:
    -
    1703 void eval(const std::vector<array>& inputs, array& out);
    -
    1704 ReduceType reduce_type_;
    -
    1705 std::vector<int> axes_;
    -
    1706};
    -
    -
    1707
    -
    -
    1708class Sigmoid : public UnaryPrimitive {
    -
    1709 public:
    -
    1710 explicit Sigmoid(Stream stream) : UnaryPrimitive(stream) {};
    -
    1711
    -
    1712 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1713 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1714
    - - - - - -
    1720
    -
    1721 private:
    -
    1722 void eval(const std::vector<array>& inputs, array& out);
    -
    1723};
    -
    -
    1724
    -
    -
    1725class Sign : public UnaryPrimitive {
    -
    1726 public:
    -
    1727 explicit Sign(Stream stream) : UnaryPrimitive(stream) {};
    -
    1728
    -
    1729 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1730 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1731
    - - - - - -
    1737
    -
    1738 private:
    -
    1739 void eval(const std::vector<array>& inputs, array& out);
    -
    1740};
    -
    -
    1741
    -
    -
    1742class Sin : public UnaryPrimitive {
    -
    1743 public:
    -
    1744 explicit Sin(Stream stream) : UnaryPrimitive(stream) {};
    -
    1745
    -
    1746 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1747 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1748
    - - - - - -
    1754
    -
    1755 private:
    -
    1756 void eval(const std::vector<array>& inputs, array& out);
    -
    1757};
    -
    -
    1758
    -
    -
    1759class Sinh : public UnaryPrimitive {
    -
    1760 public:
    -
    1761 explicit Sinh(Stream stream) : UnaryPrimitive(stream) {};
    -
    1762
    -
    1763 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1764 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1765
    - - - - - -
    1771
    -
    1772 private:
    -
    1773 void eval(const std::vector<array>& inputs, array& out);
    -
    1774};
    -
    -
    1775
    -
    -
    1776class Slice : public UnaryPrimitive {
    -
    1777 public:
    -
    -
    1778 explicit Slice(
    -
    1779 Stream stream,
    -
    1780 const std::vector<int>& start_indices,
    -
    1781 const std::vector<int>& end_indices,
    -
    1782 const std::vector<int>& strides)
    -
    1783 : UnaryPrimitive(stream),
    -
    1784 start_indices_(start_indices),
    -
    1785 end_indices_(end_indices),
    -
    1786 strides_(strides) {};
    -
    -
    1787
    -
    1788 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1789 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1790
    - - - -
    1794 bool is_equivalent(const Primitive& other) const override;
    -
    1795
    -
    1796 private:
    -
    1797 std::vector<int> start_indices_;
    -
    1798 std::vector<int> end_indices_;
    -
    1799 std::vector<int> strides_;
    -
    1800
    -
    1801 void eval(const std::vector<array>& inputs, array& out);
    -
    1802
    -
    1803 std::tuple<bool, int64_t, std::vector<int64_t>> prepare_slice(
    -
    1804 const array& in);
    -
    1805 void shared_buffer_slice(
    -
    1806 const array& in,
    -
    1807 const std::vector<size_t>& out_strides,
    -
    1808 size_t data_offset,
    -
    1809 array& out);
    -
    1810};
    -
    -
    1811
    -
    - -
    1813 public:
    -
    -
    1814 explicit SliceUpdate(
    -
    1815 Stream stream,
    -
    1816 const std::vector<int>& start_indices,
    -
    1817 const std::vector<int>& end_indices,
    -
    1818 const std::vector<int>& strides)
    -
    1819 : UnaryPrimitive(stream),
    -
    1820 start_indices_(start_indices),
    -
    1821 end_indices_(end_indices),
    -
    1822 strides_(strides) {};
    -
    -
    1823
    -
    1824 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1825 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1826
    - - - -
    1830 bool is_equivalent(const Primitive& other) const override;
    -
    1831
    -
    1832 private:
    -
    1833 std::vector<int> start_indices_;
    -
    1834 std::vector<int> end_indices_;
    -
    1835 std::vector<int> strides_;
    -
    1836
    -
    1837 void eval(const std::vector<array>& inputs, array& out);
    -
    1838
    -
    1839 std::tuple<int64_t, std::vector<int64_t>> prepare_slice(const array& in);
    -
    1840};
    -
    -
    1841
    -
    -
    1842class Softmax : public UnaryPrimitive {
    -
    1843 public:
    -
    -
    1844 explicit Softmax(Stream stream, bool precise)
    -
    1845 : UnaryPrimitive(stream), precise_(precise) {};
    -
    -
    1846
    -
    1847 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1848 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1849
    - - - - -
    1854
    -
    1855 bool is_equivalent(const Primitive& other) const override;
    -
    1856
    -
    1857 private:
    -
    1858 void eval(const std::vector<array>& inputs, array& out);
    -
    1859 bool precise_;
    -
    1860};
    -
    -
    1861
    -
    -
    1862class Sort : public UnaryPrimitive {
    -
    1863 public:
    -
    -
    1864 explicit Sort(Stream stream, int axis)
    -
    1865 : UnaryPrimitive(stream), axis_(axis) {};
    -
    -
    1866
    -
    1867 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1868 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1869
    - - - - -
    1874 bool is_equivalent(const Primitive& other) const override;
    -
    1875
    -
    1876 private:
    -
    1877 int axis_;
    -
    1878
    -
    1879 void eval(const std::vector<array>& inputs, array& out);
    -
    1880};
    -
    -
    1881
    -
    -
    1882class Split : public Primitive {
    -
    1883 public:
    -
    -
    1884 explicit Split(Stream stream, const std::vector<int>& indices, int axis)
    -
    1885 : Primitive(stream), indices_(indices), axis_(axis) {};
    -
    -
    1886
    -
    1887 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    1888 override;
    -
    1889 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    1890 override;
    -
    1891
    - - - -
    1895 bool is_equivalent(const Primitive& other) const override;
    -
    1896
    -
    1897 private:
    -
    1898 void eval(const std::vector<array>& inputs, std::vector<array>& outputs);
    -
    1899
    -
    1900 std::vector<int> indices_;
    -
    1901 int axis_;
    -
    1902};
    -
    -
    1903
    -
    -
    1904class Square : public UnaryPrimitive {
    -
    1905 public:
    -
    1906 explicit Square(Stream stream) : UnaryPrimitive(stream) {};
    -
    1907
    -
    1908 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1909 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1910
    - - - - - -
    1916
    -
    1917 private:
    -
    1918 void eval(const std::vector<array>& inputs, array& out);
    -
    1919};
    -
    -
    1920
    -
    -
    1921class Sqrt : public UnaryPrimitive {
    -
    1922 public:
    -
    -
    1923 explicit Sqrt(Stream stream, bool recip = false)
    -
    1924 : UnaryPrimitive(stream), recip_(recip) {};
    -
    -
    1925
    -
    1926 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1927 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1928
    - - - -
    1932 bool is_equivalent(const Primitive& other) const override;
    -
    1933
    -
    -
    1934 void print(std::ostream& os) override {
    -
    1935 if (recip_) {
    -
    1936 os << "Rsqrt";
    -
    1937 } else {
    -
    1938 os << "Sqrt";
    -
    1939 }
    -
    1940 }
    -
    -
    1941
    -
    1942 private:
    -
    1943 void eval(const std::vector<array>& inputs, array& out);
    -
    1944 bool recip_;
    -
    1945};
    -
    -
    1946
    -
    - -
    1948 public:
    -
    1949 explicit StopGradient(Stream stream) : UnaryPrimitive(stream) {};
    -
    1950
    -
    1951 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1952 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1953
    - - - - -
    1958
    -
    1959 private:
    -
    1960 void eval(const std::vector<array>& inputs, array& out);
    -
    1961};
    -
    -
    1962
    -
    -
    1963class Subtract : public UnaryPrimitive {
    -
    1964 public:
    -
    1965 explicit Subtract(Stream stream) : UnaryPrimitive(stream) {};
    -
    1966
    -
    1967 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1968 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1969
    - - - - - -
    1975
    -
    1976 private:
    -
    1977 void eval(const std::vector<array>& inputs, array& out);
    -
    1978};
    -
    -
    1979
    -
    -
    1980class Tan : public UnaryPrimitive {
    -
    1981 public:
    -
    1982 explicit Tan(Stream stream) : UnaryPrimitive(stream) {};
    -
    1983
    -
    1984 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    1985 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    1986
    - - - - - -
    1992
    -
    1993 private:
    -
    1994 void eval(const std::vector<array>& inputs, array& out);
    -
    1995};
    -
    -
    1996
    -
    -
    1997class Tanh : public UnaryPrimitive {
    -
    1998 public:
    -
    1999 explicit Tanh(Stream stream) : UnaryPrimitive(stream) {};
    -
    2000
    -
    2001 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    2002 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    2003
    - - - - - -
    2009
    -
    2010 private:
    -
    2011 void eval(const std::vector<array>& inputs, array& out);
    -
    2012};
    -
    -
    2013
    -
    -
    2014class Uniform : public UnaryPrimitive {
    -
    2015 public:
    -
    2016 explicit Uniform(Stream stream) : UnaryPrimitive(stream) {};
    -
    2017
    -
    2018 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    2019 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    2020
    - - - -
    2024
    -
    2025 private:
    -
    2026 void eval(const std::vector<array>& inputs, array& out);
    -
    2027};
    -
    -
    2028
    -
    - -
    2030 public:
    -
    -
    2031 explicit Transpose(Stream stream, const std::vector<int>& axes)
    -
    2032 : UnaryPrimitive(stream), axes_(axes) {};
    -
    -
    2033
    -
    2034 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    2035 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    2036
    - - - -
    2040 bool is_equivalent(const Primitive& other) const override;
    -
    2041
    -
    2042 private:
    -
    2043 std::vector<int> axes_;
    -
    2044
    -
    2045 void eval(const std::vector<array>& inputs, array& out);
    -
    2046};
    -
    -
    2047
    -
    2048/* QR Factorization primitive. */
    -
    -
    2049class QRF : public Primitive {
    -
    2050 public:
    -
    2051 explicit QRF(Stream stream) : Primitive(stream) {};
    -
    2052
    -
    2053 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    2054 override;
    -
    2055 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    2056 override;
    -
    2057
    - -
    2059
    -
    2060 private:
    -
    2061 void eval(const std::vector<array>& inputs, std::vector<array>& outputs);
    -
    2062};
    -
    -
    2063
    -
    2064/* SVD primitive. */
    -
    -
    2065class SVD : public Primitive {
    -
    2066 public:
    -
    2067 explicit SVD(Stream stream) : Primitive(stream) {};
    -
    2068
    -
    2069 void eval_cpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    2070 override;
    -
    2071 void eval_gpu(const std::vector<array>& inputs, std::vector<array>& outputs)
    -
    2072 override;
    -
    2073
    - - -
    2076
    -
    2077 private:
    -
    2078 void eval(const std::vector<array>& inputs, std::vector<array>& outputs);
    -
    2079};
    -
    -
    2080
    -
    2081/* Matrix inversion primitive. */
    -
    -
    2082class Inverse : public UnaryPrimitive {
    -
    2083 public:
    -
    2084 explicit Inverse(Stream stream) : UnaryPrimitive(stream) {};
    -
    2085
    -
    2086 void eval_cpu(const std::vector<array>& inputs, array& output) override;
    -
    2087 void eval_gpu(const std::vector<array>& inputs, array& output) override;
    -
    2088
    - - -
    2091
    -
    2092 private:
    -
    2093 void eval(const std::vector<array>& inputs, array& output);
    -
    2094};
    -
    -
    2095
    -
    -
    2096class Cholesky : public UnaryPrimitive {
    -
    2097 public:
    -
    -
    2098 explicit Cholesky(Stream stream, bool upper)
    -
    2099 : UnaryPrimitive(stream), upper_(upper) {};
    -
    -
    2100
    -
    2101 void eval_cpu(const std::vector<array>& inputs, array& out) override;
    -
    2102 void eval_gpu(const std::vector<array>& inputs, array& out) override;
    -
    2103
    - - -
    2106
    -
    2107 private:
    -
    2108 void eval(const std::vector<array>& inputs, array& output);
    -
    2109 bool upper_;
    -
    2110};
    -
    -
    2111
    -
    2112} // namespace mlx::core
    - -
    Definition primitives.h:155
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Abs(Stream stream)
    Definition primitives.h:157
    -
    void print(std::ostream &os) override
    Print the primitive.
    Definition primitives.h:164
    -
    std::vector< std::vector< int > > output_shapes(const std::vector< array > &inputs) override
    Get the output shapes of the primitive.
    Definition primitives.h:166
    -
    bool is_equivalent(const Primitive &other) const override
    Equivalence check defaults to false unless overridden by the primitive.
    Definition primitives.h:165
    -
    Definition primitives.h:172
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Add(Stream stream)
    Definition primitives.h:174
    -
    Definition primitives.h:189
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    AddMM(Stream stream, float alpha, float beta)
    Definition primitives.h:191
    -
    std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
    The vector-Jacobian product.
    -
    Definition primitives.h:213
    -
    Arange(Stream stream, double start, double stop, double step)
    Definition primitives.h:215
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:232
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    ArcCos(Stream stream)
    Definition primitives.h:234
    -
    Definition primitives.h:249
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    ArcCosh(Stream stream)
    Definition primitives.h:251
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:266
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    ArcSin(Stream stream)
    Definition primitives.h:268
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:283
    -
    ArcSinh(Stream stream)
    Definition primitives.h:285
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:317
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    ArcTan2(Stream stream)
    Definition primitives.h:319
    -
    Definition primitives.h:300
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    ArcTan(Stream stream)
    Definition primitives.h:302
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:334
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    ArcTanh(Stream stream)
    Definition primitives.h:336
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:351
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    ArgPartition(Stream stream, int kth, int axis)
    Definition primitives.h:353
    -
    Definition primitives.h:371
    -
    ReduceType
    Definition primitives.h:373
    -
    @ ArgMin
    Definition primitives.h:374
    -
    @ ArgMax
    Definition primitives.h:375
    -
    ArgReduce(Stream stream, ReduceType reduce_type, int axis)
    Definition primitives.h:378
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:397
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    ArgSort(Stream stream, int axis)
    Definition primitives.h:399
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:436
    -
    AsStrided(Stream stream, std::vector< int > shape, std::vector< size_t > strides, size_t offset)
    Definition primitives.h:438
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:416
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    AsType(Stream stream, Dtype dtype)
    Definition primitives.h:418
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:463
    -
    BitwiseBinary(Stream stream, Op op)
    Definition primitives.h:467
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Op
    Definition primitives.h:465
    -
    @ And
    Definition primitives.h:465
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:482
    -
    std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
    The vector-Jacobian product.
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    BlockMaskedMM(Stream stream, int block_size)
    Definition primitives.h:484
    -
    Definition primitives.h:505
    -
    BlockSparseMM(Stream stream)
    Definition primitives.h:507
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
    The vector-Jacobian product.
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1470
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    BlockSparseQMM(Stream stream, int group_size, int bits, bool transpose)
    Definition primitives.h:1472
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:525
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Broadcast(Stream stream, const std::vector< int > &shape)
    Definition primitives.h:527
    -
    Definition primitives.h:544
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Ceil(Stream stream)
    Definition primitives.h:546
    -
    Definition primitives.h:2096
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Cholesky(Stream stream, bool upper)
    Definition primitives.h:2098
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:561
    -
    Compiled(Stream stream, std::vector< array > inputs, std::vector< array > outputs, std::vector< array > tape, std::unordered_set< uintptr_t > constant_ids)
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    -
    Definition primitives.h:604
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Concatenate(Stream stream, int axis)
    Definition primitives.h:606
    -
    Definition primitives.h:623
    -
    Conjugate(Stream stream)
    Definition primitives.h:625
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:639
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Convolution(Stream stream, const std::vector< int > &kernel_strides, const std::vector< int > &padding, const std::vector< int > &kernel_dilation, const std::vector< int > &input_dilation, const int groups=1, const bool flip=false)
    Definition primitives.h:641
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
    The vector-Jacobian product.
    -
    Definition primitives.h:680
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Copy(Stream stream)
    Definition primitives.h:682
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:697
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Cos(Stream stream)
    Definition primitives.h:699
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:714
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Cosh(Stream stream)
    Definition primitives.h:716
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:731
    -
    std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotan, const std::vector< int > &argnums, const std::vector< array > &outputs) override
    The vector-Jacobian product.
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    -
    CustomVJP(Stream stream, std::function< std::vector< array >(const std::vector< array > &, const std::vector< array > &, const std::vector< array > &)> fun)
    Definition primitives.h:733
    -
    Definition primitives.h:764
    -
    std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotan, const std::vector< int > &argnums, const std::vector< array > &outputs) override
    The vector-Jacobian product.
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    -
    Depends(Stream stream)
    Definition primitives.h:766
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    Definition primitives.h:802
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    DivMod(Stream stream)
    Definition primitives.h:804
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    -
    Definition primitives.h:785
    -
    Divide(Stream stream)
    Definition primitives.h:787
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:858
    -
    Equal(Stream stream, bool equal_nan=false)
    Definition primitives.h:860
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:884
    -
    Erf(Stream stream)
    Definition primitives.h:886
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:901
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    ErfInv(Stream stream)
    Definition primitives.h:903
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:918
    -
    Exp(Stream stream)
    Definition primitives.h:920
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:935
    -
    Expm1(Stream stream)
    Definition primitives.h:937
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:951
    -
    FFT(Stream stream, const std::vector< size_t > &axes, bool inverse, bool real)
    Definition primitives.h:953
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:977
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Floor(Stream stream)
    Definition primitives.h:979
    -
    Definition primitives.h:994
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Full(Stream stream)
    Definition primitives.h:996
    -
    Definition primitives.h:1010
    -
    Gather(Stream stream, const std::vector< int > &axes, const std::vector< int > &slice_sizes)
    Definition primitives.h:1012
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1049
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    GreaterEqual(Stream stream)
    Definition primitives.h:1051
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1032
    -
    Greater(Stream stream)
    Definition primitives.h:1034
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:2082
    -
    void eval_gpu(const std::vector< array > &inputs, array &output) override
    -
    Inverse(Stream stream)
    Definition primitives.h:2084
    -
    void eval_cpu(const std::vector< array > &inputs, array &output) override
    -
    Definition primitives.h:1083
    -
    LessEqual(Stream stream)
    Definition primitives.h:1085
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1066
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Less(Stream stream)
    Definition primitives.h:1068
    -
    Definition primitives.h:1100
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Load(Stream stream, std::shared_ptr< io::Reader > reader, size_t offset, bool swap_endianness=false)
    Definition primitives.h:1102
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1158
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Log1p(Stream stream)
    Definition primitives.h:1160
    -
    Definition primitives.h:1225
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    LogAddExp(Stream stream)
    Definition primitives.h:1227
    -
    Definition primitives.h:1124
    -
    Base
    Definition primitives.h:1126
    -
    Log(Stream stream, Base base)
    Definition primitives.h:1128
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1191
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    LogicalAnd(Stream stream)
    Definition primitives.h:1193
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1174
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    LogicalNot(Stream stream)
    Definition primitives.h:1176
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1208
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    LogicalOr(Stream stream)
    Definition primitives.h:1210
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1242
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs) override
    The vector-Jacobian product.
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Matmul(Stream stream)
    Definition primitives.h:1244
    -
    Definition primitives.h:1260
    -
    Maximum(Stream stream)
    Definition primitives.h:1262
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1277
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Minimum(Stream stream)
    Definition primitives.h:1279
    -
    Definition primitives.h:1294
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Multiply(Stream stream)
    Definition primitives.h:1296
    -
    Definition primitives.h:1311
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Negative(Stream stream)
    Definition primitives.h:1313
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1328
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    NotEqual(Stream stream)
    Definition primitives.h:1330
    -
    Definition primitives.h:1345
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    NumberOfElements(Stream stream, std::vector< int > axes, bool inverted, Dtype dtype)
    Definition primitives.h:1347
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1376
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Pad(Stream stream, const std::vector< int > &axes, const std::vector< int > &low_pad_size, const std::vector< int > &high_pad_size)
    Definition primitives.h:1378
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1404
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Partition(Stream stream, int kth, int axis)
    Definition primitives.h:1406
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1425
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Power(Stream stream)
    Definition primitives.h:1427
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:48
    -
    virtual void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs)=0
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    -
    virtual std::vector< array > vjp(const std::vector< array > &primals, const std::vector< array > &cotangents, const std::vector< int > &argnums, const std::vector< array > &outputs)
    The vector-Jacobian product.
    -
    virtual ~Primitive()=default
    -
    Primitive(const Primitive &other)=delete
    -
    Primitive(Primitive &&other)=delete
    -
    const Stream & stream()
    The stream the primitive will run on.
    Definition primitives.h:58
    -
    Primitive & operator=(Primitive &&other)=delete
    -
    virtual bool is_equivalent(const Primitive &other) const
    Equivalence check defaults to false unless overridden by the primitive.
    Definition primitives.h:107
    -
    Primitive & operator=(const Primitive &other)=delete
    -
    virtual std::vector< std::vector< int > > output_shapes(const std::vector< array > &inputs)
    Get the output shapes of the primitive.
    -
    const Device & device()
    The device the primitive will run on.
    Definition primitives.h:53
    -
    virtual std::vector< array > jvp(const std::vector< array > &primals, const std::vector< array > &tangents, const std::vector< int > &argnums)
    The Jacobian-vector product.
    -
    virtual std::pair< std::vector< array >, std::vector< int > > vmap(const std::vector< array > &inputs, const std::vector< int > &axes)
    The primitive must know how to vectorize itself across the given axes.
    -
    virtual void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs)=0
    -
    virtual void print(std::ostream &os)=0
    Print the primitive.
    -
    Primitive(Stream stream)
    Definition primitives.h:50
    -
    Definition primitives.h:2049
    -
    QRF(Stream stream)
    Definition primitives.h:2051
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    Definition primitives.h:1442
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    QuantizedMatmul(Stream stream, int group_size, int bits, bool transpose)
    Definition primitives.h:1444
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1498
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    RandomBits(Stream stream, const std::vector< int > &shape, int width)
    Definition primitives.h:1500
    -
    Definition primitives.h:1544
    -
    Reduce(Stream stream, ReduceType reduce_type, const std::vector< int > &axes)
    Definition primitives.h:1548
    -
    ReduceType
    Definition primitives.h:1546
    -
    @ And
    Definition primitives.h:1546
    -
    bool is_equivalent(const Primitive &other) const override
    Equivalence check defaults to false unless overridden by the primitive.
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:841
    -
    Remainder(Stream stream)
    Definition primitives.h:843
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1517
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Reshape(Stream stream, const std::vector< int > &shape)
    Definition primitives.h:1519
    -
    Definition primitives.h:1599
    -
    Round(Stream stream)
    Definition primitives.h:1601
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:2065
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    SVD(Stream stream)
    Definition primitives.h:2067
    -
    Definition primitives.h:1616
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    ReduceType
    Definition primitives.h:1618
    -
    @ Max
    Definition primitives.h:1618
    -
    bool is_equivalent(const Primitive &other) const override
    Equivalence check defaults to false unless overridden by the primitive.
    -
    Scan(Stream stream, ReduceType reduce_type, int axis, bool reverse, bool inclusive)
    Definition primitives.h:1620
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1667
    -
    bool is_equivalent(const Primitive &other) const override
    Equivalence check defaults to false unless overridden by the primitive.
    -
    ReduceType
    Definition primitives.h:1669
    -
    @ Max
    Definition primitives.h:1669
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void print(std::ostream &os) override
    Print the primitive.
    Definition primitives.h:1681
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Scatter(Stream stream, ReduceType reduce_type, const std::vector< int > &axes)
    Definition primitives.h:1671
    -
    Definition primitives.h:824
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Select(Stream stream)
    Definition primitives.h:826
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1708
    -
    Sigmoid(Stream stream)
    Definition primitives.h:1710
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1725
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Sign(Stream stream)
    Definition primitives.h:1727
    -
    Definition primitives.h:1742
    -
    Sin(Stream stream)
    Definition primitives.h:1744
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1759
    -
    Sinh(Stream stream)
    Definition primitives.h:1761
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1776
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Slice(Stream stream, const std::vector< int > &start_indices, const std::vector< int > &end_indices, const std::vector< int > &strides)
    Definition primitives.h:1778
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1812
    -
    SliceUpdate(Stream stream, const std::vector< int > &start_indices, const std::vector< int > &end_indices, const std::vector< int > &strides)
    Definition primitives.h:1814
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1842
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Softmax(Stream stream, bool precise)
    Definition primitives.h:1844
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1862
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Sort(Stream stream, int axis)
    Definition primitives.h:1864
    -
    Definition primitives.h:1882
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    -
    Split(Stream stream, const std::vector< int > &indices, int axis)
    Definition primitives.h:1884
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    -
    Definition primitives.h:1921
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Sqrt(Stream stream, bool recip=false)
    Definition primitives.h:1923
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1904
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Square(Stream stream)
    Definition primitives.h:1906
    -
    Definition primitives.h:1947
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    StopGradient(Stream stream)
    Definition primitives.h:1949
    -
    Definition primitives.h:1963
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Subtract(Stream stream)
    Definition primitives.h:1965
    -
    Definition primitives.h:1980
    -
    Tan(Stream stream)
    Definition primitives.h:1982
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:1997
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Tanh(Stream stream)
    Definition primitives.h:1999
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:2029
    -
    Transpose(Stream stream, const std::vector< int > &axes)
    Definition primitives.h:2031
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Definition primitives.h:127
    -
    UnaryPrimitive & operator=(const UnaryPrimitive &other)=delete
    -
    UnaryPrimitive(Stream stream)
    An abstract base class for a primitive with a single output.
    Definition primitives.h:132
    -
    virtual void eval_gpu(const std::vector< array > &inputs, array &output)=0
    -
    UnaryPrimitive(UnaryPrimitive &&other)=delete
    -
    virtual void eval_cpu(const std::vector< array > &inputs, array &output)=0
    -
    void eval_gpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    Definition primitives.h:142
    -
    UnaryPrimitive(const UnaryPrimitive &other)=delete
    -
    void eval_cpu(const std::vector< array > &inputs, std::vector< array > &outputs) override
    A primitive must know how to evaluate itself on the CPU/GPU for the given inputs and populate the out...
    Definition primitives.h:137
    -
    UnaryPrimitive & operator=(UnaryPrimitive &&other)=delete
    -
    virtual ~UnaryPrimitive()=default
    -
    Definition primitives.h:2014
    -
    void eval_cpu(const std::vector< array > &inputs, array &out) override
    -
    void eval_gpu(const std::vector< array > &inputs, array &out) override
    -
    Uniform(Stream stream)
    Definition primitives.h:2016
    -
    Definition array.h:20
    -
    Op op
    Definition binary.h:139
    - -
    array std(const array &a, bool keepdims, int ddof=0, StreamOrDevice s={})
    Computes the standard deviation of the elements of an array.
    -
    array transpose(const array &a, std::vector< int > axes, StreamOrDevice s={})
    Permutes the dimensions according to the given axes.
    - -
    Definition allocator.h:7
    -
    void eval(std::vector< array > outputs)
    -
    #define DEFINE_DEFAULT_IS_EQUIVALENT()
    Definition primitives.h:34
    -
    #define DEFINE_PRINT(PRIMITIVE)
    Definition primitives.h:29
    -
    #define DEFINE_INPUT_OUTPUT_SHAPE()
    Definition primitives.h:39
    -
    #define DEFINE_GRADS()
    Definition primitives.h:17
    -
    #define DEFINE_VMAP()
    Definition primitives.h:12
    - -
    Definition ops.h:24
    -
    Definition binary.h:254
    -
    Definition ops.h:159
    -
    Definition ops.h:139
    -
    Definition ops.h:17
    -
    Definition ops.h:61
    -
    Definition ops.h:119
    -
    Definition binary.h:261
    -
    Definition ops.h:99
    -
    Definition device.h:7
    -
    Definition dtype.h:15
    -
    Definition stream.h:9
    -
    Device device
    Definition stream.h:11
    -
    - - - - diff --git a/docs/build/html/python/_autosummary/mlx.core.Device.html b/docs/build/html/python/_autosummary/mlx.core.Device.html index 6cffffc6d..2186c574b 100644 --- a/docs/build/html/python/_autosummary/mlx.core.Device.html +++ b/docs/build/html/python/_autosummary/mlx.core.Device.html @@ -8,7 +8,7 @@ - mlx.core.Device — MLX 0.13.1 documentation + mlx.core.Device — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home +
    @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.Dtype.html b/docs/build/html/python/_autosummary/mlx.core.Dtype.html index 764810425..b56f91f33 100644 --- a/docs/build/html/python/_autosummary/mlx.core.Dtype.html +++ b/docs/build/html/python/_autosummary/mlx.core.Dtype.html @@ -8,7 +8,7 @@ - mlx.core.Dtype — MLX 0.13.1 documentation + mlx.core.Dtype — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.DtypeCategory.html b/docs/build/html/python/_autosummary/mlx.core.DtypeCategory.html index 2b0d2956e..583e750db 100644 --- a/docs/build/html/python/_autosummary/mlx.core.DtypeCategory.html +++ b/docs/build/html/python/_autosummary/mlx.core.DtypeCategory.html @@ -8,7 +8,7 @@ - mlx.core.DtypeCategory — MLX 0.13.1 documentation + mlx.core.DtypeCategory — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.Stream.html b/docs/build/html/python/_autosummary/mlx.core.Stream.html index 298ecee7e..fa032d3b8 100644 --- a/docs/build/html/python/_autosummary/mlx.core.Stream.html +++ b/docs/build/html/python/_autosummary/mlx.core.Stream.html @@ -8,7 +8,7 @@ - mlx.core.stream — MLX 0.13.1 documentation + mlx.core.stream — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.abs.html b/docs/build/html/python/_autosummary/mlx.core.abs.html index e2b11f486..98879acfb 100644 --- a/docs/build/html/python/_autosummary/mlx.core.abs.html +++ b/docs/build/html/python/_autosummary/mlx.core.abs.html @@ -8,7 +8,7 @@ - mlx.core.abs — MLX 0.13.1 documentation + mlx.core.abs — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.add.html b/docs/build/html/python/_autosummary/mlx.core.add.html index 16912e7a4..14407d57b 100644 --- a/docs/build/html/python/_autosummary/mlx.core.add.html +++ b/docs/build/html/python/_autosummary/mlx.core.add.html @@ -8,7 +8,7 @@ - mlx.core.add — MLX 0.13.1 documentation + mlx.core.add — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.addmm.html b/docs/build/html/python/_autosummary/mlx.core.addmm.html index 46f738eb8..889630702 100644 --- a/docs/build/html/python/_autosummary/mlx.core.addmm.html +++ b/docs/build/html/python/_autosummary/mlx.core.addmm.html @@ -8,7 +8,7 @@ - mlx.core.addmm — MLX 0.13.1 documentation + mlx.core.addmm — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.all.html b/docs/build/html/python/_autosummary/mlx.core.all.html index 2950767ab..b6b20e2db 100644 --- a/docs/build/html/python/_autosummary/mlx.core.all.html +++ b/docs/build/html/python/_autosummary/mlx.core.all.html @@ -8,7 +8,7 @@ - mlx.core.all — MLX 0.13.1 documentation + mlx.core.all — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.allclose.html b/docs/build/html/python/_autosummary/mlx.core.allclose.html index 88750657c..829af7bdc 100644 --- a/docs/build/html/python/_autosummary/mlx.core.allclose.html +++ b/docs/build/html/python/_autosummary/mlx.core.allclose.html @@ -8,7 +8,7 @@ - mlx.core.allclose — MLX 0.13.1 documentation + mlx.core.allclose — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.any.html b/docs/build/html/python/_autosummary/mlx.core.any.html index 5769a5fc1..5c5e3d1e1 100644 --- a/docs/build/html/python/_autosummary/mlx.core.any.html +++ b/docs/build/html/python/_autosummary/mlx.core.any.html @@ -8,7 +8,7 @@ - mlx.core.any — MLX 0.13.1 documentation + mlx.core.any — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.arange.html b/docs/build/html/python/_autosummary/mlx.core.arange.html index 5cb9be368..a2257b409 100644 --- a/docs/build/html/python/_autosummary/mlx.core.arange.html +++ b/docs/build/html/python/_autosummary/mlx.core.arange.html @@ -8,7 +8,7 @@ - mlx.core.arange — MLX 0.13.1 documentation + mlx.core.arange — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.arccos.html b/docs/build/html/python/_autosummary/mlx.core.arccos.html index 7f0c80745..066d51d75 100644 --- a/docs/build/html/python/_autosummary/mlx.core.arccos.html +++ b/docs/build/html/python/_autosummary/mlx.core.arccos.html @@ -8,7 +8,7 @@ - mlx.core.arccos — MLX 0.13.1 documentation + mlx.core.arccos — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.arccosh.html b/docs/build/html/python/_autosummary/mlx.core.arccosh.html index d2e2ff232..6bd3d10e3 100644 --- a/docs/build/html/python/_autosummary/mlx.core.arccosh.html +++ b/docs/build/html/python/_autosummary/mlx.core.arccosh.html @@ -8,7 +8,7 @@ - mlx.core.arccosh — MLX 0.13.1 documentation + mlx.core.arccosh — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.arcsin.html b/docs/build/html/python/_autosummary/mlx.core.arcsin.html index 1457e8d61..298ff2c4e 100644 --- a/docs/build/html/python/_autosummary/mlx.core.arcsin.html +++ b/docs/build/html/python/_autosummary/mlx.core.arcsin.html @@ -8,7 +8,7 @@ - mlx.core.arcsin — MLX 0.13.1 documentation + mlx.core.arcsin — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.arcsinh.html b/docs/build/html/python/_autosummary/mlx.core.arcsinh.html index be8cafaf2..3c9a713e2 100644 --- a/docs/build/html/python/_autosummary/mlx.core.arcsinh.html +++ b/docs/build/html/python/_autosummary/mlx.core.arcsinh.html @@ -8,7 +8,7 @@ - mlx.core.arcsinh — MLX 0.13.1 documentation + mlx.core.arcsinh — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.arctan.html b/docs/build/html/python/_autosummary/mlx.core.arctan.html index ec63f0fa6..5984e5d0a 100644 --- a/docs/build/html/python/_autosummary/mlx.core.arctan.html +++ b/docs/build/html/python/_autosummary/mlx.core.arctan.html @@ -8,7 +8,7 @@ - mlx.core.arctan — MLX 0.13.1 documentation + mlx.core.arctan — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.arctan2.html b/docs/build/html/python/_autosummary/mlx.core.arctan2.html index 2cd907560..85fb8c49e 100644 --- a/docs/build/html/python/_autosummary/mlx.core.arctan2.html +++ b/docs/build/html/python/_autosummary/mlx.core.arctan2.html @@ -8,7 +8,7 @@ - mlx.core.arctan2 — MLX 0.13.1 documentation + mlx.core.arctan2 — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.arctanh.html b/docs/build/html/python/_autosummary/mlx.core.arctanh.html index f3949aa19..7aaa6357d 100644 --- a/docs/build/html/python/_autosummary/mlx.core.arctanh.html +++ b/docs/build/html/python/_autosummary/mlx.core.arctanh.html @@ -8,7 +8,7 @@ - mlx.core.arctanh — MLX 0.13.1 documentation + mlx.core.arctanh — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.argmax.html b/docs/build/html/python/_autosummary/mlx.core.argmax.html index f0088ec49..ca8449e08 100644 --- a/docs/build/html/python/_autosummary/mlx.core.argmax.html +++ b/docs/build/html/python/_autosummary/mlx.core.argmax.html @@ -8,7 +8,7 @@ - mlx.core.argmax — MLX 0.13.1 documentation + mlx.core.argmax — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.argmin.html b/docs/build/html/python/_autosummary/mlx.core.argmin.html index 61813a963..2bf5a55f5 100644 --- a/docs/build/html/python/_autosummary/mlx.core.argmin.html +++ b/docs/build/html/python/_autosummary/mlx.core.argmin.html @@ -8,7 +8,7 @@ - mlx.core.argmin — MLX 0.13.1 documentation + mlx.core.argmin — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.argpartition.html b/docs/build/html/python/_autosummary/mlx.core.argpartition.html index b91aa18f4..7785fec9c 100644 --- a/docs/build/html/python/_autosummary/mlx.core.argpartition.html +++ b/docs/build/html/python/_autosummary/mlx.core.argpartition.html @@ -8,7 +8,7 @@ - mlx.core.argpartition — MLX 0.13.1 documentation + mlx.core.argpartition — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.argsort.html b/docs/build/html/python/_autosummary/mlx.core.argsort.html index 670cb4b4b..b6a6c69a2 100644 --- a/docs/build/html/python/_autosummary/mlx.core.argsort.html +++ b/docs/build/html/python/_autosummary/mlx.core.argsort.html @@ -8,7 +8,7 @@ - mlx.core.argsort — MLX 0.13.1 documentation + mlx.core.argsort — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.T.html b/docs/build/html/python/_autosummary/mlx.core.array.T.html index 2605cba58..4a5a4db6c 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.T.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.T.html @@ -8,7 +8,7 @@ - mlx.core.array.T — MLX 0.13.1 documentation + mlx.core.array.T — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.abs.html b/docs/build/html/python/_autosummary/mlx.core.array.abs.html index e5bc931d8..a4c503c3c 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.abs.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.abs.html @@ -8,7 +8,7 @@ - mlx.core.array.abs — MLX 0.13.1 documentation + mlx.core.array.abs — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.all.html b/docs/build/html/python/_autosummary/mlx.core.array.all.html index ee61f6e9c..c437fde3b 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.all.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.all.html @@ -8,7 +8,7 @@ - mlx.core.array.all — MLX 0.13.1 documentation + mlx.core.array.all — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.any.html b/docs/build/html/python/_autosummary/mlx.core.array.any.html index 9020538d8..72f2afd19 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.any.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.any.html @@ -8,7 +8,7 @@ - mlx.core.array.any — MLX 0.13.1 documentation + mlx.core.array.any — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.argmax.html b/docs/build/html/python/_autosummary/mlx.core.array.argmax.html index bd14709f7..37280ca48 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.argmax.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.argmax.html @@ -8,7 +8,7 @@ - mlx.core.array.argmax — MLX 0.13.1 documentation + mlx.core.array.argmax — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.argmin.html b/docs/build/html/python/_autosummary/mlx.core.array.argmin.html index 4fc232382..1bf5183c5 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.argmin.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.argmin.html @@ -8,7 +8,7 @@ - mlx.core.array.argmin — MLX 0.13.1 documentation + mlx.core.array.argmin — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.astype.html b/docs/build/html/python/_autosummary/mlx.core.array.astype.html index bc1746ce5..a86bda4e1 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.astype.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.astype.html @@ -8,7 +8,7 @@ - mlx.core.array.astype — MLX 0.13.1 documentation + mlx.core.array.astype — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.at.html b/docs/build/html/python/_autosummary/mlx.core.array.at.html index c931d973e..76898890b 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.at.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.at.html @@ -8,7 +8,7 @@ - mlx.core.array.at — MLX 0.13.1 documentation + mlx.core.array.at — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.cos.html b/docs/build/html/python/_autosummary/mlx.core.array.cos.html index edfd5f0cc..e9a75d130 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.cos.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.cos.html @@ -8,7 +8,7 @@ - mlx.core.array.cos — MLX 0.13.1 documentation + mlx.core.array.cos — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.cummax.html b/docs/build/html/python/_autosummary/mlx.core.array.cummax.html index 42f09aba2..01741e14f 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.cummax.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.cummax.html @@ -8,7 +8,7 @@ - mlx.core.array.cummax — MLX 0.13.1 documentation + mlx.core.array.cummax — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.cummin.html b/docs/build/html/python/_autosummary/mlx.core.array.cummin.html index 795fcfb84..863b116bd 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.cummin.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.cummin.html @@ -8,7 +8,7 @@ - mlx.core.array.cummin — MLX 0.13.1 documentation + mlx.core.array.cummin — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.cumprod.html b/docs/build/html/python/_autosummary/mlx.core.array.cumprod.html index 411278c7c..c6ca889b0 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.cumprod.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.cumprod.html @@ -8,7 +8,7 @@ - mlx.core.array.cumprod — MLX 0.13.1 documentation + mlx.core.array.cumprod — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.cumsum.html b/docs/build/html/python/_autosummary/mlx.core.array.cumsum.html index 1553900d0..ccebcdebb 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.cumsum.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.cumsum.html @@ -8,7 +8,7 @@ - mlx.core.array.cumsum — MLX 0.13.1 documentation + mlx.core.array.cumsum — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.diag.html b/docs/build/html/python/_autosummary/mlx.core.array.diag.html index ab5bdb823..90c26c773 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.diag.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.diag.html @@ -8,7 +8,7 @@ - mlx.core.array.diag — MLX 0.13.1 documentation + mlx.core.array.diag — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.diagonal.html b/docs/build/html/python/_autosummary/mlx.core.array.diagonal.html index 8478bb11a..cf8650ca6 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.diagonal.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.diagonal.html @@ -8,7 +8,7 @@ - mlx.core.array.diagonal — MLX 0.13.1 documentation + mlx.core.array.diagonal — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.dtype.html b/docs/build/html/python/_autosummary/mlx.core.array.dtype.html index b510587f2..fe578c0b2 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.dtype.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.dtype.html @@ -8,7 +8,7 @@ - mlx.core.array.dtype — MLX 0.13.1 documentation + mlx.core.array.dtype — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.exp.html b/docs/build/html/python/_autosummary/mlx.core.array.exp.html index e2b23ece9..2c6331d99 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.exp.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.exp.html @@ -8,7 +8,7 @@ - mlx.core.array.exp — MLX 0.13.1 documentation + mlx.core.array.exp — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.flatten.html b/docs/build/html/python/_autosummary/mlx.core.array.flatten.html index 57554f782..18df78216 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.flatten.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.flatten.html @@ -8,7 +8,7 @@ - mlx.core.array.flatten — MLX 0.13.1 documentation + mlx.core.array.flatten — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.html b/docs/build/html/python/_autosummary/mlx.core.array.html index 4719bd96d..a6502e947 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.html @@ -8,7 +8,7 @@ - mlx.core.array — MLX 0.13.1 documentation + mlx.core.array — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.item.html b/docs/build/html/python/_autosummary/mlx.core.array.item.html index d0ef5e1b5..001c7f61e 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.item.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.item.html @@ -8,7 +8,7 @@ - mlx.core.array.item — MLX 0.13.1 documentation + mlx.core.array.item — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.itemsize.html b/docs/build/html/python/_autosummary/mlx.core.array.itemsize.html index 94cc13b64..2e218a91e 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.itemsize.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.itemsize.html @@ -8,7 +8,7 @@ - mlx.core.array.itemsize — MLX 0.13.1 documentation + mlx.core.array.itemsize — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.log.html b/docs/build/html/python/_autosummary/mlx.core.array.log.html index dd6eb2c32..286a5628c 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.log.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.log.html @@ -8,7 +8,7 @@ - mlx.core.array.log — MLX 0.13.1 documentation + mlx.core.array.log — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.log10.html b/docs/build/html/python/_autosummary/mlx.core.array.log10.html index f388b5e27..6f654525c 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.log10.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.log10.html @@ -8,7 +8,7 @@ - mlx.core.array.log10 — MLX 0.13.1 documentation + mlx.core.array.log10 — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.log1p.html b/docs/build/html/python/_autosummary/mlx.core.array.log1p.html index 4add6c1fa..8d2450b64 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.log1p.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.log1p.html @@ -8,7 +8,7 @@ - mlx.core.array.log1p — MLX 0.13.1 documentation + mlx.core.array.log1p — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.log2.html b/docs/build/html/python/_autosummary/mlx.core.array.log2.html index 7300e0239..c0f361c46 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.log2.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.log2.html @@ -8,7 +8,7 @@ - mlx.core.array.log2 — MLX 0.13.1 documentation + mlx.core.array.log2 — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.logsumexp.html b/docs/build/html/python/_autosummary/mlx.core.array.logsumexp.html index 3e55a8f79..462a248ad 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.logsumexp.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.logsumexp.html @@ -8,7 +8,7 @@ - mlx.core.array.logsumexp — MLX 0.13.1 documentation + mlx.core.array.logsumexp — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.max.html b/docs/build/html/python/_autosummary/mlx.core.array.max.html index 78e49545c..17d7709a4 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.max.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.max.html @@ -8,7 +8,7 @@ - mlx.core.array.max — MLX 0.13.1 documentation + mlx.core.array.max — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.mean.html b/docs/build/html/python/_autosummary/mlx.core.array.mean.html index 35d498619..482ab4b67 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.mean.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.mean.html @@ -8,7 +8,7 @@ - mlx.core.array.mean — MLX 0.13.1 documentation + mlx.core.array.mean — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.min.html b/docs/build/html/python/_autosummary/mlx.core.array.min.html index 5b36d4527..c5bc161a3 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.min.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.min.html @@ -8,7 +8,7 @@ - mlx.core.array.min — MLX 0.13.1 documentation + mlx.core.array.min — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.moveaxis.html b/docs/build/html/python/_autosummary/mlx.core.array.moveaxis.html index 229b6b58b..eece5a2fa 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.moveaxis.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.moveaxis.html @@ -8,7 +8,7 @@ - mlx.core.array.moveaxis — MLX 0.13.1 documentation + mlx.core.array.moveaxis — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.nbytes.html b/docs/build/html/python/_autosummary/mlx.core.array.nbytes.html index 7e17cbd75..7706de704 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.nbytes.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.nbytes.html @@ -8,7 +8,7 @@ - mlx.core.array.nbytes — MLX 0.13.1 documentation + mlx.core.array.nbytes — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.ndim.html b/docs/build/html/python/_autosummary/mlx.core.array.ndim.html index 4fe9d618b..d5dcf728b 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.ndim.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.ndim.html @@ -8,7 +8,7 @@ - mlx.core.array.ndim — MLX 0.13.1 documentation + mlx.core.array.ndim — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.prod.html b/docs/build/html/python/_autosummary/mlx.core.array.prod.html index 856dc864b..e508bc988 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.prod.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.prod.html @@ -8,7 +8,7 @@ - mlx.core.array.prod — MLX 0.13.1 documentation + mlx.core.array.prod — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.reciprocal.html b/docs/build/html/python/_autosummary/mlx.core.array.reciprocal.html index 59e74d9af..3ce302305 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.reciprocal.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.reciprocal.html @@ -8,7 +8,7 @@ - mlx.core.array.reciprocal — MLX 0.13.1 documentation + mlx.core.array.reciprocal — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.reshape.html b/docs/build/html/python/_autosummary/mlx.core.array.reshape.html index 57d3e0f05..3441d6135 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.reshape.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.reshape.html @@ -8,7 +8,7 @@ - mlx.core.array.reshape — MLX 0.13.1 documentation + mlx.core.array.reshape — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.round.html b/docs/build/html/python/_autosummary/mlx.core.array.round.html index 4d89c8129..e29dcdf31 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.round.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.round.html @@ -8,7 +8,7 @@ - mlx.core.array.round — MLX 0.13.1 documentation + mlx.core.array.round — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.rsqrt.html b/docs/build/html/python/_autosummary/mlx.core.array.rsqrt.html index d1d1c8341..b0e4d1b79 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.rsqrt.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.rsqrt.html @@ -8,7 +8,7 @@ - mlx.core.array.rsqrt — MLX 0.13.1 documentation + mlx.core.array.rsqrt — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.shape.html b/docs/build/html/python/_autosummary/mlx.core.array.shape.html index 713b95131..6f6c9fc93 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.shape.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.shape.html @@ -8,7 +8,7 @@ - mlx.core.array.shape — MLX 0.13.1 documentation + mlx.core.array.shape — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.sin.html b/docs/build/html/python/_autosummary/mlx.core.array.sin.html index c87949c8c..2f72d2421 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.sin.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.sin.html @@ -8,7 +8,7 @@ - mlx.core.array.sin — MLX 0.13.1 documentation + mlx.core.array.sin — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.size.html b/docs/build/html/python/_autosummary/mlx.core.array.size.html index d9326e77f..fef78bcd8 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.size.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.size.html @@ -8,7 +8,7 @@ - mlx.core.array.size — MLX 0.13.1 documentation + mlx.core.array.size — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.split.html b/docs/build/html/python/_autosummary/mlx.core.array.split.html index 7bb4fe4b8..e1f45cc6f 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.split.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.split.html @@ -8,7 +8,7 @@ - mlx.core.array.split — MLX 0.13.1 documentation + mlx.core.array.split — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.sqrt.html b/docs/build/html/python/_autosummary/mlx.core.array.sqrt.html index 324822d51..07a0f448a 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.sqrt.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.sqrt.html @@ -8,7 +8,7 @@ - mlx.core.array.sqrt — MLX 0.13.1 documentation + mlx.core.array.sqrt — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.square.html b/docs/build/html/python/_autosummary/mlx.core.array.square.html index 0de534110..85737c22b 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.square.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.square.html @@ -8,7 +8,7 @@ - mlx.core.array.square — MLX 0.13.1 documentation + mlx.core.array.square — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.squeeze.html b/docs/build/html/python/_autosummary/mlx.core.array.squeeze.html index 5e26523b1..045061c20 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.squeeze.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.squeeze.html @@ -8,7 +8,7 @@ - mlx.core.array.squeeze — MLX 0.13.1 documentation + mlx.core.array.squeeze — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.sum.html b/docs/build/html/python/_autosummary/mlx.core.array.sum.html index e040565d0..668028264 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.sum.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.sum.html @@ -8,7 +8,7 @@ - mlx.core.array.sum — MLX 0.13.1 documentation + mlx.core.array.sum — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.swapaxes.html b/docs/build/html/python/_autosummary/mlx.core.array.swapaxes.html index 15d2070b6..0dd2ccbfa 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.swapaxes.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.swapaxes.html @@ -8,7 +8,7 @@ - mlx.core.array.swapaxes — MLX 0.13.1 documentation + mlx.core.array.swapaxes — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.tolist.html b/docs/build/html/python/_autosummary/mlx.core.array.tolist.html index c6489491a..2ecf6e773 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.tolist.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.tolist.html @@ -8,7 +8,7 @@ - mlx.core.array.tolist — MLX 0.13.1 documentation + mlx.core.array.tolist — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.transpose.html b/docs/build/html/python/_autosummary/mlx.core.array.transpose.html index eba7ab2a7..af85eee44 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.transpose.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.transpose.html @@ -8,7 +8,7 @@ - mlx.core.array.transpose — MLX 0.13.1 documentation + mlx.core.array.transpose — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array.var.html b/docs/build/html/python/_autosummary/mlx.core.array.var.html index e46c6d73b..ff779fba3 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array.var.html +++ b/docs/build/html/python/_autosummary/mlx.core.array.var.html @@ -8,7 +8,7 @@ - mlx.core.array.var — MLX 0.13.1 documentation + mlx.core.array.var — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.array_equal.html b/docs/build/html/python/_autosummary/mlx.core.array_equal.html index fe09819df..c6f887da6 100644 --- a/docs/build/html/python/_autosummary/mlx.core.array_equal.html +++ b/docs/build/html/python/_autosummary/mlx.core.array_equal.html @@ -8,7 +8,7 @@ - mlx.core.array_equal — MLX 0.13.1 documentation + mlx.core.array_equal — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.as_strided.html b/docs/build/html/python/_autosummary/mlx.core.as_strided.html index 77aa435c7..941b0734a 100644 --- a/docs/build/html/python/_autosummary/mlx.core.as_strided.html +++ b/docs/build/html/python/_autosummary/mlx.core.as_strided.html @@ -8,7 +8,7 @@ - mlx.core.as_strided — MLX 0.13.1 documentation + mlx.core.as_strided — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.atleast_1d.html b/docs/build/html/python/_autosummary/mlx.core.atleast_1d.html index 1a5aaef11..fd1b08ee3 100644 --- a/docs/build/html/python/_autosummary/mlx.core.atleast_1d.html +++ b/docs/build/html/python/_autosummary/mlx.core.atleast_1d.html @@ -8,7 +8,7 @@ - mlx.core.atleast_1d — MLX 0.13.1 documentation + mlx.core.atleast_1d — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.atleast_2d.html b/docs/build/html/python/_autosummary/mlx.core.atleast_2d.html index 130c43c4b..52b20db53 100644 --- a/docs/build/html/python/_autosummary/mlx.core.atleast_2d.html +++ b/docs/build/html/python/_autosummary/mlx.core.atleast_2d.html @@ -8,7 +8,7 @@ - mlx.core.atleast_2d — MLX 0.13.1 documentation + mlx.core.atleast_2d — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.atleast_3d.html b/docs/build/html/python/_autosummary/mlx.core.atleast_3d.html index 5e59137a9..ebfb459bb 100644 --- a/docs/build/html/python/_autosummary/mlx.core.atleast_3d.html +++ b/docs/build/html/python/_autosummary/mlx.core.atleast_3d.html @@ -8,7 +8,7 @@ - mlx.core.atleast_3d — MLX 0.13.1 documentation + mlx.core.atleast_3d — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.bitwise_and.html b/docs/build/html/python/_autosummary/mlx.core.bitwise_and.html index ad2a601f4..4dee8aac4 100644 --- a/docs/build/html/python/_autosummary/mlx.core.bitwise_and.html +++ b/docs/build/html/python/_autosummary/mlx.core.bitwise_and.html @@ -8,7 +8,7 @@ - mlx.core.bitwise_and — MLX 0.13.1 documentation + mlx.core.bitwise_and — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.bitwise_or.html b/docs/build/html/python/_autosummary/mlx.core.bitwise_or.html index 0286ee954..9621609f8 100644 --- a/docs/build/html/python/_autosummary/mlx.core.bitwise_or.html +++ b/docs/build/html/python/_autosummary/mlx.core.bitwise_or.html @@ -8,7 +8,7 @@ - mlx.core.bitwise_or — MLX 0.13.1 documentation + mlx.core.bitwise_or — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.bitwise_xor.html b/docs/build/html/python/_autosummary/mlx.core.bitwise_xor.html index 54443a32c..7740949d7 100644 --- a/docs/build/html/python/_autosummary/mlx.core.bitwise_xor.html +++ b/docs/build/html/python/_autosummary/mlx.core.bitwise_xor.html @@ -8,7 +8,7 @@ - mlx.core.bitwise_xor — MLX 0.13.1 documentation + mlx.core.bitwise_xor — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -131,8 +131,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -271,7 +271,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -305,6 +304,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -385,6 +386,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • diff --git a/docs/build/html/python/_autosummary/mlx.core.block_masked_mm.html b/docs/build/html/python/_autosummary/mlx.core.block_masked_mm.html index 8a269bc1c..2aff2b551 100644 --- a/docs/build/html/python/_autosummary/mlx.core.block_masked_mm.html +++ b/docs/build/html/python/_autosummary/mlx.core.block_masked_mm.html @@ -8,7 +8,7 @@ - mlx.core.block_masked_mm — MLX 0.13.1 documentation + mlx.core.block_masked_mm — MLX 0.14.0 documentation @@ -36,7 +36,7 @@ - + @@ -44,7 +44,7 @@ - + @@ -132,8 +132,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -272,7 +272,6 @@
  • mlx.core.bitwise_or
  • mlx.core.bitwise_xor
  • mlx.core.block_masked_mm
  • -
  • mlx.core.block_sparse_mm
  • mlx.core.broadcast_to
  • mlx.core.ceil
  • mlx.core.clip
  • @@ -306,6 +305,8 @@
  • mlx.core.floor
  • mlx.core.floor_divide
  • mlx.core.full
  • +
  • mlx.core.gather_mm
  • +
  • mlx.core.gather_qmm
  • mlx.core.greater
  • mlx.core.greater_equal
  • mlx.core.identity
  • @@ -386,6 +387,7 @@
  • mlx.core.tensordot
  • mlx.core.tile
  • mlx.core.topk
  • +
  • mlx.core.trace
  • mlx.core.transpose
  • mlx.core.tri
  • mlx.core.tril
  • @@ -830,9 +832,9 @@ of size block_size<
  • a (array) – Input array or scalar.

  • b (array) – Input array or scalar.

  • block_size (int) – Size of blocks to be masked. Must be 32 or 64 (default: 64)

  • -
  • mask_out (array, optional) – Boolean mask for output (default: None)

  • -
  • mask_lhs (array, optional) – Boolean mask for a (default: None)

  • -
  • mask_rhs (array, optional) – Boolean mask for b (default: None)

  • +
  • mask_out (array, optional) – Mask for output (default: None)

  • +
  • mask_lhs (array, optional) – Mask for a (default: None)

  • +
  • mask_rhs (array, optional) – Mask for b (default: None)

  • @@ -861,11 +863,11 @@ of size block_size<

    next

    -

    mlx.core.block_sparse_mm

    +

    mlx.core.broadcast_to

    diff --git a/docs/build/html/python/_autosummary/mlx.core.block_sparse_mm.html b/docs/build/html/python/_autosummary/mlx.core.block_sparse_mm.html index eaf20c1c8..1c57fc76d 100644 --- a/docs/build/html/python/_autosummary/mlx.core.block_sparse_mm.html +++ b/docs/build/html/python/_autosummary/mlx.core.block_sparse_mm.html @@ -8,7 +8,7 @@ - mlx.core.block_sparse_mm — MLX 0.13.1 documentation + mlx.core.block_sparse_mm — MLX 0.14.0 documentation @@ -36,15 +36,13 @@ - + - - @@ -131,8 +129,8 @@ - MLX 0.13.1 documentation - Home - + MLX 0.14.0 documentation - Home + @@ -172,7 +170,7 @@
  • LLM inference
  • Python API Reference

    -