Skip to content

Commit 3090d2b

Browse files
authored
[Docs] Update load()/store() item and move it to top of removed secti… (#36120)
…on. (#36110) Cherry-pick from 038e34d modular-orig-commit: cd0011c10f54eda58a38eb332b90211fdfb81b7c
1 parent c9148a3 commit 3090d2b

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

docs/changelog-released.md

+19-13
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,25 @@ modular update mojo
224224

225225
#### 🦋 Changed
226226

227+
- The `simd_load()`, `simd_store()`, `aligned_simd_load()`, and
228+
`aligned_simd_store()` methods on
229+
[`DTypePointer`](/mojo/stdlib/memory/unsafe#dtypepointer),
230+
[`Buffer`](/mojo/stdlib/buffer/buffer#buffer), and
231+
[`NDBuffer`](/mojo/stdlib/buffer/buffer#ndbuffer) have been merged into
232+
a more expressive set of `load()` and `store()` methods with keyword-only
233+
`width` and `alignment` parameters:
234+
235+
```mojo
236+
# Doesn't work
237+
my_simd = my_buffer.simd_load[simd_width](index)
238+
# Works
239+
my_simd = my_buffer.load[width=simd_width](index)
240+
# Doesn't work
241+
my_buffer.aligned_simd_store[width, alignment](my_simd)
242+
# Works
243+
my_buffer.store[width=width, alignment=alignment](my_simd)
244+
```
245+
227246
- The
228247
[`EqualityComparable`](/mojo/stdlib/builtin/equality_comparable#equalitycomparable)
229248
trait now requires the `__ne__()` method for conformance in addition to the
@@ -379,19 +398,6 @@ modular update mojo
379398
memcpy(destBuffer.data, srcBuffer.data, count)
380399
```
381400

382-
- The `simd_load()` and `simd_store()` methods on
383-
[`DTypePointer`](/mojo/stdlib/memory/unsafe#dtypepointer),
384-
[`Buffer`](/mojo/stdlib/buffer/buffer#buffer), and
385-
[`NDBuffer`](/mojo/stdlib/buffer/buffer#ndbuffer) have been removed in favor
386-
of `load()` and `store()`:
387-
388-
```mojo
389-
# Doesn't work
390-
my_simd = my_buffer.simd_load[simd_width](index)
391-
# Works
392-
my_simd = my_buffer.load[simd_width, alignment](index)
393-
```
394-
395401
- The functions `max_or_inf()`, `min_or_neginf()` have been removed from
396402
`math.limit`. These functions were only used by the SIMD type.
397403

0 commit comments

Comments
 (0)