Documentation for microsoft::quantum::IAllocationManager
microsoft::quantum::IAllocationManager
#include <AllocationManager/IAllocationManager.hpp>
Inherited by microsoft::quantum::BasicAllocationManager
Public Types
Name | |
---|---|
using uint64_t | Address Value type for address. |
using uint64_t | Index Index type used to access an array element. |
using std::shared_ptr< IAllocationManager > | AllocationManagerPtr Pointer interface. |
Public Functions
Name | |
---|---|
IAllocationManager(IAllocationManager const & ) | |
IAllocationManager(IAllocationManager && ) | |
IAllocationManager & | operator=(IAllocationManager const & ) |
IAllocationManager & | operator=(IAllocationManager && ) |
virtual | ~IAllocationManager() |
virtual Address | allocate(String const & name ="", Index const & count =1) =0 |
virtual void | release(Address const & address) =0 |
virtual void | reset() =0 |
uint64_t | allocationsInUse() const |
uint64_t | maxAllocationsUsed() const |
Protected Functions
Name | |
---|---|
IAllocationManager() =default | |
void | updateRegistersInUse(uint64_t n) |
Detailed Description
class microsoft::quantum::IAllocationManager;
Interface class for allocation management. This interface provides means to allocate and release statically allocated resources such as qubits and results. In a future version, it may be extended with get and store in order to support Arrays and Tuples.
Public Types Documentation
using Address
using microsoft::quantum::IAllocationManager::Address = uint64_t;
Value type for address.
using Index
using microsoft::quantum::IAllocationManager::Index = uint64_t;
Index type used to access an array element.
using AllocationManagerPtr
using microsoft::quantum::IAllocationManager::AllocationManagerPtr = std::shared_ptr<IAllocationManager>;
Pointer interface.
Public Functions Documentation
function IAllocationManager
IAllocationManager(
IAllocationManager const &
)
function IAllocationManager
IAllocationManager(
IAllocationManager &&
)
function operator=
IAllocationManager & operator=(
IAllocationManager const &
)
function operator=
IAllocationManager & operator=(
IAllocationManager &&
)
function ~IAllocationManager
virtual ~IAllocationManager()
function allocate
virtual Address allocate(
String const & name ="",
Index const & count =1
) =0
Reimplemented by: microsoft::quantum::BasicAllocationManager::allocate
Abstract member function to allocate an element or sequence of elements. The developer should not assume continuity of the address segment as this is not guaranteed. Note this function may throw if allocation is not possible.
function release
virtual void release(
Address const & address
) =0
Reimplemented by: microsoft::quantum::BasicAllocationManager::release
Abstract member function to release a previously allocated function. Note this function may throw if an invalid address is passed.
function reset
virtual void reset() =0
Reimplemented by: microsoft::quantum::BasicAllocationManager::reset
Abstract member function to reset the allocation manager. This function clears all allocations and resets all statistics.
function allocationsInUse
uint64_t allocationsInUse() const
Current number of registers in use. This function is used to inquire about the current number registers/resources in use.
function maxAllocationsUsed
uint64_t maxAllocationsUsed() const
Maximum number of registers in use at any one time. The maximum number of registers used at any one time. As an example of usage, this function is useful to calculate the total number of qubits required to execute the entry function.
Protected Functions Documentation
function IAllocationManager
IAllocationManager() =default
function updateRegistersInUse
void updateRegistersInUse(
uint64_t n
)
Updated on 1 August 2023 at 16:25:10 UTC