Home / Function/ allocateFloatBuffer() — pytorch Function Reference

allocateFloatBuffer() — pytorch Function Reference

Architecture documentation for the allocateFloatBuffer() function in Tensor.java from the pytorch codebase.

Entity Profile

Dependency Diagram

graph TD
  033b0d29_939c_36ed_1162_fbed5ef045ff["allocateFloatBuffer()"]
  fff97aed_e384_1976_ed4b_d94a2ed220dd["fromBlob()"]
  fff97aed_e384_1976_ed4b_d94a2ed220dd -->|calls| 033b0d29_939c_36ed_1162_fbed5ef045ff
  075236f7_07e3_50da_aa45_e689eb75aec6["bitmapToFloat32Tensor()"]
  075236f7_07e3_50da_aa45_e689eb75aec6 -->|calls| 033b0d29_939c_36ed_1162_fbed5ef045ff
  e7383de7_aca7_58ff_fd0d_6065330d96d2["imageYUV420CenterCropToFloat32Tensor()"]
  e7383de7_aca7_58ff_fd0d_6065330d96d2 -->|calls| 033b0d29_939c_36ed_1162_fbed5ef045ff
  style 033b0d29_939c_36ed_1162_fbed5ef045ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

android/pytorch_android/src/main/java/org/pytorch/Tensor.java lines 79–83

  public static FloatBuffer allocateFloatBuffer(int numElements) {
    return ByteBuffer.allocateDirect(numElements * FLOAT_SIZE_BYTES)
        .order(ByteOrder.nativeOrder())
        .asFloatBuffer();
  }

Subdomains

Frequently Asked Questions

What does allocateFloatBuffer() do?
allocateFloatBuffer() is a function in the pytorch codebase.
What calls allocateFloatBuffer()?
allocateFloatBuffer() is called by 3 function(s): bitmapToFloat32Tensor, fromBlob, imageYUV420CenterCropToFloat32Tensor.

Analyze Your Own Codebase

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

Try Supermodel Free