Hi,
I have the code below that wraps an array to allow non-standard index
ranges, as part of an implementation of a linear algebra algorithm (Givens
rotations). Surprisingly the setindex! routine is taking a significant
portion of the computational cost, 30%, so I think I must not be getting
the command to compile properly. Any hints?
Cheers,
Sheehan
type ShiftArray{T<:Number}
data::Array{T,2}
colindex::Integer
rowindex::Integer
end
Base.setindex!{T<:Number}(S::ShiftArray{T},x::T,k::Integer,j::Integer)=(S.data[k
+ S.rowindex, j + S.colindex] = x)