This file contains hidden or 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 <concepts> | |
#include <type_traits> | |
template<auto X> | |
struct constexpr_v; | |
template<class T> | |
concept constexpr_param = requires { typename constexpr_v<T::value>; } and |
This file contains hidden or 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 <assert.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <sys/mman.h> | |
#include <sys/stat.h> | |
#include <unistd.h> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
NewerOlder