]> mj.ucw.cz Git - libucw.git/commitdiff
Added basic threading parameters.
authorMartin Mares <mj@ucw.cz>
Fri, 7 Sep 2007 12:33:45 +0000 (14:33 +0200)
committerMartin Mares <mj@ucw.cz>
Fri, 7 Sep 2007 12:33:45 +0000 (14:33 +0200)
lib/sorter/TODO
lib/sorter/array.c
lib/sorter/config.c

index f4a802cacbceb191459a33a6bcd864a95aab51e6..679649929abe3ac86c64546c45ea1377ae9ef7a3 100644 (file)
@@ -7,7 +7,7 @@ Improvements:
 o  Use radix-sort for internal sorting.
 o  Parallelization of internal sorting.
 o  Clean up data types and make sure they cannot overflow. (size_t vs. u64 vs. sh_off_t vs. uns)
-o  Switching between direct and normal I/O.
+o  Switching between direct and normal I/O. Should use normal I/O if the input is small enough.
 o  Deal with too rough range estimates in radix splitting.
 o  How does the speed of radix splitting decrease with increasing number of hash bits?
    Does it help to use more bits than we need, so that we sort less data in memory?
index a6c217e8b2dca296f86edc5a79cef8630f71508c..e3cc07fbb15cfb734c9d4078125893c78eacfaa8 100644 (file)
@@ -57,6 +57,10 @@ asort_radix(struct asort_context *ctx, void *array, void *buffer, uns num_elts,
     }
 }
 
+#ifdef CONFIG_UCW_THREADS
+
+#endif
+
 void
 asort_run(struct asort_context *ctx)
 {
index a4bfc67bf90fb5bbf0698aa44803f887f5b16e95..b701c53fbb20c48c338fb8ad472c0ef023a1d020 100644 (file)
@@ -21,6 +21,8 @@ uns sorter_min_radix_bits;
 uns sorter_max_radix_bits;
 uns sorter_min_multiway_bits;
 uns sorter_max_multiway_bits;
+uns sorter_threads;
+uns sorter_thread_threshold;
 struct fb_params sorter_fb_params;
 
 static struct cf_section sorter_config = {
@@ -35,6 +37,8 @@ static struct cf_section sorter_config = {
     CF_UNS("MaxRadixBits", &sorter_max_radix_bits),
     CF_UNS("MinMultiwayBits", &sorter_min_multiway_bits),
     CF_UNS("MaxMultiwayBits", &sorter_max_multiway_bits),
+    CF_UNS("NumThreads", &sorter_threads),
+    CF_UNS("ThreadThreshold", &sorter_thread_threshold),
     CF_END
   }
 };