SST/macro
blas_api.h
Go to the documentation of this file.
1 #ifndef sstmac_software_libraries_socketapiS_H
2 #define sstmac_software_libraries_socketapiS_H
3 
9 
10 DeclareDebugSlot(blas);
11 
12 namespace sstmac {
13 namespace sw {
14 
15 class blas_kernel :
17 {
18  public:
19  virtual std::string
20  to_string() const = 0;
21 
22  virtual compute_event*
23  op_3d(int m, int k, int n);
24 
25  virtual compute_event*
26  op_2d(int m, int n);
27 
28  virtual compute_event*
29  op_1d(int n);
30 
31 };
33 
34 
35 class blas_api :
36  public api
37 {
39 
40  public:
41  blas_api(software_id sid);
42 
43  virtual ~blas_api();
44 
45  virtual void
46  init_os(operating_system* os);
47 
48  virtual void
49  init_factory_params(sprockit::sim_parameters* params);
50 
51  virtual void
52  finalize_init();
53 
54  /**
55  A(m,n) * B(n,k) = C(m,k)
56  */
57  void
58  dgemm(int m, int n, int k);
59 
60  /**
61  A(m,n) * X(n) = B(m)
62  */
63  void
64  dgemv(int m, int n);
65 
66  void
67  daxpy(int n);
68 
69  void
70  ddot(int n);
71 
72  void
75  }
76 
77  protected:
78  void init_kernels(sprockit::sim_parameters* params);
79 
80  protected:
82 
84 
89 
90 };
91 
92 
93 }
94 } //end of namespace sstmac
95 
96 #endif // socketapiS_H
97 
Input for processor models that use performance counter data.
Definition: compute_event.h:34
virtual compute_event * op_1d(int n)
lib_compute_inst * lib_compute_
Definition: blas_api.h:81
#define ImplementAPI(x)
Definition: api.h:130
virtual void incoming_event(event *ev)=0
virtual void finalize_init()
Definition: factory.h:34
virtual std::string to_string() const =0
#define daxpy
Definition: blas.h:7
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
virtual compute_event * op_3d(int m, int k, int n)
static blas_kernel * daxpy_kernel_
Definition: blas_api.h:88
DeclareFactory(blas_kernel)
#define dgemm
Definition: blas.h:5
virtual void init_factory_params(sim_parameters *params)
Definition: factory.h:30
#define dgemv
Definition: blas.h:6
DeclareDebugSlot(blas)
static blas_kernel * dgemm_kernel_
Definition: blas_api.h:86
static blas_kernel * dgemv_kernel_
Definition: blas_api.h:87
software_id id_
Definition: blas_api.h:83
static blas_kernel * ddot_kernel_
Definition: blas_api.h:85
void incoming_event(event *ev)
Definition: blas_api.h:73
A wrapper for an appid, taskid pair.
Definition: software_id.h:28
virtual compute_event * op_2d(int m, int n)