Skip to content

Instantly share code, notes, and snippets.

View tranzystorekk's full-sized avatar

tranzystorekk

View GitHub Profile
This file has been truncated, but you can view the full file.
Start testing: Jan 08 13:03 UTC
----------------------------------------------------------
1/11 Testing: external-calls-tahiti-amdgcn--.bc
1/11 Test: external-calls-tahiti-amdgcn--.bc
Command: "/builddir/libclc-15.0.6/check_external_calls.sh" "/builddir/libclc-15.0.6/build/tahiti-amdgcn--.bc"
Directory: /builddir/libclc-15.0.6
"external-calls-tahiti-amdgcn--.bc" start time: Jan 08 13:03 UTC
Output:
----------------------------------------------------------
File /builddir/libclc-15.0.6/build/tahiti-amdgcn--.bc is OK
#include <vector>
#include <unordered_map>
#include <string>
#include <iostream>
struct PDU { char header; char c; };
std::vector<std::string> reorder(const std::vector<PDU> &pdus) {
std::unordered_map<int, std::string> words;
#include <algorithm>
#include <iostream>
#include <vector>
template <typename T>
bool foo(const std::vector<T>& v) {
auto is_odd = [](auto&& i){ return i % 2 != 0; };
if (!std::is_partitioned(begin(v), end(v), is_odd)) {
return false;
}
@tranzystorekk
tranzystorekk / d01p2.hs
Created December 2, 2019 00:32
AoC 2019 day1 part2 Haskell
fuelReq :: Int -> Int
fuelReq m = div m 3 - 2
fuelChain :: Int -> [Int]
fuelChain m = takeWhile (> 0) (iterate fuelReq m)
totalFuel = sum $ map (sum . fuelChain) [1, 2, 3, 4, 5] -- <- module masses here
@tranzystorekk
tranzystorekk / d9.cpp
Last active December 13, 2018 00:14
AoC 2018 Day 9 solution in C++
#include <iostream>
#include <iterator>
#include <vector>
#include <list>
#include <string>
#include <algorithm>
class CyclicAdvancer {
public:
explicit CyclicAdvancer(std::list<unsigned int>& list)