10#ifndef __SOF_MATH_MATRIX_H__
11#define __SOF_MATH_MATRIX_H__
15#include <ipc/topology.h>
64 size_t bytes =
sizeof(int16_t) * mat->
rows * mat->
columns;
74 for (i = 0; i < n; i++)
static void * mod_zalloc(struct processing_module *mod, size_t size)
Definition generic.h:234
void * rzalloc(uint32_t flags, size_t bytes)
Similar to rmalloc(), guarantees that returned block is zeroed.
#define SOF_MEM_FLAG_USER
Allocate user memory address.
Definition alloc.h:45
int mat_multiply(struct mat_matrix_16b *a, struct mat_matrix_16b *b, struct mat_matrix_16b *c)
static void mat_set_scalar_16b(struct mat_matrix_16b *mat, int row, int col, int16_t val)
Definition matrix.h:83
static int16_t * mat_get_row_vector_16b(struct mat_matrix_16b *mat, int row)
Definition matrix.h:88
static void mat_copy_from_linear_16b(struct mat_matrix_16b *mat, const int16_t *lin_data)
Definition matrix.h:62
static void mat_init_16b(struct mat_matrix_16b *mat, int16_t rows, int16_t columns, int16_t fractions)
Definition matrix.h:27
static struct mat_matrix_16b * mat_matrix_alloc_16b(int16_t rows, int16_t columns, int16_t fractions)
Definition matrix.h:35
int mat_multiply_elementwise(struct mat_matrix_16b *a, struct mat_matrix_16b *b, struct mat_matrix_16b *c)
static void mat_set_all_16b(struct mat_matrix_16b *mat, int16_t val)
Definition matrix.h:69
static struct mat_matrix_16b * mod_mat_matrix_alloc_16b(struct processing_module *mod, int16_t rows, int16_t columns, int16_t fractions)
Definition matrix.h:48
static int16_t mat_get_scalar_16b(struct mat_matrix_16b *mat, int row, int col)
Definition matrix.h:78
static int memcpy_s(void *dest, size_t dest_size, const void *src, size_t count)
Definition string.h:38
int16_t rows
Definition matrix.h:20
int16_t data[]
Definition matrix.h:24
int16_t reserved
Definition matrix.h:23
int16_t columns
Definition matrix.h:21
int16_t fractions
Definition matrix.h:22