Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
unroll.i
Package: arith_coder-3.rar [view]
Upload User: ykyjsl
Upload Date: 2022-01-30
Package Size: 145k
Code Size: 2k
Category:
Compress-Decompress algrithms
Development Platform:
C/C++
- /* 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