PageSourceSearch

https://sst-simulator.org/sst-docs/assets/js/bbfb2dd4.8c5f45c6.js

js sst-simulator.org collected 2026-10-01 13:55:40 UTC 4,376 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1781],{28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>c});var o=n(96540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}},33463:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>r});const o=JSON.parse('{"id":"core/component/componentext/class","title":"SST::ComponentExtension","description":"A ComponentExtension is a class that shares ELI with a Component. It can be useful when it is convenient to divide a Component class into separate classes but the additional classes do not need to be dynamically loadable or otherwise available to SST users. A ComponentExtension has access to the SST simulation via the Component it is loaded into. In parallel simulations, a ComponentExtension is always co-located with its Component.","source":"@site/../docs/core/component/componentext/class.md","sourceDirName":"core/component/componentext","slug":"/core/component/componentext/class","permalink":"/sst-docs/docs/core/component/componentext/class","draft":false,"unlisted":false,"editUrl":"https://github.com/sstsimulator/sst-docs/edit/master/docs/../docs/core/component/componentext/class.md","tags":[],"version":"current","lastUpdatedBy":"grvosku","lastUpdatedAt":1695940750000,"frontMatter":{"title":"SST::ComponentExtension"},"sidebar":"core","previous":{"title":"destructor","permalink":"/sst-docs/docs/core/component/subcomponent/destructor"},"next":{"title":"constructor","permalink":"/sst-docs/docs/core/component/componentext/constructor"}}');var s=n(74848),a=n(28453);const i={title:"SST::ComponentExtension"},c=void 0,l={},r=[{value:"Example",id:"example",level:2},{value:"Header",id:"header",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"A ComponentExtension is a class that shares ELI with a Component. It can be useful when it is convenient to divide a Component class into separate classes but the additional classes do not need to be dynamically loadable or otherwise available to SST users. A ComponentExtension has access to the SST simulation via the Component it is loaded into. In parallel simulations, a ComponentExtension is always co-located with its Component."}),"\n",(0,s.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-cpp",metastring:'title="Excerpt from sst-elements/src/sst/elements/memHierarchy/mshr.h"',children:"#include <sst/core/componentextension.h>\n\n/* The MSHR is really just a buffer that a cache uses but it is useful to be able to access\n * some of the simulation time functions available to components. We could make this a subcomponent \n * but it doesn't need to be available to users to swap dynamically. \n */\n //highlight-next-line\nclass MSHR : public SST::ComponentExtension\n{\npublic:\n    // No ELI needed\n\n    // id is passed automatically by SST when loaded, the rest of the args are provided by the Component \n    // that loads this extension\n    MSHR(ComponentId_t id, Output* dbg, int maxSize, std::string cacheName, std::set<Addr> debugAddr);\n    virtual ~MSHR() {}\n\n    int getMaxSize();\n    int getSize();\n\n    /* Rest of class here */\n\n};\n"})}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-cpp",metastring:'title="Excerpt from sst-elements/src/sst/elements/memHierarchy/mshr.cc"',children:'#include <sst_config.h>\n#include "mshr.h"\n\nMSHR::MSHR(ComponentId_t id, Output* debug, int maxSize, string cacheName, std::set<Addr> debugAddr) :\n//highlight-next-line\n    ComponentExtension(id)\n{\n    /* Constructor here */\n}\n\n/* Rest of functions defined here */\n\n'})}),"\n",(0,s.jsx)(t.h2,{id:"header",children:"Header"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-cpp",children:"#include <sst/core/componentExtension.h>\n"})})]})}function m(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.