Chi-Tech
AAH_AsynComm_initbuffers.cc
Go to the documentation of this file.
1#include "AAH_AsynComm.h"
2
6
7#include "chi_runtime.h"
9#include "chi_log.h"
10
11//###################################################################
12/** This is the final level of initialization before a sweep-chunk executes.
13 * Once all upstream dependencies are met and if the sweep scheduler places
14 * this angleset as "ready-to-execute", then the angle-set will call this
15 * method. It is also fairly important in terms of memory to only allocate
16 * these chunks of memory when actually ready to use them since they form the
17 * majority of memory usage.*/
20{
22 {
23 const auto& spds = fluds_.GetSPDS();
24
25 //============================ Resize FLUDS local outgoing Data
27
28 //============================ Resize FLUDS non-local outgoing Data
29 const size_t num_loc_sucs = spds.GetLocationSuccessors().size();
31
32 //================================================ Make a memory query
33 double memory_mb = chi::Console::GetMemoryUsageInMB();
34
35 std::shared_ptr<chi::ChiLog::EventInfo> memory_event_info =
36 std::make_shared<chi::ChiLog::EventInfo>(memory_mb);
37
38 Chi::log.LogEvent(chi::ChiLog::StdTags::MAX_MEMORY_USAGE,
40 memory_event_info);
41
42 data_initialized = true;
43 }
44}
static chi::ChiLog & log
Definition: chi_runtime.h:81
@ SINGLE_OCCURRENCE
Signals a single occurrence.
void LogEvent(size_t ev_tag, EventType ev_type, const std::shared_ptr< EventInfo > &ev_info)
Definition: chi_log.cc:204
static double GetMemoryUsageInMB()
Get current memory usage in Megabytes.
virtual void AllocateInternalLocalPsi(size_t num_grps, size_t num_angles)
Definition: FLUDS.h:35
virtual void AllocateOutgoingPsi(size_t num_grps, size_t num_angles, size_t num_loc_sucs)
Definition: FLUDS.h:37
const SPDS & GetSPDS() const
Definition: FLUDS.h:31