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: src/tarray.jl
+14-8
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ function Base.getindex(S::TArray{T, N}, I::Vararg{Int,N}) where {T, N}
53
53
return d[I...]
54
54
end
55
55
56
-
function Base.setindex!(S::TArray{T, N}, x, I::Vararg{Int,N}) where {T, N}
56
+
function Base.setindex!(S::TArray{T, N}, x::T, I::Vararg{Int,N}) where {T, N}
57
57
n, d =task_local_storage(S.ref)
58
58
cn =n_copies()
59
59
newd = d
@@ -65,7 +65,7 @@ function Base.setindex!(S::TArray{T, N}, x, I::Vararg{Int,N}) where {T, N}
65
65
newd[I...] = x
66
66
end
67
67
68
-
function Base.push!(S::TArray, x)
68
+
function Base.push!(S::TArray{T}, x::T) where T
69
69
n, d =task_local_storage(S.ref)
70
70
cn =n_copies()
71
71
newd = d
@@ -102,21 +102,27 @@ end
102
102
103
103
function Base.display(S::TArray)
104
104
arr = S.orig_task.storage[S.ref][2]
105
-
@warn"display(::TArray) prints the originating task's storage, not the current task's storage. Please use show(::TArray) to display the current task's version of a TArray."
105
+
@warn"display(::TArray) prints the originating task's storage, "*
106
+
"not the current task's storage. "*
107
+
"Please use show(::TArray) to display the current task's version of a TArray."
0 commit comments