2024-10-15 23:12:17 +08:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=11" / >
< meta name = "generator" content = "Doxygen 1.12.0" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< title > MLX: mlx/linalg.h File Reference< / title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
< script type = "text/javascript" src = "clipboard.js" > < / script >
< link href = "navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "resize.js" > < / script >
< script type = "text/javascript" src = "cookie.js" > < / script >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "search/searchdata.js" > < / script >
< script type = "text/javascript" src = "search/search.js" > < / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr id = "projectrow" >
< td id = "projectalign" >
< div id = "projectname" > MLX
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
< / script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
< / script >
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search',false);
$(function() { init_search(); });
});
/* @license-end */
< / script >
< div id = "main-nav" > < / div >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
< / script >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< div id = "MSearchResults" >
< div class = "SRPage" >
< div id = "SRIndex" >
< div id = "SRResults" > < / div >
< div class = "SRStatus" id = "Loading" > Loading...< / div >
< div class = "SRStatus" id = "Searching" > Searching...< / div >
< div class = "SRStatus" id = "NoMatches" > No Matches< / div >
< / div >
< / div >
< / div >
< / div >
< div id = "nav-path" class = "navpath" >
< ul >
< li class = "navelem" > < a class = "el" href = "dir_938ab0ecf10b8b860ff766c820f665fd.html" > mlx< / a > < / li > < / ul >
< / div >
< / div > <!-- top -->
< div id = "doc-content" >
< div class = "header" >
< div class = "summary" >
< a href = "#namespaces" > Namespaces< / a > |
< a href = "#func-members" > Functions< / a > < / div >
< div class = "headertitle" > < div class = "title" > linalg.h File Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< div class = "textblock" > < code > #include < optional> < / code > < br / >
< code > #include " < a class = "el" href = "array_8h_source.html" > mlx/array.h< / a > " < / code > < br / >
< code > #include " < a class = "el" href = "device_8h_source.html" > mlx/device.h< / a > " < / code > < br / >
< code > #include " < a class = "el" href = "ops_8h_source.html" > mlx/ops.h< / a > " < / code > < br / >
< code > #include " < a class = "el" href = "stream_8h_source.html" > mlx/stream.h< / a > " < / code > < br / >
< / div >
< p > < a href = "linalg_8h_source.html" > Go to the source code of this file.< / a > < / p >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "namespaces" name = "namespaces" > < / a >
Namespaces< / h2 > < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > namespace   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx.html" > mlx< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > namespace   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core.html" > mlx::core< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > namespace   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html" > mlx::core::linalg< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "func-members" name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
< tr class = "memitem:aba765b8e95e9a1d33d31f727a185919d" id = "r_aba765b8e95e9a1d33d31f727a185919d" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#aba765b8e95e9a1d33d31f727a185919d" > mlx::core::linalg::norm< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, const double ord, const std::optional< std::vector< int > > & axis=std::nullopt, bool keepdims=false, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "memdesc:aba765b8e95e9a1d33d31f727a185919d" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Compute vector or matrix norms. < br / > < / td > < / tr >
< tr class = "separator:aba765b8e95e9a1d33d31f727a185919d" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:acaa85b4146821c268abecec2422c02d2" id = "r_acaa85b4146821c268abecec2422c02d2" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#acaa85b4146821c268abecec2422c02d2" > mlx::core::linalg::norm< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, const double ord, int axis, bool keepdims=false, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:acaa85b4146821c268abecec2422c02d2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:af1ebe0c6dcba9a1c49b5e397dddf3264" id = "r_af1ebe0c6dcba9a1c49b5e397dddf3264" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#af1ebe0c6dcba9a1c49b5e397dddf3264" > mlx::core::linalg::norm< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, const std::string & ord, const std::optional< std::vector< int > > & axis=std::nullopt, bool keepdims=false, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:af1ebe0c6dcba9a1c49b5e397dddf3264" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ae8da67e4c6e073f93889f1051203cd9e" id = "r_ae8da67e4c6e073f93889f1051203cd9e" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#ae8da67e4c6e073f93889f1051203cd9e" > mlx::core::linalg::norm< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, const std::string & ord, int axis, bool keepdims=false, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:ae8da67e4c6e073f93889f1051203cd9e" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a229018071d5602e38d6248230f334a10" id = "r_a229018071d5602e38d6248230f334a10" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#a229018071d5602e38d6248230f334a10" > mlx::core::linalg::norm< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, const std::optional< std::vector< int > > & axis=std::nullopt, bool keepdims=false, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:a229018071d5602e38d6248230f334a10" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a44250cff34238f01471fd61e76036f03" id = "r_a44250cff34238f01471fd61e76036f03" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#a44250cff34238f01471fd61e76036f03" > mlx::core::linalg::norm< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, int axis, bool keepdims=false, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:a44250cff34238f01471fd61e76036f03" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ae6d97829459353fe3b31c8a0867c0ca2" id = "r_ae6d97829459353fe3b31c8a0867c0ca2" > < td class = "memItemLeft" align = "right" valign = "top" > std::pair< < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > , < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#ae6d97829459353fe3b31c8a0867c0ca2" > mlx::core::linalg::qr< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:ae6d97829459353fe3b31c8a0867c0ca2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a64364b880e99914cf47bf756fa8dbaf0" id = "r_a64364b880e99914cf47bf756fa8dbaf0" > < td class = "memItemLeft" align = "right" valign = "top" > std::vector< < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#a64364b880e99914cf47bf756fa8dbaf0" > mlx::core::linalg::svd< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:a64364b880e99914cf47bf756fa8dbaf0" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ad966a0b6bff176c9f933534ed62389a2" id = "r_ad966a0b6bff176c9f933534ed62389a2" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#ad966a0b6bff176c9f933534ed62389a2" > mlx::core::linalg::inv< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:ad966a0b6bff176c9f933534ed62389a2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aba1994571326326717b5b5e38c2e0661" id = "r_aba1994571326326717b5b5e38c2e0661" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#aba1994571326326717b5b5e38c2e0661" > mlx::core::linalg::tri_inv< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, bool upper=false, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:aba1994571326326717b5b5e38c2e0661" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a46c8a4f806f0a97a4323e91189aa512b" id = "r_a46c8a4f806f0a97a4323e91189aa512b" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#a46c8a4f806f0a97a4323e91189aa512b" > mlx::core::linalg::cholesky< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, bool upper=false, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:a46c8a4f806f0a97a4323e91189aa512b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ad9f8348091e5ff4f74ad456e9fbd3e01" id = "r_ad9f8348091e5ff4f74ad456e9fbd3e01" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#ad9f8348091e5ff4f74ad456e9fbd3e01" > mlx::core::linalg::pinv< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:ad9f8348091e5ff4f74ad456e9fbd3e01" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aef0fe4894c5cf98792d59859c6d20511" id = "r_aef0fe4894c5cf98792d59859c6d20511" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#aef0fe4894c5cf98792d59859c6d20511" > mlx::core::linalg::cholesky_inv< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, bool upper=false, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:aef0fe4894c5cf98792d59859c6d20511" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:abcda3fbda45183c21e7f27aa0dde64e6" id = "r_abcda3fbda45183c21e7f27aa0dde64e6" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#abcda3fbda45183c21e7f27aa0dde64e6" > mlx::core::linalg::cross< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & b, int axis=-1, < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "memdesc:abcda3fbda45183c21e7f27aa0dde64e6" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Compute the cross product of two arrays along the given axis. < br / > < / td > < / tr >
< tr class = "separator:abcda3fbda45183c21e7f27aa0dde64e6" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-10-26 04:23:45 +08:00
< tr class = "memitem:a00c8e24432b0773dac64b8602bd142ba" id = "r_a00c8e24432b0773dac64b8602bd142ba" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#a00c8e24432b0773dac64b8602bd142ba" > mlx::core::linalg::eigvalsh< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, std::string UPLO=" L" , < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:a00c8e24432b0773dac64b8602bd142ba" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a2180be504f639fd471ea622641c1b0ca" id = "r_a2180be504f639fd471ea622641c1b0ca" > < td class = "memItemLeft" align = "right" valign = "top" > std::pair< < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > , < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacemlx_1_1core_1_1linalg.html#a2180be504f639fd471ea622641c1b0ca" > mlx::core::linalg::eigh< / a > (const < a class = "el" href = "classmlx_1_1core_1_1array.html" > array< / a > & a, std::string UPLO=" L" , < a class = "el" href = "namespacemlx_1_1core.html#a95fc1013cc48fbfee0c54310711a5e58" > StreamOrDevice< / a > s={})< / td > < / tr >
< tr class = "separator:a2180be504f639fd471ea622641c1b0ca" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-10-15 23:12:17 +08:00
< / table >
< / div > <!-- contents -->
<!-- start footer part -->
< hr class = "footer" / > < address class = "footer" > < small >
Generated by  < a href = "https://www.doxygen.org/index.html" > < img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" / > < / a > 1.12.0
< / small > < / address >
< / div > <!-- doc - content -->
< / body >
< / html >