From 1a7b57c347f68ab2ce072c7f316e01f09c3ecba5 Mon Sep 17 00:00:00 2001 From: Nicolas Robidoux Date: Sun, 15 Mar 2009 21:04:22 +0000 Subject: [PATCH] instruction scheduling tweaks --- libsrc/resample/nohalo.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/libsrc/resample/nohalo.cpp b/libsrc/resample/nohalo.cpp index 5b21cec0..0d7fdbb6 100644 --- a/libsrc/resample/nohalo.cpp +++ b/libsrc/resample/nohalo.cpp @@ -361,8 +361,8 @@ nohalo_sharp_level_1( /* * Useful sums: */ - const double twice_dos_two_plus_dos_thr = 2. * ( dos_two + dos_thr ); - const double twice_dos_two_plus_tre_two = 2. * ( dos_two + tre_two ); + const double dos_two_plus_dos_thr = dos_two + dos_thr; + const double dos_two_plus_tre_two = dos_two + tre_two; /* * Products useful for minmod: @@ -393,33 +393,36 @@ nohalo_sharp_level_1( * pixel areas) double resolution pixel value: */ const double four_times_dos_twothr = - twice_dos_two_plus_dos_thr - + FAST_MINMOD( deux_dos, prem_dos, deux_dos_prem_dos, deux_dos_deux_dos ) - - FAST_MINMOD( deux_dos, troi_dos, deux_dos_troi_dos, deux_dos_deux_dos ); + FAST_MINMOD( deux_dos, troi_dos, deux_dos_troi_dos, deux_dos_deux_dos ) + + + 2. * dos_two_plus_dos_thr; /* * Compute the needed "down" double resolution pixel value: */ const double four_times_dostre_two = - twice_dos_two_plus_tre_two - + FAST_MINMOD( deux_two, prem_two, deux_two_prem_two, deux_two_deux_two ) - - FAST_MINMOD( deux_two, troi_two, deux_two_troi_two, deux_two_deux_two ); + FAST_MINMOD( deux_two, troi_two, deux_two_troi_two, deux_two_deux_two ) + + + 2. * dos_two_plus_tre_two; /* * Compute the "diagonal" (at the boundary between thrr input * pixel areas) double resolution pixel value: */ - const double eight_times_dostre_twothr = + const double piece_of_eight_times_dostre_twothr = four_times_dos_twothr + - 2. * deux_thr_plus_deux_dos - + four_times_dostre_two + + 2. * deux_thr_plus_deux_dos; + + const double eight_times_dostre_twothr = + piece_of_eight_times_dostre_twothr + + FAST_MINMOD( deux_tre, prem_tre, deux_tre_prem_tre, deux_tre_deux_tre ) - FAST_MINMOD( deux_tre, troi_tre, deux_tre_troi_tre, deux_tre_deux_tre )