Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Sep 27, 2024
1 parent 8a8253f commit 4eaff42
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
12 changes: 6 additions & 6 deletions juliac/exe_examples/broadcasting.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/env -S julia --project=@scriptdir

module Main2
using LinearAlgebra
#using LinearAlgebra

Base.@ccallable function main()::Cint
println(Core.stdout, "Hello, world!")
A = rand(10, 10)
L = sin.(A)
#println(Core.stdout, "Hello, world!")
#A = rand(10, 10)
#L = sin.(A)
B = rand(10)
L2 = sin.(B)
ccall(:jl_, Cvoid, (Any,), L)
ccall(:jl_, Cvoid, (Any,), L2)
#ccall(:jl_, Cvoid, (Any,), L)
#ccall(:jl_, Cvoid, (Any,), L2)
return 0
end

Expand Down
2 changes: 1 addition & 1 deletion juliac/exe_examples/simple_lu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Main2
using LinearAlgebra

Base.@ccallable function main()::Cint
println(Core.stdout, "Hello, world!")
# println(Core.stdout, "Hello, world!")
A = rand(10, 10)
L = lu(A)
ccall(:jl_, Cvoid, (Any,), L)
Expand Down
15 changes: 10 additions & 5 deletions juliac/exe_examples/simple_ode.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/usr/bin/env -S julia --project=@scriptdir

module Main2
using OrdinaryDiffEq
using OpenBLAS_jll
using LinearAlgebra
using PrecompileTools
using OrdinaryDiffEq
#using PrecompileTools

#OpenBLAS_jll.__init__()
#LinearAlgebra.libblastrampoline_jll.__init__()
#LinearAlgebra.__init__()

f(u,p,t) = 1.01*u
const u0=1/2
Expand All @@ -16,10 +20,10 @@ Base.@ccallable function main() :: Cvoid
for i in eachindex(sol)
ccall(:printf, Int32, (Ptr{UInt8},Float64...), "value %lf \n", sol[i])
end
take_heap_snapshot()
# take_heap_snapshot()
return nothing
end

#=
@setup_workload begin
# Putting some things in `@setup_workload` instead of `@compile_workload` can reduce the size of the
# precompile file and potentially make loading faster.
Expand All @@ -44,4 +48,5 @@ precompile(join , (Base.GenericIOBuffer{Memory{UInt8}}, Array{String, 1}, Char))
precompile(Base.showerror_nostdio, (Core.MissingCodeError, String))
precompile(Base.VersionNumber, (UInt32, UInt32, UInt32, Tuple{}, Tuple{}))
precompile(! ,(Bool,))
end
=#
end
4 changes: 2 additions & 2 deletions stdlib/LinearAlgebra/src/lbt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ end
macro get_warn(map, key)
return quote
if !haskey($(esc(map)), $(esc(key)))
@warn(string("[LBT] Unknown key into ", $(string(map)), ": ", $(esc(key)), ", defaulting to :unknown"))
#@warn(string("[LBT] Unknown key into ", $(string(map)), ": ", $(esc(key)), ", defaulting to :unknown"))
# All the unknown values share a common value: `-1`
$(esc(map))[$(esc(LBT_INTERFACE_UNKNOWN))]
else
Expand Down Expand Up @@ -132,7 +132,7 @@ struct LBTConfig
if str_ptr != C_NULL
push!(exported_symbols, unsafe_string(str_ptr))
else
@error("NULL string in lbt_config.exported_symbols[$(sym_idx)]")
error("NULL string in lbt_config.exported_symbols[$(sym_idx)]")
end
end

Expand Down

0 comments on commit 4eaff42

Please sign in to comment.