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
namespace detail { | |
template <typename... Args, typename T, size_t... I> | |
std::tuple<Args...> vector_to_tuple(const std::vector<T>& t, std::index_sequence<I...>) { | |
return std::tuple<Args...>{ t[I]... }; | |
} | |
} | |
template <typename... Args, typename T> | |
auto vector_to_tuple(const std::vector<T>& t) { | |
return detail::vector_to_tuple<Args...>(t, std::make_index_sequence<sizeof...(Args)>()); |
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 "Halide.h" | |
#include <cstdlib> | |
#include <vector> | |
#include <algorithm> | |
#include <iostream> | |
#include <memory> | |
#include <random> | |
using namespace Halide; |
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
// Use to suppress unused parameters and variables in a cross-platform manner without macros | |
#pragma once | |
#include <utility> | |
template <typename T1> | |
constexpr void unused_args(T1&& t1) | |
{ | |
(void)t1; |