nngn
Loading...
Searching...
No Matches
anonymous_namespace{compute.cpp}::ComputeBackend Class Referencefinal
Inheritance diagram for anonymous_namespace{compute.cpp}::ComputeBackend:
Collaboration diagram for anonymous_namespace{compute.cpp}::ComputeBackend:

Public Member Functions

 ComputeBackend (const ComputeBackend &)=delete
 
ComputeBackendoperator= (const ComputeBackend &)=delete
 
 ComputeBackend (ComputeBackend &&) noexcept=default
 
ComputeBackendoperator= (ComputeBackend &&) noexcept=default
 
 ComputeBackend (nngn::Compute *c)
 
 ~ComputeBackend (void) override
 
- Public Member Functions inherited from nngn::Colliders::Backend
 Backend ()=default
 
 Backend (const Backend &)=default
 
Backendoperator= (const Backend &)=default
 
 Backend (Backend &&) noexcept=default
 
Backendoperator= (Backend &&) noexcept=default
 
virtual ~Backend ()=default
 

Private Member Functions

bool init () final
 
bool read_prog (const std::filesystem::path &path)
 
bool destroy ()
 
bool set_max_colliders (std::size_t n) final
 
bool set_max_collisions (std::size_t n) final
 
bool check (const nngn::Timing &t, Input *input, Output *output) final
 
template<std::size_t to_off, typename To , typename From , typename F >
bool copy_member (nngn::Compute::Buffer b, std::span< const From > s, const F *f, nngn::Compute::Event *const *e)
 
bool copy_aabb (Events *events, std::span< const nngn::AABBCollider > s)
 
bool copy_bb (Events *events, std::span< const nngn::BBCollider > s)
 
bool copy_sphere (Events *events, std::span< const nngn::SphereCollider > s)
 
bool copy_plane (Events *events, std::span< const nngn::PlaneCollider > s)
 
bool copy_gravity (Events *events, std::span< const nngn::GravityCollider > s)
 
bool check_aabb (Events *events, std::span< const nngn::AABBCollider > s)
 
bool check_bb (Events *events, std::span< const nngn::BBCollider > s)
 
bool check_sphere (const nngn::Timing &t, Events *events, std::span< const nngn::SphereCollider > s)
 
bool check_aabb_bb (Events *events, std::span< const nngn::AABBCollider > aabb, std::span< const nngn::BBCollider > bb)
 
bool check_aabb_sphere (Events *events, std::span< const nngn::AABBCollider > aabb, std::span< const nngn::SphereCollider > sphere)
 
bool check_bb_sphere (Events *events, std::span< const nngn::BBCollider > aabb, std::span< const nngn::SphereCollider > sphere)
 
bool check_sphere_plane (Events *events, std::span< const nngn::SphereCollider > sphere, std::span< const nngn::PlaneCollider > plane)
 
bool check_sphere_gravity (Events *events, std::span< const nngn::SphereCollider > sphere, std::span< const nngn::GravityCollider > gravity)
 
std::array< size_t, 2 > work_size_for_n (std::size_t n) const
 
std::tuple< Collision *, u32 > map_collision_buffer (nngn::Compute::Buffer b, std::size_t i, const nngn::Compute::Event *wait, u32 max) const
 
template<typename T , typename U >
bool read_collision_buffer (nngn::Compute::Buffer b, std::size_t counter_idx, std::span< T > s0, std::span< U > s1, const nngn::Compute::Event *wait, std::vector< nngn::Collision > *out)
 
bool write_stats (const Events &events)
 

Private Attributes

std::size_t max_colliders = {}
 
std::size_t max_collisions = {}
 
std::size_t collision_bytes = {}
 
u64 max_wg_size = {}
 
nngn::Compute::Program prog = {}
 
nngn::Compute::Buffer aabb_buffer = {}
 
nngn::Compute::Buffer bb_buffer = {}
 
nngn::Compute::Buffer sphere_buffer = {}
 
nngn::Compute::Buffer plane_buffer = {}
 
nngn::Compute::Buffer gravity_buffer = {}
 
nngn::Compute::Buffer counters_buffer = {}
 
nngn::Compute::Buffer aabb_coll_buffer = {}
 
