2023-09-14 19:43:13 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <map>
|
|
|
|
|
#include "graph_loops.h"
|
|
|
|
|
#include "../Distribution/DvmhDirective.h"
|
|
|
|
|
|
|
|
|
|
struct SpfInterval;
|
|
|
|
|
|
2024-06-19 18:08:27 +03:00
|
|
|
void loopGraphAnalyzer(SgFile *file, std::vector<LoopGraph*> &loopGraph, const std::vector<SpfInterval*> &statisticTimes, std::vector<Messages> &messages, int sharedMemoryParallelization);
|
2023-09-14 19:43:13 +03:00
|
|
|
void findAllRefsToLables(SgStatement *st, std::map<int, std::vector<int>> &labelsRef, bool includeWrite = true);
|
|
|
|
|
std::map<LoopGraph*, ParallelDirective*> findAllDirectives(SgFile *file, const std::vector<LoopGraph*> &loops, const uint64_t regId);
|
|
|
|
|
std::vector<std::tuple<DIST::Array*, std::vector<long>, std::pair<std::string, int>>> findAllSingleRemotes(SgFile *file, const uint64_t regId, std::vector<ParallelRegion*> ®ions);
|
|
|
|
|
std::map<DIST::Array*, std::vector<long>> fillRemoteInParallel(Statement *st);
|
2024-05-11 15:38:41 +03:00
|
|
|
bool hasThisIds(SgStatement *loop, std::set<int> &lines, const std::set<int> &IDs, const std::set<SgStatement*>* activeOps = NULL);
|
2023-09-14 19:43:13 +03:00
|
|
|
bool checkRegionEntries(SgStatement *begin, SgStatement *end, const std::map<std::string, FuncInfo*> &funcMap, const std::vector<ParallelRegion*> ¶llelRegions, std::map<std::string, std::vector<Messages>> &SPF_messages);
|
|
|
|
|
bool recSymbolFind(SgExpression *ex, const std::string &symb, const int var);
|
|
|
|
|
void completeFillOfArrayUsageBetweenProc(const std::map<std::string, std::vector<LoopGraph*>>& loopGraph, const std::map<std::string, std::vector<FuncInfo*>>& allFuncInfo);
|
|
|
|
|
bool detectMpiCalls(SgProject* proj, std::map<std::string, std::vector<Messages>>& SPF_messages);
|
|
|
|
|
int calculateLoopIters(SgExpression* start, SgExpression* end, SgExpression* step, std::tuple<int, int, int>& result);
|