POSIX Shared Memory Data Structures 1.0
High-performance lock-free data structures for inter-process communication
|
#include <iostream>
#include <random>
#include <chrono>
#include <thread>
#include "posix_shm.h"
#include "shm_object_pool.h"
#include "shm_ring_buffer.h"
#include "shm_atomic.h"
#include "shm_array.h"
Go to the source code of this file.
Classes | |
struct | Particle |
struct | SensorReading |
Functions | |
void | particle_simulation_example () |
void | sensor_streaming_example () |
void | grid_simulation_example () |
void | usage_patterns () |
int | main () |
void grid_simulation_example | ( | ) |
Definition at line 134 of file simulation_patterns.cpp.
References shm_atomic< T, TableType >::load().
Referenced by main().
int main | ( | ) |
Definition at line 219 of file simulation_patterns.cpp.
References grid_simulation_example(), particle_simulation_example(), sensor_streaming_example(), and usage_patterns().
void particle_simulation_example | ( | ) |
Definition at line 27 of file simulation_patterns.cpp.
References shm_object_pool< T, TableType >::acquire_construct(), shm_object_pool< T, TableType >::capacity(), shm_atomic< T, TableType >::load(), shm_object_pool< T, TableType >::num_allocated(), and shm_object_pool< T, TableType >::release().
Referenced by main().
void sensor_streaming_example | ( | ) |
Definition at line 82 of file simulation_patterns.cpp.
References shm_ring_buffer< T, TableType >::get_last_n(), shm_ring_buffer< T, TableType >::pop_bulk(), SensorReading::pressure, shm_ring_buffer< T, TableType >::push(), shm_ring_buffer< T, TableType >::size(), SensorReading::temperature, SensorReading::timestamp, and shm_ring_buffer< T, TableType >::total_written().
Referenced by main().
void usage_patterns | ( | ) |
Definition at line 190 of file simulation_patterns.cpp.
Referenced by main().