diff --git a/ttg/ttg/madness/buffer.h b/ttg/ttg/madness/buffer.h index 27e29d05b..fba1ee9e1 100644 --- a/ttg/ttg/madness/buffer.h +++ b/ttg/ttg/madness/buffer.h @@ -186,6 +186,10 @@ struct Buffer : private Allocator { throw std::runtime_error("not implemented yet"); } + bool empty() const { + return (m_host_data == nullptr); + } + /* TODO: can we do this automatically? * Pin the memory on all devices we currently track. * Pinned memory won't be released by PaRSEC and can be used diff --git a/ttg/ttg/madness/fwd.h b/ttg/ttg/madness/fwd.h index 6bee1a832..b164a6f50 100644 --- a/ttg/ttg/madness/fwd.h +++ b/ttg/ttg/madness/fwd.h @@ -3,6 +3,7 @@ #include "ttg/fwd.h" #include "ttg/util/typelist.h" +#include "ttg/util/span.h" #include @@ -71,6 +72,9 @@ namespace ttg_madness { template inline bool register_device_memory(std::tuple &views); + template + inline bool register_device_memory(const ttg::span& span); + template inline void post_device_out(std::tuple &b); diff --git a/ttg/ttg/madness/ttg.h b/ttg/ttg/madness/ttg.h index 85dee437f..0deca0871 100644 --- a/ttg/ttg/madness/ttg.h +++ b/ttg/ttg/madness/ttg.h @@ -14,6 +14,7 @@ #include "ttg/base/tt.h" #include "ttg/func.h" #include "ttg/madness/device.h" +#include "ttg/madness/devicefunc.h" #include "ttg/runtimes.h" #include "ttg/tt.h" #include "ttg/util/bug.h"