Skip to content

Instantly share code, notes, and snippets.

Avatar

Sam Kaplan samtkaplan

  • Chevron
  • Houston, Texas, USA
View GitHub Profile
View does_not_vectorize.txt
; @ /data/esdrd/tqff/tmp/issue.jl:20 within `does_not_vectorize!'
define nonnull %jl_value_t addrspace(10)* @"japi1_does_not_vectorize!_16049"(%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)**, i32) #0 {
top:
%3 = alloca %jl_value_t addrspace(10)**, align 8
store volatile %jl_value_t addrspace(10)** %1, %jl_value_t addrspace(10)*** %3, align 8
%4 = load %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %1, align 8
%5 = getelementptr inbounds %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %1, i64 1
%6 = load %jl_value_t addrspace(10)*, %jl_value_t addrspace(10)** %5, align 8
; ┌ @ array.jl:157 within `size'
@samtkaplan
samtkaplan / Bug.java
Last active Oct 10, 2018
Julia/JNI Bug
View Bug.java
package org.foo.bug.jni;
public class Bug {
static {
System.loadLibrary("Bug");
}
public native static void unreachable();
View laplace.jl
function laplace_idiomatic (del_x::Array{Float64, 3}, x::Array{Float64, 3})
n1, n2, n3 = size (x)
for i3 = 2:n3-1, i2 = 2:n2-1, i1 = 2:n1-1
del_x[i1,i2,i3] =
x[i1+1,i2,i3] + x[i1-1,i2,i3] +
x[i1,i2+1,i3] + x[i1,i2-1,i3] +
x[i1,i2,i3+1] + x[i1,i2,i3-1] -
6.0 * x[i1,i2,i3]
@samtkaplan
samtkaplan / Makefile
Last active Dec 17, 2015
Laplacian operator in Julia and C. Version 2.
View Makefile
all : liblaplace.so
liblaplace.so : laplace.h laplace.c
gcc -O3 -fPIC -c laplace.c
gcc -O3 -fPIC -shared -o liblaplace.so laplace.o
rm -f laplace.o
clean:
rm -f liblaplace.so
You can’t perform that action at this time.