Skip to content
Open
Changes from all commits
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
5 changes: 5 additions & 0 deletions include/cppflow/datatype.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <typeinfo>
#include <ostream>
#include <stdexcept>
#include <complex>

namespace cppflow {

Expand Down Expand Up @@ -101,6 +102,10 @@ namespace cppflow {
return TF_UINT32;
if (std::is_same<T, uint64_t>::value)
return TF_UINT64;
if (std::is_same<T, std::complex<float>>::value)
return TF_COMPLEX64;
if (std::is_same<T, std::complex<double>>::value)
return TF_COMPLEX128;

// decode with `c++filt --type $output` for gcc
throw std::runtime_error{"Could not deduce type! type_name: " + std::string(typeid(T).name())};
Expand Down