Implementation file for the abstraction of a tensor type, and JSON loading utils.  
More...
#include "SerDes/TensorSpec.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/JSON.h"
#include <array>
#include <cassert>
#include <numeric>
Go to the source code of this file.
Implementation file for the abstraction of a tensor type, and JSON loading utils. 
Definition in file TensorSpec.cpp.
◆ _IMR_DBG_PRINTER
      
        
          | #define _IMR_DBG_PRINTER | ( |  | T, | 
        
          |  |  |  | N ) | 
      
 
Value:  case TensorType::N: {                                                        \
    const T *TypedBuff = reinterpret_cast<const T *>(Buffer);                  \
    auto R = llvm::make_range(TypedBuff, TypedBuff + Spec.getElementCount());  \
    return llvm::join(                                                         \
        llvm::map_range(R, [](T V) { return std::to_string(V); }), ",");       \
  }
 
 
◆ PARSE_TYPE
      
        
          | #define PARSE_TYPE | ( |  | T, | 
        
          |  |  |  | E ) | 
      
 
Value:  if (TensorType == #T)                                                        \
    return TensorSpec::createSpec<T>(TensorName, TensorShape, TensorPort);
 
 
◆ TFUTILS_GETDATATYPE_IMPL
      
        
          | #define TFUTILS_GETDATATYPE_IMPL | ( |  | T, | 
        
          |  |  |  | E )     template <> TensorType TensorSpec::getDataType<T>() { return TensorType::E; } | 
      
 
 
◆ TFUTILS_GETNAME_IMPL
      
        
          | #define TFUTILS_GETNAME_IMPL | ( |  | T, | 
        
          |  |  |  | _ )   #T, |