\hypertarget{tensor__common_8h}{}\doxysection{nnstreamer/tensor\+\_\+common.h File Reference}
\label{tensor__common_8h}\index{nnstreamer/tensor\_common.h@{nnstreamer/tensor\_common.h}}


Common header file for N\+N\+Streamer, the G\+Streamer plugin for neural networks.  


{\ttfamily \#include $<$glib.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$gst/gst.\+h$>$}\newline
{\ttfamily \#include $<$gst/base/gstadapter.\+h$>$}\newline
{\ttfamily \#include $<$gst/base/gstcollectpads.\+h$>$}\newline
{\ttfamily \#include \char`\"{}tensor\+\_\+typedef.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}nnstreamer\+\_\+log.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}nnstreamer\+\_\+plugin\+\_\+api.\+h\char`\"{}}\newline
Include dependency graph for tensor\+\_\+common.\+h\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct__tensor__sync__basepad__data}{\+\_\+tensor\+\_\+sync\+\_\+basepad\+\_\+data}}
\begin{DoxyCompactList}\small\item\em Tensor Merge/\+Mux sync data for baspad mode. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{struct__tensor__time__sync__data}{\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+data}}
\begin{DoxyCompactList}\small\item\em Tensor Merge/\+Mux time sync data. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structGstTensorCollectPadData}{Gst\+Tensor\+Collect\+Pad\+Data}}
\begin{DoxyCompactList}\small\item\em Internal data structure for Collect Pad in mux / merge. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structGstTensorPad}{Gst\+Tensor\+Pad}}
\begin{DoxyCompactList}\small\item\em Internal data structure for pad in demux / split. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{tensor__common_8h_a19b2d93f56966ef88905a98fd1ea1422}{nns\+\_\+memcpy}}~memcpy
\item 
\#define \mbox{\hyperlink{tensor__common_8h_a265f9854ed8782e0937b5ed52243303b}{nns\+\_\+memset}}~memset
\item 
\#define \mbox{\hyperlink{tensor__common_8h_aad7bf8b982911b3b3d5932756917b15a}{gst\+\_\+tensor\+\_\+pad\+\_\+caps\+\_\+is\+\_\+static}}(p)~(\mbox{\hyperlink{tensor__common_8h_a459532128566b3e6099bff9c566edf71}{gst\+\_\+tensor\+\_\+pad\+\_\+get\+\_\+format}} (p) == \mbox{\hyperlink{tensor__typedef_8h_a02f9f1ada3a6026b2e9bcf15eaa4069dac9eeffede00be698970f239ce5e50f9b}{\+\_\+\+N\+N\+S\+\_\+\+T\+E\+N\+S\+O\+R\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+S\+T\+A\+T\+IC}})
\begin{DoxyCompactList}\small\item\em Macro to check current pad caps is static tensor. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{tensor__common_8h_a9eacb59c1553434b44ae2fe79c0eb0c6}{gst\+\_\+tensor\+\_\+pad\+\_\+caps\+\_\+is\+\_\+flexible}}(p)~(\mbox{\hyperlink{tensor__common_8h_a459532128566b3e6099bff9c566edf71}{gst\+\_\+tensor\+\_\+pad\+\_\+get\+\_\+format}} (p) == \mbox{\hyperlink{tensor__typedef_8h_a02f9f1ada3a6026b2e9bcf15eaa4069da07955daf3ae0f568c9c12f790433401c}{\+\_\+\+N\+N\+S\+\_\+\+T\+E\+N\+S\+O\+R\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+F\+L\+E\+X\+I\+B\+LE}})
\begin{DoxyCompactList}\small\item\em Macro to check current pad caps is flexible tensor. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{tensor__common_8h_a45c34f16d8668175ed74ee2978ff8396}{gst\+\_\+tensor\+\_\+pad\+\_\+caps\+\_\+is\+\_\+sparse}}(p)~(\mbox{\hyperlink{tensor__common_8h_a459532128566b3e6099bff9c566edf71}{gst\+\_\+tensor\+\_\+pad\+\_\+get\+\_\+format}} (p) == \mbox{\hyperlink{tensor__typedef_8h_a02f9f1ada3a6026b2e9bcf15eaa4069da93a6f646deed65a694aab40aa691a6cd}{\+\_\+\+N\+N\+S\+\_\+\+T\+E\+N\+S\+O\+R\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+S\+P\+A\+R\+SE}})
\begin{DoxyCompactList}\small\item\em Macro to check current pad caps is sparse tensor. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{tensor__common_8h_ace934caf79369830eaca558b260f6d4f}{silent\+\_\+debug}}(self, ...)
\begin{DoxyCompactList}\small\item\em Macro for debug message. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{tensor__common_8h_a334e6de9c3bf80bc6d2b41cdf6be77a1}{silent\+\_\+debug\+\_\+caps}}(self,  caps,  msg)
\begin{DoxyCompactList}\small\item\em Macro for capability debug message. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \mbox{\hyperlink{struct__tensor__sync__basepad__data}{\+\_\+tensor\+\_\+sync\+\_\+basepad\+\_\+data}} \mbox{\hyperlink{tensor__common_8h_aee92a90f585190a7b08ff8ee85cb05ba}{tensor\+\_\+sync\+\_\+basepad\+\_\+data}}
\begin{DoxyCompactList}\small\item\em Tensor Merge/\+Mux sync data for baspad mode. \end{DoxyCompactList}\item 
typedef struct \mbox{\hyperlink{struct__tensor__time__sync__data}{\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+data}} \mbox{\hyperlink{tensor__common_8h_a88e575b2e6ee5d254fcec6bcac73c76e}{tensor\+\_\+time\+\_\+sync\+\_\+data}}
\begin{DoxyCompactList}\small\item\em Tensor Merge/\+Mux time sync data. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537}{tensor\+\_\+time\+\_\+sync\+\_\+mode}} \{ \newline
\mbox{\hyperlink{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537ae361a9a0ced4f060011aa4967f8c3bcc}{S\+Y\+N\+C\+\_\+\+N\+O\+S\+Y\+NC}} = 0, 
\mbox{\hyperlink{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a6d7d923a4078f0ffb3acd900313633b7}{S\+Y\+N\+C\+\_\+\+S\+L\+O\+W\+E\+ST}} = 1, 
\mbox{\hyperlink{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a6e73667bb31b20194c36a38301f0f067}{S\+Y\+N\+C\+\_\+\+B\+A\+S\+E\+P\+AD}} = 2, 
\mbox{\hyperlink{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a83adc7f2b55afcb0c84e9dac996ceb63}{S\+Y\+N\+C\+\_\+\+R\+E\+F\+R\+E\+SH}} = 3, 
\newline
\mbox{\hyperlink{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a6f459d09467e92d9fe46c5b21bb7c82c}{S\+Y\+N\+C\+\_\+\+E\+ND}}
 \}
