vitrio 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (513) hide show
  1. vitrio-0.1.0/.clang-tidy +48 -0
  2. vitrio-0.1.0/.editorconfig +18 -0
  3. vitrio-0.1.0/.gitignore +49 -0
  4. vitrio-0.1.0/AGENTS.md +248 -0
  5. vitrio-0.1.0/CLAUDE.md +1 -0
  6. vitrio-0.1.0/CMakeLists.txt +111 -0
  7. vitrio-0.1.0/CMakePresets.json +118 -0
  8. vitrio-0.1.0/LICENSE +504 -0
  9. vitrio-0.1.0/PKG-INFO +106 -0
  10. vitrio-0.1.0/README.md +79 -0
  11. vitrio-0.1.0/VERSION +1 -0
  12. vitrio-0.1.0/cmake/config/vitrio-config.cmake.in +5 -0
  13. vitrio-0.1.0/cmake/modules/Findhalf.cmake +28 -0
  14. vitrio-0.1.0/cmake/modules/vitrio_enable_warnings.cmake +32 -0
  15. vitrio-0.1.0/cmake/scripts/copy_dynamic_libraries.cmake +7 -0
  16. vitrio-0.1.0/include/vitrio/array/array.hpp +149 -0
  17. vitrio-0.1.0/include/vitrio/array/array_descriptor.hpp +167 -0
  18. vitrio-0.1.0/include/vitrio/array/array_ref.hpp +102 -0
  19. vitrio-0.1.0/include/vitrio/array/const_array.hpp +109 -0
  20. vitrio-0.1.0/include/vitrio/array/const_array_ref.hpp +119 -0
  21. vitrio-0.1.0/include/vitrio/array/numerical_type.hpp +74 -0
  22. vitrio-0.1.0/include/vitrio/byte.hpp +16 -0
  23. vitrio-0.1.0/include/vitrio/caching_image_reader_provider.hpp +84 -0
  24. vitrio-0.1.0/include/vitrio/clipping_image_transfer_sanitizer.hpp +43 -0
  25. vitrio-0.1.0/include/vitrio/concurrency/completion.hpp +49 -0
  26. vitrio-0.1.0/include/vitrio/concurrency/completion_notifier.hpp +47 -0
  27. vitrio-0.1.0/include/vitrio/concurrency/counting_completion.hpp +81 -0
  28. vitrio-0.1.0/include/vitrio/concurrency/executor.hpp +48 -0
  29. vitrio-0.1.0/include/vitrio/concurrency/synchronous_executor.hpp +52 -0
  30. vitrio-0.1.0/include/vitrio/concurrency/task.hpp +34 -0
  31. vitrio-0.1.0/include/vitrio/concurrency/thread_pool_executor.hpp +83 -0
  32. vitrio-0.1.0/include/vitrio/exceptions/image_file_error.hpp +27 -0
  33. vitrio-0.1.0/include/vitrio/exceptions/image_file_format_error.hpp +27 -0
  34. vitrio-0.1.0/include/vitrio/exceptions/unsupported_operation_error.hpp +27 -0
  35. vitrio-0.1.0/include/vitrio/executor_image_loader.hpp +66 -0
  36. vitrio-0.1.0/include/vitrio/executor_image_saver.hpp +67 -0
  37. vitrio-0.1.0/include/vitrio/file_image_reader_provider.hpp +55 -0
  38. vitrio-0.1.0/include/vitrio/file_image_writer_provider.hpp +136 -0
  39. vitrio-0.1.0/include/vitrio/host_image_scratch_storage.hpp +31 -0
  40. vitrio-0.1.0/include/vitrio/image_descriptor.hpp +147 -0
  41. vitrio-0.1.0/include/vitrio/image_file_format_registration.hpp +39 -0
  42. vitrio-0.1.0/include/vitrio/image_file_format_registration.inl +25 -0
  43. vitrio-0.1.0/include/vitrio/image_file_format_suitability.hpp +76 -0
  44. vitrio-0.1.0/include/vitrio/image_file_format_suitability.inl +69 -0
  45. vitrio-0.1.0/include/vitrio/image_file_probe.hpp +108 -0
  46. vitrio-0.1.0/include/vitrio/image_file_read_format.hpp +77 -0
  47. vitrio-0.1.0/include/vitrio/image_file_read_format_registry.hpp +75 -0
  48. vitrio-0.1.0/include/vitrio/image_file_read_format_selector.hpp +113 -0
  49. vitrio-0.1.0/include/vitrio/image_file_write_format.hpp +88 -0
  50. vitrio-0.1.0/include/vitrio/image_file_write_format_registry.hpp +76 -0
  51. vitrio-0.1.0/include/vitrio/image_file_write_format_selector.hpp +115 -0
  52. vitrio-0.1.0/include/vitrio/image_loader.hpp +66 -0
  53. vitrio-0.1.0/include/vitrio/image_location.hpp +220 -0
  54. vitrio-0.1.0/include/vitrio/image_location_grouping.hpp +130 -0
  55. vitrio-0.1.0/include/vitrio/image_metadata.hpp +38 -0
  56. vitrio-0.1.0/include/vitrio/image_read.hpp +202 -0
  57. vitrio-0.1.0/include/vitrio/image_reader.hpp +127 -0
  58. vitrio-0.1.0/include/vitrio/image_reader_provider.hpp +75 -0
  59. vitrio-0.1.0/include/vitrio/image_saver.hpp +65 -0
  60. vitrio-0.1.0/include/vitrio/image_scratch.hpp +51 -0
  61. vitrio-0.1.0/include/vitrio/image_scratch_entry.hpp +95 -0
  62. vitrio-0.1.0/include/vitrio/image_scratch_open_mode.hpp +21 -0
  63. vitrio-0.1.0/include/vitrio/image_scratch_storage.hpp +59 -0
  64. vitrio-0.1.0/include/vitrio/image_transaction_plan.hpp +186 -0
  65. vitrio-0.1.0/include/vitrio/image_transfer_plan.hpp +135 -0
  66. vitrio-0.1.0/include/vitrio/image_transfer_sanitizer.hpp +68 -0
  67. vitrio-0.1.0/include/vitrio/image_transfer_shape.hpp +123 -0
  68. vitrio-0.1.0/include/vitrio/image_write.hpp +141 -0
  69. vitrio-0.1.0/include/vitrio/image_writer.hpp +103 -0
  70. vitrio-0.1.0/include/vitrio/image_writer_provider.hpp +55 -0
  71. vitrio-0.1.0/include/vitrio/index_table.hpp +115 -0
  72. vitrio-0.1.0/include/vitrio/indexed_image_scratch.hpp +197 -0
  73. vitrio-0.1.0/include/vitrio/interned_key_list.hpp +178 -0
  74. vitrio-0.1.0/include/vitrio/library_version.hpp +22 -0
  75. vitrio-0.1.0/include/vitrio/mapped_file_image_scratch_storage.hpp +43 -0
  76. vitrio-0.1.0/include/vitrio/platform.hpp +47 -0
  77. vitrio-0.1.0/include/vitrio/scratch_image_reader_provider.hpp +58 -0
  78. vitrio-0.1.0/include/vitrio/span.hpp +217 -0
  79. vitrio-0.1.0/include/vitrio/span.inl +129 -0
  80. vitrio-0.1.0/include/vitrio/strict_image_transfer_sanitizer.hpp +41 -0
  81. vitrio-0.1.0/include/vitrio/version.hpp +123 -0
  82. vitrio-0.1.0/include/vitrio/version.inl +36 -0
  83. vitrio-0.1.0/pyproject.toml +158 -0
  84. vitrio-0.1.0/python/CMakeLists.txt +131 -0
  85. vitrio-0.1.0/python/src/CMakeLists.txt +35 -0
  86. vitrio-0.1.0/python/src/array/CMakeLists.txt +11 -0
  87. vitrio-0.1.0/python/src/array/array.cpp +145 -0
  88. vitrio-0.1.0/python/src/array/array.hpp +17 -0
  89. vitrio-0.1.0/python/src/array/array_import.cpp +182 -0
  90. vitrio-0.1.0/python/src/array/array_import.hpp +49 -0
  91. vitrio-0.1.0/python/src/array/dlpack_data_type.cpp +80 -0
  92. vitrio-0.1.0/python/src/array/dlpack_data_type.hpp +30 -0
  93. vitrio-0.1.0/python/src/array/host_ndarray.hpp +27 -0
  94. vitrio-0.1.0/python/src/array/memory_loan.cpp +41 -0
  95. vitrio-0.1.0/python/src/array/memory_loan.hpp +57 -0
  96. vitrio-0.1.0/python/src/array/numerical_type.cpp +32 -0
  97. vitrio-0.1.0/python/src/array/numerical_type.hpp +17 -0
  98. vitrio-0.1.0/python/src/caching_image_reader_provider.cpp +38 -0
  99. vitrio-0.1.0/python/src/caching_image_reader_provider.hpp +17 -0
  100. vitrio-0.1.0/python/src/concurrency/CMakeLists.txt +11 -0
  101. vitrio-0.1.0/python/src/concurrency/completion.cpp +26 -0
  102. vitrio-0.1.0/python/src/concurrency/completion.hpp +17 -0
  103. vitrio-0.1.0/python/src/concurrency/executor.cpp +17 -0
  104. vitrio-0.1.0/python/src/concurrency/executor.hpp +17 -0
  105. vitrio-0.1.0/python/src/concurrency/memory_loan_completion.cpp +43 -0
  106. vitrio-0.1.0/python/src/concurrency/memory_loan_completion.hpp +58 -0
  107. vitrio-0.1.0/python/src/concurrency/synchronous_executor.cpp +19 -0
  108. vitrio-0.1.0/python/src/concurrency/synchronous_executor.hpp +17 -0
  109. vitrio-0.1.0/python/src/concurrency/thread_pool_executor.cpp +49 -0
  110. vitrio-0.1.0/python/src/concurrency/thread_pool_executor.hpp +17 -0
  111. vitrio-0.1.0/python/src/executor_image_loader.cpp +31 -0
  112. vitrio-0.1.0/python/src/executor_image_loader.hpp +17 -0
  113. vitrio-0.1.0/python/src/executor_image_saver.cpp +31 -0
  114. vitrio-0.1.0/python/src/executor_image_saver.hpp +17 -0
  115. vitrio-0.1.0/python/src/file_image_reader_provider.cpp +32 -0
  116. vitrio-0.1.0/python/src/file_image_reader_provider.hpp +17 -0
  117. vitrio-0.1.0/python/src/file_image_writer_provider.cpp +70 -0
  118. vitrio-0.1.0/python/src/file_image_writer_provider.hpp +17 -0
  119. vitrio-0.1.0/python/src/image_descriptor.cpp +82 -0
  120. vitrio-0.1.0/python/src/image_descriptor.hpp +17 -0
  121. vitrio-0.1.0/python/src/image_file_read_format_selector.cpp +26 -0
  122. vitrio-0.1.0/python/src/image_file_read_format_selector.hpp +17 -0
  123. vitrio-0.1.0/python/src/image_file_write_format_selector.cpp +26 -0
  124. vitrio-0.1.0/python/src/image_file_write_format_selector.hpp +17 -0
  125. vitrio-0.1.0/python/src/image_loader.cpp +17 -0
  126. vitrio-0.1.0/python/src/image_loader.hpp +17 -0
  127. vitrio-0.1.0/python/src/image_location.cpp +122 -0
  128. vitrio-0.1.0/python/src/image_location.hpp +17 -0
  129. vitrio-0.1.0/python/src/image_read.cpp +164 -0
  130. vitrio-0.1.0/python/src/image_read.hpp +17 -0
  131. vitrio-0.1.0/python/src/image_reader_provider.cpp +45 -0
  132. vitrio-0.1.0/python/src/image_reader_provider.hpp +17 -0
  133. vitrio-0.1.0/python/src/image_saver.cpp +17 -0
  134. vitrio-0.1.0/python/src/image_saver.hpp +17 -0
  135. vitrio-0.1.0/python/src/image_write.cpp +148 -0
  136. vitrio-0.1.0/python/src/image_write.hpp +17 -0
  137. vitrio-0.1.0/python/src/image_writer_provider.cpp +17 -0
  138. vitrio-0.1.0/python/src/image_writer_provider.hpp +17 -0
  139. vitrio-0.1.0/python/src/index_table.cpp +224 -0
  140. vitrio-0.1.0/python/src/index_table.hpp +17 -0
  141. vitrio-0.1.0/python/src/index_tuple.cpp +21 -0
  142. vitrio-0.1.0/python/src/index_tuple.hpp +31 -0
  143. vitrio-0.1.0/python/src/library_version.cpp +38 -0
  144. vitrio-0.1.0/python/src/library_version.hpp +17 -0
  145. vitrio-0.1.0/python/src/main.cpp +63 -0
  146. vitrio-0.1.0/python/src/utf8_string.cpp +15 -0
  147. vitrio-0.1.0/python/src/utf8_string.hpp +22 -0
  148. vitrio-0.1.0/python/vitrio/CMakeLists.txt +20 -0
  149. vitrio-0.1.0/python/vitrio/__init__.py +63 -0
  150. vitrio-0.1.0/python/vitrio/_functions.py +368 -0
  151. vitrio-0.1.0/python/vitrio/_numerical_type.py +53 -0
  152. vitrio-0.1.0/python/vitrio/py.typed +0 -0
  153. vitrio-0.1.0/src/CMakeLists.txt +237 -0
  154. vitrio-0.1.0/src/array/CMakeLists.txt +16 -0
  155. vitrio-0.1.0/src/array/array.cpp +132 -0
  156. vitrio-0.1.0/src/array/array_data.cpp +39 -0
  157. vitrio-0.1.0/src/array/array_data.hpp +31 -0
  158. vitrio-0.1.0/src/array/array_descriptor.cpp +122 -0
  159. vitrio-0.1.0/src/array/array_implementation.cpp +42 -0
  160. vitrio-0.1.0/src/array/array_implementation.hpp +79 -0
  161. vitrio-0.1.0/src/array/array_memory.cpp +150 -0
  162. vitrio-0.1.0/src/array/array_memory.hpp +45 -0
  163. vitrio-0.1.0/src/array/array_ref.cpp +42 -0
  164. vitrio-0.1.0/src/array/cast.hpp +81 -0
  165. vitrio-0.1.0/src/array/cast.inl +68 -0
  166. vitrio-0.1.0/src/array/checked_arithmetic.cpp +71 -0
  167. vitrio-0.1.0/src/array/checked_arithmetic.hpp +45 -0
  168. vitrio-0.1.0/src/array/const_array.cpp +65 -0
  169. vitrio-0.1.0/src/array/const_array_ref.cpp +58 -0
  170. vitrio-0.1.0/src/array/fixed_width_float.hpp +28 -0
  171. vitrio-0.1.0/src/array/numerical_type.cpp +61 -0
  172. vitrio-0.1.0/src/array/numerical_type_dispatch.hpp +29 -0
  173. vitrio-0.1.0/src/array/numerical_type_dispatch.inl +60 -0
  174. vitrio-0.1.0/src/array/numerical_type_traits.hpp +117 -0
  175. vitrio-0.1.0/src/array/type_tag.hpp +20 -0
  176. vitrio-0.1.0/src/assert.hpp +10 -0
  177. vitrio-0.1.0/src/builtin_image_file_format_registry.cpp +22 -0
  178. vitrio-0.1.0/src/builtin_image_file_format_registry.hpp +33 -0
  179. vitrio-0.1.0/src/caching_image_reader_provider.cpp +184 -0
  180. vitrio-0.1.0/src/clipping_image_transfer_sanitizer.cpp +182 -0
  181. vitrio-0.1.0/src/concurrency/CMakeLists.txt +9 -0
  182. vitrio-0.1.0/src/concurrency/counting_completion.cpp +96 -0
  183. vitrio-0.1.0/src/concurrency/synchronous_executor.cpp +48 -0
  184. vitrio-0.1.0/src/concurrency/thread_pool_executor.cpp +159 -0
  185. vitrio-0.1.0/src/config.hpp +35 -0
  186. vitrio-0.1.0/src/executor_image_loader.cpp +145 -0
  187. vitrio-0.1.0/src/executor_image_saver.cpp +146 -0
  188. vitrio-0.1.0/src/file_image_reader_provider.cpp +35 -0
  189. vitrio-0.1.0/src/file_image_writer_provider.cpp +231 -0
  190. vitrio-0.1.0/src/find_most_suitable_format.hpp +33 -0
  191. vitrio-0.1.0/src/find_most_suitable_format.inl +37 -0
  192. vitrio-0.1.0/src/formats/CMakeLists.txt +9 -0
  193. vitrio-0.1.0/src/formats/image_file_format_registration_macros.hpp +41 -0
  194. vitrio-0.1.0/src/formats/memory_mapping/CMakeLists.txt +12 -0
  195. vitrio-0.1.0/src/formats/memory_mapping/image_file_access.hpp +20 -0
  196. vitrio-0.1.0/src/formats/memory_mapping/image_file_layout.cpp +78 -0
  197. vitrio-0.1.0/src/formats/memory_mapping/image_file_layout.hpp +103 -0
  198. vitrio-0.1.0/src/formats/memory_mapping/image_file_mapping.cpp +141 -0
  199. vitrio-0.1.0/src/formats/memory_mapping/image_file_mapping.hpp +92 -0
  200. vitrio-0.1.0/src/formats/memory_mapping/image_prefetch_policy.cpp +50 -0
  201. vitrio-0.1.0/src/formats/memory_mapping/image_prefetch_policy.hpp +104 -0
  202. vitrio-0.1.0/src/formats/memory_mapping/image_prefetch_schedule.cpp +274 -0
  203. vitrio-0.1.0/src/formats/memory_mapping/image_prefetch_schedule.hpp +187 -0
  204. vitrio-0.1.0/src/formats/memory_mapping/mapped_image_reader.cpp +148 -0
  205. vitrio-0.1.0/src/formats/memory_mapping/mapped_image_reader.hpp +113 -0
  206. vitrio-0.1.0/src/formats/memory_mapping/mapped_image_writer.cpp +120 -0
  207. vitrio-0.1.0/src/formats/memory_mapping/mapped_image_writer.hpp +71 -0
  208. vitrio-0.1.0/src/formats/mrc/CMakeLists.txt +12 -0
  209. vitrio-0.1.0/src/formats/mrc/mrc_constants.hpp +175 -0
  210. vitrio-0.1.0/src/formats/mrc/mrc_constants.inl +20 -0
  211. vitrio-0.1.0/src/formats/mrc/mrc_extensions.cpp +61 -0
  212. vitrio-0.1.0/src/formats/mrc/mrc_extensions.hpp +51 -0
  213. vitrio-0.1.0/src/formats/mrc/mrc_file_read_format.cpp +61 -0
  214. vitrio-0.1.0/src/formats/mrc/mrc_file_read_format.hpp +44 -0
  215. vitrio-0.1.0/src/formats/mrc/mrc_file_write_format.cpp +79 -0
  216. vitrio-0.1.0/src/formats/mrc/mrc_file_write_format.hpp +43 -0
  217. vitrio-0.1.0/src/formats/mrc/mrc_geometry.cpp +356 -0
  218. vitrio-0.1.0/src/formats/mrc/mrc_geometry.hpp +78 -0
  219. vitrio-0.1.0/src/formats/mrc/mrc_header.cpp +718 -0
  220. vitrio-0.1.0/src/formats/mrc/mrc_header.hpp +265 -0
  221. vitrio-0.1.0/src/formats/mrc/mrc_mode.cpp +68 -0
  222. vitrio-0.1.0/src/formats/mrc/mrc_mode.hpp +90 -0
  223. vitrio-0.1.0/src/formats/mrc/mrc_single_section.hpp +27 -0
  224. vitrio-0.1.0/src/formats/strided_transfer/CMakeLists.txt +26 -0
  225. vitrio-0.1.0/src/formats/strided_transfer/image_region_copy.cpp +63 -0
  226. vitrio-0.1.0/src/formats/strided_transfer/image_region_copy.hpp +39 -0
  227. vitrio-0.1.0/src/formats/strided_transfer/image_region_layout.cpp +246 -0
  228. vitrio-0.1.0/src/formats/strided_transfer/image_region_layout.hpp +135 -0
  229. vitrio-0.1.0/src/formats/strided_transfer/image_region_loop.hpp +36 -0
  230. vitrio-0.1.0/src/formats/strided_transfer/image_region_loop.inl +90 -0
  231. vitrio-0.1.0/src/formats/strided_transfer/image_region_offsets.cpp +153 -0
  232. vitrio-0.1.0/src/formats/strided_transfer/image_region_offsets.hpp +104 -0
  233. vitrio-0.1.0/src/formats/strided_transfer/image_region_read_walk.cpp +40 -0
  234. vitrio-0.1.0/src/formats/strided_transfer/image_region_read_walk.hpp +81 -0
  235. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer.cpp +145 -0
  236. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer.hpp +146 -0
  237. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_complex_float16.cpp +10 -0
  238. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_complex_float32.cpp +10 -0
  239. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_complex_float64.cpp +10 -0
  240. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_float16.cpp +10 -0
  241. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_float32.cpp +10 -0
  242. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_float64.cpp +10 -0
  243. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_impl.hpp +355 -0
  244. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_int16.cpp +10 -0
  245. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_int32.cpp +10 -0
  246. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_int64.cpp +10 -0
  247. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_int8.cpp +10 -0
  248. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_uint16.cpp +10 -0
  249. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_uint32.cpp +10 -0
  250. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_uint64.cpp +10 -0
  251. vitrio-0.1.0/src/formats/strided_transfer/image_region_transfer_uint8.cpp +10 -0
  252. vitrio-0.1.0/src/formats/strided_transfer/image_region_write_walk.cpp +40 -0
  253. vitrio-0.1.0/src/formats/strided_transfer/image_region_write_walk.hpp +81 -0
  254. vitrio-0.1.0/src/formats/tiff/CMakeLists.txt +18 -0
  255. vitrio-0.1.0/src/formats/tiff/tiff_compression.hpp +20 -0
  256. vitrio-0.1.0/src/formats/tiff/tiff_extensions.cpp +16 -0
  257. vitrio-0.1.0/src/formats/tiff/tiff_extensions.hpp +22 -0
  258. vitrio-0.1.0/src/formats/tiff/tiff_file.cpp +339 -0
  259. vitrio-0.1.0/src/formats/tiff/tiff_file.hpp +132 -0
  260. vitrio-0.1.0/src/formats/tiff/tiff_file_mode.hpp +25 -0
  261. vitrio-0.1.0/src/formats/tiff/tiff_file_read_format.cpp +42 -0
  262. vitrio-0.1.0/src/formats/tiff/tiff_file_read_format.hpp +41 -0
  263. vitrio-0.1.0/src/formats/tiff/tiff_file_write_format.cpp +96 -0
  264. vitrio-0.1.0/src/formats/tiff/tiff_file_write_format.hpp +44 -0
  265. vitrio-0.1.0/src/formats/tiff/tiff_page_decoder.cpp +171 -0
  266. vitrio-0.1.0/src/formats/tiff/tiff_page_decoder.hpp +122 -0
  267. vitrio-0.1.0/src/formats/tiff/tiff_page_layout.cpp +156 -0
  268. vitrio-0.1.0/src/formats/tiff/tiff_page_layout.hpp +200 -0
  269. vitrio-0.1.0/src/formats/tiff/tiff_page_regions.cpp +134 -0
  270. vitrio-0.1.0/src/formats/tiff/tiff_page_regions.hpp +107 -0
  271. vitrio-0.1.0/src/formats/tiff/tiff_reader.cpp +138 -0
  272. vitrio-0.1.0/src/formats/tiff/tiff_reader.hpp +68 -0
  273. vitrio-0.1.0/src/formats/tiff/tiff_region_bounds.cpp +45 -0
  274. vitrio-0.1.0/src/formats/tiff/tiff_region_bounds.hpp +44 -0
  275. vitrio-0.1.0/src/formats/tiff/tiff_sample_type.cpp +99 -0
  276. vitrio-0.1.0/src/formats/tiff/tiff_sample_type.hpp +68 -0
  277. vitrio-0.1.0/src/formats/tiff/tiff_signature.cpp +59 -0
  278. vitrio-0.1.0/src/formats/tiff/tiff_signature.hpp +27 -0
  279. vitrio-0.1.0/src/formats/tiff/tiff_writer.cpp +274 -0
  280. vitrio-0.1.0/src/formats/tiff/tiff_writer.hpp +90 -0
  281. vitrio-0.1.0/src/host_image_scratch_storage.cpp +82 -0
  282. vitrio-0.1.0/src/image_descriptor.cpp +90 -0
  283. vitrio-0.1.0/src/image_file_probe.cpp +110 -0
  284. vitrio-0.1.0/src/image_file_read_format.cpp +11 -0
  285. vitrio-0.1.0/src/image_file_read_format_registry.cpp +34 -0
  286. vitrio-0.1.0/src/image_file_read_format_selector.cpp +141 -0
  287. vitrio-0.1.0/src/image_file_write_format.cpp +11 -0
  288. vitrio-0.1.0/src/image_file_write_format_registry.cpp +34 -0
  289. vitrio-0.1.0/src/image_file_write_format_selector.cpp +139 -0
  290. vitrio-0.1.0/src/image_loader.cpp +11 -0
  291. vitrio-0.1.0/src/image_location.cpp +139 -0
  292. vitrio-0.1.0/src/image_location_grouping.cpp +147 -0
  293. vitrio-0.1.0/src/image_metadata.cpp +19 -0
  294. vitrio-0.1.0/src/image_plan_builders.cpp +230 -0
  295. vitrio-0.1.0/src/image_plan_builders.hpp +100 -0
  296. vitrio-0.1.0/src/image_read.cpp +254 -0
  297. vitrio-0.1.0/src/image_reader.cpp +11 -0
  298. vitrio-0.1.0/src/image_reader_provider.cpp +21 -0
  299. vitrio-0.1.0/src/image_region_grouping.cpp +139 -0
  300. vitrio-0.1.0/src/image_region_grouping.hpp +157 -0
  301. vitrio-0.1.0/src/image_saver.cpp +11 -0
  302. vitrio-0.1.0/src/image_scratch.cpp +11 -0
  303. vitrio-0.1.0/src/image_scratch_entry.cpp +11 -0
  304. vitrio-0.1.0/src/image_scratch_storage.cpp +11 -0
  305. vitrio-0.1.0/src/image_transaction_plan.cpp +132 -0
  306. vitrio-0.1.0/src/image_transfer_plan.cpp +90 -0
  307. vitrio-0.1.0/src/image_transfer_sanitizer.cpp +11 -0
  308. vitrio-0.1.0/src/image_transfer_shape.cpp +91 -0
  309. vitrio-0.1.0/src/image_write.cpp +139 -0
  310. vitrio-0.1.0/src/image_writer.cpp +11 -0
  311. vitrio-0.1.0/src/image_writer_provider.cpp +11 -0
  312. vitrio-0.1.0/src/index_table.cpp +72 -0
  313. vitrio-0.1.0/src/indexed_image_scratch.cpp +618 -0
  314. vitrio-0.1.0/src/indexed_image_scratch_entry.cpp +309 -0
  315. vitrio-0.1.0/src/indexed_image_scratch_entry.hpp +155 -0
  316. vitrio-0.1.0/src/interned_key_list.cpp +117 -0
  317. vitrio-0.1.0/src/library_version.cpp +17 -0
  318. vitrio-0.1.0/src/logger.cpp +22 -0
  319. vitrio-0.1.0/src/logger.hpp +46 -0
  320. vitrio-0.1.0/src/mapped_file_image_scratch_storage.cpp +103 -0
  321. vitrio-0.1.0/src/memory/CMakeLists.txt +7 -0
  322. vitrio-0.1.0/src/memory/align.hpp +46 -0
  323. vitrio-0.1.0/src/memory/align.inl +28 -0
  324. vitrio-0.1.0/src/memory/aligned_alloc.cpp +40 -0
  325. vitrio-0.1.0/src/memory/aligned_alloc.hpp +29 -0
  326. vitrio-0.1.0/src/memory/byte_order.hpp +103 -0
  327. vitrio-0.1.0/src/memory/byte_order.inl +122 -0
  328. vitrio-0.1.0/src/scratch_image_reader.cpp +63 -0
  329. vitrio-0.1.0/src/scratch_image_reader.hpp +55 -0
  330. vitrio-0.1.0/src/scratch_image_reader_provider.cpp +61 -0
  331. vitrio-0.1.0/src/strict_image_transfer_sanitizer.cpp +104 -0
  332. vitrio-0.1.0/src/system/CMakeLists.txt +27 -0
  333. vitrio-0.1.0/src/system/memory_range.cpp +24 -0
  334. vitrio-0.1.0/src/system/memory_range.hpp +50 -0
  335. vitrio-0.1.0/src/system/page_prefetch.hpp +31 -0
  336. vitrio-0.1.0/src/system/page_prefetch_posix.cpp +49 -0
  337. vitrio-0.1.0/src/system/page_prefetch_windows.cpp +83 -0
  338. vitrio-0.1.0/src/system/page_size.hpp +17 -0
  339. vitrio-0.1.0/src/system/page_size_posix.cpp +15 -0
  340. vitrio-0.1.0/src/system/page_size_windows.cpp +18 -0
  341. vitrio-0.1.0/tests/CMakeLists.txt +33 -0
  342. vitrio-0.1.0/tests/assets/CMakeLists.txt +24 -0
  343. vitrio-0.1.0/tests/assets/include/vitrio/tests/assets.hpp +75 -0
  344. vitrio-0.1.0/tests/assets/include/vitrio/tests/host_array.hpp +133 -0
  345. vitrio-0.1.0/tests/assets/include/vitrio/tests/scoped_path.hpp +50 -0
  346. vitrio-0.1.0/tests/assets/include/vitrio/tests/whole_region_plan.hpp +36 -0
  347. vitrio-0.1.0/tests/assets/mrc/EMD-3001.map +0 -0
  348. vitrio-0.1.0/tests/assets/mrc/EMD-3197.map +0 -0
  349. vitrio-0.1.0/tests/assets/mrc/README.txt +37 -0
  350. vitrio-0.1.0/tests/assets/tiff/README.txt +124 -0
  351. vitrio-0.1.0/tests/assets/tiff/image_float32_tiled.tif +0 -0
  352. vitrio-0.1.0/tests/assets/tiff/image_int16_big_endian.tif +0 -0
  353. vitrio-0.1.0/tests/assets/tiff/image_uint16_deflate_predictor.tif +0 -0
  354. vitrio-0.1.0/tests/assets/tiff/refused_pages_differ.tif +0 -0
  355. vitrio-0.1.0/tests/assets/tiff/refused_rgb.tif +0 -0
  356. vitrio-0.1.0/tests/assets/tiff/stack_uint8_bigtiff.tif +0 -0
  357. vitrio-0.1.0/tests/assets/tiff/stack_uint8_lzw.tif +0 -0
  358. vitrio-0.1.0/tests/headers/CMakeLists.txt +51 -0
  359. vitrio-0.1.0/tests/integration/CMakeLists.txt +26 -0
  360. vitrio-0.1.0/tests/integration/src/CMakeLists.txt +23 -0
  361. vitrio-0.1.0/tests/integration/src/test_image_file_format_selectors.cpp +68 -0
  362. vitrio-0.1.0/tests/integration/src/test_image_read.cpp +205 -0
  363. vitrio-0.1.0/tests/integration/src/test_image_scratch.cpp +574 -0
  364. vitrio-0.1.0/tests/integration/src/test_image_write.cpp +324 -0
  365. vitrio-0.1.0/tests/integration/src/test_library_version.cpp +21 -0
  366. vitrio-0.1.0/tests/integration/src/test_mrc_real_files.cpp +223 -0
  367. vitrio-0.1.0/tests/integration/src/test_mrc_round_trip.cpp +163 -0
  368. vitrio-0.1.0/tests/integration/src/test_public_constants.cpp +40 -0
  369. vitrio-0.1.0/tests/integration/src/test_tiff_real_files.cpp +261 -0
  370. vitrio-0.1.0/tests/integration/src/test_tiff_round_trip.cpp +349 -0
  371. vitrio-0.1.0/tests/python/CMakeLists.txt +21 -0
  372. vitrio-0.1.0/tests/python/test_array.py +158 -0
  373. vitrio-0.1.0/tests/python/test_executors.py +37 -0
  374. vitrio-0.1.0/tests/python/test_format_selectors.py +35 -0
  375. vitrio-0.1.0/tests/python/test_image_descriptor.py +101 -0
  376. vitrio-0.1.0/tests/python/test_image_location.py +130 -0
  377. vitrio-0.1.0/tests/python/test_index_table.py +201 -0
  378. vitrio-0.1.0/tests/python/test_interchange.py +232 -0
  379. vitrio-0.1.0/tests/python/test_memory_loan.py +159 -0
  380. vitrio-0.1.0/tests/python/test_numerical_type.py +64 -0
  381. vitrio-0.1.0/tests/python/test_query_descriptor.py +60 -0
  382. vitrio-0.1.0/tests/python/test_read_batch_async.py +137 -0
  383. vitrio-0.1.0/tests/python/test_read_patches_async.py +149 -0
  384. vitrio-0.1.0/tests/python/test_read_write.py +197 -0
  385. vitrio-0.1.0/tests/python/test_version.py +8 -0
  386. vitrio-0.1.0/tests/python/test_write_batch_async.py +146 -0
  387. vitrio-0.1.0/tests/python/test_writer_provider.py +93 -0
  388. vitrio-0.1.0/tests/unitary/CMakeLists.txt +46 -0
  389. vitrio-0.1.0/tests/unitary/src/CMakeLists.txt +52 -0
  390. vitrio-0.1.0/tests/unitary/src/array/CMakeLists.txt +18 -0
  391. vitrio-0.1.0/tests/unitary/src/array/test_array.cpp +325 -0
  392. vitrio-0.1.0/tests/unitary/src/array/test_array_data.cpp +86 -0
  393. vitrio-0.1.0/tests/unitary/src/array/test_array_descriptor.cpp +327 -0
  394. vitrio-0.1.0/tests/unitary/src/array/test_array_implementation.cpp +116 -0
  395. vitrio-0.1.0/tests/unitary/src/array/test_array_memory.cpp +294 -0
  396. vitrio-0.1.0/tests/unitary/src/array/test_array_ref.cpp +216 -0
  397. vitrio-0.1.0/tests/unitary/src/array/test_cast.cpp +141 -0
  398. vitrio-0.1.0/tests/unitary/src/array/test_checked_arithmetic.cpp +132 -0
  399. vitrio-0.1.0/tests/unitary/src/array/test_const_array.cpp +206 -0
  400. vitrio-0.1.0/tests/unitary/src/array/test_const_array_ref.cpp +240 -0
  401. vitrio-0.1.0/tests/unitary/src/array/test_numerical_type.cpp +100 -0
  402. vitrio-0.1.0/tests/unitary/src/array/test_numerical_type_dispatch.cpp +178 -0
  403. vitrio-0.1.0/tests/unitary/src/concurrency/CMakeLists.txt +9 -0
  404. vitrio-0.1.0/tests/unitary/src/concurrency/test_counting_completion.cpp +132 -0
  405. vitrio-0.1.0/tests/unitary/src/concurrency/test_synchronous_executor.cpp +101 -0
  406. vitrio-0.1.0/tests/unitary/src/concurrency/test_thread_pool_executor.cpp +166 -0
  407. vitrio-0.1.0/tests/unitary/src/fixtures/aligned_memory.hpp +48 -0
  408. vitrio-0.1.0/tests/unitary/src/fixtures/captured_log.hpp +53 -0
  409. vitrio-0.1.0/tests/unitary/src/fixtures/counting_image_file.hpp +108 -0
  410. vitrio-0.1.0/tests/unitary/src/fixtures/format_selector_fixture.hpp +79 -0
  411. vitrio-0.1.0/tests/unitary/src/formats/CMakeLists.txt +9 -0
  412. vitrio-0.1.0/tests/unitary/src/formats/memory_mapping/CMakeLists.txt +12 -0
  413. vitrio-0.1.0/tests/unitary/src/formats/memory_mapping/test_image_file_layout.cpp +144 -0
  414. vitrio-0.1.0/tests/unitary/src/formats/memory_mapping/test_image_file_mapping.cpp +197 -0
  415. vitrio-0.1.0/tests/unitary/src/formats/memory_mapping/test_image_prefetch_policy.cpp +53 -0
  416. vitrio-0.1.0/tests/unitary/src/formats/memory_mapping/test_image_prefetch_schedule.cpp +486 -0
  417. vitrio-0.1.0/tests/unitary/src/formats/memory_mapping/test_mapped_image_reader.cpp +540 -0
  418. vitrio-0.1.0/tests/unitary/src/formats/memory_mapping/test_mapped_image_writer.cpp +498 -0
  419. vitrio-0.1.0/tests/unitary/src/formats/mrc/CMakeLists.txt +13 -0
  420. vitrio-0.1.0/tests/unitary/src/formats/mrc/fixtures/mrc_test_file.hpp +113 -0
  421. vitrio-0.1.0/tests/unitary/src/formats/mrc/test_mrc_constants.cpp +39 -0
  422. vitrio-0.1.0/tests/unitary/src/formats/mrc/test_mrc_extensions.cpp +116 -0
  423. vitrio-0.1.0/tests/unitary/src/formats/mrc/test_mrc_file_read_format.cpp +214 -0
  424. vitrio-0.1.0/tests/unitary/src/formats/mrc/test_mrc_file_write_format.cpp +248 -0
  425. vitrio-0.1.0/tests/unitary/src/formats/mrc/test_mrc_geometry.cpp +731 -0
  426. vitrio-0.1.0/tests/unitary/src/formats/mrc/test_mrc_header.cpp +675 -0
  427. vitrio-0.1.0/tests/unitary/src/formats/mrc/test_mrc_mode.cpp +172 -0
  428. vitrio-0.1.0/tests/unitary/src/formats/strided_transfer/CMakeLists.txt +13 -0
  429. vitrio-0.1.0/tests/unitary/src/formats/strided_transfer/test_image_region_copy.cpp +215 -0
  430. vitrio-0.1.0/tests/unitary/src/formats/strided_transfer/test_image_region_layout.cpp +307 -0
  431. vitrio-0.1.0/tests/unitary/src/formats/strided_transfer/test_image_region_loop.cpp +277 -0
  432. vitrio-0.1.0/tests/unitary/src/formats/strided_transfer/test_image_region_offsets.cpp +305 -0
  433. vitrio-0.1.0/tests/unitary/src/formats/strided_transfer/test_image_region_read_walk.cpp +77 -0
  434. vitrio-0.1.0/tests/unitary/src/formats/strided_transfer/test_image_region_transfer.cpp +937 -0
  435. vitrio-0.1.0/tests/unitary/src/formats/strided_transfer/test_image_region_write_walk.cpp +77 -0
  436. vitrio-0.1.0/tests/unitary/src/formats/tiff/CMakeLists.txt +18 -0
  437. vitrio-0.1.0/tests/unitary/src/formats/tiff/fixtures/tiff_test_file.hpp +293 -0
  438. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_extensions.cpp +27 -0
  439. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_file.cpp +692 -0
  440. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_file_read_format.cpp +151 -0
  441. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_file_write_format.cpp +269 -0
  442. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_page_decoder.cpp +340 -0
  443. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_page_layout.cpp +190 -0
  444. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_page_regions.cpp +253 -0
  445. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_reader.cpp +511 -0
  446. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_region_bounds.cpp +188 -0
  447. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_sample_type.cpp +202 -0
  448. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_signature.cpp +80 -0
  449. vitrio-0.1.0/tests/unitary/src/formats/tiff/test_tiff_writer.cpp +855 -0
  450. vitrio-0.1.0/tests/unitary/src/memory/CMakeLists.txt +9 -0
  451. vitrio-0.1.0/tests/unitary/src/memory/test_align.cpp +63 -0
  452. vitrio-0.1.0/tests/unitary/src/memory/test_aligned_alloc.cpp +61 -0
  453. vitrio-0.1.0/tests/unitary/src/memory/test_byte_order.cpp +209 -0
  454. vitrio-0.1.0/tests/unitary/src/mock/mock_executor.hpp +32 -0
  455. vitrio-0.1.0/tests/unitary/src/mock/mock_image_file_format_factory.hpp +35 -0
  456. vitrio-0.1.0/tests/unitary/src/mock/mock_image_file_format_registry.hpp +22 -0
  457. vitrio-0.1.0/tests/unitary/src/mock/mock_image_file_read_format.hpp +36 -0
  458. vitrio-0.1.0/tests/unitary/src/mock/mock_image_file_write_format.hpp +42 -0
  459. vitrio-0.1.0/tests/unitary/src/mock/mock_image_loader.hpp +34 -0
  460. vitrio-0.1.0/tests/unitary/src/mock/mock_image_reader.hpp +42 -0
  461. vitrio-0.1.0/tests/unitary/src/mock/mock_image_reader_provider.hpp +27 -0
  462. vitrio-0.1.0/tests/unitary/src/mock/mock_image_saver.hpp +34 -0
  463. vitrio-0.1.0/tests/unitary/src/mock/mock_image_scratch.hpp +27 -0
  464. vitrio-0.1.0/tests/unitary/src/mock/mock_image_scratch_entry.hpp +38 -0
  465. vitrio-0.1.0/tests/unitary/src/mock/mock_image_scratch_storage.hpp +23 -0
  466. vitrio-0.1.0/tests/unitary/src/mock/mock_image_transfer_sanitizer.hpp +35 -0
  467. vitrio-0.1.0/tests/unitary/src/mock/mock_image_writer.hpp +37 -0
  468. vitrio-0.1.0/tests/unitary/src/mock/mock_image_writer_provider.hpp +27 -0
  469. vitrio-0.1.0/tests/unitary/src/system/CMakeLists.txt +9 -0
  470. vitrio-0.1.0/tests/unitary/src/system/test_memory_range.cpp +21 -0
  471. vitrio-0.1.0/tests/unitary/src/system/test_page_prefetch.cpp +75 -0
  472. vitrio-0.1.0/tests/unitary/src/system/test_page_size.cpp +30 -0
  473. vitrio-0.1.0/tests/unitary/src/test_builtin_image_file_format_registry.cpp +55 -0
  474. vitrio-0.1.0/tests/unitary/src/test_caching_image_reader_provider.cpp +164 -0
  475. vitrio-0.1.0/tests/unitary/src/test_clipping_image_transfer_sanitizer.cpp +359 -0
  476. vitrio-0.1.0/tests/unitary/src/test_executor_image_loader.cpp +515 -0
  477. vitrio-0.1.0/tests/unitary/src/test_executor_image_saver.cpp +478 -0
  478. vitrio-0.1.0/tests/unitary/src/test_file_image_reader_provider.cpp +92 -0
  479. vitrio-0.1.0/tests/unitary/src/test_file_image_writer_provider.cpp +263 -0
  480. vitrio-0.1.0/tests/unitary/src/test_find_most_suitable_format.cpp +109 -0
  481. vitrio-0.1.0/tests/unitary/src/test_host_image_scratch_storage.cpp +65 -0
  482. vitrio-0.1.0/tests/unitary/src/test_image_descriptor.cpp +204 -0
  483. vitrio-0.1.0/tests/unitary/src/test_image_file_format_registration.cpp +58 -0
  484. vitrio-0.1.0/tests/unitary/src/test_image_file_format_suitability.cpp +115 -0
  485. vitrio-0.1.0/tests/unitary/src/test_image_file_probe.cpp +143 -0
  486. vitrio-0.1.0/tests/unitary/src/test_image_file_read_format_registry.cpp +63 -0
  487. vitrio-0.1.0/tests/unitary/src/test_image_file_read_format_selector.cpp +212 -0
  488. vitrio-0.1.0/tests/unitary/src/test_image_file_write_format_registry.cpp +63 -0
  489. vitrio-0.1.0/tests/unitary/src/test_image_file_write_format_selector.cpp +159 -0
  490. vitrio-0.1.0/tests/unitary/src/test_image_location.cpp +288 -0
  491. vitrio-0.1.0/tests/unitary/src/test_image_location_grouping.cpp +213 -0
  492. vitrio-0.1.0/tests/unitary/src/test_image_metadata.cpp +10 -0
  493. vitrio-0.1.0/tests/unitary/src/test_image_plan_builders.cpp +589 -0
  494. vitrio-0.1.0/tests/unitary/src/test_image_read.cpp +1152 -0
  495. vitrio-0.1.0/tests/unitary/src/test_image_reader_provider.cpp +57 -0
  496. vitrio-0.1.0/tests/unitary/src/test_image_region_grouping.cpp +258 -0
  497. vitrio-0.1.0/tests/unitary/src/test_image_transaction_plan.cpp +254 -0
  498. vitrio-0.1.0/tests/unitary/src/test_image_transfer_plan.cpp +249 -0
  499. vitrio-0.1.0/tests/unitary/src/test_image_transfer_shape.cpp +190 -0
  500. vitrio-0.1.0/tests/unitary/src/test_image_write.cpp +542 -0
  501. vitrio-0.1.0/tests/unitary/src/test_index_table.cpp +177 -0
  502. vitrio-0.1.0/tests/unitary/src/test_indexed_image_scratch.cpp +1545 -0
  503. vitrio-0.1.0/tests/unitary/src/test_indexed_image_scratch_entry.cpp +985 -0
  504. vitrio-0.1.0/tests/unitary/src/test_interned_key_list.cpp +190 -0
  505. vitrio-0.1.0/tests/unitary/src/test_library_version.cpp +21 -0
  506. vitrio-0.1.0/tests/unitary/src/test_logger.cpp +79 -0
  507. vitrio-0.1.0/tests/unitary/src/test_mapped_file_image_scratch_storage.cpp +209 -0
  508. vitrio-0.1.0/tests/unitary/src/test_scratch_image_reader.cpp +240 -0
  509. vitrio-0.1.0/tests/unitary/src/test_scratch_image_reader_provider.cpp +191 -0
  510. vitrio-0.1.0/tests/unitary/src/test_span.cpp +257 -0
  511. vitrio-0.1.0/tests/unitary/src/test_strict_image_transfer_sanitizer.cpp +187 -0
  512. vitrio-0.1.0/tests/unitary/src/test_version.cpp +107 -0
  513. vitrio-0.1.0/vcpkg.json +37 -0
@@ -0,0 +1,48 @@
1
+ HeaderFilterRegex: 'vitrio/.*'
2
+ Checks: >
3
+ -*,
4
+ performance-*,
5
+ readability-*,
6
+ bugprone-*,
7
+ clang-analyzer-*,
8
+ cppcoreguidelines-*,
9
+ misc-*
10
+
11
+ CheckOptions:
12
+ - key: readability-identifier-naming.MacroDefinitionCase
13
+ value: UPPER_CASE
14
+ - key: readability-identifier-naming.MacroDefinitionPrefix
15
+ value: VITRIO_
16
+
17
+ - key: readability-identifier-naming.NamespaceCase
18
+ value: lower_case
19
+ - key: readability-identifier-naming.FunctionCase
20
+ value: lower_case
21
+ - key: readability-identifier-naming.ParameterCase
22
+ value: lower_case
23
+ - key: readability-identifier-naming.VariableCase
24
+ value: lower_case
25
+ - key: readability-identifier-naming.ConstantCase
26
+ value: lower_case
27
+
28
+ - key: readability-identifier-naming.ClassCase
29
+ value: lower_case
30
+ - key: readability-identifier-naming.StructCase
31
+ value: lower_case
32
+ - key: readability-identifier-naming.MemberCase
33
+ value: lower_case
34
+ - key: readability-identifier-naming.PrivateMemberPrefix
35
+ value: m_
36
+ - key: readability-identifier-naming.MethodCase
37
+ value: lower_case
38
+
39
+ - key: readability-identifier-naming.TypedefCase
40
+ value: lower_case
41
+
42
+ - key: readability-identifier-naming.EnumCase
43
+ value: lower_case
44
+ - key: readability-identifier-naming.EnumConstantCase
45
+ value: lower_case
46
+
47
+ - key: readability-identifier-naming.TemplateParameterCase
48
+ value: CamelCase
@@ -0,0 +1,18 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+
8
+ [*.{hpp,cpp,inl,cmake}]
9
+ indent_style = tab
10
+ max_line_length = 80
11
+
12
+ [CMakeLists.txt]
13
+ indent_style = tab
14
+ max_line_length = 80
15
+
16
+ [*.{json,yml,yaml}]
17
+ indent_style = space
18
+ indent_size = 2
@@ -0,0 +1,49 @@
1
+ # Prerequisites
2
+ *.d
3
+
4
+ # Compiled Object files
5
+ *.slo
6
+ *.lo
7
+ *.o
8
+ *.obj
9
+
10
+ # Precompiled Headers
11
+ *.gch
12
+ *.pch
13
+
14
+ # Compiled Dynamic libraries
15
+ *.so
16
+ *.dylib
17
+ *.dll
18
+
19
+ # Compiled Static libraries
20
+ *.lai
21
+ *.la
22
+ *.a
23
+ *.lib
24
+
25
+ # Executables
26
+ *.exe
27
+ *.out
28
+ *.app
29
+
30
+ # CMake output
31
+ build
32
+ CMakeUserPresets.json
33
+
34
+ # vcpkg, when it installs into the source tree
35
+ vcpkg_installed
36
+
37
+ # VS Code
38
+ .vscode
39
+
40
+ # CTest
41
+ Testing/Temporary
42
+
43
+ # Python
44
+ __pycache__
45
+ .pytest_cache
46
+
47
+ # What pip builds
48
+ dist
49
+ wheelhouse
vitrio-0.1.0/AGENTS.md ADDED
@@ -0,0 +1,248 @@
1
+ # Working on vitrio
2
+
3
+ vitrio reads and writes the image files of electron microscopy. It is a C++
4
+ library with a Python package over it, and it depends on nothing of rexlib,
5
+ where its code comes from: the image subsystem of rexlib at `7bf00d69` is
6
+ being ported here a phase at a time.
7
+
8
+ Keep this file true. When a change makes something here wrong or missing, such
9
+ as a moved directory, a new convention, a dependency or a workflow, update it
10
+ in the same commit that causes it.
11
+
12
+ ## Layout
13
+
14
+ | Path | Holds |
15
+ |---|---|
16
+ | `include/vitrio/` | The public headers. Everything here is part of the API |
17
+ | `include/vitrio/array/` | The array classes, their descriptor and the types of their elements |
18
+ | `include/vitrio/concurrency/` | Executors, the tasks they run and the completions that report them |
19
+ | `include/vitrio/exceptions/` | The exception types |
20
+ | `src/` | The implementation, plus the headers that are not public. Its directories are those of `include/vitrio/` |
21
+ | `src/formats/` | The image formats and what they are built with. Each format has a directory and a namespace of its own, such as `vitrio::mrc` |
22
+ | `src/formats/strided_transfer/` | Moves regions between a file and an array: resolves where each one starts, works out the order to walk it in, and converts its elements |
23
+ | `src/formats/memory_mapping/` | Reads and writes a file through a mapping of it, for the formats whose values lie in the file as they are, and advises the pages a read is about to touch |
24
+ | `src/formats/mrc/` | The MRC format: its header, how a header resolves into the layout of a file, and the two formats that register themselves |
25
+ | `src/formats/tiff/` | The TIFF format, over libtiff: the file, the layout of a page, the decoder that holds one page at a time, and the reader and writer. Built only with `VITRIO_ENABLE_TIFF` |
26
+ | `src/array/`, `src/memory/` | Beside the array classes, the private helpers on element types: the C++ type of each, the cast between two of them, their byte order |
27
+ | `src/system/` | What is asked of the operating system. Each has one source file per family of systems, and the build takes the one that applies |
28
+ | `tests/unitary/` | White-box Catch2 suite, built from the objects of the library, which sees `src/` |
29
+ | `tests/unitary/src/mock/`, `fixtures/` | The trompeloeil mocks of the interfaces, and what several test files set up alike |
30
+ | `tests/assets/` | The files the tests are given, read where they are, and the directory under the build tree the tests write to |
31
+ | `tests/assets/include/vitrio/tests/` | What both suites set up alike, written against the public headers only: paths, arrays that hold given values, the plan of a whole region |
32
+ | `tests/integration/` | Black-box Catch2 suite, linked with the shared library as a consumer is |
33
+ | `tests/headers/` | Compiles each public header on its own under every C++ standard the compiler has |
34
+ | `python/src/` | The extension of the Python package, `vitrio._binding`, written with nanobind. Each public header it binds has a source of the same name here, with one function that adds it to the module |
35
+ | `python/src/array/`, `concurrency/` | Beside the bindings of those directories, how an array given from Python becomes one of vitrio: the loan of its memory and the completion that holds the loan |
36
+ | `python/vitrio/` | The Python package: what Python expects on top of the binding, such as arguments with defaults |
37
+ | `tests/python/` | pytest suite of the Python package, imported from the build tree |
38
+ | `cmake/modules/` | CMake modules of the project |
39
+ | `cmake/config/` | The template of the installed CMake package config |
40
+ | `cmake/scripts/` | CMake scripts the build runs |
41
+ | `.github/actions/` | The actions the workflows share. They belong to this repository |
42
+ | `pyproject.toml` | How pip builds the Python package, the versions of what its builds and tests install, and how cibuildwheel builds the wheels |
43
+
44
+ Every directory holding sources carries a `CMakeLists.txt` naming them. The
45
+ lists are explicit rather than globbed, so a new `.cpp` has to be named there
46
+ before it is built. That holds for the Python sources of `python/vitrio/`
47
+ too. There are two exceptions. The header check globs `include/`, so that
48
+ a new header is checked without being listed, and pytest finds the files of
49
+ `tests/python/` itself.
50
+
51
+ Tests mirror what they test: a header or source with a function body has a
52
+ test file of its own, at the same relative path under `tests/unitary/src/`.
53
+
54
+ ## Building
55
+
56
+ ```
57
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
58
+ cmake --build build
59
+ ctest --test-dir build
60
+ ```
61
+
62
+ With CMake 3.21 or newer the presets do the same: `cmake --preset debug`,
63
+ `cmake --build --preset debug`, `ctest --preset debug`. There are `release` and
64
+ `sanitize` and `sanitize-thread` presets too. CMake 3.18 is the minimum, and one CI job builds with
65
+ exactly that version. Under it CTest runs each suite as a single test, because
66
+ listing the cases needs the JSON support of CMake 3.19.
67
+
68
+ The Python package is built with `-DVITRIO_BUILD_PYTHON=ON`, which needs
69
+ Python 3.10 or newer and nanobind in it (`pip install nanobind`). CMake asks
70
+ that interpreter where nanobind is; `-DPython_EXECUTABLE=<python>` chooses
71
+ it. The package is assembled under `python/` of the build tree, the
72
+ extension and its stubs beside the Python sources, and CTest runs its suite
73
+ as one test. To run pytest by hand:
74
+
75
+ ```
76
+ PYTHONPATH=build/python python -m pytest tests/python
77
+ ```
78
+
79
+ The `dev` group of `pyproject.toml` pins what CI installs for it
80
+ (`pip install --group dev`). The cases that exchange arrays with PyTorch,
81
+ JAX and rexlib are skipped where those are not installed.
82
+
83
+ `pip install .` builds the same package through scikit-build-core, which
84
+ configures this project as it is. The dependencies have to be found, as in
85
+ any other build: pip installs nothing but the build tools. A plain
86
+ `cmake --install` leaves the package out. It is the component
87
+ `vitrio_python`, which goes into the directory Python looks for packages
88
+ in, with the library beside the extension.
89
+
90
+ The wheels are built by cibuildwheel, with vcpkg providing the
91
+ dependencies from the same manifest the other workflows use. On Linux and
92
+ macOS vcpkg builds static libraries and on Windows it is asked to, so a
93
+ wheel holds everything it needs. A wheel is built against the stable ABI
94
+ of Python, and serves 3.12 and every later version; 3.10 and 3.11 get one
95
+ each.
96
+
97
+ The sanitizer presets leave the Python package out. Its stubs are written
98
+ by importing the extension, and an interpreter that is not instrumented
99
+ itself only loads an instrumented extension with the runtime of the
100
+ sanitizer preloaded.
101
+
102
+ vitrio is a shared library only. Its image formats register themselves
103
+ through objects at namespace scope, with the macros of
104
+ `src/formats/image_file_format_registration_macros.hpp`, and a static archive would
105
+ drop the object files nothing else refers to.
106
+
107
+ ## Dependencies
108
+
109
+ Dependencies are found with `find_package` and nothing else: the build never
110
+ downloads. Where they come from is up to whoever builds, be it system
111
+ packages, conda or vcpkg.
112
+
113
+ `vcpkg.json` is how CI gets them. Its `builtin-baseline` pins every version at
114
+ once, and the CMake files never mention vcpkg. To use it locally, set
115
+ `CMAKE_TOOLCHAIN_FILE` to `scripts/buildsystems/vcpkg.cmake` of a vcpkg
116
+ checkout.
117
+
118
+ A dependency a test needs goes in the `tests` feature of the manifest. One the
119
+ library needs goes in `dependencies`.
120
+
121
+ | Dependency | Needed by |
122
+ |---|---|
123
+ | Threads | The library, privately |
124
+ | Boost 1.70 or newer: Filesystem, Interprocess, ContainerHash | The library, privately. Interprocess maps the files |
125
+ | half | The library, privately, for half precision numbers. It ships no CMake package, so `cmake/modules/Findhalf.cmake` finds its header |
126
+ | spdlog 1.4 or newer | The library, privately and header only, for its log |
127
+ | libtiff 4.5 or newer | The library, privately, for the TIFF format. Not needed with `-DVITRIO_ENABLE_TIFF=OFF`, and it is the `tiff` feature of the manifest |
128
+ | Catch2 3 | The test suites |
129
+ | trompeloeil | The unit tests, for their mocks |
130
+ | Python 3.10 or newer, nanobind 3 | The Python package. Not needed without `-DVITRIO_BUILD_PYTHON=ON`, and not in the manifest: pip provides nanobind |
131
+ | pytest, numpy | The tests of the Python package |
132
+ | scikit-build-core | A build of the Python package by pip |
133
+
134
+ ## Conventions
135
+
136
+ - **C++14.** The library and its public headers use nothing newer, and CMake
137
+ requires that standard rather than preferring it. The header check compiles
138
+ the public headers as C++14, 17, 20 and 23.
139
+ - **Licence.** Every source file starts with
140
+ `SPDX-License-Identifier: LGPL-2.1-or-later`.
141
+ - **Public and private.** A header under `include/` is public and is installed.
142
+ A header under `src/` is neither. A public symbol is marked `VITRIO_API`,
143
+ from the generated `vitrio/export.hpp`; everything else is hidden.
144
+ - **One class per file.** A class is declared in a `.hpp` and defined in a
145
+ `.cpp`, or in an `.inl` included at the end of the header when it has to be
146
+ inline.
147
+ - **Formatting.** Tabs, 80 columns. The code is formatted by hand and there is
148
+ no `.clang-format`: none reproduces the style, so one would rewrite the code
149
+ it was run on.
150
+ - **Vocabulary types.** `vitrio::span` is a view of contiguous elements, of
151
+ dynamic extent only. It is a type of its own under every C++ standard and
152
+ never an alias of `std::span`, so that the ABI does not depend on the
153
+ standard a consumer compiles with. `vitrio::byte` is `unsigned char`, the
154
+ type C++14 lets the memory of any object be accessed through.
155
+ - **Arrays.** Four classes with one job each: `array` and `const_array` keep
156
+ their memory alive, `array_ref` and `const_array_ref` do not, and the
157
+ `const` ones cannot be written through. A reference is two pointers, as
158
+ cheap to copy as a span, and what it refers to must outlive it. A function
159
+ that uses an array only until it returns takes a reference; one that keeps
160
+ it takes an owning class. None of them does anything with its elements.
161
+ Memory from anywhere becomes an array through a `std::shared_ptr` that
162
+ releases it.
163
+ - **Sizes that come from a file.** Extents and strides may be read from a
164
+ file, so arithmetic on them goes through `checked_add` and
165
+ `checked_multiply` and an overflow is reported, not computed.
166
+ - **Constants of a class.** A `static constexpr` member of a public class is
167
+ marked `VITRIO_API` and defined in its `.cpp`. C++14 needs that definition
168
+ whenever the constant is bound to a reference, and a consumer gets it from
169
+ the shared library.
170
+ - **Files a test writes.** `scoped_path` names a file under the build tree
171
+ and removes it. Every case runs as a process of its own and several may
172
+ run at once, so no two cases may name the same file: a fixture that
173
+ several cases share names its files after the running case.
174
+ - **Mocks.** A test that needs a stand-in for an interface uses the
175
+ trompeloeil mock under `tests/unitary/src/mock/`, never a hand-written
176
+ fake. A mock is added with the first test that uses it.
177
+ - **Private headers use their dependencies openly.** A header under `src/`
178
+ includes what it needs and names its types as they are: `float16_t` is
179
+ `half_float::half`, not a class wrapped around it. Hiding a dependency is
180
+ for public headers only.
181
+ - **Element conversions.** `cast`, in `src/array/cast.hpp`, converts one
182
+ element as `static_cast` does. Any type is produced from any other, except
183
+ that a complex number is only produced into another complex type.
184
+ - **Keys and files.** A provider (`image_reader_provider`,
185
+ `image_writer_provider`) is asked with a key, and what a key means is the
186
+ provider's business. An `image_location` is a key and an index in a stack,
187
+ and the plans, the loader and the saver carry keys too. What is about
188
+ files says so in its name: `image_file_probe`, `image_file_error`,
189
+ `image_file_format_error`, and three roles that are kept apart:
190
+ - A file format (`image_file_read_format`, `image_file_write_format`, and
191
+ for one kind of file `mrc_file_read_format`, `tiff_file_write_format`)
192
+ knows one format, and registers itself at namespace scope with the
193
+ macros of `src/formats/image_file_format_registration_macros.hpp`.
194
+ - A selector (`image_file_read_format_selector`,
195
+ `image_file_write_format_selector`) holds formats and opens a file with
196
+ the most suitable of them. Its `get_shared()` holds the bundled ones.
197
+ - The two providers whose keys are paths, `file_image_reader_provider`
198
+ and `file_image_writer_provider`, are each given a selector and hold no
199
+ formats themselves.
200
+ - **Assertions.** `VITRIO_ASSERT`, from `src/assert.hpp`, checks what the code
201
+ relies on. What a caller of the public API may get wrong is reported with an
202
+ exception instead.
203
+ - **Logging.** What can be reported in no other way is logged with the
204
+ `VITRIO_LOG_*` macros of `src/logger.hpp`, which wrap spdlog and take its
205
+ format strings. They write to a logger of the library's own, on the
206
+ standard error stream, and never to the default logger of spdlog. spdlog
207
+ stays out of the public headers.
208
+ - **Tuning.** A number that tunes the library is a macro in `src/config.hpp`,
209
+ with a default that the build may override.
210
+ - **The Python binding.** `vitrio._binding` mirrors the C++ API, with the
211
+ same names and the same required arguments. What Python expects on top,
212
+ such as defaults and the ways a data type is stated, is Python code in
213
+ `python/vitrio/`, and `__init__.py` is the whole public surface. The
214
+ extension is the one target built as C++17, which nanobind needs. Python
215
+ sources are indented with tabs, as the C++ ones are.
216
+ - **Arrays across the binding.** A function takes an array as an
217
+ `nb::ndarray`, which nanobind fills from DLPack or the buffer protocol
218
+ without a copy, and `Array` hands its memory out through the object
219
+ nanobind exports arrays with. vitrio has no DLPack code of its own.
220
+ Memory given from Python is lent (`memory_loan`): the arrays over it are
221
+ given an owner that owns nothing, and the loan returns the memory once
222
+ they are gone. So no thread but one that holds the GIL ever releases
223
+ anything of Python, which a worker thread could not do safely while the
224
+ interpreter shuts down. An asynchronous function hands the loan to the
225
+ `Completion` it returns, and destroying that waits for the work.
226
+ - **The GIL.** A bound function that reads, writes or waits releases the
227
+ GIL meanwhile. So does destroying a thread pool, which waits for its
228
+ workers.
229
+ - **Versions.** `VERSION` holds the version of the project. Before 1.0 a minor
230
+ release may break the ABI, so the name of the shared library carries the
231
+ minor version (`libvitrio.so.0.1`).
232
+
233
+ ## Continuous integration
234
+
235
+ `.github/workflows/build-and-test.yml` builds and tests with GCC and Clang on
236
+ Linux, Clang on macOS and MSVC on Windows, then again with the address and
237
+ undefined behaviour sanitizers and with the thread sanitizer, and once more
238
+ with CMake 3.18. The jobs that are not under a sanitizer build the Python
239
+ package too and run its suite, one of them with the oldest Python the
240
+ package supports.
241
+
242
+ `.github/workflows/release.yml` builds the source distribution and, from it,
243
+ the wheels of each platform, and tests each wheel. A tag `v*` publishes
244
+ them to PyPI, which trusts the workflow, so no token is kept. It runs too
245
+ when what decides how they are built changes, and by hand.
246
+
247
+ Both use public actions and the ones under `.github/actions/`, and none of
248
+ the organisation's.
vitrio-0.1.0/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ See [AGENTS.md](AGENTS.md).
@@ -0,0 +1,111 @@
1
+ # SPDX-License-Identifier: LGPL-2.1-or-later
2
+
3
+ cmake_minimum_required(VERSION 3.18)
4
+
5
+ # Without this CMAKE_MSVC_DEBUG_INFORMATION_FORMAT is silently ignored.
6
+ if(POLICY CMP0141)
7
+ cmake_policy(SET CMP0141 NEW)
8
+ endif()
9
+
10
+ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION PROJECT_VERSION)
11
+ string(STRIP "${PROJECT_VERSION}" PROJECT_VERSION)
12
+
13
+ project(
14
+ vitrio
15
+ VERSION ${PROJECT_VERSION}
16
+ DESCRIPTION "Reads and writes the image files of electron microscopy"
17
+ LANGUAGES CXX
18
+ )
19
+
20
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
21
+
22
+ include(CTest)
23
+ include(GNUInstallDirs)
24
+ include(CMakePackageConfigHelpers)
25
+ include(GenerateExportHeader)
26
+ include(vitrio_enable_warnings)
27
+
28
+ option(VITRIO_INSTALL "Generate vitrio's install rules" ON)
29
+ option(VITRIO_ENABLE_TIFF "Read and write TIFF files, which needs libtiff" ON)
30
+ option(VITRIO_BUILD_PYTHON "Build the Python package, which needs nanobind" OFF)
31
+ option(
32
+ VITRIO_PYTHON_STABLE_ABI
33
+ "Build the extension of the Python package against the stable ABI, so \
34
+ that one build serves Python 3.12 and newer. Needs CMake 3.26"
35
+ OFF
36
+ )
37
+ option(VITRIO_BUILD_TESTING "Build vitrio's tests" ${BUILD_TESTING})
38
+ option(
39
+ VITRIO_REGISTER_TESTS_PER_BINARY
40
+ "Register one test per test executable instead of one per Catch2 case"
41
+ OFF
42
+ )
43
+ option(
44
+ VITRIO_CHECK_HEADERS
45
+ "Compile every public header on its own under each C++ standard the \
46
+ compiler supports"
47
+ OFF
48
+ )
49
+
50
+ # The library and its public headers are C++14. The standard is required
51
+ # rather than preferred, so that nothing newer gets in unnoticed.
52
+ set(CMAKE_CXX_STANDARD 14)
53
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
54
+ set(CMAKE_CXX_EXTENSIONS OFF)
55
+
56
+ # Windows looks for a library beside the executable that needs it, and has no
57
+ # other way to be told where one is. So the library, the libraries it needs
58
+ # in turn and the test executables are all built into one directory.
59
+ if(WIN32 AND NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
60
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
61
+ endif()
62
+
63
+ find_package(Threads REQUIRED)
64
+ find_package(Boost 1.70 REQUIRED CONFIG COMPONENTS filesystem)
65
+ find_package(half REQUIRED)
66
+ find_package(spdlog 1.4 REQUIRED CONFIG)
67
+
68
+ # The handlers a file is opened with, which keep its errors apart from those
69
+ # of every other file, arrived in libtiff 4.5.
70
+ if(VITRIO_ENABLE_TIFF)
71
+ find_package(TIFF 4.5 REQUIRED)
72
+ endif()
73
+
74
+ # nanobind ships its CMake package inside its Python package, so the
75
+ # interpreter that has it is asked where that is.
76
+ if(VITRIO_BUILD_PYTHON)
77
+ set(VITRIO_PYTHON_COMPONENTS Interpreter Development.Module)
78
+ if(VITRIO_PYTHON_STABLE_ABI)
79
+ list(APPEND VITRIO_PYTHON_COMPONENTS Development.SABIModule)
80
+ endif()
81
+
82
+ find_package(
83
+ Python 3.10 REQUIRED
84
+ COMPONENTS ${VITRIO_PYTHON_COMPONENTS}
85
+ )
86
+
87
+ if(NOT nanobind_ROOT AND NOT nanobind_DIR)
88
+ execute_process(
89
+ COMMAND ${Python_EXECUTABLE} -m nanobind --cmake_dir
90
+ OUTPUT_VARIABLE nanobind_ROOT
91
+ OUTPUT_STRIP_TRAILING_WHITESPACE
92
+ ERROR_QUIET
93
+ )
94
+ endif()
95
+
96
+ find_package(nanobind 3.0 REQUIRED CONFIG)
97
+ endif()
98
+
99
+ add_subdirectory(src)
100
+
101
+ if(VITRIO_BUILD_PYTHON)
102
+ add_subdirectory(python)
103
+ endif()
104
+
105
+ if(BUILD_TESTING AND VITRIO_BUILD_TESTING)
106
+ add_subdirectory(tests)
107
+ endif()
108
+
109
+ if(VITRIO_CHECK_HEADERS)
110
+ add_subdirectory(tests/headers)
111
+ endif()
@@ -0,0 +1,118 @@
1
+ {
2
+ "version": 3,
3
+ "cmakeMinimumRequired": {
4
+ "major": 3,
5
+ "minor": 21,
6
+ "patch": 0
7
+ },
8
+ "configurePresets": [
9
+ {
10
+ "name": "base",
11
+ "hidden": true,
12
+ "binaryDir": "${sourceDir}/build/${presetName}",
13
+ "cacheVariables": {
14
+ "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
15
+ "VITRIO_BUILD_TESTING": "ON",
16
+ "VITRIO_CHECK_HEADERS": "ON"
17
+ }
18
+ },
19
+ {
20
+ "name": "debug",
21
+ "displayName": "Debug",
22
+ "inherits": "base",
23
+ "cacheVariables": {
24
+ "CMAKE_BUILD_TYPE": "Debug"
25
+ }
26
+ },
27
+ {
28
+ "name": "release",
29
+ "displayName": "Release",
30
+ "inherits": "base",
31
+ "cacheVariables": {
32
+ "CMAKE_BUILD_TYPE": "Release"
33
+ }
34
+ },
35
+ {
36
+ "name": "sanitize",
37
+ "displayName": "Debug with the address and undefined behaviour sanitizers",
38
+ "inherits": "debug",
39
+ "condition": {
40
+ "type": "notEquals",
41
+ "lhs": "${hostSystemName}",
42
+ "rhs": "Windows"
43
+ },
44
+ "cacheVariables": {
45
+ "CMAKE_CXX_FLAGS": "-fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer"
46
+ }
47
+ },
48
+ {
49
+ "name": "sanitize-thread",
50
+ "displayName": "Debug with the thread sanitizer",
51
+ "inherits": "debug",
52
+ "condition": {
53
+ "type": "notEquals",
54
+ "lhs": "${hostSystemName}",
55
+ "rhs": "Windows"
56
+ },
57
+ "cacheVariables": {
58
+ "CMAKE_CXX_FLAGS": "-fsanitize=thread -fno-omit-frame-pointer"
59
+ }
60
+ }
61
+ ],
62
+ "buildPresets": [
63
+ {
64
+ "name": "debug",
65
+ "configurePreset": "debug",
66
+ "configuration": "Debug"
67
+ },
68
+ {
69
+ "name": "release",
70
+ "configurePreset": "release",
71
+ "configuration": "Release"
72
+ },
73
+ {
74
+ "name": "sanitize",
75
+ "configurePreset": "sanitize",
76
+ "configuration": "Debug"
77
+ },
78
+ {
79
+ "name": "sanitize-thread",
80
+ "configurePreset": "sanitize-thread",
81
+ "configuration": "Debug"
82
+ }
83
+ ],
84
+ "testPresets": [
85
+ {
86
+ "name": "debug",
87
+ "configurePreset": "debug",
88
+ "configuration": "Debug",
89
+ "output": {
90
+ "outputOnFailure": true
91
+ }
92
+ },
93
+ {
94
+ "name": "release",
95
+ "configurePreset": "release",
96
+ "configuration": "Release",
97
+ "output": {
98
+ "outputOnFailure": true
99
+ }
100
+ },
101
+ {
102
+ "name": "sanitize",
103
+ "configurePreset": "sanitize",
104
+ "configuration": "Debug",
105
+ "output": {
106
+ "outputOnFailure": true
107
+ }
108
+ },
109
+ {
110
+ "name": "sanitize-thread",
111
+ "configurePreset": "sanitize-thread",
112
+ "configuration": "Debug",
113
+ "output": {
114
+ "outputOnFailure": true
115
+ }
116
+ }
117
+ ]
118
+ }