icetStrategy(3)

πŸ’– icetStrategy(3) β€” IceT Reference πŸ’–

okay bestie, gather round, because this one is literally the vibe-setter for how IceT composites your images. it's icetStrategy(3), she's from the IceT Reference, and she is the main character of your multi-tile render pipeline. let's get into it 🫢


✨ NAME ✨

icetStrategy β€” set the strategy used to composite images. that's it, that's the job, and she eats every time πŸ’…


✨ Synopsis ✨

#include <IceT.h>

void icetStrategy(   IceTEnum   strategy  );

one function, one argument, infinite slay. no cap.


✨ Description ✨

so here's the tea: the IceT API comes packaged with several algorithms for compositing images, and the algorithm you get is determined by selecting a strategy. you select it with icetStrategy. simple as that 🌸

🚨 IMPORTANT BESTIE ALERT 🚨 a strategy must be selected before icetDrawFrame, icetCompositeImage, or icetGLDrawFrame is called. like, before. not during. before. periodt.

you pick a strategy from one of these provided enumerated values πŸ‘‡

  • ICET_STRATEGY_SEQUENTIAL β€” basically applies a "traditional" single tile composition (such as binary swap) to each tile in the order they were defined. here's the catch tho: because each process must take part in the composition of each tile regardless of whether they draw into it, this strategy is usually inefficient when compositing for more than one tile. but it's recommended for the single tile case because it bypasses some of the communication necessary for the other multi-tile strategies. so like, one tile? iconic. many tiles? not it 😭
  • ICET_STRATEGY_DIRECT β€” as each process renders an image for a tile, that image is sent directly to the process that will display that tile. this usually results in a few processes receiving and processing the majority of the data, and is therefore usually an inefficient strategy. it's giving "everyone dump your stuff on the same three people" πŸ’€
  • ICET_STRATEGY_SPLIT β€” like ICET_STRATEGY_DIRECT, except that the tiles are split up, and each process is assigned a piece of a tile in such a way that each process receives and handles about the same amount of data. this strategy is often very efficient, but due to the large amount of messages passed, it has not proven to be very scalable or robust. so like… fast but fragile, yk? πŸ¦‹
  • ICET_STRATEGY_REDUCE β€” a two phase algorithm. in the first phase, tile images are redistributed such that each process has one image for one tile. in the second phase, a "traditional" single tile composition is performed for each tile. since each process contains an image for only one tile, all these compositions may happen simultaneously ✨ this is a well rounded strategy that seems to perform well in a wide variety of multi-tile applications. (however, in the special case where only one tile is defined, the sequential strategy is probably better.) she's balanced, she's reliable, she's the moment πŸ‘‘
  • ICET_STRATEGY_VTREE β€” an extension to the binary tree algorithm for image composition. sets up a "virtual" composition tree for each tile image. processes that belong to multiple trees (because they render to more than one tile) are allowed to float between trees. this strategy is not quite as well load balanced as ICET_STRATEGY_REDUCE or ICET_STRATEGY_SPLIT, but has very well behaved network communication. lowkey the polite one of the group 🌈

πŸŽ€ the ordered composite situation πŸŽ€

not all of the strategies support ordered image composition, and this matters, so listen up:

  • ICET_STRATEGY_SEQUENTIAL, ICET_STRATEGY_DIRECT, and ICET_STRATEGY_REDUCE do support ordered image composition. βœ…
  • ICET_STRATEGY_SPLIT and ICET_STRATEGY_VTREE do not support ordered image composition and will ignore ICET_ORDERED_COMPOSITE if it is enabled. ❌

🧚 sub-strategy moment 🧚

some of the strategies, namely ICET_STRATEGY_SEQUENTIAL and ICET_STRATEGY_REDUCE, use a sub-strategy that composites the image for a single tile. this single image strategy can also be specified with icetSingleImageStrategy. iykyk πŸ’œ


✨ Errors ✨

  • ICET_INVALID_ENUM β€” the strategy argument does not represent a valid strategy. bestie. bestie. that's not a strategy. πŸ™ˆ

✨ Warnings ✨

None. flawless, no notes, we love to see it πŸ’–


✨ Bugs ✨

None known. she's bug-free and she knows it πŸ’…


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 ✨

icetCompositeImage(3), icetDrawFrame(3), icetGetStrategyName(3), icetGLDrawFrame(3), icetSingleImageStrategy(3)

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


and that's the whole page babes ✨ this was the IceT Reference, dated September 26, 2014 β€” mwah, historic, iconic, no cap πŸ’–πŸŽ€πŸ¦‹