\begin{DoxyCompactList}\small\item\em time synchronization options \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{tensor__common_8h_a474f4499274fb0856c809a59e154df96}{gst\+\_\+tensor\+\_\+parse\+\_\+config\+\_\+file}} (const gchar $\ast$config\+\_\+path, const G\+Object $\ast$object)
\begin{DoxyCompactList}\small\item\em Parses a configuration file and sets the corresponding properties on a G\+Object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537}{tensor\+\_\+time\+\_\+sync\+\_\+mode}} \mbox{\hyperlink{tensor__common_8h_aa9aa55e0fdfc8726d9a3a8c64830b271}{gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+get\+\_\+mode}} (const gchar $\ast$str)
\begin{DoxyCompactList}\small\item\em Get the corresponding mode from the string value. \end{DoxyCompactList}\item 
const gchar $\ast$ \mbox{\hyperlink{tensor__common_8h_a386be3ccf469c0090f9a51bf911e2172}{gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+get\+\_\+mode\+\_\+string}} (\mbox{\hyperlink{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537}{tensor\+\_\+time\+\_\+sync\+\_\+mode}} mode)
\begin{DoxyCompactList}\small\item\em Get the time-\/sync mode string. \end{DoxyCompactList}\item 
gboolean \mbox{\hyperlink{tensor__common_8h_ad53e232ff2dbe2af5d2e21ab81276d56}{gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+set\+\_\+option\+\_\+data}} (\mbox{\hyperlink{tensor__common_8h_a88e575b2e6ee5d254fcec6bcac73c76e}{tensor\+\_\+time\+\_\+sync\+\_\+data}} $\ast$sync)
\begin{DoxyCompactList}\small\item\em Setup time sync option. \end{DoxyCompactList}\item 
gboolean \mbox{\hyperlink{tensor__common_8h_ac2e54159e49436c16c82af6732e18d14}{gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+get\+\_\+current\+\_\+time}} (Gst\+Collect\+Pads $\ast$collect, \mbox{\hyperlink{tensor__common_8h_a88e575b2e6ee5d254fcec6bcac73c76e}{tensor\+\_\+time\+\_\+sync\+\_\+data}} $\ast$sync, Gst\+Clock\+Time $\ast$current\+\_\+time, Gst\+Buffer $\ast$tensors\+\_\+buf)
\begin{DoxyCompactList}\small\item\em A function call to decide current timestamp among collected pads based on P\+TS. It will decide current timestamp according to sync option. Gst\+Meta is also copied with same sync mode. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{tensor__common_8h_a16bbdb4f08da198527c0a14d634ceb4a}{gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+flush}} (Gst\+Collect\+Pads $\ast$collect)
\begin{DoxyCompactList}\small\item\em A function to be called while processing a flushing event. It should clear old buffer and reset pad data. \end{DoxyCompactList}\item 
gboolean \mbox{\hyperlink{tensor__common_8h_ad1907af6d000f03e56565ef1aebcc00b}{gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+buffer\+\_\+from\+\_\+collectpad}} (Gst\+Collect\+Pads $\ast$collect, \mbox{\hyperlink{tensor__common_8h_a88e575b2e6ee5d254fcec6bcac73c76e}{tensor\+\_\+time\+\_\+sync\+\_\+data}} $\ast$sync, Gst\+Clock\+Time current\+\_\+time, Gst\+Buffer $\ast$tensors\+\_\+buf, \mbox{\hyperlink{structGstTensorsConfig}{Gst\+Tensors\+Config}} $\ast$configs, gboolean $\ast$is\+\_\+eos)
\begin{DoxyCompactList}\small\item\em A function call to make tensors from collected pads It decide which buffer is going to be used according to sync option. \end{DoxyCompactList}\item 
Gst\+Buffer $\ast$ \mbox{\hyperlink{tensor__common_8h_a54f7006af0c8207c9b478412b69626db}{gst\+\_\+tensor\+\_\+buffer\+\_\+from\+\_\+config}} (Gst\+Buffer $\ast$in, \mbox{\hyperlink{structGstTensorsConfig}{Gst\+Tensors\+Config}} $\ast$config)
\begin{DoxyCompactList}\small\item\em Configure gst-\/buffer with tensors information. N\+N\+Streamer handles single memory chunk as single tensor. If incoming buffer has invalid memories, separate it and generate new gst-\/buffer using tensors information. Note that this function always takes the ownership of input buffer. \end{DoxyCompactList}\item 
Gst\+Caps $\ast$ \mbox{\hyperlink{tensor__common_8h_ab23cc571aa1b9cf9c3a5a45839c43443}{gst\+\_\+tensor\+\_\+pad\+\_\+caps\+\_\+from\+\_\+config}} (Gst\+Pad $\ast$pad, const \mbox{\hyperlink{structGstTensorsConfig}{Gst\+Tensors\+Config}} $\ast$config)
\begin{DoxyCompactList}\small\item\em Get pad caps from tensors config and caps of the peer connected to the pad. \end{DoxyCompactList}\item 
Gst\+Caps $\ast$ \mbox{\hyperlink{tensor__common_8h_a2d8353ac248e4c5eaa656221e00710bb}{gst\+\_\+tensor\+\_\+pad\+\_\+possible\+\_\+caps\+\_\+from\+\_\+config}} (Gst\+Pad $\ast$pad, const \mbox{\hyperlink{structGstTensorsConfig}{Gst\+Tensors\+Config}} $\ast$config)
\begin{DoxyCompactList}\small\item\em Get all possible caps from tensors config. Unlike \mbox{\hyperlink{tensor__common_8h_ab23cc571aa1b9cf9c3a5a45839c43443}{gst\+\_\+tensor\+\_\+pad\+\_\+caps\+\_\+from\+\_\+config()}}, this function does not check peer caps. \end{DoxyCompactList}\item 
\mbox{\hyperlink{tensor__typedef_8h_a8f63561cff18618282cb7e0dd1f8ac96}{tensor\+\_\+format}} \mbox{\hyperlink{tensor__common_8h_a459532128566b3e6099bff9c566edf71}{gst\+\_\+tensor\+\_\+pad\+\_\+get\+\_\+format}} (Gst\+Pad $\ast$pad)
\begin{DoxyCompactList}\small\item\em Get tensor format of current pad caps. \end{DoxyCompactList}\item 
G\+Hash\+Table $\ast$ \mbox{\hyperlink{tensor__common_8h_aa0f17e8b5359dd284168bc8c2011dbce}{gst\+\_\+tensor\+\_\+aggregation\+\_\+init}} (void)
\begin{DoxyCompactList}\small\item\em Gets new hash table for tensor aggregation. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{tensor__common_8h_a67910d61e16ccbeb2b701d8d064f43af}{gst\+\_\+tensor\+\_\+aggregation\+\_\+clear}} (G\+Hash\+Table $\ast$table, const guint32 key)
\begin{DoxyCompactList}\small\item\em Clears buffers from adapter. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{tensor__common_8h_a5c097d371af81a03986f4f3246234fa0}{gst\+\_\+tensor\+\_\+aggregation\+\_\+clear\+\_\+all}} (G\+Hash\+Table $\ast$table)
\begin{DoxyCompactList}\small\item\em Clears buffers from all adapters in hash table. \end{DoxyCompactList}\item 
Gst\+Adapter $\ast$ \mbox{\hyperlink{tensor__common_8h_a303119dad38d6d8ce1e6dc21dc2b54b4}{gst\+\_\+tensor\+\_\+aggregation\+\_\+get\+\_\+adapter}} (G\+Hash\+Table $\ast$table, const guint32 key)
\begin{DoxyCompactList}\small\item\em Gets adapter from hash table. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Common header file for N\+N\+Streamer, the G\+Streamer plugin for neural networks. 

N\+N\+Streamer Common Header Copyright (C) 2018 Myung\+Joo Ham \href{mailto:myungjoo.ham@samsung.com}{\texttt{ myungjoo.\+ham@samsung.\+com}}

This library is free software; you can redistribute it and/or modify it under the terms of the G\+NU Library General Public License as published by the Free Software Foundation; version 2.\+1 of the License.

This library is distributed in the hope that it will be useful, but W\+I\+T\+H\+O\+UT A\+NY W\+A\+R\+R\+A\+N\+TY; without even the implied warranty of M\+E\+R\+C\+H\+A\+N\+T\+A\+B\+I\+L\+I\+TY or F\+I\+T\+N\+E\+SS F\+OR A P\+A\+R\+T\+I\+C\+U\+L\+AR P\+U\+R\+P\+O\+SE. See the G\+NU Library General Public License for more details.

\begin{DoxyDate}{Date}
23 May 2018 
\end{DoxyDate}
\begin{DoxySeeAlso}{See also}
\href{https://github.com/nnstreamer/nnstreamer}{\texttt{ https\+://github.\+com/nnstreamer/nnstreamer}} 
\end{DoxySeeAlso}
\begin{DoxyAuthor}{Author}
Myung\+Joo Ham \href{mailto:myungjoo.ham@samsung.com}{\texttt{ myungjoo.\+ham@samsung.\+com}} 
\end{DoxyAuthor}
\begin{DoxyRefDesc}{Bug}
\item[\mbox{\hyperlink{bug__bug000100}{Bug}}]No known bugs except for N\+YI items\end{DoxyRefDesc}


\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{tensor__common_8h_a9eacb59c1553434b44ae2fe79c0eb0c6}\label{tensor__common_8h_a9eacb59c1553434b44ae2fe79c0eb0c6}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_pad\_caps\_is\_flexible@{gst\_tensor\_pad\_caps\_is\_flexible}}
\index{gst\_tensor\_pad\_caps\_is\_flexible@{gst\_tensor\_pad\_caps\_is\_flexible}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_pad\_caps\_is\_flexible}{gst\_tensor\_pad\_caps\_is\_flexible}}
{\footnotesize\ttfamily \#define gst\+\_\+tensor\+\_\+pad\+\_\+caps\+\_\+is\+\_\+flexible(\begin{DoxyParamCaption}\item[{}]{p }\end{DoxyParamCaption})~(\mbox{\hyperlink{tensor__common_8h_a459532128566b3e6099bff9c566edf71}{gst\+\_\+tensor\+\_\+pad\+\_\+get\+\_\+format}} (p) == \mbox{\hyperlink{tensor__typedef_8h_a02f9f1ada3a6026b2e9bcf15eaa4069da07955daf3ae0f568c9c12f790433401c}{\+\_\+\+N\+N\+S\+\_\+\+T\+E\+N\+S\+O\+R\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+F\+L\+E\+X\+I\+B\+LE}})}



Macro to check current pad caps is flexible tensor. 



Definition at line 231 of file tensor\+\_\+common.\+h.

\mbox{\Hypertarget{tensor__common_8h_a45c34f16d8668175ed74ee2978ff8396}\label{tensor__common_8h_a45c34f16d8668175ed74ee2978ff8396}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_pad\_caps\_is\_sparse@{gst\_tensor\_pad\_caps\_is\_sparse}}
\index{gst\_tensor\_pad\_caps\_is\_sparse@{gst\_tensor\_pad\_caps\_is\_sparse}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_pad\_caps\_is\_sparse}{gst\_tensor\_pad\_caps\_is\_sparse}}
{\footnotesize\ttfamily \#define gst\+\_\+tensor\+\_\+pad\+\_\+caps\+\_\+is\+\_\+sparse(\begin{DoxyParamCaption}\item[{}]{p }\end{DoxyParamCaption})~(\mbox{\hyperlink{tensor__common_8h_a459532128566b3e6099bff9c566edf71}{gst\+\_\+tensor\+\_\+pad\+\_\+get\+\_\+format}} (p) == \mbox{\hyperlink{tensor__typedef_8h_a02f9f1ada3a6026b2e9bcf15eaa4069da93a6f646deed65a694aab40aa691a6cd}{\+\_\+\+N\+N\+S\+\_\+\+T\+E\+N\+S\+O\+R\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+S\+P\+A\+R\+SE}})}



Macro to check current pad caps is sparse tensor. 



Definition at line 236 of file tensor\+\_\+common.\+h.

\mbox{\Hypertarget{tensor__common_8h_aad7bf8b982911b3b3d5932756917b15a}\label{tensor__common_8h_aad7bf8b982911b3b3d5932756917b15a}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_pad\_caps\_is\_static@{gst\_tensor\_pad\_caps\_is\_static}}
\index{gst\_tensor\_pad\_caps\_is\_static@{gst\_tensor\_pad\_caps\_is\_static}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_pad\_caps\_is\_static}{gst\_tensor\_pad\_caps\_is\_static}}
{\footnotesize\ttfamily \#define gst\+\_\+tensor\+\_\+pad\+\_\+caps\+\_\+is\+\_\+static(\begin{DoxyParamCaption}\item[{}]{p }\end{DoxyParamCaption})~(\mbox{\hyperlink{tensor__common_8h_a459532128566b3e6099bff9c566edf71}{gst\+\_\+tensor\+\_\+pad\+\_\+get\+\_\+format}} (p) == \mbox{\hyperlink{tensor__typedef_8h_a02f9f1ada3a6026b2e9bcf15eaa4069dac9eeffede00be698970f239ce5e50f9b}{\+\_\+\+N\+N\+S\+\_\+\+T\+E\+N\+S\+O\+R\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+S\+T\+A\+T\+IC}})}



Macro to check current pad caps is static tensor. 



Definition at line 226 of file tensor\+\_\+common.\+h.

\mbox{\Hypertarget{tensor__common_8h_a19b2d93f56966ef88905a98fd1ea1422}\label{tensor__common_8h_a19b2d93f56966ef88905a98fd1ea1422}} 
\index{tensor\_common.h@{tensor\_common.h}!nns\_memcpy@{nns\_memcpy}}
\index{nns\_memcpy@{nns\_memcpy}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{nns\_memcpy}{nns\_memcpy}}
{\footnotesize\ttfamily \#define nns\+\_\+memcpy~memcpy}



Definition at line 52 of file tensor\+\_\+common.\+h.

\mbox{\Hypertarget{tensor__common_8h_a265f9854ed8782e0937b5ed52243303b}\label{tensor__common_8h_a265f9854ed8782e0937b5ed52243303b}} 
\index{tensor\_common.h@{tensor\_common.h}!nns\_memset@{nns\_memset}}
\index{nns\_memset@{nns\_memset}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{nns\_memset}{nns\_memset}}
{\footnotesize\ttfamily \#define nns\+\_\+memset~memset}



Definition at line 53 of file tensor\+\_\+common.\+h.

\mbox{\Hypertarget{tensor__common_8h_ace934caf79369830eaca558b260f6d4f}\label{tensor__common_8h_ace934caf79369830eaca558b260f6d4f}} 
\index{tensor\_common.h@{tensor\_common.h}!silent\_debug@{silent\_debug}}
\index{silent\_debug@{silent\_debug}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{silent\_debug}{silent\_debug}}
{\footnotesize\ttfamily \#define silent\+\_\+debug(\begin{DoxyParamCaption}\item[{}]{self,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \textcolor{keywordflow}{do} \{ \(\backslash\)}
\DoxyCodeLine{    if (\mbox{\hyperlink{gsttensor__aggregator_8c_a49606be7356624568932ec81c0d429f4}{DBG}}) \{ \(\backslash\)}
\DoxyCodeLine{      GST\_DEBUG\_OBJECT (\textcolor{keyword}{self}, \_\_VA\_ARGS\_\_); \(\backslash\)}
\DoxyCodeLine{    \} \(\backslash\)}
\DoxyCodeLine{  \} \textcolor{keywordflow}{while} (0)}

\end{DoxyCode}


Macro for debug message. 



Definition at line 276 of file tensor\+\_\+common.\+h.

\mbox{\Hypertarget{tensor__common_8h_a334e6de9c3bf80bc6d2b41cdf6be77a1}\label{tensor__common_8h_a334e6de9c3bf80bc6d2b41cdf6be77a1}} 
\index{tensor\_common.h@{tensor\_common.h}!silent\_debug\_caps@{silent\_debug\_caps}}
\index{silent\_debug\_caps@{silent\_debug\_caps}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{silent\_debug\_caps}{silent\_debug\_caps}}
{\footnotesize\ttfamily \#define silent\+\_\+debug\+\_\+caps(\begin{DoxyParamCaption}\item[{}]{self,  }\item[{}]{caps,  }\item[{}]{msg }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{  \textcolor{keywordflow}{do} \{ \(\backslash\)}
\DoxyCodeLine{  if (\mbox{\hyperlink{gsttensor__aggregator_8c_a49606be7356624568932ec81c0d429f4}{DBG}}) \{ \(\backslash\)}
\DoxyCodeLine{    if (caps) \{ \(\backslash\)}
\DoxyCodeLine{      gchar *caps\_s\_string = gst\_caps\_to\_string (caps); \(\backslash\)}
\DoxyCodeLine{      GST\_DEBUG\_OBJECT (\textcolor{keyword}{self}, msg \textcolor{stringliteral}{" = \%s\(\backslash\)n"}, caps\_s\_string); \(\backslash\)}
\DoxyCodeLine{      g\_free (caps\_s\_string); \(\backslash\)}
\DoxyCodeLine{    \} \(\backslash\)}
\DoxyCodeLine{  \} \(\backslash\)}
\DoxyCodeLine{\} \textcolor{keywordflow}{while} (0)}

\end{DoxyCode}


Macro for capability debug message. 



Definition at line 285 of file tensor\+\_\+common.\+h.



\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{tensor__common_8h_aee92a90f585190a7b08ff8ee85cb05ba}\label{tensor__common_8h_aee92a90f585190a7b08ff8ee85cb05ba}} 
\index{tensor\_common.h@{tensor\_common.h}!tensor\_sync\_basepad\_data@{tensor\_sync\_basepad\_data}}
\index{tensor\_sync\_basepad\_data@{tensor\_sync\_basepad\_data}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{tensor\_sync\_basepad\_data}{tensor\_sync\_basepad\_data}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{struct__tensor__sync__basepad__data}{\+\_\+tensor\+\_\+sync\+\_\+basepad\+\_\+data}} \mbox{\hyperlink{tensor__common_8h_aee92a90f585190a7b08ff8ee85cb05ba}{tensor\+\_\+sync\+\_\+basepad\+\_\+data}}}



Tensor Merge/\+Mux sync data for baspad mode. 

\mbox{\Hypertarget{tensor__common_8h_a88e575b2e6ee5d254fcec6bcac73c76e}\label{tensor__common_8h_a88e575b2e6ee5d254fcec6bcac73c76e}} 
\index{tensor\_common.h@{tensor\_common.h}!tensor\_time\_sync\_data@{tensor\_time\_sync\_data}}
\index{tensor\_time\_sync\_data@{tensor\_time\_sync\_data}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{tensor\_time\_sync\_data}{tensor\_time\_sync\_data}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{struct__tensor__time__sync__data}{\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+data}} \mbox{\hyperlink{tensor__common_8h_a88e575b2e6ee5d254fcec6bcac73c76e}{tensor\+\_\+time\+\_\+sync\+\_\+data}}}



