Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TTG needs get_world() too #268

Merged
merged 4 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ttg/ttg/base/tt.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ namespace ttg {
/// Returns this thread's pointer to the vector of output terminals
static const std::vector<TerminalBase *> *get_outputs_tls_ptr() { return outputs_tls_ptr_accessor(); }

/// @return World in which this lives
virtual ttg::World get_world() const = 0;

/// Returns a pointer to the i'th input terminal
ttg::TerminalBase *in(size_t i) {
if (i >= inputs.size()) throw name + ":TTBase: you are requesting an input terminal that does not exist";
Expand Down
2 changes: 1 addition & 1 deletion ttg/ttg/madness/ttg.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ namespace ttg_madness {
std::array<std::size_t, std::tuple_size_v<actual_input_tuple_type>> static_streamsize;

public:
ttg::World get_world() const { return world; }
ttg::World get_world() const override final { return world; }

protected:
using worldobjT = ::madness::WorldObject<ttT>;
Expand Down
2 changes: 1 addition & 1 deletion ttg/ttg/parsec/ttg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ namespace ttg_parsec {
bool m_defer_writer = TTG_PARSEC_DEFER_WRITER;

public:
ttg::World get_world() const { return world; }
ttg::World get_world() const override final { return world; }

private:
/// dispatches a call to derivedT::op if Space == Host, otherwise to derivedT::op_cuda if Space == CUDA
Expand Down
2 changes: 2 additions & 0 deletions ttg/ttg/tt.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ namespace ttg {

TTBase *get_op(std::size_t i) { return tts.at(i).get(); }

ttg::World get_world() const override final { return tts[0]->get_world(); }

void fence() { tts[0]->fence(); }

void make_executable() {
Expand Down
Loading