VapourSynth-llvmexpr
Loading...
Searching...
No Matches
Jit.cpp File Reference
#include "Jit.hpp"
#include <stdexcept>
#include <string>
#include <vector>
#include "llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h"
#include "llvm/ExecutionEngine/Orc/ThreadSafeModule.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/TargetParser/Host.h"
Include dependency graph for Jit.cpp:

Go to the source code of this file.

Functions

float * llvmexpr_ensure_buffer (const char *, int64_t)
int64_t llvmexpr_get_buffer_size (const char *)

Variables

OrcJit global_jit_fast (true)
OrcJit global_jit_nan_safe (false)
std::unordered_map< std::string, CompiledFunctionjit_cache
std::mutex cache_mutex

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().

Variable Documentation

◆ cache_mutex

std::mutex cache_mutex

Definition at line 216 of file Jit.cpp.

◆ global_jit_fast

OrcJit global_jit_fast(true) ( true )

◆ global_jit_nan_safe

OrcJit global_jit_nan_safe(false) ( false )

◆ jit_cache

std::unordered_map<std::string, CompiledFunction> jit_cache

Definition at line 215 of file Jit.cpp.