QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 int * squaresize = NULL
 
static int * nsquares = NULL
 
static int ndim
 
static int * size1 [2] = {NULL, NULL}
 
static int * size2 = NULL
 
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 int * mcoord = NULL
 

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 241 of file layout_hyper.c.

References index(), ndim, node_index(), quda::s, size1, size2, squaresize, and this_node.

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 224 of file layout_hyper.c.

References ndim, sites_on_node, and squaresize.

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 214 of file layout_hyper.c.

References mcoord, ndim, and squaresize.

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 292 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 MAXPRIMES, ndim, nsquares, prime, squaresize, and this_node.

Referenced by setup_layout().

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 mcoord, ndim, nsquares, 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 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 ndim, nsquares, and squaresize.

Referenced by setup_layout().

Here is the caller graph for this function:

Variable Documentation

◆ mcoord

int* mcoord = NULL
static

Definition at line 57 of file layout_hyper.c.

Referenced by node_number(), and setup_layout().

◆ ndim

int ndim
static

◆ nsquares

int* nsquares = NULL
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] = {NULL, NULL}
static

Definition at line 54 of file layout_hyper.c.

Referenced by get_coords(), and setup_layout().

◆ size2

int * size2 = NULL
static

Definition at line 54 of file layout_hyper.c.

Referenced by get_coords(), and setup_layout().

◆ squaresize

int* squaresize = NULL
static