Blender V4.3
BLI_vector_set_slots.hh File Reference
#include "BLI_sys_types.h"

Go to the source code of this file.

Classes

class  blender::SimpleVectorSetSlot< Key, IndexT >
 
struct  blender::DefaultVectorSetSlot< Key >
 

Namespaces

namespace  blender
 

Macros

#define s_is_empty   -1
 
#define s_is_removed   -2
 

Detailed Description

This file contains slot types that are supposed to be used with blender::VectorSet.

Every slot type has to be able to hold an integer index and state information. A vector set slot has three possible states: empty, occupied and removed.

A vector slot type has to implement a couple of methods that are explained in SimpleVectorSetSlot. A vector slot type is assumed to be trivially destructible, when it is in empty or removed state.

Possible Improvements:

  • Implement a slot type that stores the hash.
  • Implement a slot type that stores the key. That means that the key would be stored in two places: the key vector and the slot itself. Maybe storing the key in the slot as well, can result in better performance, due to better cache utilization.

Definition in file BLI_vector_set_slots.hh.

Macro Definition Documentation

◆ s_is_empty

#define s_is_empty   -1

◆ s_is_removed

#define s_is_removed   -2