27 #ifndef LIVOX_ROS_DRIVER_LDQ_H_ 28 #define LIVOX_ROS_DRIVER_LDQ_H_ 55 return (size != 0) && ((size & (size - 1)) == 0);
60 for (
int i = 0; i < 32; i++) {
62 if (size <= power2_val) {
static uint32_t RoundupPowerOf2(uint32_t size)
void QueuePrePop(LidarDataQueue *queue, StoragePacket *storage_packet)
void ResetQueue(LidarDataQueue *queue)
uint32_t QueueIsFull(LidarDataQueue *queue)
uint32_t QueueUnusedSize(LidarDataQueue *queue)
const uint32_t KEthPacketMaxLength
uint32_t QueuePushAny(LidarDataQueue *queue, uint8_t *data, uint32_t length, uint64_t time_rcv, uint32_t point_num)
unsigned __int64 uint64_t
uint32_t QueueUsedSize(LidarDataQueue *queue)
int InitQueue(LidarDataQueue *queue, uint32_t queue_size)
static bool IsPowerOf2(uint32_t size)
StoragePacket * storage_packet
uint32_t QueueIsEmpty(LidarDataQueue *queue)
void QueuePopUpdate(LidarDataQueue *queue)
uint32_t QueuePush(LidarDataQueue *queue, StoragePacket *storage_packet)
TFSIMD_FORCE_INLINE tfScalar length(const Quaternion &q)
int DeInitQueue(LidarDataQueue *queue)
uint32_t QueuePop(LidarDataQueue *queue, StoragePacket *storage_packet)