Halide and gridding support for DNA

Routines to allocate images.