VapourSynth-llvmexpr
Loading...
Searching...
No Matches
Algorithms.hpp
Go to the documentation of this file.
1
19
20#ifndef LLVMEXPR_FRONTEND_INFIX2POSTFIX_STDLIB_ALGORITHMS_HPP
21#define LLVMEXPR_FRONTEND_INFIX2POSTFIX_STDLIB_ALGORITHMS_HPP
22
23#include "LibraryBase.hpp"
24
25#include <array>
26#include <string_view>
27#include <tuple>
28
30
31struct Algorithms {
32 static constexpr std::string_view NAME = "algorithms";
33
34 // NOLINTNEXTLINE(modernize-avoid-c-arrays,cppcoreguidelines-avoid-c-arrays)
35 static constexpr char CODE_DATA[] = {
36#pragma clang diagnostic push
37#pragma clang diagnostic ignored "-Wc23-extensions"
38#embed "algorithms.expr"
39#pragma clang diagnostic pop
40 , 0 // null terminator
41 };
42 static constexpr std::string_view CODE = std::string_view(
43 static_cast<const char*>(CODE_DATA), sizeof(CODE_DATA) - 1);
44
45 using dependencies = std::tuple<>;
46
47 static constexpr std::array<ExportedFunction, 4> EXPORTS = {{
48 ExportedFunction{.name = "sort", .param_count = 3},
49 ExportedFunction{.name = "reverse", .param_count = 3},
50 ExportedFunction{.name = "swap", .param_count = 3},
51 ExportedFunction{.name = "find_kth_smallest", .param_count = 4},
52 }};
53};
54
55} // namespace infix2postfix::stdlib
56
57#endif // LLVMEXPR_FRONTEND_INFIX2POSTFIX_STDLIB_ALGORITHMS_HPP
static constexpr std::string_view NAME
static constexpr std::array< ExportedFunction, 4 > EXPORTS
static constexpr char CODE_DATA[]
static constexpr std::string_view CODE