specify cpu/gpu arrays for input based on mode