kccachedb.h   kccachedb.h 
skipping to change at line 585 skipping to change at line 585
* be performed in this function. * be performed in this function.
*/ */
bool scan_parallel(Visitor *visitor, size_t thnum, ProgressChecker* check er = NULL) { bool scan_parallel(Visitor *visitor, size_t thnum, ProgressChecker* check er = NULL) {
_assert_(visitor && thnum <= MEMMAXSIZ); _assert_(visitor && thnum <= MEMMAXSIZ);
ScopedRWLock lock(&mlock_, false); ScopedRWLock lock(&mlock_, false);
if (omode_ == 0) { if (omode_ == 0) {
set_error(_KCCODELINE_, Error::INVALID, "not opened"); set_error(_KCCODELINE_, Error::INVALID, "not opened");
return false; return false;
} }
if (thnum < 1) thnum = 1; if (thnum < 1) thnum = 1;
thnum = std::pow(2, (int32_t)std::log2(thnum * std::sqrt(2))); thnum = std::pow(2.0, (int32_t)(std::log(thnum * std::sqrt(2.0)) / std: :log(2.0)));
if (thnum > (size_t)SLOTNUM) thnum = SLOTNUM; if (thnum > (size_t)SLOTNUM) thnum = SLOTNUM;
ScopedVisitor svis(visitor); ScopedVisitor svis(visitor);
int64_t allcnt = count_impl(); int64_t allcnt = count_impl();
if (checker && !checker->check("scan_parallel", "beginning", -1, allcnt )) { if (checker && !checker->check("scan_parallel", "beginning", -1, allcnt )) {
set_error(_KCCODELINE_, Error::LOGIC, "checker failed"); set_error(_KCCODELINE_, Error::LOGIC, "checker failed");
return false; return false;
} }
class ThreadImpl : public Thread { class ThreadImpl : public Thread {
public: public:
explicit ThreadImpl() : explicit ThreadImpl() :
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 kccommon.h   kccommon.h 
skipping to change at line 81 skipping to change at line 81
inline long double modfl(long double val, long double* iptr) { inline long double modfl(long double val, long double* iptr) {
double integ; double integ;
double fract = std::modf(val, &integ); double fract = std::modf(val, &integ);
*iptr = integ; *iptr = integ;
return fract; return fract;
} }
#endif #endif
namespace std { namespace std {
using ::modfl; using ::modfl;
using ::log2;
using ::snprintf; using ::snprintf;
} }
#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined (_MSC_VER) #if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined (_MSC_VER)
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#else #else
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/