Skip to content

Commit 8bc8c5e

Browse files
committed
removed C library naming
1 parent 87384dd commit 8bc8c5e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

models/call_C.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
# Get name of C standard library depending on the platform
2-
libc_name = Sys.iswindows() ? "msvcrt.dll" :
3-
Sys.isapple() ? "libc.dylib" :
4-
"libc.so.6"
5-
61
@model function call_C(y = 0.0)
72
x ~ Normal(0, 1)
83

94
# Call C library abs function
10-
x_abs = @ccall libc_name.fabs(x::Cdouble)::Cdouble
5+
x_abs = @ccall fabs(x::Cdouble)::Cdouble
116

127
y ~ Normal(0, x_abs)
138
end

0 commit comments

Comments
 (0)