docs: @Override
      public org.bytedeco.javacpp.Pointer getDevicePointer(DataBuffer buffer, CudaContext context) {
          // TODO: It would be awesome to get rid of typecasting here
          //getCudaContext().syncOldStream();
          AllocationPoint dstPoint = ((BaseCudaDataBuffer) buffer).getAllocationPoint();
  
          //log.info("getDevicePointer called");
          /*
          if (configuration.getMemoryModel() == Configuration.MemoryModel.DELAYED && dstPoint.getAllocationStatus() == AllocationStatus.HOST) {
          
              // if we have constant buffer (aka shapeInfo or other constant stuff)
              if (buffer.isConstant()) {
                  Nd4j.getConstantHandler().moveToConstantSpace(buffer);
              } else {
                  PointersPair pair = memoryProvider.malloc(dstPoint.getShape(), dstPoint, AllocationStatus.DEVICE);
          
                  if (pair != null) {
                      Integer deviceId = getDeviceId();
          
                      dstPoint.getPointers().setDevicePointer(pair.getDevicePointer());
                      dstPoint.setAllocationStatus(AllocationStatus.DEVICE);
          
                      deviceAllocations.get(deviceId).put(dstPoint.getObjectId(), dstPoint.getObjectId());
          
                      zeroAllocations.get(dstPoint.getBucketId()).remove(dstPoint.getObjectId());
                      deviceMemoryTracker.addToAllocation(Thread.currentThread().getId(), deviceId, AllocationUtils.getRequiredMemory(dstPoint.getShape()));
          
          
                      dstPoint.tickHostWrite();
                  }
              }
          }
          */
  
  
          // if that's device state, we probably might want to update device memory state
          if (dstPoint.getAllocationStatus() == AllocationStatus.DEVICE) {
              if (!dstPoint.isActualOnDeviceSide()) {
                  //                log.info("Relocating to GPU");
                  relocate(AllocationStatus.HOST, AllocationStatus.DEVICE, dstPoint, dstPoint.getShape(), context);
              } else {
                  //  log.info("Buffer is actual on device side: " + dstPoint.getShape());
              }
          } //else log.info("Not on [DEVICE]");
  
  
          //  we update memory use counter, to announce that it's somehow used on device
          dstPoint.tickDeviceRead();
  
          // return pointer with offset if needed. length is specified for constructor compatibility purposes
          val p = new CudaPointer(dstPoint.getPointers().getDevicePointer(), buffer.length(),
                          (buffer.offset() * buffer.getElementSize()));
  
          if (OpProfiler.getInstance().getConfig().isCheckLocality())
               NativeOpsHolder.getInstance().getDeviceNativeOps().tryPointer(context.getOldStream(), p, 1);
  
          switch (buffer.dataType()) {
              case DOUBLE:
                  return p.asDoublePointer();
              case FLOAT:
                  return p.asFloatPointer();
              case INT:
                  return p.asIntPointer();
              case HALF:
                  return p.asShortPointer();
              case LONG:
                  return p.asLongPointer();
              default:
                  return p;
          }
      }