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
function Base.copyto!(dest::AbstractArray{T, N}, destcrange::CartesianIndices{N},
156
+
src::GPUArray{T, N}, srccrange::CartesianIndices{N}) where {T, N}
165
157
# Is this efficient? Maybe!
166
158
dest_gpu =similar(src, size(destcrange))
167
159
nrange =CartesianIndices(size(dest_gpu))
@@ -170,21 +162,38 @@ function Base.copyto!(
170
162
dest
171
163
end
172
164
165
+
## other
166
+
173
167
Base.copy(x::GPUArray) =identity.(x)
168
+
174
169
Base.deepcopy(x::GPUArray) =copy(x)
175
170
171
+
172
+
# reinterpret
173
+
176
174
#=
177
-
reinterpret taken from julia base/array.jl
175
+
copied from julia base/array.jl
178
176
Copyright (c) 2009-2016: Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors:
179
177
180
178
https://github.com/JuliaLang/julia/contributors
181
179
182
-
Permission is hereby granted, free of charge, to any person obtaining a copie of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
183
-
184
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
185
-
186
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
180
+
Permission is hereby granted, free of charge, to any person obtaining a copie of this
181
+
software and associated documentation files (the "Software"), to deal in the Software
182
+
without restriction, including without limitation the rights to use, copy, modify, merge,
183
+
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
184
+
to whom the Software is furnished to do so, subject to the following conditions:
185
+
186
+
The above copyright notice and this permission notice shall be included in all copies or
187
+
substantial portions of the Software.
188
+
189
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
190
+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
191
+
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
192
+
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
193
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
0 commit comments