Skip to content

Commit

Permalink
Only enable cuda op if cuda was detected
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Dec 21, 2023
1 parent beed36a commit f30f901
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/test/test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class A : public TT<keyT, std::tuple<Out<void, int>, Out<keyT, int>>, A, ttg::ty
const std::string &name)
: baseT(inedges, outedges, name, {"inputA"}, {"resultA", "iterateA"}) {}

#if defined(TTG_HAVE_CUDA)
static constexpr const bool have_cuda_op = true;
#endif // TTG_HAVE_CUDA

void op(const keyT &key, const baseT::input_refs_tuple_type &t, baseT::output_terminals_type &out) {
// int& value = baseT::get<0>(t); // !! ERROR, trying to get int& from const int
Expand Down

0 comments on commit f30f901

Please sign in to comment.