Mercurial > repos > public > sbplib_julia
changeset 144:ce56727e4232
Add TODO for switch to using Region values in some places
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 22 Feb 2019 15:22:34 +0100 |
parents | 18b3c63673b3 |
children | f54dd4408fa7 fbabfd4e8f20 |
files | index.jl |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/index.jl Thu Feb 21 16:55:03 2019 +0100 +++ b/index.jl Fri Feb 22 15:22:34 2019 +0100 @@ -39,6 +39,10 @@ IndexTuple(t::Vararg{Tuple{T, DataType}}) where T<:Integer = Index.(t) +# TODO: Use the values of the region structs, e.g. Lower(), for the region parameter instead of the types. +# For example the following works: +# (Lower(),Upper()) isa NTuple{2, Region} -> true +# typeof((Lower(),Upper())) -> Tuple{Lower,Upper} function regionindices(gridsize::NTuple{Dim,Integer}, closuresize::Integer, region::NTuple{Dim,DataType}) where Dim return regionindices(gridsize, ntuple(x->closuresize,Dim), region) end