https://github.com/N-BodyShop/changa
Revision 1a58a05e378186ae657a4ede9cfff00362485aef authored by Tom Quinn on 07 August 2018, 23:09:30 UTC, committed by Tim Haines on 02 October 2018, 06:15:11 UTC
This allows larger than 2GB buffers to be allocated for the GPU.
Also use size_t in GPU Transfer functions.

Change-Id: I36bb3ec4156e4f7790ad24d0fc172b134a196c7e
1 parent b6ba8d6
Raw File
Tip revision: 1a58a05e378186ae657a4ede9cfff00362485aef authored by Tom Quinn on 07 August 2018, 23:09:30 UTC
allocatePinnedHostMemory(): use size_t.
Tip revision: 1a58a05
TreeNode.h
/** @file TreeNode.h
 This header defines the structures used to make up trees.
 @author Graeme Lufkin (gwl@u.washington.edu)
 @date 01 Aug 2005 - Deleted the class SFCTreeNode in favor of GenericTreeNode, Filippo
 */

#ifndef TREENODE_H
#define TREENODE_H

#include <sstream>

#include "SFC.h"

namespace TreeStuff {

using namespace SFC;

/// @brief Convert a Key into a printable string.
inline std::string keyBits(const Key k, const int numBits) {
  std::ostringstream oss;
  //oss << "N";
  bool ready = false;
  for(int i = 0; i < numBits; i++) {
    Key k2 = k & (static_cast<Key>(1) << (62 - i));
    if (ready) oss << (k2 ? 1 : 0);
    else if (k2 != 0) ready = true;
  }
  return oss.str();
}

/// This converts a "radius to the furthest particle" to the standard
/// Barnes-Hut cell size.  We use it to keep the definition of theta
/// consistent.

const double opening_geometry_factor = 2 / sqrt(3.0);

/// The maximum number of particles in a bucket.
extern int maxBucketSize;
	

} //close namespace TreeStuff

#endif //TREENODE_H
back to top