bugFreePOOMA - Bugs: bug #11177, Creating subField is costly

 
 

bug #11177: Creating subField is costly

Submitted by:  Richard Guenther <richi>
Submitted on:  Tue 30 Nov 2004 04:23:20 PM UTC  
 
Category: Enhancement requestSeverity: 2 - Minor
Status: NoneAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 30 Nov 2004 04:23:20 PM UTC, original submission:

Creating a subField, even if just accessing one element
like in

f.centering(0).read(1, 2);

is very costly. This can hurt badly if used in a ScalarCode
or FieldStencil functor (or in a CppTran loop).

This is caused by the field Centering being copied and
this containing std::vector<> whose creation/destruction
cannot be optimized away while being standard conform.

There are several ways to improve this situation, the
most important and straight-forward being a cut down
in features of the (overdesigned) Centering class:
- do not allow arbitrary positions/orientations
- do not allow an arbitrary centering size
=> orientations could get a Dim-d bitfield of
centering size size
=> positions could get a Dim-d bitfield of
centering size size allowing only vertex or center
values, not an arbitrary number [0.0, 1.0]
=> the centering size could be limited to 32
(unsigned int bitfield). This way a 3d edge
centered field with discontinuous data would
still be supported (i.e. all available canonical
centerings).

Workaround available, use:

f.fieldEngine().engine(0, 0).read(1, 2);

Richard Guenther <richi>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 30 Nov 2004 04:23:42 PM UTCrichiCategoryNone=>Enhancement request
  Severity1 - Wish=>2 - Minor

Back to the top


Powered by Savane 3.1-cleanup