nngn
Loading...
Searching...
No Matches
lua_compute.cpp File Reference
#include <algorithm>
#include <bit>
#include <cstddef>
#include "lua/function.h"
#include "lua/iter.h"
#include "lua/register.h"
#include "lua/table.h"
#include "math/lua_vector.h"
#include "utils/literals.h"
#include "utils/log.h"
#include "utils/ranges.h"
#include "utils/utils.h"
#include "compute.h"
Include dependency graph for lua_compute.cpp:

Namespaces

namespace  anonymous_namespace{lua_compute.cpp}
 

Typedefs

using bvec = nngn::lua_vector< std::byte >
 
using Type = nngn::Compute::Type
 

Functions

template<typename T >
T anonymous_namespace{lua_compute.cpp}::from_table_array (nngn::lua::table_view t)
 
void anonymous_namespace{lua_compute.cpp}::invalid_type (Type t)
 
bool anonymous_namespace{lua_compute.cpp}::check_size (const std::byte *p, lua_Integer n, std::span< const std::byte > s)
 
bool anonymous_namespace{lua_compute.cpp}::check_size (lua_Integer n, const bvec &v)
 
auto anonymous_namespace{lua_compute.cpp}::elem_size (Type t)
 
template<typename T >
auto anonymous_namespace{lua_compute.cpp}::read_table (const auto &t, lua_Integer i, lua_Integer n, std::byte *p)
 
template<typename T >
auto anonymous_namespace{lua_compute.cpp}::write_table (nngn::lua::table_view t, lua_Integer i, lua_Integer n, const T *p)
 
template<typename T >
auto anonymous_namespace{lua_compute.cpp}::write_table (nngn::lua::table_view t, lua_Integer i, lua_Integer n, const std::byte *p)
 
 anonymous_namespace{lua_compute.cpp}::map (Type t, auto &&sf, auto &&vf, auto &&of)
 
 anonymous_namespace{lua_compute.cpp}::map_vector (Type t, auto &&def, auto &&f)
 
bool anonymous_namespace{lua_compute.cpp}::to_bytes (Type type, nngn::lua::table_view t, bvec *v)
 
auto anonymous_namespace{lua_compute.cpp}::get_limits (Compute &c, nngn::lua::state_view lua)
 
auto anonymous_namespace{lua_compute.cpp}::create_vector (lua_Integer n)
 
auto anonymous_namespace{lua_compute.cpp}::vector_size (const bvec &v)
 
auto anonymous_namespace{lua_compute.cpp}::read_vector (bvec &v, lua_Integer off, lua_Integer n, Type type, nngn::lua::state_view lua)
 
void anonymous_namespace{lua_compute.cpp}::zero_vector (bvec *v, lua_Integer off, lua_Integer n)
 
bool anonymous_namespace{lua_compute.cpp}::fill_vector (bvec *v, lua_Integer off, lua_Integer n, Type type, nngn::lua::table_view t)
 
void anonymous_namespace{lua_compute.cpp}::copy_vector (bvec *dst, const bvec &src, lua_Integer dst_off, lua_Integer src_off, lua_Integer n)
 
template<typename T >
auto anonymous_namespace{lua_compute.cpp}::write_scalar_type (const auto &t, lua_Integer i, std::byte *p)
 
template<typename T >
auto anonymous_namespace{lua_compute.cpp}::write_vector_type (nngn::lua::table_view t, lua_Integer i, std::byte *p)
 
bool anonymous_namespace{lua_compute.cpp}::write_vector (bvec *v, lua_Integer off, nngn::lua::table_view t)
 
auto anonymous_namespace{lua_compute.cpp}::read_sizes (nngn::lua::table_view t)
 
auto anonymous_namespace{lua_compute.cpp}::read_events (const Compute &c, Compute::Events *events, std::span< const Compute::Type > types, std::optional< nngn::lua::value_view > wait_opt, std::optional< nngn::lua::table_view > events_opt)
 
