mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
FT-291 Remove the remaining cilk artifacts
This commit is contained in:
parent
c81c06bda4
commit
84c5d22e29
3 changed files with 4 additions and 42 deletions
|
@ -1,19 +0,0 @@
|
|||
#!/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
|
|
@ -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);
|
||||
|
|
16
util/sort.h
16
util/sort.h
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue