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

 
 

bug #11177: Creating subField is costly

Submitter:  Richard Biener <richi>
Submitted:  Tue 30 Nov 2004 04:23:20 PM UTC
 
Category:  Enhancement request Severity:  2 - Minor
Status:  None Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

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 Biener <richi>
Project Administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

 

 

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-11-30 richi CategoryNone Enhancement request
    Severity1 - Wish 2 - Minor

Back to the top


Powered by Savane 3.9