Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
sym_seq_sum.cxx File Reference
#include "../shared/iter_tsr.h"
#include "../shared/util.h"
#include <limits.h>
#include "sym_seq_sum.h"
Include dependency graph for sym_seq_sum.cxx:

Go to the source code of this file.

Namespaces

 CTF_int
 

Macros

#define SCAL_B
 
#define SCAL_B_inr
 

Functions

template<int idim>
void CTF_int::sym_seq_sum_loop (char const *alpha, char const *A, algstrct const *sr_A, int order_A, int const *edge_len_A, int const *sym_A, int const *idx_map_A, uint64_t *const *offsets_A, char *B, algstrct const *sr_B, int order_B, int const *edge_len_B, int const *sym_B, int const *idx_map_B, uint64_t *const *offsets_B, univar_function const *func, int const *idx, int const *rev_idx_map, int idx_max)
 
template<>
void CTF_int::sym_seq_sum_loop< 0 > (char const *alpha, char const *A, algstrct const *sr_A, int order_A, int const *edge_len_A, int const *sym_A, int const *idx_map_A, uint64_t *const *offsets_A, char *B, algstrct const *sr_B, int order_B, int const *edge_len_B, int const *sym_B, int const *idx_map_B, uint64_t *const *offsets_B, univar_function const *func, int const *idx, int const *rev_idx_map, int idx_max)
 
template void CTF_int::sym_seq_sum_loop< MAX_ORD > (char const *alpha, char const *A, algstrct const *sr_A, int order_A, int const *edge_len_A, int const *sym_A, int const *idx_map_A, uint64_t *const *offsets_A, char *B, algstrct const *sr_B, int order_B, int const *edge_len_B, int const *sym_B, int const *idx_map_B, uint64_t *const *offsets_B, univar_function const *func, int const *idx, int const *rev_idx_map, int idx_max)
 
void CTF_int::compute_syoffs (algstrct const *sr_A, int order_A, int const *edge_len_A, int const *sym_A, int const *idx_map_A, algstrct const *sr_B, int order_B, int const *edge_len_B, int const *sym_B, int const *idx_map_B, int tot_order, int const *rev_idx_map, uint64_t **&offsets_A, uint64_t **&offsets_B)
 
int CTF_int::sym_seq_sum_ref (char const *alpha, char const *A, algstrct const *sr_A, int order_A, int const *edge_len_A, int const *sym_A, int const *idx_map_A, char const *beta, char *B, algstrct const *sr_B, int order_B, int const *edge_len_B, int const *sym_B, int const *idx_map_B)
 performs symmetric contraction with unblocked reference kernel More...
 
int CTF_int::sym_seq_sum_inr (char const *alpha, char const *A, algstrct const *sr_A, int order_A, int const *edge_len_A, int const *sym_A, int const *idx_map_A, char const *beta, char *B, algstrct const *sr_B, int order_B, int const *edge_len_B, int const *sym_B, int const *idx_map_B, int inr_stride)
 performs symmetric summation with blocked daxpy More...
 
int CTF_int::sym_seq_sum_cust (char const *alpha, char const *A, algstrct const *sr_A, int order_A, int const *edge_len_A, int const *sym_A, int const *idx_map_A, char const *beta, char *B, algstrct const *sr_B, int order_B, int const *edge_len_B, int const *sym_B, int const *idx_map_B, univar_function const *func)
 performs symmetric summation with custom elementwise function More...
 

Macro Definition Documentation

#define SCAL_B
Value:
do { \
if (!sr_B->isequal(beta, sr_B->mulid())){ \
memset(idx_glb, 0, sizeof(int)*idx_max); \
idx_A = 0, idx_B = 0; \
sym_pass = 1; \
for (;;){ \
if (sym_pass){ \
sr_B->mul(beta, B+idx_B*sr_B->el_size, B+idx_B*sr_B->el_size); \
CTF_FLOPS_ADD(1); \
} \
for (idx=0; idx<idx_max; idx++){ \
imin = 0, imax = INT_MAX; \
GET_MIN_MAX(B,1,2); \
if (rev_idx_map[2*idx+1] == -1) imax = imin+1; \
idx_glb[idx]++; \
if (idx_glb[idx] >= imax){ \
idx_glb[idx] = imin; \
} \
if (idx_glb[idx] != imin) { \
break; \
} \
} \
if (idx == idx_max) break; \
CHECK_SYM(B); \
if (!sym_pass) continue; \
if (order_B > 0) \
RESET_IDX(B); \
} \
} } while (0)
#define RESET_IDX(__X)
Definition: iter_tsr.h:67
#define CHECK_SYM(__X)
Definition: iter_tsr.h:52

Definition at line 231 of file sym_seq_sum.cxx.

Referenced by CTF_int::sym_seq_sum_cust(), and CTF_int::sym_seq_sum_ref().

#define SCAL_B_inr
Value:
do { \
if (!sr_B->isequal(beta, sr_B->mulid())){ \
memset(idx_glb, 0, sizeof(int)*idx_max); \
idx_A = 0, idx_B = 0; \
sym_pass = 1; \
for (;;){ \
if (sym_pass){ \
sr_B->scal(inr_stride, beta, B+idx_B*inr_stride*sr_B->el_size, 1); \
CTF_FLOPS_ADD(inr_stride); \
} \
for (idx=0; idx<idx_max; idx++){ \
imin = 0, imax = INT_MAX; \
GET_MIN_MAX(B,1,2); \
if (rev_idx_map[2*idx+1] == -1) imax = imin+1; \
idx_glb[idx]++; \
if (idx_glb[idx] >= imax){ \
idx_glb[idx] = imin; \
} \
if (idx_glb[idx] != imin) { \
break; \
} \
} \
if (idx == idx_max) break; \
CHECK_SYM(B); \
if (!sym_pass) continue; \
if (order_B > 0) \
RESET_IDX(B); \
} \
} } while (0)
#define RESET_IDX(__X)
Definition: iter_tsr.h:67
#define CHECK_SYM(__X)
Definition: iter_tsr.h:52

Definition at line 262 of file sym_seq_sum.cxx.

Referenced by CTF_int::sym_seq_sum_inr().