void anonymous_namespace{lua_compute.cpp}::write_events (std::span< const Compute::Event *const > events, std::optional< nngn::lua::table_view > events_opt)
 
auto anonymous_namespace{lua_compute.cpp}::opt (const Compute::Handle &h)
 
auto anonymous_namespace{lua_compute.cpp}::create_buffer (Compute &c, Compute::MemFlag flags, Type type, lua_Integer n, const bvec *ov)
 
bool anonymous_namespace{lua_compute.cpp}::read_buffer (const Compute &c, lua_Integer b, Type type, lua_Integer n, bvec *v)
 
bool anonymous_namespace{lua_compute.cpp}::fill_buffer (const Compute &c, lua_Integer b, lua_Integer off, lua_Integer n, Type type, nngn::lua::table_view pattern_t, std::optional< nngn::lua::value_view > wait_opt, std::optional< nngn::lua::table_view > events_opt)
 
bool anonymous_namespace{lua_compute.cpp}::write_buffer (const Compute &c, lua_Integer b, lua_Integer off, lua_Integer n, Type type, const bvec &v)
 
auto anonymous_namespace{lua_compute.cpp}::create_image (Compute &c, Type type, lua_Integer w, lua_Integer h, Compute::MemFlag flags, const bvec *ov)
 
auto anonymous_namespace{lua_compute.cpp}::read_image (const Compute &c, lua_Integer i, lua_Integer w, lua_Integer h, Type type, bvec *v)
 
bool anonymous_namespace{lua_compute.cpp}::fill_image (const Compute &c, lua_Integer i, lua_Integer w, lua_Integer h, Type type, nngn::lua::table_view t)
 
auto anonymous_namespace{lua_compute.cpp}::create_sampler (Compute &c)
 
auto anonymous_namespace{lua_compute.cpp}::create_program (Compute &c, std::string_view src, const char *opts)
 
std::optional< nngn::lua::table_viewanonymous_namespace{lua_compute.cpp}::prof_info (const Compute &c, Compute::ProfInfo info, std::vector< const void * > events, nngn::lua::state_view lua)
 
auto anonymous_namespace{lua_compute.cpp}::wait (const Compute &c, std::vector< const void * > events)
 
template<auto Compute::* f>
bool anonymous_namespace{lua_compute.cpp}::release (Compute &c, lua_Integer id)
 
bool anonymous_namespace{lua_compute.cpp}::release_events (const Compute &c, std::vector< const void * > events)
 
std::vector< std::size_t > anonymous_namespace{lua_compute.cpp}::data_size (nngn::lua::table_view t)
 
auto anonymous_namespace{lua_compute.cpp}::read_data (nngn::lua::table_view t, auto *data_v)
 
auto anonymous_namespace{lua_compute.cpp}::create_kernel (Compute &c, lua_Integer program, const char *func, nngn::lua::table_view data, std::optional< nngn::lua::value_view > wait_opt, std::optional< nngn::lua::table_view > events_opt)
 
bool anonymous_namespace{lua_compute.cpp}::execute_kernel (Compute &c, lua_Integer kernel, Compute::ExecFlag flags, nngn::lua::table_view global_size, nngn::lua::table_view local_size, std::optional< nngn::lua::value_view > wait_opt, std::optional< nngn::lua::table_view > events_opt)
 
bool anonymous_namespace{lua_compute.cpp}::execute (Compute &c, lua_Integer program, const char *func, Compute::ExecFlag flags, nngn::lua::table_view global_size, nngn::lua::table_view local_size, nngn::lua::table_view data, std::optional< nngn::lua::value_view > wait_opt, std::optional< nngn::lua::table_view > events_opt)
 
std::optional< Compute::OpenCLParameters > anonymous_namespace{lua_compute.cpp}::opencl_params (nngn::lua::table_view t)
 
void anonymous_namespace{lua_compute.cpp}::register_compute (nngn::lua::table_view t)
 

Typedef Documentation

◆ bvec

using bvec = nngn::lua_vector<std::byte>

◆ Type