Skip to content

Commit

Permalink
Deploying to gh-pages from @ dba66cc 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanwm committed Jul 27, 2024
1 parent 7214e1c commit 1743fc8
Show file tree
Hide file tree
Showing 14 changed files with 400 additions and 456 deletions.
69 changes: 35 additions & 34 deletions classTensor-members.html

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions classTensor.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
Expand All @@ -83,6 +84,12 @@
<p>Basic tensor class.
<a href="classTensor.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a5ba0344a1e45d164fcfb8f05f8bbbc9f"><td class="memItemLeft" align="right" valign="top"><a id="a5ba0344a1e45d164fcfb8f05f8bbbc9f"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>indexType</b> = std::variant&lt; int, std::string &gt;</td></tr>
<tr class="separator:a5ba0344a1e45d164fcfb8f05f8bbbc9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0dba8476df4f61a625a7d836fd4c4646"><td class="memItemLeft" align="right" valign="top"><a id="a0dba8476df4f61a625a7d836fd4c4646"></a>
Expand Down Expand Up @@ -293,8 +300,8 @@
<p>For example </p><div class="fragment"><div class="line"><a class="code" href="classTensor.html">Tensor</a> t;</div>
<div class="line">t.<a class="code" href="classTensor.html#a6df303cfa5b246020b4cf0922e447b9c">ones</a>({3,3}).dType(NTdtypes::kFloat).<a class="code" href="classTensor.html#a54b317bee953ffa8463122635afcd369">device</a>(NTdtypes::kGPU);</div>
<div class="ttc" id="aclassTensor_html"><div class="ttname"><a href="classTensor.html">Tensor</a></div><div class="ttdoc">Basic tensor class.</div><div class="ttdef"><b>Definition:</b> tensor.hpp:16</div></div>
<div class="ttc" id="aclassTensor_html_a54b317bee953ffa8463122635afcd369"><div class="ttname"><a href="classTensor.html#a54b317bee953ffa8463122635afcd369">Tensor::device</a></div><div class="ttdeci">Tensor &amp; device(NTdtypes::deviceType device)</div><div class="ttdoc">Set the device that this tensor lives on.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:56</div></div>
<div class="ttc" id="aclassTensor_html_a6df303cfa5b246020b4cf0922e447b9c"><div class="ttname"><a href="classTensor.html#a6df303cfa5b246020b4cf0922e447b9c">Tensor::ones</a></div><div class="ttdeci">Tensor &amp; ones(int length, NTdtypes::scalarType type, NTdtypes::deviceType device=NTdtypes::kCPU, bool requiresGrad=true)</div><div class="ttdoc">Initialise this tensor with ones.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:19</div></div>
<div class="ttc" id="aclassTensor_html_a54b317bee953ffa8463122635afcd369"><div class="ttname"><a href="classTensor.html#a54b317bee953ffa8463122635afcd369">Tensor::device</a></div><div class="ttdeci">Tensor &amp; device(NTdtypes::deviceType device)</div><div class="ttdoc">Set the device that this tensor lives on.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:59</div></div>
<div class="ttc" id="aclassTensor_html_a6df303cfa5b246020b4cf0922e447b9c"><div class="ttname"><a href="classTensor.html#a6df303cfa5b246020b4cf0922e447b9c">Tensor::ones</a></div><div class="ttdeci">Tensor &amp; ones(int length, NTdtypes::scalarType type, NTdtypes::deviceType device=NTdtypes::kCPU, bool requiresGrad=true)</div><div class="ttdoc">Initialise this tensor with ones.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:20</div></div>
</div><!-- fragment --><p> will get you a 3x3 tensor of floats that lives on the GPU. This is equivalent to </p><div class="fragment"><div class="line"><a class="code" href="classTensor.html">Tensor</a> t;</div>
<div class="line">t.<a class="code" href="classTensor.html#a6df303cfa5b246020b4cf0922e447b9c">ones</a>({3,3}, NTdtypes::kFloat, NTdtypes::kGPU);</div>
</div><!-- fragment --> </div><h2 class="groupheader">Member Function Documentation</h2>
Expand Down
16 changes: 8 additions & 8 deletions const-density-solver_8hpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; diagMassMatrix.<a class="code" href="classTensor.html#acda45d6bb19fe1566f2d75c97e99c7a8">requiresGrad</a>(<span class="keyword">false</span>);</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; nGenerations; i++)</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; {</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keywordtype">float</span> m_i = masses.<a class="code" href="classTensor.html#a09aececd96cf2472beba69b8645f4b8a">getValue</a>&lt;<span class="keywordtype">float</span>&gt;({0, i});</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keyword">auto</span> m_i = masses.<a class="code" href="classTensor.html#a09aececd96cf2472beba69b8645f4b8a">getValue</a>&lt;<span class="keywordtype">float</span>&gt;({0, i});</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; diagMassMatrix.<a class="code" href="classTensor.html#a1fe34f8072b6b29ab72777f45010ae97">setValue</a>({0, i, i}, m_i * m_i / 2.0);</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; };</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; diagMassMatrix.<a class="code" href="classTensor.html#acda45d6bb19fe1566f2d75c97e99c7a8">requiresGrad</a>(<span class="keyword">true</span>);</div>
Expand All @@ -134,13 +134,13 @@
<div class="ttc" id="aclassConstDensityMatterSolver_html_a941ef7a2a4b5cae14bbc28fbfdd2ce3a"><div class="ttname"><a href="classConstDensityMatterSolver.html#a941ef7a2a4b5cae14bbc28fbfdd2ce3a">ConstDensityMatterSolver::setPMNS</a></div><div class="ttdeci">void setPMNS(const Tensor &amp;newPMNS)</div><div class="ttdoc">Set a new PMNS matrix for this solver.</div><div class="ttdef"><b>Definition:</b> const-density-solver.hpp:45</div></div>
<div class="ttc" id="aclassConstDensityMatterSolver_html_aa845ecff2b50e3ff0c6e73fc4de981e2"><div class="ttname"><a href="classConstDensityMatterSolver.html#aa845ecff2b50e3ff0c6e73fc4de981e2">ConstDensityMatterSolver::calculateEigenvalues</a></div><div class="ttdeci">void calculateEigenvalues(const Tensor &amp;energies, Tensor &amp;eigenvectors, Tensor &amp;eigenvalues)</div><div class="ttdoc">Set new mass eigenvalues for this solver.</div><div class="ttdef"><b>Definition:</b> const-density-solver.cpp:3</div></div>
<div class="ttc" id="aclassTensor_html"><div class="ttname"><a href="classTensor.html">Tensor</a></div><div class="ttdoc">Basic tensor class.</div><div class="ttdef"><b>Definition:</b> tensor.hpp:16</div></div>
<div class="ttc" id="aclassTensor_html_a09aececd96cf2472beba69b8645f4b8a"><div class="ttname"><a href="classTensor.html#a09aececd96cf2472beba69b8645f4b8a">Tensor::getValue</a></div><div class="ttdeci">Tensor getValue(const std::vector&lt; std::variant&lt; int, std::string &gt;&gt; &amp;indices) const</div><div class="ttdoc">Get the value at a certain entry in the tensor.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:68</div></div>
<div class="ttc" id="aclassTensor_html_a0a561d6274cb58972ebd98eb0d7a1de1"><div class="ttname"><a href="classTensor.html#a0a561d6274cb58972ebd98eb0d7a1de1">Tensor::scale</a></div><div class="ttdeci">static Tensor scale(const Tensor &amp;t, float s)</div><div class="ttdoc">Scale a matrix by some scalar.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:211</div></div>
<div class="ttc" id="aclassTensor_html_a1a0878a0e015a69b5644c930b14e371f"><div class="ttname"><a href="classTensor.html#a1a0878a0e015a69b5644c930b14e371f">Tensor::outer</a></div><div class="ttdeci">static Tensor outer(const Tensor &amp;t1, const Tensor &amp;t2)</div><div class="ttdoc">Outer product of two 1D tensors.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:162</div></div>
<div class="ttc" id="aclassTensor_html_a1fe34f8072b6b29ab72777f45010ae97"><div class="ttname"><a href="classTensor.html#a1fe34f8072b6b29ab72777f45010ae97">Tensor::setValue</a></div><div class="ttdeci">void setValue(const Tensor &amp;indices, const Tensor &amp;value)</div><div class="ttdoc">Set the value at a particular index of the tensor.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:89</div></div>
<div class="ttc" id="aclassTensor_html_a6007e789c8e4f519867fbbfa91ba8b14"><div class="ttname"><a href="classTensor.html#a6007e789c8e4f519867fbbfa91ba8b14">Tensor::zeros</a></div><div class="ttdeci">Tensor &amp; zeros(int length, NTdtypes::scalarType type, NTdtypes::deviceType device=NTdtypes::kCPU, bool requiresGrad=true)</div><div class="ttdoc">Initialise this tensor with zeros.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:37</div></div>
<div class="ttc" id="aclassTensor_html_aa3af94c5c579e2327a42794b3f07675a"><div class="ttname"><a href="classTensor.html#aa3af94c5c579e2327a42794b3f07675a">Tensor::conj</a></div><div class="ttdeci">Tensor conj() const</div><div class="ttdoc">Get the complex conjugate of this tensor. If the underlying tensor is not complex,...</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:291</div></div>
<div class="ttc" id="aclassTensor_html_acda45d6bb19fe1566f2d75c97e99c7a8"><div class="ttname"><a href="classTensor.html#acda45d6bb19fe1566f2d75c97e99c7a8">Tensor::requiresGrad</a></div><div class="ttdeci">Tensor &amp; requiresGrad(bool reqGrad)</div><div class="ttdoc">Set whether the tensor requires a gradient.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:62</div></div>
<div class="ttc" id="aclassTensor_html_a09aececd96cf2472beba69b8645f4b8a"><div class="ttname"><a href="classTensor.html#a09aececd96cf2472beba69b8645f4b8a">Tensor::getValue</a></div><div class="ttdeci">Tensor getValue(const std::vector&lt; std::variant&lt; int, std::string &gt;&gt; &amp;indices) const</div><div class="ttdoc">Get the value at a certain entry in the tensor.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:71</div></div>
<div class="ttc" id="aclassTensor_html_a0a561d6274cb58972ebd98eb0d7a1de1"><div class="ttname"><a href="classTensor.html#a0a561d6274cb58972ebd98eb0d7a1de1">Tensor::scale</a></div><div class="ttdeci">static Tensor scale(const Tensor &amp;t, float s)</div><div class="ttdoc">Scale a matrix by some scalar.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:224</div></div>
<div class="ttc" id="aclassTensor_html_a1a0878a0e015a69b5644c930b14e371f"><div class="ttname"><a href="classTensor.html#a1a0878a0e015a69b5644c930b14e371f">Tensor::outer</a></div><div class="ttdeci">static Tensor outer(const Tensor &amp;t1, const Tensor &amp;t2)</div><div class="ttdoc">Outer product of two 1D tensors.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:175</div></div>
<div class="ttc" id="aclassTensor_html_a1fe34f8072b6b29ab72777f45010ae97"><div class="ttname"><a href="classTensor.html#a1fe34f8072b6b29ab72777f45010ae97">Tensor::setValue</a></div><div class="ttdeci">void setValue(const Tensor &amp;indices, const Tensor &amp;value)</div><div class="ttdoc">Set the value at a particular index of the tensor.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:96</div></div>
<div class="ttc" id="aclassTensor_html_a6007e789c8e4f519867fbbfa91ba8b14"><div class="ttname"><a href="classTensor.html#a6007e789c8e4f519867fbbfa91ba8b14">Tensor::zeros</a></div><div class="ttdeci">Tensor &amp; zeros(int length, NTdtypes::scalarType type, NTdtypes::deviceType device=NTdtypes::kCPU, bool requiresGrad=true)</div><div class="ttdoc">Initialise this tensor with zeros.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:40</div></div>
<div class="ttc" id="aclassTensor_html_aa3af94c5c579e2327a42794b3f07675a"><div class="ttname"><a href="classTensor.html#aa3af94c5c579e2327a42794b3f07675a">Tensor::conj</a></div><div class="ttdeci">Tensor conj() const</div><div class="ttdoc">Get the complex conjugate of this tensor. If the underlying tensor is not complex,...</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:304</div></div>
<div class="ttc" id="aclassTensor_html_acda45d6bb19fe1566f2d75c97e99c7a8"><div class="ttname"><a href="classTensor.html#acda45d6bb19fe1566f2d75c97e99c7a8">Tensor::requiresGrad</a></div><div class="ttdeci">Tensor &amp; requiresGrad(bool reqGrad)</div><div class="ttdoc">Set whether the tensor requires a gradient.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:65</div></div>
<div class="ttc" id="anamespaceConstants_html_aaaad0ba76c30636db01f2e34dc3121d7"><div class="ttname"><a href="namespaceConstants.html#aaaad0ba76c30636db01f2e34dc3121d7">Constants::Groot2</a></div><div class="ttdeci">static constexpr float Groot2</div><div class="ttdoc">sqrt(2) G_fermi used in calculating matter hamiltonian</div><div class="ttdef"><b>Definition:</b> constants.hpp:9</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
Expand Down
3 changes: 0 additions & 3 deletions globals.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@
<li>NT_WARN
: <a class="el" href="logging_8hpp.html#a376d667d22aa28635df30822d56904f7">logging.hpp</a>
</li>
<li>setup_logging()
: <a class="el" href="logging_8hpp.html#aacdea490a1863a848d69c860e32bab4c">logging.hpp</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
Expand Down
84 changes: 0 additions & 84 deletions globals_func.html

This file was deleted.

Loading

0 comments on commit 1743fc8

Please sign in to comment.