Skip to content

Instantly share code, notes, and snippets.

View vlandau's full-sized avatar

Vincent Landau vlandau

  • Fort Collins, CO
View GitHub Profile
@vlandau
vlandau / functions.jl.1350.mem
Created March 20, 2020 19:25
Omniscape.jl memory allocations for functions.jl, with 4903×4405 resistance surface
- 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 July 19, 2019 17:51
Parallel distributed processing in Julia
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