nngn::Compute::Buffer bb_coll_buffer = {}
 
nngn::Compute::Buffer sphere_coll_buffer = {}
 
nngn::Compute::Buffer gravity_coll_buffer = {}
 
nngn::Compute::Buffer aabb_bb_coll_buffer = {}
 
nngn::Compute::Buffer aabb_sphere_coll_buffer = {}
 
nngn::Compute::Buffer bb_sphere_coll_buffer = {}
 
nngn::Compute::Buffer sphere_plane_coll_buffer = {}
 
nngn::Compute::Buffer sphere_gravity_coll_buffer = {}
 
nngn::Computecompute = {}
 

Constructor & Destructor Documentation

◆ ComputeBackend() [1/3]

anonymous_namespace{compute.cpp}::ComputeBackend::ComputeBackend ( const ComputeBackend & )
delete

◆ ComputeBackend() [2/3]

anonymous_namespace{compute.cpp}::ComputeBackend::ComputeBackend ( ComputeBackend && )
defaultnoexcept

◆ ComputeBackend() [3/3]

anonymous_namespace{compute.cpp}::ComputeBackend::ComputeBackend ( nngn::Compute * c)
inline

◆ ~ComputeBackend()

anonymous_namespace{compute.cpp}::ComputeBackend::~ComputeBackend ( void )
override
Here is the call graph for this function:

Member Function Documentation

◆ check()

bool anonymous_namespace{compute.cpp}::ComputeBackend::check ( const nngn::Timing & t,
Input * input,
Output * output )
finalprivatevirtual

Reimplemented from nngn::Colliders::Backend.

Here is the call graph for this function:

◆ check_aabb()

bool anonymous_namespace{compute.cpp}::ComputeBackend::check_aabb ( Events * events,
std::span< const nngn::AABBCollider > s )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_aabb_bb()

bool anonymous_namespace{compute.cpp}::ComputeBackend::check_aabb_bb ( Events * events,
std::span< const nngn::AABBCollider > aabb,
std::span< const nngn::BBCollider > bb )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_aabb_sphere()

bool anonymous_namespace{compute.cpp}::ComputeBackend::check_aabb_sphere ( Events * events,
std::span< const nngn::AABBCollider > aabb,
std::span< const nngn::SphereCollider > sphere )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_bb()

bool anonymous_namespace{compute.cpp}::ComputeBackend::check_bb ( Events * events,
std::span< const nngn::BBCollider > s )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_bb_sphere()

bool anonymous_namespace{compute.cpp}::ComputeBackend::check_bb_sphere ( Events * events,
std::span< const nngn::BBCollider > aabb,
std::span< const nngn::SphereCollider > sphere )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_sphere()

bool anonymous_namespace{compute.cpp}::ComputeBackend::check_sphere ( const nngn::Timing & t,
Events * events,
std::span< const nngn::SphereCollider > s )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_sphere_gravity()

bool anonymous_namespace{compute.cpp}::ComputeBackend::check_sphere_gravity ( Events * events,
std::span< const nngn::SphereCollider > sphere,
std::span< const nngn::GravityCollider > gravity )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_sphere_plane()

bool anonymous_namespace{compute.cpp}::ComputeBackend::check_sphere_plane ( Events * events,
std::span< const nngn::SphereCollider > sphere,
std::span< const nngn::PlaneCollider > plane )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_aabb()

bool anonymous_namespace{compute.cpp}::ComputeBackend::copy_aabb ( Events * events,
std::span< const nngn::AABBCollider > s )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_bb()

bool anonymous_namespace{compute.cpp}::ComputeBackend::copy_bb ( Events * events,
std::span< const nngn::BBCollider > s )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_gravity()

bool anonymous_namespace{compute.cpp}::ComputeBackend::copy_gravity ( Events * events,
std::span< const nngn::GravityCollider > s )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_member()

template<std::size_t to_off, typename To , typename From , typename F >
bool anonymous_namespace{compute.cpp}::ComputeBackend::copy_member ( nngn::Compute::Buffer b,
std::span< const From > s,
const F * f,
nngn::Compute::Event *const * e )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_plane()

bool anonymous_namespace{compute.cpp}::ComputeBackend::copy_plane ( Events * events,
std::span< const nngn::PlaneCollider > s )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_sphere()

