DisCostiC v2.0.0
Distributed Cost in Cluster: a cross-architecture simulator for massively parallel MPI programs
Loading...
Searching...
No Matches
GridInit.hpp
Go to the documentation of this file.
1
7
8#ifndef GRIDINIT_HPP
9#define GRIDINIT_HPP
10
11#pragma once
12
13#include <vector>
14#include <string>
15
16#include "Grid.hpp"
17
18namespace DisCosTiC {
23class Grid_Init {
25private:
28
30public:
37 num_ranks(num_ranks_),
38 num_operations(num_operations_)
39 {
40
42 for (auto rank : DisCosTiC::getRange(num_ranks)) {
44 G.myRank = rank;
47 G.Nodes.clear();
48 G.Nodes.push_back(G.getOp(benchmark, ID, rank, 0));
49 graphVec.push_back(G);
50 // std::cout<<"In rank : "<<org_rank<<" for Rank : "<<rank<<" and its numOps in GraphVec : "<<num_operations<<std::endl;
51 }
52 // std::cout << "In rank : "<<org_rank<<"graphVec stores " << int(graphVec.size()) << " numbers.\n"; // number of ranks
53 }
54
59 }
60
61};
62
63} // end namespace DisCosTiC
64
65#endif
std::size_t DisCosTiC_Datatype
Definition DataType.hpp:52
end of Benchmark class
this class exposes all P graphVec and manages dependencies and execution order. It returns a list of ...
Definition GridInit.hpp:23
DisCosTiC::VecSeqGraph_t graphVec
public variables
Definition GridInit.hpp:31
DisCosTiC_Datatype num_operations
Definition GridInit.hpp:27
DisCosTiC_Datatype num_ranks
private variables
Definition GridInit.hpp:26
Grid_Init(DisCosTiC_Datatype num_ranks_, DisCosTiC_Datatype num_operations_, Benchmark benchmark, DisCosTiC::idNodeTypePair ID)
constructor that initializes the variables.
Definition GridInit.hpp:36
~Grid_Init()
destructor
Definition GridInit.hpp:58
DisCosTiC::VecDeserialNode Nodes
Definition Grid.hpp:33
DisCosTiC::AST_OP_TYPE getOp(Benchmark benchmark, DisCosTiC::idNodeTypePair ID, DisCosTiC_Datatype rank, DisCosTiC_Datatype label)
get the nodes
Definition Grid.hpp:57
DisCosTiC_Datatype myRank
Definition Grid.hpp:32
DisCosTiC_Datatype numRanks
Definition Grid.hpp:31
DisCosTiC_Datatype numOps
private members of Grid class
Definition Grid.hpp:30
< benchmark test cases
std::vector< Grid > VecSeqGraph_t
Definition Grid.hpp:230
std::vector< std::vector< idNodeTypePairT > > idNodeTypePair
iteratorRange< scalarT > getRange(scalarT begin, scalarT end)
Definition DataType.hpp:161