Skip to content

Commit

Permalink
build based on ac82f98
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Sep 11, 2024
1 parent dedf835 commit f4d6736
Show file tree
Hide file tree
Showing 18 changed files with 1,401 additions and 0 deletions.
1 change: 1 addition & 0 deletions previews/PR82/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-11T15:52:55","documenter_version":"1.7.0"}}
24 changes: 24 additions & 0 deletions previews/PR82/api/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>API · AllocCheck Documentation</title><meta name="title" content="API · AllocCheck Documentation"/><meta property="og:title" content="API · AllocCheck Documentation"/><meta property="twitter:title" content="API · AllocCheck Documentation"/><meta name="description" content="Documentation for AllocCheck Documentation."/><meta property="og:description" content="Documentation for AllocCheck Documentation."/><meta property="twitter:description" content="Documentation for AllocCheck Documentation."/><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../search_index.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">AllocCheck Documentation</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">Tutorials</span><ul><li><a class="tocitem" href="../tutorials/optional_debugging_and_logging/">Optional debugging and logging</a></li><li><a class="tocitem" href="../tutorials/hot_loop/">Hot loops</a></li><li><a class="tocitem" href="../tutorials/error_recovery/">Minimum latency error recovery</a></li></ul></li><li class="is-active"><a class="tocitem" href>API</a><ul class="internal"><li><a class="tocitem" href="#Index"><span>Index</span></a></li><li><a class="tocitem" href="#Docstrings"><span>Docstrings</span></a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>API</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>API</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/JuliaLang/AllocCheck.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/JuliaLang/AllocCheck.jl/blob/main/docs/src/api.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Exported-functions-and-types"><a class="docs-heading-anchor" href="#Exported-functions-and-types">Exported functions and types</a><a id="Exported-functions-and-types-1"></a><a class="docs-heading-anchor-permalink" href="#Exported-functions-and-types" title="Permalink"></a></h1><h2 id="Index"><a class="docs-heading-anchor" href="#Index">Index</a><a id="Index-1"></a><a class="docs-heading-anchor-permalink" href="#Index" title="Permalink"></a></h2><ul><li><a href="#AllocCheck.check_allocs"><code>AllocCheck.check_allocs</code></a></li><li><a href="#AllocCheck.@check_allocs"><code>AllocCheck.@check_allocs</code></a></li></ul><h2 id="Docstrings"><a class="docs-heading-anchor" href="#Docstrings">Docstrings</a><a id="Docstrings-1"></a><a class="docs-heading-anchor-permalink" href="#Docstrings" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="AllocCheck.check_allocs" href="#AllocCheck.check_allocs"><code>AllocCheck.check_allocs</code></a><span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">check_allocs(func, types; ignore_throw=true)</code></pre><p>Compiles the given function and types to LLVM IR and checks for allocations.</p><p>Returns a vector of <code>AllocationSite</code>, <code>DynamicDispatch</code>, and <code>AllocatingRuntimeCall</code></p><div class="admonition is-warning"><header class="admonition-header">Warning</header><div class="admonition-body"><p>The Julia language/compiler does not guarantee that this result is stable across Julia invocations.</p><p>If you rely on allocation-free code for safety/correctness, it is not sufficient to verify <code>check_allocs</code> in test code and expect that the corresponding call in production will not allocate at runtime.</p><p>For this case, you must use <code>@check_allocs</code> instead.</p></div></div><p><strong>Example</strong></p><pre><code class="language-julia-repl hljs">julia&gt; function foo(x::Int, y::Int)
z = x + y
return z
end
foo (generic function with 1 method)

julia&gt; allocs = check_allocs(foo, (Int, Int))
AllocCheck.AllocationSite[]</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaLang/AllocCheck.jl/blob/ac82f9890a151d7e459ee0b70d3be77aabd3fed3/src/AllocCheck.jl#L184-L213">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="AllocCheck.@check_allocs" href="#AllocCheck.@check_allocs"><code>AllocCheck.@check_allocs</code></a><span class="docstring-category">Macro</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">@check_allocs ignore_throw=true (function def)</code></pre><p>Wraps the provided function definition so that all calls to it will be automatically checked for allocations.</p><p>If the check fails, an <code>AllocCheckFailure</code> exception is thrown containing the detailed failures, including the backtrace for each defect.</p><p>Note: All calls to the wrapped function are effectively a dynamic dispatch, which means they are type-unstable and may allocate memory at function <em>entry</em>. <code>@check_allocs</code> only guarantees the absence of allocations after the function has started running.</p><p><strong>Example</strong></p><pre><code class="language-julia-repl hljs">julia&gt; @check_allocs multiply(x,y) = x*y
multiply (generic function with 1 method)

julia&gt; multiply(1.5, 3.5) # no allocations for Float64
5.25

julia&gt; multiply(rand(3,3), rand(3,3)) # matmul needs to allocate the result
ERROR: @check_allocs function contains 1 allocations.

Stacktrace:
[1] macro expansion
@ ~/repos/AllocCheck/src/macro.jl:134 [inlined]
[2] multiply(x::Matrix{Float64}, y::Matrix{Float64})
@ Main ./REPL[2]:133
[3] top-level scope
@ REPL[5]:1</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaLang/AllocCheck.jl/blob/ac82f9890a151d7e459ee0b70d3be77aabd3fed3/src/macro.jl#L24-L56">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../tutorials/error_recovery/">« Minimum latency error recovery</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Wednesday 11 September 2024 15:52">Wednesday 11 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit f4d6736

Please sign in to comment.