Skip to content

Instantly share code, notes, and snippets.

Avatar

Vincent Landau vlandau

View GitHub Profile
@vlandau
vlandau / functions.jl.1350.mem
Created Mar 20, 2020
Omniscape.jl memory allocations for functions.jl, with 4903×4405 resistance surface
View functions.jl.1350.mem
- abstract type Data end
-
- function clip(
- A::Array{Float64, 2};
- x::Int64,
- y::Int64,
- distance::Int64
- )
-
0 dim1 = size(A)[1]
@vlandau
vlandau / parallel_processing.jl
Last active Jul 19, 2019
Parallel distributed processing in Julia
View parallel_processing.jl
using Distributed
addprocs(2)
q = fill(rand(9), 3, 3)
@everywhere nrows = @eval size($q, 1)
@everywhere ncols = @eval size($q, 2)
for i in workers()
@spawnat i eval(:(a = fill(0, nrows, ncols)))
end
You can’t perform that action at this time.