QUDA  0.9.0
Macros | Functions | Variables
layout_hyper.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <qmp.h>
#include <layout_hyper.h>
Include dependency graph for layout_hyper.c:

Go to the source code of this file.

Macros

#define MAXPRIMES   (sizeof(prime)/sizeof(int))
 

Functions

static void setup_qmp_fixed (int len[], int nd, int numnodes)
 
static void setup_qmp_grid (int len[], int nd, int numnodes)
 
static void setup_hyper_prime (int len[], int nd, int numnodes)
 
int setup_layout (int len[], int nd, int numnodes)
 
int node_number (const int x[])
 
int node_index (const int x[])
 
void get_coords (int x[], int node, int index)
 
int num_sites (int node)
 

Variables

static intsquaresize
 
static intnsquares
 
static int ndim
 
static intsize1 [2]
 
static intsize2
 
static int prime [] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53}
 
static int sites_on_node
 
static intmcoord
 

Macro Definition Documentation

◆ MAXPRIMES

#define MAXPRIMES   (sizeof(prime)/sizeof(int))

Definition at line 59 of file layout_hyper.c.

Referenced by setup_hyper_prime().

Function Documentation

◆ get_coords()

void get_coords ( int  x[],
int  node,
int  index 
)

Definition at line 232 of file layout_hyper.c.

References exit(), fprintf(), free(), fused_exterior_ndeg_tm_dslash_cuda_gen::i, index(), ndim, node_index(), s, size1, size2, squaresize, this_node, and x.

Referenced by set_layout().

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

◆ node_index()

int node_index ( const int  x[])

Definition at line 215 of file layout_hyper.c.

References fused_exterior_ndeg_tm_dslash_cuda_gen::i, ndim, p, sites_on_node, squaresize, and x.

Referenced by get_coords(), set_layout(), and vset_M().

Here is the caller graph for this function:

◆ node_number()

int node_number ( const int  x[])

Definition at line 205 of file layout_hyper.c.

References fused_exterior_ndeg_tm_dslash_cuda_gen::i, mcoord, ndim, squaresize, and x.

Referenced by set_layout(), and vset_M().

Here is the caller graph for this function:

◆ num_sites()

int num_sites ( int  node)

Definition at line 283 of file layout_hyper.c.

References sites_on_node.

Referenced by set_layout(), vcompare_M(), and vcreate_M().

Here is the caller graph for this function:

◆ setup_hyper_prime()

static void setup_hyper_prime ( int  len[],
int  nd,
int  numnodes 
)
static

Definition at line 102 of file layout_hyper.c.

References exit(), fprintf(), fused_exterior_ndeg_tm_dslash_cuda_gen::i, len, MAXPRIMES, n, ndim, nsquares, prime, squaresize, and this_node.

Referenced by setup_layout().

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

◆ setup_layout()

int setup_layout ( int  len[],
int  nd,
int  numnodes 
)

Definition at line 150 of file layout_hyper.c.

References fused_exterior_ndeg_tm_dslash_cuda_gen::i, int, len, malloc(), mcoord, ndim, nsquares, printf(), setup_hyper_prime(), setup_qmp_fixed(), setup_qmp_grid(), sites_on_node, size1, size2, and squaresize.

Referenced by set_layout().

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

◆ setup_qmp_fixed()

static void setup_qmp_fixed ( int  len[],
int  nd,
int  numnodes 
)
static

Definition at line 62 of file layout_hyper.c.

References fused_exterior_ndeg_tm_dslash_cuda_gen::i, len, ndim, nsquares, and squaresize.

Referenced by setup_layout().

Here is the caller graph for this function:

◆ setup_qmp_grid()

static void setup_qmp_grid ( int  len[],
int  nd,
int  numnodes 
)
static

Definition at line 82 of file layout_hyper.c.

References fused_exterior_ndeg_tm_dslash_cuda_gen::i, len, ndim, nsquares, printf(), and squaresize.

Referenced by setup_layout().

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

Variable Documentation

◆ mcoord

int* mcoord
static

Definition at line 57 of file layout_hyper.c.

Referenced by node_number(), and setup_layout().

◆ ndim

int ndim
static

◆ nsquares

int* nsquares
static

Definition at line 52 of file layout_hyper.c.

Referenced by setup_hyper_prime(), setup_layout(), setup_qmp_fixed(), and setup_qmp_grid().

◆ prime

int prime[] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53}
static

Definition at line 55 of file layout_hyper.c.

Referenced by setup_hyper_prime().

◆ sites_on_node

int sites_on_node
static

◆ size1

int* size1[2]
static

Definition at line 54 of file layout_hyper.c.

Referenced by get_coords(), and setup_layout().

◆ size2

int * size2
static

Definition at line 54 of file layout_hyper.c.

Referenced by get_coords(), and setup_layout().

◆ squaresize

int* squaresize
static