\hypertarget{tensor__allocator_8c}{}\doxysection{nnstreamer/tensor\+\_\+allocator.c File Reference}
\label{tensor__allocator_8c}\index{nnstreamer/tensor\_allocator.c@{nnstreamer/tensor\_allocator.c}}


Allocator for memory alignment.  


{\ttfamily \#include $<$gst/gst.\+h$>$}\newline
{\ttfamily \#include \char`\"{}nnstreamer\+\_\+plugin\+\_\+api.\+h\char`\"{}}\newline
Include dependency graph for tensor\+\_\+allocator.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__allocator_8c__incl}
\end{center}
\end{figure}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structGstTensorAllocator}{Gst\+Tensor\+Allocator}}
\begin{DoxyCompactList}\small\item\em struct for type \mbox{\hyperlink{structGstTensorAllocator}{Gst\+Tensor\+Allocator}} \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{structGstTensorAllocatorClass}{Gst\+Tensor\+Allocator\+Class}}
\begin{DoxyCompactList}\small\item\em struct for class \mbox{\hyperlink{structGstTensorAllocatorClass}{Gst\+Tensor\+Allocator\+Class}} \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{tensor__allocator_8c_a87fab4e5cfbeee754d11579d1d384a82}{G\+S\+T\+\_\+\+T\+E\+N\+S\+O\+R\+\_\+\+A\+L\+L\+O\+C\+A\+T\+OR}}~\char`\"{}Gst\+Tensor\+Allocator\char`\"{}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static G\+Type \mbox{\hyperlink{tensor__allocator_8c_ad5f7be5a3d2c11ec6cd3fe7c112fac61}{gst\+\_\+tensor\+\_\+allocator\+\_\+get\+\_\+type}} (void)
\item 
\mbox{\hyperlink{tensor__allocator_8c_a1df436dc98646e6c8f1bb4cb0836efb3}{G\+\_\+\+D\+E\+F\+I\+N\+E\+\_\+\+T\+Y\+PE}} (\mbox{\hyperlink{structGstTensorAllocator}{Gst\+Tensor\+Allocator}}, gst\+\_\+tensor\+\_\+allocator, G\+S\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+A\+L\+L\+O\+C\+A\+T\+OR)
\item 
static Gst\+Memory $\ast$ \mbox{\hyperlink{tensor__allocator_8c_ab5fb3fb3e36b8f27a38749746b213b8a}{\+\_\+alloc}} (Gst\+Allocator $\ast$allocator, gsize size, Gst\+Allocation\+Params $\ast$params)
\begin{DoxyCompactList}\small\item\em allocation wrapper that binds alignment parameter \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__allocator_8c_a902da13dbc269080e0fcd0600548d20e}{gst\+\_\+tensor\+\_\+allocator\+\_\+class\+\_\+init}} (\mbox{\hyperlink{structGstTensorAllocatorClass}{Gst\+Tensor\+Allocator\+Class}} $\ast$klass)
\begin{DoxyCompactList}\small\item\em class initization for \mbox{\hyperlink{structGstTensorAllocatorClass}{Gst\+Tensor\+Allocator\+Class}} \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__allocator_8c_aa3328a54516eea5b0ca68e12ecc2c728}{gst\+\_\+tensor\+\_\+allocator\+\_\+init}} (\mbox{\hyperlink{structGstTensorAllocator}{Gst\+Tensor\+Allocator}} $\ast$allocator)
\begin{DoxyCompactList}\small\item\em initialization for \mbox{\hyperlink{structGstTensorAllocator}{Gst\+Tensor\+Allocator}} \end{DoxyCompactList}\item 
void \mbox{\hyperlink{tensor__allocator_8c_a25e4861db387a899ec1e1743c2cd9f52}{gst\+\_\+tensor\+\_\+alloc\+\_\+init}} (gsize alignment)
\begin{DoxyCompactList}\small\item\em set alignment that default allocator would align to \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static gsize \mbox{\hyperlink{tensor__allocator_8c_a1e04658b382ba4416f20982c8a432fe5}{gst\+\_\+tensor\+\_\+allocator\+\_\+alignment}} = 0
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Allocator for memory alignment. 

Copyright (C) 2021 Junhwan Kim \href{mailto:jejudo.kim@samsung.com}{\texttt{ jejudo.\+kim@samsung.\+com}}

\begin{DoxyDate}{Date}
12 May 2021 
\end{DoxyDate}
\begin{DoxyAuthor}{Author}
Junhwan Kim \href{mailto:jejudo.kim@samsung.com}{\texttt{ jejudo.\+kim@samsung.\+com}} 
\end{DoxyAuthor}
\begin{DoxySeeAlso}{See also}
\href{http://github.com/nnstreamer/nnstreamer}{\texttt{ http\+://github.\+com/nnstreamer/nnstreamer}} 
\end{DoxySeeAlso}
\begin{DoxyRefDesc}{Bug}
\item[\mbox{\hyperlink{bug__bug000099}{Bug}}]No known bugs\end{DoxyRefDesc}


\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{tensor__allocator_8c_a87fab4e5cfbeee754d11579d1d384a82}\label{tensor__allocator_8c_a87fab4e5cfbeee754d11579d1d384a82}} 
\index{tensor\_allocator.c@{tensor\_allocator.c}!GST\_TENSOR\_ALLOCATOR@{GST\_TENSOR\_ALLOCATOR}}
\index{GST\_TENSOR\_ALLOCATOR@{GST\_TENSOR\_ALLOCATOR}!tensor\_allocator.c@{tensor\_allocator.c}}
\doxysubsubsection{\texorpdfstring{GST\_TENSOR\_ALLOCATOR}{GST\_TENSOR\_ALLOCATOR}}
{\footnotesize\ttfamily \#define G\+S\+T\+\_\+\+T\+E\+N\+S\+O\+R\+\_\+\+A\+L\+L\+O\+C\+A\+T\+OR~\char`\"{}Gst\+Tensor\+Allocator\char`\"{}}



Definition at line 17 of file tensor\+\_\+allocator.\+c.



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{tensor__allocator_8c_ab5fb3fb3e36b8f27a38749746b213b8a}\label{tensor__allocator_8c_ab5fb3fb3e36b8f27a38749746b213b8a}} 
\index{tensor\_allocator.c@{tensor\_allocator.c}!\_alloc@{\_alloc}}
\index{\_alloc@{\_alloc}!tensor\_allocator.c@{tensor\_allocator.c}}
\doxysubsubsection{\texorpdfstring{\_alloc()}{\_alloc()}}
{\footnotesize\ttfamily static Gst\+Memory$\ast$ \+\_\+alloc (\begin{DoxyParamCaption}\item[{Gst\+Allocator $\ast$}]{allocator,  }\item[{gsize}]{size,  }\item[{Gst\+Allocation\+Params $\ast$}]{params }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



allocation wrapper that binds alignment parameter 



Definition at line 45 of file tensor\+\_\+allocator.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=277pt]{tensor__allocator_8c_ab5fb3fb3e36b8f27a38749746b213b8a_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__allocator_8c_a1df436dc98646e6c8f1bb4cb0836efb3}\label{tensor__allocator_8c_a1df436dc98646e6c8f1bb4cb0836efb3}} 
\index{tensor\_allocator.c@{tensor\_allocator.c}!G\_DEFINE\_TYPE@{G\_DEFINE\_TYPE}}
\index{G\_DEFINE\_TYPE@{G\_DEFINE\_TYPE}!tensor\_allocator.c@{tensor\_allocator.c}}
\doxysubsubsection{\texorpdfstring{G\_DEFINE\_TYPE()}{G\_DEFINE\_TYPE()}}
{\footnotesize\ttfamily G\+\_\+\+D\+E\+F\+I\+N\+E\+\_\+\+T\+Y\+PE (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structGstTensorAllocator}{Gst\+Tensor\+Allocator}}}]{,  }\item[{gst\+\_\+tensor\+\_\+allocator}]{,  }\item[{G\+S\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+A\+L\+L\+O\+C\+A\+T\+OR}]{ }\end{DoxyParamCaption})}

\mbox{\Hypertarget{tensor__allocator_8c_a25e4861db387a899ec1e1743c2cd9f52}\label{tensor__allocator_8c_a25e4861db387a899ec1e1743c2cd9f52}} 
\index{tensor\_allocator.c@{tensor\_allocator.c}!gst\_tensor\_alloc\_init@{gst\_tensor\_alloc\_init}}
\index{gst\_tensor\_alloc\_init@{gst\_tensor\_alloc\_init}!tensor\_allocator.c@{tensor\_allocator.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_alloc\_init()}{gst\_tensor\_alloc\_init()}}
{\footnotesize\ttfamily void gst\+\_\+tensor\+\_\+alloc\+\_\+init (\begin{DoxyParamCaption}\item[{gsize}]{alignment }\end{DoxyParamCaption})}



set alignment that default allocator would align to 


\begin{DoxyParams}{Parameters}
{\em alignment} & bytes of alignment \\
\hline
\end{DoxyParams}


Definition at line 109 of file tensor\+\_\+allocator.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=349pt]{tensor__allocator_8c_a25e4861db387a899ec1e1743c2cd9f52_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__allocator_8c_a902da13dbc269080e0fcd0600548d20e}\label{tensor__allocator_8c_a902da13dbc269080e0fcd0600548d20e}} 
\index{tensor\_allocator.c@{tensor\_allocator.c}!gst\_tensor\_allocator\_class\_init@{gst\_tensor\_allocator\_class\_init}}
\index{gst\_tensor\_allocator\_class\_init@{gst\_tensor\_allocator\_class\_init}!tensor\_allocator.c@{tensor\_allocator.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_allocator\_class\_init()}{gst\_tensor\_allocator\_class\_init()}}
{\footnotesize\ttfamily static void gst\+\_\+tensor\+\_\+allocator\+\_\+class\+\_\+init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structGstTensorAllocatorClass}{Gst\+Tensor\+Allocator\+Class}} $\ast$}]{klass }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



class initization for \mbox{\hyperlink{structGstTensorAllocatorClass}{Gst\+Tensor\+Allocator\+Class}} 



Definition at line 68 of file tensor\+\_\+allocator.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=277pt]{tensor__allocator_8c_a902da13dbc269080e0fcd0600548d20e_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__allocator_8c_ad5f7be5a3d2c11ec6cd3fe7c112fac61}\label{tensor__allocator_8c_ad5f7be5a3d2c11ec6cd3fe7c112fac61}} 
\index{tensor\_allocator.c@{tensor\_allocator.c}!gst\_tensor\_allocator\_get\_type@{gst\_tensor\_allocator\_get\_type}}
\index{gst\_tensor\_allocator\_get\_type@{gst\_tensor\_allocator\_get\_type}!tensor\_allocator.c@{tensor\_allocator.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_allocator\_get\_type()}{gst\_tensor\_allocator\_get\_type()}}
{\footnotesize\ttfamily static G\+Type gst\+\_\+tensor\+\_\+allocator\+\_\+get\+\_\+type (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=349pt]{tensor__allocator_8c_ad5f7be5a3d2c11ec6cd3fe7c112fac61_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__allocator_8c_aa3328a54516eea5b0ca68e12ecc2c728}\label{tensor__allocator_8c_aa3328a54516eea5b0ca68e12ecc2c728}} 
\index{tensor\_allocator.c@{tensor\_allocator.c}!gst\_tensor\_allocator\_init@{gst\_tensor\_allocator\_init}}
\index{gst\_tensor\_allocator\_init@{gst\_tensor\_allocator\_init}!tensor\_allocator.c@{tensor\_allocator.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_allocator\_init()}{gst\_tensor\_allocator\_init()}}
{\footnotesize\ttfamily static void gst\+\_\+tensor\+\_\+allocator\+\_\+init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structGstTensorAllocator}{Gst\+Tensor\+Allocator}} $\ast$}]{allocator }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



initialization for \mbox{\hyperlink{structGstTensorAllocator}{Gst\+Tensor\+Allocator}} 



Definition at line 87 of file tensor\+\_\+allocator.\+c.



\doxysubsection{Variable Documentation}
\mbox{\Hypertarget{tensor__allocator_8c_a1e04658b382ba4416f20982c8a432fe5}\label{tensor__allocator_8c_a1e04658b382ba4416f20982c8a432fe5}} 
\index{tensor\_allocator.c@{tensor\_allocator.c}!gst\_tensor\_allocator\_alignment@{gst\_tensor\_allocator\_alignment}}
\index{gst\_tensor\_allocator\_alignment@{gst\_tensor\_allocator\_alignment}!tensor\_allocator.c@{tensor\_allocator.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_allocator\_alignment}{gst\_tensor\_allocator\_alignment}}
{\footnotesize\ttfamily gsize gst\+\_\+tensor\+\_\+allocator\+\_\+alignment = 0\hspace{0.3cm}{\ttfamily [static]}}



Definition at line 19 of file tensor\+\_\+allocator.\+c.

