(git:2c0d679)
Loading...
Searching...
No Matches
grid_dgemm_tensor_local.h File Reference
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

Go to the source code of this file.

Data Structures

struct  tensor_

Macros

#define idx5(a, i, j, k, l, m)
#define idx4(a, i, j, k, l)
#define idx3(a, i, j, k)
#define idx2(a, i, j)

Typedefs

typedef struct tensor_ tensor

Functions

void tensor_copy (tensor *const b, const tensor *const a)
static void initialize_tensor (struct tensor_ *a, const int dim, const int *const sizes)
static void initialize_tensor_2 (struct tensor_ *a, int n1, int n2)
static void initialize_tensor_3 (struct tensor_ *a, int n1, int n2, int n3)
static void initialize_tensor_4 (struct tensor_ *a, int n1, int n2, int n3, int n4)
static tensor * create_tensor (const int dim, const int *sizes)
static void destroy_tensor (tensor *a)
static size_t tensor_return_memory_size (const struct tensor_ *const a)
static void tensor_assign_memory (struct tensor_ *a, void *data)
static int tensor_get_leading_dimension (struct tensor_ *a)
static void tensor_set_leading_dimension (struct tensor_ *a, const int ld)
static void recompute_tensor_offsets (struct tensor_ *a)
static size_t compute_memory_space_tensor_3 (const int n1, const int n2, const int n3)
static size_t compute_memory_space_tensor_4 (const int n1, const int n2, const int n3, const int n4)
static void setup_global_grid_size (tensor *const grid, const int *const full_size)
static void setup_grid_window (tensor *const grid, const int *const shift_local, const int *const border_width, const int border_mask)
size_t realloc_tensor (tensor *t)
void alloc_tensor (tensor *t)

Macro Definition Documentation

◆ idx5

#define idx5 ( a,
i,
j,
k,
l,
m )
Value:
a.data[(i) * a.offsets[0] + (j) * a.offsets[1] + (k) * a.offsets[2] + \
(l) * a.ld_ + m]
static void const int const int i

Definition at line 252 of file grid_dgemm_tensor_local.h.

◆ idx4

#define idx4 ( a,
i,
j,
k,
l )
Value:
a.data[(i) * a.offsets[0] + (j) * a.offsets[1] + (k) * a.ld_ + (l)]

Definition at line 255 of file grid_dgemm_tensor_local.h.

◆ idx3

#define idx3 ( a,
i,
j,
k )
Value:
a.data[(i) * a.offsets[0] + (j) * a.ld_ + (k)]

Definition at line 257 of file grid_dgemm_tensor_local.h.

◆ idx2

#define idx2 ( a,
i,
j )
Value:
a.data[(i) * a.ld_ + (j)]

Definition at line 258 of file grid_dgemm_tensor_local.h.

Typedef Documentation

◆ tensor

typedef struct tensor_ tensor

Function Documentation

◆ tensor_copy()

void tensor_copy ( tensor *const b,
const tensor *const a )
extern

Definition at line 47 of file grid_dgemm_tensor_local.c.

Here is the caller graph for this function:

◆ initialize_tensor()

void initialize_tensor ( struct tensor_ * a,
const int dim,
const int *const sizes )
inlinestatic

Definition at line 45 of file grid_dgemm_tensor_local.h.

Here is the caller graph for this function:

◆ initialize_tensor_2()

void initialize_tensor_2 ( struct tensor_ * a,
int n1,
int n2 )
inlinestatic

Definition at line 81 of file grid_dgemm_tensor_local.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize_tensor_3()

void initialize_tensor_3 ( struct tensor_ * a,
int n1,
int n2,
int n3 )
inlinestatic

Definition at line 91 of file grid_dgemm_tensor_local.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize_tensor_4()

void initialize_tensor_4 ( struct tensor_ * a,
int n1,
int n2,
int n3,
int n4 )
inlinestatic

Definition at line 101 of file grid_dgemm_tensor_local.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_tensor()

tensor * create_tensor ( const int dim,
const int * sizes )
inlinestatic

Definition at line 111 of file grid_dgemm_tensor_local.h.

Here is the call graph for this function:

◆ destroy_tensor()

void destroy_tensor ( tensor * a)
inlinestatic

Definition at line 126 of file grid_dgemm_tensor_local.h.

◆ tensor_return_memory_size()

size_t tensor_return_memory_size ( const struct tensor_ *const a)
inlinestatic

Definition at line 132 of file grid_dgemm_tensor_local.h.

◆ tensor_assign_memory()

void tensor_assign_memory ( struct tensor_ * a,
void * data )
inlinestatic

Definition at line 139 of file grid_dgemm_tensor_local.h.

◆ tensor_get_leading_dimension()

int tensor_get_leading_dimension ( struct tensor_ * a)
inlinestatic

Definition at line 145 of file grid_dgemm_tensor_local.h.

◆ tensor_set_leading_dimension()

void tensor_set_leading_dimension ( struct tensor_ * a,
const int ld )
inlinestatic

Definition at line 151 of file grid_dgemm_tensor_local.h.

◆ recompute_tensor_offsets()

void recompute_tensor_offsets ( struct tensor_ * a)
inlinestatic

Definition at line 158 of file grid_dgemm_tensor_local.h.

◆ compute_memory_space_tensor_3()

size_t compute_memory_space_tensor_3 ( const int n1,
const int n2,
const int n3 )
inlinestatic

Definition at line 188 of file grid_dgemm_tensor_local.h.

Here is the caller graph for this function:

◆ compute_memory_space_tensor_4()

size_t compute_memory_space_tensor_4 ( const int n1,
const int n2,
const int n3,
const int n4 )
inlinestatic

Definition at line 193 of file grid_dgemm_tensor_local.h.

Here is the caller graph for this function:

◆ setup_global_grid_size()

void setup_global_grid_size ( tensor *const grid,
const int *const full_size )
inlinestatic

Definition at line 198 of file grid_dgemm_tensor_local.h.

Here is the caller graph for this function:

◆ setup_grid_window()

void setup_grid_window ( tensor *const grid,
const int *const shift_local,
const int *const border_width,
const int border_mask )
inlinestatic

Definition at line 220 of file grid_dgemm_tensor_local.h.

Here is the caller graph for this function:

◆ realloc_tensor()

size_t realloc_tensor ( tensor * t)
extern

Definition at line 12 of file grid_dgemm_tensor_local.c.

Here is the caller graph for this function:

◆ alloc_tensor()

void alloc_tensor ( tensor * t)
extern

Definition at line 39 of file grid_dgemm_tensor_local.c.

Here is the caller graph for this function: