Previous | Next --- Slide 39 of 63
Back to Lecture Thumbnails
abraoliv

Does Hailide provide conditional/diverget flow control features? i.e. could you run specific Hailide functions on a tile of the image on the condition that a face exists in the tile? Or does the programmer essentially need to bitmask out given pixels from given actions manually?

riglesias

@abraoliv I believe there are several ways to do this:

  • If you're going to do something like a scan and you know in advance what to skip, you can probably just include something like: "if x or y are in this range, just set the output equal to the input"
  • Otherwise, you can manually create a box that specifies where your input will go. I believe the section titled " // Splitting by factors that don't divide the extent." does what you want (Source: https://halide-lang.org/tutorials/tutorial_lesson_05_scheduling_1.html) , but I'm not sure... Lemme know if I misinterpreted your question!

Please log in to leave a comment.