This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: InstCombine/InstCombineCompares.cpp | |
| =================================================================== | |
| --- InstCombine/InstCombineCompares.cpp (revision 242211) | |
| +++ InstCombine/InstCombineCompares.cpp (working copy) | |
| @@ -3687,70 +3687,79 @@ | |
| /// FoldFCmp_IntToFP_Cst - Fold fcmp ([us]itofp x, cst) if possible. | |
| Instruction *InstCombiner::FoldFCmp_IntToFP_Cst(FCmpInst &I, | |
| Instruction *LHSI, | |
| Constant *RHSC) { | |
| if (!isa<ConstantFP>(RHSC)) return nullptr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Apply smoothing operator to a, putting result in b. | |
| function relax{T}( b::Vector{T}, a::Vector{T} ) | |
| assert(length(a)==length(b)) | |
| c = T(0.25) | |
| d = T(0.5) | |
| n = length(b) | |
| b[1] = 1 # Boundary condition | |
| @inbounds for i=2:n-1 | |
| b[i] = c*a[i-1]+d*a[i]+c*a[i+1] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| T=NTuple{4,Float32} | |
| zero(::Type{T}) = (0.0f0,0.0f0,0.0f0,0.f0) | |
| function add( a::T, b::T ) | |
| (a[1]+b[1], a[2]+b[2], a[3]+b[3], a[4]+b[4]) | |
| end | |
| function mul( a::T, b::T ) | |
| (a[1]*b[1], a[2]*b[2], a[3]*b[3], a[4]*b[4]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define void @julia_quod_24255([4 x float]* sret, [4 x float]*, [4 x float]*, [4 x float]*) { | |
| top: | |
| %4 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 0 | |
| %5 = load float, float* %4, align 4 | |
| %6 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 0 | |
| %7 = load float, float* %6, align 4 | |
| %8 = fmul float %5, %7 | |
| %9 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 1 | |
| %10 = load float, float* %9, align 4 | |
| %11 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Base.rand | |
| immutable Quad | |
| a :: Float32 | |
| b :: Float32 | |
| c :: Float32 | |
| d :: Float32 | |
| end | |
| @inline function add(x::Quad, y::Quad) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define void @julia_load_array_of_float([4 x float]* %a, [4 x float]* %b, [4 x float]* %c) { | |
| top: | |
| %a_arr = load [4 x float], [4 x float]* %a, align 4 | |
| %a0 = extractvalue [4 x float] %a_arr, 0 | |
| %a2 = extractvalue [4 x float] %a_arr, 2 | |
| %a1 = extractvalue [4 x float] %a_arr, 1 | |
| %b_arr = load [4 x float], [4 x float]* %b, align 4 | |
| %b0 = extractvalue [4 x float] %b_arr, 0 | |
| %b2 = extractvalue [4 x float] %b_arr, 2 | |
| %b1 = extractvalue [4 x float] %b_arr, 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @noinline function matmul!{N}(C, A, B, ::Type{Val{N}}) | |
| @inbounds for i in 1:N, j in 1:N | |
| @simd for k in 1:N | |
| C[k, j] += A[k, i] * B[i, j] | |
| end | |
| end | |
| end | |
| n = 1 | |
| A = rand(Float64, n, n) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| julia> Pkg.clone("http://github.com/rprechelt/Vectorize.jl") | |
| INFO: Initializing package repository /home/archr/.julia/v0.5 | |
| INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl | |
| INFO: Cloning Vectorize from http://github.com/rprechelt/Vectorize.jl | |
| INFO: Computing changes... | |
| INFO: No packages to install, update or remove | |
| INFO: Package database updated | |
| julia> Pkg.build("Vectorize") | |
| INFO: Building Vectorize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| x bindings/d/sources/ | |
| x bindings/d/sources/main.d | |
| x bindings/d/sources/yeppp/ | |
| x bindings/d/sources/yeppp/types.d | |
| x bindings/d/sources/yeppp/math.d | |
| x bindings/d/sources/yeppp/library.d | |
| x bindings/d/sources/yeppp/core.d | |
| INFO: ====== Successfully installed Yeppp! ====== | |
| TESTING: abs!(Vector{Float32}, Vector{Complex{Float32}}) |
OlderNewer