Home / Function/ preconditionType() — pytorch Function Reference

preconditionType() — pytorch Function Reference

Architecture documentation for the preconditionType() function in IValue.java from the pytorch codebase.

Function java AndroidRuntime JNILayer calls 1 called by 13

Entity Profile

Dependency Diagram

graph TD
  5776f59b_54a2_1fc4_cfae_d6757e07d6b1["preconditionType()"]
  b0e8ed64_2cec_f0ce_0059_a19fdbabaa42["toTensor()"]
  b0e8ed64_2cec_f0ce_0059_a19fdbabaa42 -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  44bfcda6_34ba_5b1e_79c7_65ad59482145["toBool()"]
  44bfcda6_34ba_5b1e_79c7_65ad59482145 -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  55c1f43d_97b8_70af_c9e2_f63f38796205["toLong()"]
  55c1f43d_97b8_70af_c9e2_f63f38796205 -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  e5cdea31_f15d_0a7c_ead9_98382b2f71d9["toDouble()"]
  e5cdea31_f15d_0a7c_ead9_98382b2f71d9 -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  a1ace5b9_29b7_b197_0483_2432092ad4ce["toStr()"]
  a1ace5b9_29b7_b197_0483_2432092ad4ce -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  b08aed3f_e9c9_5a9c_f608_829858eb1a97["toBoolList()"]
  b08aed3f_e9c9_5a9c_f608_829858eb1a97 -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  841f1554_c71d_9809_7e92_4e4c5f04ea05["toLongList()"]
  841f1554_c71d_9809_7e92_4e4c5f04ea05 -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  154f7557_19ae_e0f9_8027_676f922149b0["toDoubleList()"]
  154f7557_19ae_e0f9_8027_676f922149b0 -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  2a899e4c_9b04_5acf_498f_3d3583e03df7["toTensorList()"]
  2a899e4c_9b04_5acf_498f_3d3583e03df7 -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  89359c79_93b1_a319_c8f1_a8a289190399["toList()"]
  89359c79_93b1_a319_c8f1_a8a289190399 -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  301bac6b_84f8_412f_ed21_2fc9b04ac57a["toTuple()"]
  301bac6b_84f8_412f_ed21_2fc9b04ac57a -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  ac0370d4_f779_1558_b54a_11a11c71b098["toDictStringKey()"]
  ac0370d4_f779_1558_b54a_11a11c71b098 -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  fa020226_128e_9ca8_1b1a_bdf5ff46472c["toDictLongKey()"]
  fa020226_128e_9ca8_1b1a_bdf5ff46472c -->|calls| 5776f59b_54a2_1fc4_cfae_d6757e07d6b1
  5d1769a5_5554_42c3_f5f8_e8e781d3145c["getTypeName()"]
  5776f59b_54a2_1fc4_cfae_d6757e07d6b1 -->|calls| 5d1769a5_5554_42c3_f5f8_e8e781d3145c
  style 5776f59b_54a2_1fc4_cfae_d6757e07d6b1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

android/pytorch_android/src/main/java/org/pytorch/IValue.java lines 329–338

  private void preconditionType(int typeCodeExpected, int typeCode) {
    if (typeCode != typeCodeExpected) {
      throw new IllegalStateException(
          String.format(
              Locale.US,
              "Expected IValue type %s, actual type %s",
              getTypeName(typeCodeExpected),
              getTypeName(typeCode)));
    }
  }

Subdomains

Frequently Asked Questions

What does preconditionType() do?
preconditionType() is a function in the pytorch codebase.
What does preconditionType() call?
preconditionType() calls 1 function(s): getTypeName.
What calls preconditionType()?
preconditionType() is called by 13 function(s): toBool, toBoolList, toDictLongKey, toDictStringKey, toDouble, toDoubleList, toList, toLong, and 5 more.

Analyze Your Own Codebase

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

Try Supermodel Free