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 <chrono> | |
#include <iostream> | |
#include <string> | |
int main(int argc, char**) { | |
auto start = std::chrono::high_resolution_clock::now(); | |
uint LIM{argc > 1 ? 35651584U : 272U}; | |
std::string in; | |
in.reserve(LIM << 1); // big buffer | |
std::cin >> in; |
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 <iostream> | |
#include <string> | |
#include <array> | |
#include <map> | |
#include <set> | |
// A point is just an array of two elements | |
using Point = std::array<int, 2>; | |
// We need to add two points to make a new point, so let's write operator+ |
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
// compile with -O3 -march=native -std=c++14 | |
#include <array> | |
#include <chrono> | |
#include <cstdint> | |
#include <cstdlib> | |
#include <iostream> | |
#include <map> | |
#include <regex> | |
#include <string> | |
#include <unordered_map> |
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 <iostream> | |
#include <string> | |
#include <array> | |
#include <map> | |
#include <set> | |
using Point = std::array<int, 2>; | |
inline Point operator+(const Point& p1, const Point& p2) { | |
return {{std::get<0>(p1) + std::get<0>(p2), std::get<1>(p1) + std::get<1>(p2)}}; |
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 <iostream> | |
#include <map> | |
#include <sstream> | |
#include <string> | |
std::string from_pattern(std::string pattern) { | |
int i{0}; | |
std::map<char, int> m; | |
std::ostringstream s; | |
for (char c : pattern) { |
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
.file "Day06.c" | |
.text | |
.p2align 4,,15 | |
.globl file_size | |
.type file_size, @function | |
file_size: | |
.LFB4874: | |
.cfi_startproc | |
subq $152, %rsp | |
.cfi_def_cfa_offset 160 |
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 <algorithm> | |
#include <iostream> | |
#include <vector> | |
#include <chrono> | |
int main() { | |
int index{-1}; | |
int sum{0}; | |
std::string line; | |
auto timeStart = std::chrono::high_resolution_clock::now(); |
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
/* | |
$ /opt/cuda/bin/nvcc --keep iterDeductionSmokeTest.cpp -m64 -DRAJA_ENABLE_NESTED -O2 -restrict -arch compute_35 -std c++11 --expt-extended-lambda -x cu -ccbin /opt/cuda/bin/g++ -Xcompiler -fopenmp -DNVCC -I/opt/cuda/include -I/opt/cuda/include -I/home/wkillian/RAJA_build/tpl/src/googletest/include -I/home/wkillian/RAJA_build/include/RAJA -I/home/wkillian/RAJA_build/include -I/home/wkillian/RAJA/include -I/home/wkillian/RAJA/test/include | |
*/ | |
#include <iostream> | |
#include <iterator> | |
#include <type_traits> | |
#include <algorithm> | |
#include <RAJA/RAJA.hxx> |
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
#!/bin/bash | |
echo "Regenerating README Table" | |
if [ -a .commit ] | |
then | |
rm -f .commit | |
cat<<'EOF' > .process.awk | |
#!/usr/bin/env gawk | |
BEGIN{ | |
FS = "[| \t]+"; |
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 <iostream> | |
#include <array> | |
#include <algorithm> | |
#include <numeric> | |
typedef unsigned long long ULL; | |
// Delcare the litparser | |
template<ULL Sum, char... Chars> struct litparser; |