Skip to content

Instantly share code, notes, and snippets.

View ivarne's full-sized avatar

Ivar Nesje ivarne

  • Oslo, Norway
  • 12:21 (UTC +01:00)
View GitHub Profile
@ivarne
ivarne / interfaces.jl
Last active August 29, 2015 14:01 — forked from tknopp/interfaces.jl
const _interfaces = Dict{Function,Vector{DataType}}()
function addInterface(d::DataType, f::Function...)
for g in f
if haskey(_interfaces, g)
push!(_interfaces[g], d)
else
_interfaces[g] = DataType[d]
end
end
module testsums
export sum5, sum5b, dosums
function sum5(scale, sa1, a1, sa2, a2, sa3, a3, sa4, a4, sa5, a5, out)
for i=1:length(out)
@inbounds out[i] = scale*(sa1*a1[i] + sa2*a2[i] + sa3*a3[i]
+ sa4*a4[i] + sa5*a5[i])
end
end
#!/bin/bash
gfortran -o $2 -fno-underscoring $1 libhgraph.a libg2c.so -L/usr/X11R6/lib64 -lX11
@ivarne
ivarne / REPL.jl
Last active December 25, 2015 03:29 — forked from quinnj/gist:6908779
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.2.0-prerelease+3952
_/ |\__'_|_|_|\__'_| | Commit d0c2058 2013-10-06 19:08:09 UTC
|__/ | x86_64-w64-mingw32
julia> abstract BTree