ONE - On-device Neural Engine
Loading...
Searching...
No Matches
ConvBackend.cpp File Reference
#include "ConvBackend.h"
#include <nncc/core/ADT/kernel/Overlay.h>
#include <nncc/core/ADT/kernel/NHWCLayout.h>
#include <tensorflow/contrib/lite/kernels/register.h>
#include <tensorflow/contrib/lite/model.h>
#include <tensorflow/contrib/lite/builtin_op_data.h>
#include <cstdlib>
#include <stdexcept>

Go to the source code of this file.

Functions

template<typename T >
T * typed_malloc (void)
 Allocate memory with malloc and return a typed pointer.
 

Function Documentation

◆ typed_malloc()

template<typename T >
T * typed_malloc ( void  )

Allocate memory with malloc and return a typed pointer.

NOTE This function throws std::bac_alloc exception on allocation failure

Definition at line 37 of file ConvBackend.cpp.

38{
39 if (auto res = reinterpret_cast<T *>(malloc(sizeof(T))))
40 {
41 return res;
42 }
43 throw std::bad_alloc{};
44}