bool anonymous_namespace{compute.cpp}::ComputeBackend::copy_sphere ( Events * events,
std::span< const nngn::SphereCollider > s )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ destroy()

bool anonymous_namespace{compute.cpp}::ComputeBackend::destroy ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

bool anonymous_namespace{compute.cpp}::ComputeBackend::init ( void )
finalprivatevirtual

Reimplemented from nngn::Colliders::Backend.

Here is the call graph for this function:

◆ map_collision_buffer()

std::tuple< Collision *, u32 > anonymous_namespace{compute.cpp}::ComputeBackend::map_collision_buffer ( nngn::Compute::Buffer b,
std::size_t i,
const nngn::Compute::Event * wait,
u32 max ) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

ComputeBackend & anonymous_namespace{compute.cpp}::ComputeBackend::operator= ( ComputeBackend && )
defaultnoexcept

◆ operator=() [2/2]

ComputeBackend & anonymous_namespace{compute.cpp}::ComputeBackend::operator= ( const ComputeBackend & )
delete

◆ read_collision_buffer()

template<typename T , typename U >
bool anonymous_namespace{compute.cpp}::ComputeBackend::read_collision_buffer ( nngn::Compute::Buffer b,
std::size_t counter_idx,
std::span< T > s0,
std::span< U > s1,
const nngn::Compute::Event * wait,
std::vector< nngn::Collision > * out )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_prog()

bool anonymous_namespace{compute.cpp}::ComputeBackend::read_prog ( const std::filesystem::path & path)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_max_colliders()

bool anonymous_namespace{compute.cpp}::ComputeBackend::set_max_colliders ( std::size_t n)
finalprivatevirtual

Reimplemented from nngn::Colliders::Backend.

Here is the call graph for this function:

◆ set_max_collisions()

bool anonymous_namespace{compute.cpp}::ComputeBackend::set_max_collisions ( std::size_t n)
finalprivatevirtual

Reimplemented from nngn::Colliders::Backend.

Here is the call graph for this function:

◆ work_size_for_n()

std::array< std::size_t, 2 > anonymous_namespace{compute.cpp}::ComputeBackend::work_size_for_n ( std::size_t n) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_stats()

bool anonymous_namespace{compute.cpp}::ComputeBackend::write_stats ( const Events & events)
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ aabb_bb_coll_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::aabb_bb_coll_buffer = {}
private

◆ aabb_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::aabb_buffer = {}
private

◆ aabb_coll_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::aabb_coll_buffer = {}
private

◆ aabb_sphere_coll_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::aabb_sphere_coll_buffer = {}
private

◆ bb_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::bb_buffer = {}
private

◆ bb_coll_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::bb_coll_buffer = {}
private

◆ bb_sphere_coll_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::bb_sphere_coll_buffer = {}
private

◆ collision_bytes

std::size_t anonymous_namespace{compute.cpp}::ComputeBackend::collision_bytes = {}
private

◆ compute

nngn::Compute* anonymous_namespace{compute.cpp}::ComputeBackend::compute = {}
private

◆ counters_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::counters_buffer = {}
private

◆ gravity_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::gravity_buffer = {}
private

◆ gravity_coll_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::gravity_coll_buffer = {}
private

◆ max_colliders

std::size_t anonymous_namespace{compute.cpp}::ComputeBackend::max_colliders = {}
private

◆ max_collisions

std::size_t anonymous_namespace{compute.cpp}::ComputeBackend::max_collisions = {}
private

◆ max_wg_size

u64 anonymous_namespace{compute.cpp}::ComputeBackend::max_wg_size = {}
private

◆ plane_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::plane_buffer = {}
private

◆ prog

nngn::Compute::Program anonymous_namespace{compute.cpp}::ComputeBackend::prog = {}
private

◆ sphere_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::sphere_buffer = {}
private

◆ sphere_coll_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::sphere_coll_buffer = {}
private

◆ sphere_gravity_coll_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::sphere_gravity_coll_buffer = {}
private

◆ sphere_plane_coll_buffer

nngn::Compute::Buffer anonymous_namespace{compute.cpp}::ComputeBackend::sphere_plane_coll_buffer = {}
private

The documentation for this class was generated from the following file: