class PrimitiveVectorMemory : public VectorMemory<VectorType>
{
public:
- /**
- * Constructor.
- */
- PrimitiveVectorMemory () = default;
-
/**
* Return a pointer to a new vector. The number of elements or their
* subdivision into blocks (if applicable) is unspecified and users of this
* For the present class, calling this function will allocate a new vector
* on the heap and returning a pointer to it.
*/
- virtual VectorType *alloc ()
- {
- return new VectorType();
- }
+ virtual VectorType *alloc ();
/**
* Return a vector and indicate that it is not going to be used any further
* For the present class, this means that the vector is returned to the
* global heap.
*/
- virtual void free (const VectorType *const v)
- {
- delete v;
- }
+ virtual void free (const VectorType *const v);
};
{}
+
+template <typename VectorType>
+VectorType *
+PrimitiveVectorMemory<VectorType>::alloc ()
+{
+ return new VectorType();
+}
+
+
+
+template <typename VectorType>
+void
+PrimitiveVectorMemory<VectorType>::free (const VectorType *const v)
+{
+ delete v;
+}
+
+
+
+
#endif // DOXYGEN
DEAL_II_NAMESPACE_CLOSE