X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fperl%2FUCW%2FConfigure%2FLibUCW.pm;h=7feef1e29dbc2c0faeb3f96d113868c058d56123;hb=643dc4c0697865fbe124d814e736d64a456a5da2;hp=46cac732aaf3d9c4eeb53c20e717e6da7db33a93;hpb=6e603450b52d4b486dc30295a56e8daf33210c18;p=libucw.git diff --git a/ucw/perl/UCW/Configure/LibUCW.pm b/ucw/perl/UCW/Configure/LibUCW.pm index 46cac732..7feef1e2 100644 --- a/ucw/perl/UCW/Configure/LibUCW.pm +++ b/ucw/perl/UCW/Configure/LibUCW.pm @@ -1,5 +1,5 @@ # UCW Library configuration system: parameters of the library -# (c) 2005--2010 Martin Mares +# (c) 2005--2012 Martin Mares # (c) 2006 Robert Spalek # (c) 2008 Michal Vaner @@ -35,13 +35,15 @@ Set("CONFIG_UCW_PARTMAP_IS_MMAP") if IsSet("CPU_64BIT_POINTERS"); 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")) { @@ -93,8 +95,7 @@ PostConfig { # Included symbols '^CONFIG_UCW_' => 1, '^CPU_' => 1, - '^(SHERLOCK|UCW)_VERSION(_|$)' => 1, - + '^UCW_VERSION(_|$)' => 1, ]); } if Get("CONFIG_INSTALL_API");