1"use strict";(self.webpackChunkmodular_fe=self.webpackChunkmodular_fe||[]).push([["13370"],{34465(e,t,n){n.r(t),n.d(t,{metadata:()=>s,default:()=>c,frontMatter:()=>d,contentTitle:()=>o,toc:()=>r,assets:()=>a});var s=JSON.parse('{"id":"docs/std/math/math/align_down","title":"align_down","description":"Returns the closest multiple of alignment that is less than or equal to value, elementwise.","source":"@site/docs/docs/std/math/math/align_down.md","sourceDirName":"docs/std/math/math","slug":"/docs/std/math/math/align_down","permalink":"/nightly/docs/std/math/math/align_down","draft":false,"unlisted":false,"editUrl":"https://github.com/modular/modular/edit/main/Mojo/docs/site/std/math/math/align_down.md","tags":[],"version":"current","frontMatter":{"title":"align_down","version":"1.2.0.dev0","slug":"align_down","type":"function","namespace":"std.math.math","lang":"mojo","show_stability_marker":null,"description":"Returns the closest multiple of alignment that is less than or equal to value, elementwise."},"sidebar":"stdSidebar","previous":{"title":"acosh","permalink":"/nightly/docs/std/math/math/acosh"},"next":{"title":"align_up","permalink":"/nightly/docs/std/math/math/align_up"}}'),i=n(74848),l=n(28453);let d={title:"align_down",version:"1.2.0.dev0",slug:"align_down",type:"function",namespace:"std.math.math",lang:"mojo",show_stability_marker:null,description:"Returns the closest multiple of alignment that is less than or equal to value, elementwise."},o,a={},r=[];function h(e){let t={a:"a",b:"b",code:"code",div:"div",li:"li",p:"p",section:"section",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(t.section,{className:"mojo-docs",children:["\n",(0,i.jsxs)(t.div,{className:"mojo-function-detail",children:["\n",(0,i.jsxs)(t.div,{className:"mojo-function-sig",children:["\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.code,{children:"def align_down[dtype: DType, width: SIMDLength, //](value: SIMD[dtype, width], alignment: SIMD[dtype, width]) -> SIMD[dtype, width] where dtype.is_integral()"})}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"Returns the closest multiple of alignment that is less than or equal to value, elementwise."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Parameters:"})}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\u200B",(0,i.jsx)(t.b,{children:"dtype"})," (",(0,i.jsx)(t.a,{href:"../../../../../docs/std/builtin/dtype/DType",children:(0,i.jsx)(t.code,{children:"DType"})}),"): The ",(0,i.jsx)(t.code,{children:"dtype"})," of the input SIMD vector."]}),"\n",(0,i.jsxs)(t.li,{children:["\u200B",(0,i.jsx)(t.b,{children:"width"})," (",(0,i.jsx)(t.a,{href:"../../../../../docs/std/builtin/simd_length/SIMDLength",children:(0,i.jsx)(t.code,{children:"SIMDLength"})}),"): The width of the input and output SIMD vector."]}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Args:"})}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\u200B",(0,i.jsx)(t.b,{children:"value"})," (",(0,i.jsx)(t.a,{href:"../../../../../docs/std/simd/SIMD",children:(0,i.jsx)(t.code,{children:"SIMD[dtype, width]"})}),"): The value to align."]}),"\n",(0,i.jsxs)(t.li,{children:["\u200B",(0,i.jsx)(t.b,{children:"alignment"})," (",(0,i.jsx)(t.a,{href:"../../../../../docs/std/simd/SIMD",children:(0,i.jsx)(t.code,{children:"SIMD[dtype, width]"})}),"): Value to align to."]}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.strong,{children:"Returns:"})}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"../../../../../docs/std/simd/SIMD",children:(0,i.jsx)(t.code,{children:"SIMD[dtype, width]"})}),": Closest multiple of the alignment that is less than or equal to the\ninput value. In other words, floor(value / alignment) * alignment."]}),"\n"]}),"\n"]})}function c(e={}){let{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},28453(e,t,n){n.d(t,{R:()=>d,x:()=>o});var s=n(96540);let i={},l=s.createContext(i);function d(e){let t=s.useContext(l);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:d(e.components),s.createElement(l.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.