#include <json_batchallocator.h>
Classes | |
struct | BatchInfo |
Public Types | |
typedef AllocatedType | Type |
Public Member Functions | |
AllocatedType * | allocate () |
BatchAllocator (unsigned int objectsPerPage=255) | |
BatchAllocator (const BatchAllocator &)=delete | |
void | operator= (const BatchAllocator &)=delete |
void | release (AllocatedType *object) |
~BatchAllocator () | |
Static Private Member Functions | |
static BatchInfo * | allocateBatch (unsigned int objectsPerPage) |
Private Attributes | |
BatchInfo * | batches_ |
BatchInfo * | currentBatch_ |
AllocatedType * | freeHead_ |
Head of a single linked list within the allocated space of freeed object. More... | |
unsigned int | objectsPerPage_ |
Definition at line 24 of file json_batchallocator.h.
typedef AllocatedType Json::BatchAllocator< AllocatedType, objectPerAllocation >::Type |
Definition at line 26 of file json_batchallocator.h.
|
inline |
Definition at line 28 of file json_batchallocator.h.
References Json::BatchAllocator< AllocatedType, objectPerAllocation >::allocateBatch(), cms::cuda::assert(), Json::BatchAllocator< AllocatedType, objectPerAllocation >::batches_, and Json::BatchAllocator< AllocatedType, objectPerAllocation >::currentBatch_.
|
inline |
Definition at line 37 of file json_batchallocator.h.
References photonOfflineClient_cfi::batch, and Json::BatchAllocator< AllocatedType, objectPerAllocation >::batches_.
|
delete |
|
inline |
allocate space for an array of objectPerAllocation object.
Definition at line 47 of file json_batchallocator.h.
References Json::BatchAllocator< AllocatedType, objectPerAllocation >::allocateBatch(), Json::BatchAllocator< AllocatedType, objectPerAllocation >::batches_, Json::BatchAllocator< AllocatedType, objectPerAllocation >::currentBatch_, Json::BatchAllocator< AllocatedType, objectPerAllocation >::BatchInfo::end_, Json::BatchAllocator< AllocatedType, objectPerAllocation >::freeHead_, Json::BatchAllocator< AllocatedType, objectPerAllocation >::BatchInfo::next_, resolutioncreator_cfi::object, Json::BatchAllocator< AllocatedType, objectPerAllocation >::objectsPerPage_, and Json::BatchAllocator< AllocatedType, objectPerAllocation >::BatchInfo::used_.
|
inlinestaticprivate |
Definition at line 91 of file json_batchallocator.h.
References photonOfflineClient_cfi::batch.
Referenced by Json::BatchAllocator< AllocatedType, objectPerAllocation >::allocate(), and Json::BatchAllocator< AllocatedType, objectPerAllocation >::BatchAllocator().
|
delete |
|
inline |
Release the object.
Definition at line 73 of file json_batchallocator.h.
References cms::cuda::assert(), Json::BatchAllocator< AllocatedType, objectPerAllocation >::freeHead_, and resolutioncreator_cfi::object.
|
private |
Definition at line 101 of file json_batchallocator.h.
Referenced by Json::BatchAllocator< AllocatedType, objectPerAllocation >::allocate(), Json::BatchAllocator< AllocatedType, objectPerAllocation >::BatchAllocator(), and Json::BatchAllocator< AllocatedType, objectPerAllocation >::~BatchAllocator().
|
private |
Definition at line 102 of file json_batchallocator.h.
Referenced by Json::BatchAllocator< AllocatedType, objectPerAllocation >::allocate(), and Json::BatchAllocator< AllocatedType, objectPerAllocation >::BatchAllocator().
|
private |
Head of a single linked list within the allocated space of freeed object.
Definition at line 104 of file json_batchallocator.h.
Referenced by Json::BatchAllocator< AllocatedType, objectPerAllocation >::allocate(), and Json::BatchAllocator< AllocatedType, objectPerAllocation >::release().
|
private |
Definition at line 105 of file json_batchallocator.h.
Referenced by Json::BatchAllocator< AllocatedType, objectPerAllocation >::allocate().