CARLA
Loading...
Searching...
No Matches
test_multigpu_sensor_sync.cpp File Reference
#include "test.h"
#include <carla/multigpu/frameDataCodec.h>
#include <carla/multigpu/sensorSync.h>
#include <cstring>
#include <random>
#include <sstream>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  SensorState
 One record of frame data packet 27: the runtime state a sensor of the primary starts this frame's tick from. More...
struct  SensorStates
 Frame data packet 27, for the sensors of packet 26 that carry state. More...
struct  SensorTick
 One record of frame data packet 26: a sensor of the primary that ticks in this frame, and the delta of that tick. More...
struct  SensorTicks
 Frame data packet 26: every sensor of the primary that ticks in this frame. More...

Functions

uint32_t GetEngineState (const std::minstd_rand &engine)
 The state of a minstd_rand: the value its next draw is computed from.
bool SetEngineState (std::minstd_rand &engine, uint32_t state)
 Makes engine continue from state, as GetEngineState returned it.
 TEST (MultiGpuSensorSync, empty_ticks_are_still_a_packet)
 TEST (MultiGpuSensorSync, impossible_engine_states_are_refused)
 TEST (MultiGpuSensorSync, minstd_resumes_the_same_draws)
 TEST (MultiGpuSensorSync, states_round_trip_every_field)
 TEST (MultiGpuSensorSync, ticks_round_trip_with_bit_exact_deltas)
 TEST (MultiGpuSensorSync, truncated_records_fail)
 TEST (MultiGpuSensorSync, unknown_and_longer_fields_are_skipped)

Function Documentation

◆ GetEngineState()

uint32_t carla::multigpu::GetEngineState ( const std::minstd_rand & engine)
inline

The state of a minstd_rand: the value its next draw is computed from.

Definition at line 254 of file sensorSync.h.

Referenced by TEST().

◆ SetEngineState()

bool carla::multigpu::SetEngineState ( std::minstd_rand & engine,
uint32_t state )
inline

Makes engine continue from state, as GetEngineState returned it.

False for a value no minstd_rand can hold.

Definition at line 264 of file sensorSync.h.

Referenced by TEST(), and TEST().

◆ TEST() [1/7]

TEST ( MultiGpuSensorSync ,
empty_ticks_are_still_a_packet  )

◆ TEST() [2/7]

TEST ( MultiGpuSensorSync ,
impossible_engine_states_are_refused  )

Definition at line 160 of file test_multigpu_sensor_sync.cpp.

References SetEngineState(), and TEST().

◆ TEST() [3/7]

TEST ( MultiGpuSensorSync ,
minstd_resumes_the_same_draws  )

Definition at line 145 of file test_multigpu_sensor_sync.cpp.

References GetEngineState(), SetEngineState(), and TEST().

◆ TEST() [4/7]

◆ TEST() [5/7]

TEST ( MultiGpuSensorSync ,
ticks_round_trip_with_bit_exact_deltas  )

◆ TEST() [6/7]

◆ TEST() [7/7]