Skip to Content.
Sympa Menu

charm - [charm] chare ?

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] chare ?


Chronological Thread 
  • From: "Mitchell, John A" <jamitch AT sandia.gov>
  • To: "charm AT lists.cs.illinois.edu" <charm AT lists.cs.illinois.edu>
  • Subject: [charm] chare ?
  • Date: Mon, 5 Dec 2016 23:19:50 +0000
  • Accept-language: en-US

I am new to Charm++.

Is there a 'default' type constructor for chare objects?  

I am struggling with an idea in which one chare objects will create and store two chare objects as private members -- is that possible?  

In some cases the nested objects are essentially Null objects while in other cases I will recurse to create a tree of additional chares and so on.  I am wandering if the default instantiation of 'left' and 'right' makes any sense or if it will work?  This is depicted below.

struct HierarchicalNode : CBase_HierarchicalNode {
  HierarchicalNode left, right;  
  HierarchicalNode(int num_points, int num_points_leaf) : left(0,0), right(0,0) {
    
    int num_points_left=0, num_points_right=0;
    if(0==num_points%2){
       // even
       num_points_left=num_points/2;
       num_points_right=num_points/2;
    }else {
       // even
       num_points_left=1+(num_points-1)/2;
       num_points_right=(num_points-1)/2;
    }   
    if(num_points_left>num_points_leaf)
       left=CProxy_HierarchicalNode::ckNew(num_points_left,num_p);
    if(num_points_right>num_points_leaf)
       right=CProxy_HierarchicalNode::ckNew(num_points_right);
  }



  • [charm] chare ?, Mitchell, John A, 12/05/2016

Archive powered by MHonArc 2.6.19.

Top of Page