# UCW Library configuration system: parameters of the library
-# (c) 2005--2010 Martin Mares <mj@ucw.cz>
+# (c) 2005--2012 Martin Mares <mj@ucw.cz>
# (c) 2006 Robert Spalek <robert@ucw.cz>
# (c) 2008 Michal Vaner <vorner@ucw.cz>
Set("CONFIG_UCW_POOL_IS_MMAP");
# Guess optimal bit width of the radix-sorter
-if (Get("CPU_ARCH") eq "default" || Get("CPU_ARCH") =~ /^i[345]86$/) {
- # This should be safe everywhere
- Set("CONFIG_UCW_RADIX_SORTER_BITS" => 10);
-} else {
- # Use this on modern CPU's
- Set("CONFIG_UCW_RADIX_SORTER_BITS" => 12);
-}
+Test("CONFIG_UCW_RADIX_SORTER_BITS", "Determining radix sorter bucket width", sub {
+ if (Get("CPU_AMD64")) {
+ # All amd64 CPUs have large enough L1 cache
+ return 12;
+ } else {
+ # This should be safe everywhere
+ return 10;
+ }
+});
# Detect if thread-local storage is supported
if (Get("CONFIG_UCW_THREADS")) {
# Included symbols
'^CONFIG_UCW_' => 1,
'^CPU_' => 1,
- '^(SHERLOCK|UCW)_VERSION(_|$)' => 1,
-
+ '^UCW_VERSION(_|$)' => 1,
]);
} if Get("CONFIG_INSTALL_API");