You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NEWS.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,7 @@ Multi-threading changes
73
73
-----------------------
74
74
75
75
*`Threads.@threads` now supports the `:greedy` scheduler, intended for non-uniform workloads ([#52096]).
76
+
* A new exported struct `Lockable{T, L<:AbstractLock}` makes it easy to bundle a resource and its lock together ([#52898]).
76
77
77
78
Build system changes
78
79
--------------------
@@ -96,6 +97,7 @@ New library features
96
97
*`invmod(n)` is an abbreviation for `invmod(n, typeof(n))` for native integer types ([#52180]).
97
98
*`replace(string, pattern...)` now supports an optional `IO` argument to
98
99
write the output to a stream rather than returning a string ([#48625]).
100
+
* New methods `allequal(f, itr)` and `allunique(f, itr)` taking a predicate function ([#47679]).
99
101
*`sizehint!(s, n)` now supports an optional `shrink` argument to disable shrinking ([#51929]).
100
102
* New function `Docs.hasdoc(module, symbol)` tells whether a name has a docstring ([#52139]).
101
103
* New function `Docs.undocumented_names(module)` returns a module's undocumented public names ([#52413]).
@@ -109,6 +111,8 @@ New library features
109
111
automatically.
110
112
*`@timed` now additionally returns the elapsed compilation and recompilation time ([#52889])
111
113
*`filter` can now act on a `NamedTuple` ([#50795]).
114
+
*`Iterators.cycle(iter, n)` runs over `iter` a fixed number of times, instead of forever ([#47354])
115
+
*`zero(::AbstractArray)` now applies recursively, so `zero([[1,2],[3,4,5]])` now produces the additive identity `[[0,0],[0,0,0]]` rather than erroring ([#38064]).
"Attempted to wrap a MemoryRef of length $len with an Array of size dims=$dims, which is invalid because prod(dims) = $proddims > $len, so that the array would have more elements than the underlying memory can store."))
3084
3089
3085
-
functionwrap(::Type{Array}, m::Memory{T}, dims::NTuple{N, Integer}) where {T, N}
3086
-
wrap(Array, MemoryRef(m), dims)
3090
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::MemoryRef{T}, dims::NTuple{N, Integer}) where {T, N}
3091
+
dims =convert(Dims, dims)
3092
+
ref =_wrap(m, dims)
3093
+
$(Expr(:new, :(Array{T, N}), :ref, :dims))
3094
+
end
3095
+
3096
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::Memory{T}, dims::NTuple{N, Integer}) where {T, N}
3097
+
dims =convert(Dims, dims)
3098
+
ref =_wrap(MemoryRef(m), dims)
3099
+
$(Expr(:new, :(Array{T, N}), :ref, :dims))
3100
+
end
3101
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::MemoryRef{T}, l::Integer) where {T}
3102
+
dims = (Int(l),)
3103
+
ref =_wrap(m, dims)
3104
+
$(Expr(:new, :(Array{T, 1}), :ref, :dims))
3087
3105
end
3088
-
functionwrap(::Type{Array}, m::MemoryRef{T}, l::Integer) where {T}
3089
-
wrap(Array, m, (l,))
3106
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::Memory{T}, l::Integer) where {T}
3107
+
dims = (Int(l),)
3108
+
ref =_wrap(MemoryRef(m), (l,))
3109
+
$(Expr(:new, :(Array{T, 1}), :ref, :dims))
3090
3110
end
3091
-
functionwrap(::Type{Array}, m::Memory{T}, l::Integer) where {T}
3092
-
wrap(Array, MemoryRef(m), (l,))
3111
+
@eval@propagate_inboundsfunctionwrap(::Type{Array}, m::Memory{T}) where {T}
0 commit comments