58#define DEFINE_BUILTIN_TRAIT_CLASS(T) \
60struct MessageTypeIntrinsic<T> { \
61 enum { builtin = 1 }; \
62 enum { pointer = 0 }; \
65struct MessageTypeIntrinsic<T *> { \
66 enum { builtin = 1 }; \
67 enum { pointer = 1 }; \
70struct MessageTypeIntrinsic<T[N]> { \
71 enum { builtin = 1 }; \
72 enum { pointer = 1 }; \
75#define DEFINE_ALL_BUILTIN_TRAIT_CLASS(T) \
76DEFINE_BUILTIN_TRAIT_CLASS(T) \
77DEFINE_BUILTIN_TRAIT_CLASS(const T)
97template <class
T,
bool builtin,
bool pointer>
169 MsgItem(
void *d,
unsigned int elems,
unsigned int totbytes,
173 if (totbytes > 0 && d != 0)
185 item = malloc(totbytes);
188 memcpy(
item, d, totbytes);
302 return (
size() == 0);
421 return putmsg((
void *)d,
sizeof(
char), strlen(d) + 1);
426 int len = s.length() + 1;
436 template <
class ForwardIterator>
449 template <
class RandomAccessIterator>
451 RandomAccessIterator beg)
478 T& val =
const_cast<T&
>(cval);
487 std::string& ncs =
const_cast<std::string&
>(s);
490 char* cstring =
new char[len];
510 template <
class OutputIterator>
555template<
class ForwardIterator>
562template <
class RandomAccessIterator>
564 RandomAccessIterator r)
594template<
class OutputIterator>
PartBunchBase< T, Dim >::ConstIterator end(PartBunchBase< T, Dim > const &bunch)
void putMessage(Message &m, const T &t)
#define DEFINE_ALL_BUILTIN_TRAIT_CLASS(T)
void getMessage_iter(Message &m, OutputIterator o)
void getMessage(Message &m, T &t)
std::ostream & operator<<(std::ostream &o, const Message &m)
MMatrix< m_complex > complex(MMatrix< double > real)
constexpr double c
The velocity of light in m/s.
Message & get_iter(OutputIterator o)
Message & putmsg(void *, int, int=0)
Message & setCopy(const bool c)
Message & put(const char *d)
Message & put(const std::string &s)
const MsgItem & item(size_t n) const
Message & put(const T &val)
Message & put(ForwardIterator beg, ForwardIterator end)
Message & get(const std::string &s)
Message(unsigned int numelems=8)
Message & put(const std::vector< size_t > &indices, RandomAccessIterator beg)
std::vector< MsgItem > MsgItemList
Message & setDelete(const bool c)
void useCommunicate(Communicate *c, void *d)
Message & get(const T &cval)
unsigned int numBytes() const
MsgItem(void *d, unsigned int elems, unsigned int totbytes, bool needcopy, bool needdel)
unsigned int elemSize() const
bool willNeedDelete() const
unsigned int numElems() const
MsgItem(const MsgItem &m)
MsgItemBuf(const MsgItemBuf &m)