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 <cstddef> | |
#include <cstdlib> | |
#include <memory> | |
//! @brief Wraps compiler specific builtin alignment assumptions | |
template <std::size_t alignment, typename T> | |
T* assume_aligned(T* ptr) | |
{ | |
#if defined(__INTEL_COMPILER) | |
// ICPC defines __GNUC__ so check this first |
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 <template_append.hpp> | |
#include <tuple> | |
#define WITH_INT | |
#define WITH_DOUBLE | |
using type0 = std::tuple<>; | |
#ifdef WITH_INT | |
using type1 = JMAL::template_append<int, type0>::type; | |
#else |
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
#ifndef _GENERIC_METRICS_H | |
#define _GENERIC_METRICS_H | |
#include <cstddef> | |
#include <tuple> | |
#include <utility> | |
#if !__cpp_lib_tuples_by_type | |
static_assert(false, "Missing required C++14 feature"); | |
#endif |
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 <initializer_list> | |
#include <iostream> | |
#include <memory> | |
#include <string> | |
// Example base type | |
class Base | |
{ | |
public: | |
Base(const double a, const double b) : |