MADNESS 0.10.1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
madness::MacroTaskInfo Struct Reference

#include <macrotaskq.h>

Public Types

enum  StoragePolicy { StoreFunction , StorePointerToFunction , StoreFunctionViaPointer }
 

Public Member Functions

bool check_consistency () const
 make sure the policies are consistent
 
nlohmann::json to_json () const
 

Static Public Member Functions

static std::vector< std::string > get_all_preset_names ()
 
static std::vector< MacroTaskInfoget_all_presets ()
 helper function to return all presets
 
static StoragePolicy policy_to_string (const std::string policy)
 
static MacroTaskInfo preset (const std::string name)
 
static Cloud::StoragePolicy to_cloud_storage_policy (MacroTaskInfo::StoragePolicy policy)
 given the MacroTask's storage policy return the corresponding Cloud storage policy
 

Public Attributes

DistributionType cloud_distribution_policy =DistributionType::RankReplicated
 
DistributionType ptr_target_distribution_policy =DistributionType::NodeReplicated
 
StoragePolicy storage_policy =StoreFunctionViaPointer
 

Friends

std::ostream & operator<< (std::ostream &os, const MacroTaskInfo policy)
 
std::ostream & operator<< (std::ostream &os, const StoragePolicy sp)
 
std::string to_string (const MacroTaskInfo::StoragePolicy sp)
 

Member Enumeration Documentation

◆ StoragePolicy

Enumerator
StoreFunction 

store a madness function in the cloud – can have a large memory impact

StorePointerToFunction 

store the pointer to the function in the cloud, the actual function lives in the universe and its coefficients can be copied to the subworlds (e.g. by macrotaskq) when needed. The task itself is responsible for handling data movement

StoreFunctionViaPointer 

coefficients to the subworlds when the task is started. This is the default policy.

store a pointer to the function in the cloud, but macrotaskq will move the

Member Function Documentation

◆ check_consistency()

bool madness::MacroTaskInfo::check_consistency ( ) const
inline

◆ get_all_preset_names()

static std::vector< std::string > madness::MacroTaskInfo::get_all_preset_names ( )
inlinestatic

◆ get_all_presets()

static std::vector< MacroTaskInfo > madness::MacroTaskInfo::get_all_presets ( )
inlinestatic

helper function to return all presets

References get_all_preset_names(), madness::name(), and preset().

◆ policy_to_string()

static StoragePolicy madness::MacroTaskInfo::policy_to_string ( const std::string  policy)
inlinestatic

◆ preset()

static MacroTaskInfo madness::MacroTaskInfo::preset ( const std::string  name)
inlinestatic

return some preset policies

  • "default": StoreFunctionViaPointer, cloud rank-replicated, initial functions node-replicated
  • "small_memory": StoreFunctionViaPointer, cloud rank-replicated, initial functions distributed
  • "large_memory": StoreFunction, cloud rank-replicated, initial functions distributed the user can also set the policies manually note: the policies are checked for consistency when the MacroTaskQ is created

References cloud_distribution_policy, madness::Distributed, MADNESS_EXCEPTION, madness::name(), madness::NodeReplicated, ptr_target_distribution_policy, madness::RankReplicated, storage_policy, StoreFunction, and StoreFunctionViaPointer.

Referenced by madness::SCF::apply_potential(), get_all_presets(), test_2d_partitioning(), test_deferred(), and test_twice().

◆ to_cloud_storage_policy()

static Cloud::StoragePolicy madness::MacroTaskInfo::to_cloud_storage_policy ( MacroTaskInfo::StoragePolicy  policy)
inlinestatic

◆ to_json()

nlohmann::json madness::MacroTaskInfo::to_json ( ) const
inline

Friends And Related Symbol Documentation

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream &  os,
const MacroTaskInfo  policy 
)
friend

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream &  os,
const StoragePolicy  sp 
)
friend

◆ to_string

std::string to_string ( const MacroTaskInfo::StoragePolicy  sp)
friend

Referenced by to_json().

Member Data Documentation

◆ cloud_distribution_policy

DistributionType madness::MacroTaskInfo::cloud_distribution_policy =DistributionType::RankReplicated

◆ ptr_target_distribution_policy

DistributionType madness::MacroTaskInfo::ptr_target_distribution_policy =DistributionType::NodeReplicated

◆ storage_policy

StoragePolicy madness::MacroTaskInfo::storage_policy =StoreFunctionViaPointer

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