Modified array_memory_block.cpp to allocate CUDA memory on either the host or device