38 enum e_side from_side, to_side;
40 struct s_ivec ***switch_block_conn = NULL;
46 (nodes_per_chan - 1),
sizeof(
struct s_ivec));
48 for (from_side = (
enum e_side)0; from_side < 4; from_side = (
enum e_side)(from_side + 1)) {
49 for (to_side = (
enum e_side)0; to_side < 4; to_side = (
enum e_side)(to_side + 1)) {
50 for (from_track = 0; from_track < nodes_per_chan; from_track++) {
51 if (from_side != to_side) {
52 switch_block_conn[from_side][to_side][from_track].
nelem = 1;
53 switch_block_conn[from_side][to_side][from_track].
list =
56 switch_block_conn[from_side][to_side][from_track].
list[0] =
58 from_track, switch_block_type,
61 switch_block_conn[from_side][to_side][from_track].
nelem = 0;
62 switch_block_conn[from_side][to_side][from_track].
list =
73 out =
my_fopen(
"switch_block_conn.echo",
"w", 0);
74 for (l = 0; l < 4; ++l) {
75 for (k = 0; k < 4; ++k) {
76 fprintf(out,
"Side %d to %d\n", l, k);
77 for (j = 0; j < nodes_per_chan; ++j) {
78 fprintf(out,
"%d: ", j);
79 for (i = 0; i < switch_block_conn[l][k][j].
nelem; ++i) {
80 fprintf(out,
"%d ", switch_block_conn[l][k][j].
list[i]);
89 return switch_block_conn;
FILE * my_fopen(const char *fname, const char *flag, int prompt)
int get_simple_switch_block_track(INP enum e_side from_side, INP enum e_side to_side, INP int from_track, INP enum e_switch_block_type switch_block_type, INP int nodes_per_chan)
boolean getEchoEnabled(void)
static void * my_malloc(int ibytes)
void *** alloc_matrix3(int nrmin, int nrmax, int ncmin, int ncmax, int ndmin, int ndmax, size_t elsize)