Skip to content

Commit

Permalink
build based on cda6564
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Jun 10, 2024
1 parent c1d4e33 commit ebe9e13
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dev/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
propoffset,
getprop,
setprop
)</code></pre><p>Where <code>typedefs</code> are the new user-facing type definition and the internal type definitions, <code>typefuncs</code> are type related functions from Base for the new types, <code>conv</code> are <code>convert</code> methods to those types, <code>propsize</code> is the implementation for <a href="#FieldFlags.fieldsize"><code>FieldFlags.fieldsize</code></a>, <code>propoffset</code> is the implementation for <a href="#FieldFlags.propertyoffset"><code>FieldFlags.propertyoffset</code></a>, <code>getprop</code> is the definition for the <code>getproperty</code> overload for the user facing type and <code>setprop</code> is the definition for the <code>setproperty!</code> overloda for the user facing type.</p><p>See also <a href="#FieldFlags.bitflags"><code>FieldFlags.bitflags</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/Seelengrab/FieldFlags.jl/blob/cda6564d48e17601d39466901aa31e4cab80fd69/src/FieldFlags.jl#L119-L154">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="FieldFlags.cast_extend_truncate" href="#FieldFlags.cast_extend_truncate"><code>FieldFlags.cast_extend_truncate</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">cast_extend_truncate(T::DataType, x) -&gt; T</code></pre><p>Takes an object <code>x</code> of a primitive type and either bitcasts it to type <code>T</code> (if their sizes are egal), zero extends the bitrepresentation of <code>x</code> to the size of <code>T</code>, or truncates the bitrepresentation of <code>x</code> to <code>sizeof(T)</code>.</p><p>Returns a <code>T</code>.</p><p>See also <a href="#FieldFlags.cast_or_extend"><code>FieldFlags.cast_or_extend</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/Seelengrab/FieldFlags.jl/blob/cda6564d48e17601d39466901aa31e4cab80fd69/src/FieldFlags.jl#L92-L102">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="FieldFlags.cast_or_extend" href="#FieldFlags.cast_or_extend"><code>FieldFlags.cast_or_extend</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">cast_or_extend(T::DataType, x) -&gt; T</code></pre><p>Takes an object <code>x</code> of a primitive type and either bitcasts it to <code>T</code> (if their sizes are egal) or zero-extends the bitrepresentation of <code>x</code> to the size of <code>T</code>. <code>sizeof(x) &lt;= sizeof(T)</code> must hold.</p><p>Returns a <code>T</code>.</p><p>See also <a href="#FieldFlags.cast_extend_truncate"><code>FieldFlags.cast_extend_truncate</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/Seelengrab/FieldFlags.jl/blob/cda6564d48e17601d39466901aa31e4cab80fd69/src/FieldFlags.jl#L73-L83">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/">« Examples</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Monday 3 June 2024 02:27">Monday 3 June 2024</span>. Using Julia version 1.10.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
)</code></pre><p>Where <code>typedefs</code> are the new user-facing type definition and the internal type definitions, <code>typefuncs</code> are type related functions from Base for the new types, <code>conv</code> are <code>convert</code> methods to those types, <code>propsize</code> is the implementation for <a href="#FieldFlags.fieldsize"><code>FieldFlags.fieldsize</code></a>, <code>propoffset</code> is the implementation for <a href="#FieldFlags.propertyoffset"><code>FieldFlags.propertyoffset</code></a>, <code>getprop</code> is the definition for the <code>getproperty</code> overload for the user facing type and <code>setprop</code> is the definition for the <code>setproperty!</code> overloda for the user facing type.</p><p>See also <a href="#FieldFlags.bitflags"><code>FieldFlags.bitflags</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/Seelengrab/FieldFlags.jl/blob/cda6564d48e17601d39466901aa31e4cab80fd69/src/FieldFlags.jl#L119-L154">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="FieldFlags.cast_extend_truncate" href="#FieldFlags.cast_extend_truncate"><code>FieldFlags.cast_extend_truncate</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">cast_extend_truncate(T::DataType, x) -&gt; T</code></pre><p>Takes an object <code>x</code> of a primitive type and either bitcasts it to type <code>T</code> (if their sizes are egal), zero extends the bitrepresentation of <code>x</code> to the size of <code>T</code>, or truncates the bitrepresentation of <code>x</code> to <code>sizeof(T)</code>.</p><p>Returns a <code>T</code>.</p><p>See also <a href="#FieldFlags.cast_or_extend"><code>FieldFlags.cast_or_extend</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/Seelengrab/FieldFlags.jl/blob/cda6564d48e17601d39466901aa31e4cab80fd69/src/FieldFlags.jl#L92-L102">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="FieldFlags.cast_or_extend" href="#FieldFlags.cast_or_extend"><code>FieldFlags.cast_or_extend</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">cast_or_extend(T::DataType, x) -&gt; T</code></pre><p>Takes an object <code>x</code> of a primitive type and either bitcasts it to <code>T</code> (if their sizes are egal) or zero-extends the bitrepresentation of <code>x</code> to the size of <code>T</code>. <code>sizeof(x) &lt;= sizeof(T)</code> must hold.</p><p>Returns a <code>T</code>.</p><p>See also <a href="#FieldFlags.cast_extend_truncate"><code>FieldFlags.cast_extend_truncate</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/Seelengrab/FieldFlags.jl/blob/cda6564d48e17601d39466901aa31e4cab80fd69/src/FieldFlags.jl#L73-L83">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/">« Examples</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Monday 10 June 2024 02:28">Monday 10 June 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
b:3
_
c:2
end</code><code class="nohighlight hljs ansi" style="display:block;"></code></pre><p>The above defines a struct <code>MyField</code>, with three fields <code>a</code>, <code>b</code> and <code>c</code>, with sizes (in bits) <code>1</code>, <code>3</code> and <code>2</code> respectively. There are also two definitions of explicit padding between fields, the first being <code>2</code> bits in size and the second one being <code>1</code> bit in size; taken implicitly from <code>_</code> not having a size annotated. The layout of the above struct is like so:</p><table><tr><th style="text-align: center">MSB</th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center">LSB</th></tr><tr><td style="text-align: center">10-16</td><td style="text-align: center">c</td><td style="text-align: center">c</td><td style="text-align: center">_</td><td style="text-align: center">b</td><td style="text-align: center">b</td><td style="text-align: center">b</td><td style="text-align: center">_</td><td style="text-align: center">_</td><td style="text-align: center">a</td></tr></table><p>With the additional padding bits, we come to a total of 9 bits. This is again rounded up to the next multiple of 8, which is 16 bits or 2 bytes:</p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; sizeof(MyField)</code><code class="nohighlight hljs ansi" style="display:block;">2</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« FieldFlags.jl Documentation</a><a class="docs-footer-nextpage" href="../api/">API Reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Monday 3 June 2024 02:27">Monday 3 June 2024</span>. Using Julia version 1.10.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
end</code><code class="nohighlight hljs ansi" style="display:block;"></code></pre><p>The above defines a struct <code>MyField</code>, with three fields <code>a</code>, <code>b</code> and <code>c</code>, with sizes (in bits) <code>1</code>, <code>3</code> and <code>2</code> respectively. There are also two definitions of explicit padding between fields, the first being <code>2</code> bits in size and the second one being <code>1</code> bit in size; taken implicitly from <code>_</code> not having a size annotated. The layout of the above struct is like so:</p><table><tr><th style="text-align: center">MSB</th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center"></th><th style="text-align: center">LSB</th></tr><tr><td style="text-align: center">10-16</td><td style="text-align: center">c</td><td style="text-align: center">c</td><td style="text-align: center">_</td><td style="text-align: center">b</td><td style="text-align: center">b</td><td style="text-align: center">b</td><td style="text-align: center">_</td><td style="text-align: center">_</td><td style="text-align: center">a</td></tr></table><p>With the additional padding bits, we come to a total of 9 bits. This is again rounded up to the next multiple of 8, which is 16 bits or 2 bytes:</p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; sizeof(MyField)</code><code class="nohighlight hljs ansi" style="display:block;">2</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« FieldFlags.jl Documentation</a><a class="docs-footer-nextpage" href="../api/">API Reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Monday 10 June 2024 02:28">Monday 10 June 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit ebe9e13

Please sign in to comment.