CGRA-ME
Macros | Functions
ElasticRIKEN.cpp File Reference
#include <CGRA/Exception.h>
#include <CGRA/user-inc/UserArchs.h>
#include <CGRA/user-inc/UserModules.h>
#include <vector>

Go to the source code of this file.

Macros

#define has_input_from_N(conn)   (conn & 0b00000001)
 
#define has_input_from_E(conn)   (conn & 0b00000010)
 
#define has_input_from_S(conn)   (conn & 0b00000100)
 
#define has_input_from_W(conn)   (conn & 0b00001000)
 
#define has_input_from_NW(conn)   (conn & 0b00010000)
 
#define has_input_from_NE(conn)   (conn & 0b00100000)
 
#define has_input_from_SE(conn)   (conn & 0b01000000)
 
#define has_input_from_SW(conn)   (conn & 0b10000000)
 
#define is_top_pe(r, c, rows, cols)   (r == 0)
 
#define is_bot_pe(r, c, rows, cols)   (r == rows-1)
 
#define is_leftmost_pe(r, c, rows, cols)   (c == 0)
 
#define is_rightmost_pe(r, c, rows, cols)   (c == cols-1)
 
#define mask_top_pe(conn)   ((conn & 0b11001111) | 0b00000001)
 
#define mask_bot_pe(conn)   ((conn & 0b00111111) | 0b00000100)
 
#define mask_leftmost_pe(conn)   ((conn & 0b01101111) | 0b00001000)
 
#define mask_rightmost_pe(conn)   ((conn & 0b10011111) | 0b00000010)
 

Functions

int RIKENelasticleftshift2 (int val)
 
void RIKENelasticFillPEConnArray (std::vector< std::vector< std::vector< int > > > &pcv, int pe_conn_orig, int rows, int cols)
 

Macro Definition Documentation

◆ has_input_from_E

#define has_input_from_E (   conn)    (conn & 0b00000010)

Definition at line 18 of file ElasticRIKEN.cpp.

◆ has_input_from_N

#define has_input_from_N (   conn)    (conn & 0b00000001)

Definition at line 17 of file ElasticRIKEN.cpp.

◆ has_input_from_NE

#define has_input_from_NE (   conn)    (conn & 0b00100000)

Definition at line 22 of file ElasticRIKEN.cpp.

◆ has_input_from_NW

#define has_input_from_NW (   conn)    (conn & 0b00010000)

Definition at line 21 of file ElasticRIKEN.cpp.

◆ has_input_from_S

#define has_input_from_S (   conn)    (conn & 0b00000100)

Definition at line 19 of file ElasticRIKEN.cpp.

◆ has_input_from_SE

#define has_input_from_SE (   conn)    (conn & 0b01000000)

Definition at line 23 of file ElasticRIKEN.cpp.

◆ has_input_from_SW

#define has_input_from_SW (   conn)    (conn & 0b10000000)

Definition at line 24 of file ElasticRIKEN.cpp.

◆ has_input_from_W

#define has_input_from_W (   conn)    (conn & 0b00001000)

Definition at line 20 of file ElasticRIKEN.cpp.

◆ is_bot_pe

#define is_bot_pe (   r,
  c,
  rows,
  cols 
)    (r == rows-1)

Definition at line 28 of file ElasticRIKEN.cpp.

◆ is_leftmost_pe

#define is_leftmost_pe (   r,
  c,
  rows,
  cols 
)    (c == 0)

Definition at line 29 of file ElasticRIKEN.cpp.

◆ is_rightmost_pe

#define is_rightmost_pe (   r,
  c,
  rows,
  cols 
)    (c == cols-1)

Definition at line 30 of file ElasticRIKEN.cpp.

◆ is_top_pe

#define is_top_pe (   r,
  c,
  rows,
  cols 
)    (r == 0)

Definition at line 27 of file ElasticRIKEN.cpp.

◆ mask_bot_pe

#define mask_bot_pe (   conn)    ((conn & 0b00111111) | 0b00000100)

Definition at line 34 of file ElasticRIKEN.cpp.

◆ mask_leftmost_pe

#define mask_leftmost_pe (   conn)    ((conn & 0b01101111) | 0b00001000)

Definition at line 35 of file ElasticRIKEN.cpp.

◆ mask_rightmost_pe

#define mask_rightmost_pe (   conn)    ((conn & 0b10011111) | 0b00000010)

Definition at line 36 of file ElasticRIKEN.cpp.

◆ mask_top_pe

#define mask_top_pe (   conn)    ((conn & 0b11001111) | 0b00000001)

Definition at line 33 of file ElasticRIKEN.cpp.

Function Documentation

◆ RIKENelasticFillPEConnArray()

void RIKENelasticFillPEConnArray ( std::vector< std::vector< std::vector< int > > > &  pcv,
int  pe_conn_orig,
int  rows,
int  cols 
)

Definition at line 46 of file ElasticRIKEN.cpp.

◆ RIKENelasticleftshift2()

int RIKENelasticleftshift2 ( int  val)

Definition at line 38 of file ElasticRIKEN.cpp.