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

#include <ReductionMgr.h>

Public Member Functions

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

Detailed Description

Definition at line 364 of file ReductionMgr.h.

Constructor & Destructor Documentation

◆ NodeReduction()

NodeReduction::NodeReduction ( )

Definition at line 621 of file ReductionMgr.C.

References REDUCTION_MAX_RESERVED.

621  {
622  //memset(set, 0, sizeof(ReductionValue)*REDUCTION_MAX_RESERVED);
623  for(int i = 0; i < REDUCTION_MAX_RESERVED; i++){
624  this->set[i].reducedValue = 0.0;
625  }
626 
627 }

◆ ~NodeReduction()

NodeReduction::~NodeReduction ( )

Definition at line 654 of file ReductionMgr.C.

654  {
655 
656 }

Member Function Documentation

◆ item()

ReductionValue & NodeReduction::item ( int  index)

◆ operator[]()

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

Definition at line 629 of file ReductionMgr.C.

629  {
630  return set[index];
631 }

◆ setVal()

void NodeReduction::setVal ( const NodeReduction other)

Definition at line 647 of file ReductionMgr.C.

References ReductionValue::reducedValue, and REDUCTION_MAX_RESERVED.

647  {
648 #pragma unroll
649  for(int i = 0; i < REDUCTION_MAX_RESERVED; i++){
650  this->set[i].reducedValue = other->set[i].reducedValue;
651  }
652 }
double reducedValue
Definition: ReductionMgr.h:351

◆ zero()

void NodeReduction::zero ( )

Definition at line 637 of file ReductionMgr.C.

References REDUCTION_MAX_RESERVED.

637  {
638  // this memset is going to eff everything up i think
639  //memset(set, 0, sizeof(ReductionValue)*REDUCTION_MAX_RESERVED);
640 #pragma unroll
641  for(int i = 0; i < REDUCTION_MAX_RESERVED; i++){
642  this->set[i].reducedValue = 0.0;
643  }
644 }

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