(git:6a2e663)
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)    a.data[(i)*a.offsets[0] + (j)*a.offsets[1] + (k)*a.offsets[2] + (l)*a.ld_ + m]
 
#define idx4(a, i, j, k, l)    a.data[(i)*a.offsets[0] + (j)*a.offsets[1] + (k)*a.ld_ + (l)]
 
#define idx3(a, i, j, k)   a.data[(i)*a.offsets[0] + (j)*a.ld_ + (k)]
 
#define idx2(a, i, j)   a.data[(i)*a.ld_ + (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 tensorcreate_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,
 
)     a.data[(i)*a.offsets[0] + (j)*a.offsets[1] + (k)*a.offsets[2] + (l)*a.ld_ + m]

Definition at line 252 of file grid_dgemm_tensor_local.h.

◆ idx4

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

Definition at line 254 of file grid_dgemm_tensor_local.h.

◆ idx3

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

Definition at line 256 of file grid_dgemm_tensor_local.h.

◆ idx2

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

Definition at line 257 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 
)

Definition at line 51 of file grid_dgemm_tensor_local.c.

Here is the caller graph for this function:

◆ initialize_tensor()

static 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()

static 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()

static 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()

static 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()

static 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()

static void destroy_tensor ( tensor a)
inlinestatic

Definition at line 126 of file grid_dgemm_tensor_local.h.

◆ tensor_return_memory_size()

static 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()

static 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()

static int tensor_get_leading_dimension ( struct tensor_ a)
inlinestatic

Definition at line 145 of file grid_dgemm_tensor_local.h.

◆ tensor_set_leading_dimension()

static 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()

static void recompute_tensor_offsets ( struct tensor_ a)
inlinestatic

Definition at line 158 of file grid_dgemm_tensor_local.h.

◆ compute_memory_space_tensor_3()

static 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()

static 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()

static 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()

static 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)

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)

Definition at line 40 of file grid_dgemm_tensor_local.c.

Here is the caller graph for this function: