libfoedus-core
FOEDUS Core Library
assorted_func.cpp File Reference
#include "foedus/assorted/assorted_func.hpp"
#include <cxxabi.h>
#include <stdint.h>
#include <unistd.h>
#include <valgrind.h>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <sstream>
#include <string>
#include <thread>
#include "foedus/debugging/rdtsc.hpp"
Include dependency graph for assorted_func.cpp:

Go to the source code of this file.

Namespaces

 foedus
 Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
 
 foedus::assorted
 Assorted Methods/Classes that are too subtle to have their own packages.
 

Functions

int64_t foedus::assorted::int_div_ceil (int64_t dividee, int64_t dividor)
 Efficient ceil(dividee/dividor) for integer. More...
 
std::string foedus::assorted::replace_all (const std::string &target, const std::string &search, const std::string &replacement)
 target.replaceAll(search, replacement). More...
 
std::string foedus::assorted::replace_all (const std::string &target, const std::string &search, int replacement)
 target.replaceAll(search, String.valueOf(replacement)). More...
 
std::string foedus::assorted::os_error ()
 Thread-safe strerror(errno). More...
 
std::string foedus::assorted::os_error (int error_number)
 This version receives errno. More...
 
std::string foedus::assorted::get_current_executable_path ()
 Returns the full path of current executable. More...
 
std::ostream & foedus::assorted::operator<< (std::ostream &o, const Hex &v)
 
std::ostream & foedus::assorted::operator<< (std::ostream &o, const HexString &v)
 
std::ostream & foedus::assorted::operator<< (std::ostream &o, const Top &v)
 
std::string foedus::assorted::demangle_type_name (const char *mangled_name)
 Demangle the given C++ type name if possible (otherwise the original string). More...
 
uint64_t foedus::assorted::generate_almost_prime_below (uint64_t threshold)
 Generate a prime or some number that is almost prime less than the given number. More...
 
void foedus::assorted::spinlock_yield ()
 Invoke _mm_pause(), x86 PAUSE instruction, or something equivalent in the env. More...
 

Variables

const char * foedus::assorted::kUpperHexChars = "0123456789ABCDEF"