Skip to Content.
Sympa Menu

charm - Re: [charm] [ppl] New API for efficient formula-based distributed spare array creation

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] [ppl] New API for efficient formula-based distributed spare array creation


Chronological Thread 
  • From: "Mikida, Eric P" <mikida2 AT illinois.edu>
  • To: Phil Miller <unmobile AT gmail.com>
  • Cc: Jozsef Bakosi <jbakosi AT gmail.com>, "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: Re: [charm] [ppl] New API for efficient formula-based distributed spare array creation
  • Date: Tue, 29 Dec 2015 20:51:26 +0000
  • Accept-language: en-US

There was some documentation added to the online version of the manual. They are in section 13.2.1, which deals with advanced array creation.

The basic usage looks as follows:

CkArrayOptions options;

options.setStart(CkArrayIndex2D(1,1))
options.setEnd(CkArrayIndex2D(10,10))
options.setStep(CkArrayIndex2D(2,2));

CProxy_Foo::ckNew(options);

The above code would create a Foo chare array, which is a 2D array, whose first chare is at index (1,1). The step is (2,2), so it will also be populated at indices (1,3), (1,5), (3,1), etc…all the way up to but not including (10,10).

Just as a note, the default chare array creation you are used to, where you just set a number of elements, is equivalent to a start index of 0, a step of 1, and an end of x, where x is the number of elements you specified.

Eric
On Dec 28, 2015, at 7:48 PM, Phil Miller <unmobile AT gmail.com> wrote:

Hi Jozsef,

I vaguely recall documentation having been added to the manual, but the online copy may not have been updated to match.

The short answer is to look at the constructors defined for CkArrayOptions, and how to use that when instantiating a new chare array. Essentially, it takes lower and upper bounds of the range of indices desired, and a stride, for each dimension.

If the documentation is missing or out of date, I'll make sure that gets fixed.

Have a happy new year!

Regards,
Phil

On Dec 28, 2015 6:42 PM, "Jozsef Bakosi" <jbakosi AT gmail.com> wrote:
Hi folks,

Is this new feature documented somewhere? I cannot find it in the manual. If not, can I get a crash course on the basic usage?

Many thanks,
Jozsef




Archive powered by MHonArc 2.6.16.

Top of Page