Home / Class/ NativePeer Class — pytorch Architecture

NativePeer Class — pytorch Architecture

Architecture documentation for the NativePeer class in TensorImageUtils.java from the pytorch codebase.

Entity Profile

Relationship Graph

Source Code

android/pytorch_android_torchvision/src/main/java/org/pytorch/torchvision/TensorImageUtils.java lines 337–363

  private static class NativePeer {
    static {
      if (!NativeLoader.isInitialized()) {
        NativeLoader.init(new SystemDelegate());
      }
      NativeLoader.loadLibrary("pytorch_vision_jni");
    }

    private static native void imageYUV420CenterCropToFloatBuffer(
        ByteBuffer yBuffer,
        int yRowStride,
        int yPixelStride,
        ByteBuffer uBuffer,
        ByteBuffer vBuffer,
        int uvRowStride,
        int uvPixelStride,
        int imageWidth,
        int imageHeight,
        int rotateCWDegrees,
        int tensorWidth,
        int tensorHeight,
        float[] normMeanRgb,
        float[] normStdRgb,
        Buffer outBuffer,
        int outBufferOffset,
        int memoryFormatJniCode);
  }

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free