diff -r 7dfa5bcf39ee -r 88a9ee79c102 docs/Writerside/topics/install.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/Writerside/topics/install.md Thu Jan 23 01:15:52 2025 +0100 @@ -0,0 +1,139 @@ +--- +title: Build Instructions +--- + +The build processes uses configure and make. +Make sure that you have `make` and a +supported compiler +installed. + + + + + +Download the latest source archive from Source Forge +and extract it somewhere on your machine. +You can also use the command line to do this. + +wget https://sourceforge.net/projects/ucx/files/ucx-latest.tar.gz +tar -xzf ucx-latest.tar.gz +cd ucx-latest + + + +Configure the build according to your preferences. You can get a list of +all available options with ./configure --help. +The recommended configuration for production builds is ./configure --release. + + ./configure --release + make + make check + sudo make install + +The check target is optional and only runs some tests with the built software. + + + + + + +Download the latest source archive from Source Forge +and extract it somewhere on your machine. + + +Navigate to the folder named msvc in the extracted directory structure. + + +Open the contained ucx.sln in Visual Studio and build the solution. + + + + + +## Compile Time Options + +When compiling UCX, you can tweak several compile time variables via macro definitions. + +### Features Defines + +The following macros are not defined by default. +The effect when they are defined in described in the table. + + + + + + + + + + +
MacroEffect
CX_NO_SZMUL_BUILTINT + By default, UCX uses a compiler builtin (only available for clang and gcc) + to perform multiplications with overflow check. + When this macro is defined, using the builtin is disabled and UCX will + always use an own implementation. + + This macro is defined when you use the --disable-szmul-builtin + option during configuration, so you do not need to define it manually. + +
+ +### Small Buffer Optimizations + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MacroDescriptionDefault
CX_ARRAY_SWAP_SBO_SIZEThe maximum item size in an array list that uses SBO.128
CX_LINKED_LIST_SORT_SBO_SIZEThe maximum list size that uses SBO during sort.1024
CX_PRINTF_SBO_SIZEThe maximum string length functions in printf.h use stack memory for.512
CX_STRSTR_SBO_SIZEThe maximum length of the "needle" in cx_strstr that can use SBO.128
+ + +### Other Buffers + + + + + + + + + + + + + + + + + + + + + + +
MacroDescriptionDefault
CX_STRREPLACE_INDEX_BUFFER_SIZE + The number of matches the index buffer can store on the stack. + If the function finds more matches, more index buffers of the same size are allocated on the heap. + 64
CX_STREAM_COPY_BUF_SIZEThe buffer size on the stack for a stream copy.1024
CX_STREAM_BCOPY_BUF_SIZEThe buffer size on the heap for a stream copy.8192