QMCPACK
ParticleAttribXmlNode< PAT > Struct Template Reference
+ Collaboration diagram for ParticleAttribXmlNode< PAT >:

Public Member Functions

 ParticleAttribXmlNode (PAT &a, PosUnit utype)
 
bool put (xmlNodePtr cur, int in_offset, int copy_size, int out_offset)
 

Public Attributes

PAT & ref_
 

Detailed Description

template<typename PAT>
struct qmcplusplus::ParticleAttribXmlNode< PAT >

Definition at line 410 of file XMLParticleIO.cpp.

Constructor & Destructor Documentation

◆ ParticleAttribXmlNode()

ParticleAttribXmlNode ( PAT &  a,
PosUnit  utype 
)
inline

Definition at line 414 of file XMLParticleIO.cpp.

References ParticleAttribXmlNode< PAT >::ref_.

414 : ref_(a) { ref_.InUnit = utype; }

Member Function Documentation

◆ put()

bool put ( xmlNodePtr  cur,
int  in_offset,
int  copy_size,
int  out_offset 
)
inline

Definition at line 416 of file XMLParticleIO.cpp.

References qmcplusplus::syclBLAS::copy_n(), putContent(), and ParticleAttribXmlNode< PAT >::ref_.

417  {
418  using data_type = typename PAT::Type_t;
419  std::vector<data_type> data_in;
420  putContent(data_in, cur);
421  if (data_in.size() < in_offset + copy_size)
422  {
423  std::ostringstream msg;
424  msg << "Insufficient data to copy from XML input which holds " << data_in.size() << " entries."
425  << " Need to copy from [" << in_offset << ", " << in_offset + copy_size << ")." << std::endl;
426  throw UniformCommunicateError(msg.str());
427  }
428  std::copy_n(data_in.begin() + in_offset, copy_size, ref_.begin() + out_offset);
429  return true;
430  }
bool putContent(T &a, xmlNodePtr cur)
replaces a&#39;s value with the first "element" in the "string" returned by XMLNodeString{cur}.
Definition: libxmldefs.h:88
sycl::event copy_n(sycl::queue &aq, const T1 *restrict VA, size_t array_size, T2 *restrict VC, const std::vector< sycl::event > &events)
Definition: syclBLAS.cpp:548

Member Data Documentation

◆ ref_


The documentation for this struct was generated from the following file: