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
// Internal Combustion Engine | |
// | |
// Written in 2012 by Martinho Fernandes <[email protected]> | |
// | |
// To the extent possible under law, the author(s) have dedicated all copyright and related | |
// and neighboring rights to this software to the public domain worldwide. This software is | |
// distributed without any warranty. | |
// | |
// You should have received a copy of the CC0 Public Domain Dedication along with this software. | |
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. |
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
struct Gadget | |
{ | |
std::vector<Widget> w; | |
}; | |
void thread1() | |
{ | |
Gadget g; | |
launch_async(unsafe(g.w)); |
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 <string> | |
#include <iostream> | |
namespace dessert { | |
template <typename Tag> | |
struct not_quite_the_same_traits : std::char_traits<char> {}; | |
template <typename Tag> | |
using strong_string_alias = std::basic_string<char, not_quite_the_same_traits<Tag>>; | |
using vanilla_string = std::string; |
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 <wheels/concurrency/locker_box.h++> | |
#include <chrono> | |
#include <exception> | |
#include <future> | |
#include <memory> | |
#include <mutex> | |
#include <type_traits> | |
#include <utility> |
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
$ locale | |
LANG=en_US.UTF-8 | |
LC_CTYPE=en_US.UTF-8 | |
LC_NUMERIC="en_US.UTF-8" | |
LC_TIME="en_US.UTF-8" | |
LC_COLLATE="en_US.UTF-8" | |
LC_MONETARY="en_US.UTF-8" | |
LC_MESSAGES="en_US.UTF-8" | |
LC_PAPER="en_US.UTF-8" | |
LC_NAME="en_US.UTF-8" |
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
int main(){} |
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
// Usage: | |
// int f(int n) { | |
// auto buf = stack_alloc<int>(n); | |
// std::iota(buf.begin(), buf.end()); | |
// return std::sum(buf.begin(), buf.end()); | |
// } | |
// allocation function | |
template <typename T> | |
stack_array_ref<T> stack_alloc(size_t size) __magic_works_like_a_macro_to_use_the_right_frame__; |
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
template <int Size> | |
struct uint_least : uint_least<Size+1> {}; | |
template <> | |
struct uint_least<8> : identity<u8> {}; | |
template <> | |
struct uint_least<16> : identity<u16> {}; | |
template <> | |
struct uint_least<32> : identity<u32> {}; | |
template <> | |
struct uint_least<64> : identity<u64> {}; |
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
BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01") |
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
temporary_ACC creation_V. | |
temporary_DAT assignment_V x_ACC. | |
y_ACC x_DAT assignment_V. | |
assignment_V temporary_ACC y_DAT. |