Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove template instantiation in header files #3143

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions bindings/CXX11/adios2/cxx11/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,48 +458,6 @@ class Engine
core::Engine *m_Engine = nullptr;
};

#define declare_template_instantiation(T) \
\
extern template typename Variable<T>::Span Engine::Put( \
Variable<T>, const bool, const T &); \
extern template typename Variable<T>::Span Engine::Put(Variable<T>); \
extern template void Engine::Get(Variable<T>, T **) const;

ADIOS2_FOREACH_PRIMITIVE_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

#define declare_template_instantiation(T) \
extern template void Engine::Put<T>(Variable<T>, const T *, const Mode); \
extern template void Engine::Put<T>(const std::string &, const T *, \
const Mode); \
extern template void Engine::Put<T>(Variable<T>, const T &, const Mode); \
extern template void Engine::Put<T>(const std::string &, const T &, \
const Mode); \
\
extern template void Engine::Get<T>(Variable<T>, T *, const Mode); \
extern template void Engine::Get<T>(const std::string &, T *, const Mode); \
extern template void Engine::Get<T>(Variable<T>, T &, const Mode); \
extern template void Engine::Get<T>(const std::string &, T &, const Mode); \
\
extern template void Engine::Get<T>(Variable<T>, std::vector<T> &, \
const Mode); \
extern template void Engine::Get<T>(const std::string &, std::vector<T> &, \
const Mode); \
\
extern template void Engine::Get<T>( \
Variable<T>, typename Variable<T>::Info & info, const Mode); \
extern template void Engine::Get<T>( \
const std::string &, typename Variable<T>::Info &info, const Mode); \
\
extern template std::map<size_t, std::vector<typename Variable<T>::Info>> \
Engine::AllStepsBlocksInfo(const Variable<T> variable) const; \
\
extern template std::vector<typename Variable<T>::Info> \
Engine::BlocksInfo(const Variable<T> variable, const size_t step) const;

ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

std::string ToString(const Engine &engine);

} // end namespace adios2
Expand Down
6 changes: 0 additions & 6 deletions bindings/CXX11/adios2/cxx11/Group.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,5 @@ class Group
*/
DataType AttributeType(const std::string &name) const;
};
// Explicit declaration of the public template methods
// Limits the types
#define declare_template_instantiation(T) \
extern template Variable<T> Group::InquireVariable<T>(const std::string &);
ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation
}
#endif // ADIOS2_BINDINGS_CXX11_CXX11_GROUP_H_
26 changes: 0 additions & 26 deletions bindings/CXX11/adios2/cxx11/IO.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,32 +364,6 @@ class IO
core::IO *m_IO = nullptr;
};

// Explicit declaration of the public template methods
// Limits the types
#define declare_template_instantiation(T) \
extern template Variable<T> IO::DefineVariable(const std::string &, \
const Dims &, const Dims &, \
const Dims &, const bool); \
\
extern template Variable<T> IO::InquireVariable<T>(const std::string &);

ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

#define declare_template_instantiation(T) \
extern template Attribute<T> IO::DefineAttribute( \
const std::string &, const T *, const size_t, const std::string &, \
const std::string, const bool); \
\
extern template Attribute<T> IO::DefineAttribute( \
const std::string &, const T &, const std::string &, \
const std::string, const bool); \
\
extern template Attribute<T> IO::InquireAttribute<T>( \
const std::string &, const std::string &, const std::string);
ADIOS2_FOREACH_ATTRIBUTE_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

std::string ToString(const IO &io);

} // end namespace adios2
Expand Down
8 changes: 0 additions & 8 deletions bindings/CXX11/adios2/cxx11/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,5 @@ namespace adios2
template <class T>
std::string GetType() noexcept;

// LIMIT TEMPLATE TYPES FOR adios2::GetType
#define declare_template_instantiation(T) \
\
extern template std::string GetType<T>() noexcept;

ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

} // end namespace adios2
#endif /* ADIOS2_BINDINGS_CXX11_TYPES_H_ */
6 changes: 0 additions & 6 deletions bindings/CXX11/adios2/cxx11/Variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,6 @@ class Variable
DoAllStepsBlocksInfoMap() const;
};

#define declare_template_instantiation(T) \
extern template std::vector<typename Variable<T>::Info> \
Variable<T>::ToBlocksInfoMin(const MinVarInfo *coreVarInfo) const;
ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

template <typename T>
std::string ToString(const Variable<T> &variable);

Expand Down