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
#pragma once | |
#include <algorithm> | |
#include <array> | |
#include <concepts> | |
#include <optional> | |
#include <string_view> | |
#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
// Author: Will Killian | |
// | |
// Modified/Generalized from: | |
// https://code.it4i.cz/jansik/mandelbrot/-/blob/master/mandelbrot-real-fma-omp.c | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define SIZE 512 |
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> | |
template <template <class... Ts> class Name, class ... Args> | |
struct Concept { | |
}; | |
template <class> struct CheckConcept; | |
//#define RAJA_CXX_VERSION 17 |
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<typename T, typename U = std::remove_all_extents_t<T>> | |
using has_dtor = decltype(std::declval<U&>().~U()); | |
class Empty | |
{}; | |
class NotEmpty | |
{ | |
virtual ~NotEmpty(); | |
}; |
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
// Prevent warning when testing the Abstract test type. | |
#include <type_traits> | |
template <typename...> | |
struct voider { | |
using type = void; | |
}; | |
template<typename ... Ts> | |
using void_t = typename voider<Ts...>::type; |
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 <typename T> auto declval() -> T&&; | |
template <class... Args> using eval = decltype(evaluate(declval<Args>()...)); | |
template <class... Args> using eval2 = decltype(evaluate2(declval<Args>()...)); | |
template <class... Args> using eval3 = decltype(evaluate3(declval<Args>()...)); | |
template <class...> | |
struct L{}; | |
// the datatype cons (not the keyword) | |
template <class, class> |
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 <utility> | |
using Int = unsigned long long; | |
template<Int N, Int A = 0x0llu, Int B = 0x1llu> | |
constexpr Int Fib = []() constexpr { | |
if constexpr(N == 0) | |
return A; | |
else if constexpr(N == 1) |
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
echo "type in a brew package name and press enter" | |
echo "to end your queries, send EOF (Ctrl+D)" | |
echo "> " | |
while read -r package | |
do | |
brew info $package | \ | |
awk '/^From:/{ | |
gsub(/github.com/,"raw.githubusercontent.com") | |
gsub(/\/blob\//,"/") | |
print $2 |
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 POLICY_BASE_HPP_ | |
#define POLICY_BASE_HPP_ | |
#include <cstdio> | |
#include "meta.hpp" | |
// Policy base | |
enum class Policy { seq, openmp, target_openmp }; |
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
find_package(Clang REQUIRED) | |
set(CLANG_LIBRARIES clangAST clangASTMatchers clangAnalysis clangBasic clangDriver clangEdit clangFrontend clangFrontendTool clangLex clangParse clangSema clangEdit clangRewrite clangRewriteFrontend clangStaticAnalyzerFrontend clangStaticAnalyzerCheckers clangStaticAnalyzerCore clangSerialization clangToolingCore clangTooling clangFormat) | |
macro(add_clang_plugin _name) | |
add_library(${_name} SHARED "") | |
set_target_properties(${_name} | |
PROPERTIES | |
CXX_STANDARD 11 | |
CXX_STANDARD_REQUIRED On |
NewerOlder