Tensor Merge/\+Mux time sync data. 



\doxysubsection{Enumeration Type Documentation}
\mbox{\Hypertarget{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537}\label{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537}} 
\index{tensor\_common.h@{tensor\_common.h}!tensor\_time\_sync\_mode@{tensor\_time\_sync\_mode}}
\index{tensor\_time\_sync\_mode@{tensor\_time\_sync\_mode}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{tensor\_time\_sync\_mode}{tensor\_time\_sync\_mode}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537}{tensor\+\_\+time\+\_\+sync\+\_\+mode}}}



time synchronization options 

\begin{DoxySeeAlso}{See also}
\href{https://github.com/nnstreamer/nnstreamer/wiki/Synchronization-Policies-at-Mux-and-Merge}{\texttt{ https\+://github.\+com/nnstreamer/nnstreamer/wiki/\+Synchronization-\/\+Policies-\/at-\/\+Mux-\/and-\/\+Merge}} 
\end{DoxySeeAlso}
\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{SYNC\_NOSYNC@{SYNC\_NOSYNC}!tensor\_common.h@{tensor\_common.h}}\index{tensor\_common.h@{tensor\_common.h}!SYNC\_NOSYNC@{SYNC\_NOSYNC}}}\mbox{\Hypertarget{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537ae361a9a0ced4f060011aa4967f8c3bcc}\label{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537ae361a9a0ced4f060011aa4967f8c3bcc}} 
S\+Y\+N\+C\+\_\+\+N\+O\+S\+Y\+NC&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SYNC\_SLOWEST@{SYNC\_SLOWEST}!tensor\_common.h@{tensor\_common.h}}\index{tensor\_common.h@{tensor\_common.h}!SYNC\_SLOWEST@{SYNC\_SLOWEST}}}\mbox{\Hypertarget{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a6d7d923a4078f0ffb3acd900313633b7}\label{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a6d7d923a4078f0ffb3acd900313633b7}} 
S\+Y\+N\+C\+\_\+\+S\+L\+O\+W\+E\+ST&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SYNC\_BASEPAD@{SYNC\_BASEPAD}!tensor\_common.h@{tensor\_common.h}}\index{tensor\_common.h@{tensor\_common.h}!SYNC\_BASEPAD@{SYNC\_BASEPAD}}}\mbox{\Hypertarget{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a6e73667bb31b20194c36a38301f0f067}\label{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a6e73667bb31b20194c36a38301f0f067}} 
S\+Y\+N\+C\+\_\+\+B\+A\+S\+E\+P\+AD&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SYNC\_REFRESH@{SYNC\_REFRESH}!tensor\_common.h@{tensor\_common.h}}\index{tensor\_common.h@{tensor\_common.h}!SYNC\_REFRESH@{SYNC\_REFRESH}}}\mbox{\Hypertarget{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a83adc7f2b55afcb0c84e9dac996ceb63}\label{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a83adc7f2b55afcb0c84e9dac996ceb63}} 
S\+Y\+N\+C\+\_\+\+R\+E\+F\+R\+E\+SH&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SYNC\_END@{SYNC\_END}!tensor\_common.h@{tensor\_common.h}}\index{tensor\_common.h@{tensor\_common.h}!SYNC\_END@{SYNC\_END}}}\mbox{\Hypertarget{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a6f459d09467e92d9fe46c5b21bb7c82c}\label{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537a6f459d09467e92d9fe46c5b21bb7c82c}} 
S\+Y\+N\+C\+\_\+\+E\+ND&\\
\hline

