Started writing Halide average routine