code: @Override
      public DataBuffer relocateConstantSpace(DataBuffer dataBuffer) {
          // we always assume that data is sync, and valid on host side
          Integer deviceId = AtomicAllocator.getInstance().getDeviceId();
          ensureMaps(deviceId);
  
          if (dataBuffer instanceof CudaIntDataBuffer) {
              int[] data = dataBuffer.asInt();
              return getConstantBuffer(data, DataType.INT);
          } else if (dataBuffer instanceof CudaFloatDataBuffer) {
              float[] data = dataBuffer.asFloat();
              return getConstantBuffer(data, DataType.FLOAT);
          } else if (dataBuffer instanceof CudaDoubleDataBuffer) {
              double[] data = dataBuffer.asDouble();
              return getConstantBuffer(data, DataType.DOUBLE);
          } else if (dataBuffer instanceof CudaHalfDataBuffer) {
              float[] data = dataBuffer.asFloat();
              return getConstantBuffer(data, DataType.HALF);
          } else if (dataBuffer instanceof CudaLongDataBuffer) {
              long[] data = dataBuffer.asLong();
              return getConstantBuffer(data, DataType.LONG);
          }
  
          throw new IllegalStateException("Unknown CudaDataBuffer opType");
      }
docs: PLEASE NOTE: This method implementation is hardware-dependant.
  PLEASE NOTE: This method does NOT allow concurrent use of any array
  
  @param dataBuffer
  @return