\end{DoxyEnumFields}


Definition at line 62 of file tensor\+\_\+common.\+h.



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{tensor__common_8h_a67910d61e16ccbeb2b701d8d064f43af}\label{tensor__common_8h_a67910d61e16ccbeb2b701d8d064f43af}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_aggregation\_clear@{gst\_tensor\_aggregation\_clear}}
\index{gst\_tensor\_aggregation\_clear@{gst\_tensor\_aggregation\_clear}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_aggregation\_clear()}{gst\_tensor\_aggregation\_clear()}}
{\footnotesize\ttfamily void gst\+\_\+tensor\+\_\+aggregation\+\_\+clear (\begin{DoxyParamCaption}\item[{G\+Hash\+Table $\ast$}]{table,  }\item[{const guint32}]{key }\end{DoxyParamCaption})}



Clears buffers from adapter. 


\begin{DoxyParams}{Parameters}
{\em table} & a hash table instance initialized with \mbox{\hyperlink{tensor__common_8h_aa0f17e8b5359dd284168bc8c2011dbce}{gst\+\_\+tensor\+\_\+aggregation\+\_\+init()}} \\
\hline
{\em key} & the key to look up (set null to get default adapter) \\
\hline
\end{DoxyParams}


Definition at line 763 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a67910d61e16ccbeb2b701d8d064f43af_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_a5c097d371af81a03986f4f3246234fa0}\label{tensor__common_8h_a5c097d371af81a03986f4f3246234fa0}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_aggregation\_clear\_all@{gst\_tensor\_aggregation\_clear\_all}}
\index{gst\_tensor\_aggregation\_clear\_all@{gst\_tensor\_aggregation\_clear\_all}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_aggregation\_clear\_all()}{gst\_tensor\_aggregation\_clear\_all()}}
{\footnotesize\ttfamily void gst\+\_\+tensor\+\_\+aggregation\+\_\+clear\+\_\+all (\begin{DoxyParamCaption}\item[{G\+Hash\+Table $\ast$}]{table }\end{DoxyParamCaption})}



Clears buffers from all adapters in hash table. 


\begin{DoxyParams}{Parameters}
{\em table} & a hash table instance initialized with \mbox{\hyperlink{tensor__common_8h_aa0f17e8b5359dd284168bc8c2011dbce}{gst\+\_\+tensor\+\_\+aggregation\+\_\+init()}} \\
\hline
\end{DoxyParams}


