MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / MemoryView

Class MemoryView

ngstd/python_ngstd.hpp:371–382  ·  view source on GitHub ↗

MemoryView for pickling without copying doesn't provide memory management, it has to be done from the outside!

Source from the content-addressed store, hash-verified

369 // MemoryView for pickling without copying
370 // doesn't provide memory management, it has to be done from the outside!
371 class MemoryView
372 {
373 private:
374 void* ptr;
375 size_t size;
376
377 public:
378 MemoryView(void* aptr, size_t asize) : ptr(aptr), size(asize) { ; }
379
380 size_t Size() const { return size; }
381 void* Ptr() const { return ptr; }
382 };
383}
384
385#endif // NGS_PYTHON

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected