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
  af41549e_1d99_2a69_bc90_d5028530fd92["allocateFloatBuffer()"]
  7d987baf_1d44_31d6_f128_18964ed36ba8["fromBlob()"]
  7d987baf_1d44_31d6_f128_18964ed36ba8 -->|calls| af41549e_1d99_2a69_bc90_d5028530fd92
  c81bb7ae_2eee_9e76_fb40_f1e6bea8df1f["bitmapToFloat32Tensor()"]
  c81bb7ae_2eee_9e76_fb40_f1e6bea8df1f -->|calls| af41549e_1d99_2a69_bc90_d5028530fd92
  da0052aa_0d0f_9bda_a558_296d9703af6b["imageYUV420CenterCropToFloat32Tensor()"]
  da0052aa_0d0f_9bda_a558_296d9703af6b -->|calls| af41549e_1d99_2a69_bc90_d5028530fd92
  style af41549e_1d99_2a69_bc90_d5028530fd92 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