Definition at line 778 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a5c097d371af81a03986f4f3246234fa0_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a5c097d371af81a03986f4f3246234fa0_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_a303119dad38d6d8ce1e6dc21dc2b54b4}\label{tensor__common_8h_a303119dad38d6d8ce1e6dc21dc2b54b4}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_aggregation\_get\_adapter@{gst\_tensor\_aggregation\_get\_adapter}}
\index{gst\_tensor\_aggregation\_get\_adapter@{gst\_tensor\_aggregation\_get\_adapter}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_aggregation\_get\_adapter()}{gst\_tensor\_aggregation\_get\_adapter()}}
{\footnotesize\ttfamily Gst\+Adapter$\ast$ gst\+\_\+tensor\+\_\+aggregation\+\_\+get\+\_\+adapter (\begin{DoxyParamCaption}\item[{G\+Hash\+Table $\ast$}]{table,  }\item[{const guint32}]{key }\end{DoxyParamCaption})}



Gets adapter from hash table. 


\begin{DoxyParams}{Parameters}
{\em table} & a hash table instance initialized with \mbox{\hyperlink{tensor__common_8h_aa0f17e8b5359dd284168bc8c2011dbce}{gst\+\_\+tensor\+\_\+aggregation\+\_\+init()}} \\
\hline
{\em key} & the key to look up (set null to get default adapter) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
gst-\/adapter instance. DO N\+OT release this instance. 
\end{DoxyReturn}


Definition at line 790 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a303119dad38d6d8ce1e6dc21dc2b54b4_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a303119dad38d6d8ce1e6dc21dc2b54b4_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_aa0f17e8b5359dd284168bc8c2011dbce}\label{tensor__common_8h_aa0f17e8b5359dd284168bc8c2011dbce}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_aggregation\_init@{gst\_tensor\_aggregation\_init}}
\index{gst\_tensor\_aggregation\_init@{gst\_tensor\_aggregation\_init}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_aggregation\_init()}{gst\_tensor\_aggregation\_init()}}
{\footnotesize\ttfamily G\+Hash\+Table$\ast$ gst\+\_\+tensor\+\_\+aggregation\+\_\+init (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Gets new hash table for tensor aggregation. 

\begin{DoxyReturn}{Returns}
Newly allocated hash table, caller should release this using g\+\_\+hash\+\_\+table\+\_\+destroy(). 
\end{DoxyReturn}
Add default adapter (for the case if buffer has no specific id). If gst-\/buffer has tensor-\/meta which includes client-\/id, e.\+g., aggregation frames from multiple clients on query-\/server pipeline, nnstreamer element should parse meta and request adapter with this id. However, on normal pipeline, gst-\/buffer does not contain tensor-\/meta, then the element may request adapter with null key string.

Definition at line 737 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_aa0f17e8b5359dd284168bc8c2011dbce_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_aa0f17e8b5359dd284168bc8c2011dbce_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_a54f7006af0c8207c9b478412b69626db}\label{tensor__common_8h_a54f7006af0c8207c9b478412b69626db}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_buffer\_from\_config@{gst\_tensor\_buffer\_from\_config}}
\index{gst\_tensor\_buffer\_from\_config@{gst\_tensor\_buffer\_from\_config}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_buffer\_from\_config()}{gst\_tensor\_buffer\_from\_config()}}
{\footnotesize\ttfamily Gst\+Buffer$\ast$ gst\+\_\+tensor\+\_\+buffer\+\_\+from\+\_\+config (\begin{DoxyParamCaption}\item[{Gst\+Buffer $\ast$}]{in,  }\item[{\mbox{\hyperlink{structGstTensorsConfig}{Gst\+Tensors\+Config}} $\ast$}]{config }\end{DoxyParamCaption})}



Configure gst-\/buffer with tensors information. N\+N\+Streamer handles single memory chunk as single tensor. If incoming buffer has invalid memories, separate it and generate new gst-\/buffer using tensors information. Note that this function always takes the ownership of input buffer. 


\begin{DoxyParams}{Parameters}
{\em in} & input buffer \\
\hline
{\em config} & tensors config structure \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Newly allocated buffer. Null if failed. Caller should unref the buffer using gst\+\_\+buffer\+\_\+unref(). 
\end{DoxyReturn}


Definition at line 535 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a54f7006af0c8207c9b478412b69626db_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a54f7006af0c8207c9b478412b69626db_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_ab23cc571aa1b9cf9c3a5a45839c43443}\label{tensor__common_8h_ab23cc571aa1b9cf9c3a5a45839c43443}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_pad\_caps\_from\_config@{gst\_tensor\_pad\_caps\_from\_config}}
\index{gst\_tensor\_pad\_caps\_from\_config@{gst\_tensor\_pad\_caps\_from\_config}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_pad\_caps\_from\_config()}{gst\_tensor\_pad\_caps\_from\_config()}}
{\footnotesize\ttfamily Gst\+Caps$\ast$ gst\+\_\+tensor\+\_\+pad\+\_\+caps\+\_\+from\+\_\+config (\begin{DoxyParamCaption}\item[{Gst\+Pad $\ast$}]{pad,  }\item[{const \mbox{\hyperlink{structGstTensorsConfig}{Gst\+Tensors\+Config}} $\ast$}]{config }\end{DoxyParamCaption})}



Get pad caps from tensors config and caps of the peer connected to the pad. 


\begin{DoxyParams}{Parameters}
{\em pad} & Gst\+Pad to get possible caps \\
\hline
{\em config} & tensors config structure \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
caps for given config. Caller is responsible for unreffing the returned caps. 
\end{DoxyReturn}


Definition at line 1209 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_ab23cc571aa1b9cf9c3a5a45839c43443_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_ab23cc571aa1b9cf9c3a5a45839c43443_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_a459532128566b3e6099bff9c566edf71}\label{tensor__common_8h_a459532128566b3e6099bff9c566edf71}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_pad\_get\_format@{gst\_tensor\_pad\_get\_format}}
\index{gst\_tensor\_pad\_get\_format@{gst\_tensor\_pad\_get\_format}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_pad\_get\_format()}{gst\_tensor\_pad\_get\_format()}}
{\footnotesize\ttfamily \mbox{\hyperlink{tensor__typedef_8h_a8f63561cff18618282cb7e0dd1f8ac96}{tensor\+\_\+format}} gst\+\_\+tensor\+\_\+pad\+\_\+get\+\_\+format (\begin{DoxyParamCaption}\item[{Gst\+Pad $\ast$}]{pad }\end{DoxyParamCaption})}



Get tensor format of current pad caps. 


\begin{DoxyParams}{Parameters}
{\em pad} & Gst\+Pad to check current caps. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The tensor\+\_\+format of current pad caps.
\end{DoxyReturn}
If pad does not have tensor caps return \+\_\+\+N\+N\+S\+\_\+\+T\+E\+N\+S\+O\+R\+\_\+\+F\+O\+R\+M\+A\+T\+\_\+\+E\+ND 

Definition at line 1343 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a459532128566b3e6099bff9c566edf71_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_a2d8353ac248e4c5eaa656221e00710bb}\label{tensor__common_8h_a2d8353ac248e4c5eaa656221e00710bb}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_pad\_possible\_caps\_from\_config@{gst\_tensor\_pad\_possible\_caps\_from\_config}}
\index{gst\_tensor\_pad\_possible\_caps\_from\_config@{gst\_tensor\_pad\_possible\_caps\_from\_config}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_pad\_possible\_caps\_from\_config()}{gst\_tensor\_pad\_possible\_caps\_from\_config()}}
{\footnotesize\ttfamily Gst\+Caps$\ast$ gst\+\_\+tensor\+\_\+pad\+\_\+possible\+\_\+caps\+\_\+from\+\_\+config (\begin{DoxyParamCaption}\item[{Gst\+Pad $\ast$}]{pad,  }\item[{const \mbox{\hyperlink{structGstTensorsConfig}{Gst\+Tensors\+Config}} $\ast$}]{config }\end{DoxyParamCaption})}



Get all possible caps from tensors config. Unlike \mbox{\hyperlink{tensor__common_8h_ab23cc571aa1b9cf9c3a5a45839c43443}{gst\+\_\+tensor\+\_\+pad\+\_\+caps\+\_\+from\+\_\+config()}}, this function does not check peer caps. 


\begin{DoxyParams}{Parameters}
{\em pad} & Gst\+Pad to get possible caps \\
\hline
{\em config} & tensors config structure \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
caps for given config. Caller is responsible for unreffing the returned caps. 
\end{DoxyReturn}


Definition at line 1286 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a2d8353ac248e4c5eaa656221e00710bb_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a2d8353ac248e4c5eaa656221e00710bb_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_a474f4499274fb0856c809a59e154df96}\label{tensor__common_8h_a474f4499274fb0856c809a59e154df96}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_parse\_config\_file@{gst\_tensor\_parse\_config\_file}}
\index{gst\_tensor\_parse\_config\_file@{gst\_tensor\_parse\_config\_file}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_parse\_config\_file()}{gst\_tensor\_parse\_config\_file()}}
{\footnotesize\ttfamily void gst\+\_\+tensor\+\_\+parse\+\_\+config\+\_\+file (\begin{DoxyParamCaption}\item[{const gchar $\ast$}]{config\+\_\+path,  }\item[{const G\+Object $\ast$}]{object }\end{DoxyParamCaption})}



Parses a configuration file and sets the corresponding properties on a G\+Object. 

This function reads the contents of the configuration file located at the given path and sets the properties of the specified G\+Object based on the configuration data.


\begin{DoxyParams}{Parameters}
{\em config\+\_\+path} & The path to the configuration file. \\
\hline
{\em object} & The G\+Object on which to set the properties.\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
The responsibility of managing the memory of the G\+Object passed as a parameter lies outside this function. 
\end{DoxyNote}
Iterate over each line

Definition at line 1902 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a474f4499274fb0856c809a59e154df96_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a474f4499274fb0856c809a59e154df96_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_ad1907af6d000f03e56565ef1aebcc00b}\label{tensor__common_8h_ad1907af6d000f03e56565ef1aebcc00b}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_time\_sync\_buffer\_from\_collectpad@{gst\_tensor\_time\_sync\_buffer\_from\_collectpad}}
\index{gst\_tensor\_time\_sync\_buffer\_from\_collectpad@{gst\_tensor\_time\_sync\_buffer\_from\_collectpad}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_time\_sync\_buffer\_from\_collectpad()}{gst\_tensor\_time\_sync\_buffer\_from\_collectpad()}}
{\footnotesize\ttfamily gboolean gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+buffer\+\_\+from\+\_\+collectpad (\begin{DoxyParamCaption}\item[{Gst\+Collect\+Pads $\ast$}]{collect,  }\item[{\mbox{\hyperlink{tensor__common_8h_a88e575b2e6ee5d254fcec6bcac73c76e}{tensor\+\_\+time\+\_\+sync\+\_\+data}} $\ast$}]{sync,  }\item[{Gst\+Clock\+Time}]{current\+\_\+time,  }\item[{Gst\+Buffer $\ast$}]{tensors\+\_\+buf,  }\item[{\mbox{\hyperlink{structGstTensorsConfig}{Gst\+Tensors\+Config}} $\ast$}]{configs,  }\item[{gboolean $\ast$}]{is\+\_\+eos }\end{DoxyParamCaption})}



A function call to make tensors from collected pads It decide which buffer is going to be used according to sync option. 

\begin{DoxyReturn}{Returns}
True to push buffer. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em collect} & Collect pad. \\
\hline
{\em sync} & Synchronization Option (N\+O\+S\+Y\+NC, S\+L\+O\+W\+E\+ST, B\+A\+S\+E\+P\+AD, E\+ND) \\
\hline
{\em current\+\_\+time} & Current Timestamp \\
\hline
{\em tensors\+\_\+buf} & Generated Gst\+Buffer for Collected Buffer \\
\hline
{\em configs} & Configuration Info for Collected Buffer \\
\hline
{\em is\+\_\+eos} & True when E\+OS (end-\/of-\/stream)\\
\hline
\end{DoxyParams}
A function call to make tensors from collected pads It decide which buffer is going to be used according to sync option.

\begin{DoxyReturn}{Returns}
True to push buffer. 
\end{DoxyReturn}
This would be an internal logic error. in\+\_\+configs should be already confirmed valid at the negotiation phase and this function should be called in a running pipeline. If new sync mode is enabled (e.\+g., handle output when a pad gets new buffer), this may cause unexpected exception.

These are internal logic error. If given inputs are incorrect, the negotiation should have been failed before this stage.

Definition at line 332 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_ad1907af6d000f03e56565ef1aebcc00b_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_ad1907af6d000f03e56565ef1aebcc00b_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_a16bbdb4f08da198527c0a14d634ceb4a}\label{tensor__common_8h_a16bbdb4f08da198527c0a14d634ceb4a}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_time\_sync\_flush@{gst\_tensor\_time\_sync\_flush}}
\index{gst\_tensor\_time\_sync\_flush@{gst\_tensor\_time\_sync\_flush}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_time\_sync\_flush()}{gst\_tensor\_time\_sync\_flush()}}
{\footnotesize\ttfamily void gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+flush (\begin{DoxyParamCaption}\item[{Gst\+Collect\+Pads $\ast$}]{collect }\end{DoxyParamCaption})}



A function to be called while processing a flushing event. It should clear old buffer and reset pad data. 


\begin{DoxyParams}{Parameters}
{\em collect} & Collect pad. \\
\hline
\end{DoxyParams}


Definition at line 263 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=268pt]{tensor__common_8h_a16bbdb4f08da198527c0a14d634ceb4a_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a16bbdb4f08da198527c0a14d634ceb4a_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_ac2e54159e49436c16c82af6732e18d14}\label{tensor__common_8h_ac2e54159e49436c16c82af6732e18d14}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_time\_sync\_get\_current\_time@{gst\_tensor\_time\_sync\_get\_current\_time}}
\index{gst\_tensor\_time\_sync\_get\_current\_time@{gst\_tensor\_time\_sync\_get\_current\_time}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_time\_sync\_get\_current\_time()}{gst\_tensor\_time\_sync\_get\_current\_time()}}
{\footnotesize\ttfamily gboolean gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+get\+\_\+current\+\_\+time (\begin{DoxyParamCaption}\item[{Gst\+Collect\+Pads $\ast$}]{collect,  }\item[{\mbox{\hyperlink{tensor__common_8h_a88e575b2e6ee5d254fcec6bcac73c76e}{tensor\+\_\+time\+\_\+sync\+\_\+data}} $\ast$}]{sync,  }\item[{Gst\+Clock\+Time $\ast$}]{current\+\_\+time,  }\item[{Gst\+Buffer $\ast$}]{tensors\+\_\+buf }\end{DoxyParamCaption})}



A function call to decide current timestamp among collected pads based on P\+TS. It will decide current timestamp according to sync option. Gst\+Meta is also copied with same sync mode. 

\begin{DoxyReturn}{Returns}
True / False. If E\+OS, it return T\+R\+UE. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em collect} & Collect pad. \\
\hline
{\em sync} & Synchronization Option (N\+O\+S\+Y\+NC, S\+L\+O\+W\+E\+ST, B\+A\+S\+E\+P\+AD, E\+ND) \\
\hline
{\em current\+\_\+time} & Current time \\
\hline
{\em tensors\+\_\+buf} & Generated Gst\+Buffer for Collected Buffer \\
\hline
\end{DoxyParams}


Definition at line 203 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_ac2e54159e49436c16c82af6732e18d14_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_ac2e54159e49436c16c82af6732e18d14_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_aa9aa55e0fdfc8726d9a3a8c64830b271}\label{tensor__common_8h_aa9aa55e0fdfc8726d9a3a8c64830b271}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_time\_sync\_get\_mode@{gst\_tensor\_time\_sync\_get\_mode}}
\index{gst\_tensor\_time\_sync\_get\_mode@{gst\_tensor\_time\_sync\_get\_mode}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_time\_sync\_get\_mode()}{gst\_tensor\_time\_sync\_get\_mode()}}
{\footnotesize\ttfamily \mbox{\hyperlink{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537}{tensor\+\_\+time\+\_\+sync\+\_\+mode}} gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+get\+\_\+mode (\begin{DoxyParamCaption}\item[{const gchar $\ast$}]{str }\end{DoxyParamCaption})}



Get the corresponding mode from the string value. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em str} & The string value for the mode. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Corresponding mode for the string. S\+Y\+N\+C\+\_\+\+E\+ND for errors. 
\end{DoxyReturn}


Definition at line 101 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=320pt]{tensor__common_8h_aa9aa55e0fdfc8726d9a3a8c64830b271_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_aa9aa55e0fdfc8726d9a3a8c64830b271_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_a386be3ccf469c0090f9a51bf911e2172}\label{tensor__common_8h_a386be3ccf469c0090f9a51bf911e2172}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_time\_sync\_get\_mode\_string@{gst\_tensor\_time\_sync\_get\_mode\_string}}
\index{gst\_tensor\_time\_sync\_get\_mode\_string@{gst\_tensor\_time\_sync\_get\_mode\_string}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_time\_sync\_get\_mode\_string()}{gst\_tensor\_time\_sync\_get\_mode\_string()}}
{\footnotesize\ttfamily const gchar$\ast$ gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+get\+\_\+mode\+\_\+string (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__common_8h_a913f607a6cefbdd4fd00f5b3deff6537}{tensor\+\_\+time\+\_\+sync\+\_\+mode}}}]{mode }\end{DoxyParamCaption})}



Get the time-\/sync mode string. 

\begin{DoxyReturn}{Returns}
Corresponding mode string. 
\end{DoxyReturn}


Definition at line 115 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_a386be3ccf469c0090f9a51bf911e2172_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__common_8h_ad53e232ff2dbe2af5d2e21ab81276d56}\label{tensor__common_8h_ad53e232ff2dbe2af5d2e21ab81276d56}} 
\index{tensor\_common.h@{tensor\_common.h}!gst\_tensor\_time\_sync\_set\_option\_data@{gst\_tensor\_time\_sync\_set\_option\_data}}
\index{gst\_tensor\_time\_sync\_set\_option\_data@{gst\_tensor\_time\_sync\_set\_option\_data}!tensor\_common.h@{tensor\_common.h}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_time\_sync\_set\_option\_data()}{gst\_tensor\_time\_sync\_set\_option\_data()}}
{\footnotesize\ttfamily gboolean gst\+\_\+tensor\+\_\+time\+\_\+sync\+\_\+set\+\_\+option\+\_\+data (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__common_8h_a88e575b2e6ee5d254fcec6bcac73c76e}{tensor\+\_\+time\+\_\+sync\+\_\+data}} $\ast$}]{sync }\end{DoxyParamCaption})}



Setup time sync option. 


\begin{DoxyParams}{Parameters}
{\em \mbox{[}in/out\mbox{]}} & filter \char`\"{}this\char`\"{} pointer. Sync mode \& option M\+U\+ST BE set already. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True if successfully set the option. 
\end{DoxyReturn}


Definition at line 126 of file nnstreamer\+\_\+plugin\+\_\+api\+\_\+impl.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__common_8h_ad53e232ff2dbe2af5d2e21ab81276d56_icgraph}
\end{center}
\end{figure}
