Fermat
Public Types | Public Methods | Public Members | List of all members
AdaptiveClusteredRLView Struct Reference

Detailed description

Device-side view class for the Adaptively Clustered Reinforcement Learning sampler (Clustered RL).

#include <clustered_rl.h>

Public Types

typedef cugar::cuda::SyncFreeHashMap< uint64, uint32, 0xFFFFFFFFFFFFFFFFllu > HashMap
 

Public Methods

FERMAT_DEVICE uint32 find_slot (const uint64 key)
 
FERMAT_DEVICE uint32 sample (const uint32 cell_slot, const float z, float *pdf, uint32 *cluster_idx) const
 
FERMAT_DEVICE float pdf (const uint32 cell_slot, const uint32 index) const
 
FERMAT_DEVICE void update (const uint32 cell_slot, const uint32 cluster_idx, const float val, const float alpha=0.05f)
 

Public Members

HashMap hashmap
 
float * pdfs
 
float * cdfs
 
const uint32 * cluster_ends
 
const uint32 * cluster_counts
 
uint32 init_cluster_count
 
uint32 hash_size
 

Member Function Documentation

◆ find_slot()

FERMAT_DEVICE FERMAT_FORCEINLINE uint32 AdaptiveClusteredRLView::find_slot ( const uint64  key)

given a hashing key, return the corresponding cell slot

◆ pdf()

FERMAT_DEVICE FERMAT_FORCEINLINE float AdaptiveClusteredRLView::pdf ( const uint32  cell_slot,
const uint32  index 
) const

given a cell and an item's index, return the sampling pdf of that item

◆ sample()

FERMAT_DEVICE FERMAT_FORCEINLINE uint32 AdaptiveClusteredRLView::sample ( const uint32  cell_slot,
const float  z,
float *  pdf,
uint32 *  cluster_idx 
) const

given a cell and a random number, sample an item

◆ update()

FERMAT_DEVICE FERMAT_FORCEINLINE void AdaptiveClusteredRLView::update ( const uint32  cell_slot,
const uint32  cluster_idx,
const float  val,
const float  alpha = 0.05f 
)

update the value corresponding to sampled cluster


The documentation for this struct was generated from the following files: