icetCopyState(3)

✨ icetCopyState(3) β€” IceT Reference ✨

okay bestie, welcome to the IceT Reference manual page for icetCopyState πŸ’– this one's a lil cutie that just clones vibes from one context to another, no cap.


🌸 NAME 🌸

icetCopyState β€” copy state machine of one context to another. literally that's the whole job description, and she ate πŸ’…


πŸ¦‹ Synopsis πŸ¦‹

#include <IceT.h>

void icetCopyState(   IceTContext         dest,
                      const IceTContext   src  );

✨ Description ✨

so the icetCopyState function does the thing where it replaces the state of dest with the current state of src. it's giving "make this one look exactly like that one." you can use it to quickly duplicate a context β€” it's the fast-pass, the copy-paste, the πŸ’« dupe glitch πŸ’« (but legal).

but β€” and this is the important part, bestie, do not skip this β€” the IceTCommunicator object associated with dest is not changed. like, ever. it can't be. it's not that kind of function. periodt.

so because of that, these state values don't get copied either, since they all refer to process ids that are directly tied to the IceTCommunicator object:

  • ICET_RANK
  • ICET_NUM_PROCESSES
  • ICET_DATA_REPLICATION_GROUP
  • ICET_DATA_REPLICATION_GROUP_SIZE
  • ICET_COMPOSITE_ORDER
  • ICET_PROCESS_ORDERS

those six are staying home 🏠 everyone else is coming to the party tho β€” every other state parameter is copied. yes, all of them. iconic behavior honestly πŸ‘‘


😭 Errors 😭

None.

like... none. zero. the void. nothing to report 🫢


πŸ™ˆ Warnings πŸ™ˆ

None.

again β€” nothing. we're chilling.


πŸ’€ Bugs πŸ’€

okay so here's the tea β˜• and it's a lil spicy:

the state is copied blindly.

which means it is therefore possible to copy states that are invalid for a context's communicator. for example, a display rank may not refer to a valid process id. 🚨 so like, she's not checking your work. she's just copying. you have been warned, bestie.


🧚 Notes 🧚

behavior is undefined if dest or src has never been created or has already been destroyed.

undefined behavior is not a vibe. do not pass go. do not collect $200. make sure your contexts are alive before you do this πŸ’œ

Copyright (C)2003 Sandia Corporation

Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This source code is released under the New BSD License.


🌈 See Also 🌈

go read those too, they're the friend group 🫢


and that's the whole page, bestie!! this was the IceT Reference manual, dated August 9, 2010, sourced from the IceT Reference itself β€” mwah, ty for reading, slay, bye πŸ’…βœ¨πŸŽ€