SST/macro
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
sstmac::sw::lib_compute_loops Class Reference

#include <lib_compute_loops.h>

Inheritance diagram for sstmac::sw::lib_compute_loops:
Inheritance graph
Collaboration diagram for sstmac::sw::lib_compute_loops:
Collaboration graph

Public Member Functions

virtual ~lib_compute_loops ()
 
 lib_compute_loops (software_id id)
 
template<typename Type >
void compute_array_init (long arraysize)
 
template<typename T >
void compute_loop (long long from1, long long to1, T numlines)
 compute_loop - compute and schedule a for loop's costs as moving Nm bytes and doing Nf flops, where Nm = loop_trips*numlines*mem_line_ratio*mem_op_size Nf = loop_trips*numlines*flop_line_ratio where mem_line_ratio and flop_line_ratio may appear as global simulation parameters or will default (0.8, 0.8) and mem_op_size is currently fixed internally at 16. More...
 
template<typename T >
void compute_loop2 (long long from1, long long to1, long long from2, long long to2, T numlines)
 compute_loop2 - compute for one loop nested in an outer one More...
 
template<typename T >
void compute_loop3 (long long from1, long long to1, long long from2, long long to2, long long from3, long long to3, T numlines)
 compute_loop3 - compute for one loop nested in loop nested in an outer one More...
 
template<typename T >
void compute_loop4 (long long from1, long long to1, long long from2, long long to2, long long from3, long long to3, long long from4, long long to4, T numlines)
 compute_loop4 - compute for quadruple nested loop More...
 
template<typename T >
void compute_loop5 (long long from1, long long to1, long long from2, long long to2, long long from3, long long to3, long long from4, long long to4, long long from5, long long to5, T numlines)
 compute_loop5 - compute for 5-nested loop More...
 
template<typename T >
void compute_loop6 (long long from1, long long to1, long long from2, long long to2, long long from3, long long to3, long long from4, long long to4, long long from5, long long to5, long long from6, long long to6, T numlines)
 compute_loop6 - compute for 6-nested loop More...
 
template<typename T >
void compute_loop7 (long long from1, long long to1, long long from2, long long to2, long long from3, long long to3, long long from4, long long to4, long long from5, long long to5, long long from6, long long to6, long long from7, long long to7, T numlines)
 compute_loop6 - compute for 6-nested loop More...
 
void compute_fft ()
 
- Public Member Functions inherited from sstmac::sw::lib_compute_memmove
virtual ~lib_compute_memmove ()
 
 lib_compute_memmove (software_id id)
 
 lib_compute_memmove (const char *prefix, software_id id)
 
virtual void unregister_all_libs ()
 
void consume_params (sprockit::sim_parameters *params)
 
void incoming_event (event *ev)
 
void read (long bytes)
 
void write (long bytes)
 
void copy (long bytes)
 
- Public Member Functions inherited from sstmac::sw::lib_compute_inst
 lib_compute_inst (software_id id)
 
 lib_compute_inst (const std::string &libname, software_id id)
 
virtual ~lib_compute_inst ()
 
void compute_inst (compute_event *msg)
 
void compute_detailed (uint64_t flops, uint64_t nintops, uint64_t bytes)
 
void compute_loop (uint64_t nloops, uint32_t flops_per_loop, uint32_t intops_per_loop, uint32_t bytes_per_loop)
 
void incoming_event (event *ev)
 

Static Public Attributes

static int mem_op_size_
 
static double mem_line_ratio_
 
static double flop_line_ratio_
 
static bool do_loops_
 
- Static Public Attributes inherited from sstmac::sw::lib_compute_memmove
static key::category key_category
 

Protected Member Functions

void consume_params (sprockit::sim_parameters *params)
 
void compute_loop_work (long long loop, double numlines)
 
- Protected Member Functions inherited from sstmac::sw::lib_compute_memmove
void init ()
 
void do_access (long bytes)
 

Protected Attributes

bool doing_memory_
 
- Protected Attributes inherited from sstmac::sw::lib_compute_memmove
int access_width_bytes_
 
- Protected Attributes inherited from sstmac::sw::lib_compute_inst
double loop_overhead_
 

Additional Inherited Members

- Static Protected Attributes inherited from sstmac::sw::lib_compute_memmove
static const long unlimited_page_size = -1
 
static const long default_page_size = unlimited_page_size
 

Detailed Description

Definition at line 21 of file lib_compute_loops.h.

Constructor & Destructor Documentation

virtual sstmac::sw::lib_compute_loops::~lib_compute_loops ( )
inlinevirtual

Definition at line 30 of file lib_compute_loops.h.

References lib_compute_loops().

Here is the call graph for this function:

sstmac::sw::lib_compute_loops::lib_compute_loops ( software_id  id)

Referenced by ~lib_compute_loops().

Member Function Documentation

template<typename Type >
void sstmac::sw::lib_compute_loops::compute_array_init ( long  arraysize)
inline

Definition at line 36 of file lib_compute_loops.h.

References doing_memory_, and sstmac::sw::lib_compute_memmove::read().

Here is the call graph for this function:

void sstmac::sw::lib_compute_loops::compute_fft ( )

Referenced by compute_loop7().

template<typename T >
void sstmac::sw::lib_compute_loops::compute_loop ( long long  from1,
long long  to1,
numlines 
)
inline

compute_loop - compute and schedule a for loop's costs as moving Nm bytes and doing Nf flops, where Nm = loop_trips*numlines*mem_line_ratio*mem_op_size Nf = loop_trips*numlines*flop_line_ratio where mem_line_ratio and flop_line_ratio may appear as global simulation parameters or will default (0.8, 0.8) and mem_op_size is currently fixed internally at 16.

loop_trips = Product-N(toI-fromI+1 over all N range pairs I in the argument list) Given pipeline, vectorization, and other execution features, numlines is essentially a fudge factor that must be determined by experimental comparison; reasonable initial guesses for the numlines are (a) the number of executable statements in the loop (b) the number of values read from or written to main data memory at the innermost loop level. For all versions of this function, loop_trips is product of the (to-from+1) differences in the argument list.

Parameters
fromloop counter range begin
toloop counter range end (assuming step size 1)
numlinesnumber of lines equivalent of code (>0) tuning parameter

Definition at line 65 of file lib_compute_loops.h.

References compute_loop_work(), and do_loops_.

Here is the call graph for this function:

template<typename T >
void sstmac::sw::lib_compute_loops::compute_loop2 ( long long  from1,
long long  to1,
long long  from2,
long long  to2,
numlines 
)
inline

compute_loop2 - compute for one loop nested in an outer one

Parameters
from1
to1
from2
to2
numlines

Definition at line 83 of file lib_compute_loops.h.

References compute_loop_work(), and do_loops_.

Here is the call graph for this function:

template<typename T >
void sstmac::sw::lib_compute_loops::compute_loop3 ( long long  from1,
long long  to1,
long long  from2,
long long  to2,
long long  from3,
long long  to3,
numlines 
)
inline

compute_loop3 - compute for one loop nested in loop nested in an outer one

Parameters
from1
to1
from2
to2
from3
to3
numlines

Definition at line 106 of file lib_compute_loops.h.

References compute_loop_work(), and do_loops_.

Here is the call graph for this function:

template<typename T >
void sstmac::sw::lib_compute_loops::compute_loop4 ( long long  from1,
long long  to1,
long long  from2,
long long  to2,
long long  from3,
long long  to3,
long long  from4,
long long  to4,
numlines 
)
inline

compute_loop4 - compute for quadruple nested loop

Parameters
numlines

Definition at line 125 of file lib_compute_loops.h.

References compute_loop_work(), and do_loops_.

Here is the call graph for this function:

template<typename T >
void sstmac::sw::lib_compute_loops::compute_loop5 ( long long  from1,
long long  to1,
long long  from2,
long long  to2,
long long  from3,
long long  to3,
long long  from4,
long long  to4,
long long  from5,
long long  to5,
numlines 
)
inline

compute_loop5 - compute for 5-nested loop

Parameters
from1see compute_loop for parameters explanation.
to1
from2
to2
from3
to3
from4
to4
from5
to5
numlines

Definition at line 156 of file lib_compute_loops.h.

References compute_loop_work(), and do_loops_.

Here is the call graph for this function:

template<typename T >
void sstmac::sw::lib_compute_loops::compute_loop6 ( long long  from1,
long long  to1,
long long  from2,
long long  to2,
long long  from3,
long long  to3,
long long  from4,
long long  to4,
long long  from5,
long long  to5,
long long  from6,
long long  to6,
numlines 
)
inline

compute_loop6 - compute for 6-nested loop

Parameters
from1see compute_loop for parameters explanation.
to1
from2
to2
from3
to3
from4
to4
from5
to5
from6
to6
numlines

Definition at line 189 of file lib_compute_loops.h.

References compute_loop_work(), and do_loops_.

Here is the call graph for this function:

template<typename T >
void sstmac::sw::lib_compute_loops::compute_loop7 ( long long  from1,
long long  to1,
long long  from2,
long long  to2,
long long  from3,
long long  to3,
long long  from4,
long long  to4,
long long  from5,
long long  to5,
long long  from6,
long long  to6,
long long  from7,
long long  to7,
numlines 
)
inline

compute_loop6 - compute for 6-nested loop

Parameters
from1see compute_loop for parameters explanation.
to1
from2
to2
from3
to3
from4
to4
from5
to5
from6
to6
from7
to7
numlines

Definition at line 226 of file lib_compute_loops.h.

References compute_fft(), compute_loop_work(), and do_loops_.

Here is the call graph for this function:

void sstmac::sw::lib_compute_loops::compute_loop_work ( long long  loop,
double  numlines 
)
protected
void sstmac::sw::lib_compute_loops::consume_params ( sprockit::sim_parameters *  params)
protectedvirtual

Reimplemented from sstmac::sw::lib_compute_inst.

Member Data Documentation

bool sstmac::sw::lib_compute_loops::do_loops_
static
bool sstmac::sw::lib_compute_loops::doing_memory_
protected

Definition at line 260 of file lib_compute_loops.h.

Referenced by compute_array_init().

double sstmac::sw::lib_compute_loops::flop_line_ratio_
static

Definition at line 250 of file lib_compute_loops.h.

double sstmac::sw::lib_compute_loops::mem_line_ratio_
static

Definition at line 249 of file lib_compute_loops.h.

int sstmac::sw::lib_compute_loops::mem_op_size_
static

Definition at line 248 of file lib_compute_loops.h.


The documentation for this class was generated from the following file: