Skip to content

Commit

Permalink
Change the batch_size to be power of two. Add param to the docstring
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Saelices <msaelices@gmail.com>
  • Loading branch information
msaelices committed Mar 3, 2025
1 parent edadb98 commit 212caea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mojo/stdlib/src/collections/inline_array.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,12 @@ struct InlineArray[

@always_inline
@implicit
fn __init__[batch_size: Int = 100](out self, fill: Self.ElementType):
fn __init__[batch_size: Int = 64](out self, fill: Self.ElementType):
"""Constructs an empty array where each element is the supplied `fill`.
Parameters:
batch_size: The number of elements to unroll for filling the array.
Args:
fill: The element to fill each index.
"""
Expand Down

0 comments on commit 212caea

Please sign in to comment.