1
0
Fork 0

Conversion errors

This commit is contained in:
Simon Grätzer 2017-04-06 10:50:40 +02:00
parent 60956dc09c
commit a90e62bc02
8 changed files with 12 additions and 12 deletions

View File

@ -162,7 +162,7 @@ class IndexBlock final : public ExecutionBlock {
/// @brief Counter how many documents have been returned/skipped
/// during one call.
size_t _returned;
uint64_t _returned;
/// @brief Collect several AQLItemsBlocks
BlockCollector _collector;

View File

@ -78,7 +78,7 @@ Table::Table(uint32_t logSize)
_logSize(std::min(logSize, maxLogSize)),
_size(static_cast<uint64_t>(1) << _logSize),
_shift(32 - _logSize),
_mask((_size - 1) << _shift),
_mask((uint32_t)((_size - 1) << _shift)),
_buffer(new uint8_t[(_size * BUCKET_SIZE) + Table::padding]),
_buckets(reinterpret_cast<GenericBucket*>(
reinterpret_cast<uint64_t>((_buffer.get() + 63)) &

View File

@ -86,7 +86,7 @@ static std::string const RESTART_COUNTER_AGG = "aggRestart";
/** Maximum steps for the random walk, corresponds to t*. Default = 1000 */
static uint64_t const RW_ITERATIONBOUND = 10;
static const float PROFTIABILITY_DELTA = 0.3;
static const float PROFTIABILITY_DELTA = 0.3f;
static const bool LOG_AGGS = false;
@ -523,7 +523,7 @@ struct DMIDComputation
float const ttt = pair.second / getEdges().size();
if (ttt > *threshold) {
/** its profitable to become a member, set value */
vertexState->membershipDegree[pair.first] = 1.0 / std::pow(*iterationCounter / 3, 2);
vertexState->membershipDegree[pair.first] = 1.0f / std::pow(*iterationCounter / 3, 2);
aggregate<bool>(NEW_MEMBER_AGG, true);
}
}

View File

@ -34,7 +34,7 @@ using namespace arangodb::pregel;
#else
inline uint8_t _get_leading_zero_count(uint64_t x, uint8_t b) {
inline uint8_t _get_leading_zero_count(uint32_t x, uint8_t b) {
#if defined (_MSC_VER)
unsigned long leading_zero_len = 32;

View File

@ -34,8 +34,8 @@ using namespace arangodb::pregel;
using namespace arangodb::pregel::algos;
static std::string const kMoreIterations = "more";
static const double RESTART_PROB = 0.15;
static const double EPS = 0.0000001;
static const float RESTART_PROB = 0.15f;
static const float EPS = 0.0000001f;
LineRank::LineRank(arangodb::velocypack::Slice params)
: SimpleAlgorithm("LineRank", params) {
@ -81,7 +81,7 @@ struct LRComputation : public VertexComputation<float, float, float> {
} else {
newScore /= edges.size();
newScore = ctx->startAtNodeProb * RESTART_PROB +
newScore * (1.0 - RESTART_PROB);
newScore * (1.0f - RESTART_PROB);
}
float diff = fabsf(newScore - *vertexValue);

View File

@ -32,7 +32,7 @@ using namespace arangodb;
using namespace arangodb::pregel;
using namespace arangodb::pregel::algos;
static float EPS = 0.00001;
static float EPS = 0.00001f;
static std::string const kConvergence = "convergence";
static std::string const kStep = "step";
static std::string const kRank = "rank";

View File

@ -47,8 +47,8 @@ struct LPValue {
/// Value for Hyperlink-Induced Topic Search (HITS; also known as
/// hubs and authorities)
struct HITSValue {
float authorityScore;
float hubScore;
double authorityScore;
double hubScore;
};
struct DMIDValue {

View File

@ -125,7 +125,7 @@ void RocksDBEngine::start() {
_options.create_if_missing = true;
_options.max_open_files = -1;
_options.comparator = _cmp.get();
_options.WAL_ttl_seconds = counter_sync_seconds * 2;
_options.WAL_ttl_seconds = (uint64_t)(counter_sync_seconds * 2.0);
// TODO: prefix_extractior + memtable_insert_with_hint_prefix
rocksdb::Status status =