wow, casting isnt bad at all (when you remember the parens). can cast whatever I want, it seems.
cast to float, then back to uchar
set up gradY. cleanup commented-out code.
magnitudes
magnitudes
trying to do argmax trick with RDom. not working very well so far.
hmm, arg_max_f() compiles so long as it doesnt need any dims...
hmm, I wonder if all of these params need to be in the RDom...
posting a question about this 'argmax channel' stuff on halide-dev
hacked up a channel argmax with ternaries. havent tested it, but it compiles. (not exactly ternaries, but 'select' which is a mockup of tenaries)
cleanup
hack to make my argmax compile to file
cleaned up some experiments (it lives on in my inbox and on the halide-dev list)
playing with cachegrind. L1 miss rate = 1.3% for just the gradient
aha, we compute the gradients for the *same img* twice for the octave level sbin=4 and the next octave sbin=8. if we're willing up to give up some composition, we could avoid this.
doing the 'sbin=8, resolution/2' pyra level is just ~10ms with openmp