Skip to content

Instantly share code, notes, and snippets.

View EricWF's full-sized avatar

Eric EricWF

View GitHub Profile
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <functional>
  • Can constructors be resumable functions?
  • Can resumable variable declarations be static or thread local?
  • Can resumable variables declarations occur at global scope?
  • Must resumable variable declarations be declared with an auto specifier?
  • Currently, resumable functions must be defined by the end of the TU. I think this may need to be weakened to before they're used.
  • Static functions should also be allowed to be implicitly resumable, like inline functions.
Insbruke austria
"land of castles"
Vorarlberg
- Go in july
#include "benchmark/benchmark.h"
#include "GenerateInput.hpp"
#include "test_iterators.h"
#include <ciso646>
#ifdef _LIBCPP_VERSION
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#else
#include <filesystem>
namespace fs = std::filesystem;
project(test-cmake CXX)
cmake_minimum_required(VERSION 3.9)
#
set(header_in ${CMAKE_CURRENT_BINARY_DIR}/header.in)
file(WRITE ${header_in}
"
#ifndef MY_HEADER
#define MY_HEADER
int my_x = 42;

Google Benchmark V2 Design Document

This document lays out the design goals for v2 of the Google Benchmark library, as well as the problems and use-cases they're intented to address.

Supporting Arbitrary User Input and Output

One problem with v1 of the library is its limitations in allowing users to provide arbitrary input to their benchmarks, as well as specifying arbitrary output as part of the results. Multiple

static bool have_entered_main = false;
static int num_constructed = 0;
class StaticInitFixtureTest : public ::benchmark::Fixture {
public:
StaticInitFixtureTest() {
++num_constructed;
assert(have_entered_main);
}
// See llvm.org/PR35078
TEST_CASE(test_PR35078)
{
using namespace std::experimental::filesystem;
scoped_test_env env;
const path testFiles[] = {
env.create_dir("dir1"),
env.create_dir("dir1/dir2"),
env.create_dir("dir1/dir2/dir3"),
======================================================
======================================================
Running Test: [LClassB;@2b193f2d
-Instance of Array 'ClassB[12]' <@723074861>:
|-Value At [0] = <null>:
|-Value At [1] = <null>:
|-Value At [2] = <null>:
|-Value At [3] = <null>:
|-Value At [4] = <null>:
|-Value At [5] = <null>:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.