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
using BenchmarkTools | |
using LinearAlgebra | |
using LinearAlgebra: givensAlgorithm | |
""" | |
I want to apply 4 'fused' Givens rotations to 4 columns of matrix Q. Here Q | |
is a n x 4 matrix. In the benchmarks I compare the number of GFLOP/s when the | |
rotations are applied to Q directly (vertical) versus when Q is first | |
transposed (horizontal). |
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
using LinearAlgebra | |
using LinearAlgebra: givensAlgorithm | |
using Test | |
using BenchmarkTools | |
import LinearAlgebra: rmul! | |
abstract type SmallRotation end | |
struct Rotation2{Tc,Ts} <: SmallRotation |
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
using LinearAlgebra | |
using LinearAlgebra: givensAlgorithm | |
using Test | |
using BenchmarkTools | |
import LinearAlgebra: rmul! | |
abstract type SmallRotation end | |
struct Rotation2{Tc,Ts} <: SmallRotation |
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
Chasing two double-shift-bulges one step forward using two | |
reflections G1 and G2 of size 3 (they are each composed of | |
two Givens rotations). | |
x x x x x x x x x x x x x x x x | |
x x x x x x x x ┐ x x x x x x x x | |
x x x x x x x x │ double shift G2 . x x x x x x x | |
x x x x x x x x ┘ . x x x x x x x | |
. . . x x x x x ┐ . x x x x x x x | |
. . . x x x x x │ double shift G1 . . . . x x x x |
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
using Base: tail | |
abstract type Ord end | |
# Composable ordering objects | |
struct Op{F} <: Ord | |
isless::F | |
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
using StaticArrays | |
import Base: \ | |
import LinearAlgebra: lu | |
using Base: OneTo | |
struct CompletelyPivotedLU{T,N,TA<:SMatrix{N,N,T},TP} | |
A::TA | |
p::TP | |
q::TP |
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
module TupleBench | |
using BenchmarkTools | |
const t32 = ntuple(identity, Val(32)) | |
const t256 = ntuple(identity, Val(256)) | |
const t1024 = ntuple(identity, Val(1024)) | |
const v32 = collect(1:32) | |
const v256 = collect(1:256) | |
const v1024 = collect(1:1024) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
using Base: OneTo | |
using AbstractFFTs: ScaledPlan, normalization | |
using FFTW | |
using LinearAlgebra | |
struct RealFFT{T,N,V<:AbstractArray{T,N}} | |
data::V | |
nx::Int | |
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
using LinearAlgebra | |
using LinearAlgebra: givensAlgorithm | |
using IRAM | |
using BenchmarkTools | |
struct Rotation2D{Tc,Ts} | |
c::Tc | |
s::Ts | |
end |