VapourSynth-llvmexpr
Loading...
Searching...
No Matches
llvmexpr.cpp File Reference
#include <array>
#include <bit>
#include <chrono>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <format>
#include <fstream>
#include <limits>
#include <map>
#include <memory>
#include <mutex>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include "VSHelper4.h"
#include "VapourSynth4.h"
#include "analysis/AnalysisResults.hpp"
#include "analysis/ExpressionAnalyzer.hpp"
#include "analysis/passes/DynamicArrayAllocOptPass.hpp"
#include "analysis/passes/StaticArrayOptPass.hpp"
#include "codegen/glsl/GLSLGenerator.hpp"
#include "frontend/InfixConverter.hpp"
#include "frontend/Tokenizer.hpp"
#include "runtime/llvm/Compiler.hpp"
#include "runtime/llvm/Jit.hpp"
#include "runtime/vulkan/VkExprExecutor.hpp"
Include dependency graph for llvmexpr.cpp:

Go to the source code of this file.

Functions

float * llvmexpr_ensure_buffer (const char *name, int64_t requested_size)
int64_t llvmexpr_get_buffer_size (const char *name)
 VapourSynthPluginInit2 (VSPlugin *plugin, const VSPLUGINAPI *vspapi)

Variables

constexpr uint32_t PROP_READ_NAN_PAYLOAD
constexpr uint32_t PROP_WRITE_NAN_PAYLOAD
constexpr uint32_t PROP_DELETE_NAN_PAYLOAD

Function Documentation

◆ llvmexpr_ensure_buffer()

float * llvmexpr_ensure_buffer ( const char * name,
int64_t requested_size )

Copyright (C) 2025 yuygfgg

This file is part of Vapoursynth-llvmexpr.

Vapoursynth-llvmexpr is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Vapoursynth-llvmexpr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Vapoursynth-llvmexpr. If not, see https://www.gnu.org/licenses/.

Definition at line 1331 of file llvmexpr.cpp.

1331 {
1332 auto& array = g_frame_data.dynamic_arrays[std::string(name)];
1333 if (static_cast<size_t>(requested_size) > array.buffer.size()) {
1334 array.buffer.resize(requested_size);
1335 }
1336 return array.buffer.data();
1337}

Referenced by OrcJit::OrcJit().

◆ llvmexpr_get_buffer_size()

int64_t llvmexpr_get_buffer_size ( const char * name)

Definition at line 1339 of file llvmexpr.cpp.

1339 {
1340 auto it = g_frame_data.dynamic_arrays.find(std::string(name));
1341 return (it != g_frame_data.dynamic_arrays.end())
1342 ? static_cast<int64_t>(it->second.buffer.size())
1343 : 0;
1344}

Referenced by OrcJit::OrcJit().

◆ VapourSynthPluginInit2()

VapourSynthPluginInit2 ( VSPlugin * plugin,
const VSPLUGINAPI * vspapi )

Definition at line 1350 of file llvmexpr.cpp.

1350 {
1351 // NOLINTEND(readability-identifier-naming)
1352 vspapi->configPlugin(
1353 "com.yuygfgg.llvmexpr", "llvmexpr", "LLVM JIT RPN Expression Filter",
1354 VS_MAKE_VERSION(4, 4), VAPOURSYNTH_API_VERSION, 0, plugin);
1355 vspapi->registerFunction(
1356 "Expr",
1357 "clips:vnode[];expr:data[];format:int:opt;boundary:int:opt;"
1358 "dump_ir:data:opt;opt_level:int:opt;approx_math:int:opt;infix:int:opt;"
1359 "tile_x:int:opt;tile_y:int:opt;",
1360 "clip:vnode;", exprCreate, nullptr, plugin);
1361 vspapi->registerFunction("SingleExpr",
1362 "clips:vnode[];expr:data;format:int:opt;boundary:"
1363 "int:opt;dump_ir:data:opt;opt_"
1364 "level:int:opt;approx_math:int:opt;infix:int:opt;",
1365 "clip:vnode;", singleExprCreate, nullptr, plugin);
1366
1367 vspapi->registerFunction("VkExpr",
1368 "clips:vnode[];expr:data[];format:int:opt;"
1369 "boundary:int:opt;num_streams:int:opt;device_id:"
1370 "int:opt;dump_glsl:data:opt;infix:int:opt;",
1371 "clip:vnode;", vkExprCreate, nullptr, plugin);
1372}

References VapourSynthPluginInit2().

Referenced by VapourSynthPluginInit2().

Variable Documentation

◆ PROP_DELETE_NAN_PAYLOAD

uint32_t PROP_DELETE_NAN_PAYLOAD
constexpr
Initial value:
=
0x7FC0DE1E

Definition at line 56 of file llvmexpr.cpp.

◆ PROP_READ_NAN_PAYLOAD

uint32_t PROP_READ_NAN_PAYLOAD
constexpr
Initial value:
=
0x7FC0BEEF

Copyright (C) 2025 yuygfgg

This file is part of Vapoursynth-llvmexpr.

Vapoursynth-llvmexpr is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Vapoursynth-llvmexpr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Vapoursynth-llvmexpr. If not, see https://www.gnu.org/licenses/.

Definition at line 52 of file llvmexpr.cpp.

◆ PROP_WRITE_NAN_PAYLOAD

uint32_t PROP_WRITE_NAN_PAYLOAD
constexpr
Initial value:
=
0x7FC0DEAD

Definition at line 54 of file llvmexpr.cpp.