Hi Thomas, The timings are impressive! OK for trunk.
Thanks Paul On 1 July 2017 at 14:48, Thomas Koenig <tkoe...@netcologne.de> wrote: > Hello world, > > the attached patch implements the blocked algorithm for > constant shift for dim > 1 for eoshift0 (which handles > the case of constant shift and constant fill value). > > Speedup, as for cshift, is large. Moving a 500*500*500 > array by -3 with eo_bench.f90 (also attached): > > $ gfortran -O3 eo_bench.f90 && ./a.out > dim = 1 t = 0.451796889 > dim = 2 t = 0.183514118 > dim = 3 t = 0.184015989 > $ gfortran-7 -static-libgfortran -O3 eo_bench.f90 && ./a.out > dim = 1 t = 0.955736041 > dim = 2 t = 1.42228103 > dim = 3 t = 3.00043702 > > Regression-tested. OK for trunk? > > Regards > > Thomas > > 2017-07-01 Thomas Koenig <tkoe...@gcc.gnu.org> > > * intrinsics/eoshift0.c: For contiguous arrays, use > block algorithm. Use memcpy where possible. > > 2017-07-01 Thomas Koenig <tkoe...@gcc.gnu.org> > > * gfortran/eoshift_3.f90: New test. -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein