|
@@ -163,9 +163,13 @@ void TightCompact_2power_inner_parallel(unsigned char *buf, size_t N, size_t blo
|
|
|
if (nthreads <= 1) {
|
|
|
FOAV_SAFE2_CNTXT(TC_inner_base_cases_of_recursion, N, block_size)
|
|
|
FOAV_SAFE_CNTXT(TC_inner_base_cases_of_recursion, nthreads)
|
|
|
+#ifdef PROFILE_TIGHTCOMPACT
|
|
|
unsigned long start = printf_with_rtclock("Thread %u starting TightCompact_2power_inner(buf=%p, N=%lu, offset=%lu, nthreads=%lu)\n", g_thread_id, buf, N, offset, nthreads);
|
|
|
+#endif
|
|
|
TightCompact_2power_inner<oswap_style>(buf, N, block_size, offset, selected, selected_count);
|
|
|
+#ifdef PROFILE_TIGHTCOMPACT
|
|
|
printf_with_rtclock_diff(start, "Thread %u ending TightCompact_2power_inner(buf=%p, N=%lu, offset=%lu, nthreads=%lu)\n", g_thread_id, buf, N, offset, nthreads);
|
|
|
+#endif
|
|
|
return;
|
|
|
}
|
|
|
FOAV_SAFE_CNTXT(TC_inner_base_cases_of_recursion, N)
|
|
@@ -179,7 +183,9 @@ void TightCompact_2power_inner_parallel(unsigned char *buf, size_t N, size_t blo
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+#ifdef PROFILE_TIGHTCOMPACT
|
|
|
unsigned long start = printf_with_rtclock("Thread %u starting TightCompact_2power_inner_parallel(buf=%p, N=%lu, offset=%lu, nthreads=%lu)\n", g_thread_id, buf, N, offset, nthreads);
|
|
|
+#endif
|
|
|
// Number of selected items in left half
|
|
|
size_t m1;
|
|
|
m1 = selected_count[N/2] - selected_count[0];
|
|
@@ -227,7 +233,9 @@ void TightCompact_2power_inner_parallel(unsigned char *buf, size_t N, size_t blo
|
|
|
FOAV_SAFE2_CNTXT(TC_2power_inner_parallel, i, nthreads)
|
|
|
threadpool_join(g_thread_id+1+i, NULL);
|
|
|
}
|
|
|
+#ifdef PROFILE_TIGHTCOMPACT
|
|
|
printf_with_rtclock_diff(start, "Thread %u ending TightCompact_2power_inner_parallel(buf=%p, N=%lu, offset=%lu, nthreads=%lu)\n", g_thread_id, buf, N, offset, nthreads);
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -348,9 +356,13 @@ void TightCompact_inner_parallel(unsigned char *buf, size_t N, size_t block_size
|
|
|
FOAV_SAFE2_CNTXT(TC_inner_base_cases_of_recursion, N, block_size)
|
|
|
FOAV_SAFE_CNTXT(TC_inner_base_cases_of_recursion, nthreads)
|
|
|
if (nthreads <= 1 || N < 16) {
|
|
|
+ #ifdef PROFILE_TIGHTCOMPACT
|
|
|
unsigned long start = printf_with_rtclock("Thread %u starting TightCompact_inner(N=%lu)\n", g_thread_id, N);
|
|
|
+ #endif
|
|
|
TightCompact_inner<oswap_style>(buf, N, block_size, selected, selected_count);
|
|
|
+ #ifdef PROFILE_TIGHTCOMPACT
|
|
|
printf_with_rtclock_diff(start, "Thread %u ending TightCompact_inner(N=%lu)\n", g_thread_id, N);
|
|
|
+ #endif
|
|
|
return;
|
|
|
}
|
|
|
if(N==0){
|
|
@@ -365,7 +377,9 @@ void TightCompact_inner_parallel(unsigned char *buf, size_t N, size_t block_size
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+#ifdef PROFILE_TIGHTCOMPACT
|
|
|
unsigned long start = printf_with_rtclock("Thread %u starting TightCompact_inner_parallel(N=%lu, nthreads=%lu)\n", g_thread_id, N, nthreads);
|
|
|
+#endif
|
|
|
|
|
|
size_t split_index, n1, n2;
|
|
|
|
|
@@ -421,7 +435,9 @@ void TightCompact_inner_parallel(unsigned char *buf, size_t N, size_t block_size
|
|
|
FOAV_SAFE2_CNTXT(TC_inner_parallel, i, nthreads)
|
|
|
}
|
|
|
|
|
|
+#ifdef PROFILE_TIGHTCOMPACT
|
|
|
printf_with_rtclock_diff(start, "Thread %u ending TightCompact_inner_parallel(N=%lu, nthreads=%lu)\n", g_thread_id, N, nthreads);
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
#ifndef BEFTS_MODE
|