forked from sstsimulator/sst-elements
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mercury: node component derived from NodeBase
- Loading branch information
Showing
23 changed files
with
799 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2009-2024 NTESS. Under the terms | ||
// of Contract DE-NA0003525 with NTESS, the U.S. | ||
// Government retains certain rights in this software. | ||
// | ||
// Copyright (c) 2009-2024, NTESS | ||
// All rights reserved. | ||
// | ||
// Portions are copyright of other developers: | ||
// See the file CONTRIBUTORS.TXT in the top level directory | ||
// of the distribution for more information. | ||
// | ||
// This file is part of the SST software package. For license | ||
// information, see the LICENSE file in the top level directory of the | ||
// distribution. | ||
|
||
#include <mercury/components/node_CL.h> | ||
|
||
namespace SST { | ||
namespace Hg { | ||
|
||
extern template class HgBase<SST::Component>; | ||
extern template SST::TimeConverter* HgBase<SST::Component>::time_converter_; | ||
|
||
NodeCL::NodeCL(ComponentId_t id, Params ¶ms) | ||
: NodeBase(id,params) { | ||
int ncores_ = params.find<std::int32_t>("ncores", 1); | ||
int nsockets_ = params.find<std::int32_t>("nsockets",1); | ||
} | ||
|
||
} // namespace Hg | ||
} // namespace SST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright 2009-2024 NTESS. Under the terms | ||
// of Contract DE-NA0003525 with NTESS, the U.S. | ||
// Government retains certain rights in this software. | ||
// | ||
// Copyright (c) 2009-2024, NTESS | ||
// All rights reserved. | ||
// | ||
// Portions are copyright of other developers: | ||
// See the file CONTRIBUTORS.TXT in the top level directory | ||
// of the distribution for more information. | ||
// | ||
// This file is part of the SST software package. For license | ||
// information, see the LICENSE file in the top level directory of the | ||
// distribution. | ||
|
||
#pragma once | ||
|
||
#include <mercury/common/component.h> | ||
|
||
#include <sst/core/timeConverter.h> | ||
#include <mercury/components/node_base.h> | ||
#include <mercury/components/node.h> | ||
#include <cstdint> | ||
#include <memory> | ||
|
||
namespace SST { | ||
namespace Hg { | ||
|
||
// Components inherit from SST::Component | ||
class NodeCL : public NodeBase { | ||
public: | ||
/* | ||
* SST Registration macros register Components with the SST Core and | ||
* document their parameters, ports, etc. | ||
* SST_ELI_REGISTER_COMPONENT is required, the documentation macros | ||
* are only required if relevant | ||
*/ | ||
// REGISTER THIS COMPONENT INTO THE ELEMENT LIBRARY | ||
SST_ELI_REGISTER_COMPONENT( | ||
SST::Hg::NodeCL, // Component class | ||
"hg", // Component library (for Python/library lookup) | ||
"NodeCL", // Component name (for Python/library lookup) | ||
SST_ELI_ELEMENT_VERSION( | ||
0, 0, 1), // Version of the component (not related to SST version) | ||
"Mercury Node including ComputeLibrary", // Description | ||
COMPONENT_CATEGORY_UNCATEGORIZED, // Category | ||
SST::Hg::Node | ||
) | ||
|
||
NodeCL(SST::ComponentId_t id, SST::Params ¶ms); | ||
|
||
int ncores() { return ncores_; } | ||
int nsockets() { return nsockets_; } | ||
|
||
std::string toString() override { return sprintf("HgNode%d:",my_addr_); } | ||
|
||
private: | ||
|
||
int ncores_; | ||
int nsockets_; | ||
}; | ||
|
||
} // namespace Hg | ||
} // namespace SST |
Oops, something went wrong.