Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
scaling.h
Go to the documentation of this file.
1 #ifndef __INT_SCALING_H__
2 #define __INT_SCALING_H__
3 
4 #include "../interface/common.h"
5 #include "sym_seq_scl.h"
6 
7 namespace CTF_int {
8  class tensor;
9  class endomorphism;
10 
14  class scaling {
15  public:
17  tensor * A;
18 
20  char const * alpha;
21 
23  int * idx_map;
24 
26  bool is_custom;
27 
29  endomorphism const * func;
30 
38  scaling(tensor * A,
39  int const * idx_map,
40  char const * alpha);
41  scaling(tensor * A,
42  char const * idx_map,
43  char const * alpha);
44 
54  scaling(tensor * A,
55  int const * idx_map,
56  char const * alpha,
57  endomorphism const * func);
58  scaling(tensor * A,
59  char const * idx_map,
60  char const * alpha,
61  endomorphism const * func);
62 
64  ~scaling();
65 
67  int execute();
68 
70  double estimate_time();
71 
75  void sp_scl();
76  };
77 
78 }
79 
80 #endif
untyped internal class for singly-typed single variable function (Endomorphism)
Definition: sym_seq_scl.h:12
scaling(tensor *A, int const *idx_map, char const *alpha)
constructor definining contraction with C's mul and add ops
Definition: scaling.cxx:14
endomorphism const * func
function to execute on elementwise elements
Definition: scaling.h:29
int endomorphism(int n, World &dw)
class for execution distributed scaling of a tensor
Definition: scaling.h:14
~scaling()
destructor
Definition: scaling.cxx:60
tensor * A
operand/output
Definition: scaling.h:17
char const * alpha
scaling of A
Definition: scaling.h:20
void sp_scl()
scales a sparse tensor
Definition: scaling.cxx:347
int * idx_map
indices of A
Definition: scaling.h:23
double estimate_time()
predicts execution time in seconds using performance models
internal distributed tensor class
int execute()
run scaling
Definition: scaling.cxx:64
bool is_custom
whether there is a elementwise custom function
Definition: scaling.h:26