Build Configuration

Collaboration diagram for Build Configuration:


Detailed Description

These macros are available to tune the behavior of the core library. They will always be prefixed with DWFCORE_


Modules

 Memory Management
 These macros are available to alter the memory management functions in the core library.
 String Handling
 These macros are available to alter string class behavior and string handling functions in the core library.
 General ANSI Build Configuration
 These macros are available to alter the functionality of the core library built for any platform (though with some emphasis/preference for Linux and BSD systems.).
 Microsoft Windows Build Configuration
 These macros are available to alter the functionality of the core library built for Microsoft Windows platforms.

Defines

#define DWFCORE_DECOMPRESSING_INPUT_STREAM_DECOMPRESSION_BUFFER_SIZE   16384
 Defines the size of the overrun buffer to allocate if needed.
#define DWFCORE_COMPRESSING_INPUT_STREAM_COMPRESSION_BUFFER_SIZE   16384
 Defines the size of the overrun buffer to allocate if needed.
#define DWFCORE_SKIPLIST_PROBABILITY_DISTRIB   0.5f
 Defines the probability value that each successively higher level of a node will be chosen.
#define DWFCORE_SKIPLIST_MAX_NODE_LEVEL   31
 Defines the maximum number of elements in the list.
#define DWFCORE_SKIPLIST_INITIAL_HEIGHT   5
 Defines the initial node level.
#define DWFCORE_BUILD_ZLIB
 Indicates zlib compression will be built into the library; also used by clients of the libary with zlib built-in.
#define DWFCORE_HASH_DJB2_USE_ORIGINAL_VERSION
 Uses the original version of the DJB2 hash function.
#define DWFCORE_HASH_FNV_DONT_USE_GCC_OPTIMIZATION
 Use multiplication in hash calculation instead of faster byte shifting.


Define Documentation

#define DWFCORE_BUILD_ZLIB
 

Indicates zlib compression will be built into the library; also used by clients of the libary with zlib built-in.

Note:
If this macro is defined and zlib is compiled into the library, it is highly recommended (and usually required) that client code also define this macro to ensure the proper header is found at build time.
The DWF Core library depends on zlib compression and ships with a copy of this library. If this macro is defined, a version of zlib (currently 1.1.3 July 1998) will be compiled into the library. However, it may be desireable to take advantage of a newer or previously installed version. In this case, zlib must be linked in explicitly by consumers of the DWF Core library.

Definition at line 254 of file preprocessor.txt.

#define DWFCORE_COMPRESSING_INPUT_STREAM_COMPRESSION_BUFFER_SIZE   16384
 

Defines the size of the overrun buffer to allocate if needed.

Defines the size of the overrun buffer to allocate if needed. This buffer is created if more bytes are compressed than will fit into the callers read buffer. These bytes are cached and returned in a subsequent read() request.

Definition at line 55 of file DWFCompressingInputStream.h.

#define DWFCORE_DECOMPRESSING_INPUT_STREAM_DECOMPRESSION_BUFFER_SIZE   16384
 

Defines the size of the overrun buffer to allocate if needed.

Defines the size of the overrun buffer to allocate if needed. This buffer is created if more bytes are decompressed than will fit into the callers read buffer. These bytes are cached and returned in a subsequent read() request.

Definition at line 60 of file DecompressingInputStream.h.

#define DWFCORE_HASH_DJB2_USE_ORIGINAL_VERSION
 

Uses the original version of the DJB2 hash function.

Defining this macro will enable the use of the original DJB2 hashing function in the tDWFDJB2HashKernel, defined by

 hash(i) = hash(i - 1) << 5 + hash(i-1) + content(i) 
.

By default, the newer version is used:

 hash(i) = hash(i-1) * 33 ^ content(i) 

Definition at line 516 of file preprocessor.txt.

#define DWFCORE_HASH_FNV_DONT_USE_GCC_OPTIMIZATION
 

Use multiplication in hash calculation instead of faster byte shifting.

From (http://www.isthe.com/chongo/tech/comp/fnv/index.html):

It has been reported by several people that under the gcc compiler with -O3 on many AMD & Intel CPUs, that replacing the FNV_prime multiply with an expression of shifts and adds will improve the performance.

Defining this macro will enable the use of the multiplication:

32-bit algorithm:

 hash(i) *= (uint32_t)0x01000193L 

64-bit algorithm:

 hash(i) *= (uint64_t)0x100000001b3 

By default, this shifting code is enabled:

32-bit algorithm:

 hash(i) += ((hash(i-1)<<1) + (hash(i-1)<<4) + (hash(i-1)<<7) + (hash(i-1)<<8) + (hash(i-1)<<24)) 

64-bit algorithm:

 hash(i) += ((hash(i-1) << 1) + (hash(i-1) << 4) + (hash(i-1) << 5) + (hash(i-1) << 7) + (hash(i-1) << 8) + (hash(i-1) << 40)) 

Definition at line 540 of file preprocessor.txt.

#define DWFCORE_SKIPLIST_INITIAL_HEIGHT   5
 

Defines the initial node level.

This value can be increased for those lists that are highly likely to contain numerous elements.

Todo:
This value can be a construction time parameter.

Definition at line 77 of file SkipList.h.

#define DWFCORE_SKIPLIST_MAX_NODE_LEVEL   31
 

Defines the maximum number of elements in the list.

The maximum number of elements is 2**(DWFCORE_SKIPLIST_MAX_NODE_LEVEL + 1)

Todo:
This value can be a construction time parameter.

Definition at line 65 of file SkipList.h.

#define DWFCORE_SKIPLIST_PROBABILITY_DISTRIB   0.5f
 

Defines the probability value that each successively higher level of a node will be chosen.

The probability value that each successively higher level of a skip list node will be chosen. Values around 0.5 yield best search performance and smaller values yield lower memory usage (less forward references)

Todo:
This value can be a construction time parameter.

Definition at line 54 of file SkipList.h.


Generated on Tue Jan 6 22:39:29 2009 for Autodesk DWF Core Library by  doxygen 1.4.5