NAMD
Public Member Functions | Public Attributes | List of all members
NodeReduction Class Reference

#include <ReductionMgr.h>

Public Member Functions

 NodeReduction ()
 
 ~NodeReduction ()
 
void zero ()
 
void zero_lock ()
 
void setVal (const NodeReduction *other)
 
ReductionValueoperator[] (int index)
 
ReductionValueitem (int index)
 

Public Attributes

ReductionValue set [REDUCTION_MAX_RESERVED]
 

Detailed Description

Definition at line 453 of file ReductionMgr.h.

Constructor & Destructor Documentation

◆ NodeReduction()

NodeReduction::NodeReduction ( )

Definition at line 646 of file ReductionMgr.C.

References REDUCTION_MAX_RESERVED.

646  {
647  //memset(set, 0, sizeof(ReductionValue)*REDUCTION_MAX_RESERVED);
648  for(int i = 0; i < REDUCTION_MAX_RESERVED; i++){
649  this->set[i].reducedValue = 0.0;
650  }
651 
652 }

◆ ~NodeReduction()

NodeReduction::~NodeReduction ( )

Definition at line 688 of file ReductionMgr.C.

688  {
689 
690 }

Member Function Documentation

◆ item()

ReductionValue & NodeReduction::item ( int  index)

Definition at line 658 of file ReductionMgr.C.

Referenced by RequireReductionShared::require(), and SubmitReductionShared::submit().

658  {
659  return set[index];
660 }

◆ operator[]()

ReductionValue & NodeReduction::operator[] ( int  index)

Definition at line 654 of file ReductionMgr.C.

654  {
655  return set[index];
656 }

◆ setVal()

void NodeReduction::setVal ( const NodeReduction other)

Definition at line 681 of file ReductionMgr.C.

References ReductionValue::reducedValue, REDUCTION_MAX_RESERVED, and set.

681  {
682 #pragma unroll
683  for(int i = 0; i < REDUCTION_MAX_RESERVED; i++){
684  this->set[i].reducedValue = other->set[i].reducedValue;
685  }
686 }
ReductionValue set[REDUCTION_MAX_RESERVED]
Definition: ReductionMgr.h:455
double reducedValue
Definition: ReductionMgr.h:436

◆ zero()

void NodeReduction::zero ( )

Definition at line 662 of file ReductionMgr.C.

References REDUCTION_MAX_RESERVED.

Referenced by RequireReductionShared::require(), and SubmitReductionShared::SubmitReductionShared().

662  {
663  // this memset is going to eff everything up i think
664  //memset(set, 0, sizeof(ReductionValue)*REDUCTION_MAX_RESERVED);
665 #pragma unroll
666  for(int i = 0; i < REDUCTION_MAX_RESERVED; i++){
667  this->set[i].reducedValue = 0.0;
668  }
669 }

◆ zero_lock()

void NodeReduction::zero_lock ( )

Definition at line 671 of file ReductionMgr.C.

References REDUCTION_MAX_RESERVED.

671  {
672 #pragma unroll
673  for(int i = 0; i < REDUCTION_MAX_RESERVED; i++){
674  CmiLock(this->set[i].valueLock);
675  this->set[i].reducedValue = 0.0;
676  CmiUnlock(this->set[i].valueLock);
677  }
678 }

Member Data Documentation

◆ set


The documentation for this class was generated from the following files: