- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
- /* unroll.i
- Used for loop unrolling, duplicates the given code fragment a specified
- number of times.
- ----------------------------------------------------------
- Precondition:
- #define UNROLL_NUM Number of repetitions
- #define UNROLL_CODE Code to repeat
- To use:
- #include "unroll.i"
- Result:
- The code UNROLL_CODE repeated UNROLL_NUM times.
- ----------------------------------------------------------
- For example:
- The program fragment:
- ...
- i=0;
- #define UNROLL_NUM 3
- #define UNROLL_CODE printf("%i",i++);
- #include "unroll.i"
- ...
- is equivalent to:
- ...
- i=0;
- printf("%i",i++);
- printf("%i",i++);
- printf("%i",i++);
- ...
- ----------------------------------------------------------
- If the number of times the code fragment is to be repeated is greater
- than a certain number (here, 32), then a loop is added to repeat the code
- fragment as required.
- */
- #if UNROLL_NUM > 0
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 1
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 2
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 3
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 4
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 5
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 6
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 7
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 8
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 9
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 10
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 11
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 12
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 13
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 14
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 15
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 16
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 17
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 18
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 19
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 20
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 21
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 22
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 23
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 24
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 25
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 26
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 27
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 28
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 29
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 30
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 31
- UNROLL_CODE
- #endif
- #if UNROLL_NUM > 32
- { int __i7;
- for (__i7=0; __i7 < UNROLL_NUM-32; __i7++)
- {
- UNROLL_CODE
- }
- }
- #endif
- #undef UNROLL_NUM
- #undef UNROLL_CODE