mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-05 07:41:11 +00:00
Imported Healpix, cfitsio, cosmotool. Added cmake tool to build dependencies (cfitsio, hdf5, netcdf, boost, healpix, gsl, ..). Adjusted CMakeLists.txt
This commit is contained in:
parent
4bfb62f177
commit
51f6798f88
241 changed files with 243806 additions and 0 deletions
30
external/cosmotool/src/bqueue.hpp
vendored
Normal file
30
external/cosmotool/src/bqueue.hpp
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef __COSMO_QUEUE_HPP
|
||||
#define __COSMO_QUEUE_HPP
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace CosmoTool {
|
||||
|
||||
template<typename T,typename QType = int>
|
||||
class BoundedQueue
|
||||
{
|
||||
public:
|
||||
BoundedQueue(int maxSize, QType defaultMax);
|
||||
BoundedQueue(T *pQueue, int maxSize, QType defaultMax);
|
||||
~BoundedQueue();
|
||||
|
||||
void push(T a, QType v);
|
||||
T *getQueue() { return m_queue; }
|
||||
QType *getPriorities() { return priority; }
|
||||
QType getMaxPriority() { return priority[maxQueueSize-1]; }
|
||||
private:
|
||||
int maxQueueSize;
|
||||
T *m_queue;
|
||||
QType *priority;
|
||||
bool autoFree;
|
||||
};
|
||||
};
|
||||
|
||||
#include "bqueue.tcc"
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue