pastebin - collaborative debugging tool
eckelmann.kpaste.net RSS


Quantron ccfilter loop optimisation
Posted by Anonymous on Mon 28th Oct 2019 14:18
raw | new post

  1. diff --git a/ptxdist/local_src/ecu01-comp-cap/mmc_imp.c b/ptxdist/local_src/ecu01-comp-cap/mmc_imp.c
  2. index 5edb6d2..6155d8a 100644
  3. --- a/ptxdist/local_src/ecu01-comp-cap/mmc_imp.c
  4. +++ b/ptxdist/local_src/ecu01-comp-cap/mmc_imp.c
  5. @@ -98,16 +98,8 @@ int GetPhaseShift(const unsigned int * restrict ref, const unsigned int * restri
  6.                  * ref were the previous pair of values was found
  7.                  */
  8.  
  9. -
  10. -/*
  11. - * In *theory* we should count from the last value of |j|, but somehow
  12. - * this does not work. We need to re-investigate this later.
  13. - */
  14. -#ifdef DOES_NOT_WORK_YET
  15. -               for ( ; j<size ; j++) {
  16. -#else
  17. -               for (j=0 ; j<size ; j++) {
  18. -#endif
  19. +#define MAXNUM(a,b) (((a)>(b))?(a):(b)) /* MIN()/MAX() might not be useable in a portable way */
  20. +               for (j=MAXNUM(j-1, 0) ; j<size ; j++) {
  21.                         diff = shift[j] - ref[i];     /* calculate difference between shift and ref */
  22.  
  23.                         /*

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at