Commit aa016a1b authored by John Esmet's avatar John Esmet

FT-291 Remove the remaining cilk artifacts

parent fd34813b
#!/usr/bin/env bash
# exit 1 if cilkscreen finds errors
function cleanup() {
if [ "$logfile" != "" ] ; then rm $logfile; logfile=; fi
}
trap cleanup SIGINT
logfile=$(mktemp /tmp/toku_cilkscreen.XXXXXXXX)
cilkscreen $* 2>$logfile
exitcode=$?
if [ $exitcode = 0 ] ; then
cat $logfile >>/dev/fd/2
grep "No errors found by Cilkscreen" $logfile >/dev/null 2>&1
exitcode=$?
fi
rm $logfile
exit $exitcode
\ No newline at end of file
......@@ -494,15 +494,8 @@ static int env_del_multiple_test_no_array(
{ int chk_r = (txn)->abort(txn); CKERR(chk_r); } \
})
int test_main (int argc, char * const argv[]);
int
#if defined(__cilkplusplus)
cilk_main(int argc, char *argv[])
#else
main(int argc, char * const argv[])
#endif
{
int test_main(int argc, char *const argv[]);
int main(int argc, char *const argv[]) {
int r;
toku_os_initialize_settings(1);
r = test_main(argc, argv);
......
......@@ -94,16 +94,6 @@ PATENT RIGHTS GRANT:
#include <string.h>
#include <memory.h>
#if defined(HAVE_CILK)
#include <cilk/cilk.h>
#define cilk_worker_count (__cilkrts_get_nworkers())
#else
#define cilk_spawn
#define cilk_sync
#define cilk_for for
#define cilk_worker_count 1
#endif
namespace toku {
template<typename sortdata_t, typename sortextra_t, int (*cmp)(sortextra_t &, const sortdata_t &, const sortdata_t &)>
......@@ -147,9 +137,8 @@ namespace toku {
}
const int mid = n / 2;
sortdata_t *right_as[2] = { &(as[0])[mid], &(as[1])[mid] };
const int r1 = cilk_spawn mergesort_internal(as, which, mid, extra);
const int r1 = mergesort_internal(as, which, mid, extra);
const int r2 = mergesort_internal(right_as, which, n - mid, extra);
cilk_sync;
if (r1 != r2) {
// move everything to the same place (r2)
memcpy(as[r2], as[r1], mid * (sizeof as[r2][0]));
......@@ -221,9 +210,8 @@ namespace toku {
const int a2 = an / 2;
const sortdata_t *akey = &a[a2];
const int b2 = binsearch(*akey, b, bn, 0, extra);
cilk_spawn merge(dest, a, a2, b, b2, extra);
merge(dest, a, a2, b, b2, extra);
merge(&dest[a2 + b2], akey, an - a2, &b[b2], bn - b2, extra);
cilk_sync;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment