Sorry, new to Julia (from Matlab),
If I copy + paste this into the REPL (Julia v1.0.0), no output is printed:
N = 1024;
A = rand(Float64,N,N);
B = rand(Float64,N,N);
ii = 2:N-1;
jj = 2:N-1;
J = zeros(Float64,N,N);
@time @views J[jj,ii] .= A[jj.+1,ii.-1] .- B[jj.-1,ii.+1];
But if I save to a file run via include:
include("C:/my/path/to/why.jl")
It prints the following:
1022×1022 view(::Array{Float64,2}, 2:1023, 2:1023) with eltype Float64:
followed by the contents of the array.
If I put a semicolon after the include statement, e.g. include();
, nothing is printed, but it’s not clear to me whether this is expected behavior – I have semicolons everywhere in the included file, so why is anything being printed? Is this negatively affecting performance, even with the include();
version?