This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is how we run libc++ tests on the GPU without modification. | |
// We force include this header into each test with `-include`. | |
__host__ __device__ | |
int fake_main(int, char**); | |
__global__ | |
void fake_main_kernel(int * ret) | |
{ | |
*ret = fake_main(0, NULL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (c) 2017-2017 Weng Xuetian | |
* Copyright (c) 2007-2014 Massachusetts Institute of Technology | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# author: [email protected] | |
WORKDING_DIR="${1-$HOME/.vim/bundle}" | |
GIT_DIR_ROOT="$HOME/Workspace/.gitrepo" | |
echo "Working on $WORKDING_DIR" | |
for i in `find "$WORKDING_DIR" -mindepth 1 -maxdepth 1 -type d`; do | |
REPO_NAME="${i##*/}" | |
export GIT_WORK_TREE="$WORKDING_DIR/$REPO_NAME" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Random-Number Utilities (randutil) | |
* Addresses common issues with C++11 random number generation. | |
* Makes good seeding easier, and makes using RNGs easy while retaining | |
* all the power. | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015-2022 Melissa E. O'Neill | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
******************************************************************************* | |
* The C++ Integer To String Conversion Benchmark * | |
* * | |
* Version: 2.718-20131130 * | |
* * | |
* This benchmark is based on the solutions provided in the following * | |
* stackoverflow question: * | |
* * | |
* http://stackoverflow.com/q/4351371 (Date: 20101204) * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to Install HyperDex 1.0x on Fedora 19 | |
# by James Thornton, http://jamesthornton.com | |
# First ensure you have these Fedora 19 packages installed | |
sudo yum install git autoconf automake autoconf-archive \ | |
libtool python-devel pyparsing popt-devel \ | |
cityhash-devel gcc-c++ glog-devel leveldb-devel \ | |
bison gperf flex python-sphinx pandoc help2man | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
#include <utility> | |
namespace etude { | |
template<class... Fs> | |
struct overloaded_function_impl_; | |
template<> | |
struct overloaded_function_impl_<> { | |
template<class... Args, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <array> | |
#include <functional> | |
template <typename... T> | |
using common_type_t = typename std::common_type<T...>::type; | |
template <typename T> | |
using remove_cv_t = typename std::remove_cv<T>::type; | |
template <bool, typename T, typename... U> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |