Advertisement
Kitomas

coreVector_notes.txt

Aug 11th, 2023
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. (in practice, redundant operations are supposed to be trimmed)
  2. sub z:
  3. if !3d: error "cannot change z on non-3d vector"
  4. -realloc z
  5. sub y:
  6. if 1d: error "cannot change y on 1d vector"
  7. if 3d: free z in old y
  8. -realloc y
  9. sub x:
  10. if 3d: free z in y in old x
  11. if >=2d: free y in old x
  12. -realloc x
  13. add x:
  14. +realloc x
  15. if >=2d: malloc y in new x
  16. if 3d: malloc z in new y in new x
  17. add y:
  18. if 1d: error "cannot change y on 1d vector"
  19. +realloc y
  20. if 3d: malloc z in new y
  21. add z:
  22. if !3d: error "cannot change z on non-3d vector"
  23. +realloc z
  24.  
  25.  
  26. (priority is sub x,y,z then add x,y,z)
  27.  
  28. _0x_0y_0z: (RETURN W/O ACTION)
  29.  
  30. SUB
  31. _Nx_0y_0z: (atomic)
  32. sub x
  33. _0x_Ny_0z: (atomic)
  34. sub y
  35. _0x_0y_Nz: (atomic)
  36. sub z
  37. _Nx_Ny_0z: (_Nx_0y_0z,_0x_Ny_0z)
  38. sub x
  39. sub y
  40. _0x_Ny_Nz: (_0x_Ny_0z,_0x_0y_Nz)
  41. sub y
  42. sub z
  43. _Nx_0y_Nz: (_Nx_0y_0z,_0x_0y_Nz)
  44. sub x
  45. sub z
  46. _Nx_Ny_Nz: (_Nx_Ny_0z,_0x_0y_Nz)
  47. sub x
  48. sub y
  49. sub z
  50.  
  51. ADD
  52. _Px_0y_0z: (atomic)
  53. add x
  54. _0x_Py_0z: (atomic)
  55. add y
  56. _0x_0y_Pz: (atomic)
  57. add z
  58. _Px_Py_0z: (_Px_0y_0z,_0x_Py_0z)
  59. add x
  60. add y
  61. _0x_Py_Pz: (_0x_Py_0z,_0x_0y_Pz)
  62. add y
  63. add z
  64. _Px_0y_Pz: (_Px_0y_0z,_0x_0y_Pz)
  65. add x
  66. add z
  67. _Px_Py_Pz: (_Px_Py_0z,_0x_0y_Pz)
  68. add x
  69. add y
  70. add z
  71.  
  72. SUBX ADDYZ
  73. _Nx_Py_0z: (_Nx_0y_0z, _0x_Py_0z)
  74. sub x
  75. add y
  76. _Nx_0y_Pz: (_Nx_0y_0z, _0x_0y_Pz)
  77. sub x
  78. add z
  79. _Nx_Py_Pz: (_Nx_0y_0z, _0x_Py_Pz)
  80. sub x
  81. add y
  82. add z
  83.  
  84. SUBY ADDXZ
  85. _Px_Ny_0z: (_0x_Ny_0z, _Px_0y_0z)
  86. sub y
  87. add x
  88. _0x_Ny_Pz: (_0x_Ny_0z, _0x_0y_Pz)
  89. sub y
  90. add z
  91. _Px_Ny_Pz: (_0x_Ny_0z, _Px_0y_Pz)
  92. sub y
  93. add x
  94. add z
  95.  
  96. SUBZ ADDXY
  97. _Px_0y_Nz: (_0x_0y_Nz, _Px_0y_0z)
  98. sub z
  99. add x
  100. _0x_Py_Nz: (_0x_0y_Nz, _0x_Py_0z)
  101. sub z
  102. add y
  103. _Px_Py_Nz: (_0x_0y_Nz, _Px_Py_0z)
  104. sub z
  105. add x
  106. add y
  107.  
  108. SUBXYZ ADDXYZ
  109. _Nx_Ny_Pz: (_Nx_Ny_0z, _0x_0y_Pz)
  110. sub x
  111. sub y
  112. add z
  113. _Px_Ny_Nz: (_0x_Ny_Nz, _Px_0y_0z)
  114. sub y
  115. sub z
  116. add x
  117. _Nx_Py_Nz: (_Nx_0y_Nz, _0x_Py_0z)
  118. sub x
  119. sub z
  120. add y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement