forked from TESSEorg/ttg
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing device functions in the madness backend
Missing register_device_memory on span and Buffer::empty Signed-off-by: Joseph Schuchart <[email protected]>
- Loading branch information
Showing
5 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef TTG_MAD_DEVICEFUNC_H | ||
#define TTG_MAD_DEVICEFUNC_H | ||
|
||
#include "ttg/madness/buffer.h" | ||
|
||
namespace ttg_madness { | ||
|
||
template<typename T, typename A> | ||
auto buffer_data(const Buffer<T, A>& buffer) { | ||
/* for now return the internal pointer, should be adapted if ever relevant for madness */ | ||
return buffer.current_device_ptr(); | ||
} | ||
|
||
template<typename... Views> | ||
inline bool register_device_memory(std::tuple<Views&...> &views) | ||
{ | ||
/* nothing to do here */ | ||
return true; | ||
} | ||
|
||
template<typename T, std::size_t N> | ||
inline bool register_device_memory(const ttg::span<T, N>& span) | ||
{ | ||
/* nothing to do here */ | ||
return true; | ||
} | ||
|
||
} // namespace ttg_madness | ||
|
||
#endif // TTG_MAD_DEVICEFUNC_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters