Doxygen Book
tensor_allocator.c File Reference

Allocator for memory alignment. More...

#include <gst/gst.h>
#include "nnstreamer_plugin_api.h"
Include dependency graph for tensor_allocator.c:

Go to the source code of this file.

Classes

struct  GstTensorAllocator
 struct for type GstTensorAllocator More...
 
struct  GstTensorAllocatorClass
 struct for class GstTensorAllocatorClass More...
 

Macros

#define GST_TENSOR_ALLOCATOR   "GstTensorAllocator"
 

Functions

static GType gst_tensor_allocator_get_type (void)
 
 G_DEFINE_TYPE (GstTensorAllocator, gst_tensor_allocator, GST_TYPE_ALLOCATOR)
 
static GstMemory * _alloc (GstAllocator *allocator, gsize size, GstAllocationParams *params)
 allocation wrapper that binds alignment parameter More...
 
static void gst_tensor_allocator_class_init (GstTensorAllocatorClass *klass)
 class initization for GstTensorAllocatorClass More...
 
static void gst_tensor_allocator_init (GstTensorAllocator *allocator)
 initialization for GstTensorAllocator More...
 
void gst_tensor_alloc_init (gsize alignment)
 set alignment that default allocator would align to More...
 

Variables

static gsize gst_tensor_allocator_alignment = 0
 

Detailed Description

Allocator for memory alignment.

Copyright (C) 2021 Junhwan Kim jejud.nosp@m.o.ki.nosp@m.m@sam.nosp@m.sung.nosp@m..com

Date
12 May 2021
Author
Junhwan Kim jejud.nosp@m.o.ki.nosp@m.m@sam.nosp@m.sung.nosp@m..com
See also
http://github.com/nnstreamer/nnstreamer
Bug:
No known bugs

Definition in file tensor_allocator.c.

Macro Definition Documentation

◆ GST_TENSOR_ALLOCATOR

#define GST_TENSOR_ALLOCATOR   "GstTensorAllocator"

Definition at line 17 of file tensor_allocator.c.

Function Documentation

◆ _alloc()

static GstMemory* _alloc ( GstAllocator *  allocator,
gsize  size,
GstAllocationParams *  params 
)
static

allocation wrapper that binds alignment parameter

Definition at line 45 of file tensor_allocator.c.

Here is the caller graph for this function:

◆ G_DEFINE_TYPE()

G_DEFINE_TYPE ( GstTensorAllocator  ,
gst_tensor_allocator  ,
GST_TYPE_ALLOCATOR   
)

◆ gst_tensor_alloc_init()

void gst_tensor_alloc_init ( gsize  alignment)

set alignment that default allocator would align to

Parameters
alignmentbytes of alignment

Definition at line 109 of file tensor_allocator.c.

Here is the call graph for this function:

◆ gst_tensor_allocator_class_init()

static void gst_tensor_allocator_class_init ( GstTensorAllocatorClass klass)
static

class initization for GstTensorAllocatorClass

Definition at line 68 of file tensor_allocator.c.

Here is the call graph for this function:

◆ gst_tensor_allocator_get_type()

static GType gst_tensor_allocator_get_type ( void  )
static
Here is the caller graph for this function:

◆ gst_tensor_allocator_init()

static void gst_tensor_allocator_init ( GstTensorAllocator allocator)
static

initialization for GstTensorAllocator

Definition at line 87 of file tensor_allocator.c.

Variable Documentation

◆ gst_tensor_allocator_alignment

gsize gst_tensor_allocator_alignment = 0
static

Definition at line 19 of file tensor_allocator.c.