amd-staging_deprecated ba56a24c6132 cached
652 files
12.5 MB
3.3M tokens
6386 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (13,241K chars total). Download the full file to get everything.
Repository: RadeonOpenCompute/ROCR-Runtime
Branch: amd-staging_deprecated
Commit: ba56a24c6132
Files: 652
Total size: 12.5 MB

Directory structure:
gitextract_zn673rxz/

├── .gitignore
├── CMakeLists.txt
├── DEBIAN/
│   ├── Binary/
│   │   ├── postinst.in
│   │   └── prerm.in
│   ├── Dev/
│   │   ├── postinst.in
│   │   └── prerm.in
│   └── preinst
├── LICENSE.txt
├── README.md
├── RPM/
│   ├── Binary/
│   │   ├── post.in
│   │   └── postun.in
│   ├── Dev/
│   │   ├── post.in
│   │   └── postun.in
│   ├── hsa-rocr.spec.in
│   └── preinst
├── _clang-format
├── clang-format-diff.py
├── cmake_modules/
│   └── utils.cmake
├── format
├── libhsakmt/
│   ├── CMakeLists.txt
│   ├── DEBIAN/
│   │   ├── postinst.in
│   │   └── prerm.in
│   ├── LICENSE.md
│   ├── README.md
│   ├── RPM/
│   │   ├── hsakmt-roct-devel.spec.in
│   │   ├── libhsakmt.spec
│   │   ├── post.in
│   │   └── postun.in
│   ├── cmake_modules/
│   │   └── utils.cmake
│   ├── hsakmt-config.cmake.in
│   ├── include/
│   │   └── hsakmt/
│   │       ├── hsakmt.h
│   │       ├── hsakmt_virtio.h
│   │       ├── hsakmtmodel.h
│   │       ├── hsakmtmodeliface.h
│   │       ├── hsakmttypes.h
│   │       └── linux/
│   │           ├── kfd_ioctl.h
│   │           └── udmabuf.h
│   ├── libhsakmt.pc.in
│   ├── src/
│   │   ├── debug.c
│   │   ├── events.c
│   │   ├── fmm.c
│   │   ├── fmm.h
│   │   ├── globals.c
│   │   ├── hsakmtmodel.c
│   │   ├── libhsakmt.c
│   │   ├── libhsakmt.h
│   │   ├── libhsakmt.ver
│   │   ├── memory.c
│   │   ├── openclose.c
│   │   ├── pc_sampling.c
│   │   ├── perfctr.c
│   │   ├── pmc_table.c
│   │   ├── pmc_table.h
│   │   ├── queues.c
│   │   ├── rbtree.c
│   │   ├── rbtree.h
│   │   ├── rbtree_amd.h
│   │   ├── spm.c
│   │   ├── svm.c
│   │   ├── time.c
│   │   ├── topology.c
│   │   ├── version.c
│   │   └── virtio/
│   │       ├── CMakeLists.txt
│   │       ├── hsakmt_virtio_amdgpu.c
│   │       ├── hsakmt_virtio_device.c
│   │       ├── hsakmt_virtio_device.h
│   │       ├── hsakmt_virtio_events.c
│   │       ├── hsakmt_virtio_memory.c
│   │       ├── hsakmt_virtio_openclose.c
│   │       ├── hsakmt_virtio_proto.h
│   │       ├── hsakmt_virtio_queues.c
│   │       ├── hsakmt_virtio_topology.c
│   │       ├── hsakmt_virtio_vm.c
│   │       ├── include/
│   │       │   └── linux/
│   │       │       └── virtgpu_drm.h
│   │       ├── libhsakmt_virtio.ver
│   │       ├── virtio_gpu.c
│   │       └── virtio_gpu.h
│   └── tests/
│       ├── kfdtest/
│       │   ├── .gitignore
│       │   ├── CMakeLists.txt
│       │   ├── LICENSE.kfdtest
│       │   ├── README.txt
│       │   ├── gtest-1.6.0/
│       │   │   ├── gtest/
│       │   │   │   └── gtest.h
│       │   │   └── gtest-all.cpp
│       │   ├── include/
│       │   │   ├── amdp2ptest.h
│       │   │   ├── asic_reg/
│       │   │   │   ├── gfx_7_2_d.h
│       │   │   │   ├── gfx_7_2_enum.h
│       │   │   │   └── gfx_7_2_sh_mask.h
│       │   │   ├── kfd_pm4_opcodes.h
│       │   │   ├── pm4_pkt_struct_ai.h
│       │   │   ├── pm4_pkt_struct_ci.h
│       │   │   ├── pm4_pkt_struct_common.h
│       │   │   ├── pm4_pkt_struct_nv.h
│       │   │   └── sdma_pkt_struct.h
│       │   ├── scripts/
│       │   │   ├── kfdtest.exclude
│       │   │   └── run_kfdtest.sh
│       │   └── src/
│       │       ├── AqlQueue.cpp
│       │       ├── AqlQueue.hpp
│       │       ├── Assemble.cpp
│       │       ├── Assemble.hpp
│       │       ├── BaseDebug.cpp
│       │       ├── BaseDebug.hpp
│       │       ├── BasePacket.cpp
│       │       ├── BasePacket.hpp
│       │       ├── BaseQueue.cpp
│       │       ├── BaseQueue.hpp
│       │       ├── Dispatch.cpp
│       │       ├── Dispatch.hpp
│       │       ├── GoogleTestExtension.cpp
│       │       ├── GoogleTestExtension.hpp
│       │       ├── IndirectBuffer.cpp
│       │       ├── IndirectBuffer.hpp
│       │       ├── KFDASMTest.cpp
│       │       ├── KFDASMTest.hpp
│       │       ├── KFDBaseComponentTest.cpp
│       │       ├── KFDBaseComponentTest.hpp
│       │       ├── KFDCWSRTest.cpp
│       │       ├── KFDCWSRTest.hpp
│       │       ├── KFDDBGTest.cpp
│       │       ├── KFDDBGTest.hpp
│       │       ├── KFDEventTest.cpp
│       │       ├── KFDEventTest.hpp
│       │       ├── KFDEvictTest.cpp
│       │       ├── KFDEvictTest.hpp
│       │       ├── KFDExceptionTest.cpp
│       │       ├── KFDExceptionTest.hpp
│       │       ├── KFDGWSTest.cpp
│       │       ├── KFDGWSTest.hpp
│       │       ├── KFDGraphicsInterop.cpp
│       │       ├── KFDGraphicsInterop.hpp
│       │       ├── KFDHWSTest.cpp
│       │       ├── KFDHWSTest.hpp
│       │       ├── KFDIPCTest.cpp
│       │       ├── KFDIPCTest.hpp
│       │       ├── KFDLocalMemoryTest.cpp
│       │       ├── KFDLocalMemoryTest.hpp
│       │       ├── KFDMemoryTest.cpp
│       │       ├── KFDMemoryTest.hpp
│       │       ├── KFDMultiProcessTest.cpp
│       │       ├── KFDMultiProcessTest.hpp
│       │       ├── KFDNegativeTest.cpp
│       │       ├── KFDNegativeTest.hpp
│       │       ├── KFDOpenCloseKFDTest.cpp
│       │       ├── KFDOpenCloseKFDTest.hpp
│       │       ├── KFDPCSamplingTest.cpp
│       │       ├── KFDPCSamplingTest.hpp
│       │       ├── KFDPMTest.cpp
│       │       ├── KFDPMTest.hpp
│       │       ├── KFDPerfCounters.cpp
│       │       ├── KFDPerfCounters.hpp
│       │       ├── KFDPerformanceTest.cpp
│       │       ├── KFDQMTest.cpp
│       │       ├── KFDQMTest.hpp
│       │       ├── KFDRASTest.cpp
│       │       ├── KFDRASTest.hpp
│       │       ├── KFDSVMEvictTest.cpp
│       │       ├── KFDSVMEvictTest.hpp
│       │       ├── KFDSVMRangeTest.cpp
│       │       ├── KFDSVMRangeTest.hpp
│       │       ├── KFDTestFlags.hpp
│       │       ├── KFDTestMain.cpp
│       │       ├── KFDTestUtil.cpp
│       │       ├── KFDTestUtil.hpp
│       │       ├── KFDTestUtilQueue.cpp
│       │       ├── KFDTestUtilQueue.hpp
│       │       ├── KFDTopologyTest.cpp
│       │       ├── KFDTopologyTest.hpp
│       │       ├── LinuxOSWrapper.cpp
│       │       ├── OSWrapper.hpp
│       │       ├── PM4Packet.cpp
│       │       ├── PM4Packet.hpp
│       │       ├── PM4Queue.cpp
│       │       ├── PM4Queue.hpp
│       │       ├── RDMATest.cpp
│       │       ├── RDMATest.hpp
│       │       ├── RDMAUtil.cpp
│       │       ├── RDMAUtil.hpp
│       │       ├── SDMAPacket.cpp
│       │       ├── SDMAPacket.hpp
│       │       ├── SDMAQueue.cpp
│       │       ├── SDMAQueue.hpp
│       │       ├── SDMAQueueByEngId.hpp
│       │       ├── ShaderStore.cpp
│       │       ├── ShaderStore.hpp
│       │       └── XgmiOptimizedSDMAQueue.hpp
│       ├── rdma/
│       │   └── simple/
│       │       ├── app/
│       │       │   ├── CMakeLists.txt
│       │       │   └── rdma_test.cpp
│       │       └── drv/
│       │           ├── amdp2ptest.c
│       │           └── amdp2ptest.h
│       └── reopen/
│           ├── CMakeLists.txt
│           └── kmtreopen.c
├── rocrtst/
│   ├── .gitignore
│   ├── Kernels/
│   │   ├── CMakeLists.txt
│   │   ├── binary_search_kernel.cl
│   │   ├── read_kernel.cl
│   │   └── write_kernel.cl
│   ├── README.md
│   ├── common/
│   │   ├── base_rocr.cc
│   │   ├── base_rocr.h
│   │   ├── base_rocr_utils.cc
│   │   ├── base_rocr_utils.h
│   │   ├── common.cc
│   │   ├── common.h
│   │   ├── concurrent_utils.cc
│   │   ├── concurrent_utils.h
│   │   ├── helper_funcs.cc
│   │   ├── helper_funcs.h
│   │   ├── hsatimer.cc
│   │   ├── hsatimer.h
│   │   ├── os.cc
│   │   ├── os.h
│   │   ├── rocr.cc
│   │   ├── rocr.h
│   │   └── utils_test/
│   │       ├── CMakeLists.txt
│   │       ├── utils_cpp11_gtest.cpp
│   │       ├── utils_timer_gtest.cpp
│   │       ├── utils_timer_test.cpp
│   │       └── utils_timer_test.hpp
│   ├── gtest/
│   │   ├── CMakeLists.txt
│   │   ├── include/
│   │   │   └── gtest/
│   │   │       ├── gtest-death-test.h
│   │   │       ├── gtest-message.h
│   │   │       ├── gtest-param-test.h
│   │   │       ├── gtest-printers.h
│   │   │       ├── gtest-spi.h
│   │   │       ├── gtest-test-part.h
│   │   │       ├── gtest-typed-test.h
│   │   │       ├── gtest.h
│   │   │       ├── gtest_pred_impl.h
│   │   │       ├── gtest_prod.h
│   │   │       └── internal/
│   │   │           ├── gtest-death-test-internal.h
│   │   │           ├── gtest-filepath.h
│   │   │           ├── gtest-internal.h
│   │   │           ├── gtest-linked_ptr.h
│   │   │           ├── gtest-param-util-generated.h
│   │   │           ├── gtest-param-util-generated.h.pump
│   │   │           ├── gtest-param-util.h
│   │   │           ├── gtest-port.h
│   │   │           ├── gtest-string.h
│   │   │           ├── gtest-tuple.h
│   │   │           ├── gtest-tuple.h.pump
│   │   │           ├── gtest-type-util.h
│   │   │           └── gtest-type-util.h.pump
│   │   └── src/
│   │       ├── gtest-all.cpp
│   │       ├── gtest-death-test.cpp
│   │       ├── gtest-filepath.cpp
│   │       ├── gtest-internal-inl.h
│   │       ├── gtest-port.cpp
│   │       ├── gtest-printers.cpp
│   │       ├── gtest-test-part.cpp
│   │       ├── gtest-typed-test.cpp
│   │       ├── gtest.cpp
│   │       └── gtest_main.cpp
│   ├── samples/
│   │   ├── CMakeLists.txt
│   │   ├── README.txt
│   │   ├── async_mem_copy/
│   │   │   └── async_mem_copy.cc
│   │   ├── binary_search/
│   │   │   ├── binary_search.cc
│   │   │   └── binary_search_kernels.cl
│   │   ├── ipc/
│   │   │   └── ipc.cc
│   │   ├── rocm_async/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── Readme.txt
│   │   │   ├── base_test.cpp
│   │   │   ├── base_test.hpp
│   │   │   ├── common.cpp
│   │   │   ├── common.hpp
│   │   │   ├── hsatimer.cpp
│   │   │   ├── hsatimer.hpp
│   │   │   ├── main.cpp
│   │   │   ├── os.cpp
│   │   │   ├── os.hpp
│   │   │   ├── rocm_async.cpp
│   │   │   ├── rocm_async.hpp
│   │   │   ├── rocm_async_io.cpp
│   │   │   ├── rocm_async_parse.cpp
│   │   │   ├── rocm_async_print.cpp
│   │   │   ├── rocm_async_report.cpp
│   │   │   ├── rocm_async_topology.cpp
│   │   │   ├── rocm_async_trans.cpp
│   │   │   └── rocm_async_validate.cpp
│   │   └── rocrinfo/
│   │       └── rocrinfo.cc
│   ├── suites/
│   │   ├── functional/
│   │   │   ├── agent_props.cc
│   │   │   ├── agent_props.h
│   │   │   ├── aql_barrier_bit.cc
│   │   │   ├── aql_barrier_bit.h
│   │   │   ├── concurrent_init.cc
│   │   │   ├── concurrent_init.h
│   │   │   ├── concurrent_init_shutdown.cc
│   │   │   ├── concurrent_init_shutdown.h
│   │   │   ├── concurrent_shutdown.cc
│   │   │   ├── concurrent_shutdown.h
│   │   │   ├── cu_masking.cc
│   │   │   ├── cu_masking.h
│   │   │   ├── deallocation_notifier.cc
│   │   │   ├── deallocation_notifier.h
│   │   │   ├── debug_basic.cc
│   │   │   ├── debug_basic.h
│   │   │   ├── ipc.cc
│   │   │   ├── ipc.h
│   │   │   ├── memory_access.cc
│   │   │   ├── memory_access.h
│   │   │   ├── memory_alignment.cc
│   │   │   ├── memory_alignment.h
│   │   │   ├── memory_allocation.cc
│   │   │   ├── memory_allocation.h
│   │   │   ├── memory_atomics.cc
│   │   │   ├── memory_atomics.h
│   │   │   ├── memory_basic.cc
│   │   │   ├── memory_basic.h
│   │   │   ├── reference_count.cc
│   │   │   ├── reference_count.h
│   │   │   ├── signal_concurrent.cc
│   │   │   ├── signal_concurrent.h
│   │   │   ├── signal_kernel.cc
│   │   │   ├── signal_kernel.h
│   │   │   ├── virtual_memory.cc
│   │   │   └── virtual_memory.h
│   │   ├── negative/
│   │   │   ├── memory_allocate_negative_tests.cc
│   │   │   ├── memory_allocate_negative_tests.h
│   │   │   ├── queue_validation.cc
│   │   │   └── queue_validation.h
│   │   ├── performance/
│   │   │   ├── dispatch_time.cc
│   │   │   ├── dispatch_time.h
│   │   │   ├── enqueueLatency.cc
│   │   │   ├── enqueueLatency.h
│   │   │   ├── memory_async_copy.cc
│   │   │   ├── memory_async_copy.h
│   │   │   ├── memory_async_copy_numa.cc
│   │   │   └── memory_async_copy_numa.h
│   │   ├── stress/
│   │   │   ├── memory_concurrent_tests.cc
│   │   │   ├── memory_concurrent_tests.h
│   │   │   ├── queue_write_index_concurrent_tests.cc
│   │   │   └── queue_write_index_concurrent_tests.h
│   │   └── test_common/
│   │       ├── CMakeLists.txt
│   │       ├── kernels/
│   │       │   ├── atomicOperations_kernels.cl
│   │       │   ├── cu_mask_kernels.cl
│   │       │   ├── dispatch_time_kernels.cl
│   │       │   ├── gpuReadWrite_kernels.cl
│   │       │   ├── groupMemoryDynamic_kernels.cl
│   │       │   ├── signal_operations.cl
│   │       │   ├── test_case_template_kernels.cl
│   │       │   ├── vector_add_debug_trap_kernel.cl
│   │       │   └── vector_add_memory_fault_kernel.cl
│   │       ├── main.cc
│   │       ├── main.h
│   │       ├── test_base.cc
│   │       ├── test_base.h
│   │       ├── test_case_template.cc
│   │       ├── test_case_template.h
│   │       ├── test_common.cc
│   │       └── test_common.h
│   └── thirdparty/
│       ├── include/
│       │   ├── LICENSE
│       │   ├── hwloc/
│       │   │   ├── autogen/
│       │   │   │   └── config.h
│       │   │   ├── bitmap.h
│       │   │   ├── cpuset.h
│       │   │   ├── cuda.h
│       │   │   ├── cudart.h
│       │   │   ├── deprecated.h
│       │   │   ├── diff.h
│       │   │   ├── gl.h
│       │   │   ├── glibc-sched.h
│       │   │   ├── helper.h
│       │   │   ├── inlines.h
│       │   │   ├── intel-mic.h
│       │   │   ├── linux-libnuma.h
│       │   │   ├── linux.h
│       │   │   ├── myriexpress.h
│       │   │   ├── nvml.h
│       │   │   ├── opencl.h
│       │   │   ├── openfabrics-verbs.h
│       │   │   ├── plugins.h
│       │   │   └── rename.h
│       │   └── hwloc.h
│       └── lib/
│           ├── LICENSE
│           └── libhwloc.so.5
├── runtime/
│   ├── cmake_modules/
│   │   ├── COPYING-CMAKE-SCRIPTS
│   │   └── FindLibElf.cmake
│   ├── docs/
│   │   ├── api-reference/
│   │   │   ├── api.rst
│   │   │   ├── c-interface-adaptors.rst
│   │   │   └── environment_variables.rst
│   │   ├── conf.py
│   │   ├── contribution/
│   │   │   └── contributing-to-rocr.rst
│   │   ├── data/
│   │   │   └── env_variables.rst
│   │   ├── index.rst
│   │   ├── install/
│   │   │   └── installation.rst
│   │   ├── license.rst
│   │   ├── sphinx/
│   │   │   ├── _toc.yml.in
│   │   │   ├── requirements.in
│   │   │   └── requirements.txt
│   │   └── what-is-rocr-runtime.rst
│   ├── hsa-ext-finalize/
│   │   └── CMakeLists.txt
│   ├── hsa-ext-image/
│   │   └── CMakeLists.txt
│   ├── hsa-runtime/
│   │   ├── CMakeLists.txt
│   │   ├── LICENSE.md
│   │   ├── cmake_modules/
│   │   │   ├── COPYING-CMAKE-SCRIPTS
│   │   │   ├── FindLibElf.cmake
│   │   │   ├── hsa_common.cmake
│   │   │   └── utils.cmake
│   │   ├── core/
│   │   │   ├── common/
│   │   │   │   ├── hsa_table_interface.cpp
│   │   │   │   └── shared.h
│   │   │   ├── driver/
│   │   │   │   ├── driver.cpp
│   │   │   │   ├── kfd/
│   │   │   │   │   └── amd_kfd_driver.cpp
│   │   │   │   ├── virtio/
│   │   │   │   │   └── amd_kfd_virtio_driver.cpp
│   │   │   │   └── xdna/
│   │   │   │       ├── amd_xdna_driver.cpp
│   │   │   │       └── uapi/
│   │   │   │           └── amdxdna_accel.h
│   │   │   ├── inc/
│   │   │   │   ├── agent.h
│   │   │   │   ├── amd_aie_agent.h
│   │   │   │   ├── amd_aie_aql_queue.h
│   │   │   │   ├── amd_aql_queue.h
│   │   │   │   ├── amd_available_drivers.h
│   │   │   │   ├── amd_blit_kernel.h
│   │   │   │   ├── amd_blit_sdma.h
│   │   │   │   ├── amd_blit_shaders.h
│   │   │   │   ├── amd_core_dump.hpp
│   │   │   │   ├── amd_cpu_agent.h
│   │   │   │   ├── amd_elf_image.hpp
│   │   │   │   ├── amd_filter_device.h
│   │   │   │   ├── amd_gpu_agent.h
│   │   │   │   ├── amd_gpu_pm4.h
│   │   │   │   ├── amd_hsa_code.hpp
│   │   │   │   ├── amd_hsa_loader.hpp
│   │   │   │   ├── amd_kfd_driver.h
│   │   │   │   ├── amd_loader_context.hpp
│   │   │   │   ├── amd_memory_region.h
│   │   │   │   ├── amd_topology.h
│   │   │   │   ├── amd_trap_handler_v1.h
│   │   │   │   ├── amd_virtio_driver.h
│   │   │   │   ├── amd_xdna_driver.h
│   │   │   │   ├── blit.h
│   │   │   │   ├── cache.h
│   │   │   │   ├── checked.h
│   │   │   │   ├── default_signal.h
│   │   │   │   ├── driver.h
│   │   │   │   ├── exceptions.h
│   │   │   │   ├── host_queue.h
│   │   │   │   ├── hsa_amd_tool_int.hpp
│   │   │   │   ├── hsa_api_trace_int.h
│   │   │   │   ├── hsa_ext_amd_impl.h
│   │   │   │   ├── hsa_ext_interface.h
│   │   │   │   ├── hsa_internal.h
│   │   │   │   ├── hsa_table_interface.h
│   │   │   │   ├── hsa_ven_amd_loader_impl.h
│   │   │   │   ├── intercept_queue.h
│   │   │   │   ├── interrupt_signal.h
│   │   │   │   ├── ipc_signal.h
│   │   │   │   ├── isa.h
│   │   │   │   ├── memory_region.h
│   │   │   │   ├── queue.h
│   │   │   │   ├── registers.h
│   │   │   │   ├── runtime.h
│   │   │   │   ├── scratch_cache.h
│   │   │   │   ├── sdma_registers.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── svm_profiler.h
│   │   │   │   └── thunk_loader.h
│   │   │   ├── runtime/
│   │   │   │   ├── amd_aie_agent.cpp
│   │   │   │   ├── amd_aie_aql_queue.cpp
│   │   │   │   ├── amd_aql_queue.cpp
│   │   │   │   ├── amd_blit_kernel.cpp
│   │   │   │   ├── amd_blit_sdma.cpp
│   │   │   │   ├── amd_cpu_agent.cpp
│   │   │   │   ├── amd_filter_device.cpp
│   │   │   │   ├── amd_gpu_agent.cpp
│   │   │   │   ├── amd_hsa_loader.cpp
│   │   │   │   ├── amd_loader_context.cpp
│   │   │   │   ├── amd_memory_region.cpp
│   │   │   │   ├── amd_topology.cpp
│   │   │   │   ├── blit_shaders/
│   │   │   │   │   ├── CMakeLists.txt
│   │   │   │   │   ├── blit_copyAligned.s
│   │   │   │   │   ├── blit_copyMisaligned.s
│   │   │   │   │   ├── blit_fill.s
│   │   │   │   │   └── create_blit_shader_header.sh
│   │   │   │   ├── cache.cpp
│   │   │   │   ├── default_signal.cpp
│   │   │   │   ├── host_queue.cpp
│   │   │   │   ├── hsa.cpp
│   │   │   │   ├── hsa_api_trace.cpp
│   │   │   │   ├── hsa_ext_amd.cpp
│   │   │   │   ├── hsa_ext_interface.cpp
│   │   │   │   ├── hsa_ven_amd_loader.cpp
│   │   │   │   ├── intercept_queue.cpp
│   │   │   │   ├── interrupt_signal.cpp
│   │   │   │   ├── ipc_signal.cpp
│   │   │   │   ├── isa.cpp
│   │   │   │   ├── queue.cpp
│   │   │   │   ├── runtime.cpp
│   │   │   │   ├── signal.cpp
│   │   │   │   ├── svm_profiler.cpp
│   │   │   │   ├── thunk_loader.cpp
│   │   │   │   └── trap_handler/
│   │   │   │       ├── CMakeLists.txt
│   │   │   │       ├── create_trap_handler_header.sh
│   │   │   │       ├── trap_handler.s
│   │   │   │       └── trap_handler_gfx12.s
│   │   │   └── util/
│   │   │       ├── atomic_helpers.h
│   │   │       ├── flag.cpp
│   │   │       ├── flag.h
│   │   │       ├── lazy_ptr.h
│   │   │       ├── lnx/
│   │   │       │   └── os_linux.cpp
│   │   │       ├── locks.h
│   │   │       ├── memory.h
│   │   │       ├── os.h
│   │   │       ├── simple_heap.h
│   │   │       ├── small_heap.cpp
│   │   │       ├── small_heap.h
│   │   │       ├── timer.cpp
│   │   │       ├── timer.h
│   │   │       ├── utils.h
│   │   │       └── win/
│   │   │           └── os_win.cpp
│   │   ├── hsa-runtime64-config.cmake.in
│   │   ├── hsacore.so.def
│   │   ├── hsacore.so.link
│   │   ├── image/
│   │   │   ├── addrlib/
│   │   │   │   ├── inc/
│   │   │   │   │   ├── addrinterface.h
│   │   │   │   │   └── addrtypes.h
│   │   │   │   └── src/
│   │   │   │       ├── addrinterface.cpp
│   │   │   │       ├── amdgpu_asic_addr.h
│   │   │   │       ├── chip/
│   │   │   │       │   ├── gfx10/
│   │   │   │       │   │   └── gfx10_gb_reg.h
│   │   │   │       │   ├── gfx11/
│   │   │   │       │   │   └── gfx11_gb_reg.h
│   │   │   │       │   ├── gfx12/
│   │   │   │       │   │   └── gfx12_gb_reg.h
│   │   │   │       │   ├── gfx9/
│   │   │   │       │   │   └── gfx9_gb_reg.h
│   │   │   │       │   └── r800/
│   │   │   │       │       └── si_gb_reg.h
│   │   │   │       ├── core/
│   │   │   │       │   ├── addrcommon.h
│   │   │   │       │   ├── addrelemlib.cpp
│   │   │   │       │   ├── addrelemlib.h
│   │   │   │       │   ├── addrlib.cpp
│   │   │   │       │   ├── addrlib.h
│   │   │   │       │   ├── addrlib1.cpp
│   │   │   │       │   ├── addrlib1.h
│   │   │   │       │   ├── addrlib2.cpp
│   │   │   │       │   ├── addrlib2.h
│   │   │   │       │   ├── addrlib3.cpp
│   │   │   │       │   ├── addrlib3.h
│   │   │   │       │   ├── addrobject.cpp
│   │   │   │       │   ├── addrobject.h
│   │   │   │       │   ├── coord.cpp
│   │   │   │       │   └── coord.h
│   │   │   │       ├── gfx10/
│   │   │   │       │   ├── gfx10SwizzlePattern.h
│   │   │   │       │   ├── gfx10addrlib.cpp
│   │   │   │       │   └── gfx10addrlib.h
│   │   │   │       ├── gfx11/
│   │   │   │       │   ├── gfx11SwizzlePattern.h
│   │   │   │       │   ├── gfx11addrlib.cpp
│   │   │   │       │   └── gfx11addrlib.h
│   │   │   │       ├── gfx12/
│   │   │   │       │   ├── gfx12SwizzlePattern.h
│   │   │   │       │   ├── gfx12addrlib.cpp
│   │   │   │       │   └── gfx12addrlib.h
│   │   │   │       └── gfx9/
│   │   │   │           ├── gfx9addrlib.cpp
│   │   │   │           └── gfx9addrlib.h
│   │   │   ├── blit_kernel.cpp
│   │   │   ├── blit_kernel.h
│   │   │   ├── blit_object_gfx7xx.cpp
│   │   │   ├── blit_object_gfx8xx.cpp
│   │   │   ├── blit_object_gfx9xx.cpp
│   │   │   ├── blit_src/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── README.md
│   │   │   │   ├── create_hsaco_ascii_file.sh
│   │   │   │   └── imageblit_kernels.cl
│   │   │   ├── device_info.cpp
│   │   │   ├── device_info.h
│   │   │   ├── hsa_ext_image.cpp
│   │   │   ├── image_lut.h
│   │   │   ├── image_lut_gfx11.cpp
│   │   │   ├── image_lut_gfx11.h
│   │   │   ├── image_lut_kv.cpp
│   │   │   ├── image_lut_kv.h
│   │   │   ├── image_manager.cpp
│   │   │   ├── image_manager.h
│   │   │   ├── image_manager_ai.cpp
│   │   │   ├── image_manager_ai.h
│   │   │   ├── image_manager_gfx11.cpp
│   │   │   ├── image_manager_gfx11.h
│   │   │   ├── image_manager_gfx12.cpp
│   │   │   ├── image_manager_gfx12.h
│   │   │   ├── image_manager_kv.cpp
│   │   │   ├── image_manager_kv.h
│   │   │   ├── image_manager_nv.cpp
│   │   │   ├── image_manager_nv.h
│   │   │   ├── image_runtime.cpp
│   │   │   ├── image_runtime.h
│   │   │   ├── inc/
│   │   │   │   └── hsa_ext_image_impl.h
│   │   │   ├── resource.h
│   │   │   ├── resource_ai.h
│   │   │   ├── resource_gfx11.h
│   │   │   ├── resource_gfx12.h
│   │   │   ├── resource_kv.h
│   │   │   ├── resource_nv.h
│   │   │   └── util.h
│   │   ├── inc/
│   │   │   ├── Brig.h
│   │   │   ├── amd_hsa_common.h
│   │   │   ├── amd_hsa_elf.h
│   │   │   ├── amd_hsa_kernel_code.h
│   │   │   ├── amd_hsa_queue.h
│   │   │   ├── amd_hsa_signal.h
│   │   │   ├── hsa.h
│   │   │   ├── hsa_amd_tool.h
│   │   │   ├── hsa_api_trace.h
│   │   │   ├── hsa_api_trace_version.h
│   │   │   ├── hsa_ext_amd.h
│   │   │   ├── hsa_ext_finalize.h
│   │   │   ├── hsa_ext_image.h
│   │   │   ├── hsa_ven_amd_aqlprofile.h
│   │   │   ├── hsa_ven_amd_loader.h
│   │   │   └── hsa_ven_amd_pc_sampling.h
│   │   ├── libamdhsacode/
│   │   │   ├── amd_core_dump.cpp
│   │   │   ├── amd_elf_image.cpp
│   │   │   ├── amd_hsa_code.cpp
│   │   │   ├── amd_hsa_code_util.cpp
│   │   │   ├── amd_hsa_code_util.hpp
│   │   │   ├── amd_hsa_locks.cpp
│   │   │   ├── amd_hsa_locks.hpp
│   │   │   ├── amd_options.cpp
│   │   │   └── amd_options.hpp
│   │   ├── loader/
│   │   │   ├── AMDHSAKernelDescriptor.h
│   │   │   ├── executable.cpp
│   │   │   └── executable.hpp
│   │   └── pcs/
│   │       ├── hsa_ven_amd_pc_sampling.cpp
│   │       ├── inc/
│   │       │   └── hsa_ven_amd_pc_sampling_impl.h
│   │       ├── pcs_runtime.cpp
│   │       └── pcs_runtime.h
│   ├── hsa-runtime-tools/
│   │   └── CMakeLists.txt
│   └── packages/
│       ├── hsa-ext-rocr-dev/
│       │   ├── CMakeLists.txt
│       │   ├── Old CMakeLists.txt
│       │   ├── copyright
│       │   ├── description
│       │   ├── postinst
│       │   ├── prerm
│       │   ├── rpm_post
│       │   └── rpm_postun
│       └── rocr_tools_legacy/
│           ├── CMakeLists.txt
│           ├── copyright
│           ├── description
│           ├── postinst
│           ├── prerm
│           ├── rpm_post
│           └── rpm_postun
└── samples/
    ├── GetInfo/
    │   ├── get_info.cpp
    │   └── get_info.h
    └── common/
        ├── common.cpp
        ├── common.hpp
        ├── common_utility.cpp
        ├── common_utility.h
        ├── helper_funcs.cpp
        ├── helper_funcs.hpp
        ├── hsa_base_util.cpp
        ├── hsa_base_util.h
        ├── hsa_perf_cntrs.cpp
        ├── hsa_perf_cntrs.hpp
        ├── hsa_rsrc_factory.cpp
        ├── hsa_rsrc_factory.hpp
        ├── hsa_test.cpp
        ├── hsa_test.h
        ├── hsatimer.cpp
        ├── hsatimer.h
        ├── os.cpp
        ├── os.h
        ├── utilities.cpp
        └── utilities.h

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
.*

#
# git files that we don't want to ignore even it they are dot-files
#
!.gitignore
!.mailmap
.github*
patches-*
build/
outgoing/
Makefile

# documentation artifacts
_build/
_doxygen/
_images/
_static/
_templates/
_toc.yml
doxygen



================================================
FILE: CMakeLists.txt
================================================
################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2014-2025, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
##                 AMD Research and AMD HSA Software Development
##
##                 Advanced Micro Devices, Inc.
##
##                 www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and/or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
##  - Redistributions of source code must retain the above copyright notice,
##    this list of conditions and the following disclaimers.
##  - Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimers in
##    the documentation and/or other materials provided with the distribution.
##  - Neither the names of Advanced Micro Devices, Inc,
##    nor the names of its contributors may be used to endorse or promote
##    products derived from this Software without specific prior written
##    permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################


cmake_minimum_required(VERSION 3.7)

# Set the project name
project("rocr")

set(CMAKE_VERBOSE_MAKEFILE ON)
## Expose static library option
if ( NOT DEFINED BUILD_SHARED_LIBS )
  set ( BUILD_SHARED_LIBS ON )
endif()
set ( BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS} CACHE BOOL "Build shared library (.so) or not.")

if (NOT DEFINED BUILD_ROCR)
  set(BUILD_ROCR ON)
endif()

function(add_rocm_subdir subdir subdir_assigns)
    message("add_rocm_subdir() -- " ${subdir})
    # message("  subdir_assigns before:" ${subdir_assigns} "EOM")
    string(STRIP "${subdir_assigns}" subdir_assigns)
    message("  subdir_assigns:" ${subdir_assigns} "EOM")

    # if the subdir_assigns is defined and  non-empty, then..

    if(NOT "${subdir_assigns}" STREQUAL "")
        foreach(assignment IN LISTS subdir_assigns)
            # The format of each var should be VARNAME=VALUE
            message("assignment: " ${assignment})
            string(REPLACE "=" ";" pair ${assignment})
            list(GET pair 0 var_name)
            list(GET pair 1 var_value)

            # Set variable locally for this function and for the subdirectory
            set(${var_name} "${var_value}")
            message("The value of ${var_name} is: ${${var_name}}")
        endforeach()
    endif()
    add_subdirectory(${subdir})
endfunction()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
include(utils)


## Get version strings
get_version("1.18.0")
if (${ROCM_PATCH_VERSION})
  set(VERSION_PATCH ${ROCM_PATCH_VERSION})
endif()
set(SO_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
set(PACKAGE_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_COMMIT_COUNT}")

if (NOT DEFINED BUILD_SHARED_LIBS)
	set(BUILD_SHARED_LIBS ON)
endif()

# Set hsa pkg dependency with rocprofiler-register package
# for Shared Library Only.
if (BUILD_SHARED_LIBS)
  set(HSA_DEP_ROCPROFILER_REGISTER ON CACHE INTERNAL "")
endif()

if (HSA_DEP_ROCPROFILER_REGISTER)
  string(APPEND CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS ", rocprofiler-register")
  string(APPEND CPACK_RPM_BINARY_PACKAGE_REQUIRES " rocprofiler-register")
endif()

if (NOT DEFINED BUILD_THUNK_VIRTIO)
  set(BUILD_THUNK_VIRTIO OFF)
endif()

add_rocm_subdir(libhsakmt "${THUNK_DEFINITIONS}")
set_target_properties(hsakmt PROPERTIES
                                ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/libhsakmt/archive"
                                LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/libhsakmt/lib"
                                RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/libhsakmt/runtime")

if (BUILD_THUNK_VIRTIO)
  add_rocm_subdir(libhsakmt/src/virtio "${THUNK_VIRTIO_DEFINITIONS}")
endif()

if (BUILD_ROCR)
  add_rocm_subdir(runtime/hsa-runtime "${ROCR_DEFINITIONS}")
  set_target_properties(hsa-runtime64 PROPERTIES
                               ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/rocr/archive"
                               LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/rocr/lib"
                               RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/rocr/runtime")

  if (BUILD_SHARED_LIBS)
    add_dependencies(hsa-runtime64 hsakmt)
    if (BUILD_THUNK_VIRTIO)
      add_dependencies(hsa-runtime64 hsakmt_virtio)
    endif()
  else()
    add_dependencies(hsa-runtime64 hsakmt-staticdrm)
  endif()
endif()

# Optionally record the package's find module in the user's package cache.
if ( NOT DEFINED EXPORT_TO_USER_PACKAGE_REGISTRY )
  set ( EXPORT_TO_USER_PACKAGE_REGISTRY "off")
endif()
set ( EXPORT_TO_USER_PACKAGE_REGISTRY ${EXPORT_TO_USER_PACKAGE_REGISTRY} CACHE BOOL "Add cmake package config location to the user's cmake package registry.")
if(${EXPORT_TO_USER_PACKAGE_REGISTRY})
  # Enable writing to the registry
  set(CMAKE_EXPORT_PACKAGE_REGISTRY ON)
  # Generate a target file for the build
  export(TARGETS ${CORE_RUNTIME_NAME} NAMESPACE ${CORE_RUNTIME_NAME}:: FILE ${CORE_RUNTIME_NAME}Targets.cmake)
  # Record the package in the user's cache.
  export(PACKAGE ${CORE_RUNTIME_NAME})
endif()

## Packaging directives
set(CPACK_VERBOSE 1)
set(CPACK_GENERATOR "DEB;RPM" CACHE STRING "Package types to build")
set(ENABLE_LDCONFIG ON CACHE BOOL "Set library links and caches using ldconfig.")

# From libhsakmt:
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"  CACHE STRING "Default packaging prefix.")

if(DEFINED CPACK_PACKAGING_INSTALL_PREFIX)
  set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
endif()

# ASAN Package will have libraries and license file
if (ENABLE_ASAN_PACKAGING)
  # ASAN Package requires only asan component with libraries and license file
  set(CPACK_COMPONENTS_ALL asan)
else()
  set(CPACK_COMPONENTS_ALL binary dev)
endif()
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_RPM_COMPONENT_INSTALL ON)
set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.")
set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION_STRING})
set(CPACK_PACKAGE_CONTACT "AMD HSA Support <dl.HSA-Runtime-Support@amd.com>")
set(CPACK_COMPONENT_DESCRIPTION "AMD Heterogeneous System Architecture HSA - Linux HSA Runtime for Boltzmann (ROCm) platforms\nIncludes HSAKMT, the user-mode API interfaces used to interact with the ROCk driver.\n Contains the headers, pkgonfig and\n cmake files for ROCT.")
set(CPACK_COMPONENT_BINARY_DESCRIPTION "AMD Heterogeneous System Architecture HSA - Linux HSA Runtime for Boltzmann (ROCm) platforms")
set(CPACK_COMPONENT_DEV_DESCRIPTION "AMD Heterogeneous System Architecture HSA development package.\n This package contains the headers and cmake files for the rocr-runtime package.")
set(CPACK_COMPONENT_ASAN_DESCRIPTION "AMD Heterogeneous System Architecture HSA - Linux HSA instrumented libraries for Boltzmann (ROCm) platforms")

if (DEFINED ENV{ROCM_LIBPATCH_VERSION})
  set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.$ENV{ROCM_LIBPATCH_VERSION}")
  message("Using CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}")
endif()

# Debian package specific variables
set(CPACK_DEBIAN_BINARY_PACKAGE_NAME "hsa-rocr")
set(CPACK_DEBIAN_DEV_PACKAGE_NAME "hsa-rocr-dev")
set(CPACK_DEBIAN_ASAN_PACKAGE_NAME "hsa-rocr-asan")
if (DEFINED ENV{CPACK_DEBIAN_PACKAGE_RELEASE})
  set(CPACK_DEBIAN_PACKAGE_RELEASE $ENV{CPACK_DEBIAN_PACKAGE_RELEASE})
else()
  set(CPACK_DEBIAN_PACKAGE_RELEASE "local")
endif()
message("Using CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_DEBIAN_PACKAGE_RELEASE}")
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/RadeonOpenCompute/ROCR-Runtime")

## Process the Debian install/remove scripts to update the CPACK variables
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/Binary/postinst.in DEBIAN/Binary/postinst @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/Binary/prerm.in DEBIAN/Binary/prerm @ONLY)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/preinst DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/DEBIAN)
set (CPACK_DEBIAN_BINARY_PACKAGE_CONTROL_EXTRA "DEBIAN/preinst;DEBIAN/Binary/postinst;DEBIAN/Binary/prerm")
# Needed since some packages still say they need hsakmt-roct
set(CPACK_DEBIAN_DEV_PACKAGE_REPLACES "hsakmt-roct,hsakmt-roct-dev,hsa-ext-rocr-dev")
set(CPACK_DEBIAN_DEV_PACKAGE_PROVIDES "hsakmt-roct,hsakmt-roct-dev,hsa-ext-rocr-dev")
#TODO: hsa-ext-rocr-dev can be added to conflicts list and remove CPACK_DEBIAN_DEV_PACKAGE_BREAKS
set(CPACK_DEBIAN_DEV_PACKAGE_CONFLICTS "hsakmt-roct,hsakmt-roct-dev")
# package dependencies
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libdrm-amdgpu-dev | libdrm-dev, rocm-core")
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "libdrm-amdgpu-dev")
# Setting devel package dependendent version
set(CPACK_DEBIAN_DEV_PACKAGE_DEPENDS "libdrm-amdgpu-dev | libdrm-dev, rocm-core, hsa-rocr")

set(CPACK_DEBIAN_DEV_PACKAGE_RECOMMENDS "libdrm-amdgpu-dev")

set(CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS "libdrm-amdgpu-amdgpu1 | libdrm-amdgpu1, libnuma1, libelf1")
set(CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS "libdrm-amdgpu-dev | libdrm-dev, rocm-core-asan, libdrm-amdgpu-amdgpu1 | libdrm-amdgpu1, libnuma1, libelf1")
set(CPACK_DEBIAN_ASAN_PACKAGE_RECOMMENDS "libdrm-amdgpu-dev")

set(CPACK_DEBIAN_BINARY_PACKAGE_RECOMMENDS "libdrm-amdgpu-amdgpu1")
if (ROCM_DEP_ROCMCORE)
  string(APPEND CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS ", rocm-core")
  string(APPEND CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS ", rocm-core-asan")
endif()
if (HSA_DEP_ROCPROFILER_REGISTER)
  string(APPEND CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS ", rocprofiler-register")
endif()
# Declare package relationships (hsa-ext-rocr-dev is a legacy package that we subsume)
set(CPACK_DEBIAN_DEV_PACKAGE_BREAKS "hsa-ext-rocr-dev")

# RPM package specific variables
set(EL7_DISTRO "FALSE")
Checksetel7(EL7_DISTRO)
set(CPACK_RPM_BINARY_PACKAGE_NAME "hsa-rocr")
# Since we changed the package name to match RPM specs, take care of older builds that had -dev installed
# Also cover the fact that this now replaces the old binary package hsakmt-roct
set(CPACK_RPM_DEV_PACKAGE_PROVIDES "hsakmt-roct,hsakmt-roct-devel,hsakmt-roct-dev,hsa-ext-rocr-dev")
set(CPACK_RPM_DEV_PACKAGE_OBSOLETES "hsakmt-roct,hsakmt-roct-devel,hsakmt-roct-dev,hsa-ext-rocr-dev")

set(CPACK_RPM_DEV_PACKAGE_NAME "hsa-rocr-devel")
set(CPACK_RPM_ASAN_PACKAGE_NAME "hsa-rocr-asan")
if (DEFINED ENV{CPACK_RPM_PACKAGE_RELEASE})
  set(CPACK_RPM_PACKAGE_RELEASE $ENV{CPACK_RPM_PACKAGE_RELEASE})
else()
  set(CPACK_RPM_PACKAGE_RELEASE "local")
endif()

string(APPEND CPACK_RPM_PACKAGE_RELEASE "%{?dist}")
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
message("CPACK_RPM_PACKAGE_RELEASE: ${CPACK_RPM_PACKAGE_RELEASE}")
set(CPACK_RPM_PACKAGE_LICENSE "NCSA")

## Process the Rpm install/remove scripts to update the CPACK variables
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/RPM/Binary/post.in" RPM/Binary/post @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/RPM/Binary/postun.in" RPM/Binary/postun @ONLY)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/RPM/preinst DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/RPM)
set (CPACK_RPM_PRE_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/RPM/preinst")

set(CPACK_RPM_BINARY_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/RPM/Binary/post")
set(CPACK_RPM_BINARY_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/RPM/Binary/postun")

# package dependencies
set(CPACK_RPM_DEV_PACKAGE_REQUIRES "rocm-core , hsa-rocr")

#
if (${EL7_DISTRO} STREQUAL "TRUE")
  set(CPACK_RPM_BINARY_PACKAGE_REQUIRES "libdrm-amdgpu, numactl-libs")
  set(CPACK_RPM_ASAN_PACKAGE_REQUIRES "libdrm-amdgpu, numactl-libs, libdrm-amdgpu-devel")
  set(CPACK_RPM_PACKAGE_REQUIRES "libdrm-amdgpu-devel")
  string(APPEND CPACK_RPM_DEV_PACKAGE_REQUIRES ", libdrm-amdgpu-devel")
else()
  set(CPACK_RPM_BINARY_PACKAGE_REQUIRES "(libdrm-amdgpu or libdrm or libdrm_amdgpu1), (libnuma1 or numactl-libs)")
  set(CPACK_RPM_ASAN_PACKAGE_REQUIRES "(libdrm-amdgpu or libdrm or libdrm_amdgpu1), (libnuma1 or numactl-libs), (libdrm-amdgpu-devel or libdrm-devel)")
  set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_SOURCE_DIR}/RPM/hsa-rocr.spec.in")
  set(CPACK_RPM_PACKAGE_RECOMMENDS "libdrm-amdgpu, libdrm-amdgpu-devel")

  set(CPACK_RPM_PACKAGE_REQUIRES "(libdrm-amdgpu-devel or libdrm-devel)")
  string(APPEND CPACK_RPM_DEV_PACKAGE_REQUIRES ", (libdrm-amdgpu-devel or libdrm-devel)")
  set(CPACK_RPM_DEV_PACKAGE_RECOMMENDS "libdrm-amdgpu-devel")
  set(CPACK_RPM_ASAN_PACKAGE_RECOMMENDS "libdrm-amdgpu-devel")

endif()

if (ROCM_DEP_ROCMCORE)
  string(APPEND CPACK_RPM_BINARY_PACKAGE_REQUIRES " rocm-core")
  string(APPEND CPACK_RPM_ASAN_PACKAGE_REQUIRES " rocm-core-asan")
else()
  string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_PACKAGE_REQUIRES ${CPACK_RPM_PACKAGE_REQUIRES})
  string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS})
  string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_DEV_PACKAGE_REQUIRES ${CPACK_RPM_DEV_PACKAGE_REQUIRES})
  string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_DEV_PACKAGE_DEPENDS ${CPACK_DEBIAN_DEV_PACKAGE_DEPENDS})
  string(REGEX REPLACE ",? ?rocm-core-asan" "" CPACK_RPM_ASAN_PACKAGE_REQUIRES ${CPACK_RPM_ASAN_PACKAGE_REQUIRES})
  string(REGEX REPLACE ",? ?rocm-core-asan" "" CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_ASAN_PACKAGE_DEPENDS})
endif()
if (HSA_DEP_ROCPROFILER_REGISTER)
  string(APPEND CPACK_RPM_BINARY_PACKAGE_REQUIRES " rocprofiler-register")
endif()

if(NOT BUILD_SHARED_LIBS)
  # Suffix package name with static
  set(CPACK_RPM_STATIC_PACKAGE_NAME "hsa-rocr-static-devel")
  set(CPACK_DEBIAN_STATIC_PACKAGE_NAME "hsa-rocr-static-dev")
  set(CPACK_COMPONENT_STATIC_DESCRIPTION "HSA (Heterogenous System Architecture) core runtime - Linux static libraries")
  set(CPACK_RPM_STATIC_PACKAGE_REQUIRES "${CPACK_RPM_BINARY_PACKAGE_REQUIRES}")
  set(CPACK_DEBIAN_STATIC_PACKAGE_DEPENDS "${CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS}")
endif()

## Include packaging
include(CPack)

# static package generation
# Group binary and dev component to single package
if(NOT BUILD_SHARED_LIBS)
    cpack_add_component_group("static")
    cpack_add_component(binary  GROUP static)
    cpack_add_component(dev GROUP static)
endif()

cpack_add_component(asan
  DISPLAY_NAME "ASAN"
  DESCRIPTION "ASAN libraries for rocr-runtime")


================================================
FILE: DEBIAN/Binary/postinst.in
================================================
#!/bin/bash

################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
##                 AMD Research and AMD HSA Software Development
##
##                 Advanced Micro Devices, Inc.
##
##                 www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and/or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
##  - Redistributions of source code must retain the above copyright notice,
##    this list of conditions and the following disclaimers.
##  - Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimers in
##    the documentation and/or other materials provided with the distribution.
##  - Neither the names of Advanced Micro Devices, Inc,
##    nor the names of its contributors may be used to endorse or promote
##    products derived from this Software without specific prior written
##    permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################

set -e

# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
do_ldconfig() {
  if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
    echo @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ > /etc/ld.so.conf.d/rocr-runtime.conf
    ldconfig
  fi
}

case "$1" in
   ( configure )
       do_ldconfig
   ;;
  ( abort-upgrade | abort-remove | abort-deconfigure )
    echo "$1"
  ;;
   ( * )
       exit 0
   ;;
esac


================================================
FILE: DEBIAN/Binary/prerm.in
================================================
#!/bin/bash

################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
##                 AMD Research and AMD HSA Software Development
##
##                 Advanced Micro Devices, Inc.
##
##                 www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and/or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
##  - Redistributions of source code must retain the above copyright notice,
##    this list of conditions and the following disclaimers.
##  - Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimers in
##    the documentation and/or other materials provided with the distribution.
##  - Neither the names of Advanced Micro Devices, Inc,
##    nor the names of its contributors may be used to endorse or promote
##    products derived from this Software without specific prior written
##    permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################

set -e

# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
rm_ldconfig() {
  if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
    rm -f /etc/ld.so.conf.d/rocr-runtime.conf
    ldconfig
  fi
}

case "$1" in
   ( remove | upgrade)
       rm_ldconfig
   ;;
  ( purge )
  ;;
   ( * )
       exit 0
   ;;
esac


================================================
FILE: DEBIAN/Dev/postinst.in
================================================
#!/bin/bash

################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
##                 AMD Research and AMD HSA Software Development
##
##                 Advanced Micro Devices, Inc.
##
##                 www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and/or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
##  - Redistributions of source code must retain the above copyright notice,
##    this list of conditions and the following disclaimers.
##  - Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimers in
##    the documentation and/or other materials provided with the distribution.
##  - Neither the names of Advanced Micro Devices, Inc,
##    nor the names of its contributors may be used to endorse or promote
##    products derived from this Software without specific prior written
##    permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################

set -e

case "$1" in
   ( configure )
       # Workaround for CPACK directory symlink handling error.
       mkdir -p @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include
       ln -sf ../../@CMAKE_INSTALL_INCLUDEDIR@/hsa @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include/hsa
   ;;
   ( * )
       exit 0
   ;;
esac


================================================
FILE: DEBIAN/Dev/prerm.in
================================================
#!/bin/bash

################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
##                 AMD Research and AMD HSA Software Development
##
##                 Advanced Micro Devices, Inc.
##
##                 www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and/or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
##  - Redistributions of source code must retain the above copyright notice,
##    this list of conditions and the following disclaimers.
##  - Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimers in
##    the documentation and/or other materials provided with the distribution.
##  - Neither the names of Advanced Micro Devices, Inc,
##    nor the names of its contributors may be used to endorse or promote
##    products derived from this Software without specific prior written
##    permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################

set -e

case "$1" in
   ( remove | upgrade )
       # Workaround for CPACK directory symlink handling error.
       # Needed for remove and upgrade scenarios since
       # upgrade installs to new folder and old folders need to be cleaned
       rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/hsa
   ;;
   ( * )
       exit 0
   ;;
esac


================================================
FILE: DEBIAN/preinst
================================================
#!/bin/bash

echo "Pre-install check for ROCr."

# Check for old installations...
if ls /usr/lib/libhsa-runtime* 1> /dev/null 2>&1; then
  echo "An old version of libhsa-runtime was found in /usr/lib."
  echo "This must be uninstalled before proceeding with the installation"
  echo "to avoid potential incompatibilities."

  read -r -p "Do you want to uninstall the old version? [y/N] " response
  if [ "$response" = "y" ]; then
    if ! rm -rf /usr/lib/libhsa-runtime*; then
      echo "Failed to remove /usr/lib/libhsa-runtime* files."
      echo "Try to uninstall these files manually."
      exit 1
    fi
    echo "Old version uninstalled."
  else
    echo "The old and new versions of ROCm are incompatible. Installation aborted."
    exit 1
  fi
fi


================================================
FILE: LICENSE.txt
================================================
The University of Illinois/NCSA
Open Source License (NCSA)

Copyright (c) 2014-2025, Advanced Micro Devices, Inc. All rights reserved.

Developed by:

                AMD Research and AMD HSA Software Development

                Advanced Micro Devices, Inc.

                www.amd.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal with the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

 - Redistributions of source code must retain the above copyright notice,
   this list of conditions and the following disclaimers.
 - Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimers in
   the documentation and/or other materials provided with the distribution.
 - Neither the names of Advanced Micro Devices, Inc,
   nor the names of its contributors may be used to endorse or promote
   products derived from this Software without specific prior written
   permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS WITH THE SOFTWARE.


================================================
FILE: README.md
================================================
# ROCR Runtime

> [!CAUTION]
> The ROCR-Runtime repository is retired, please use the [ROCm/rocm-systems](https://github.com/ROCm/rocm-systems/tree/develop/projects/rocr-runtime) repository

This ROCm Runtime (ROCr) repo combines 2 previously separate repos into a single repo:
- The HSA Runtime (`hsa-runtime`) for AMD GPU application development and
- The ROCt Thunk Library (`libhsakmt`), a "thunk" interface to the ROCm kernel driver (ROCk), used by the runtime.


================================================
FILE: RPM/Binary/post.in
================================================
################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2016-2021, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
##                 AMD Research and AMD HSA Software Development
##
##                 Advanced Micro Devices, Inc.
##
##                 www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and/or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
##  - Redistributions of source code must retain the above copyright notice,
##    this list of conditions and the following disclaimers.
##  - Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimers in
##    the documentation and/or other materials provided with the distribution.
##  - Neither the names of Advanced Micro Devices, Inc,
##    nor the names of its contributors may be used to endorse or promote
##    products derived from this Software without specific prior written
##    permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################

# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
  echo @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ > /etc/ld.so.conf.d/hsa-rocr.conf
  ldconfig
fi


================================================
FILE: RPM/Binary/postun.in
================================================
################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2016-2021, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
##                 AMD Research and AMD HSA Software Development
##
##                 Advanced Micro Devices, Inc.
##
##                 www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and/or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
##  - Redistributions of source code must retain the above copyright notice,
##    this list of conditions and the following disclaimers.
##  - Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimers in
##    the documentation and/or other materials provided with the distribution.
##  - Neither the names of Advanced Micro Devices, Inc,
##    nor the names of its contributors may be used to endorse or promote
##    products derived from this Software without specific prior written
##    permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################

# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
if [ $1 -le 1 ] && [ "@ENABLE_LDCONFIG@" == "ON" ]; then
    # perform the below actions for rpm remove($1=0) or upgrade($1=1) operations
    rm -f /etc/ld.so.conf.d/hsa-rocr.conf
    ldconfig
fi


================================================
FILE: RPM/Dev/post.in
================================================
################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2016-2021, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
##                 AMD Research and AMD HSA Software Development
##
##                 Advanced Micro Devices, Inc.
##
##                 www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and/or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
##  - Redistributions of source code must retain the above copyright notice,
##    this list of conditions and the following disclaimers.
##  - Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimers in
##    the documentation and/or other materials provided with the distribution.
##  - Neither the names of Advanced Micro Devices, Inc,
##    nor the names of its contributors may be used to endorse or promote
##    products derived from this Software without specific prior written
##    permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################

# Workaround for CPACK directory symlink handling error.
mkdir -p @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include
ln -sf ../../@CMAKE_INSTALL_INCLUDEDIR@/hsa @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include/hsa


================================================
FILE: RPM/Dev/postun.in
================================================
################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2016-2021, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
##                 AMD Research and AMD HSA Software Development
##
##                 Advanced Micro Devices, Inc.
##
##                 www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and/or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
##  - Redistributions of source code must retain the above copyright notice,
##    this list of conditions and the following disclaimers.
##  - Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimers in
##    the documentation and/or other materials provided with the distribution.
##  - Neither the names of Advanced Micro Devices, Inc,
##    nor the names of its contributors may be used to endorse or promote
##    products derived from this Software without specific prior written
##    permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################

if [ $1 -le 1 ]; then
  # Workaround for CPACK directory symlink handling error.
  # Needed for uninstall and upgrade scenarios since
  # upgrade install to new folder and old folders need to be cleaned
  rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/hsa
fi


================================================
FILE: RPM/hsa-rocr.spec.in
================================================
# Restore old style debuginfo creation for rpm >= 4.14.
%undefine _debugsource_packages
%undefine _debuginfo_subpackages

# -*- rpm-spec -*-
BuildRoot:      %_topdir/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH@
Summary:        @CPACK_RPM_PACKAGE_SUMMARY@
Name:           @CPACK_RPM_PACKAGE_NAME@
Version:        @CPACK_RPM_PACKAGE_VERSION@
Release:        @CPACK_RPM_PACKAGE_RELEASE@
License:        @CPACK_RPM_PACKAGE_LICENSE@
Group:          @CPACK_RPM_PACKAGE_GROUP@
Vendor:         @CPACK_RPM_PACKAGE_VENDOR@

# Modifications to allow recommends to be used (not implemented in cpack):
%if "@CPACK_RPM_PACKAGE_RECOMMENDS@" != ""
Recommends: @CPACK_RPM_PACKAGE_RECOMMENDS@
%endif
# End of modifications

@TMP_RPM_URL@
@TMP_RPM_REQUIRES@
@TMP_RPM_REQUIRES_PRE@
@TMP_RPM_REQUIRES_POST@
@TMP_RPM_REQUIRES_PREUN@
@TMP_RPM_REQUIRES_POSTUN@
@TMP_RPM_PROVIDES@
@TMP_RPM_OBSOLETES@
@TMP_RPM_CONFLICTS@
@TMP_RPM_SUGGESTS@
@TMP_RPM_AUTOPROV@
@TMP_RPM_AUTOREQ@
@TMP_RPM_AUTOREQPROV@
@TMP_RPM_BUILDARCH@
@TMP_RPM_PREFIXES@
@TMP_RPM_EPOCH@

@TMP_RPM_DEBUGINFO@

%define _rpmdir %_topdir/RPMS
%define _srcrpmdir %_topdir/SRPMS
@FILE_NAME_DEFINE@
%define _unpackaged_files_terminate_build 0
@TMP_RPM_SPEC_INSTALL_POST@
@CPACK_RPM_SPEC_MORE_DEFINE@
@CPACK_RPM_COMPRESSION_TYPE_TMP@

%description
@CPACK_RPM_PACKAGE_DESCRIPTION@

# This is a shortcutted spec file generated by CMake RPM generator
# we skip _install step because CPack does that for us.
# We do only save CPack installed tree in _prepr
# and then restore it in build.
%prep
mv $RPM_BUILD_ROOT %_topdir/tmpBBroot

%install
if [ -e $RPM_BUILD_ROOT ];
then
  rm -rf $RPM_BUILD_ROOT
fi
mv %_topdir/tmpBBroot $RPM_BUILD_ROOT

@TMP_RPM_DEBUGINFO_INSTALL@

%clean

%post
@RPM_SYMLINK_POSTINSTALL@
@CPACK_RPM_SPEC_POSTINSTALL@

%posttrans
@CPACK_RPM_SPEC_POSTTRANS@

%postun
@CPACK_RPM_SPEC_POSTUNINSTALL@

%pre
@CPACK_RPM_SPEC_PREINSTALL@

%pretrans
@CPACK_RPM_SPEC_PRETRANS@

%preun
@CPACK_RPM_SPEC_PREUNINSTALL@

%files
%defattr(@TMP_DEFAULT_FILE_PERMISSIONS@,@TMP_DEFAULT_USER@,@TMP_DEFAULT_GROUP@,@TMP_DEFAULT_DIR_PERMISSIONS@)
@CPACK_RPM_INSTALL_FILES@
@CPACK_RPM_ABSOLUTE_INSTALL_FILES@
@CPACK_RPM_USER_INSTALL_FILES@

%changelog
@CPACK_RPM_SPEC_CHANGELOG@

@TMP_OTHER_COMPONENTS@


================================================
FILE: RPM/preinst
================================================
#!/bin/bash

echo "Pre-install check for ROCr."

# Check for old installations...
if ls /usr/lib/libhsa-runtime* 1> /dev/null 2>&1; then
  echo "An old version of libhsa-runtime was found in /usr/lib."
  echo "This must be uninstalled before proceeding with the installation"
  echo "to avoid potential incompatibilities."

  read -r -p "Do you want to uninstall the old version? [y/N] " response
  if [ "$response" = "y" ]; then
    if ! rm -rf /usr/lib/libhsa-runtime*; then
      echo "Failed to remove /usr/lib/libhsa-runtime* files."
      echo "Try to uninstall these files manually."
      exit 1
    fi
    echo "Old version uninstalled."
  else
    echo "The old and new versions of ROCm are incompatible. Installation aborted."
    exit 1
  fi
fi


================================================
FILE: _clang-format
================================================
---
Language:        Cpp
# BasedOnStyle:  Google
AccessModifierOffset: -1
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AlignConsecutiveAssignments: false
AlignOperands: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakTemplateDeclarations: false
AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
ColumnLimit:     100
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 2
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
DerivePointerAlignment: false
PointerAlignment: Left
SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: true
Standard:        Auto
IndentWidth:     2
TabWidth:        8
UseTab:          Never
BreakBeforeBraces: Attach
SpacesInParentheses: false
SpacesInAngles:  false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas:  '^ IWYU pragma:'
ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: ControlStatements
DisableFormat: false
SortIncludes: false
...


================================================
FILE: clang-format-diff.py
================================================
#!/usr/bin/env python3
#
#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===------------------------------------------------------------------------===#

"""
This script reads input from a unified diff and reformats all the changed
lines. This is useful to reformat all the lines touched by a specific patch.
Example usage for git/svn users:

  git diff -U0 --no-color --relative HEAD^ | clang-format-diff.py -p1 -i
  svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i

It should be noted that the filename contained in the diff is used unmodified
to determine the source file to update. Users calling this script directly
should be careful to ensure that the path in the diff is correct relative to the
current working directory.
"""
from __future__ import absolute_import, division, print_function

import argparse
import difflib
import re
import subprocess
import sys

if sys.version_info.major >= 3:
    from io import StringIO
else:
    from io import BytesIO as StringIO


def main():
  parser = argparse.ArgumentParser(description=__doc__,
                                   formatter_class=
                                           argparse.RawDescriptionHelpFormatter)
  parser.add_argument('-i', action='store_true', default=False,
                      help='apply edits to files instead of displaying a diff')
  parser.add_argument('-p', metavar='NUM', default=0,
                      help='strip the smallest prefix containing P slashes')
  parser.add_argument('-regex', metavar='PATTERN', default=None,
                      help='custom pattern selecting file paths to reformat '
                      '(case sensitive, overrides -iregex)')
  parser.add_argument('-iregex', metavar='PATTERN', default=
                      r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hh|hpp|hxx|m|mm|inc|js|ts'
                      r'|proto|protodevel|java|cs)',
                      help='custom pattern selecting file paths to reformat '
                      '(case insensitive, overridden by -regex)')
  parser.add_argument('-sort-includes', action='store_true', default=False,
                      help='let clang-format sort include blocks')
  parser.add_argument('-v', '--verbose', action='store_true',
                      help='be more verbose, ineffective without -i')
  parser.add_argument('-style',
                      help='formatting style to apply (LLVM, GNU, Google, Chromium, '
                      'Microsoft, Mozilla, WebKit)')
  parser.add_argument('-binary', default='clang-format',
                      help='location of binary to use for clang-format')
  args = parser.parse_args()

  # Extract changed lines for each file.
  filename = None
  lines_by_file = {}
  for line in sys.stdin:
    match = re.search(r'^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
    if match:
      filename = match.group(2)
    if filename is None:
      continue

    if args.regex is not None:
      if not re.match('^%s$' % args.regex, filename):
        continue
    else:
      if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE):
        continue

    match = re.search(r'^@@.*\+(\d+)(,(\d+))?', line)
    if match:
      start_line = int(match.group(1))
      line_count = 1
      if match.group(3):
        line_count = int(match.group(3))
      if line_count == 0:
        continue
      end_line = start_line + line_count - 1
      lines_by_file.setdefault(filename, []).extend(
          ['-lines', str(start_line) + ':' + str(end_line)])

  # Reformat files containing changes in place.
  for filename, lines in lines_by_file.items():
    if args.i and args.verbose:
      print('Formatting {}'.format(filename))
    command = [args.binary, filename]
    if args.i:
      command.append('-i')
    if args.sort_includes:
      command.append('-sort-includes')
    command.extend(lines)
    if args.style:
      command.extend(['-style', args.style])

    try:
      p = subprocess.Popen(command,
                           stdout=subprocess.PIPE,
                           stderr=None,
                           stdin=subprocess.PIPE,
                           universal_newlines=True)
    except OSError as e:
      # Give the user more context when clang-format isn't
      # found/isn't executable, etc.
      raise RuntimeError(
        'Failed to run "%s" - %s"' % (" ".join(command), e.strerror))

    stdout, stderr = p.communicate()
    if p.returncode != 0:
      sys.exit(p.returncode)

    if not args.i:
      with open(filename) as f:
        code = f.readlines()
      formatted_code = StringIO(stdout).readlines()
      diff = difflib.unified_diff(code, formatted_code,
                                  filename, filename,
                                  '(before formatting)', '(after formatting)')
      diff_string = ''.join(diff)
      if len(diff_string) > 0:
        sys.stdout.write(diff_string)

if __name__ == '__main__':
  main()


================================================
FILE: cmake_modules/utils.cmake
================================================
################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2014-2017, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
##                 AMD Research and AMD HSA Software Development
##
##                 Advanced Micro Devices, Inc.
##
##                 www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and#or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
##  - Redistributions of source code must retain the above copyright notice,
##    this list of conditions and the following disclaimers.
##  - Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimers in
##    the documentation and#or other materials provided with the distribution.
##  - Neither the names of Advanced Micro Devices, Inc,
##    nor the names of its contributors may be used to endorse or promote
##    products derived from this Software without specific prior written
##    permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################

function( get_path LIB CACHED_PATH HELP )

    set( options "")
    set( oneValueArgs RESULT )
    set( multiValueArgs HINTS NAMES )
    cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )

    # Search for canary file.
    if( ${LIB} )
        find_library( FULLPATH NAMES ${ARGS_NAMES} HINTS ${${CACHED_PATH}} ${ARGS_HINTS} )
    else()
        find_file( FULLPATH NAMES ${ARGS_NAMES} HINTS ${${CACHED_PATH}} ${ARGS_HINTS} )
    endif()
    set( RESULT (NOT ${FULLPATH} MATCHES NOTFOUND) )
    
    # Extract path
    get_filename_component ( DIRPATH ${FULLPATH} DIRECTORY )
    
    # Check path against cache
    if( NOT "${${CACHED_PATH}}" STREQUAL "" )
        if ( NOT "${${CACHED_PATH}}" STREQUAL "${DIRPATH}" )
            message(WARNING "${CACHED_PATH} may be incorrect." )
            set( DIRPATH ${${CACHED_PATH}} )
        endif()
    elseif(NOT ${RESULT})
        message(WARNING "${CACHED_PATH} not located during path search.")
    endif()

    # Set cache variable and help text
    set( ${CACHED_PATH} ${DIRPATH} CACHE PATH ${HELP} FORCE )
    unset( FULLPATH CACHE )

    # Return success flag
    if( NOT ${ARGS_RESULT} STREQUAL "" )
        set( ${ARGS_RESULT} ${RESULT} PARENT_SCOPE)
    endif()

endfunction()

## Searches for a file using include paths and stores the path to that file in the cache
## using the cached value if set.  Search paths are optional.  Returns success in RESULT.
## get_include_path(<VAR> NAMES name1 [name2...] [HINTS path1 [path2 ... ENV var]] [RESULT <var>]
macro( get_include_path CACHED_PATH HELP )
    get_path( 0 ${ARGV} )
endmacro()

## Searches for a file using library paths and stores the path to that file in the cache
## using the cached value if set.  Search paths are optional.  Returns success in RESULT.
## get_library_path(<VAR> NAMES name1 [name2...] [HINTS path1 [path2 ... ENV var]] [RESULT <var>]
macro( get_library_path CACHED_PATH HELP )
    get_path( 1 ${ARGV} )
endmacro()

## Parses the VERSION_STRING variable and places
## the first, second and third number values in
## the major, minor and patch variables.
function( parse_version VERSION_STRING )

    string ( FIND ${VERSION_STRING} "-" STRING_INDEX )

    if ( ${STRING_INDEX} GREATER -1 )
        math ( EXPR STRING_INDEX "${STRING_INDEX} + 1" )
        string ( SUBSTRING ${VERSION_STRING} ${STRING_INDEX} -1 VERSION_BUILD )
    endif ()

    string ( REGEX MATCHALL "[0123456789]+" VERSIONS ${VERSION_STRING} )
    list ( LENGTH VERSIONS VERSION_COUNT )

    if ( ${VERSION_COUNT} GREATER 0)
        list ( GET VERSIONS 0 MAJOR )
        set ( VERSION_MAJOR ${MAJOR} PARENT_SCOPE )
    endif ()

    if ( ${VERSION_COUNT} GREATER 1 )
        list ( GET VERSIONS 1 MINOR )
        set ( VERSION_MINOR ${MINOR} PARENT_SCOPE )
    endif ()

    if ( ${VERSION_COUNT} GREATER 2 )
        list ( GET VERSIONS 2 PATCH )
        set ( VERSION_PATCH ${PATCH} PARENT_SCOPE )
    endif ()

endfunction ()

## Gets the current version of the repository
## using versioning tags and git describe.
## Passes back a packaging version string
## and a library version string.
function ( get_version DEFAULT_VERSION_STRING )

    set( VERSION_JOB "local-build" )
    set( VERSION_COMMIT_COUNT 0 )
    set( VERSION_HASH "unknown" )

    find_program( GIT NAMES git )

    if( GIT )

        #execute_process ( COMMAND git describe --tags --dirty --long
        #                  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
        #                  OUTPUT_VARIABLE GIT_TAG_STRING
        #                  OUTPUT_STRIP_TRAILING_WHITESPACE
        #                  RESULT_VARIABLE RESULT )

        # Get branch commit (common ancestor) of current branch and master branch.
        execute_process(COMMAND git merge-base HEAD origin/HEAD
                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                        OUTPUT_VARIABLE GIT_MERGE_BASE
                        OUTPUT_STRIP_TRAILING_WHITESPACE
                        RESULT_VARIABLE RESULT )

        if( ${RESULT} EQUAL 0 )
            # Count commits from branch point.
            execute_process(COMMAND git rev-list --count ${GIT_MERGE_BASE}..HEAD
                            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                            OUTPUT_VARIABLE VERSION_COMMIT_COUNT
                            OUTPUT_STRIP_TRAILING_WHITESPACE
                            RESULT_VARIABLE RESULT )
            if(NOT ${RESULT} EQUAL 0 )
                set( VERSION_COMMIT_COUNT 0 )
            endif()
        endif()

        # Get current short hash.
        execute_process(COMMAND git rev-parse --short HEAD
                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                        OUTPUT_VARIABLE VERSION_HASH
                        OUTPUT_STRIP_TRAILING_WHITESPACE
                        RESULT_VARIABLE RESULT )
        if( ${RESULT} EQUAL 0 )
            # Check for dirty workspace.
            execute_process(COMMAND git diff --quiet
                            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                            RESULT_VARIABLE RESULT )
            if(${RESULT} EQUAL 1)
                set(VERSION_HASH "${VERSION_HASH}-dirty")
            endif()
        else()
            set( VERSION_HASH "unknown" )
        endif()
    endif()

    # Build automation IDs
    if(DEFINED ENV{ROCM_BUILD_ID})
        set( VERSION_JOB $ENV{ROCM_BUILD_ID} )
    endif()

    parse_version(${DEFAULT_VERSION_STRING})

    set( VERSION_MAJOR  "${VERSION_MAJOR}" PARENT_SCOPE )
    set( VERSION_MINOR  "${VERSION_MINOR}" PARENT_SCOPE )
    set( VERSION_PATCH  "${VERSION_PATCH}" PARENT_SCOPE )
    set( VERSION_COMMIT_COUNT "${VERSION_COMMIT_COUNT}" PARENT_SCOPE )
    set( VERSION_HASH "${VERSION_HASH}" PARENT_SCOPE )
    set( VERSION_JOB "${VERSION_JOB}" PARENT_SCOPE )

    #message("${VERSION_MAJOR}" )
    #message("${VERSION_MINOR}" )
    #message("${VERSION_PATCH}" )
    #message("${VERSION_COMMIT_COUNT}")
    #message("${VERSION_HASH}")
    #message("${VERSION_JOB}")

endfunction()

## Collects subdirectory names and returns them in a list
function ( listsubdirs DIRPATH SUBDIRECTORIES )
    file( GLOB CONTENTS RELATIVE ${DIRPATH} "${DIRPATH}/*" )
    set ( FOLDERS, "" )
    foreach( ITEM IN LISTS CONTENTS)
        if( IS_DIRECTORY "${DIRPATH}/${ITEM}" )
            list( APPEND FOLDERS ${ITEM} )
        endif()
    endforeach()
    set (${SUBDIRECTORIES} ${FOLDERS} PARENT_SCOPE)
endfunction()

## Sets el7 flag to be true
function (Checksetel7 EL7_DISTRO)
execute_process(COMMAND rpm --eval %{?dist}
                 RESULT_VARIABLE PROC_RESULT
                 OUTPUT_VARIABLE EVAL_RESULT
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
message("RESULT_VARIABLE ${PROC_RESULT} OUTPUT_VARIABLE: ${EVAL_RESULT}")
if (PROC_RESULT EQUAL "0" AND NOT EVAL_RESULT STREQUAL "")
  if ("${EVAL_RESULT}" STREQUAL ".el7")
     set (${EL7_DISTRO} TRUE PARENT_SCOPE)
  endif()
endif()
endfunction()


================================================
FILE: format
================================================
#!/bin/bash
root=`git rev-parse --show-toplevel`
pushd . > /dev/null
cd $root
git diff -U0 HEAD^ | ./clang-format-diff.py -p1 -i -style=file
popd > /dev/null


================================================
FILE: libhsakmt/CMakeLists.txt
================================================
################################################################################
##
## Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
##
## MIT LICENSE:
## Permission is hereby granted, free of charge, to any person obtaining a copy of
## this software and associated documentation files (the "Software"), to deal in
## the Software without restriction, including without limitation the rights to
## use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
## of the Software, and to permit persons to whom the Software is furnished to do
## so, subject to the following conditions:
##
## The above copyright notice and this permission notice shall be included in all
## copies or substantial portions of the Software.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
## SOFTWARE.
##
################################################################################

cmake_minimum_required ( VERSION 3.6.3 )

set(CMAKE_VERBOSE_MAKEFILE ON)

set ( HSAKMT "hsakmt" )
set ( HSAKMT_PACKAGE "hsakmt-roct" )
set ( HSAKMT_COMPONENT "lib${HSAKMT}" )
set ( HSAKMT_TARGET "${HSAKMT}" )
set(HSAKMT_STATIC_DRM_TARGET "${HSAKMT_TARGET}-staticdrm")

project ( ${HSAKMT_TARGET} VERSION 1.9.0)

# Optionally, build HSAKMT with ccache.
set(ROCM_CCACHE_BUILD OFF CACHE BOOL "Set to ON for a ccache enabled build")
if (ROCM_CCACHE_BUILD)
  find_program(CCACHE_PROGRAM ccache)
  if (CCACHE_PROGRAM)
    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PROGRAM})
  else()
    message(WARNING "Unable to find ccache. Falling back to real compiler")
  endif() # if (CCACHE_PROGRAM)
endif() # if (ROCM_CCACHE_BUILD)

list( PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules" )

## Include common cmake modules
include ( utils )
include ( GNUInstallDirs )

## Setup the package version.
get_version ( "1.0.0" )

set ( BUILD_VERSION_MAJOR ${VERSION_MAJOR} )
set ( BUILD_VERSION_MINOR ${VERSION_MINOR} )
set ( BUILD_VERSION_PATCH ${VERSION_PATCH} )

set ( LIB_VERSION_MAJOR 1)
set ( LIB_VERSION_MINOR 0)
if (${ROCM_PATCH_VERSION})
    set ( LIB_VERSION_PATCH ${ROCM_PATCH_VERSION} )
else ()
    set ( LIB_VERSION_PATCH 6)
endif ()
set ( LIB_VERSION_STRING "${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH}" )

if ( DEFINED VERSION_BUILD AND NOT ${VERSION_BUILD} STREQUAL "" )
    message ( "VERSION BUILD DEFINED ${VERSION_BUILD}" )
    set ( BUILD_VERSION_PATCH "${BUILD_VERSION_PATCH}-${VERSION_BUILD}" )
endif ()
set ( BUILD_VERSION_STRING "${BUILD_VERSION_MAJOR}.${BUILD_VERSION_MINOR}.${BUILD_VERSION_PATCH}" )

## Compiler flags
set (HSAKMT_C_FLAGS -fPIC -W -Wall -Wextra -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden)
if ( CMAKE_COMPILER_IS_GNUCC )
    set ( HSAKMT_C_FLAGS "${HSAKMT_C_FLAGS}" -Wlogical-op)
endif ()
if ( ${HSAKMT_WERROR} )
    set ( HSAKMT_C_FLAGS "${HSAKMT_C_FLAGS}" -Werror )
endif ()
if ( "${CMAKE_BUILD_TYPE}" STREQUAL Release )
    set ( HSAKMT_C_FLAGS "${HSAKMT_C_FLAGS}" -O2 )
else ()
    set ( HSAKMT_C_FLAGS "${HSAKMT_C_FLAGS}" -g )
endif ()

set ( HSAKMT_LINKER_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/src/libhsakmt.ver" )

## Linker Flags
## Add --enable-new-dtags to generate DT_RUNPATH
set (HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -Wl,--enable-new-dtags -Wl,--version-script=${HSAKMT_LINKER_SCRIPT} -Wl,-soname=${HSAKMT_COMPONENT}.so.${LIB_VERSION_MAJOR} -Wl,-z,nodelete")

## Address Sanitize Flag
if ( ${ADDRESS_SANITIZER} )
    set ( HSAKMT_C_FLAGS "${HSAKMT_C_FLAGS}" -fsanitize=address )
    set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -fsanitize=address" )
    if ( BUILD_SHARED_LIBS )
        set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -shared-libsan" )
    else ()
        set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -static-libsan" )
    endif ()
else ()
    if ( CMAKE_COMPILER_IS_GNUCC )
        set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -Wl,-no-undefined" )
    else ()
        set ( HSAKMT_LINK_FLAGS "${HSAKMT_LINK_FLAGS} -Wl,-undefined,error" )
    endif ()
endif ()

## Source files
set ( HSAKMT_SRC "src/debug.c"
                 "src/events.c"
                 "src/fmm.c"
                 "src/globals.c"
                 "src/hsakmtmodel.c"
                 "src/libhsakmt.c"
                 "src/memory.c"
                 "src/openclose.c"
                 "src/perfctr.c"
                 "src/pmc_table.c"
                 "src/queues.c"
                 "src/time.c"
                 "src/topology.c"
                 "src/rbtree.c"
                 "src/spm.c"
                 "src/version.c"
                 "src/svm.c"
                 "src/pc_sampling.c")

## Declare the library target name
add_library (${HSAKMT_TARGET} STATIC "")

## Add sources
target_sources ( ${HSAKMT_TARGET} PRIVATE ${HSAKMT_SRC} )

## Add headers.  The public headers need to point at their location in both build and install
## directory layouts.  This declaration allows publishing library use data to downstream clients.
target_include_directories( ${HSAKMT_TARGET}
  PUBLIC
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
  PRIVATE
  ${CMAKE_CURRENT_SOURCE_DIR}/src )

set_property(TARGET ${HSAKMT_TARGET} PROPERTY LINK_FLAGS ${HSAKMT_LINK_FLAGS})

## Set the VERSION and SOVERSION values
set_property ( TARGET ${HSAKMT_TARGET} PROPERTY VERSION "${LIB_VERSION_STRING}" )
set_property ( TARGET ${HSAKMT_TARGET} PROPERTY SOVERSION "${LIB_VERSION_MAJOR}" )

find_package(PkgConfig)
# get OS-info for OS-specific build dependencies
get_os_info()

find_package(PkgConfig)
# Check for libraries required for building
find_library(LIBC NAMES c REQUIRED)
find_package(NUMA)
if(NUMA_FOUND)
  set(NUMA "${NUMA_LIBRARIES}")
else()
  find_library(NUMA NAMES numa REQUIRED)
endif()
message(STATUS "LIBC: " ${LIBC})
message(STATUS "NUMA: " ${NUMA})

## If environment variable DRM_DIR is set, the script
## will pick up the corresponding libraries from that path.
if(DRM_DIR)
  list (PREPEND CMAKE_PREFIX_PATH "${DRM_DIR}")
endif()

# The module name passed to pkg_check_modules() is determined by the
# name of file *.pc
pkg_check_modules(DRM REQUIRED IMPORTED_TARGET libdrm)
pkg_check_modules(DRM_AMDGPU REQUIRED IMPORTED_TARGET libdrm_amdgpu)
include_directories(${DRM_AMDGPU_INCLUDE_DIRS})
include_directories(${DRM_INCLUDE_DIRS})

target_link_libraries ( ${HSAKMT_TARGET}
  PRIVATE ${DRM_LDFLAGS} ${DRM_AMDGPU_LDFLAGS} pthread rt ${LIBC} ${NUMA} ${CMAKE_DL_LIBS}
)

target_compile_options(${HSAKMT_TARGET} PRIVATE ${DRM_CFLAGS} ${HSAKMT_C_FLAGS})

include(CheckFunctionExists)
set(CMAKE_REQUIRED_DEFINITIONS -D__USE_GNU=1)
set(CMAKE_REQUIRED_INCLUDES sys/mman.h)
check_function_exists(memfd_create HAVE_MEMFD_CREATE)
if(HAVE_MEMFD_CREATE)
  target_compile_definitions(${HSAKMT_TARGET} PRIVATE -DHAVE_MEMFD_CREATE=1)
endif()

## Define default paths and packages.
if( CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT )
  set ( CMAKE_INSTALL_PREFIX "/opt/rocm" )
endif()
set ( CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE STRING "Default installation directory." FORCE )

# Installs binaries and exports the library usage data to ${HSAKMT_TARGET}Targets
install ( TARGETS ${HSAKMT_TARGET} EXPORT ${HSAKMT_TARGET}Targets
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT asan
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT asan )
install ( TARGETS ${HSAKMT_TARGET}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary )

# Install public headers
install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/${HSAKMT_TARGET} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
  COMPONENT dev PATTERN "linux" EXCLUDE PATTERN "*virtio*" EXCLUDE)

# Record our usage data for clients find_package calls.
install ( EXPORT ${HSAKMT_TARGET}Targets
  FILE ${HSAKMT_TARGET}Targets.cmake
  NAMESPACE ${HSAKMT_TARGET}::
  DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${HSAKMT_TARGET}
  COMPONENT dev)

# Adds the target alias hsakmt::hsakmt to the local cmake cache.
# This isn't necessary today.  It's harmless preparation for some
# hypothetical future in which the we might be included by add_subdirectory()
# in some other project's cmake file.  It allows uniform use of find_package
# and target_link_library() without regard to whether a target is external or
# a subdirectory of the current build.
add_library( ${HSAKMT_TARGET}::${HSAKMT_TARGET} ALIAS ${HSAKMT_TARGET} )

# Create cmake configuration files
include(CMakePackageConfigHelpers)

configure_package_config_file(${HSAKMT_TARGET}-config.cmake.in
                            ${HSAKMT_TARGET}-config.cmake
                            INSTALL_DESTINATION
                            ${CMAKE_INSTALL_LIBDIR}/cmake/${HSAKMT_TARGET} )

write_basic_package_version_file(${HSAKMT_TARGET}-config-version.cmake
                 VERSION ${BUILD_VERSION_STRING}
                 COMPATIBILITY
                 AnyNewerVersion)

install(FILES
        ${CMAKE_CURRENT_BINARY_DIR}/${HSAKMT_TARGET}-config.cmake
        ${CMAKE_CURRENT_BINARY_DIR}/${HSAKMT_TARGET}-config-version.cmake
        DESTINATION
        ${CMAKE_INSTALL_LIBDIR}/cmake/${HSAKMT_TARGET}
        COMPONENT dev)

# Optionally record the package's find module in the user's package cache.
if ( NOT DEFINED EXPORT_TO_USER_PACKAGE_REGISTRY )
  set ( EXPORT_TO_USER_PACKAGE_REGISTRY "off" )
endif()
set ( EXPORT_TO_USER_PACKAGE_REGISTRY ${EXPORT_TO_USER_PACKAGE_REGISTRY}
             CACHE BOOL "Add cmake package config location to the user's cmake package registry.")
if(${EXPORT_TO_USER_PACKAGE_REGISTRY})
  # Enable writing to the registry
  set(CMAKE_EXPORT_PACKAGE_REGISTRY ON)
  # Generate a target file for the build
  export(TARGETS ${HSAKMT_TARGET} NAMESPACE ${HSAKMT_TARGET}:: FILE ${HSAKMT_TARGET}Targets.cmake)
  # Record the package in the user's cache.
  export(PACKAGE ${HSAKMT_TARGET})
endif()

# CPACK_PACKAGING_INSTALL_PREFIX is needed in libhsakmt.pc.in
# TODO: Add support for relocatable packages.
configure_file ( libhsakmt.pc.in libhsakmt.pc @ONLY )

install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/libhsakmt.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT dev)

if ( NOT BUILD_SHARED_LIBS)
  ## Create separate target file for static builds
  ## In static builds, libdrm and libdrm_amdgpu need to be linked statically
  add_library (${HSAKMT_STATIC_DRM_TARGET}  STATIC "")
  target_sources (${HSAKMT_STATIC_DRM_TARGET} PRIVATE ${HSAKMT_SRC})

  target_include_directories( ${HSAKMT_STATIC_DRM_TARGET}
    PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
    PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}/src )

  ## Set the VERSION and SOVERSION values
  set_property(TARGET ${HSAKMT_STATIC_DRM_TARGET} PROPERTY LINK_FLAGS ${HSAKMT_LINK_FLAGS}
              PROPERTY VERSION "${LIB_VERSION_STRING}"
              PROPERTY SOVERSION "${LIB_VERSION_MAJOR}" )

  #Additional search path for static libraries
  if(${DISTRO_ID} MATCHES "ubuntu")
      set(AMDGPU_STATIC_LIB_PATHS "-L/opt/amdgpu/lib/x86_64-linux-gnu")
  else()
      set(AMDGPU_STATIC_LIB_PATHS "-L/opt/amdgpu/lib64" "-L/opt/amdgpu/lib")
  endif()
  # Link drm_amdgpu and drm library statically
  target_link_libraries ( ${HSAKMT_STATIC_DRM_TARGET}
    PRIVATE pthread rt c numa ${CMAKE_DL_LIBS}
    INTERFACE -Wl,-Bstatic ${AMDGPU_STATIC_LIB_PATHS} ${DRM_AMDGPU_LDFLAGS} ${DRM_LDFLAGS} -Wl,-Bdynamic
  )
  target_compile_options(${HSAKMT_STATIC_DRM_TARGET} PRIVATE ${DRM_CFLAGS} ${HSAKMT_C_FLAGS})

  install ( TARGETS ${HSAKMT_STATIC_DRM_TARGET} EXPORT ${HSAKMT_STATIC_DRM_TARGET}Targets
            ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary
            LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
  install ( EXPORT ${HSAKMT_STATIC_DRM_TARGET}Targets
    FILE ${HSAKMT_STATIC_DRM_TARGET}Targets.cmake
    NAMESPACE ${HSAKMT_STATIC_DRM_TARGET}::
    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${HSAKMT_TARGET}
    COMPONENT dev)

  add_library( ${HSAKMT_STATIC_DRM_TARGET}::${HSAKMT_STATIC_DRM_TARGET} ALIAS ${HSAKMT_STATIC_DRM_TARGET} )
endif()

###########################
# Packaging directives
###########################
# Use component packaging
set ( ENABLE_LDCONFIG ON CACHE BOOL "Set library links and caches using ldconfig.")


================================================
FILE: libhsakmt/DEBIAN/postinst.in
================================================
#!/bin/bash

set -e

# left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build
do_ldconfig() {
  if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
    echo @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/x86_64-libhsakmt.conf
    ldconfig
  fi
}

case "$1" in
  ( configure )
    do_ldconfig
  ;;
  ( abort-upgrade | abort-remove | abort-deconfigure )
    echo "$1"
  ;;
  ( * )
    exit 0
  ;;
esac


================================================
FILE: libhsakmt/DEBIAN/prerm.in
================================================
#!/bin/bash

set -e

# left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build
rm_ldconfig() {
  if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
    rm -f /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/x86_64-libhsakmt.conf && ldconfig
  fi
}

case "$1" in
  ( remove | upgrade )
    rm_ldconfig
  ;;
  ( purge )
  ;;
  ( * )
    exit 0
  ;;
esac


================================================
FILE: libhsakmt/LICENSE.md
================================================
ROCT-Thunk Interface LICENSE

Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.

MIT LICENSE:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This product contains software provided by Nginx, Inc. and its contributors.

Copyright (C) 2002-2018 Igor Sysoev
Copyright (C) 2011-2018 Nginx, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.


================================================
FILE: libhsakmt/README.md
================================================
# ROCt Library

This repository includes the user-mode API interfaces used to interact with the ROCk driver.

Starting at 1.7 release, ROCt uses drm render device. This requires the user to belong to video group. Add the user account to video group with "sudo usermod -a -G video _username_" command if the user if not part of video group yet.
NOTE: Users of Ubuntu 20.04 will need to add the user to the new "render" group, as Ubuntu has changed the owner:group of /dev/kfd to render:render as of that release

## ROCk Driver

The ROCt library is not a standalone product and requires that you have the correct ROCk driver installed, or are using a compatible upstream kernel.
Please refer to <https://rocm.docs.amd.com> under "Getting Started Guide" for a list of supported Operating Systems and kernel versions, as well as supported hardware.

## Building the Thunk

A simple cmake-based system is available for building thunk. To build the thunk from the the ROCT-Thunk-Interface directory, execute:

```bash
    mkdir -p build
    cd build
    cmake ..
    make
```

If the hsakmt-roct and hsakmt-roct-dev packages are desired:

```bash
    mkdir -p build
    cd build
    cmake ..
    make package
```

If you choose not to build and install packages, manual installation of the binaries and header files can be done via:

```bash
    make install
```

NOTE: For older versions of the thunk where hsakmt-dev.txt is present, "make package-dev" and "make install-dev" are required to generate/install the developer packages. Currently, these are created via the "make package" and "make install" commands

## Disclaimer

The information contained herein is for informational purposes only, and is subject to change without notice. While every precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and typographical errors, and AMD is under no obligation to update or otherwise correct this information. Advanced Micro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the contents of this document, and assumes no liability of any kind, including the implied warranties of noninfringement, merchantability or fitness for particular purposes, with respect to the operation or use of AMD hardware, software or other products described herein. No license, including implied or arising by estoppel, to any intellectual property rights is granted by this document. Terms and limitations applicable to the purchase or use of AMD's products are as set forth in a signed agreement between the parties or in AMD's Standard Terms and Conditions of Sale.

AMD, the AMD Arrow logo, and combinations thereof are trademarks of Advanced Micro Devices, Inc. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies.

Copyright (c) 2014-2023 Advanced Micro Devices, Inc. All rights reserved.


================================================
FILE: libhsakmt/RPM/hsakmt-roct-devel.spec.in
================================================
# Restore old style debuginfo creation for rpm >= 4.14.
%undefine _debugsource_packages
%undefine _debuginfo_subpackages

# -*- rpm-spec -*-
BuildRoot:      %_topdir/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH@
Summary:        @CPACK_RPM_PACKAGE_SUMMARY@
Name:           @CPACK_RPM_PACKAGE_NAME@
Version:        @CPACK_RPM_PACKAGE_VERSION@
Release:        @CPACK_RPM_PACKAGE_RELEASE@
License:        @CPACK_RPM_PACKAGE_LICENSE@
Group:          @CPACK_RPM_PACKAGE_GROUP@
Vendor:         @CPACK_RPM_PACKAGE_VENDOR@

@TMP_RPM_URL@
@TMP_RPM_REQUIRES@
@TMP_RPM_REQUIRES_PRE@
@TMP_RPM_REQUIRES_POST@
@TMP_RPM_REQUIRES_PREUN@
@TMP_RPM_REQUIRES_POSTUN@
@TMP_RPM_PROVIDES@
@TMP_RPM_OBSOLETES@
@TMP_RPM_CONFLICTS@
@TMP_RPM_SUGGESTS@
@TMP_RPM_AUTOPROV@
@TMP_RPM_AUTOREQ@
@TMP_RPM_AUTOREQPROV@
@TMP_RPM_BUILDARCH@
@TMP_RPM_PREFIXES@
@TMP_RPM_EPOCH@

# Modifications to allow recommends to be used (not implemented in cpack):
%if "@CPACK_RPM_PACKAGE_RECOMMENDS@" != ""
Recommends: @CPACK_RPM_PACKAGE_RECOMMENDS@
%endif
# End of modifications

@TMP_RPM_DEBUGINFO@

%define _rpmdir %_topdir/RPMS
%define _srcrpmdir %_topdir/SRPMS
@FILE_NAME_DEFINE@
%define _unpackaged_files_terminate_build 0
@TMP_RPM_SPEC_INSTALL_POST@
@CPACK_RPM_SPEC_MORE_DEFINE@
@CPACK_RPM_COMPRESSION_TYPE_TMP@

%description
@CPACK_RPM_PACKAGE_DESCRIPTION@

# This is a shortcutted spec file generated by CMake RPM generator
# we skip _install step because CPack does that for us.
# We do only save CPack installed tree in _prepr
# and then restore it in build.
%prep
mv $RPM_BUILD_ROOT %_topdir/tmpBBroot

%install
if [ -e $RPM_BUILD_ROOT ];
then
  rm -rf $RPM_BUILD_ROOT
fi
mv %_topdir/tmpBBroot $RPM_BUILD_ROOT

@TMP_RPM_DEBUGINFO_INSTALL@

%clean

%post
@RPM_SYMLINK_POSTINSTALL@
@CPACK_RPM_SPEC_POSTINSTALL@

%posttrans
@CPACK_RPM_SPEC_POSTTRANS@

%postun
@CPACK_RPM_SPEC_POSTUNINSTALL@

%pre
@CPACK_RPM_SPEC_PREINSTALL@

%pretrans
@CPACK_RPM_SPEC_PRETRANS@

%preun
@CPACK_RPM_SPEC_PREUNINSTALL@

%files
%defattr(@TMP_DEFAULT_FILE_PERMISSIONS@,@TMP_DEFAULT_USER@,@TMP_DEFAULT_GROUP@,@TMP_DEFAULT_DIR_PERMISSIONS@)
@CPACK_RPM_INSTALL_FILES@
@CPACK_RPM_ABSOLUTE_INSTALL_FILES@
@CPACK_RPM_USER_INSTALL_FILES@

%changelog
@CPACK_RPM_SPEC_CHANGELOG@

@TMP_OTHER_COMPONENTS@


================================================
FILE: libhsakmt/RPM/libhsakmt.spec
================================================
%define name        hsakmt-rocm-dev
%define version     %{getenv:PACKAGE_VER}
%define packageroot %{getenv:PACKAGE_DIR}

Name:       %{name}
Version:    %{version}
Release:    1
Summary:    Thunk libraries for AMD KFD

Group:      System Environment/Libraries
License:    Advanced Micro Devices Inc.

%if 0%{?centos} == 6
Requires:   numactl
%else
Requires:   numactl-libs
%endif


%description
This package includes the libhsakmt (Thunk) libraries
for AMD KFD

%prep
%setup -T -D -c -n %{name}

%install
cp -R %packageroot $RPM_BUILD_ROOT
find $RPM_BUILD_ROOT \! -type d | sed "s|$RPM_BUILD_ROOT||"> thunk.list

%post
ldconfig

%postun
ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files -f thunk.list

%defattr(-,root,root,-)


================================================
FILE: libhsakmt/RPM/post.in
================================================
# left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build
if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
  echo -e "@CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/x86_64-libhsakmt.conf
  ldconfig
fi


================================================
FILE: libhsakmt/RPM/postun.in
================================================
# second term originates from ENABLE_LDCONFIG = ON/OFF at package build
if [ $1 -le 1 ] && [ "@ENABLE_LDCONFIG@" == "ON" ]; then
    # perform the below actions for rpm remove($1=0) or upgrade($1=1) operations
    rm -f /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/x86_64-libhsakmt.conf
    ldconfig
fi


================================================
FILE: libhsakmt/cmake_modules/utils.cmake
================================================
################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2014-2017, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
##                 AMD Research and AMD HSA Software Development
##
##                 Advanced Micro Devices, Inc.
##
##                 www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and#or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
##  - Redistributions of source code must retain the above copyright notice,
##    this list of conditions and the following disclaimers.
##  - Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimers in
##    the documentation and#or other materials provided with the distribution.
##  - Neither the names of Advanced Micro Devices, Inc,
##    nor the names of its contributors may be used to endorse or promote
##    products derived from this Software without specific prior written
##    permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################

## Parses the VERSION_STRING variable and places
## the first, second and third number values in
## the major, minor and patch variables.
function( parse_version VERSION_STRING )

    string ( FIND ${VERSION_STRING} "-" STRING_INDEX )

    if ( ${STRING_INDEX} GREATER -1 )
        math ( EXPR STRING_INDEX "${STRING_INDEX} + 1" )
        string ( SUBSTRING ${VERSION_STRING} ${STRING_INDEX} -1 VERSION_BUILD )
    endif ()

    string ( REGEX MATCHALL "[0123456789]+" VERSIONS ${VERSION_STRING} )
    list ( LENGTH VERSIONS VERSION_COUNT )

    if ( ${VERSION_COUNT} GREATER 0)
        list ( GET VERSIONS 0 MAJOR )
        set ( VERSION_MAJOR ${MAJOR} PARENT_SCOPE )
        set ( TEMP_VERSION_STRING "${MAJOR}" )
    endif ()

    if ( ${VERSION_COUNT} GREATER 1 )
        list ( GET VERSIONS 1 MINOR )
        set ( VERSION_MINOR ${MINOR} PARENT_SCOPE )
        set ( TEMP_VERSION_STRING "${TEMP_VERSION_STRING}.${MINOR}" )
    endif ()

    if ( ${VERSION_COUNT} GREATER 2 )
        list ( GET VERSIONS 2 PATCH )
        set ( VERSION_PATCH ${PATCH} PARENT_SCOPE )
        set ( TEMP_VERSION_STRING "${TEMP_VERSION_STRING}.${PATCH}" )
    endif ()

    if ( DEFINED VERSION_BUILD )
        set ( VERSION_BUILD "${VERSION_BUILD}" PARENT_SCOPE )
    endif ()

    set ( VERSION_STRING "${TEMP_VERSION_STRING}" PARENT_SCOPE )

endfunction ()

## Gets the current version of the repository
## using versioning tags and git describe.
## Passes back a packaging version string
## and a library version string.
function ( get_version DEFAULT_VERSION_STRING )

    parse_version ( ${DEFAULT_VERSION_STRING} )

    find_program ( GIT NAMES git )

    if ( GIT )

        execute_process ( COMMAND git describe --tags --dirty --long
                          WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                          OUTPUT_VARIABLE GIT_TAG_STRING
                          OUTPUT_STRIP_TRAILING_WHITESPACE
                          RESULT_VARIABLE RESULT )

        if ( ${RESULT} EQUAL 0 )

            parse_version ( ${GIT_TAG_STRING} )

        endif ()

    endif ()

    set( VERSION_STRING "${VERSION_STRING}" PARENT_SCOPE )
    set( VERSION_MAJOR  "${VERSION_MAJOR}" PARENT_SCOPE )
    set( VERSION_MINOR  "${VERSION_MINOR}" PARENT_SCOPE )
    set( VERSION_PATCH  "${VERSION_PATCH}" PARENT_SCOPE )
    set( VERSION_BUILD  "${VERSION_BUILD}" PARENT_SCOPE )

endfunction()

#get the OS version
function(get_os_info)
if( EXISTS "/etc/os-release")
    file(STRINGS "/etc/os-release" DISTRO_ID REGEX "^ID=")
    file(STRINGS "/etc/os-release" DISTRO_RELEASE REGEX "^VERSION_ID=")
    string(REPLACE "ID=" "" DISTRO_ID "${DISTRO_ID}")
    string(REPLACE "VERSION_ID=" "" DISTRO_RELEASE "${DISTRO_RELEASE}")
    message(STATUS "Detected distribution: ${DISTRO_ID}:${DISTRO_RELEASE}")
elseif(EXISTS "/etc/centos-release" )
    # Example: CentOS release 6.10 (Final)
    file(STRINGS "/etc/centos-release" DISTRO_FULL_STR REGEX "release")
    string(REGEX MATCH "^[a-zA-Z]+" DISTRO_ID "${DISTRO_FULL_STR}")
    string(TOLOWER "${DISTRO_ID}" DISTRO_ID)
    string(REGEX MATCH "[0-9]+" DISTRO_RELEASE "${DISTRO_FULL_STR}")
    message(STATUS "Detected distribution: ${DISTRO_ID}:${DISTRO_RELEASE}")
else()
     message(STATUS "Not able to detect OS")
endif()
    set(DISTRO_ID "${DISTRO_ID}" PARENT_SCOPE )
    set(DISTRO_RELEASE "${DISTRO_RELEASE}" PARENT_SCOPE )

endfunction()


================================================
FILE: libhsakmt/hsakmt-config.cmake.in
================================================
@PACKAGE_INIT@

include( CMakeFindDependencyMacro )

# Locate dependent packages here.  Finding them propagates usage requirements,
# if any, to our clients and ensures that their target names are in scope for
# the build.  hsakmt has no cmake project dependencies so there is nothing to
# find.  If we switch to use find_package with external (to ROCm) library
# dependencies (ie libnuma) then those packages should be located here using
# find_dependencies as shown below.
#find_dependency(Bar, 2.0)

# If the option is ON link other dependent libraries dynamically
# If the option is OFF, then link libdrm and libdrm_amdgpu statically
if(@BUILD_SHARED_LIBS@)
  include( "${CMAKE_CURRENT_LIST_DIR}/@HSAKMT_TARGET@Targets.cmake" )
else()
  include( "${CMAKE_CURRENT_LIST_DIR}/@HSAKMT_STATIC_DRM_TARGET@Targets.cmake" )
endif()


================================================
FILE: libhsakmt/include/hsakmt/hsakmt.h
================================================
/*
 * Copyright © 2024 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including
 * the next paragraph) shall be included in all copies or substantial
 * portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */

#ifndef _HSAKMT_H_
#define _HSAKMT_H_

#include "hsakmttypes.h"

#ifdef __cplusplus
extern "C" {
#endif


/**
  "Opens" the HSA kernel driver for user-kernel mode communication.

  On Windows, this function gets a handle to the KFD's AMDKFDIO device object that
  is responsible for user-kernel communication, this handle is used internally by
  the thunk library to send device I/O control to the HSA kernel driver.
  No other thunk library function may be called unless the user-kernel communication
  channel is opened first.

  On Linux this call opens the "/dev/kfd" device file to establish a communication
  path to the kernel.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtOpenKFD( void );

/**
  "Closes" the user-kernel communication path.

  On Windows, the handle obtained by the hsaKmtOpenKFD() function is closed;
  no other communication with the kernel driver is possible after the successful
  execution of the saKmdCloseKFD() function. Depending on the failure reason,
  the user-kernel communication path may or may not be still active.

  On Linux the function closes the "dev/kfd" device file.
  No further communication to the kernel driver is allowed until hsaKmtOpenKFD()
  function is called again.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtCloseKFD( void );


/**
  Returns the user-kernel interface version supported by KFD.
  Higher major numbers usually add new features to KFD and may break user-kernel
  compatibility; higher minor numbers define additional functionality associated
  within a major number.
  The calling software should validate that it meets the minimum interface version
  as described in the API specification.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetVersion(
    HsaVersionInfo*  VersionInfo    //OUT
    );

/**
  The function takes a "snapshot" of the topology information within the KFD
  to avoid any changes during the enumeration process.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtAcquireSystemProperties(
    HsaSystemProperties*  SystemProperties    //OUT
    );

/**
  Releases the topology "snapshot" taken by hsaKmtAcquireSystemProperties()
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtReleaseSystemProperties( void ) ;

/**
  Retrieves the discoverable sub-properties for a given HSA
  node. The parameters returned allow the application or runtime to size the
  management structures necessary to store the information.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetNodeProperties(
    HSAuint32               NodeId,            //IN
    HsaNodeProperties*      NodeProperties     //OUT
    );

/**
  Retrieves the memory properties of a specific HSA node.
  the memory pointer passed as MemoryProperties is sized as
  NumBanks * sizeof(HsaMemoryProperties). NumBanks is retrieved with the
  hsaKmtGetNodeProperties() call.

  Some of the data returned is optional. Not all implementations may return all
  parameters in the hsaMemoryProperties.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetNodeMemoryProperties(
    HSAuint32             NodeId,             //IN
    HSAuint32             NumBanks,           //IN
    HsaMemoryProperties*  MemoryProperties    //OUT
    );

/**
  Retrieves the cache properties of a specific HSA node and processor ID.
  ProcessorID refers to either a CPU core or a SIMD unit as enumerated earlier
  via the hsaKmtGetNodeProperties() call.
  The memory pointer passed as CacheProperties is sized as
  NumCaches * sizeof(HsaCacheProperties). NumCaches is retrieved with the
  hsaKmtGetNodeProperties() call.

  The data returned is optional. Not all implementations may return all
  parameters in the CacheProperties.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetNodeCacheProperties(
    HSAuint32           NodeId,         //IN
    HSAuint32           ProcessorId,    //IN
    HSAuint32           NumCaches,      //IN
    HsaCacheProperties* CacheProperties //OUT
    );

/**
  Retrieves the HSA IO affinity properties of a specific HSA node.
  the memory pointer passed as Properties is sized as
  NumIoLinks * sizeof(HsaIoLinkProperties). NumIoLinks is retrieved with the
  hsaKmtGetNodeProperties() call.

  The data returned is optional. Not all implementations may return all
  parameters in the IoLinkProperties.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetNodeIoLinkProperties(
    HSAuint32            NodeId,            //IN
    HSAuint32            NumIoLinks,        //IN
    HsaIoLinkProperties* IoLinkProperties  //OUT
    );



/**
  Creates an operating system event associated with a HSA event ID
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtCreateEvent(
    HsaEventDescriptor* EventDesc,              //IN
    bool                ManualReset,            //IN
    bool                IsSignaled,             //IN
    HsaEvent**          Event                   //OUT
    );

/**
  Destroys an operating system event associated with a HSA event ID
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtDestroyEvent(
    HsaEvent*   Event    //IN
    );

/**
  Sets the specified event object to the signaled state
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtSetEvent(
    HsaEvent*  Event    //IN
    );

/**
  Sets the specified event object to the non-signaled state
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtResetEvent(
    HsaEvent*  Event    //IN
    );

/**
  Queries the state of the specified event object
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtQueryEventState(
    HsaEvent*  Event    //IN
    );

/**
  Checks the current state of the event object. If the object's state is
  nonsignaled, the calling thread enters the wait state.

 The function returns when one of the following occurs:
- The specified event object is in the signaled state.
- The time-out interval elapses.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtWaitOnEvent(
    HsaEvent*   Event,          //IN
    HSAuint32   Milliseconds    //IN
    );

/**
  Checks the current state of the event object. If the object's state is
  nonsignaled, the calling thread enters the wait state. event_age can
  help avoiding race conditions.

 The function returns when one of the following occurs:
- The specified event object is in the signaled state.
- The time-out interval elapses.
- Tracking event age
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtWaitOnEvent_Ext(
    HsaEvent*   Event,          //IN
    HSAuint32   Milliseconds,   //IN
    uint64_t   *event_age       //IN/OUT
    );

/**
  Checks the current state of multiple event objects.

 The function returns when one of the following occurs:
- Either any one or all of the specified objects are in the signaled state
  - if "WaitOnAll" is "true" the function returns when the state of all
    objects in array is signaled
  - if "WaitOnAll" is "false" the function returns when the state of any
    one of the objects is set to signaled
- The time-out interval elapses.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtWaitOnMultipleEvents(
    HsaEvent*   Events[],       //IN
    HSAuint32   NumEvents,      //IN
    bool        WaitOnAll,      //IN
    HSAuint32   Milliseconds    //IN
    );

/**
  Checks the current state of multiple event objects.
  event_age can help avoiding race conditions.

 The function returns when one of the following occurs:
- Either any one or all of the specified objects are in the signaled state
  - if "WaitOnAll" is "true" the function returns when the state of all
    objects in array is signaled
  - if "WaitOnAll" is "false" the function returns when the state of any
    one of the objects is set to signaled
- The time-out interval elapses.
- Tracking event age
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtWaitOnMultipleEvents_Ext(
    HsaEvent*   Events[],       //IN
    HSAuint32   NumEvents,      //IN
    bool        WaitOnAll,      //IN
    HSAuint32   Milliseconds,   //IN
    uint64_t   *event_age       //IN/OUT
    );

/**
  new TEMPORARY function definition - to be used only on "Triniti + Southern Islands" platform
  If used on other platforms the function will return HSAKMT_STATUS_ERROR
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtReportQueue(
    HSA_QUEUEID     QueueId,        //IN
    HsaQueueReport* QueueReport     //OUT
    );

/**
  Creates a GPU queue with user-mode access rights
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtCreateQueue(
    HSAuint32           NodeId,           //IN
    HSA_QUEUE_TYPE      Type,             //IN
    HSAuint32           QueuePercentage,  //IN
    HSA_QUEUE_PRIORITY  Priority,         //IN
    void*               QueueAddress,     //IN
    HSAuint64           QueueSizeInBytes, //IN
    HsaEvent*           Event,            //IN
    HsaQueueResource*   QueueResource     //OUT
    );

/**
  Creates a GPU queue with user-mode access rights
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtCreateQueueExt(
    HSAuint32           NodeId,           //IN
    HSA_QUEUE_TYPE      Type,             //IN
    HSAuint32           QueuePercentage,  //IN
    HSA_QUEUE_PRIORITY  Priority,         //IN
    HSAuint32           SdmaEngineId,     //IN
    void*               QueueAddress,     //IN
    HSAuint64           QueueSizeInBytes, //IN
    HsaEvent*           Event,            //IN
    HsaQueueResource*   QueueResource     //OUT
    );

/**
  Updates a queue
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtUpdateQueue(
    HSA_QUEUEID         QueueId,        //IN
    HSAuint32           QueuePercentage,//IN
    HSA_QUEUE_PRIORITY  Priority,       //IN
    void*               QueueAddress,   //IN
    HSAuint64           QueueSize,      //IN
    HsaEvent*           Event           //IN
    );

/**
  Destroys a queue
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtDestroyQueue(
    HSA_QUEUEID         QueueId         //IN
    );

/**
  Set cu mask for a queue
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtSetQueueCUMask(
    HSA_QUEUEID         QueueId,        //IN
    HSAuint32           CUMaskCount,    //IN
    HSAuint32*          QueueCUMask     //IN
    );

HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetQueueInfo(
    HSA_QUEUEID QueueId,	//IN
    HsaQueueInfo *QueueInfo	//IN
);

/**
  Allows an HSA process to set/change the default and alternate memory coherency, before starting to dispatch. 
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtSetMemoryPolicy(
    HSAuint32       Node,                       //IN
    HSAuint32       DefaultPolicy,     	   	    //IN  
    HSAuint32       AlternatePolicy,       	    //IN  
    void*           MemoryAddressAlternate,     //IN (page-aligned)
    HSAuint64       MemorySizeInBytes   	    //IN (page-aligned)
    );
/**
  Allocates a memory buffer that may be accessed by the GPU
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtAllocMemory(
    HSAuint32       PreferredNode,          //IN
    HSAuint64       SizeInBytes,            //IN  (multiple of page size)
    HsaMemFlags     MemFlags,               //IN
    void**          MemoryAddress           //IN/OUT (page-aligned)
    );

/**
  Allocates a memory buffer with specific alignment that may be accessed by the GPU
  If Alignment is 0, the smallest possible alignment will be used
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtAllocMemoryAlign(
    HSAuint32       PreferredNode,          //IN
    HSAuint64       SizeInBytes,            //IN  (multiple of page size)
    HSAuint64       Alignment,              //IN  (power of 2 and >= page size)
    HsaMemFlags     MemFlags,               //IN
    void**          MemoryAddress           //IN/OUT (page-aligned)
    );

/**
  Frees a memory buffer
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtFreeMemory(
    void*       MemoryAddress,      //IN (page-aligned)
    HSAuint64   SizeInBytes         //IN
    );

/**
  Inquires memory available for allocation as a memory buffer
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtAvailableMemory(
    HSAuint32 Node,
    HSAuint64 *AvailableBytes
    );

/**
  Registers with KFD a memory buffer that may be accessed by the GPU
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtRegisterMemory(
    void*       MemoryAddress,      //IN (cache-aligned)
    HSAuint64   MemorySizeInBytes   //IN (cache-aligned)
    );


/**
  Registers with KFD a memory buffer that may be accessed by specific GPUs
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtRegisterMemoryToNodes(
    void        *MemoryAddress,     // IN (cache-aligned)
    HSAuint64   MemorySizeInBytes,  // IN (cache-aligned)
    HSAuint64   NumberOfNodes,      // IN
    HSAuint32*  NodeArray           // IN
    );


/**
  Registers with KFD a memory buffer with memory attributes
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtRegisterMemoryWithFlags(
    void        *MemoryAddress,     // IN (cache-aligned)
    HSAuint64   MemorySizeInBytes,  // IN (cache-aligned)
    HsaMemFlags MemFlags            // IN
    );

/**
  Registers with KFD a graphics buffer and returns graphics metadata
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtRegisterGraphicsHandleToNodes(
    HSAuint64       GraphicsResourceHandle,        //IN
    HsaGraphicsResourceInfo *GraphicsResourceInfo, //OUT
    HSAuint64       NumberOfNodes,                 //IN
    HSAuint32*      NodeArray                      //IN
    );

/**
  Similar to hsaKmtRegisterGraphicsHandleToNodes but provides registration
  options via RegisterFlags.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtRegisterGraphicsHandleToNodesExt(
    HSAuint64       GraphicsResourceHandle,        //IN
    HsaGraphicsResourceInfo *GraphicsResourceInfo, //OUT
    HSAuint64       NumberOfNodes,                 //IN
    HSAuint32*      NodeArray,                     //IN
    HSA_REGISTER_MEM_FLAGS RegisterFlags           //IN
    );

/**
 * Export a dmabuf handle and offset for a given memory address
 *
 * Validates that @MemoryAddress belongs to a valid allocation and that the
 * @MemorySizeInBytes doesn't exceed the end of that allocation. Returns a
 * dmabuf fd of the allocation and the offset of MemoryAddress within that
 * allocation. The memory will remain allocated even after the allocation is
 * freed by hsaKmtFreeMemory for as long as a dmabuf fd remains open or any
 * importer of that fd maintains an active reference to the memory.
 */

HSAKMT_STATUS
HSAKMTAPI
hsaKmtExportDMABufHandle(
    void *MemoryAddress,		//IN
    HSAuint64 MemorySizeInBytes,	//IN
    int *DMABufFd,			//OUT
    HSAuint64 *Offset			//OUT
    );

/**
 Export a memory buffer for sharing with other processes

 NOTE: for the current revision of the thunk spec, SizeInBytes
 must match whole allocation.
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtShareMemory(
	void                  *MemoryAddress,     // IN
	HSAuint64             SizeInBytes,        // IN
	HsaSharedMemoryHandle *SharedMemoryHandle // OUT
);

/**
 Register shared memory handle
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtRegisterSharedHandle(
	const HsaSharedMemoryHandle *SharedMemoryHandle, // IN
	void                        **MemoryAddress,     // OUT
	HSAuint64                   *SizeInBytes         // OUT
);

/**
 Register shared memory handle to specific nodes only
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtRegisterSharedHandleToNodes(
	const HsaSharedMemoryHandle *SharedMemoryHandle, // IN
	void                        **MemoryAddress,     // OUT
	HSAuint64                   *SizeInBytes,        // OUT
	HSAuint64                   NumberOfNodes,       // OUT
	HSAuint32*                  NodeArray            // OUT
);

/**
 Copy data from the GPU address space of the process identified
 by Pid. Size Copied will return actual amount of data copied.
 If return is not SUCCESS, partial copies could have happened.
 */
HSAKMT_STATUS
HSAKMTAPI
hsaKmtProcessVMRead(
	HSAuint32                 Pid,                     // IN
	HsaMemoryRange            *LocalMemoryArray,       // IN
	HSAuint64                 LocalMemoryArrayCount,   // IN
	HsaMemoryRange            *RemoteMemoryArray,      // IN
	HSAuint64                 RemoteMemoryArrayCount,  // IN
	HSAuint64                 *SizeCopied              // OUT
);

/**
 Write data to the GPU address space of the process identified
 by Pid. See also hsaKmtProcessVMRead.
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtProcessVMWrite(
	HSAuint32                 Pid,                     // IN
	HsaMemoryRange            *LocalMemoryArray,       // IN
	HSAuint64                 LocalMemoryArrayCount,   // IN
	HsaMemoryRange            *RemoteMemoryArray,      // IN
	HSAuint64                 RemoteMemoryArrayCount,  // IN
	HSAuint64                 *SizeCopied              // OUT
);

/**
  Unregisters with KFD a memory buffer
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtDeregisterMemory(
    void*       MemoryAddress  //IN
    );


/**
  Ensures that the memory is resident and can be accessed by GPU
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtMapMemoryToGPU(
    void*           MemoryAddress,     //IN (page-aligned)
    HSAuint64       MemorySizeInBytes, //IN (page-aligned)
    HSAuint64*      AlternateVAGPU     //OUT (page-aligned)     
    );

/**
  Ensures that the memory is resident and can be accessed by GPUs
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtMapMemoryToGPUNodes(
    void*           MemoryAddress,         //IN (page-aligned)
    HSAuint64       MemorySizeInBytes,     //IN (page-aligned)
    HSAuint64*      AlternateVAGPU,        //OUT (page-aligned)
    HsaMemMapFlags  MemMapFlags,           //IN
    HSAuint64       NumberOfNodes,         //IN
    HSAuint32*      NodeArray              //IN
    );

/**
  Releases the residency of the memory
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtUnmapMemoryToGPU(
    void*           MemoryAddress       //IN (page-aligned)
    );


/**
  Notifies the kernel driver that a process wants to use GPU debugging facilities
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtMapGraphicHandle(
                HSAuint32          NodeId,                              //IN
                HSAuint64          GraphicDeviceHandle,                 //IN
                HSAuint64          GraphicResourceHandle,               //IN
                HSAuint64          GraphicResourceOffset,               //IN
                HSAuint64          GraphicResourceSize,                 //IN
                HSAuint64*         FlatMemoryAddress            //OUT
                );


/**
  Stub for Unmap Graphic Handle
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtUnmapGraphicHandle(
                HSAuint32          NodeId,                      //IN
                HSAuint64          FlatMemoryAddress,           //IN
                HSAuint64              SizeInBytes              //IN
                );

/**
 * Get an AMDGPU device handle for a GPU node
 */
HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetAMDGPUDeviceHandle(
                HSAuint32               NodeId,                    //IN
                HsaAMDGPUDeviceHandle   *DeviceHandle              //OUT
                );

/**
  Allocate GWS resource for a queue
 */

HSAKMT_STATUS
HSAKMTAPI
hsaKmtAllocQueueGWS(
                HSA_QUEUEID        QueueId,                     //IN
                HSAuint32          nGWS,                        //IN
                HSAuint32          *firstGWS                    //OUT
                );

/**
  Notifies the kernel driver that a process wants to use GPU debugging facilities
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtDbgRegister(
    HSAuint32       NodeId      //IN
    );

/**
  Detaches the debugger process from the HW debug established by hsaKmtDbgRegister() API
*/

HSAKMT_STATUS 
HSAKMTAPI 
hsaKmtDbgUnregister(
    HSAuint32       NodeId      //IN
    );

/**
  Controls a wavefront
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtDbgWavefrontControl(
    HSAuint32           NodeId,         //IN
    HSA_DBG_WAVEOP      Operand,        //IN
    HSA_DBG_WAVEMODE    Mode,           //IN
    HSAuint32           TrapId,         //IN
    HsaDbgWaveMessage*  DbgWaveMsgRing  //IN
    );

/**
  Sets watch points on memory address ranges to generate exception events when the
  watched addresses are  accessed
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtDbgAddressWatch(
    HSAuint32           NodeId,         //IN
    HSAuint32           NumWatchPoints, //IN
    HSA_DBG_WATCH_MODE  WatchMode[],    //IN
    void*               WatchAddress[], //IN
    HSAuint64           WatchMask[],    //IN, optional
    HsaEvent*           WatchEvent[]    //IN, optional
    );

HSAKMT_STATUS
HSAKMTAPI
hsaKmtRuntimeEnable(
    void*     rDebug,    // IN
    bool      setupTtmp
    );

HSAKMT_STATUS
HSAKMTAPI
hsaKmtRuntimeDisable(void);

HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetRuntimeCapabilities(
    HSAuint32	*caps_mask // OUT
    );

/**
  Enable debug trap.
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtDbgEnable(
    void **runtime_info, //Out
    HSAuint32 *data_size //Out
    );

/**
  Disable debug trap.
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtDbgDisable(void);

/**
  Get device snapshot.
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtDbgGetDeviceData(
    void **data, //Out
    HSAuint32 *n_entries, //Out
    HSAuint32 *entry_size //Out
    );

/**
  Get queues snapshot.
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtDbgGetQueueData(
    void **data, //Out
    HSAuint32 *n_entries, //Out
    HSAuint32 *entry_size, //Out
    bool suspend_queues //In
    );

/**   
  Check whether gpu firmware and kernel support debugging
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtCheckRuntimeDebugSupport(
    void
    );

/**
  Debug ops call primarily used for KFD testing
 */
HSAKMT_STATUS HSAKMTAPI hsaKmtDebugTrapIoctl(
    struct kfd_ioctl_dbg_trap_args *arg,
    HSA_QUEUEID *Queues,
    HSAuint64 *DebugReturn
    );

/**
  Gets GPU and CPU clock counters for particular Node
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetClockCounters(
    HSAuint32         NodeId,  //IN
    HsaClockCounters* Counters //OUT
    );

/**
  Retrieves information on the available HSA counters
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtPmcGetCounterProperties(
    HSAuint32                   NodeId,             //IN
    HsaCounterProperties**      CounterProperties   //OUT
    );

/**
  Registers a set of (HW) counters to be used for tracing/profiling
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtPmcRegisterTrace(
    HSAuint32           NodeId,             //IN
    HSAuint32           NumberOfCounters,   //IN
    HsaCounter*         Counters,           //IN
    HsaPmcTraceRoot*    TraceRoot           //OUT
    );

/**
  Unregisters a set of (HW) counters used for tracing/profiling
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtPmcUnregisterTrace(
    HSAuint32   NodeId,     //IN
    HSATraceId  TraceId     //IN
    );

/**
  Allows a user mode process to get exclusive access to the defined set of (HW) counters
  used for tracing/profiling
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtPmcAcquireTraceAccess(
    HSAuint32   NodeId,     //IN
    HSATraceId  TraceId     //IN
    );

/**
  Allows a user mode process to release exclusive access to the defined set of (HW) counters
  used for tracing/profiling
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtPmcReleaseTraceAccess(
    HSAuint32   NodeId,     //IN
    HSATraceId  TraceId     //IN
    );

/**
  Starts tracing operation on a previously established set of performance counters
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtPmcStartTrace(
    HSATraceId  TraceId,                //IN
    void*       TraceBuffer,            //IN (page aligned) 
    HSAuint64   TraceBufferSizeBytes    //IN (page aligned)
    );

/**
   Forces an update of all the counters that a previously started trace operation has registered
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtPmcQueryTrace(
    HSATraceId    TraceId   //IN
    );

/**
  Stops tracing operation on a previously established set of performance counters
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtPmcStopTrace(
    HSATraceId  TraceId     //IN
    );

/**
  Sets trap handler and trap buffer to be used for all queues associated with the specified NodeId within this process context
*/

HSAKMT_STATUS 
HSAKMTAPI 
hsaKmtSetTrapHandler(
    HSAuint32           NodeId,                   //IN
    void*               TrapHandlerBaseAddress,   //IN
    HSAuint64           TrapHandlerSizeInBytes,   //IN
    void*               TrapBufferBaseAddress,    //IN
    HSAuint64           TrapBufferSizeInBytes     //IN
    );

/**
  Gets image tile configuration.
 */
HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetTileConfig(
    HSAuint32           NodeId,     // IN
    HsaGpuTileConfig*   config      // IN & OUT
    );

/**
  Returns information about pointers
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtQueryPointerInfo(
    const void *        Pointer,        //IN
    HsaPointerInfo *    PointerInfo     //OUT
    );

/**
  Associates user data with a memory allocation
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtSetMemoryUserData(
    const void *    Pointer,    //IN
    void *          UserData    //IN
    );

/**
  Acquire request exclusive use of SPM
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtSPMAcquire(
    HSAuint32	PreferredNode	//IN
    );


/**
  Release exclusive use of SPM
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtSPMRelease(
    HSAuint32	PreferredNode	//IN
    );

/**
   Set up the destination user mode buffer for stream performance
   counter data.
*/

HSAKMT_STATUS
HSAKMTAPI
hsaKmtSPMSetDestBuffer(
	HSAuint32   PreferredNode,		//IN
	HSAuint32   SizeInBytes,		//IN
	HSAuint32   * timeout,			//IN/OUT
	HSAuint32   * SizeCopied,		//OUT
	void        *DestMemoryAddress,		//IN
	bool        *isSPMDataLoss		//OUT
    );

/* Helper functions for calling KFD SVM ioctl */
HSAKMT_STATUS
HSAKMTAPI
hsaKmtSVMSetAttr(
    void *start_addr,   // IN: Start of the virtual address range (page-aligned)
    HSAuint64 size,     // IN: size (page-aligned)
    unsigned int nattr, // IN: number of attributes
    HSA_SVM_ATTRIBUTE *attrs  // IN: array of attributes
);

HSAKMT_STATUS
HSAKMTAPI
hsaKmtSVMGetAttr(
    void *start_addr,   // IN: Start of the virtual address range (page-aligned)
    HSAuint64 size,     // IN: size (page aligned)
    unsigned int nattr, // IN: number of attributes
    HSA_SVM_ATTRIBUTE *attrs  // IN/OUT: array of attributes
);

HSAKMT_STATUS
HSAKMTAPI
hsaKmtSetXNACKMode(
    HSAint32 enable  // IN: enable/disable XNACK node.
);

HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetXNACKMode(
    HSAint32 * enable  // OUT: returns XNACK value.
);

/**
   Open anonymous file handle to enable events and read SMI events.

   To enable events, write 64bit events mask to fd, event enums as bit index.
   for example, event mask (HSA_SMI_EVENT_MASK_FROM_INDEX(HSA_SMI_EVENT_INDEX_MAX) - 1) to enable all events

   Read event from fd is not blocking, use poll with timeout value to check if event is available.
   Event is dropped if kernel event fifo is full.
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtOpenSMI(
    HSAuint32 NodeId,   // IN: GPU node_id to receive the SMI event from
    int *fd             // OUT: anonymous file handle
);

/**
   If this is GPU Mapped memory, remap the first page at this address to be normal system memory

   This is used in ASAN mode to remap the first page of device memory to share host ASAN logic.
   This function is only supported when libhsakmt is compiled in ASAN mode.
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtReplaceAsanHeaderPage(
    void *addr     // IN: Start of othe virtual address page
);

/**
   If this is GPU Mapped memory, remap the first page back to the original GPU memory

   This is used in ASAN mode to remap the first page back to its original mapping.
   This function is only supported when libhsakmt is compiled in ASAN mode.
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtReturnAsanHeaderPage(
    void *addr     // IN: Start of othe virtual address page
);

/**
   Check whether kernel support pc sampling
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtPcSamplingSupport(
    void
);

/**
 * Query device PC Sampling capabilities
 *
 *  Arguments:
 *   @NodeId        (IN) - GPU node_id
 *   @sample_info   (IN) - Pointer to array of HSAPcSamplingInfo
 *   @sample_info_sz(IN) - Size of sampling_info in units of HSAPcSamplingInfo
 *   @sz_needed     (OUT)- If sampling_info_sz is too small, sample_info_sz needed
 *
 *  Return:
 *   HSAKMT_STATUS_ERROR             - failed
 *   HSAKMT_STATUS_SUCCESS           - successfully complete
 *   HSAKMT_STATUS_INVALID_PARAMETER - invalid input
 *   HSAKMT_STATUS_BUFFER_TOO_SMALL  - sample buffer size is too small. Retry with sample_info_sz
 *                                     >= sz_needed
 *   HSAKMT_STATUS_NOT_SUPPORTED     - this asic doesn't support pc sampling
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtPcSamplingQueryCapabilities(
    HSAuint32 NodeId,
    void *sample_info,
    HSAuint32 sample_info_sz,
    HSAuint32 *sz_needed
);

/**
 * Create PC Sampling Session
 *
 *  Arguments:
 *   @NodeId     (IN)  - GPU node_id
 *   @sample_info(IN)  - PC Sampling configuration requested
 *   @traceId    (OUT) - Unique PC Sampling trace Id
 *
 *  Return:
 *   HSAKMT_STATUS_ERROR             - failed
 *   HSAKMT_STATUS_SUCCESS           - successfully complete
 *   HSAKMT_STATUS_INVALID_PARAMETER - invalid input
 *   HSAKMT_STATUS_NO_MEMORY         - not enough memory to create new pc sampling session
 *   HSAKMT_STATUS_UNAVAILABLE       - a different pc sampling session started on this node
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtPcSamplingCreate(
  HSAuint32 node_id,
  HsaPcSamplingInfo *sample_info,
  HsaPcSamplingTraceId *traceId
);

/**
 * Destroy PC Sampling Session
 *
 *  Arguments:
 *   @NodeId (IN) - GPU node_id
 *   @traceId(IN) - PC Sampling trace Id
 *
 *  Return:
 *   HSAKMT_STATUS_ERROR             - failed
 *   HSAKMT_STATUS_SUCCESS           - successfully complete
 *   HSAKMT_STATUS_INVALID_PARAMETER - invalid input
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtPcSamplingDestroy(
    HSAuint32 NodeId,
    HsaPcSamplingTraceId traceId
);

/**
 * Start PC Sampling Session
 *
 *  Arguments:
 *   @NodeId (IN) - GPU node_id
 *   @traceId(IN) - PC Sampling trace Id
 *
 *  Return:
 *   HSAKMT_STATUS_ERROR             - failed
 *   HSAKMT_STATUS_SUCCESS           - successfully complete
 *   HSAKMT_STATUS_INVALID_PARAMETER - invalid input
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtPcSamplingStart(
    HSAuint32 NodeId,
    HsaPcSamplingTraceId traceId
);

/**
 * Stop PC Sampling Session
 *
 *  Arguments:
 *   @NodeId (IN) - GPU node_id
 *   @traceId(IN) - PC Sampling trace Id
 *
 *  Return:
 *   HSAKMT_STATUS_ERROR                 - failed
 *   HSAKMT_STATUS_SUCCESS               - successfully complete
 *   HSAKMT_STATUS_INVALID_PARAMETER     - invalid input
 *   HSAKMT_STATUS_KERNEL_ALREADY_OPENED - stop already
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtPcSamplingStop(
    HSAuint32 NodeId,
    HsaPcSamplingTraceId traceId
);

/**
 * Check if the HSA KMT Model is enabled
 * 
 *  Arguments:
 *   @enable (OUT) - true if the HSA KMT Model is enabled, false otherwise
 * 
 *  Return:
 *   HSAKMT_STATUS_ERROR             - failed
 *   HSAKMT_STATUS_SUCCESS           - successfully complete
 */

HSAKMT_STATUS
HSAKMTAPI
hsaKmtModelEnabled(
    bool* enable // OUT
);

#ifdef __cplusplus
}   //extern "C"
#endif

#endif //_HSAKMT_H_


================================================
FILE: libhsakmt/include/hsakmt/hsakmt_virtio.h
================================================
/*
 * Copyright © 2025 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including
 * the next paragraph) shall be included in all copies or substantial
 * portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */

#ifndef HSAKMT_VIRTIO_H
#define HSAKMT_VIRTIO_H

#include "hsakmt/linux/kfd_ioctl.h"
#include "hsakmt/hsakmt.h"
#include <libdrm/amdgpu.h>

#ifdef __cplusplus
extern "C" {
#endif

HSAKMT_STATUS HSAKMTAPI vhsaKmtOpenKFD(void);
HSAKMT_STATUS HSAKMTAPI vhsaKmtCloseKFD(void);
HSAKMT_STATUS HSAKMTAPI vhsaKmtAllocMemory(HSAuint32 PreferredNode, HSAuint64 SizeInBytes,
                                           HsaMemFlags MemFlags, void** MemoryAddress);
HSAKMT_STATUS HSAKMTAPI vhsaKmtFreeMemory(void* MemoryAddress, HSAuint64 SizeInBytes);
HSAKMT_STATUS HSAKMTAPI vhsaKmtMapMemoryToGPUNodes(void* MemoryAddress, HSAuint64 MemorySizeInBytes,
                                                   HSAuint64* AlternateVAGPU,
                                                   HsaMemMapFlags MemMapFlags,
                                                   HSAuint64 NumberOfNodes, HSAuint32* NodeArray);
HSAKMT_STATUS HSAKMTAPI vhsaKmtUnmapMemoryToGPU(void* MemoryAddress);
HSAKMT_STATUS HSAKMTAPI vhsaKmtAvailableMemory(HSAuint32 Node, HSAuint64* AvailableBytes);
HSAKMT_STATUS HSAKMTAPI vhsaKmtMapMemoryToGPU(void* MemoryAddress, HSAuint64 MemorySizeInBytes,
                                              HSAuint64* AlternateVAGPU);
HSAKMT_STATUS HSAKMTAPI vhsaKmtRegisterMemoryWithFlags(void* MemoryAddress,
                                                       HSAuint64 MemorySizeInBytes,
                                                       HsaMemFlags MemFlags);
HSAKMT_STATUS HSAKMTAPI vhsaKmtDeregisterMemory(void* MemoryAddress);
HSAKMT_STATUS HSAKMTAPI vhsaKmtGetVersion(HsaVersionInfo* v);
HSAKMT_STATUS HSAKMTAPI vhsaKmtAcquireSystemProperties(HsaSystemProperties* SystemProperties);
HSAKMT_STATUS HSAKMTAPI vhsaKmtReleaseSystemProperties(void);
HSAKMT_STATUS HSAKMTAPI vhsaKmtGetNodeProperties(HSAuint32 NodeId,
                                                 HsaNodeProperties* NodeProperties);
HSAKMT_STATUS HSAKMTAPI vhsaKmtGetXNACKMode(HSAint32* enable);
HSAKMT_STATUS HSAKMTAPI vhsaKmtRuntimeEnable(void* rDebug, bool setupTtmp);
HSAKMT_STATUS HSAKMTAPI vhsaKmtRuntimeDisable(void);
HSAKMT_STATUS HSAKMTAPI vhsaKmtGetNodeMemoryProperties(HSAuint32 NodeId, HSAuint32 NumBanks,
                                                       HsaMemoryProperties* MemoryProperties);
HSAKMT_STATUS HSAKMTAPI vhsaKmtGetNodeCacheProperties(HSAuint32 NodeId, HSAuint32 ProcessorId,
                                                      HSAuint32 NumCaches,
                                                      HsaCacheProperties* CacheProperties);
HSAKMT_STATUS HSAKMTAPI vhsaKmtGetNodeIoLinkProperties(HSAuint32 NodeId, HSAuint32 NumIoLinks,
                                                       HsaIoLinkProperties* IoLinkProperties);
HSAKMT_STATUS HSAKMTAPI vhsaKmtGetClockCounters(HSAuint32 NodeId, HsaClockCounters* Counters);
HSAKMT_STATUS HSAKMTAPI vhsaKmtGetAMDGPUDeviceHandle(HSAuint32 NodeId,
                                                     HsaAMDGPUDeviceHandle* DeviceHandle);
HSAKMT_STATUS HSAKMTAPI vhsaKmtQueryPointerInfo(const void* Pointer, HsaPointerInfo* PointerInfo);
HSAKMT_STATUS HSAKMTAPI vhsaKmtGetTileConfig(HSAuint32 NodeId, HsaGpuTileConfig* config);
HSAKMT_STATUS HSAKMTAPI vhsaKmtCreateEvent(HsaEventDescriptor* EventDesc, _Bool ManualReset,
                                           _Bool IsSignaled, HsaEvent** Event);
HSAKMT_STATUS HSAKMTAPI vhsaKmtDestroyEvent(HsaEvent* Event);
HSAKMT_STATUS HSAKMTAPI vhsaKmtSetEvent(HsaEvent* Event);
HSAKMT_STATUS HSAKMTAPI vhsaKmtResetEvent(HsaEvent* Event);
HSAKMT_STATUS HSAKMTAPI vhsaKmtQueryEventState(HsaEvent* Event);
HSAKMT_STATUS HSAKMTAPI vhsaKmtWaitOnMultipleEvents(HsaEvent* Events[], HSAuint32 NumEvents,
                                                    bool WaitOnAll, HSAuint32 Milliseconds);
HSAKMT_STATUS HSAKMTAPI vhsaKmtWaitOnEvent(HsaEvent* Event, HSAuint32 Milliseconds);
HSAKMT_STATUS HSAKMTAPI vhsaKmtWaitOnEvent_Ext(HsaEvent* Event, HSAuint32 Milliseconds,
                                               uint64_t* event_age);
HSAKMT_STATUS HSAKMTAPI vhsaKmtWaitOnMultipleEvents_Ext(HsaEvent* Events[], HSAuint32 NumEvents,
                                                        bool WaitOnAll, HSAuint32 Milliseconds,
                                                        uint64_t* event_age);
HSAKMT_STATUS HSAKMTAPI vhsaKmtSetTrapHandler(HSAuint32 NodeId, void* TrapHandlerBaseAddress,
                                              HSAuint64 TrapHandlerSizeInBytes,
                                              void* TrapBufferBaseAddress,
                                              HSAuint64 TrapBufferSizeInBytes);
HSAKMT_STATUS HSAKMTAPI vhsaKmtCreateQueueExt(HSAuint32 NodeId, HSA_QUEUE_TYPE Type,
                                              HSAuint32 QueuePercentage,
                                              HSA_QUEUE_PRIORITY Priority, HSAuint32 SdmaEngineId,
                                              void* QueueAddress, HSAuint64 QueueSizeInBytes,
                                              HsaEvent* Event, HsaQueueResource* QueueResource);
HSAKMT_STATUS HSAKMTAPI vhsaKmtCreateQueue(HSAuint32 NodeId, HSA_QUEUE_TYPE Type,
                                           HSAuint32 QueuePercentage, HSA_QUEUE_PRIORITY Priority,
                                           void* QueueAddress, HSAuint64 QueueSizeInBytes,
                                           HsaEvent* Event, HsaQueueResource* QueueResource);
HSAKMT_STATUS HSAKMTAPI vhsaKmtDestroyQueue(HSA_QUEUEID QueueId);
HSAKMT_STATUS HSAKMTAPI vhsaKmtRegisterGraphicsHandleToNodes(
    HSAuint64 GraphicsResourceHandle, HsaGraphicsResourceInfo* GraphicsResourceInfo,
    HSAuint64 NumberOfNodes, HSAuint32* NodeArray);
HSAKMT_STATUS HSAKMTAPI vhsaKmtGetRuntimeCapabilities(HSAuint32* caps_mask);

int vamdgpu_query_gpu_info(amdgpu_device_handle dev, void* out);

#ifdef __cplusplus
}
#endif

#endif /* HSAKMT_VIRTIO_H */


================================================
FILE: libhsakmt/include/hsakmt/hsakmtmodel.h
================================================
/*
 * Copyright © 2025 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including
 * the next paragraph) shall be included in all copies or substantial
 * portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */

#ifndef _HSAKMTMODEL_H_
#define _HSAKMTMODEL_H_
#include <stdbool.h>
extern bool hsakmt_use_model;
extern char *hsakmt_model_topology;
void model_init_env_vars(void);
void model_init(void);
void model_set_mmio_page(void *ptr);
void model_set_event_page(void *ptr, unsigned event_limit);
int model_kfd_ioctl(unsigned long request, void *arg);
#endif /* _HSAKMTMODEL_H_ */

================================================
FILE: libhsakmt/include/hsakmt/hsakmtmodeliface.h
================================================
/*
 * Copyright © 2025 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including
 * the next paragraph) shall be included in all copies or substantial
 * portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */

#ifndef _HSAKMTMODELIFACE_H_
#define _HSAKMTMODELIFACE_H_

#include <inttypes.h>

// Changelog:
//  0.2: Add set_set_event function to hsakmt_model_functions
#define HSAKMT_MODEL_INTERFACE_VERSION_MAJOR 0
#define HSAKMT_MODEL_INTERFACE_VERSION_MINOR 4

typedef struct hsakmt_model hsakmt_model_t;
typedef struct hsakmt_model_queue hsakmt_model_queue_t;

// Description of a queue to be registered with the model.
//
// Addresses are relative to the global aperture.
struct hsakmt_model_queue_info {
	uint64_t ring_base_address;
	uint64_t write_pointer_address;
	uint64_t read_pointer_address;

	uint64_t *doorbell;

	uint32_t ring_size; // in bytes
	uint32_t queue_type;
};

// Pointer to a "set event" function.
//
// data is a user-provided opaque pointer.
// event_id is the ID of the event to set (as in amd_signal_s::event_id).
typedef void (*hsakmt_model_set_event_fn)(void *data, unsigned event_id);

// Interface provided by the software model implementation.
//
// Queried from a shared library by calling an export called
// `get_hsakmt_model_functions`
//
// Interface versioning follows the semantic versioning model: clients that
// know about interface version X.Y can use any implementation that provides
// version X.Z with Z >= Y.
//
// The model is designed to support only one VMID space.
struct hsakmt_model_functions {
	uint32_t version_major; // HSAKMT_MODEL_INTERFACE_VERSION_MAJOR
	uint32_t version_minor; // HSAKMT_MODEL_INTERFACE_VERSION_MINOR

	// Create a GPU device model.
	hsakmt_model_t *(*create)(void);

	// Destroy a GPU device model.
	void (*destroy)(hsakmt_model_t *model);

	// Set the global aperture. GPU virtual address 0 is at CPU address `base`.
	void (*set_global_aperture)(hsakmt_model_t *model, void *base, uint64_t size);
	void (*alloced_memory)(hsakmt_model_t *model, void *base, uint64_t size, uint32_t flags);
	void (*freed_memory)(hsakmt_model_t *model, void *base, uint64_t size);
	// Register a callback that the model should call when an event is signaled.
	// `data` is client data that is opaque to the model.
	//
	// TODO: Deprecated -- remove this!
	void (*set_notify_event)(hsakmt_model_t *model, void (*callback)(void *data), void *data);

	// Register a callback that the model should call in order to wait for an
	// event to be signaled.
	// `data` is client data that is opaque to the model.
	void (*set_wait_event)(hsakmt_model_t *model, void (*callback)(void *data, uint64_t address, uint64_t age), void *data);

	// Register a queue with the model. The model will immediately begin
	// asynchronous processing of the queue (but by default, the model need not
	// provide forward progress guarantees between multiple queues).
	hsakmt_model_queue_t *(*register_queue)(hsakmt_model_t *model, struct hsakmt_model_queue_info *info);

	// Register a callback that allows the model to set an event.
	void (*set_set_event)(hsakmt_model_t *model, hsakmt_model_set_event_fn fn, void *data);

	// Destroy a queue that was returned by register_queue.
	void (*destroy_queue)(hsakmt_model_t *model, hsakmt_model_queue_t *queue);
};

// Type of a shared library export called `get_hsakmt_model_functions`.
typedef const struct hsakmt_model_functions *(*get_hsakmt_model_functions_t)(void);

#endif // _HSAKMTMODELIFACE_H_

================================================
FILE: libhsakmt/include/hsakmt/hsakmttypes.h
================================================
/*
 * Copyright © 2014 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including
 * the next paragraph) shall be included in all copies or substantial
 * portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */

#ifndef _HSAKMTTYPES_H_
#define _HSAKMTTYPES_H_

//the definitions and THUNK API are version specific - define the version numbers here
#define HSAKMT_VERSION_MAJOR    0
#define HSAKMT_VERSION_MINOR    99


#ifdef __cplusplus
extern "C" {
#endif

#if defined(_WIN64) || defined(_WINDOWS) || defined(_WIN32)

    #if defined(_WIN32)
        #define HSAKMTAPI  __stdcall
    #else
        #define HSAKMTAPI
    #endif

    typedef unsigned char      HSAuint8;
    typedef char               HSAint8;
    typedef unsigned short     HSAuint16;
    typedef signed short       HSAint16;
    typedef unsigned __int32   HSAuint32;
    typedef signed __int32     HSAint32;
    typedef signed __int64     HSAint64;
    typedef unsigned __int64   HSAuint64;

#elif defined(__linux__)

#include <stdbool.h>
#include <stdint.h>

    #define HSAKMTAPI

    typedef uint8_t     HSAuint8;
    typedef int8_t      HSAint8;
    typedef uint16_t	HSAuint16;
    typedef int16_t	HSAint16;
    typedef uint32_t	HSAuint32;
    typedef int32_t 	HSAint32;
    typedef int64_t	HSAint64;
    typedef uint64_t	HSAuint64;

#endif

typedef void*              HSA_HANDLE;
typedef HSAuint64          HSA_QUEUEID;
// An HSA_QUEUEID that is never a valid queue ID.
#define INVALID_QUEUEID 0xFFFFFFFFFFFFFFFFULL

// A PID that is never a valid process ID.
#define INVALID_PID 0xFFFFFFFF

// // A HSA_NODEID that is never a valid node ID.
#define INVALID_NODEID 0xFFFFFFFF

// This is included in order to force the alignments to be 4 bytes so that
// it avoids extra padding added by the compiler when a 64-bit binary is generated.
#pragma pack(push, hsakmttypes_h, 4)

//
// HSA STATUS codes returned by the KFD Interfaces
//

typedef enum _HSAKMT_STATUS
{
    HSAKMT_STATUS_SUCCESS                      = 0,  // Operation successful
    HSAKMT_STATUS_ERROR                        = 1,  // General error return if not otherwise specified
    HSAKMT_STATUS_DRIVER_MISMATCH              = 2,  // User mode component is not compatible with kernel HSA driver

    HSAKMT_STATUS_INVALID_PARAMETER            = 3,  // KFD identifies input parameters invalid
    HSAKMT_STATUS_INVALID_HANDLE               = 4,  // KFD identifies handle parameter invalid
    HSAKMT_STATUS_INVALID_NODE_UNIT            = 5,  // KFD identifies node or unit parameter invalid

    HSAKMT_STATUS_NO_MEMORY                    = 6,  // No memory available (when allocating queues or memory)
    HSAKMT_STATUS_BUFFER_TOO_SMALL             = 7,  // A buffer needed to handle a request is too small

    HSAKMT_STATUS_NOT_IMPLEMENTED              = 10, // KFD function is not implemented for this set of paramters
    HSAKMT_STATUS_NOT_SUPPORTED                = 11, // KFD function is not supported on this node
    HSAKMT_STATUS_UNAVAILABLE                  = 12, // KFD function is not available currently on this node (but
                                                     // may be at a later time)
    HSAKMT_STATUS_OUT_OF_RESOURCES             = 13, // KFD function request exceeds the resources currently available.

    HSAKMT_STATUS_KERNEL_IO_CHANNEL_NOT_OPENED = 20, // KFD driver path not opened
    HSAKMT_STATUS_KERNEL_COMMUNICATION_ERROR   = 21, // user-kernel mode communication failure
    HSAKMT_STATUS_KERNEL_ALREADY_OPENED        = 22, // KFD driver path already opened
    HSAKMT_STATUS_HSAMMU_UNAVAILABLE           = 23, // ATS/PRI 1.1 (Address Translation Services) not available
                                                     // (IOMMU driver not installed or not-available)

    HSAKMT_STATUS_WAIT_FAILURE                 = 30, // The wait operation failed
    HSAKMT_STATUS_WAIT_TIMEOUT                 = 31, // The wait operation timed out

    HSAKMT_STATUS_MEMORY_ALREADY_REGISTERED    = 35, // Memory buffer already registered
    HSAKMT_STATUS_MEMORY_NOT_REGISTERED        = 36, // Memory buffer not registered
    HSAKMT_STATUS_MEMORY_ALIGNMENT             = 37, // Memory parameter not aligned

} HSAKMT_STATUS;

//
// HSA KFD interface version information. Calling software has to validate that it meets
// the minimum interface version as described in the API specification.
// All future structures will be extended in a backward compatible fashion.
//

typedef struct _HsaVersionInfo
{
    HSAuint32    KernelInterfaceMajorVersion;    // supported kernel interface major version
    HSAuint32    KernelInterfaceMinorVersion;    // supported kernel interface minor version
} HsaVersionInfo;

//
// HSA Topology Discovery Infrastructure structure definitions.
// The infrastructure implementation is based on design specified in the Kernel HSA Driver ADD
// The discoverable data is retrieved from ACPI structures in the platform infrastructure, as defined
// in the "Heterogeneous System Architecture Detail Topology" specification.
//
// The following structure is returned on a call to hsaKmtAcquireSystemProperties() as output.
// When the call is made within a process context, a "snapshot" of the topology information
// is taken within the KFD to avoid any changes during the enumeration process.
// The Snapshot is released when hsaKmtReleaseSystemProperties() is called
// or when the process exits or is terminated.
//

typedef struct _HsaSystemProperties
{
    HSAuint32    NumNodes;         // the number of "H-NUMA" memory nodes.
                                   // each node represents a discoverable node of the system
                                   // All other enumeration is done on a per-node basis

    HSAuint32    PlatformOem;      // identifies HSA platform, reflects the OEMID in the CRAT
    HSAuint32    PlatformId;       // HSA platform ID, reflects OEM TableID in the CRAT
    HSAuint32    PlatformRev;      // HSA platform revision, reflects Platform Table Revision ID
} HsaSystemProperties;

typedef union
{
    HSAuint32 Value;
    struct
    {
        unsigned int uCode    : 10;  // ucode packet processor version
        unsigned int Major    :  6;  // GFXIP Major engine version
        unsigned int Minor    :  8;  // GFXIP Minor engine version
        unsigned int Stepping :  8;  // GFXIP Stepping info
    }ui32;
} HSA_ENGINE_ID;

typedef union
{
    HSAuint32 Value;
    struct
    {
        unsigned int uCodeSDMA: 10; // ucode version SDMA engine
        unsigned int uCodeRes : 10; // ucode version (reserved)
        unsigned int Reserved : 12; // Reserved, must be 0
    };
} HSA_ENGINE_VERSION;

typedef union
{
    HSAuint32 Value;
    struct
    {
        unsigned int HotPluggable        : 1;    // the node may be removed by some system action
                                                 // (event will be sent)
        unsigned int HSAMMUPresent       : 1;    // This node has an ATS/PRI 1.1 compatible
                                                 // translation agent in the system (e.g. IOMMUv2)
        unsigned int SharedWithGraphics  : 1;    // this HSA nodes' GPU function is also used for OS primary
                                                 // graphics render (= UI)
        unsigned int QueueSizePowerOfTwo : 1;    // This node GPU requires the queue size to be a power of 2 value
        unsigned int QueueSize32bit      : 1;    // This node GPU requires the queue size to be less than 4GB
        unsigned int QueueIdleEvent      : 1;    // This node GPU supports notification on Queue Idle
        unsigned int VALimit             : 1;    // This node GPU has limited VA range for platform
                                                 // (typical 40bit). Affects shared VM use for 64bit apps
        unsigned int WatchPointsSupported: 1;	 // Indicates if Watchpoints are available on the node.
        unsigned int WatchPointsTotalBits: 4;    // Watchpoints available. To determine the number use 2^value

        unsigned int DoorbellType        : 2;    // 0: This node has pre-1.0 doorbell characteristic
                                                 // 1: This node has 1.0 doorbell characteristic
                                                 // 2,3: reserved for future use
        unsigned int AQLQueueDoubleMap   : 1;	 // The unit needs a VA “double map”
        unsigned int DebugTrapSupported  : 1;    // Indicates if Debug Trap is supported on the node.
        unsigned int WaveLaunchTrapOverrideSupported: 1; // Indicates if Wave Launch Trap Override is supported on the node.
        unsigned int WaveLaunchModeSupported: 1; // Indicates if Wave Launch Mode is supported on the node.
        unsigned int PreciseMemoryOperationsSupported: 1; // Indicates if Precise Memory Operations are supported on the node.
        unsigned int DEPRECATED_SRAM_EDCSupport: 1; // Old buggy user mode depends on this being 0
        unsigned int Mem_EDCSupport: 1;          // Indicates if GFX internal DRAM/HBM EDC/ECC functionality is active
        unsigned int RASEventNotify: 1;          // Indicates if GFX extended RASFeatures and RAS EventNotify status is available
        unsigned int ASICRevision: 4;            // Indicates the ASIC revision of the chip on this node.
        unsigned int SRAM_EDCSupport: 1;         // Indicates if GFX internal SRAM EDC/ECC functionality is active
        unsigned int SVMAPISupported     : 1;    // Whether or not the SVM API is supported
        unsigned int CoherentHostAccess: 1;      // Whether or not device memory can be coherently accessed by the host CPU
        unsigned int DebugSupportedFirmware : 1; // Indicates if HWS firmware supports GPU debugging
        unsigned int PreciseALUOperationsSupported : 1; //Indicates if precise ALU operations are supported for GPU debugging
        unsigned int PerQueueResetSupported : 1; // Indicates per-queue reset supported
    } ui32;
} HSA_CAPABILITY;

typedef union
{
    HSAuint32 Value;
    struct
    {
        unsigned int PerSDMAQueueResetSupported : 1; // Indicates per-sdma queue reset supported
        unsigned int Reserved : 31; // Reserved
    } ui32;
} HSA_CAPABILITY2;

// Debug Properties and values
// HSA runtime may expose a subset of the capabilities outlined to the applicati
typedef union
{
    HSAuint64 Value;
    struct
    {
        HSAuint64 WatchAddrMaskLoBit: 4; // Only bits
                                        // WatchAddrMaskLoBit..WatchAddrMaskHiBit
                                        // of the
        HSAuint64 WatchAddrMaskHiBit: 6; // watch address mask are used.
                                         // 0 is the least significant bit.
        HSAuint64 DispatchInfoAlwaysValid: 1; // 0 if control of TTMP setup is
                                              // controlled on a per process
                                              // basis and is not always enabled
                                              // 1 if TTMP setup is always
                                              // enabled
        HSAuint64 AddressWatchpointShareKind: 1; // whether the address watchpoint
                                                 //     is per process or shared with
                                                 //     all proccesses
                                                 // 0 if shared or unsuppoted
                                                 //    (unsupported indicated by
                                                 //    address_watchpoint_count == 0)
                                                 //    All current devices have shared watchpoints
                                                 // 1 if unshared
        HSAuint64 Reserved: 52;              //
    };
} HSA_DEBUG_PROPERTIES;

//
// HSA node properties. This structure is an output parameter of hsaKmtGetNodeProperties()
// The application or runtime can use the information herein to size the topology management structures
// Unless there is some very weird setup, there is at most one "GPU" device (with a certain number
// of throughput compute units (= SIMDs) associated with a H-NUMA node.
//

#define HSA_PUBLIC_NAME_SIZE        64   // Marketing name string size

typedef struct _HsaNodeProperties
{
    HSAuint32       NumCPUCores;       // # of latency (= CPU) cores present on this HSA node.
                                       // This value is 0 for a HSA node with no such cores,
                                       // e.g a "discrete HSA GPU"
    HSAuint32       NumFComputeCores;  // # of HSA throughtput (= GPU) FCompute cores ("SIMD") present in a node.
                                       // This value is 0 if no FCompute cores are present (e.g. pure "CPU node").
    HSAuint32 NumNeuralCores;          // # of HSA neural processing units (= AIE) present in a
                                       // node. This value is 0 if there are no NeuralCores.
    HSAuint32       NumMemoryBanks;    // # of discoverable memory bank affinity properties on this "H-NUMA" node.
    HSAuint32       NumCaches;         // # of discoverable cache affinity properties on this "H-NUMA"  node.

    HSAuint32       NumIOLinks;        // # of discoverable IO link affinity properties of this node
                                       // connecting to other nodes.

    HSAuint32       CComputeIdLo;      // low value of the logical processor ID of the latency (= CPU)
                                       // cores available on this node
    HSAuint32       FComputeIdLo;      // low value of the logical processor ID of the throughput (= GPU)
                                       // units available on this node

    HSA_CAPABILITY  Capability;        // see above
    HSA_CAPABILITY2  Capability2;      // see above

    HSAuint32       MaxWavesPerSIMD;   // This identifies the max. number of launched waves per SIMD.
                                       // If NumFComputeCores is 0, this value is ignored.
    HSAuint32       LDSSizeInKB;       // Size of Local Data Store in Kilobytes per SIMD Wavefront
    HSAuint32       GDSSizeInKB;       // Size of Global Data Store in Kilobytes shared across SIMD Wavefronts

    HSAuint32       WaveFrontSize;     // Number of SIMD cores per wavefront executed, typically 64,
                                       // may be 32 or a different value for some HSA based architectures

    HSAuint32       NumShaderBanks;    // Number of Shader Banks or Shader Engines, typical values are 1 or 2


    HSAuint32       NumArrays;         // Number of SIMD arrays per engine
    HSAuint32       NumCUPerArray;     // Number of Compute Units (CU) per SIMD array
    HSAuint32       NumSIMDPerCU;      // Number of SIMD representing a Compute Unit (CU)

    HSAuint32       MaxSlotsScratchCU; // Number of temp. memory ("scratch") wave slots available to access,
                                       // may be 0 if HW has no restrictions

    HSA_ENGINE_ID   EngineId;          // Identifier (rev) of the GPU uEngine or Firmware, may be 0
    HSA_ENGINE_ID   OverrideEngineId;  // Identifier (rev) of the Overrided GPU uEngine or Firmware, may be 0

    HSAuint16       VendorId;          // GPU vendor id; 0 on latency (= CPU)-only nodes
    HSAuint16       DeviceId;          // GPU device id; 0 on latency (= CPU)-only nodes

    HSAuint32       LocationId;        // GPU BDF (Bus/Device/function number) - identifies the device
                                       // location in the overall system
    HSAuint64       LocalMemSize;       // Local memory size
    HSAuint32       MaxEngineClockMhzFCompute;  // maximum engine clocks for CPU and
    HSAuint32       MaxEngineClockMhzCCompute;  // GPU function, including any boost caopabilities,
    HSAint32        DrmRenderMinor;             // DRM render device minor device number
    HSAuint16       MarketingName[HSA_PUBLIC_NAME_SIZE];   // Public name of the "device" on the node (board or APU name).
                                       // Unicode string
    HSAuint8        AMDName[HSA_PUBLIC_NAME_SIZE];   //CAL Name of the "device", ASCII
    HSA_ENGINE_VERSION uCodeEngineVersions;
    HSA_DEBUG_PROPERTIES DebugProperties; // Debug properties of this node.
    HSAuint64       HiveID;            // XGMI Hive the GPU node belongs to in the system. It is an opaque and static
                                       // number hash created by the PSP
    HSAuint32       NumSdmaEngines;    // number of PCIe optimized SDMA engines
    HSAuint32       NumSdmaXgmiEngines;// number of XGMI optimized SDMA engines

    HSAuint8        NumSdmaQueuesPerEngine;// number of SDMA queue per one engine
    HSAuint8        NumCpQueues; // number of Compute queues
    HSAuint8        NumGws;            // number of GWS barriers
    HSAuint8        Integrated;        // 0 - discrete GPU, 1 - integrated GPU (including small APU and APP APU)

    HSAuint32       Domain;            // PCI domain of the GPU
    HSAuint64       UniqueID;          // Globally unique immutable id

    HSAuint32       VGPRSizePerCU;     // VGPR size in bytes per CU
    HSAuint32       SGPRSizePerCU;     // SGPR size in bytes per CU

    HSAuint32       NumXcc;            // Number of XCC
    HSAuint32       KFDGpuID;          // GPU Hash ID generated by KFD

    HSAuint32       FamilyID;          // GPU family id
} HsaNodeProperties;


typedef enum _HSA_HEAPTYPE
{
    HSA_HEAPTYPE_SYSTEM                = 0,
    HSA_HEAPTYPE_FRAME_BUFFER_PUBLIC   = 1, // CPU "visible" part of GPU device local memory (for discrete GPU)
    HSA_HEAPTYPE_FRAME_BUFFER_PRIVATE  = 2, // CPU "invisible" part of GPU device local memory (for discrete GPU)
                                            // All HSA accessible memory is per definition "CPU visible"
                                            // "Private memory" is relevant for graphics interop only.
    HSA_HEAPTYPE_GPU_GDS               = 3, // GPU internal memory (GDS)
    HSA_HEAPTYPE_GPU_LDS               = 4, // GPU internal memory (LDS)
    HSA_HEAPTYPE_GPU_SCRATCH           = 5, // GPU special memory (scratch)
    HSA_HEAPTYPE_DEVICE_SVM            = 6, // sys-memory mapped by device page tables
    HSA_HEAPTYPE_MMIO_REMAP            = 7, // remapped mmio, such as hdp flush registers

    HSA_HEAPTYPE_NUMHEAPTYPES,
    HSA_HEAPTYPE_SIZE                  = 0xFFFFFFFF
} HSA_HEAPTYPE;

typedef union
{
    HSAuint32 MemoryProperty;
    struct
    {
        unsigned int HotPluggable      : 1; // the memory may be removed by some system action,
                                            // memory should be used for temporary data
        unsigned int NonVolatile       : 1; // memory content is preserved across a power-off cycle.
        unsigned int Reserved          :30;
    } ui32;
} HSA_MEMORYPROPERTY;


//
// Discoverable HSA Memory properties.
// The structure is the output parameter of the hsaKmtGetNodeMemoryProperties() function
//

typedef struct _HsaMemoryProperties
{
    HSA_HEAPTYPE    HeapType;          // system or frame buffer,
    union
    {
        HSAuint64   SizeInBytes;       // physical memory size of the memory range in bytes
        struct
        {
            HSAuint32 SizeInBytesLow;  // physical memory size of the memory range in bytes (lower 32bit)
            HSAuint32 SizeInBytesHigh; // physical memory size of the memory range in bytes (higher 32bit)
        } ui32;
    };
    HSA_MEMORYPROPERTY  Flags;         // See definitions above

    HSAuint32    Width;                // memory width - the number of parallel bits of the memory interface
    HSAuint32    MemoryClockMax;       // memory clock for the memory, this allows computing the available bandwidth
                                       // to the memory when needed
    HSAuint64    VirtualBaseAddress;   // if set to value != 0, indicates the virtual base address of the memory
                                       // in process virtual space
} HsaMemoryProperties;

//
// Discoverable Cache Properties. (optional).
// The structure is the output parameter of the hsaKmtGetNodeMemoryProperties() function
// Any of the parameters may be 0 (= not defined)
//

#define HSA_CPU_SIBLINGS            256
#define HSA_PROCESSORID_ALL         0xFFFFFFFF

typedef union
{
    HSAuint32 Value;
    struct
    {
        unsigned int Data           : 1;
        unsigned int Instruction    : 1;
        unsigned int CPU            : 1;
        unsigned int HSACU          : 1;
        unsigned int Reserved       :28;
    } ui32;
} HsaCacheType;

typedef struct _HaCacheProperties
{
    HSAuint32    ProcessorIdLow;   // Identifies the processor number

    HSAuint32    CacheLevel;       // Integer representing level: 1, 2, 3, 4, etc
    HSAuint32    CacheSize;        // Size of the cache
    HSAuint32    CacheLineSize;    // Cache line size in bytes
    HSAuint32    CacheLinesPerTag; // Cache lines per Cache Tag
    HSAuint32    CacheAssociativity; // Cache Associativity
    HSAuint32    CacheLatency;     // Cache latency in ns
    HsaCacheType CacheType;
    HSAuint32    SiblingMap[HSA_CPU_SIBLINGS];
} HsaCacheProperties;


//
// Discoverable CPU Compute Properties. (optional).
// The structure is the output parameter of the hsaKmtGetCComputeProperties() function
// Any of the parameters may be 0 (= not defined)
//

typedef struct _HsaCComputeProperties
{
    HSAuint32    SiblingMap[HSA_CPU_SIBLINGS];
} HsaCComputeProperties;

//
// Discoverable IoLink Properties (optional).
// The structure is the output parameter of the hsaKmtGetIoLinkProperties() function.
// Any of the parameters may be 0 (= not defined)
//

typedef enum _HSA_IOLINKTYPE {
    HSA_IOLINKTYPE_UNDEFINED      = 0,
    HSA_IOLINKTYPE_HYPERTRANSPORT = 1,
    HSA_IOLINKTYPE_PCIEXPRESS     = 2,
    HSA_IOLINKTYPE_AMBA           = 3,
    HSA_IOLINKTYPE_MIPI           = 4,
    HSA_IOLINK_TYPE_QPI_1_1       = 5,
    HSA_IOLINK_TYPE_RESERVED1     = 6,
    HSA_IOLINK_TYPE_RESERVED2     = 7,
    HSA_IOLINK_TYPE_RAPID_IO      = 8,
    HSA_IOLINK_TYPE_INFINIBAND    = 9,
    HSA_IOLINK_TYPE_RESERVED3     = 10,
    HSA_IOLINK_TYPE_XGMI          = 11,
    HSA_IOLINK_TYPE_XGOP          = 12,
    HSA_IOLINK_TYPE_GZ            = 13,
    HSA_IOLINK_TYPE_ETHERNET_RDMA = 14,
    HSA_IOLINK_TYPE_RDMA_OTHER    = 15,
    HSA_IOLINK_TYPE_OTHER         = 16,
    HSA_IOLINKTYPE_NUMIOLINKTYPES,
    HSA_IOLINKTYPE_SIZE           = 0xFFFFFFFF
} HSA_IOLINKTYPE;

typedef union
{
    HSAuint32 LinkProperty;
    struct
    {
        unsigned int Override          : 1;  // bus link properties are determined by this structure
                                             // not by the HSA_IOLINKTYPE. The other flags are valid
                                             // only if this bit is set to one
        unsigned int NonCoherent       : 1;  // The link doesn't support coherent transactions
                                             // memory accesses across must not be set to "host cacheable"!
        unsigned int NoAtomics32bit    : 1;  // The link doesn't support 32bit-wide atomic transactions
        unsigned int NoAtomics64bit    : 1;  // The link doesn't support 64bit-wide atomic transactions
        unsigned int NoPeerToPeerDMA   : 1;  // The link doesn't allow device P2P access
        unsigned int Reserved          :27;
    } ui32;
} HSA_LINKPROPERTY;


typedef struct _HsaIoLinkProperties
{
    HSA_IOLINKTYPE  IoLinkType;      // see above
    HSAuint32    VersionMajor;       // Bus interface version (optional)
    HSAuint32    VersionMinor;       // Bus interface version (optional)

    HSAuint32    NodeFrom;           //
    HSAuint32    NodeTo;             //

    HSAuint32    Weight;             // weight factor (derived from CDIT)

    HSAuint32    MinimumLatency;     // minimum cost of time to transfer (rounded to ns)
    HSAuint32    MaximumLatency;     // maximum cost of time to transfer (rounded to ns)
    HSAuint32    MinimumBandwidth;   // minimum interface Bandwidth in MB/s
    HSAuint32    MaximumBandwidth;   // maximum interface Bandwidth in MB/s
    HSAuint32    RecTransferSize;    // recommended transfer size to reach maximum bandwidth in Bytes
    HSAuint32    RecSdmaEngIdMask;   // recommended sdma engine IDs to reach maximum bandwidth
    HSA_LINKPROPERTY Flags;          // override flags (may be active for specific platforms)
} HsaIoLinkProperties;

//
// Memory allocation definitions for the KFD HSA interface
//

typedef struct _HsaMemFlags
{
    union
    {
        struct
        {
            unsigned int NonPaged    : 1; // default = 0: pageable memory
            unsigned int CachePolicy : 2; // see HSA_CACHING_TYPE
            unsigned int ReadOnly    : 1; // default = 0: Read/Write memory
            unsigned int PageSize    : 2; // see HSA_PAGE_SIZE
            unsigned int HostAccess  : 1; // default = 0: GPU access only
            unsigned int NoSubstitute: 1; // default = 0: if specific memory is not available on node (e.g. on
                                          // discrete GPU local), allocation may fall back to system memory node 0
                                          // memory (= always available). Otherwise no allocation is possible.
            unsigned int GDSMemory   : 1; // default = 0: If set, the allocation will occur in GDS heap.
                                          // HostAccess must be 0, all other flags (except NoSubstitute) should
                                          // be 0 when setting this entry to 1. GDS allocation may fail due to
                                          // limited resources. Application code is required to work without
                                          // any allocated GDS memory using regular memory.
                                          // Allocation fails on any node without GPU function.
            unsigned int Scratch     : 1; // default = 0: If set, the allocation will occur in GPU "scratch area".
                                          // HostAccess must be 0, all other flags (except NoSubstitute) should be 0
                                          // when setting this entry to 1. Scratch allocation may fail due to limited
                                          // resources. Application code is required to work without any allocation.
                                          // Allocation fails on any node without GPU function.
            unsigned int AtomicAccessFull: 1; // default = 0: If set, the memory will be allocated and mapped to allow 
                                              // atomic ops processing. On AMD APU, this will use the ATC path on system 
                                              // memory, irrespective of the NonPaged flag setting (= if NonPaged is set, 
                                              // the memory is pagelocked but mapped through IOMMUv2 instead of GPUVM). 
                                              // All atomic ops must be supported on this memory.
            unsigned int AtomicAccessPartial: 1; // default = 0: See above for AtomicAccessFull description, however 
                                                 // focused on AMD discrete GPU that support PCIe atomics; the memory 
                                                 // allocation is mapped to allow for PCIe atomics to operate on system 
                                                 // memory, irrespective of NonPaged set or the presence of an ATC path 
                                                 // in the system. The atomic operations supported are limited to SWAP, 
                                                 // CompareAndSwap (CAS) and FetchAdd (this PCIe op allows both atomic 
                                                 // increment and decrement via 2-complement arithmetic), which are the 
                                                 // only atomic ops directly supported in PCI Express.
                                                 // On AMD APU, setting this flag will allocate the same type of memory 
                                                 // as AtomicAccessFull, but it will be considered compatible with 
                                                 // discrete GPU atomic operations access.
            unsigned int ExecuteAccess: 1; // default = 0: Identifies if memory is primarily used for data or accessed 
                                           // for executable code (e.g. queue memory) by the host CPU or the device. 
                                           // Influences the page attribute setting within the allocation
            unsigned int CoarseGrain : 1;  // default = 0: The memory can be accessed assuming cache
                                           // coherency maintained by link infrastructure and HSA agents.
                                           // 1: memory consistency needs to be enforced at
                                           // synchronization points at dispatch or other software
                                           // enforced synchronization boundaries.
            unsigned int AQLQueueMemory: 1; // default = 0; If 1: The caller indicates that the memory will be used as AQL queue memory.
					    // The KFD will ensure that the memory returned is allocated in the optimal memory location
					    // and optimal alignment requirements
            unsigned int FixedAddress : 1; // Allocate memory at specified virtual address. Fail if address is not free.
            unsigned int NoNUMABind:    1; // Don't bind system memory to a specific NUMA node
            unsigned int Uncached:      1; // Caching flag for fine-grained memory on A+A HW platform
            unsigned int NoAddress:     1; // only do vram allocation, return a handle, not allocate virtual address.
            unsigned int OnlyAddress:   1; // only do virtal address allocation without vram allocation.
            unsigned int ExtendedCoherent: 1;  // system-scope coherence on atomic instructions
            unsigned int GTTAccess:     1;  // default = 0; If 1: The caller indicates this memory will be mapped to GART for MES
					    // KFD will allocate GTT memory with the Preferred_node set as gpu_id for GART mapping
            unsigned int Contiguous:	1; // Allocate contiguous VRAM
            unsigned int ExecuteBlit:	1; // default = 0; If 1: The caller indicates that the memory is for blit kernel object.
            unsigned int Reserved:      8;

        } ui32;
        HSAuint32 Value;
    };
} HsaMemFlags;

typedef struct _HsaMemMapFlags
{
    union
    {
        struct
        {
            unsigned int Reserved1      :  1; //
            unsigned int CachePolicy    :  2; // see HSA_CACHING_TYPE
            unsigned int ReadOnly       :  1; // memory is not modified while mapped
            	    	    	    	      // allows migration scale-out
	    unsigned int PageSize	    :  2; // see HSA_PAGE_SIZE, hint to use
					  // this page size if possible and
					  // smaller than default
	    unsigned int HostAccess     :  1; // default = 0: GPU access only
	    unsigned int Migrate        :  1; // Hint: Allows migration to local mem
						  // of mapped GPU(s), instead of mapping
						  // physical location
            unsigned int Probe          :  1;     // default = 0: Indicates that a range
                                                  // will be mapped by the process soon,
						  // but does not initiate a map operation
						  // may trigger eviction of nonessential
						  // data from the memory, reduces latency
						  // “cleanup hint” only, may be ignored
            unsigned int Reserved       : 23;
        } ui32;
        HSAuint32 Value;
    };
} HsaMemMapFlags;

typedef struct _HsaGraphicsResourceInfo {
    void       *MemoryAddress;      // For use in hsaKmtMapMemoryToGPU(Nodes)
    HSAuint64  SizeInBytes;         // Buffer size
    const void *Metadata;           // Pointer to metadata owned by Thunk
    HSAuint32  MetadataSizeInBytes; // Size of metadata
    HSAuint32  NodeId;              // GPU exported the buffer
} HsaGraphicsResourceInfo;

typedef enum _HSA_CACHING_TYPE
{
    HSA_CACHING_CACHED        = 0,
    HSA_CACHING_NONCACHED     = 1,
    HSA_CACHING_WRITECOMBINED = 2,
    HSA_CACHING_RESERVED      = 3,
    HSA_CACHING_NUM_CACHING,
    HSA_CACHING_SIZE          = 0xFFFFFFFF
} HSA_CACHING_TYPE;

typedef enum _HSA_PAGE_SIZE
{
    HSA_PAGE_SIZE_4KB         = 0,
    HSA_PAGE_SIZE_64KB        = 1,  //64KB pages, not generally available in systems
    HSA_PAGE_SIZE_2MB         = 2,
    HSA_PAGE_SIZE_1GB         = 3,  //1GB pages, not generally available in systems
} HSA_PAGE_SIZE;


typedef enum _HSA_DEVICE
{
    HSA_DEVICE_CPU  = 0,
    HSA_DEVICE_GPU  = 1,
    MAX_HSA_DEVICE  = 2
} HSA_DEVICE;


typedef enum _HSA_QUEUE_PRIORITY
{
    HSA_QUEUE_PRIORITY_MINIMUM        = -3,
    HSA_QUEUE_PRIORITY_LOW            = -2,
    HSA_QUEUE_PRIORITY_BELOW_NORMAL   = -1,
    HSA_QUEUE_PRIORITY_NORMAL         =  0,
    HSA_QUEUE_PRIORITY_ABOVE_NORMAL   =  1,
    HSA_QUEUE_PRIORITY_HIGH           =  2,
    HSA_QUEUE_PRIORITY_MAXIMUM        =  3,
    HSA_QUEUE_PRIORITY_NUM_PRIORITY,
    HSA_QUEUE_PRIORITY_SIZE           = 0xFFFFFFFF
} HSA_QUEUE_PRIORITY;

typedef enum _HSA_QUEUE_TYPE
{
    HSA_QUEUE_COMPUTE            = 1,  // AMD PM4 compatible Compute Queue
    HSA_QUEUE_SDMA               = 2,  // PCIe optimized SDMA Queue, used for data transport and format conversion (e.g. (de-)tiling, etc).
    HSA_QUEUE_MULTIMEDIA_DECODE  = 3,  // reserved, for HSA multimedia decode queue
    HSA_QUEUE_MULTIMEDIA_ENCODE  = 4,  // reserved, for HSA multimedia encode queue
    HSA_QUEUE_SDMA_XGMI          = 5,  // XGMI optimized SDMA Queue
    HSA_QUEUE_SDMA_BY_ENG_ID     = 6,  // Queue with specified SDMA engine ID

    // the following values indicate a queue type permitted to reference OS graphics
    // resources through the interoperation API. See [5] "HSA Graphics Interoperation
    // specification" for more details on use of such resources.

    HSA_QUEUE_COMPUTE_OS           = 11, // AMD PM4 compatible Compute Queue
    HSA_QUEUE_SDMA_OS              = 12, // SDMA Queue, used for data transport and format conversion (e.g. (de-)tiling, etc).
    HSA_QUEUE_MULTIMEDIA_DECODE_OS = 13, // reserved, for HSA multimedia decode queue
    HSA_QUEUE_MULTIMEDIA_ENCODE_OS = 14,  // reserved, for HSA multimedia encode queue

    HSA_QUEUE_COMPUTE_AQL          = 21, // HSA AQL packet compatible Compute Queue
    HSA_QUEUE_DMA_AQL              = 22, // HSA AQL packet compatible DMA Queue
    HSA_QUEUE_DMA_AQL_XGMI         = 23, // HSA AQL packet compatible XGMI optimized DMA Queue

    // more types in the future

    HSA_QUEUE_TYPE_SIZE            = 0xFFFFFFFF     //aligns to 32bit enum
} HSA_QUEUE_TYPE;

/**
  The user context save area is page aligned. The HsaUserContextSaveAreaHeader
  header starts at offset 0. Space for a user space copy of the control stack
  comes next and is immediately followed by the user space wave save state. The
  start of the user space wave save state is page aligned. The debugger reserved
  area comes next and is 64 byte aligned.

  The user context save area is valid for the duration that the associated
  queue exists. When a context save occurs, the HsaUserContextSaveAreaHeader
  header will be updated with information about the context save. The context
  save area is not modified by any other operation, including a context resume.
 */

typedef struct
{
    HSAuint32 ControlStackOffset;  // Byte offset from start of user context
                                 // save area to the last saved top (lowest
                                 // address) of control stack data. Must be
                                 // 4 byte aligned.
    HSAuint32 ControlStackSize;  // Byte size of the last saved control stack
                                 // data. Must be 4 byte aligned.
    HSAuint32 WaveStateOffset;   // Byte offset from start of user context save
                                 // area to the last saved base (lowest address)
                                 // of wave state data. Must be 4 byte aligned.
    HSAuint32 WaveStateSize;     // Byte size of the last saved wave state data.
                                 // Must be 4 byte aligned.
    HSAuint32 DebugOffset;       // Byte offset from start of the user context
                                 // save area to the memory reserved for the
                                 // debugger. Must be 64 byte aligned.
    HSAuint32 DebugSize;         // Byte size of the memory reserved for the
                                 // debugger. Must be 64 byte aligned.
    volatile HSAint64 *ErrorReason;      // Address of the HSA signal payload for
                                         // reporting the error reason bitmask.
                                         // Must be 4 byte aligned.
    HSAuint32 ErrorEventId;      // Event ID used for exception signalling.
                                 // Must be 4 byte aligned.
    HSAuint32 Reserved1;
} HsaUserContextSaveAreaHeader;


typedef struct
{
	HSAuint32 QueueDetailError;	// HW specific queue error state
	HSAuint32 QueueTypeExtended;	// HW specific queue type info.
					// 0 = no information
	HSAuint32 NumCUAssigned;	// size of *CUMaskInfo bit array, Multiple
					// of 32, 0 = no information
	HSAuint32* CUMaskInfo;		// runtime/system CU assignment for realtime
					// queue & reserved CU priority. Ptr to
					// bit-array, each bit represents one CU.
					// NULL = no information
	HSAuint32* UserContextSaveArea;	// reference to user space context save area
	HSAuint64 SaveAreaSizeInBytes;	// Must be 4-Byte aligned
	HSAuint32* ControlStackTop;	// ptr to the TOS
	HSAuint64 ControlStackUsedInBytes; // Must be 4-Byte aligned
	HsaUserContextSaveAreaHeader *SaveAreaHeader;
	HSAuint64 Reserved2;		// runtime/system CU assignment
} HsaQueueInfo;

typedef struct _HsaQueueResource
{
    HSA_QUEUEID     QueueId;    /** queue ID */
    /** Doorbell address to notify HW of a new dispatch */
    union
    {
        HSAuint32*  Queue_DoorBell;
        HSAuint64*  Queue_DoorBell_aql;
        HSAuint64   QueueDoorBell;
    };

    /** virtual address to notify HW of queue write ptr value */
    union
    {
        HSAuint32*  Queue_write_ptr;
        HSAuint64*  Queue_write_ptr_aql;
        HSAuint64   QueueWptrValue;
    };

    /** virtual address updated by HW to indicate current read location */
    union
    {
        HSAuint32*  Queue_read_ptr;
        HSAuint64*  Queue_read_ptr_aql;
        HSAuint64   QueueRptrValue;
    };

    volatile HSAint64* ErrorReason;  /** exception bits signal payload */
} HsaQueueResource;


//TEMPORARY structure definition - to be used only on "Triniti + Southern Islands" platform
typedef struct _HsaQueueReport
{
    HSAuint32     VMID;         //Required on SI to dispatch IB in primary ring
    void*         QueueAddress; //virtual address of UM mapped compute ring
    HSAuint64     QueueSize;    //size of the UM mapped compute ring
} HsaQueueReport;



typedef enum _HSA_DBG_WAVEOP
{
    HSA_DBG_WAVEOP_HALT        = 1, //Halts a wavefront
    HSA_DBG_WAVEOP_RESUME      = 2, //Resumes a wavefront
    HSA_DBG_WAVEOP_KILL        = 3, //Kills a wavefront
    HSA_DBG_WAVEOP_DEBUG       = 4, //Causes wavefront to enter debug mode
    HSA_DBG_WAVEOP_TRAP        = 5, //Causes wavefront to take a trap
    HSA_DBG_NUM_WAVEOP         = 5,
    HSA_DBG_MAX_WAVEOP         = 0xFFFFFFFF
} HSA_DBG_WAVEOP;

typedef enum _HSA_DBG_WAVEMODE
{
    HSA_DBG_WAVEMODE_SINGLE               = 0,  //send command to a single wave
    //Broadcast to all wavefronts of all processes is not supported for HSA user mode
    HSA_DBG_WAVEMODE_BROADCAST_PROCESS    = 2,  //send to waves within current process
    HSA_DBG_WAVEMODE_BROADCAST_PROCESS_CU = 3,  //send to waves within current process on CU
    HSA_DBG_NUM_WAVEMODE                  = 3,
    HSA_DBG_MAX_WAVEMODE                  = 0xFFFFFFFF
} HSA_DBG_WAVEMODE;


typedef enum _HSA_DBG_WAVEMSG_TYPE
{
    HSA_DBG_WAVEMSG_AUTO    = 0,
    HSA_DBG_WAVEMSG_USER    = 1,
    HSA_DBG_WAVEMSG_ERROR   = 2,
    HSA_DBG_NUM_WAVEMSG,
    HSA_DBG_MAX_WAVEMSG     = 0xFFFFFFFF
} HSA_DBG_WAVEMSG_TYPE;

typedef enum _HSA_DBG_WATCH_MODE
{
    HSA_DBG_WATCH_READ        = 0, //Read operations only
    HSA_DBG_WATCH_NONREAD     = 1, //Write or Atomic operations only
    HSA_DBG_WATCH_ATOMIC      = 2, //Atomic Operations only
    HSA_DBG_WATCH_ALL         = 3, //Read, Write or Atomic operations
    HSA_DBG_WATCH_NUM
} HSA_DBG_WATCH_MODE;

typedef enum _HSA_DBG_TRAP_OVERRIDE
{
  HSA_DBG_TRAP_OVERRIDE_OR      = 0, // Bitwise OR exception mask with HSA_DBG_TRAP_MASK
  HSA_DBG_TRAP_OVERRIDE_REPLACE = 1, // Replace exception mask with HSA_DBG_TRAP_MASK
  HSA_DBG_TRAP_OVERRIDE_NUM
} HSA_DBG_TRAP_OVERRIDE;

typedef enum _HSA_DBG_TRAP_MASK
{
  HSA_DBG_TRAP_MASK_FP_INVALID           = 1,   // Floating point invalid operation
  HSA_DBG_TRAP_MASK_FP_INPUT_DENOMAL     = 2,   // Floating point input denormal
  HSA_DBG_TRAP_MASK_FP_DIVIDE_BY_ZERO    = 4,   // Floating point divide by zero
  HSA_DBG_TRAP_MASK_FP_OVERFLOW          = 8,   // Floating point overflow
  HSA_DBG_TRAP_MASK_FP_UNDERFLOW         = 16,  // Floating point underflow
  HSA_DBG_TRAP_MASK_FP_INEXACT           = 32,  // Floating point inexact
  HSA_DBG_TRAP_MASK_INT_DIVIDE_BY_ZERO   = 64,  // Integer divide by zero
  HSA_DBG_TRAP_MASK_DBG_ADDRESS_WATCH    = 128, // Debug address watch
  HSA_DBG_TRAP_MASK_DBG_MEMORY_VIOLATION = 256  // Memory violation
} HSA_DBG_TRAP_MASK;

typedef enum _HSA_DBG_TRAP_EXCEPTION_CODE {
	HSA_DBG_EC_NONE = 0,
	/* per queue */
	HSA_DBG_EC_QUEUE_WAVE_ABORT = 1,
	HSA_DBG_EC_QUEUE_WAVE_TRAP = 2,
	HSA_DBG_EC_QUEUE_WAVE_MATH_ERROR = 3,
	HSA_DBG_EC_QUEUE_WAVE_ILLEGAL_INSTRUCTION = 4,
	HSA_DBG_EC_QUEUE_WAVE_MEMORY_VIOLATION = 5,
	HSA_DBG_EC_QUEUE_WAVE_APERTURE_VIOLATION = 6,
	HSA_DBG_EC_QUEUE_PACKET_DISPATCH_DIM_INVALID = 16,
	HSA_DBG_EC_QUEUE_PACKET_DISPATCH_GROUP_SEGMENT_SIZE_INVALID = 17,
	HSA_DBG_EC_QUEUE_PACKET_DISPATCH_CODE_INVALID = 18,
	HSA_DBG_EC_QUEUE_PACKET_RESERVED = 19,
	HSA_DBG_EC_QUEUE_PACKET_UNSUPPORTED = 20,
	HSA_DBG_EC_QUEUE_PACKET_DISPATCH_WORK_GROUP_SIZE_INVALID = 21,
	HSA_DBG_EC_QUEUE_PACKET_DISPATCH_REGISTER_INVALID = 22,
	HSA_DBG_EC_QUEUE_PACKET_VENDOR_UNSUPPORTED = 23,
	HSA_DBG_EC_QUEUE_PREEMPTION_ERROR = 30,
	HSA_DBG_EC_QUEUE_NEW = 31,
	/* per device */
	HSA_DBG_EC_DEVICE_QUEUE_DELETE = 32,
	HSA_DBG_EC_DEVICE_MEMORY_VIOLATION = 33,
	HSA_DBG_EC_DEVICE_RAS_ERROR = 34,
	HSA_DBG_EC_DEVICE_FATAL_HALT = 35,
	HSA_DBG_EC_DEVICE_NEW = 36,
	/* per process */
	HSA_DBG_EC_PROCESS_RUNTIME = 48,
	HSA_DBG_EC_PROCESS_DEVICE_REMOVE = 49,
	HSA_DBG_EC_MAX
} HSA_DBG_TRAP_EXCEPTION_CODE;

/* Mask generated by ecode defined in enum above. */
#define HSA_EC_MASK(ecode)	(1ULL << (ecode - 1))

typedef enum _HSA_DBG_WAVE_LAUNCH_MODE
{
    HSA_DBG_WAVE_LAUNCH_MODE_NORMAL      = 0, // Wavefront launched normally.
    HSA_DBG_WAVE_LAUNCH_MODE_HALT        = 1, // Wavefront launched in halted mode.
    HSA_DBG_WAVE_LAUNCH_MODE_KILL        = 2, // Wavefront is launched but immediately
                                              // terminated before executing any instructions.
    HSA_DBG_WAVE_LAUNCH_MODE_SINGLE_STEP = 3, // Wavefront is launched in single step (debug)
                                              // mode. If debug trap is enabled by
                                              // hsaKmtDbgEnableDebugTrap() then causes a
                                              // trap after executing each instruction,
                                              // otherwise behaves the same as
                                              // HSA_DBG_WAVE_LAUNCH_MODE_NORMAL.
    HSA_DBG_WAVE_LAUNCH_MODE_DISABLE     = 4, // Disable launching any new waves.
    HSA_DBG_WAVE_LAUNCH_MODE_NUM
} HSA_DBG_WAVE_LAUNCH_MODE;

/**
 *    There are no flags currently defined.
 */
typedef enum HSA_DBG_NODE_CONTROL {
    HSA_DBG_NODE_CONTROL_FLAG_MAX = 0x01
} HSA_DBG_NODE_CONTROL;

#define HSA_RUNTIME_ENABLE_CAPS_SUPPORTS_CORE_DUMP_MASK 0x80000000

//This structure is hardware specific and may change in the future
typedef struct _HsaDbgWaveMsgAMDGen2
{
    HSAuint32      Value;
    HSAuint32      Reserved2;

} HsaDbgWaveMsgAMDGen2;

typedef union _HsaDbgWaveMessageAMD
{
    HsaDbgWaveMsgAMDGen2    WaveMsgInfoGen2;
    //for future HsaDbgWaveMsgAMDGen3;
} HsaDbgWaveMessageAMD;

typedef struct _HsaDbgWaveMessage
{
    void*                   MemoryVA;         // ptr to associated host-accessible data
    HsaDbgWaveMessageAMD    DbgWaveMsg;
} HsaDbgWaveMessage;


//
// HSA sync primitive, Event and HW Exception notification API definitions
// The API functions allow the runtime to define a so-called sync-primitive, a SW object
// combining a user-mode provided "syncvar" and a scheduler event that can be signaled
// through a defined GPU interrupt. A syncvar is a process virtual memory location of
// a certain size that can be accessed by CPU and GPU shader code within the process to set
// and query the content within that memory. The definition of the content is determined by
// the HSA runtime and potentially GPU shader code interfacing with the HSA runtime.
// The syncvar values may be commonly written through an PM4 WRITE_DATA packet in the
// user mode instruction stream.
// The OS scheduler event is typically associated and signaled by an interrupt issued by
// the GPU, but other HSA system interrupt conditions from other HW (e.g. IOMMUv2) may be
// surfaced by the KFD by this mechanism, too.
//

// these are the new definitions for events
typedef enum _HSA_EVENTTYPE
{
    HSA_EVENTTYPE_SIGNAL                     = 0, //user-mode generated GPU signal
    HSA_EVENTTYPE_NODECHANGE                 = 1, //HSA node change (attach/detach)
    HSA_EVENTTYPE_DEVICESTATECHANGE          = 2, //HSA device state change( start/stop )
    HSA_EVENTTYPE_HW_EXCEPTION               = 3, //GPU shader exception event
    HSA_EVENTTYPE_SYSTEM_EVENT               = 4, //GPU SYSCALL with parameter info
    HSA_EVENTTYPE_DEBUG_EVENT                = 5, //GPU signal for debugging
    HSA_EVENTTYPE_PROFILE_EVENT              = 6, //GPU signal for profiling
    HSA_EVENTTYPE_QUEUE_EVENT                = 7, //GPU signal queue idle state (EOP pm4)
    HSA_EVENTTYPE_MEMORY                     = 8, //GPU signal for signaling memory access faults and memory subsystem issues
    //...
    HSA_EVENTTYPE_MAXID,
    HSA_EVENTTYPE_TYPE_SIZE                  = 0xFFFFFFFF
} HSA_EVENTTYPE;


//
// Definitions for types of pending debug events
//
typedef enum _HSA_DEBUG_EVENT_TYPE
{
	HSA_DEBUG_EVENT_TYPE_NONE				= 0,
	HSA_DEBUG_EVENT_TYPE_TRAP				= 1,
	HSA_DEBUG_EVENT_TYPE_VMFAULT			= 2,
	HSA_DEBUG_EVENT_TYPE_TRAP_VMFAULT		= 3
} HSA_DEBUG_EVENT_TYPE;

typedef HSAuint32  HSA_EVENTID;

//
// Subdefinitions for various event types: Syncvar
//

typedef struct _HsaSyncVar
{
    union
    {
        void*       UserData;           //pointer to user mode data
        HSAuint64   UserDataPtrValue;   //64bit compatibility of value
    } SyncVar;
    HSAuint64       SyncVarSize;
} HsaSyncVar;

//
// Subdefinitions for various event types: NodeChange
//

typedef enum _HSA_EVENTTYPE_NODECHANGE_FLAGS
{
    HSA_EVENTTYPE_NODECHANGE_ADD     = 0,
    HSA_EVENTTYPE_NODECHANGE_REMOVE  = 1,
    HSA_EVENTTYPE_NODECHANGE_SIZE    = 0xFFFFFFFF
} HSA_EVENTTYPE_NODECHANGE_FLAGS;

typedef struct _HsaNodeChange
{
    HSA_EVENTTYPE_NODECHANGE_FLAGS Flags;   // HSA node added/removed on the platform
} HsaNodeChange;

//
// Sub-definitions for various event types: DeviceStateChange
//

typedef enum _HSA_EVENTTYPE_DEVICESTATECHANGE_FLAGS
{
    HSA_EVENTTYPE_DEVICESTATUSCHANGE_START     = 0, //device started (and available)
    HSA_EVENTTYPE_DEVICESTATUSCHANGE_STOP      = 1, //device stopped (i.e. unavailable)
    HSA_EVENTTYPE_DEVICESTATUSCHANGE_SIZE      = 0xFFFFFFFF
} HSA_EVENTTYPE_DEVICESTATECHANGE_FLAGS;

typedef struct _HsaDeviceStateChange
{
    HSAuint32                           NodeId;     // F-NUMA node that contains the device
    HSA_DEVICE                          Device;     // device type: GPU or CPU
    HSA_EVENTTYPE_DEVICESTATECHANGE_FLAGS Flags;    // event flags
} HsaDeviceStateChange;

//
// Sub-definitions for various event types: Memory exception
//

typedef enum _HSA_EVENTID_MEMORYFLAGS
{
    HSA_EVENTID_MEMORY_RECOVERABLE           = 0, //access fault, recoverable after page adjustment
    HSA_EVENTID_MEMORY_FATAL_PROCESS         = 1, //memory access requires process context destruction, unrecoverable
    HSA_EVENTID_MEMORY_FATAL_VM              = 2, //memory access requires all GPU VA context destruction, unrecoverable
} HSA_EVENTID_MEMORYFLAGS;

typedef struct _HsaAccessAttributeFailure
{
    unsigned int NotPresent  : 1;  // Page not present or supervisor privilege 
    unsigned int ReadOnly    : 1;  // Write access to a read-only page
    unsigned int NoExecute   : 1;  // Execute access to a page marked NX
    unsigned int GpuAccess   : 1;  // Host access only
    unsigned int ECC         : 1;  // RAS ECC failure (notification of DRAM ECC - non-recoverable - error, if supported by HW)
    unsigned int Imprecise   : 1;  // Can't determine the exact fault address
    unsigned int ErrorType   : 3;  // Indicates RAS errors or other errors causing the access to GPU to fail
                                      // 0 = no RAS error, 1 = ECC_SRAM, 2 = Link_SYNFLOOD (poison), 3 = GPU hang (not attributable to a specific cause), other values reserved
    unsigned int Reserved    : 23; // must be 0
} HsaAccessAttributeFailure;

// data associated with HSA_EVENTID_MEMORY
typedef struct _HsaMemoryAccessFault
{
    HSAuint32                       NodeId;             // H-NUMA node that contains the device where the memory access occurred
    HSAuint64                       VirtualAddress;     // virtual address this occurred on
    HsaAccessAttributeFailure       Failure;            // failure attribute
    HSA_EVENTID_MEMORYFLAGS         Flags;              // event flags
} HsaMemoryAccessFault;

typedef enum _HSA_EVENTID_HW_EXCEPTION_CAUSE
{
    HSA_EVENTID_HW_EXCEPTION_GPU_HANG  = 0, // GPU Hang
    HSA_EVENTID_HW_EXCEPTION_ECC       = 1, // SRAM ECC error
} HSA_EVENTID_HW_EXCEPTION_CAUSE;

// data associated with HSA_EVENTID_HW_EXCEPTION
typedef struct _HsaHwException
{
    HSAuint32                       NodeId;    // Node Id where the memory exception occured
    HSAuint32                       ResetType;
    HSAuint32                       MemoryLost;
    HSA_EVENTID_HW_EXCEPTION_CAUSE  ResetCause;
} HsaHwException;

typedef struct _HsaEventData
{
    HSA_EVENTTYPE   EventType;      //event type

    union
    {
        // return data associated with HSA_EVENTTYPE_SIGNAL and other events
        HsaSyncVar              SyncVar;

        // data associated with HSA_EVENTTYPE_NODE_CHANGE
        HsaNodeChange           NodeChangeState;

        // data associated with HSA_EVENTTYPE_DEVICE_STATE_CHANGE
        HsaDeviceStateChange    DeviceState;

        // data associated with HSA_EVENTTYPE_MEMORY
        HsaMemoryAccessFault    MemoryAccessFault;

        // data associated with HSA_EVENTTYPE_HW_EXCEPTION
        HsaHwException          HwException;
    } EventData;

    // the following data entries are internal to the KFD & thunk itself.

    HSAuint64       HWData1;                    // internal thunk store for Event data  (OsEventHandle)
    HSAuint64       HWData2;                    // internal thunk store for Event data  (HWAddress)
    HSAuint32       HWData3;                    // internal thunk store for Event data  (HWData)
} HsaEventData;


typedef struct _HsaEventDescriptor
{
    HSA_EVENTTYPE   EventType;                  // event type to allocate
    HSAuint32       NodeId;                     // H-NUMA node containing GPU device that is event source
    HsaSyncVar      SyncVar;                    // pointer to user mode syncvar data, syncvar->UserDataPtrValue may be NULL
} HsaEventDescriptor;


typedef struct _HsaEvent
{
    HSA_EVENTID     EventId;
    HsaEventData    EventData;
} HsaEvent;

typedef enum _HsaEventTimeout
{
    HSA_EVENTTIMEOUT_IMMEDIATE  = 0,
    HSA_EVENTTIMEOUT_INFINITE   = 0xFFFFFFFF
} HsaEventTimeOut;

typedef struct _HsaClockCounters
{
    HSAuint64   GPUClockCounter;
    HSAuint64   CPUClockCounter;
    HSAuint64   SystemClockCounter;
    HSAuint64   SystemClockFrequencyHz;
} HsaClockCounters;

#ifndef DEFINE_GUID
typedef struct _HSA_UUID
{
    HSAuint32   Data1;
    HSAuint16   Data2;
    HSAuint16   Data3;
    HSAuint8    Data4[8];
} HSA_UUID;

#define HSA_DEFINE_UUID(name, dw, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
    static const HSA_UUID name = {dw, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}
#else
#define HSA_UUID GUID
#define HSA_DEFINE_UUID DEFINE_GUID
#endif

// HSA_UUID that identifies the GPU ColorBuffer (CB) block
// {9ba429c6-af2d-4b38-b349-157271beac6a}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_CB,
0x9ba429c6, 0xaf2d, 0x4b38, 0xb3, 0x49, 0x15, 0x72, 0x71, 0xbe, 0xac, 0x6a);

// HSA_UUID that identifies the GPU (CPF) block
// {2b0ad2b5-1c43-4f46-a7bc-e119411ea6c9}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_CPF,
0x2b0ad2b5, 0x1c43, 0x4f46, 0xa7, 0xbc, 0xe1, 0x19, 0x41, 0x1e, 0xa6, 0xc9);

// HSA_UUID that identifies the GPU (CPG) block
// {590ec94d-20f0-448f-8dff-316c679de7ff
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_CPG,
0x590ec94d, 0x20f0, 0x448f, 0x8d, 0xff, 0x31, 0x6c, 0x67, 0x9d, 0xe7, 0xff);

// HSA_UUID that identifies the GPU (DB) block
// {3d1a47fc-0013-4ed4-8306-822ca0b7a6c2
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_DB,
0x3d1a47fc, 0x0013, 0x4ed4, 0x83, 0x06, 0x82, 0x2c, 0xa0, 0xb7, 0xa6, 0xc2);

// HSA_UUID that identifies the GPU (GDS) block
// {f59276ec-2526-4bf8-8ec0-118f77700dc9
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_GDS,
0xf59276ec, 0x2526, 0x4bf8, 0x8e, 0xc0, 0x11, 0x8f, 0x77, 0x70, 0x0d, 0xc9);

// HSA_UUID that identifies the GPU (GRBM) block
// {8f00933c-c33d-4801-97b7-7007f78573ad
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_GRBM,
0x8f00933c, 0xc33d, 0x4801, 0x97, 0xb7, 0x70, 0x07, 0xf7, 0x85, 0x73, 0xad);

// HSA_UUID that identifies the GPU (GRBMSE) block
// {34ebd8d7-7c8b-4d15-88fa-0e4e4af59ac1
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_GRBMSE,
0x34ebd8d7, 0x7c8b, 0x4d15, 0x88, 0xfa, 0x0e, 0x4e, 0x4a, 0xf5, 0x9a, 0xc1);

// HSA_UUID that identifies the GPU (IA) block
// {34276944-4264-4fcd-9d6e-ae264582ec51
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_IA,
0x34276944, 0x4264, 0x4fcd, 0x9d, 0x6e, 0xae, 0x26, 0x45, 0x82, 0xec, 0x51);

// HSA_UUID that identifies the GPU Memory Controller (MC) block
// {13900B57-4956-4D98-81D0-68521937F59C
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_MC,
0x13900b57, 0x4956, 0x4d98, 0x81, 0xd0, 0x68, 0x52, 0x19, 0x37, 0xf5, 0x9c);

// HSA_UUID that identifies the GPU (PASC) block
// {b0e7fb5d-0efc-4744-b516-5d23dc1fd56c
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_PASC,
0xb0e7fb5d, 0x0efc, 0x4744, 0xb5, 0x16, 0x5d, 0x23, 0xdc, 0x1f, 0xd5, 0x6c);

// HSA_UUID that identifies the GPU (PASU) block
// {9a152b6a-1fad-45f2-a5bf-f163826bd0cd
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_PASU,
0x9a152b6a, 0x1fad, 0x45f2, 0xa5, 0xbf, 0xf1, 0x63, 0x82, 0x6b, 0xd0, 0xcd);

// HSA_UUID that identifies the GPU (SPI) block
// {eda81044-d62c-47eb-af89-4f6fbf3b38e0
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_SPI,
0xeda81044, 0xd62c, 0x47eb, 0xaf, 0x89, 0x4f, 0x6f, 0xbf, 0x3b, 0x38, 0xe0);

// HSA_UUID that identifies the GPU (SRBM) block
// {9f8040e0-6830-4019-acc8-463c9e445b89
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_SRBM,
0x9f8040e0, 0x6830, 0x4019, 0xac, 0xc8, 0x46, 0x3c, 0x9e, 0x44, 0x5b, 0x89);

// GUID that identifies the GPU Shader Sequencer (SQ) block
// {B5C396B6-D310-47E4-86FC-5CC3043AF508}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_SQ,
0xb5c396b6, 0xd310, 0x47e4, 0x86, 0xfc, 0x5c, 0xc3, 0x4, 0x3a, 0xf5, 0x8);

// HSA_UUID that identifies the GPU (SX) block
// {bdb8d737-43cc-4162-be52-51cfb847beaf}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_SX,
0xbdb8d737, 0x43cc, 0x4162, 0xbe, 0x52, 0x51, 0xcf, 0xb8, 0x47, 0xbe, 0xaf);

// HSA_UUID that identifies the GPU (TA) block
// {c01ee43d-ad92-44b1-8ab9-be5e696ceea7}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_TA,
0xc01ee43d, 0xad92, 0x44b1, 0x8a, 0xb9, 0xbe, 0x5e, 0x69, 0x6c, 0xee, 0xa7);

// HSA_UUID that identifies the GPU TextureCache (TCA) block
// {333e393f-e147-4f49-a6d1-60914c7086b0}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_TCA,
0x333e393f, 0xe147, 0x4f49, 0xa6, 0xd1,0x60, 0x91, 0x4c, 0x70, 0x86, 0xb0);

// HSA_UUID that identifies the GPU TextureCache (TCC) block
// {848ce855-d805-4566-a8ab-73e884cc6bff}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_TCC,
0x848ce855, 0xd805, 0x4566, 0xa8, 0xab, 0x73, 0xe8, 0x84, 0xcc, 0x6b, 0xff);

// HSA_UUID that identifies the GPU (TCP) block
// {e10a013b-17d4-4bf5-b089-429591059b60}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_TCP,
0xe10a013b, 0x17d4, 0x4bf5, 0xb0, 0x89, 0x42, 0x95, 0x91, 0x05, 0x9b, 0x60);

// HSA_UUID that identifies the GPU (TCS) block
// {4126245c-4d96-4d1a-8aed-a939d4cc8ec9}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_TCS,
0x4126245c, 0x4d96, 0x4d1a, 0x8a, 0xed, 0xa9, 0x39, 0xd4, 0xcc, 0x8e, 0xc9);

// HSA_UUID that identifies the GPU (TD) block
// {7d7c0fe4-fe41-4fea-92c9-4544d7706dc6}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_TD,
0x7d7c0fe4, 0xfe41, 0x4fea, 0x92, 0xc9, 0x45, 0x44, 0xd7, 0x70, 0x6d, 0xc6);

// HSA_UUID that identifies the GPU (VGT) block
// {0b6a8cb7-7a01-409f-a22c-3014854f1359}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_VGT,
0x0b6a8cb7, 0x7a01, 0x409f, 0xa2, 0x2c, 0x30, 0x14, 0x85, 0x4f, 0x13, 0x59);

// HSA_UUID that identifies the GPU (WD) block
// {0e176789-46ed-4b02-972a-916d2fac244a}
HSA_DEFINE_UUID(HSA_PROFILEBLOCK_AMD_WD,
0x0e176789, 0x46ed, 0x4b02, 0x97, 0x2a, 0x91, 0x6d, 0x2f, 0xac, 0x24, 0x4a);

typedef enum _HSA_PROFILE_TYPE
{
    HSA_PROFILE_TYPE_PRIVILEGED_IMMEDIATE = 0, //immediate access counter (KFD access only)
    HSA_PROFILE_TYPE_PRIVILEGED_STREAMING = 1, //streaming counter, HW continuously
                                               //writes to memory on updates (KFD access only)
    HSA_PROFILE_TYPE_NONPRIV_IMMEDIATE    = 2, //user-queue accessible counter
    HSA_PROFILE_TYPE_NONPRIV_STREAMING    = 3, //user-queue accessible counter
    //...
    HSA_PROFILE_TYPE_NUM,

    HSA_PROFILE_TYPE_SIZE                 = 0xFFFFFFFF      // In order to align to 32-bit value
} HSA_PROFILE_TYPE;


typedef struct _HsaCounterFlags
{
    union
    {
        struct
        {
            unsigned int  Global       : 1;  // counter is global
                                             // (not tied to VMID/WAVE/CU, ...)
            unsigned int  Resettable   : 1;  // counter can be reset by SW
                                             // (always to 0?)
            unsigned int  ReadOnly     : 1;  // counter is read-only
                                             // (but may be reset, if indicated)
            unsigned int  Stream       : 1;  // counter has streaming capability
                                             // (after trigger, updates buffer)
            unsigned int  Reserved     : 28;
        } ui32;
        HSAuint32      Value;
    };
} HsaCounterFlags;


typedef struct _HsaCounter
{
    HSA_PROFILE_TYPE Type;              // specifies the counter type
    HSAuint64        CounterId;         // indicates counter register offset
    HSAuint32        CounterSizeInBits; // indicates relevant counter bits
    HSAuint64        CounterMask;       // bitmask for counter value (if applicable)
    HsaCounterFlags  Flags;             // Property flags (see above)
    HSAuint32        BlockIndex;        // identifies block the counter belongs to,
                                        // value may be 0 to NumBlocks
} HsaCounter;


typedef struct _HsaCounterBlockProperties
{
    HSA_UUID                    BlockId;        // specifies the block location
    HSAuint32                   NumCounters;    // How many counters are available?
                                                // (sizes Counters[] array below)
    HSAuint32                   NumConcurrent;  // How many counter slots are available
                                                // in block?
    HsaCounter                  Counters[1];    // Start of counter array
                                                // (NumCounters elements total)
} HsaCounterBlockProperties;


typedef struct _HsaCounterProperties
{
    HSAuint32                   NumBlocks;      // How many profilable block are available?
                                                // (sizes Blocks[] array below)
    HSAuint32                   NumConcurrent;  // How many blocks slots can be queried
                                                // concurrently by HW?
    HsaCounterBlockProperties   Blocks[1];      // Start of block array
                                                // (NumBlocks elements total)
} HsaCounterProperties;

typedef HSAuint64   HSATraceId;

typedef struct _HsaPmcTraceRoot
{
    HSAuint64                   TraceBufferMinSizeBytes;// (page aligned)
    HSAuint32                   NumberOfPasses;
    HSATraceId                  TraceId;
} HsaPmcTraceRoot;

typedef struct _HsaGpuTileConfig
{
    HSAuint32 *TileConfig;
    HSAuint32 *MacroTileConfig;
    HSAuint32 NumTileConfigs;
    HSAuint32 NumMacroTileConfigs;

    HSAuint32 GbAddrConfig;

    HSAuint32 NumBanks;
    HSAuint32 NumRanks;
    /* 9 dwords on 64-bit system */
    HSAuint32 Reserved[7]; /* Round up to 16 dwords for future extension */
} HsaGpuTileConfig;

typedef enum _HSA_POINTER_TYPE {
    HSA_POINTER_UNKNOWN = 0,
    HSA_POINTER_ALLOCATED = 1,           // Allocated with hsaKmtAllocMemory (except scratch)
    HSA_POINTER_REGISTERED_USER = 2,     // Registered user pointer
    HSA_POINTER_REGISTERED_GRAPHICS = 3, // Registered graphics buffer
    HSA_POINTER_REGISTERED_SHARED = 4,   // Registered shared buffer (IPC)
                                         // (hsaKmtRegisterGraphicsToNodes)
    HSA_POINTER_RESERVED_ADDR = 5        // address-only reservation VA
} HSA_POINTER_TYPE;

typedef struct _HsaPointerInfo {
    HSA_POINTER_TYPE   Type;             // Pointer type
    HSAuint32          Node;             // Node where the memory is located
    HsaMemFlags        MemFlags;         // HsaMemFlags used to alloc memory
    void               *CPUAddress;      // Start address for CPU access
    HSAuint64          GPUAddress;       // Start address for GPU access
    HSAuint64          SizeInBytes;      // Size in bytes
    HSAuint32          NRegisteredNodes; // Number of nodes the memory is registered to
    HSAuint32          NMappedNodes;     // Number of nodes the memory is mapped to
    const HSAuint32    *RegisteredNodes; // Array of registered nodes
    const HSAuint32    *MappedNodes;     // Array of mapped nodes
    void               *UserData;        // User data associated with the memory
} HsaPointerInfo;

typedef HSAuint32 HsaSharedMemoryHandle[8];

typedef struct _HsaMemoryRange {
	void               *MemoryAddress;   // Pointer to GPU memory
	HSAuint64          SizeInBytes;      // Size of above memory
} HsaMemoryRange;

typedef enum _HSA_SVM_FLAGS {
	HSA_SVM_FLAG_HOST_ACCESS = 0x00000001, // Guarantee host access to memory
	HSA_SVM_FLAG_COHERENT    = 0x00000002, // Fine grained coherency between all devices with access
	HSA_SVM_FLAG_HIVE_LOCAL  = 0x00000004, // Use any GPU in same hive as preferred device
	HSA_SVM_FLAG_GPU_RO      = 0x00000008, // GPUs only read, allows replication
	HSA_SVM_FLAG_GPU_EXEC    = 0x00000010, // Allow execution on GPU
	HSA_SVM_FLAG_GPU_READ_MOSTLY = 0x00000020, // GPUs mostly read, may allow similar optimizations as RO, but writes fault
	HSA_SVM_FLAG_GPU_ALWAYS_MAPPED = 0x00000040, // Keep GPU memory mapping always valid as if XNACK is disable
	HSA_SVM_FLAG_EXT_COHERENT = 0x00000080, //  Fine grained coherency between all devices using device-scope atomics
} HSA_SVM_FLAGS;

typedef enum _HSA_SVM_ATTR_TYPE {
	HSA_SVM_ATTR_PREFERRED_LOC,  // gpuid of the preferred location, 0 for
                                     // system memory, INVALID_NODEID for
                                     // "don't care"
	HSA_SVM_ATTR_PREFETCH_LOC,   // gpuid of the prefetch location, 0 for
                                     // system memory. Setting this triggers an
                                     // immediate prefetch (migration)
	HSA_SVM_ATTR_ACCESS,
	HSA_SVM_ATTR_ACCESS_IN_PLACE,
	HSA_SVM_ATTR_NO_ACCESS,      // specify memory access for the gpuid given
                                     // by the attribute value
	HSA_SVM_ATTR_SET_FLAGS,      // bitmask of flags to set (see HSA_SVM_FLAGS)
	HSA_SVM_A
Download .txt
gitextract_zn673rxz/

├── .gitignore
├── CMakeLists.txt
├── DEBIAN/
│   ├── Binary/
│   │   ├── postinst.in
│   │   └── prerm.in
│   ├── Dev/
│   │   ├── postinst.in
│   │   └── prerm.in
│   └── preinst
├── LICENSE.txt
├── README.md
├── RPM/
│   ├── Binary/
│   │   ├── post.in
│   │   └── postun.in
│   ├── Dev/
│   │   ├── post.in
│   │   └── postun.in
│   ├── hsa-rocr.spec.in
│   └── preinst
├── _clang-format
├── clang-format-diff.py
├── cmake_modules/
│   └── utils.cmake
├── format
├── libhsakmt/
│   ├── CMakeLists.txt
│   ├── DEBIAN/
│   │   ├── postinst.in
│   │   └── prerm.in
│   ├── LICENSE.md
│   ├── README.md
│   ├── RPM/
│   │   ├── hsakmt-roct-devel.spec.in
│   │   ├── libhsakmt.spec
│   │   ├── post.in
│   │   └── postun.in
│   ├── cmake_modules/
│   │   └── utils.cmake
│   ├── hsakmt-config.cmake.in
│   ├── include/
│   │   └── hsakmt/
│   │       ├── hsakmt.h
│   │       ├── hsakmt_virtio.h
│   │       ├── hsakmtmodel.h
│   │       ├── hsakmtmodeliface.h
│   │       ├── hsakmttypes.h
│   │       └── linux/
│   │           ├── kfd_ioctl.h
│   │           └── udmabuf.h
│   ├── libhsakmt.pc.in
│   ├── src/
│   │   ├── debug.c
│   │   ├── events.c
│   │   ├── fmm.c
│   │   ├── fmm.h
│   │   ├── globals.c
│   │   ├── hsakmtmodel.c
│   │   ├── libhsakmt.c
│   │   ├── libhsakmt.h
│   │   ├── libhsakmt.ver
│   │   ├── memory.c
│   │   ├── openclose.c
│   │   ├── pc_sampling.c
│   │   ├── perfctr.c
│   │   ├── pmc_table.c
│   │   ├── pmc_table.h
│   │   ├── queues.c
│   │   ├── rbtree.c
│   │   ├── rbtree.h
│   │   ├── rbtree_amd.h
│   │   ├── spm.c
│   │   ├── svm.c
│   │   ├── time.c
│   │   ├── topology.c
│   │   ├── version.c
│   │   └── virtio/
│   │       ├── CMakeLists.txt
│   │       ├── hsakmt_virtio_amdgpu.c
│   │       ├── hsakmt_virtio_device.c
│   │       ├── hsakmt_virtio_device.h
│   │       ├── hsakmt_virtio_events.c
│   │       ├── hsakmt_virtio_memory.c
│   │       ├── hsakmt_virtio_openclose.c
│   │       ├── hsakmt_virtio_proto.h
│   │       ├── hsakmt_virtio_queues.c
│   │       ├── hsakmt_virtio_topology.c
│   │       ├── hsakmt_virtio_vm.c
│   │       ├── include/
│   │       │   └── linux/
│   │       │       └── virtgpu_drm.h
│   │       ├── libhsakmt_virtio.ver
│   │       ├── virtio_gpu.c
│   │       └── virtio_gpu.h
│   └── tests/
│       ├── kfdtest/
│       │   ├── .gitignore
│       │   ├── CMakeLists.txt
│       │   ├── LICENSE.kfdtest
│       │   ├── README.txt
│       │   ├── gtest-1.6.0/
│       │   │   ├── gtest/
│       │   │   │   └── gtest.h
│       │   │   └── gtest-all.cpp
│       │   ├── include/
│       │   │   ├── amdp2ptest.h
│       │   │   ├── asic_reg/
│       │   │   │   ├── gfx_7_2_d.h
│       │   │   │   ├── gfx_7_2_enum.h
│       │   │   │   └── gfx_7_2_sh_mask.h
│       │   │   ├── kfd_pm4_opcodes.h
│       │   │   ├── pm4_pkt_struct_ai.h
│       │   │   ├── pm4_pkt_struct_ci.h
│       │   │   ├── pm4_pkt_struct_common.h
│       │   │   ├── pm4_pkt_struct_nv.h
│       │   │   └── sdma_pkt_struct.h
│       │   ├── scripts/
│       │   │   ├── kfdtest.exclude
│       │   │   └── run_kfdtest.sh
│       │   └── src/
│       │       ├── AqlQueue.cpp
│       │       ├── AqlQueue.hpp
│       │       ├── Assemble.cpp
│       │       ├── Assemble.hpp
│       │       ├── BaseDebug.cpp
│       │       ├── BaseDebug.hpp
│       │       ├── BasePacket.cpp
│       │       ├── BasePacket.hpp
│       │       ├── BaseQueue.cpp
│       │       ├── BaseQueue.hpp
│       │       ├── Dispatch.cpp
│       │       ├── Dispatch.hpp
│       │       ├── GoogleTestExtension.cpp
│       │       ├── GoogleTestExtension.hpp
│       │       ├── IndirectBuffer.cpp
│       │       ├── IndirectBuffer.hpp
│       │       ├── KFDASMTest.cpp
│       │       ├── KFDASMTest.hpp
│       │       ├── KFDBaseComponentTest.cpp
│       │       ├── KFDBaseComponentTest.hpp
│       │       ├── KFDCWSRTest.cpp
│       │       ├── KFDCWSRTest.hpp
│       │       ├── KFDDBGTest.cpp
│       │       ├── KFDDBGTest.hpp
│       │       ├── KFDEventTest.cpp
│       │       ├── KFDEventTest.hpp
│       │       ├── KFDEvictTest.cpp
│       │       ├── KFDEvictTest.hpp
│       │       ├── KFDExceptionTest.cpp
│       │       ├── KFDExceptionTest.hpp
│       │       ├── KFDGWSTest.cpp
│       │       ├── KFDGWSTest.hpp
│       │       ├── KFDGraphicsInterop.cpp
│       │       ├── KFDGraphicsInterop.hpp
│       │       ├── KFDHWSTest.cpp
│       │       ├── KFDHWSTest.hpp
│       │       ├── KFDIPCTest.cpp
│       │       ├── KFDIPCTest.hpp
│       │       ├── KFDLocalMemoryTest.cpp
│       │       ├── KFDLocalMemoryTest.hpp
│       │       ├── KFDMemoryTest.cpp
│       │       ├── KFDMemoryTest.hpp
│       │       ├── KFDMultiProcessTest.cpp
│       │       ├── KFDMultiProcessTest.hpp
│       │       ├── KFDNegativeTest.cpp
│       │       ├── KFDNegativeTest.hpp
│       │       ├── KFDOpenCloseKFDTest.cpp
│       │       ├── KFDOpenCloseKFDTest.hpp
│       │       ├── KFDPCSamplingTest.cpp
│       │       ├── KFDPCSamplingTest.hpp
│       │       ├── KFDPMTest.cpp
│       │       ├── KFDPMTest.hpp
│       │       ├── KFDPerfCounters.cpp
│       │       ├── KFDPerfCounters.hpp
│       │       ├── KFDPerformanceTest.cpp
│       │       ├── KFDQMTest.cpp
│       │       ├── KFDQMTest.hpp
│       │       ├── KFDRASTest.cpp
│       │       ├── KFDRASTest.hpp
│       │       ├── KFDSVMEvictTest.cpp
│       │       ├── KFDSVMEvictTest.hpp
│       │       ├── KFDSVMRangeTest.cpp
│       │       ├── KFDSVMRangeTest.hpp
│       │       ├── KFDTestFlags.hpp
│       │       ├── KFDTestMain.cpp
│       │       ├── KFDTestUtil.cpp
│       │       ├── KFDTestUtil.hpp
│       │       ├── KFDTestUtilQueue.cpp
│       │       ├── KFDTestUtilQueue.hpp
│       │       ├── KFDTopologyTest.cpp
│       │       ├── KFDTopologyTest.hpp
│       │       ├── LinuxOSWrapper.cpp
│       │       ├── OSWrapper.hpp
│       │       ├── PM4Packet.cpp
│       │       ├── PM4Packet.hpp
│       │       ├── PM4Queue.cpp
│       │       ├── PM4Queue.hpp
│       │       ├── RDMATest.cpp
│       │       ├── RDMATest.hpp
│       │       ├── RDMAUtil.cpp
│       │       ├── RDMAUtil.hpp
│       │       ├── SDMAPacket.cpp
│       │       ├── SDMAPacket.hpp
│       │       ├── SDMAQueue.cpp
│       │       ├── SDMAQueue.hpp
│       │       ├── SDMAQueueByEngId.hpp
│       │       ├── ShaderStore.cpp
│       │       ├── ShaderStore.hpp
│       │       └── XgmiOptimizedSDMAQueue.hpp
│       ├── rdma/
│       │   └── simple/
│       │       ├── app/
│       │       │   ├── CMakeLists.txt
│       │       │   └── rdma_test.cpp
│       │       └── drv/
│       │           ├── amdp2ptest.c
│       │           └── amdp2ptest.h
│       └── reopen/
│           ├── CMakeLists.txt
│           └── kmtreopen.c
├── rocrtst/
│   ├── .gitignore
│   ├── Kernels/
│   │   ├── CMakeLists.txt
│   │   ├── binary_search_kernel.cl
│   │   ├── read_kernel.cl
│   │   └── write_kernel.cl
│   ├── README.md
│   ├── common/
│   │   ├── base_rocr.cc
│   │   ├── base_rocr.h
│   │   ├── base_rocr_utils.cc
│   │   ├── base_rocr_utils.h
│   │   ├── common.cc
│   │   ├── common.h
│   │   ├── concurrent_utils.cc
│   │   ├── concurrent_utils.h
│   │   ├── helper_funcs.cc
│   │   ├── helper_funcs.h
│   │   ├── hsatimer.cc
│   │   ├── hsatimer.h
│   │   ├── os.cc
│   │   ├── os.h
│   │   ├── rocr.cc
│   │   ├── rocr.h
│   │   └── utils_test/
│   │       ├── CMakeLists.txt
│   │       ├── utils_cpp11_gtest.cpp
│   │       ├── utils_timer_gtest.cpp
│   │       ├── utils_timer_test.cpp
│   │       └── utils_timer_test.hpp
│   ├── gtest/
│   │   ├── CMakeLists.txt
│   │   ├── include/
│   │   │   └── gtest/
│   │   │       ├── gtest-death-test.h
│   │   │       ├── gtest-message.h
│   │   │       ├── gtest-param-test.h
│   │   │       ├── gtest-printers.h
│   │   │       ├── gtest-spi.h
│   │   │       ├── gtest-test-part.h
│   │   │       ├── gtest-typed-test.h
│   │   │       ├── gtest.h
│   │   │       ├── gtest_pred_impl.h
│   │   │       ├── gtest_prod.h
│   │   │       └── internal/
│   │   │           ├── gtest-death-test-internal.h
│   │   │           ├── gtest-filepath.h
│   │   │           ├── gtest-internal.h
│   │   │           ├── gtest-linked_ptr.h
│   │   │           ├── gtest-param-util-generated.h
│   │   │           ├── gtest-param-util-generated.h.pump
│   │   │           ├── gtest-param-util.h
│   │   │           ├── gtest-port.h
│   │   │           ├── gtest-string.h
│   │   │           ├── gtest-tuple.h
│   │   │           ├── gtest-tuple.h.pump
│   │   │           ├── gtest-type-util.h
│   │   │           └── gtest-type-util.h.pump
│   │   └── src/
│   │       ├── gtest-all.cpp
│   │       ├── gtest-death-test.cpp
│   │       ├── gtest-filepath.cpp
│   │       ├── gtest-internal-inl.h
│   │       ├── gtest-port.cpp
│   │       ├── gtest-printers.cpp
│   │       ├── gtest-test-part.cpp
│   │       ├── gtest-typed-test.cpp
│   │       ├── gtest.cpp
│   │       └── gtest_main.cpp
│   ├── samples/
│   │   ├── CMakeLists.txt
│   │   ├── README.txt
│   │   ├── async_mem_copy/
│   │   │   └── async_mem_copy.cc
│   │   ├── binary_search/
│   │   │   ├── binary_search.cc
│   │   │   └── binary_search_kernels.cl
│   │   ├── ipc/
│   │   │   └── ipc.cc
│   │   ├── rocm_async/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── Readme.txt
│   │   │   ├── base_test.cpp
│   │   │   ├── base_test.hpp
│   │   │   ├── common.cpp
│   │   │   ├── common.hpp
│   │   │   ├── hsatimer.cpp
│   │   │   ├── hsatimer.hpp
│   │   │   ├── main.cpp
│   │   │   ├── os.cpp
│   │   │   ├── os.hpp
│   │   │   ├── rocm_async.cpp
│   │   │   ├── rocm_async.hpp
│   │   │   ├── rocm_async_io.cpp
│   │   │   ├── rocm_async_parse.cpp
│   │   │   ├── rocm_async_print.cpp
│   │   │   ├── rocm_async_report.cpp
│   │   │   ├── rocm_async_topology.cpp
│   │   │   ├── rocm_async_trans.cpp
│   │   │   └── rocm_async_validate.cpp
│   │   └── rocrinfo/
│   │       └── rocrinfo.cc
│   ├── suites/
│   │   ├── functional/
│   │   │   ├── agent_props.cc
│   │   │   ├── agent_props.h
│   │   │   ├── aql_barrier_bit.cc
│   │   │   ├── aql_barrier_bit.h
│   │   │   ├── concurrent_init.cc
│   │   │   ├── concurrent_init.h
│   │   │   ├── concurrent_init_shutdown.cc
│   │   │   ├── concurrent_init_shutdown.h
│   │   │   ├── concurrent_shutdown.cc
│   │   │   ├── concurrent_shutdown.h
│   │   │   ├── cu_masking.cc
│   │   │   ├── cu_masking.h
│   │   │   ├── deallocation_notifier.cc
│   │   │   ├── deallocation_notifier.h
│   │   │   ├── debug_basic.cc
│   │   │   ├── debug_basic.h
│   │   │   ├── ipc.cc
│   │   │   ├── ipc.h
│   │   │   ├── memory_access.cc
│   │   │   ├── memory_access.h
│   │   │   ├── memory_alignment.cc
│   │   │   ├── memory_alignment.h
│   │   │   ├── memory_allocation.cc
│   │   │   ├── memory_allocation.h
│   │   │   ├── memory_atomics.cc
│   │   │   ├── memory_atomics.h
│   │   │   ├── memory_basic.cc
│   │   │   ├── memory_basic.h
│   │   │   ├── reference_count.cc
│   │   │   ├── reference_count.h
│   │   │   ├── signal_concurrent.cc
│   │   │   ├── signal_concurrent.h
│   │   │   ├── signal_kernel.cc
│   │   │   ├── signal_kernel.h
│   │   │   ├── virtual_memory.cc
│   │   │   └── virtual_memory.h
│   │   ├── negative/
│   │   │   ├── memory_allocate_negative_tests.cc
│   │   │   ├── memory_allocate_negative_tests.h
│   │   │   ├── queue_validation.cc
│   │   │   └── queue_validation.h
│   │   ├── performance/
│   │   │   ├── dispatch_time.cc
│   │   │   ├── dispatch_time.h
│   │   │   ├── enqueueLatency.cc
│   │   │   ├── enqueueLatency.h
│   │   │   ├── memory_async_copy.cc
│   │   │   ├── memory_async_copy.h
│   │   │   ├── memory_async_copy_numa.cc
│   │   │   └── memory_async_copy_numa.h
│   │   ├── stress/
│   │   │   ├── memory_concurrent_tests.cc
│   │   │   ├── memory_concurrent_tests.h
│   │   │   ├── queue_write_index_concurrent_tests.cc
│   │   │   └── queue_write_index_concurrent_tests.h
│   │   └── test_common/
│   │       ├── CMakeLists.txt
│   │       ├── kernels/
│   │       │   ├── atomicOperations_kernels.cl
│   │       │   ├── cu_mask_kernels.cl
│   │       │   ├── dispatch_time_kernels.cl
│   │       │   ├── gpuReadWrite_kernels.cl
│   │       │   ├── groupMemoryDynamic_kernels.cl
│   │       │   ├── signal_operations.cl
│   │       │   ├── test_case_template_kernels.cl
│   │       │   ├── vector_add_debug_trap_kernel.cl
│   │       │   └── vector_add_memory_fault_kernel.cl
│   │       ├── main.cc
│   │       ├── main.h
│   │       ├── test_base.cc
│   │       ├── test_base.h
│   │       ├── test_case_template.cc
│   │       ├── test_case_template.h
│   │       ├── test_common.cc
│   │       └── test_common.h
│   └── thirdparty/
│       ├── include/
│       │   ├── LICENSE
│       │   ├── hwloc/
│       │   │   ├── autogen/
│       │   │   │   └── config.h
│       │   │   ├── bitmap.h
│       │   │   ├── cpuset.h
│       │   │   ├── cuda.h
│       │   │   ├── cudart.h
│       │   │   ├── deprecated.h
│       │   │   ├── diff.h
│       │   │   ├── gl.h
│       │   │   ├── glibc-sched.h
│       │   │   ├── helper.h
│       │   │   ├── inlines.h
│       │   │   ├── intel-mic.h
│       │   │   ├── linux-libnuma.h
│       │   │   ├── linux.h
│       │   │   ├── myriexpress.h
│       │   │   ├── nvml.h
│       │   │   ├── opencl.h
│       │   │   ├── openfabrics-verbs.h
│       │   │   ├── plugins.h
│       │   │   └── rename.h
│       │   └── hwloc.h
│       └── lib/
│           ├── LICENSE
│           └── libhwloc.so.5
├── runtime/
│   ├── cmake_modules/
│   │   ├── COPYING-CMAKE-SCRIPTS
│   │   └── FindLibElf.cmake
│   ├── docs/
│   │   ├── api-reference/
│   │   │   ├── api.rst
│   │   │   ├── c-interface-adaptors.rst
│   │   │   └── environment_variables.rst
│   │   ├── conf.py
│   │   ├── contribution/
│   │   │   └── contributing-to-rocr.rst
│   │   ├── data/
│   │   │   └── env_variables.rst
│   │   ├── index.rst
│   │   ├── install/
│   │   │   └── installation.rst
│   │   ├── license.rst
│   │   ├── sphinx/
│   │   │   ├── _toc.yml.in
│   │   │   ├── requirements.in
│   │   │   └── requirements.txt
│   │   └── what-is-rocr-runtime.rst
│   ├── hsa-ext-finalize/
│   │   └── CMakeLists.txt
│   ├── hsa-ext-image/
│   │   └── CMakeLists.txt
│   ├── hsa-runtime/
│   │   ├── CMakeLists.txt
│   │   ├── LICENSE.md
│   │   ├── cmake_modules/
│   │   │   ├── COPYING-CMAKE-SCRIPTS
│   │   │   ├── FindLibElf.cmake
│   │   │   ├── hsa_common.cmake
│   │   │   └── utils.cmake
│   │   ├── core/
│   │   │   ├── common/
│   │   │   │   ├── hsa_table_interface.cpp
│   │   │   │   └── shared.h
│   │   │   ├── driver/
│   │   │   │   ├── driver.cpp
│   │   │   │   ├── kfd/
│   │   │   │   │   └── amd_kfd_driver.cpp
│   │   │   │   ├── virtio/
│   │   │   │   │   └── amd_kfd_virtio_driver.cpp
│   │   │   │   └── xdna/
│   │   │   │       ├── amd_xdna_driver.cpp
│   │   │   │       └── uapi/
│   │   │   │           └── amdxdna_accel.h
│   │   │   ├── inc/
│   │   │   │   ├── agent.h
│   │   │   │   ├── amd_aie_agent.h
│   │   │   │   ├── amd_aie_aql_queue.h
│   │   │   │   ├── amd_aql_queue.h
│   │   │   │   ├── amd_available_drivers.h
│   │   │   │   ├── amd_blit_kernel.h
│   │   │   │   ├── amd_blit_sdma.h
│   │   │   │   ├── amd_blit_shaders.h
│   │   │   │   ├── amd_core_dump.hpp
│   │   │   │   ├── amd_cpu_agent.h
│   │   │   │   ├── amd_elf_image.hpp
│   │   │   │   ├── amd_filter_device.h
│   │   │   │   ├── amd_gpu_agent.h
│   │   │   │   ├── amd_gpu_pm4.h
│   │   │   │   ├── amd_hsa_code.hpp
│   │   │   │   ├── amd_hsa_loader.hpp
│   │   │   │   ├── amd_kfd_driver.h
│   │   │   │   ├── amd_loader_context.hpp
│   │   │   │   ├── amd_memory_region.h
│   │   │   │   ├── amd_topology.h
│   │   │   │   ├── amd_trap_handler_v1.h
│   │   │   │   ├── amd_virtio_driver.h
│   │   │   │   ├── amd_xdna_driver.h
│   │   │   │   ├── blit.h
│   │   │   │   ├── cache.h
│   │   │   │   ├── checked.h
│   │   │   │   ├── default_signal.h
│   │   │   │   ├── driver.h
│   │   │   │   ├── exceptions.h
│   │   │   │   ├── host_queue.h
│   │   │   │   ├── hsa_amd_tool_int.hpp
│   │   │   │   ├── hsa_api_trace_int.h
│   │   │   │   ├── hsa_ext_amd_impl.h
│   │   │   │   ├── hsa_ext_interface.h
│   │   │   │   ├── hsa_internal.h
│   │   │   │   ├── hsa_table_interface.h
│   │   │   │   ├── hsa_ven_amd_loader_impl.h
│   │   │   │   ├── intercept_queue.h
│   │   │   │   ├── interrupt_signal.h
│   │   │   │   ├── ipc_signal.h
│   │   │   │   ├── isa.h
│   │   │   │   ├── memory_region.h
│   │   │   │   ├── queue.h
│   │   │   │   ├── registers.h
│   │   │   │   ├── runtime.h
│   │   │   │   ├── scratch_cache.h
│   │   │   │   ├── sdma_registers.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── svm_profiler.h
│   │   │   │   └── thunk_loader.h
│   │   │   ├── runtime/
│   │   │   │   ├── amd_aie_agent.cpp
│   │   │   │   ├── amd_aie_aql_queue.cpp
│   │   │   │   ├── amd_aql_queue.cpp
│   │   │   │   ├── amd_blit_kernel.cpp
│   │   │   │   ├── amd_blit_sdma.cpp
│   │   │   │   ├── amd_cpu_agent.cpp
│   │   │   │   ├── amd_filter_device.cpp
│   │   │   │   ├── amd_gpu_agent.cpp
│   │   │   │   ├── amd_hsa_loader.cpp
│   │   │   │   ├── amd_loader_context.cpp
│   │   │   │   ├── amd_memory_region.cpp
│   │   │   │   ├── amd_topology.cpp
│   │   │   │   ├── blit_shaders/
│   │   │   │   │   ├── CMakeLists.txt
│   │   │   │   │   ├── blit_copyAligned.s
│   │   │   │   │   ├── blit_copyMisaligned.s
│   │   │   │   │   ├── blit_fill.s
│   │   │   │   │   └── create_blit_shader_header.sh
│   │   │   │   ├── cache.cpp
│   │   │   │   ├── default_signal.cpp
│   │   │   │   ├── host_queue.cpp
│   │   │   │   ├── hsa.cpp
│   │   │   │   ├── hsa_api_trace.cpp
│   │   │   │   ├── hsa_ext_amd.cpp
│   │   │   │   ├── hsa_ext_interface.cpp
│   │   │   │   ├── hsa_ven_amd_loader.cpp
│   │   │   │   ├── intercept_queue.cpp
│   │   │   │   ├── interrupt_signal.cpp
│   │   │   │   ├── ipc_signal.cpp
│   │   │   │   ├── isa.cpp
│   │   │   │   ├── queue.cpp
│   │   │   │   ├── runtime.cpp
│   │   │   │   ├── signal.cpp
│   │   │   │   ├── svm_profiler.cpp
│   │   │   │   ├── thunk_loader.cpp
│   │   │   │   └── trap_handler/
│   │   │   │       ├── CMakeLists.txt
│   │   │   │       ├── create_trap_handler_header.sh
│   │   │   │       ├── trap_handler.s
│   │   │   │       └── trap_handler_gfx12.s
│   │   │   └── util/
│   │   │       ├── atomic_helpers.h
│   │   │       ├── flag.cpp
│   │   │       ├── flag.h
│   │   │       ├── lazy_ptr.h
│   │   │       ├── lnx/
│   │   │       │   └── os_linux.cpp
│   │   │       ├── locks.h
│   │   │       ├── memory.h
│   │   │       ├── os.h
│   │   │       ├── simple_heap.h
│   │   │       ├── small_heap.cpp
│   │   │       ├── small_heap.h
│   │   │       ├── timer.cpp
│   │   │       ├── timer.h
│   │   │       ├── utils.h
│   │   │       └── win/
│   │   │           └── os_win.cpp
│   │   ├── hsa-runtime64-config.cmake.in
│   │   ├── hsacore.so.def
│   │   ├── hsacore.so.link
│   │   ├── image/
│   │   │   ├── addrlib/
│   │   │   │   ├── inc/
│   │   │   │   │   ├── addrinterface.h
│   │   │   │   │   └── addrtypes.h
│   │   │   │   └── src/
│   │   │   │       ├── addrinterface.cpp
│   │   │   │       ├── amdgpu_asic_addr.h
│   │   │   │       ├── chip/
│   │   │   │       │   ├── gfx10/
│   │   │   │       │   │   └── gfx10_gb_reg.h
│   │   │   │       │   ├── gfx11/
│   │   │   │       │   │   └── gfx11_gb_reg.h
│   │   │   │       │   ├── gfx12/
│   │   │   │       │   │   └── gfx12_gb_reg.h
│   │   │   │       │   ├── gfx9/
│   │   │   │       │   │   └── gfx9_gb_reg.h
│   │   │   │       │   └── r800/
│   │   │   │       │       └── si_gb_reg.h
│   │   │   │       ├── core/
│   │   │   │       │   ├── addrcommon.h
│   │   │   │       │   ├── addrelemlib.cpp
│   │   │   │       │   ├── addrelemlib.h
│   │   │   │       │   ├── addrlib.cpp
│   │   │   │       │   ├── addrlib.h
│   │   │   │       │   ├── addrlib1.cpp
│   │   │   │       │   ├── addrlib1.h
│   │   │   │       │   ├── addrlib2.cpp
│   │   │   │       │   ├── addrlib2.h
│   │   │   │       │   ├── addrlib3.cpp
│   │   │   │       │   ├── addrlib3.h
│   │   │   │       │   ├── addrobject.cpp
│   │   │   │       │   ├── addrobject.h
│   │   │   │       │   ├── coord.cpp
│   │   │   │       │   └── coord.h
│   │   │   │       ├── gfx10/
│   │   │   │       │   ├── gfx10SwizzlePattern.h
│   │   │   │       │   ├── gfx10addrlib.cpp
│   │   │   │       │   └── gfx10addrlib.h
│   │   │   │       ├── gfx11/
│   │   │   │       │   ├── gfx11SwizzlePattern.h
│   │   │   │       │   ├── gfx11addrlib.cpp
│   │   │   │       │   └── gfx11addrlib.h
│   │   │   │       ├── gfx12/
│   │   │   │       │   ├── gfx12SwizzlePattern.h
│   │   │   │       │   ├── gfx12addrlib.cpp
│   │   │   │       │   └── gfx12addrlib.h
│   │   │   │       └── gfx9/
│   │   │   │           ├── gfx9addrlib.cpp
│   │   │   │           └── gfx9addrlib.h
│   │   │   ├── blit_kernel.cpp
│   │   │   ├── blit_kernel.h
│   │   │   ├── blit_object_gfx7xx.cpp
│   │   │   ├── blit_object_gfx8xx.cpp
│   │   │   ├── blit_object_gfx9xx.cpp
│   │   │   ├── blit_src/
│   │   │   │   ├── CMakeLists.txt
│   │   │   │   ├── README.md
│   │   │   │   ├── create_hsaco_ascii_file.sh
│   │   │   │   └── imageblit_kernels.cl
│   │   │   ├── device_info.cpp
│   │   │   ├── device_info.h
│   │   │   ├── hsa_ext_image.cpp
│   │   │   ├── image_lut.h
│   │   │   ├── image_lut_gfx11.cpp
│   │   │   ├── image_lut_gfx11.h
│   │   │   ├── image_lut_kv.cpp
│   │   │   ├── image_lut_kv.h
│   │   │   ├── image_manager.cpp
│   │   │   ├── image_manager.h
│   │   │   ├── image_manager_ai.cpp
│   │   │   ├── image_manager_ai.h
│   │   │   ├── image_manager_gfx11.cpp
│   │   │   ├── image_manager_gfx11.h
│   │   │   ├── image_manager_gfx12.cpp
│   │   │   ├── image_manager_gfx12.h
│   │   │   ├── image_manager_kv.cpp
│   │   │   ├── image_manager_kv.h
│   │   │   ├── image_manager_nv.cpp
│   │   │   ├── image_manager_nv.h
│   │   │   ├── image_runtime.cpp
│   │   │   ├── image_runtime.h
│   │   │   ├── inc/
│   │   │   │   └── hsa_ext_image_impl.h
│   │   │   ├── resource.h
│   │   │   ├── resource_ai.h
│   │   │   ├── resource_gfx11.h
│   │   │   ├── resource_gfx12.h
│   │   │   ├── resource_kv.h
│   │   │   ├── resource_nv.h
│   │   │   └── util.h
│   │   ├── inc/
│   │   │   ├── Brig.h
│   │   │   ├── amd_hsa_common.h
│   │   │   ├── amd_hsa_elf.h
│   │   │   ├── amd_hsa_kernel_code.h
│   │   │   ├── amd_hsa_queue.h
│   │   │   ├── amd_hsa_signal.h
│   │   │   ├── hsa.h
│   │   │   ├── hsa_amd_tool.h
│   │   │   ├── hsa_api_trace.h
│   │   │   ├── hsa_api_trace_version.h
│   │   │   ├── hsa_ext_amd.h
│   │   │   ├── hsa_ext_finalize.h
│   │   │   ├── hsa_ext_image.h
│   │   │   ├── hsa_ven_amd_aqlprofile.h
│   │   │   ├── hsa_ven_amd_loader.h
│   │   │   └── hsa_ven_amd_pc_sampling.h
│   │   ├── libamdhsacode/
│   │   │   ├── amd_core_dump.cpp
│   │   │   ├── amd_elf_image.cpp
│   │   │   ├── amd_hsa_code.cpp
│   │   │   ├── amd_hsa_code_util.cpp
│   │   │   ├── amd_hsa_code_util.hpp
│   │   │   ├── amd_hsa_locks.cpp
│   │   │   ├── amd_hsa_locks.hpp
│   │   │   ├── amd_options.cpp
│   │   │   └── amd_options.hpp
│   │   ├── loader/
│   │   │   ├── AMDHSAKernelDescriptor.h
│   │   │   ├── executable.cpp
│   │   │   └── executable.hpp
│   │   └── pcs/
│   │       ├── hsa_ven_amd_pc_sampling.cpp
│   │       ├── inc/
│   │       │   └── hsa_ven_amd_pc_sampling_impl.h
│   │       ├── pcs_runtime.cpp
│   │       └── pcs_runtime.h
│   ├── hsa-runtime-tools/
│   │   └── CMakeLists.txt
│   └── packages/
│       ├── hsa-ext-rocr-dev/
│       │   ├── CMakeLists.txt
│       │   ├── Old CMakeLists.txt
│       │   ├── copyright
│       │   ├── description
│       │   ├── postinst
│       │   ├── prerm
│       │   ├── rpm_post
│       │   └── rpm_postun
│       └── rocr_tools_legacy/
│           ├── CMakeLists.txt
│           ├── copyright
│           ├── description
│           ├── postinst
│           ├── prerm
│           ├── rpm_post
│           └── rpm_postun
└── samples/
    ├── GetInfo/
    │   ├── get_info.cpp
    │   └── get_info.h
    └── common/
        ├── common.cpp
        ├── common.hpp
        ├── common_utility.cpp
        ├── common_utility.h
        ├── helper_funcs.cpp
        ├── helper_funcs.hpp
        ├── hsa_base_util.cpp
        ├── hsa_base_util.h
        ├── hsa_perf_cntrs.cpp
        ├── hsa_perf_cntrs.hpp
        ├── hsa_rsrc_factory.cpp
        ├── hsa_rsrc_factory.hpp
        ├── hsa_test.cpp
        ├── hsa_test.h
        ├── hsatimer.cpp
        ├── hsatimer.h
        ├── os.cpp
        ├── os.h
        ├── utilities.cpp
        └── utilities.h
Download .txt
Showing preview only (1,148K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (6386 symbols across 471 files)

FILE: clang-format-diff.py
  function main (line 38) | def main():

FILE: libhsakmt/include/hsakmt/hsakmt.h
  type kfd_ioctl_dbg_trap_args (line 838) | struct kfd_ioctl_dbg_trap_args

FILE: libhsakmt/include/hsakmt/hsakmtmodeliface.h
  type hsakmt_model_t (line 36) | typedef struct hsakmt_model hsakmt_model_t;
  type hsakmt_model_queue_t (line 37) | typedef struct hsakmt_model_queue hsakmt_model_queue_t;
  type hsakmt_model_queue_info (line 42) | struct hsakmt_model_queue_info {
  type hsakmt_model_functions (line 69) | struct hsakmt_model_functions {
  type hsakmt_model_functions (line 107) | struct hsakmt_model_functions

FILE: libhsakmt/include/hsakmt/hsakmttypes.h
  type HSAuint8 (line 46) | typedef unsigned char      HSAuint8;
  type HSAint8 (line 47) | typedef char               HSAint8;
  type HSAuint16 (line 48) | typedef unsigned short     HSAuint16;
  type HSAint16 (line 49) | typedef signed short       HSAint16;
  type HSAuint32 (line 50) | typedef unsigned __int32   HSAuint32;
  type HSAint32 (line 51) | typedef signed __int32     HSAint32;
  type HSAint64 (line 52) | typedef signed __int64     HSAint64;
  type HSAuint64 (line 53) | typedef unsigned __int64   HSAuint64;
  type HSAuint8 (line 62) | typedef uint8_t     HSAuint8;
  type HSAint8 (line 63) | typedef int8_t      HSAint8;
  type HSAuint16 (line 64) | typedef uint16_t	HSAuint16;
  type HSAint16 (line 65) | typedef int16_t	HSAint16;
  type HSAuint32 (line 66) | typedef uint32_t	HSAuint32;
  type HSAint32 (line 67) | typedef int32_t 	HSAint32;
  type HSAint64 (line 68) | typedef int64_t	HSAint64;
  type HSAuint64 (line 69) | typedef uint64_t	HSAuint64;
  type HSAuint64 (line 74) | typedef HSAuint64          HSA_QUEUEID;
  type HSAKMT_STATUS (line 92) | typedef enum _HSAKMT_STATUS
  type HsaVersionInfo (line 132) | typedef struct _HsaVersionInfo
  type HsaSystemProperties (line 151) | typedef struct _HsaSystemProperties
  type HSA_ENGINE_ID (line 162) | typedef union
  type HSA_ENGINE_VERSION (line 174) | typedef union
  type HSA_CAPABILITY (line 185) | typedef union
  type HSA_CAPABILITY2 (line 225) | typedef union
  type HSA_DEBUG_PROPERTIES (line 237) | typedef union
  type HsaNodeProperties (line 273) | typedef struct _HsaNodeProperties
  type HSA_HEAPTYPE (line 354) | typedef enum _HSA_HEAPTYPE
  type HSA_MEMORYPROPERTY (line 371) | typedef union
  type HsaMemoryProperties (line 389) | typedef struct _HsaMemoryProperties
  type HsaCacheType (line 419) | typedef union
  type HsaCacheProperties (line 432) | typedef struct _HaCacheProperties
  type HsaCComputeProperties (line 453) | typedef struct _HsaCComputeProperties
  type HSA_IOLINKTYPE (line 464) | typedef enum _HSA_IOLINKTYPE {
  type HSA_LINKPROPERTY (line 486) | typedef union
  type HsaIoLinkProperties (line 504) | typedef struct _HsaIoLinkProperties
  type HsaMemFlags (line 528) | typedef struct _HsaMemFlags
  type HsaMemMapFlags (line 597) | typedef struct _HsaMemMapFlags
  type HsaGraphicsResourceInfo (line 626) | typedef struct _HsaGraphicsResourceInfo {
  type HSA_CACHING_TYPE (line 634) | typedef enum _HSA_CACHING_TYPE
  type HSA_PAGE_SIZE (line 644) | typedef enum _HSA_PAGE_SIZE
  type HSA_DEVICE (line 653) | typedef enum _HSA_DEVICE
  type HSA_QUEUE_PRIORITY (line 661) | typedef enum _HSA_QUEUE_PRIORITY
  type HSA_QUEUE_TYPE (line 674) | typedef enum _HSA_QUEUE_TYPE
  type HsaUserContextSaveAreaHeader (line 714) | typedef struct
  type HsaQueueInfo (line 741) | typedef struct
  type HsaQueueResource (line 760) | typedef struct _HsaQueueResource
  type HsaQueueReport (line 792) | typedef struct _HsaQueueReport
  type HSA_DBG_WAVEOP (line 801) | typedef enum _HSA_DBG_WAVEOP
  type HSA_DBG_WAVEMODE (line 812) | typedef enum _HSA_DBG_WAVEMODE
  type HSA_DBG_WAVEMSG_TYPE (line 823) | typedef enum _HSA_DBG_WAVEMSG_TYPE
  type HSA_DBG_WATCH_MODE (line 832) | typedef enum _HSA_DBG_WATCH_MODE
  type HSA_DBG_TRAP_OVERRIDE (line 841) | typedef enum _HSA_DBG_TRAP_OVERRIDE
  type HSA_DBG_TRAP_MASK (line 848) | typedef enum _HSA_DBG_TRAP_MASK
  type HSA_DBG_TRAP_EXCEPTION_CODE (line 861) | typedef enum _HSA_DBG_TRAP_EXCEPTION_CODE {
  type HSA_DBG_WAVE_LAUNCH_MODE (line 895) | typedef enum _HSA_DBG_WAVE_LAUNCH_MODE
  type HSA_DBG_NODE_CONTROL (line 914) | typedef enum HSA_DBG_NODE_CONTROL {
  type HsaDbgWaveMsgAMDGen2 (line 921) | typedef struct _HsaDbgWaveMsgAMDGen2
  type HsaDbgWaveMessageAMD (line 928) | typedef union _HsaDbgWaveMessageAMD
  type HsaDbgWaveMessage (line 934) | typedef struct _HsaDbgWaveMessage
  type HSA_EVENTTYPE (line 957) | typedef enum _HSA_EVENTTYPE
  type HSA_DEBUG_EVENT_TYPE (line 977) | typedef enum _HSA_DEBUG_EVENT_TYPE
  type HSAuint32 (line 985) | typedef HSAuint32  HSA_EVENTID;
  type HsaSyncVar (line 991) | typedef struct _HsaSyncVar
  type HSA_EVENTTYPE_NODECHANGE_FLAGS (line 1005) | typedef enum _HSA_EVENTTYPE_NODECHANGE_FLAGS
  type HsaNodeChange (line 1012) | typedef struct _HsaNodeChange
  type HSA_EVENTTYPE_DEVICESTATECHANGE_FLAGS (line 1021) | typedef enum _HSA_EVENTTYPE_DEVICESTATECHANGE_FLAGS
  type HsaDeviceStateChange (line 1028) | typedef struct _HsaDeviceStateChange
  type HSA_EVENTID_MEMORYFLAGS (line 1039) | typedef enum _HSA_EVENTID_MEMORYFLAGS
  type HsaAccessAttributeFailure (line 1046) | typedef struct _HsaAccessAttributeFailure
  type HsaMemoryAccessFault (line 1060) | typedef struct _HsaMemoryAccessFault
  type HSA_EVENTID_HW_EXCEPTION_CAUSE (line 1068) | typedef enum _HSA_EVENTID_HW_EXCEPTION_CAUSE
  type HsaHwException (line 1075) | typedef struct _HsaHwException
  type HsaEventData (line 1083) | typedef struct _HsaEventData
  type HsaEventDescriptor (line 1113) | typedef struct _HsaEventDescriptor
  type HsaEvent (line 1121) | typedef struct _HsaEvent
  type HsaEventTimeOut (line 1127) | typedef enum _HsaEventTimeout
  type HsaClockCounters (line 1133) | typedef struct _HsaClockCounters
  type HSA_UUID (line 1142) | typedef struct _HSA_UUID
  type HSA_PROFILE_TYPE (line 1272) | typedef enum _HSA_PROFILE_TYPE
  type HsaCounterFlags (line 1286) | typedef struct _HsaCounterFlags
  type HsaCounter (line 1307) | typedef struct _HsaCounter
  type HsaCounterBlockProperties (line 1319) | typedef struct _HsaCounterBlockProperties
  type HsaCounterProperties (line 1331) | typedef struct _HsaCounterProperties
  type HSAuint64 (line 1341) | typedef HSAuint64   HSATraceId;
  type HsaPmcTraceRoot (line 1343) | typedef struct _HsaPmcTraceRoot
  type HsaGpuTileConfig (line 1350) | typedef struct _HsaGpuTileConfig
  type HSA_POINTER_TYPE (line 1365) | typedef enum _HSA_POINTER_TYPE {
  type HsaPointerInfo (line 1375) | typedef struct _HsaPointerInfo {
  type HSAuint32 (line 1389) | typedef HSAuint32 HsaSharedMemoryHandle[8];
  type HsaMemoryRange (line 1391) | typedef struct _HsaMemoryRange {
  type HSA_SVM_FLAGS (line 1396) | typedef enum _HSA_SVM_FLAGS {
  type HSA_SVM_ATTR_TYPE (line 1407) | typedef enum _HSA_SVM_ATTR_TYPE {
  type HSA_SVM_ATTRIBUTE (line 1423) | typedef struct _HSA_SVM_ATTRIBUTE {
  type HSA_EVENT_TYPE (line 1428) | typedef enum _HSA_SMI_EVENT {
  type HSA_MIGRATE_TRIGGERS (line 1452) | typedef enum _HSA_MIGRATE_TRIGGERS {
  type HSA_QUEUE_EVICTION_TRIGGERS (line 1459) | typedef enum _HSA_QUEUE_EVICTION_TRIGGERS {
  type HSA_SVM_UNMAP_TRIGGERS (line 1468) | typedef enum _HSA_SVM_UNMAP_TRIGGERS {
  type HSAuint32 (line 1479) | typedef HSAuint32 HsaPcSamplingTraceId;
  type HSA_PC_SAMPLING_METHOD_KIND (line 1481) | typedef enum _HSA_PC_SAMPLING_METHOD_KIND
  type HSA_PC_SAMPLING_UNIT_INTERVAL (line 1487) | typedef enum _HSA_PC_SAMPLING_UNITS
  type HsaPcSamplingInfo (line 1494) | typedef struct _HsaPcSamplingInfo
  type HSA_REGISTER_MEM_FLAGS (line 1505) | typedef union

FILE: libhsakmt/include/hsakmt/linux/kfd_ioctl.h
  type kfd_ioctl_get_version_args (line 50) | struct kfd_ioctl_get_version_args {
  type kfd_ioctl_create_queue_args (line 65) | struct kfd_ioctl_create_queue_args {
  type kfd_ioctl_destroy_queue_args (line 87) | struct kfd_ioctl_destroy_queue_args {
  type kfd_ioctl_update_queue_args (line 92) | struct kfd_ioctl_update_queue_args {
  type kfd_ioctl_set_cu_mask_args (line 101) | struct kfd_ioctl_set_cu_mask_args {
  type kfd_ioctl_get_queue_wave_state_args (line 107) | struct kfd_ioctl_get_queue_wave_state_args {
  type kfd_queue_snapshot_entry (line 115) | struct kfd_queue_snapshot_entry {
  type kfd_dbg_device_info_entry (line 129) | struct kfd_dbg_device_info_entry {
  type kfd_ioctl_set_memory_policy_args (line 159) | struct kfd_ioctl_set_memory_policy_args {
  type kfd_ioctl_get_clock_counters_args (line 176) | struct kfd_ioctl_get_clock_counters_args {
  type kfd_process_device_apertures (line 186) | struct kfd_process_device_apertures {
  type kfd_ioctl_get_process_apertures_args (line 203) | struct kfd_ioctl_get_process_apertures_args {
  type kfd_ioctl_get_process_apertures_new_args (line 212) | struct kfd_ioctl_get_process_apertures_new_args {
  type kfd_ioctl_dbg_register_args (line 229) | struct kfd_ioctl_dbg_register_args {
  type kfd_ioctl_dbg_unregister_args (line 234) | struct kfd_ioctl_dbg_unregister_args {
  type kfd_ioctl_dbg_address_watch_args (line 239) | struct kfd_ioctl_dbg_address_watch_args {
  type kfd_ioctl_dbg_wave_control_args (line 245) | struct kfd_ioctl_dbg_wave_control_args {
  type kfd_dbg_trap_override_mode (line 262) | enum kfd_dbg_trap_override_mode {
  type kfd_dbg_trap_mask (line 266) | enum kfd_dbg_trap_mask {
  type kfd_dbg_trap_wave_launch_mode (line 281) | enum kfd_dbg_trap_wave_launch_mode {
  type kfd_dbg_trap_address_watch_mode (line 288) | enum kfd_dbg_trap_address_watch_mode {
  type kfd_dbg_trap_flags (line 296) | enum kfd_dbg_trap_flags {
  type kfd_dbg_trap_exception_code (line 300) | enum kfd_dbg_trap_exception_code {
  type kfd_dbg_runtime_state (line 369) | enum kfd_dbg_runtime_state {
  type kfd_runtime_info (line 376) | struct kfd_runtime_info {
  type kfd_ioctl_runtime_enable_args (line 405) | struct kfd_ioctl_runtime_enable_args {
  type kfd_context_save_area_header (line 412) | struct kfd_context_save_area_header {
  type kfd_dbg_trap_operations (line 450) | enum kfd_dbg_trap_operations {
  type kfd_ioctl_dbg_trap_enable_args (line 491) | struct kfd_ioctl_dbg_trap_enable_args {
  type kfd_ioctl_dbg_trap_send_runtime_event_args (line 517) | struct kfd_ioctl_dbg_trap_send_runtime_event_args {
  type kfd_ioctl_dbg_trap_set_exceptions_enabled_args (line 534) | struct kfd_ioctl_dbg_trap_set_exceptions_enabled_args {
  type kfd_ioctl_dbg_trap_set_wave_launch_override_args (line 561) | struct kfd_ioctl_dbg_trap_set_wave_launch_override_args {
  type kfd_ioctl_dbg_trap_set_wave_launch_mode_args (line 579) | struct kfd_ioctl_dbg_trap_set_wave_launch_mode_args {
  type kfd_ioctl_dbg_trap_suspend_queues_args (line 614) | struct kfd_ioctl_dbg_trap_suspend_queues_args {
  type kfd_ioctl_dbg_trap_resume_queues_args (line 639) | struct kfd_ioctl_dbg_trap_resume_queues_args {
  type kfd_ioctl_dbg_trap_set_node_address_watch_args (line 663) | struct kfd_ioctl_dbg_trap_set_node_address_watch_args {
  type kfd_ioctl_dbg_trap_clear_node_address_watch_args (line 685) | struct kfd_ioctl_dbg_trap_clear_node_address_watch_args {
  type kfd_ioctl_dbg_trap_set_flags_args (line 702) | struct kfd_ioctl_dbg_trap_set_flags_args {
  type kfd_ioctl_dbg_trap_query_debug_event_args (line 730) | struct kfd_ioctl_dbg_trap_query_debug_event_args {
  type kfd_ioctl_dbg_trap_query_exception_info_args (line 757) | struct kfd_ioctl_dbg_trap_query_exception_info_args {
  type kfd_ioctl_dbg_trap_queue_snapshot_args (line 794) | struct kfd_ioctl_dbg_trap_queue_snapshot_args {
  type kfd_ioctl_dbg_trap_device_snapshot_args (line 830) | struct kfd_ioctl_dbg_trap_device_snapshot_args {
  type kfd_ioctl_dbg_trap_args (line 848) | struct kfd_ioctl_dbg_trap_args {
  type kfd_ioctl_create_event_args (line 901) | struct kfd_ioctl_create_event_args {
  type kfd_ioctl_destroy_event_args (line 912) | struct kfd_ioctl_destroy_event_args {
  type kfd_ioctl_set_event_args (line 917) | struct kfd_ioctl_set_event_args {
  type kfd_ioctl_reset_event_args (line 922) | struct kfd_ioctl_reset_event_args {
  type kfd_memory_exception_failure (line 927) | struct kfd_memory_exception_failure {
  type kfd_hsa_memory_exception_data (line 935) | struct kfd_hsa_memory_exception_data {
  type kfd_hsa_hw_exception_data (line 948) | struct kfd_hsa_hw_exception_data {
  type kfd_hsa_signal_event_data (line 956) | struct kfd_hsa_signal_event_data {
  type kfd_event_data (line 961) | struct kfd_event_data {
  type kfd_ioctl_wait_events_args (line 975) | struct kfd_ioctl_wait_events_args {
  type kfd_ioctl_set_scratch_backing_va_args (line 984) | struct kfd_ioctl_set_scratch_backing_va_args {
  type kfd_ioctl_get_tile_config_args (line 990) | struct kfd_ioctl_get_tile_config_args {
  type kfd_ioctl_set_trap_handler_args (line 1013) | struct kfd_ioctl_set_trap_handler_args {
  type kfd_ioctl_acquire_vm_args (line 1020) | struct kfd_ioctl_acquire_vm_args {
  type kfd_ioctl_alloc_memory_of_gpu_args (line 1054) | struct kfd_ioctl_alloc_memory_of_gpu_args {
  type kfd_ioctl_free_memory_of_gpu_args (line 1067) | struct kfd_ioctl_free_memory_of_gpu_args {
  type kfd_ioctl_get_available_memory_args (line 1075) | struct  kfd_ioctl_get_available_memory_args {
  type kfd_ioctl_map_memory_to_gpu_args (line 1096) | struct kfd_ioctl_map_memory_to_gpu_args {
  type kfd_ioctl_unmap_memory_from_gpu_args (line 1107) | struct kfd_ioctl_unmap_memory_from_gpu_args {
  type kfd_ioctl_alloc_queue_gws_args (line 1121) | struct kfd_ioctl_alloc_queue_gws_args {
  type kfd_ioctl_get_dmabuf_info_args (line 1128) | struct kfd_ioctl_get_dmabuf_info_args {
  type kfd_ioctl_import_dmabuf_args (line 1139) | struct kfd_ioctl_import_dmabuf_args {
  type kfd_ioctl_export_dmabuf_args (line 1146) | struct kfd_ioctl_export_dmabuf_args {
  type kfd_smi_event (line 1155) | enum kfd_smi_event {
  type kfd_ioctl_smi_events_args (line 1166) | struct kfd_ioctl_smi_events_args {
  type kfd_ioctl_spm_op (line 1178) | enum kfd_ioctl_spm_op {
  type kfd_ioctl_spm_args (line 1235) | struct kfd_ioctl_spm_args {
  type kfd_ioctl_spm_buffer_header (line 1253) | struct kfd_ioctl_spm_buffer_header {
  type kfd_criu_op (line 1278) | enum kfd_criu_op {
  type kfd_ioctl_criu_args (line 1303) | struct kfd_ioctl_criu_args {
  type kfd_criu_device_bucket (line 1315) | struct kfd_criu_device_bucket {
  type kfd_criu_bo_bucket (line 1322) | struct kfd_criu_bo_bucket {
  type kfd_mmio_remap (line 1337) | enum kfd_mmio_remap {
  type kfd_ioctl_ipc_export_handle_args (line 1342) | struct kfd_ioctl_ipc_export_handle_args {
  type kfd_ioctl_ipc_import_handle_args (line 1349) | struct kfd_ioctl_ipc_import_handle_args {
  type kfd_memory_range (line 1358) | struct kfd_memory_range {
  type kfd_ioctl_cross_memory_copy_args (line 1372) | struct kfd_ioctl_cross_memory_copy_args {
  type kfd_ioctl_svm_op (line 1412) | enum kfd_ioctl_svm_op {
  type kfd_ioctl_svm_location (line 1423) | enum kfd_ioctl_svm_location {
  type kfd_ioctl_svm_attr_type (line 1446) | enum kfd_ioctl_svm_attr_type {
  type kfd_ioctl_svm_attribute (line 1465) | struct kfd_ioctl_svm_attribute {
  type kfd_ioctl_svm_args (line 1508) | struct kfd_ioctl_svm_args {
  type kfd_ioctl_set_xnack_mode_args (line 1551) | struct kfd_ioctl_set_xnack_mode_args {
  type kfd_ioctl_pc_sample_op (line 1564) | enum kfd_ioctl_pc_sample_op {
  type kfd_ioctl_pc_sample_method (line 1575) | enum kfd_ioctl_pc_sample_method {
  type kfd_ioctl_pc_sample_type (line 1580) | enum kfd_ioctl_pc_sample_type {
  type kfd_pc_sample_info (line 1586) | struct kfd_pc_sample_info {
  type kfd_ioctl_pc_sample_args (line 1601) | struct kfd_ioctl_pc_sample_args {

FILE: libhsakmt/include/hsakmt/linux/udmabuf.h
  type udmabuf_create (line 15) | struct udmabuf_create {
  type udmabuf_create_item (line 22) | struct udmabuf_create_item {
  type udmabuf_create_list (line 29) | struct udmabuf_create_list {

FILE: libhsakmt/src/debug.c
  function HSAKMT_STATUS (line 36) | HSAKMT_STATUS hsakmt_init_device_debugging_memory(unsigned int NumNodes)
  function hsakmt_destroy_device_debugging_memory (line 50) | void hsakmt_destroy_device_debugging_memory(void)
  function hsakmt_debug_get_reg_status (line 58) | bool hsakmt_debug_get_reg_status(uint32_t node_id)
  function HSAKMT_STATUS (line 63) | HSAKMT_STATUS HSAKMTAPI hsaKmtDbgRegister(HSAuint32 NodeId)
  function HSAKMT_STATUS (line 91) | HSAKMT_STATUS HSAKMTAPI hsaKmtDbgUnregister(HSAuint32 NodeId)
  function HSAKMT_STATUS (line 116) | HSAKMT_STATUS HSAKMTAPI hsaKmtDbgWavefrontControl(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 181) | HSAKMT_STATUS HSAKMTAPI hsaKmtDbgAddressWatch(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 271) | HSAKMT_STATUS HSAKMTAPI hsaKmtCheckRuntimeDebugSupport(void) {
  function HSAKMT_STATUS (line 305) | HSAKMT_STATUS HSAKMTAPI hsaKmtRuntimeEnable(void *rDebug,
  function HSAKMT_STATUS (line 332) | HSAKMT_STATUS HSAKMTAPI hsaKmtRuntimeDisable(void)
  function HSAKMT_STATUS (line 349) | HSAKMT_STATUS HSAKMTAPI hsaKmtGetRuntimeCapabilities(HSAuint32 *caps_mask)
  function HSAKMT_STATUS (line 355) | static HSAKMT_STATUS dbg_trap_get_device_data(void *data,
  function HSAKMT_STATUS (line 373) | static HSAKMT_STATUS dbg_trap_get_queue_data(void *data,
  function HSAKMT_STATUS (line 401) | static HSAKMT_STATUS dbg_trap_suspend_queues(uint32_t *queue_ids,
  function HSAKMT_STATUS (line 423) | HSAKMT_STATUS HSAKMTAPI hsaKmtDbgEnable(void **runtime_info,
  function HSAKMT_STATUS (line 447) | HSAKMT_STATUS HSAKMTAPI hsaKmtDbgDisable(void)
  function HSAKMT_STATUS (line 463) | HSAKMT_STATUS HSAKMTAPI hsaKmtDbgGetDeviceData(void **data,
  function HSAKMT_STATUS (line 483) | HSAKMT_STATUS HSAKMTAPI hsaKmtDbgGetQueueData(void **data,
  function HSAKMT_STATUS (line 519) | HSAKMT_STATUS HSAKMTAPI hsaKmtDebugTrapIoctl(struct kfd_ioctl_dbg_trap_a...

FILE: libhsakmt/src/events.c
  function hsakmt_clear_events_page (line 40) | void hsakmt_clear_events_page(void)
  function IsSystemEventType (line 45) | static bool IsSystemEventType(HSA_EVENTTYPE type)
  function HSAKMT_STATUS (line 51) | HSAKMT_STATUS HSAKMTAPI hsaKmtCreateEvent(HsaEventDescriptor *EventDesc,
  function HSAKMT_STATUS (line 149) | HSAKMT_STATUS HSAKMTAPI hsaKmtDestroyEvent(HsaEvent *Event)
  function HSAKMT_STATUS (line 167) | HSAKMT_STATUS HSAKMTAPI hsaKmtSetEvent(HsaEvent *Event)
  function HSAKMT_STATUS (line 190) | HSAKMT_STATUS HSAKMTAPI hsaKmtResetEvent(HsaEvent *Event)
  function HSAKMT_STATUS (line 213) | HSAKMT_STATUS HSAKMTAPI hsaKmtQueryEventState(HsaEvent *Event)
  function HSAKMT_STATUS (line 223) | HSAKMT_STATUS HSAKMTAPI hsaKmtWaitOnEvent(HsaEvent *Event,
  function HSAKMT_STATUS (line 229) | HSAKMT_STATUS HSAKMTAPI hsaKmtWaitOnEvent_Ext(HsaEvent *Event,
  function HSAKMT_STATUS (line 238) | static HSAKMT_STATUS get_mem_info_svm_api(uint64_t address, uint32_t gpu...
  function analysis_memory_exception (line 315) | static void analysis_memory_exception(struct kfd_hsa_memory_exception_da...
  function HSAKMT_STATUS (line 381) | HSAKMT_STATUS HSAKMTAPI hsaKmtWaitOnMultipleEvents(HsaEvent *Events[],
  function HSAKMT_STATUS (line 389) | HSAKMT_STATUS HSAKMTAPI hsaKmtWaitOnMultipleEvents_Ext(HsaEvent *Events[],
  function HSAKMT_STATUS (line 467) | HSAKMT_STATUS HSAKMTAPI hsaKmtOpenSMI(HSAuint32 NodeId, int *fd)

FILE: libhsakmt/src/fmm.c
  type vm_object (line 91) | struct vm_object {
  type vm_object_t (line 128) | typedef struct vm_object vm_object_t;
  type vm_area (line 130) | struct vm_area {
  type vm_area_t (line 136) | typedef struct vm_area vm_area_t;
  type manageable_aperture_t (line 139) | typedef struct manageable_aperture manageable_aperture_t;
  type manageable_aperture_ops_t (line 144) | typedef struct {
  type manageable_aperture (line 177) | struct manageable_aperture {
  type aperture_t (line 190) | typedef struct {
  type gpu_mem_t (line 195) | typedef struct {
  type svm_aperture_type (line 215) | enum svm_aperture_type {
  type svm_t (line 222) | typedef struct {
  type HSA_APERTURE (line 285) | typedef enum _HSA_APERTURE {
  type HsaApertureInfo (line 294) | typedef struct _HsaApertureInfo {
  type HsaSharedMemoryStruct (line 299) | typedef struct _HsaSharedMemoryStruct {
  function HsaSharedMemoryStruct (line 306) | static inline const HsaSharedMemoryStruct *to_const_hsa_shared_memory_st...
  function HsaSharedMemoryStruct (line 312) | static inline HsaSharedMemoryStruct *to_hsa_shared_memory_struct(
  function HsaSharedMemoryHandle (line 318) | __attribute__((unused))
  function vm_area_t (line 331) | static vm_area_t *vm_create_and_init_area(void *start, void *end)
  function vm_object_t (line 349) | static vm_object_t *vm_create_and_init_object(void *start, uint64_t size,
  function vm_remove_area (line 389) | static void vm_remove_area(manageable_aperture_t *app, vm_area_t *area)
  function vm_remove_object (line 408) | static void vm_remove_object(manageable_aperture_t *app, vm_object_t *ob...
  function vm_add_area_after (line 432) | static void vm_add_area_after(vm_area_t *after_this, vm_area_t *new_area)
  function vm_split_area (line 444) | static void vm_split_area(manageable_aperture_t *app, vm_area_t *area,
  function vm_object_t (line 465) | static vm_object_t *vm_find_object_by_address_userptr(manageable_apertur...
  function vm_object_t (line 511) | static vm_object_t *vm_find_object_by_address_userptr_range(manageable_a...
  function vm_object_t (line 568) | static vm_object_t *vm_find_object_by_address(manageable_aperture_t *app,
  function vm_object_t (line 574) | static vm_object_t *vm_find_object_by_address_range(manageable_aperture_...
  function vm_object_t (line 580) | static vm_object_t *vm_find_object_by_userptr(manageable_aperture_t *app,
  function vm_object_t (line 586) | static vm_object_t *vm_find_object_by_userptr_range(manageable_aperture_...
  function vm_area_t (line 592) | static vm_area_t *vm_find(manageable_aperture_t *app, void *address)
  function aperture_is_valid (line 606) | static bool aperture_is_valid(void *app_base, void *app_limit)
  function vm_align_area_size (line 618) | static uint64_t vm_align_area_size(manageable_aperture_t *app, uint64_t ...
  function reserved_aperture_release (line 626) | static void reserved_aperture_release(manageable_aperture_t *app,
  function mmap_aperture_release (line 875) | static void mmap_aperture_release(manageable_aperture_t *aper,
  function aperture_release_area (line 903) | static void aperture_release_area(manageable_aperture_t *app, void *addr...
  function vm_object_t (line 910) | static vm_object_t *aperture_allocate_object(manageable_aperture_t *app,
  function gpu_mem_find_by_gpu_id (line 930) | static int32_t gpu_mem_find_by_gpu_id(uint32_t gpu_id)
  function gpu_mem_find_by_node_id (line 941) | static int32_t gpu_mem_find_by_node_id(uint32_t node_id)
  function manageable_aperture_t (line 952) | static manageable_aperture_t *fmm_get_aperture(HsaApertureInfo info)
  function gpu_mem_t (line 970) | static gpu_mem_t *fmm_is_scratch_aperture(const void *address)
  function manageable_aperture_t (line 986) | static manageable_aperture_t *fmm_find_aperture(const void *address,
  function HsaMemFlags (line 1048) | static HsaMemFlags fmm_translate_ioc_to_hsa_flags(uint32_t ioc_flags)
  function HSAKMT_STATUS (line 1063) | static HSAKMT_STATUS fmm_register_mem_svm_api(void *address,
  function HSAKMT_STATUS (line 1099) | static HSAKMT_STATUS fmm_map_mem_svm_api(void *address,
  function vm_object_t (line 1135) | static vm_object_t *fmm_allocate_memory_object(uint32_t gpu_id, void *mem,
  function aperture_print (line 1234) | static void aperture_print(aperture_t *app)
  function manageable_aperture_print (line 1240) | static void manageable_aperture_print(manageable_aperture_t *app)
  function hsakmt_fmm_print (line 1262) | void hsakmt_fmm_print(uint32_t gpu_id)
  function hsakmt_fmm_print (line 1286) | void hsakmt_fmm_print(uint32_t gpu_id)
  function vm_object_t (line 1302) | static vm_object_t *vm_find_object(const void *addr, uint64_t size,
  function HSAuint8 (line 1397) | static HSAuint8 fmm_check_user_memory(const void *addr, HSAuint64 size)
  function fmm_release_scratch (line 1413) | static void fmm_release_scratch(uint32_t gpu_id)
  function fmm_translate_hsa_to_ioc_flags (line 1460) | static uint32_t fmm_translate_hsa_to_ioc_flags(HsaMemFlags flags)
  type kfd_ioctl_set_scratch_backing_va_args (line 1478) | struct kfd_ioctl_set_scratch_backing_va_args
  type kfd_ioctl_import_dmabuf_args (line 1621) | struct kfd_ioctl_import_dmabuf_args
  type udmabuf_create (line 1624) | struct udmabuf_create
  function bind_mem_to_numa (line 1922) | static int bind_mem_to_numa(uint32_t numa_node_id, void *mem,
  function __fmm_release (line 2138) | static int __fmm_release(vm_object_t *object, manageable_aperture_t *ape...
  function HSAKMT_STATUS (line 2181) | HSAKMT_STATUS hsakmt_fmm_release(void *address)
  function fmm_set_memory_policy (line 2219) | static int fmm_set_memory_policy(uint32_t gpu_id, int default_policy, in...
  function get_vm_alignment (line 2235) | static uint32_t get_vm_alignment(uint32_t device_id)
  function HSAKMT_STATUS (line 2247) | static HSAKMT_STATUS get_process_apertures(
  type amdgpu_device (line 2289) | struct amdgpu_device
  function hsakmt_open_drm_render_device (line 2291) | int hsakmt_open_drm_render_device(int minor)
  function HSAKMT_STATUS (line 2347) | static HSAKMT_STATUS acquire_vm(uint32_t gpu_id, int fd)
  function HSAKMT_STATUS (line 2362) | static HSAKMT_STATUS init_mmap_apertures(HSAuint64 base, HSAuint64 limit,
  function HSAKMT_STATUS (line 2430) | static HSAKMT_STATUS init_svm_apertures(HSAuint64 base, HSAuint64 limit,
  function fmm_init_rbtree (line 2570) | static void fmm_init_rbtree(void)
  function release_mmio (line 2646) | static void release_mmio(void)
  function HSAKMT_STATUS (line 2659) | HSAKMT_STATUS hsakmt_fmm_get_amdgpu_device_handle(uint32_t node_id,
  function two_apertures_overlap (line 2681) | static bool two_apertures_overlap(void *start_1, void *limit_1, void *st...
  function init_mem_handle_aperture (line 2686) | static bool init_mem_handle_aperture(HSAuint32 align, HSAuint32 guard_pa...
  function HSAKMT_STATUS (line 2742) | HSAKMT_STATUS hsakmt_fmm_init_process_apertures(unsigned int NumNodes)
  function hsakmt_fmm_destroy_process_apertures (line 3090) | void hsakmt_fmm_destroy_process_apertures(void)
  function HSAKMT_STATUS (line 3109) | HSAKMT_STATUS hsakmt_fmm_get_aperture_base_and_limit(aperture_type_e ape...
  function id_in_array (line 3174) | static bool id_in_array(uint32_t id, uint32_t *ids_array,
  function remove_device_ids_from_mapped_array (line 3189) | static void remove_device_ids_from_mapped_array(vm_object_t *obj,
  function add_device_ids_to_mapped_array (line 3218) | static void add_device_ids_to_mapped_array(vm_object_t *obj,
  function HSAKMT_STATUS (line 3244) | static HSAKMT_STATUS _fmm_map_to_gpu(manageable_aperture_t *aperture,
  function HSAKMT_STATUS (line 3342) | static HSAKMT_STATUS _fmm_map_to_gpu_scratch(uint32_t gpu_id, manageable...
  function HSAKMT_STATUS (line 3392) | static HSAKMT_STATUS _fmm_map_to_gpu_userptr(void *addr, uint64_t size,
  function HSAKMT_STATUS (line 3432) | HSAKMT_STATUS hsakmt_fmm_map_to_gpu(void *address, uint64_t size, uint64...
  function print_device_id_array (line 3491) | static void print_device_id_array(uint32_t *device_id_array, uint32_t de...
  function _fmm_unmap_from_gpu (line 3503) | static int _fmm_unmap_from_gpu(manageable_aperture_t *aperture, void *ad...
  function _fmm_unmap_from_gpu_scratch (line 3577) | static int _fmm_unmap_from_gpu_scratch(uint32_t gpu_id,
  function hsakmt_fmm_unmap_from_gpu (line 3642) | int hsakmt_fmm_unmap_from_gpu(void *address)
  function hsakmt_fmm_get_handle (line 3674) | bool hsakmt_fmm_get_handle(void *address, uint64_t *handle)
  function HSAKMT_STATUS (line 3722) | static HSAKMT_STATUS fmm_register_user_memory(void *addr,
  function HSAKMT_STATUS (line 3787) | HSAKMT_STATUS hsakmt_fmm_register_memory(void *address, uint64_t size_in...
  function HSAKMT_STATUS (line 3878) | HSAKMT_STATUS hsakmt_fmm_register_graphics_handle(HSAuint64 GraphicsReso...
  function HSAKMT_STATUS (line 3995) | HSAKMT_STATUS hsakmt_fmm_export_dma_buf_fd(void *MemoryAddress,
  function HSAKMT_STATUS (line 4037) | HSAKMT_STATUS hsakmt_fmm_share_memory(void *MemoryAddress,
  function HSAKMT_STATUS (line 4092) | HSAKMT_STATUS hsakmt_fmm_register_shared_memory(const HsaSharedMemoryHan...
  function HSAKMT_STATUS (line 4196) | HSAKMT_STATUS hsakmt_fmm_deregister_memory(void *address)
  function HSAKMT_STATUS (line 4255) | HSAKMT_STATUS hsakmt_fmm_map_to_gpu_nodes(void *address, uint64_t size,
  function HSAKMT_STATUS (line 4370) | HSAKMT_STATUS hsakmt_fmm_get_mem_info(const void *address, HsaPointerInf...
  function HSAKMT_STATUS (line 4455) | HSAKMT_STATUS hsakmt_fmm_replace_asan_header_page(void* address)
  function HSAKMT_STATUS (line 4482) | HSAKMT_STATUS hsakmt_fmm_return_asan_header_page(void* address)
  function HSAKMT_STATUS (line 4512) | HSAKMT_STATUS hsakmt_fmm_set_mem_user_data(const void *mem, void *usr_data)
  function fmm_clear_aperture (line 4527) | static void fmm_clear_aperture(manageable_aperture_t *app)
  function hsakmt_fmm_clear_all_mem (line 4547) | void hsakmt_fmm_clear_all_mem(void)

FILE: libhsakmt/src/fmm.h
  type aperture_type_e (line 32) | typedef enum {
  type aperture_properties_t (line 42) | typedef struct {

FILE: libhsakmt/src/hsakmtmodel.c
  type model_node (line 47) | struct model_node
  type model_event (line 57) | struct model_event
  type model_mem_data (line 64) | struct model_mem_data
  type model_queue (line 74) | struct model_queue
  type model_event (line 87) | struct model_event
  type hsakmt_model_functions (line 90) | struct hsakmt_model_functions
  type model_node (line 93) | struct model_node
  type model_queue (line 94) | struct model_queue
  function HSAKMT_STATUS (line 96) | HSAKMT_STATUS HSAKMTAPI hsaKmtModelEnabled(bool* enable)
  function model_init_env_vars (line 102) | void model_init_env_vars(void)
  function allocate_from_memfd (line 186) | static uint64_t allocate_from_memfd(uint64_t size, uint64_t align)
  function get_sysfs_mem_bank_size (line 204) | static uint64_t get_sysfs_mem_bank_size(unsigned node_id, unsigned mem_id)
  function model_set_event (line 229) | static void model_set_event(void *data, unsigned event_id)
  function model_init (line 265) | void model_init(void)
  function model_set_mmio_page (line 333) | void model_set_mmio_page(void *ptr)
  function model_set_event_page (line 338) | void model_set_event_page(void *ptr, unsigned event_limit)
  function model_kfd_ioctl_locked (line 354) | static int model_kfd_ioctl_locked(unsigned long request, void *arg)
  function model_kfd_ioctl (line 811) | int model_kfd_ioctl(unsigned long request, void *arg)

FILE: libhsakmt/src/libhsakmt.c
  function hsakmt_ioctl (line 9) | int hsakmt_ioctl(int fd, unsigned long request, void *arg)

FILE: libhsakmt/src/libhsakmt.h
  type full_gfx_versions (line 141) | enum full_gfx_versions {
  type hsa_gfxip_table (line 176) | struct hsa_gfxip_table {

FILE: libhsakmt/src/memory.c
  function HSAKMT_STATUS (line 37) | HSAKMT_STATUS HSAKMTAPI hsaKmtSetMemoryPolicy(HSAuint32 Node,
  function HSAuint32 (line 94) | HSAuint32 hsakmt_PageSizeFromFlags(unsigned int pageSizeFlags)
  function HSAKMT_STATUS (line 107) | HSAKMT_STATUS HSAKMTAPI hsaKmtAllocMemory(HSAuint32 PreferredNode,
  function HSAKMT_STATUS (line 115) | HSAKMT_STATUS HSAKMTAPI hsaKmtAllocMemoryAlign(HSAuint32 PreferredNode,
  function HSAKMT_STATUS (line 221) | HSAKMT_STATUS HSAKMTAPI hsaKmtFreeMemory(void *MemoryAddress,
  function HSAKMT_STATUS (line 236) | HSAKMT_STATUS HSAKMTAPI hsaKmtAvailableMemory(HSAuint32 Node,
  function HSAKMT_STATUS (line 260) | HSAKMT_STATUS HSAKMTAPI hsaKmtRegisterMemory(void *MemoryAddress,
  function HSAKMT_STATUS (line 275) | HSAKMT_STATUS HSAKMTAPI hsaKmtRegisterMemoryToNodes(void *MemoryAddress,
  function HSAKMT_STATUS (line 306) | HSAKMT_STATUS HSAKMTAPI hsaKmtRegisterMemoryWithFlags(void *MemoryAddress,
  function HSAKMT_STATUS (line 333) | HSAKMT_STATUS HSAKMTAPI hsaKmtRegisterGraphicsHandleToNodes(HSAuint64 Gr...
  function HSAKMT_STATUS (line 349) | HSAKMT_STATUS HSAKMTAPI hsaKmtRegisterGraphicsHandleToNodesExt(HSAuint64...
  function HSAKMT_STATUS (line 377) | HSAKMT_STATUS HSAKMTAPI hsaKmtExportDMABufHandle(void *MemoryAddress,
  function HSAKMT_STATUS (line 391) | HSAKMT_STATUS HSAKMTAPI hsaKmtShareMemory(void *MemoryAddress,
  function HSAKMT_STATUS (line 405) | HSAKMT_STATUS HSAKMTAPI hsaKmtRegisterSharedHandle(const HsaSharedMemory...
  function HSAKMT_STATUS (line 420) | HSAKMT_STATUS HSAKMTAPI hsaKmtRegisterSharedHandleToNodes(const HsaShare...
  function HSAKMT_STATUS (line 459) | HSAKMT_STATUS HSAKMTAPI hsaKmtProcessVMRead(HSAuint32 Pid,
  function HSAKMT_STATUS (line 471) | HSAKMT_STATUS HSAKMTAPI hsaKmtProcessVMWrite(HSAuint32 Pid,
  function HSAKMT_STATUS (line 484) | HSAKMT_STATUS HSAKMTAPI hsaKmtDeregisterMemory(void *MemoryAddress)
  function HSAKMT_STATUS (line 493) | HSAKMT_STATUS HSAKMTAPI hsaKmtMapMemoryToGPU(void *MemoryAddress,
  function HSAKMT_STATUS (line 512) | HSAKMT_STATUS HSAKMTAPI hsaKmtMapMemoryToGPUNodes(void *MemoryAddress,
  function HSAKMT_STATUS (line 551) | HSAKMT_STATUS HSAKMTAPI hsaKmtUnmapMemoryToGPU(void *MemoryAddress)
  function HSAKMT_STATUS (line 569) | HSAKMT_STATUS HSAKMTAPI hsaKmtMapGraphicHandle(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 584) | HSAKMT_STATUS HSAKMTAPI hsaKmtUnmapGraphicHandle(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 593) | HSAKMT_STATUS HSAKMTAPI hsaKmtGetTileConfig(HSAuint32 NodeId, HsaGpuTile...
  function HSAKMT_STATUS (line 633) | HSAKMT_STATUS HSAKMTAPI hsaKmtQueryPointerInfo(const void *Pointer,
  function HSAKMT_STATUS (line 645) | HSAKMT_STATUS HSAKMTAPI hsaKmtSetMemoryUserData(const void *Pointer,
  function HSAKMT_STATUS (line 655) | HSAKMT_STATUS HSAKMTAPI hsaKmtReplaceAsanHeaderPage(void *addr)
  function HSAKMT_STATUS (line 667) | HSAKMT_STATUS HSAKMTAPI hsaKmtReturnAsanHeaderPage(void *addr)
  function HSAKMT_STATUS (line 679) | HSAKMT_STATUS HSAKMTAPI hsaKmtGetAMDGPUDeviceHandle( HSAuint32 NodeId,

FILE: libhsakmt/src/openclose.c
  function hsakmt_is_forked_child (line 59) | bool hsakmt_is_forked_child(void)
  function prepare_fork_handler (line 82) | static void prepare_fork_handler(void)
  function parent_fork_handler (line 86) | static void parent_fork_handler(void)
  function child_fork_handler (line 90) | static void child_fork_handler(void)
  function clear_after_fork (line 102) | static void clear_after_fork(void)
  function init_page_size (line 121) | static inline void init_page_size(void)
  function HSAKMT_STATUS (line 127) | static HSAKMT_STATUS init_vars_from_env(void)
  function HSAKMT_STATUS (line 153) | HSAKMT_STATUS HSAKMTAPI hsaKmtOpenKFD(void)
  function HSAKMT_STATUS (line 259) | HSAKMT_STATUS HSAKMTAPI hsaKmtCloseKFD(void)

FILE: libhsakmt/src/pc_sampling.c
  function HSAKMT_STATUS (line 35) | HSAKMT_STATUS HSAKMTAPI hsaKmtPcSamplingSupport(void)
  function HSAKMT_STATUS (line 43) | HSAKMT_STATUS HSAKMTAPI hsaKmtPcSamplingQueryCapabilities(HSAuint32 Node...
  function HSAKMT_STATUS (line 90) | HSAKMT_STATUS HSAKMTAPI hsaKmtPcSamplingCreate(HSAuint32 NodeId, HsaPcSa...
  function HSAKMT_STATUS (line 132) | HSAKMT_STATUS HSAKMTAPI hsaKmtPcSamplingDestroy(HSAuint32 NodeId, HsaPcS...
  function HSAKMT_STATUS (line 164) | HSAKMT_STATUS HSAKMTAPI hsaKmtPcSamplingStart(HSAuint32 NodeId, HsaPcSam...
  function HSAKMT_STATUS (line 203) | HSAKMT_STATUS HSAKMTAPI hsaKmtPcSamplingStop(HSAuint32 NodeId, HsaPcSamp...

FILE: libhsakmt/src/perfctr.c
  type perf_trace_state (line 45) | enum perf_trace_state {
  type perf_trace_block (line 50) | struct perf_trace_block {
  type perf_trace (line 57) | struct perf_trace {
  type perf_counts_values (line 67) | struct perf_counts_values {
  function readn (line 81) | static ssize_t readn(int fd, void *buf, size_t n)
  function HSAKMT_STATUS (line 102) | HSAKMT_STATUS hsakmt_init_counter_props(unsigned int NumNodes)
  function hsakmt_destroy_counter_props (line 115) | void hsakmt_destroy_counter_props(void)
  function blockid2uuid (line 131) | static int blockid2uuid(enum perf_block_id block_id, HSA_UUID *uuid)
  function HSAuint32 (line 214) | static HSAuint32 get_block_concurrent_limit(uint32_t node_id,
  function HSAKMT_STATUS (line 229) | static HSAKMT_STATUS perf_trace_ioctl(struct perf_trace_block *block,
  function HSAKMT_STATUS (line 244) | static HSAKMT_STATUS query_trace(int fd, uint64_t *buf)
  function HSAKMT_STATUS (line 257) | HSAKMT_STATUS HSAKMTAPI hsaKmtPmcGetCounterProperties(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 338) | HSAKMT_STATUS HSAKMTAPI hsaKmtPmcRegisterTrace(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 512) | HSAKMT_STATUS HSAKMTAPI hsaKmtPmcUnregisterTrace(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 547) | HSAKMT_STATUS HSAKMTAPI hsaKmtPmcAcquireTraceAccess(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 570) | HSAKMT_STATUS HSAKMTAPI hsaKmtPmcReleaseTraceAccess(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 590) | HSAKMT_STATUS HSAKMTAPI hsaKmtPmcStartTrace(HSATraceId TraceId,
  function HSAKMT_STATUS (line 633) | HSAKMT_STATUS HSAKMTAPI hsaKmtPmcQueryTrace(HSATraceId TraceId)
  function HSAKMT_STATUS (line 669) | HSAKMT_STATUS HSAKMTAPI hsaKmtPmcStopTrace(HSATraceId TraceId)

FILE: libhsakmt/src/pmc_table.c
  type perf_counter_block (line 968) | struct perf_counter_block
  type perf_counter_block (line 979) | struct perf_counter_block
  type perf_counter_block (line 1158) | struct perf_counter_block
  type perf_counter_block (line 1332) | struct perf_counter_block
  type perf_counter_block (line 1503) | struct perf_counter_block
  type perf_counter_block (line 1674) | struct perf_counter_block
  type perf_counter_block (line 1838) | struct perf_counter_block
  function HSAKMT_STATUS (line 1961) | HSAKMT_STATUS hsakmt_get_block_properties(uint32_t node_id,

FILE: libhsakmt/src/pmc_table.h
  type perf_block_id (line 31) | enum perf_block_id {
  type perf_counter_block (line 62) | struct perf_counter_block {
  type perf_block_id (line 71) | enum perf_block_id
  type perf_counter_block (line 72) | struct perf_counter_block

FILE: libhsakmt/src/queues.c
  type queue (line 54) | struct queue {
  type process_doorbells (line 76) | struct process_doorbells {
  type process_doorbells (line 84) | struct process_doorbells
  function hsakmt_get_vgpr_size_per_cu (line 86) | uint32_t hsakmt_get_vgpr_size_per_cu(uint32_t gfxv)
  function HSAKMT_STATUS (line 105) | HSAKMT_STATUS hsakmt_init_process_doorbells(unsigned int NumNodes)
  function get_doorbell_map_info (line 129) | static void get_doorbell_map_info(uint32_t node_id,
  function hsakmt_destroy_process_doorbells (line 147) | void hsakmt_destroy_process_doorbells(void)
  function hsakmt_clear_process_doorbells (line 173) | void hsakmt_clear_process_doorbells(void)
  function HSAKMT_STATUS (line 193) | static HSAKMT_STATUS map_doorbell_apu(HSAuint32 NodeId, HSAuint32 gpu_id,
  function HSAKMT_STATUS (line 209) | static HSAKMT_STATUS map_doorbell_dgpu(HSAuint32 NodeId, HSAuint32 gpu_id,
  function HSAKMT_STATUS (line 231) | static HSAKMT_STATUS map_doorbell(HSAuint32 NodeId, HSAuint32 gpu_id,
  function update_ctx_save_restore_size (line 282) | static bool update_ctx_save_restore_size(uint32_t nodeid, struct queue *q)
  function hsakmt_free_exec_aligned_memory_gpu (line 386) | void hsakmt_free_exec_aligned_memory_gpu(void *addr, uint32_t size, uint...
  function free_exec_aligned_memory (line 412) | static void free_exec_aligned_memory(void *addr, uint32_t size, uint32_t...
  function HSAKMT_STATUS (line 421) | static HSAKMT_STATUS register_svm_range(void *mem, uint32_t size,
  function free_queue (line 457) | static void free_queue(struct queue *q)
  function fill_cwsr_header (line 473) | static inline void fill_cwsr_header(struct queue *q, void *addr,
  function handle_concrete_asic (line 491) | static int handle_concrete_asic(struct queue *q,
  function HSAKMT_STATUS (line 594) | HSAKMT_STATUS HSAKMTAPI hsaKmtCreateQueue(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 611) | HSAKMT_STATUS HSAKMTAPI hsaKmtCreateQueueExt(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 753) | HSAKMT_STATUS HSAKMTAPI hsaKmtUpdateQueue(HSA_QUEUEID QueueId,
  function HSAKMT_STATUS (line 785) | HSAKMT_STATUS HSAKMTAPI hsaKmtDestroyQueue(HSA_QUEUEID QueueId)
  function HSAKMT_STATUS (line 808) | HSAKMT_STATUS HSAKMTAPI hsaKmtSetQueueCUMask(HSA_QUEUEID QueueId,
  function HSAKMT_STATUS (line 835) | HSAKMT_STATUS
  function HSAKMT_STATUS (line 874) | HSAKMT_STATUS HSAKMTAPI hsaKmtSetTrapHandler(HSAuint32 Node,
  type queue (line 912) | struct queue
  function HSAKMT_STATUS (line 924) | HSAKMT_STATUS

FILE: libhsakmt/src/rbtree.c
  function hsakmt_rbtree_insert_value (line 35) | static void
  function hsakmt_rbtree_insert (line 61) | void
  function hsakmt_rbtree_delete (line 133) | void
  function rbtree_left_rotate (line 288) | static inline void
  function rbtree_right_rotate (line 318) | static inline void
  function rbtree_node_t (line 348) | rbtree_node_t *
  function rbtree_node_t (line 376) | rbtree_node_t *

FILE: libhsakmt/src/rbtree.h
  type rbtree_node_t (line 43) | typedef struct rbtree_node_s rbtree_node_t;
  type rbtree_node_s (line 45) | struct rbtree_node_s {
  type rbtree_t (line 54) | typedef struct rbtree_s rbtree_t;
  type rbtree_s (line 56) | struct rbtree_s {
  function rbtree_node_t (line 82) | static inline rbtree_node_t *

FILE: libhsakmt/src/rbtree_amd.h
  type rbtree_key_t (line 29) | typedef struct rbtree_key_s rbtree_key_t;
  type rbtree_key_s (line 30) | struct rbtree_key_s {
  function rbtree_key_t (line 41) | static inline rbtree_key_t
  function rbtree_key_compare (line 50) | static inline int
  function rbtree_node_t (line 69) | static inline rbtree_node_t *
  function rbtree_node_t (line 81) | static inline rbtree_node_t *
  function rbtree_node_t (line 98) | static inline rbtree_node_t *
  function rbtree_node_t (line 113) | static inline rbtree_node_t *
  function rbtree_node_t (line 146) | static inline rbtree_node_t *

FILE: libhsakmt/src/spm.c
  function HSAKMT_STATUS (line 32) | HSAKMT_STATUS HSAKMTAPI hsaKmtSPMAcquire(HSAuint32 PreferredNode)
  function HSAKMT_STATUS (line 53) | HSAKMT_STATUS HSAKMTAPI hsaKmtSPMSetDestBuffer(HSAuint32 PreferredNode,
  function HSAKMT_STATUS (line 84) | HSAKMT_STATUS HSAKMTAPI hsaKmtSPMRelease(HSAuint32 PreferredNode)

FILE: libhsakmt/src/svm.c
  function HSAKMT_STATUS (line 39) | HSAKMT_STATUS HSAKMTAPI
  function HSAKMT_STATUS (line 106) | HSAKMT_STATUS HSAKMTAPI
  function HSAKMT_STATUS (line 189) | static HSAKMT_STATUS
  function HSAKMT_STATUS (line 216) | HSAKMT_STATUS HSAKMTAPI
  function HSAKMT_STATUS (line 222) | HSAKMT_STATUS HSAKMTAPI

FILE: libhsakmt/src/time.c
  function HSAKMT_STATUS (line 29) | HSAKMT_STATUS HSAKMTAPI hsaKmtGetClockCounters(HSAuint32 NodeId,

FILE: libhsakmt/src/topology.c
  type node_props_t (line 68) | typedef struct {
  type SUPPORTED_PROCESSOR_VENDORS (line 87) | enum SUPPORTED_PROCESSOR_VENDORS {
  type hsa_gfxip_table (line 102) | struct hsa_gfxip_table
  type proc_cpuinfo (line 312) | struct proc_cpuinfo {
  type cpu_cacheinfo_t (line 321) | typedef struct cpu_cacheinfo {
  function free_properties (line 328) | static void free_properties(node_props_t *props, int size)
  function num_subdirs (line 348) | static int num_subdirs(char *dirpath, char *prefix)
  function HSAKMT_STATUS (line 376) | static HSAKMT_STATUS fscanf_dec(char *file, uint32_t *num)
  function HSAKMT_STATUS (line 399) | static HSAKMT_STATUS fscanf_str(const char *file, char *str, size_t str_...
  function HSAKMT_STATUS (line 426) | static HSAKMT_STATUS fscanf_size(char *file, uint32_t *bytes)
  function cpumap_to_cpu_ci (line 468) | static void cpumap_to_cpu_ci(char *shared_cpu_map,
  function get_cpu_cache_info (line 510) | static int get_cpu_cache_info(const char *prefix, struct proc_cpuinfo *c...
  function HSAKMT_STATUS (line 591) | static HSAKMT_STATUS topology_sysfs_get_generation(uint32_t *gen)
  function HSAKMT_STATUS (line 613) | static HSAKMT_STATUS topology_sysfs_map_node_id(uint32_t node_id, uint32...
  function HSAKMT_STATUS (line 622) | static HSAKMT_STATUS topology_sysfs_get_gpu_id(uint32_t sysfs_node_id, u...
  function HSAKMT_STATUS (line 648) | static HSAKMT_STATUS topology_sysfs_check_node_supported(uint32_t sysfs_...
  function HSAKMT_STATUS (line 726) | HSAKMT_STATUS hsakmt_topology_sysfs_get_system_props(HsaSystemProperties...
  type hsa_gfxip_table (line 825) | struct hsa_gfxip_table
  type hsa_gfxip_table (line 832) | struct hsa_gfxip_table
  function hsakmt_topology_setup_is_dgpu_param (line 840) | void hsakmt_topology_setup_is_dgpu_param(HsaNodeProperties *props)
  function hsakmt_topology_is_svm_needed (line 847) | bool hsakmt_topology_is_svm_needed(HSA_ENGINE_ID EngineId)
  function HSAKMT_STATUS (line 858) | static HSAKMT_STATUS topology_get_cpu_model_name(HsaNodeProperties *props,
  function topology_search_processor_vendor (line 883) | static int topology_search_processor_vendor(const char *processor_name)
  function HSAKMT_STATUS (line 901) | static HSAKMT_STATUS topology_parse_cpuinfo(struct proc_cpuinfo *cpuinfo,
  function topology_get_node_props_from_drm (line 1032) | static int topology_get_node_props_from_drm(HsaNodeProperties *props)
  function HSAKMT_STATUS (line 1077) | static HSAKMT_STATUS topology_sysfs_get_node_props(uint32_t node_id,
  function HSAKMT_STATUS (line 1303) | static HSAKMT_STATUS topology_sysfs_get_mem_props(uint32_t node_id,
  function topology_destroy_temp_cpu_cache_list (line 1368) | static void topology_destroy_temp_cpu_cache_list(
  function topology_create_temp_cpu_cache_list (line 1394) | static int topology_create_temp_cpu_cache_list(int node,
  function HSAKMT_STATUS (line 1491) | static HSAKMT_STATUS topology_get_cpu_cache_props(int node,
  function HSAKMT_STATUS (line 1537) | static HSAKMT_STATUS topology_sysfs_get_cache_props(uint32_t node_id,
  function HSAKMT_STATUS (line 1615) | static HSAKMT_STATUS topology_map_sysfs_to_user_node_id(uint32_t sys_nod...
  function HSAKMT_STATUS (line 1634) | static HSAKMT_STATUS topology_sysfs_get_iolink_props(uint32_t node_id,
  function HsaIoLinkProperties (line 1734) | static HsaIoLinkProperties *topology_get_free_io_link_slot_for_node(uint...
  function HSAKMT_STATUS (line 1763) | static HSAKMT_STATUS topology_add_io_link_for_node(uint32_t node_from,
  function gpu_get_direct_link_cpu (line 1787) | static int32_t gpu_get_direct_link_cpu(uint32_t gpu_node, node_props_t *...
  function HSAKMT_STATUS (line 1809) | static HSAKMT_STATUS get_direct_iolink_info(uint32_t node1, uint32_t node2,
  function HSAKMT_STATUS (line 1831) | static HSAKMT_STATUS get_indirect_iolink_info(uint32_t node1, uint32_t n...
  function topology_create_indirect_gpu_links (line 1931) | static void topology_create_indirect_gpu_links(const HsaSystemProperties...
  function HSAKMT_STATUS (line 1958) | HSAKMT_STATUS topology_take_snapshot(void)
  function topology_drop_snapshot (line 2136) | void topology_drop_snapshot(void)
  function HSAKMT_STATUS (line 2157) | HSAKMT_STATUS hsakmt_validate_nodeid(uint32_t nodeid, uint32_t *gpu_id)
  function HSAKMT_STATUS (line 2167) | HSAKMT_STATUS hsakmt_gpuid_to_nodeid(uint32_t gpu_id, uint32_t *node_id)
  function HSAKMT_STATUS (line 2182) | HSAKMT_STATUS HSAKMTAPI hsaKmtAcquireSystemProperties(HsaSystemPropertie...
  function HSAKMT_STATUS (line 2232) | HSAKMT_STATUS HSAKMTAPI hsaKmtReleaseSystemProperties(void)
  function HSAKMT_STATUS (line 2245) | HSAKMT_STATUS hsakmt_topology_get_node_props(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 2255) | HSAKMT_STATUS HSAKMTAPI hsaKmtGetNodeProperties(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 2291) | HSAKMT_STATUS HSAKMTAPI hsaKmtGetNodeMemoryProperties(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 2375) | HSAKMT_STATUS HSAKMTAPI hsaKmtGetNodeCacheProperties(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 2412) | HSAKMT_STATUS hsakmt_topology_get_iolink_props(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 2425) | HSAKMT_STATUS HSAKMTAPI hsaKmtGetNodeIoLinkProperties(HSAuint32 NodeId,
  function hsakmt_get_gfxv_by_node_id (line 2457) | uint32_t hsakmt_get_gfxv_by_node_id(HSAuint32 node_id)
  function hsakmt_get_device_id_by_node_id (line 2462) | uint16_t hsakmt_get_device_id_by_node_id(HSAuint32 node_id)
  function hsakmt_prefer_ats (line 2470) | bool hsakmt_prefer_ats(HSAuint32 node_id)
  function hsakmt_get_device_id_by_gpu_id (line 2477) | uint16_t hsakmt_get_device_id_by_gpu_id(HSAuint32 gpu_id)
  function hsakmt_get_direct_link_cpu (line 2492) | uint32_t hsakmt_get_direct_link_cpu(uint32_t gpu_node)
  function HSAKMT_STATUS (line 2511) | HSAKMT_STATUS hsakmt_validate_nodeid_array(uint32_t **gpu_id_array,
  function hsakmt_get_num_sysfs_nodes (line 2535) | inline uint32_t hsakmt_get_num_sysfs_nodes(void)

FILE: libhsakmt/src/version.c
  function HSAKMT_STATUS (line 33) | HSAKMT_STATUS HSAKMTAPI hsaKmtGetVersion(HsaVersionInfo *VersionInfo)
  function HSAKMT_STATUS (line 42) | HSAKMT_STATUS hsakmt_init_kfd_version(void)

FILE: libhsakmt/src/virtio/hsakmt_virtio_amdgpu.c
  function vamdgpu_query_gpu_info (line 26) | int vamdgpu_query_gpu_info(amdgpu_device_handle handle, void* out) {
  function HSAKMT_STATUS (line 46) | HSAKMT_STATUS vhsaKmtGetAMDGPUDeviceHandle(HSAuint32 NodeId, HsaAMDGPUDe...

FILE: libhsakmt/src/virtio/hsakmt_virtio_device.c
  function vhsakmt_execbuf_cpu (line 27) | int vhsakmt_execbuf_cpu(vhsakmt_device_handle dev, struct vhsakmt_ccmd_r...
  type vhsakmt_ccmd_req (line 31) | struct vhsakmt_ccmd_req

FILE: libhsakmt/src/virtio/hsakmt_virtio_device.h
  type vhsakmt_device (line 58) | struct vhsakmt_device
  type vhsakmt_bo (line 59) | struct vhsakmt_bo
  type vhsakmt_device (line 61) | struct vhsakmt_device
  type vhsakmt_bo (line 62) | struct vhsakmt_bo
  type rbtree_node_t (line 63) | typedef rbtree_node_t* bo_entry;
  type vhsakmt_node (line 89) | struct vhsakmt_node {
  type vhsakmt_device (line 96) | struct vhsakmt_device {
  type vhsakmt_bo (line 115) | struct vhsakmt_bo {
  type vhsakmt_ccmd_req (line 179) | struct vhsakmt_ccmd_req
  type vhsakmt_ccmd_req (line 180) | struct vhsakmt_ccmd_req

FILE: libhsakmt/src/virtio/hsakmt_virtio_events.c
  function vhsakmt_event_res_id (line 30) | static inline int32_t vhsakmt_event_res_id(HsaEvent* h) { return ((vHsaE...
  function vhsakmt_bo_handle (line 32) | static inline vhsakmt_bo_handle vhsakmt_event_bo_handle(HsaEvent* h) {
  function vhsakmt_create_event_blob_bo (line 36) | static int vhsakmt_create_event_blob_bo(vhsakmt_device_handle dev, size_...
  function HSAKMT_STATUS (line 51) | HSAKMT_STATUS HSAKMTAPI vhsaKmtCreateEvent(HsaEventDescriptor* EventDesc...
  function HSAKMT_STATUS (line 97) | HSAKMT_STATUS HSAKMTAPI vhsaKmtDestroyEvent(HsaEvent* Event) {
  function HSAKMT_STATUS (line 111) | HSAKMT_STATUS HSAKMTAPI vhsaKmtSetEvent(HsaEvent* Event) {
  function HSAKMT_STATUS (line 131) | HSAKMT_STATUS HSAKMTAPI vhsaKmtResetEvent(HsaEvent* Event) {
  function HSAKMT_STATUS (line 151) | HSAKMT_STATUS HSAKMTAPI vhsaKmtQueryEventState(HsaEvent* Event) {
  function HSAKMT_STATUS (line 171) | HSAKMT_STATUS HSAKMTAPI vhsaKmtWaitOnMultipleEvents(HsaEvent* Events[], ...
  function HSAKMT_STATUS (line 176) | HSAKMT_STATUS HSAKMTAPI vhsaKmtWaitOnEvent(HsaEvent* Event, HSAuint32 Mi...
  function HSAKMT_STATUS (line 180) | HSAKMT_STATUS HSAKMTAPI vhsaKmtWaitOnEvent_Ext(HsaEvent* Event, HSAuint3...
  function HSAKMT_STATUS (line 185) | HSAKMT_STATUS HSAKMTAPI vhsaKmtWaitOnMultipleEvents_Ext(HsaEvent* Events...

FILE: libhsakmt/src/virtio/hsakmt_virtio_memory.c
  function vhsakmt_bo_handle (line 28) | vhsakmt_bo_handle vhsakmt_entry_to_bo_handle(bo_entry e) { return (vhsak...
  function bo_entry (line 29) | bo_entry vhsakmt_bo_handle_to_entry(vhsakmt_bo_handle bo) { return &bo->...
  function vhsakmt_is_mem_bo (line 30) | static inline bool vhsakmt_is_mem_bo(vhsakmt_bo_handle bo) { return (!bo...
  function vhsakmt_mappable (line 32) | static bool vhsakmt_mappable(HsaMemFlags flags) { return (!flags.ui32.Sc...
  function vhsakmt_bo_mappable (line 34) | static bool vhsakmt_bo_mappable(vhsakmt_bo_handle bo) { return vhsakmt_m...
  function vhsakmt_insert_bo (line 36) | void vhsakmt_insert_bo(vhsakmt_device_handle dev, vhsakmt_bo_handle bo, ...
  function vhsakmt_remove_entry (line 45) | static void vhsakmt_remove_entry(vhsakmt_device_handle dev, bo_entry ent...
  function vhsakmt_remove_bo (line 53) | void vhsakmt_remove_bo(vhsakmt_device_handle dev, vhsakmt_bo_handle bo) {
  function bo_entry (line 60) | static bo_entry vhsakmt_rbt_search(vhsakmt_device_handle dev, void* addr) {
  function bo_entry (line 76) | static bo_entry vhsakmt_find_entry_by_addr(vhsakmt_device_handle dev, vo...
  function vhsakmt_bo_handle (line 80) | vhsakmt_bo_handle vhsakmt_find_bo_by_addr(vhsakmt_device_handle dev, voi...
  function vhsakmt_bo_cpu_map (line 103) | int vhsakmt_bo_cpu_map(vhsakmt_bo_handle bo, void** cpu, void* fixed_cpu) {
  function vhsakmt_bo_cpu_unmap (line 124) | int vhsakmt_bo_cpu_unmap(vhsakmt_bo_handle bo) {
  function vhsakmt_destroy_handle (line 148) | static int vhsakmt_destroy_handle(vhsakmt_device_handle dev, vhsakmt_bo_...
  function vhsakmt_init_host_blob (line 155) | int vhsakmt_init_host_blob(vhsakmt_device_handle dev, size_t size, uint3...
  function vhsakmt_init_userptr_blob (line 192) | static int vhsakmt_init_userptr_blob(vhsakmt_device_handle dev, void* ad...
  function vhsakmt_create_mappable_blob_bo (line 229) | int vhsakmt_create_mappable_blob_bo(vhsakmt_device_handle dev, size_t si...
  function HSAKMT_STATUS (line 253) | HSAKMT_STATUS HSAKMTAPI vhsaKmtAllocMemory(HSAuint32 PreferredNode, HSAu...
  function vhsakmt_bo_free (line 308) | int vhsakmt_bo_free(vhsakmt_device_handle dev, vhsakmt_bo_handle bo) {
  function vhsakmt_remove_userptr_bo (line 339) | static void vhsakmt_remove_userptr_bo(vhsakmt_device_handle dev, vhsakmt...
  function HSAKMT_STATUS (line 344) | HSAKMT_STATUS HSAKMTAPI vhsaKmtFreeMemory(void* MemoryAddress, HSAuint64...
  function HSAKMT_STATUS (line 357) | HSAKMT_STATUS HSAKMTAPI vhsaKmtMapMemoryToGPUNodes(void* MemoryAddress, ...
  function HSAKMT_STATUS (line 405) | HSAKMT_STATUS HSAKMTAPI vhsaKmtUnmapMemoryToGPU(void* MemoryAddress) {
  function HSAKMT_STATUS (line 429) | HSAKMT_STATUS HSAKMTAPI vhsaKmtAvailableMemory(HSAuint32 Node, HSAuint64...
  function vhsakmt_create_scratch_map_memory (line 449) | static int vhsakmt_create_scratch_map_memory(vhsakmt_device_handle dev, ...
  function HSAKMT_STATUS (line 492) | HSAKMT_STATUS HSAKMTAPI vhsaKmtMapMemoryToGPU(void* MemoryAddress, HSAui...
  function vhsakmt_map_userptr (line 527) | static int vhsakmt_map_userptr(vhsakmt_device_handle dev, void* addr, si...
  function HSAKMT_STATUS (line 585) | HSAKMT_STATUS HSAKMTAPI vhsaKmtRegisterMemoryWithFlags(void* MemoryAddress,
  function vhsakmt_remove_clgl_bo (line 622) | static int vhsakmt_remove_clgl_bo(vhsakmt_device_handle dev, vhsakmt_bo_...
  function HSAKMT_STATUS (line 643) | HSAKMT_STATUS HSAKMTAPI vhsaKmtDeregisterMemory(void* MemoryAddress) {
  function HSAKMT_STATUS (line 663) | HSAKMT_STATUS HSAKMTAPI vhsaKmtQueryPointerInfo(const void* Pointer, Hsa...
  function HSAKMT_STATUS (line 705) | HSAKMT_STATUS HSAKMTAPI vhsaKmtGetTileConfig(HSAuint32 NodeId, HsaGpuTil...
  function vhsakmt_create_clgl_bo (line 736) | static int vhsakmt_create_clgl_bo(vhsakmt_device_handle dev, void* addr,...
  function vhsakmt_gfxhandle_to_resid (line 764) | static int vhsakmt_gfxhandle_to_resid(vhsakmt_device_handle dev, uint32_...
  function HSAKMT_STATUS (line 780) | HSAKMT_STATUS HSAKMTAPI vhsaKmtRegisterGraphicsHandleToNodes(

FILE: libhsakmt/src/virtio/hsakmt_virtio_openclose.c
  function vhsakmt_device_handle (line 29) | vhsakmt_device_handle vhsakmt_dev(void) { return dev_list; }
  function HSAKMT_STATUS (line 31) | static HSAKMT_STATUS vhsakmt_openKFD_cmd(vhsakmt_device_handle dev) {
  function vhsakmt_device_handle (line 70) | static vhsakmt_device_handle vhsakmt_device_init(void) {
  function HSAKMT_STATUS (line 105) | HSAKMT_STATUS HSAKMTAPI vhsaKmtOpenKFD(void) {
  function vhsakmt_device_destroy (line 116) | static void vhsakmt_device_destroy(struct vhsakmt_device* dev) {
  function HSAKMT_STATUS (line 126) | HSAKMT_STATUS HSAKMTAPI vhsaKmtCloseKFD(void) {

FILE: libhsakmt/src/virtio/hsakmt_virtio_proto.h
  type vhsakmt_ccmd (line 52) | enum vhsakmt_ccmd {
  type vHsaEvent (line 61) | typedef struct _vHsaEvent {
  function vhsakmt_event_shmem (line 68) | VHSAKMT_STATIC_ASSERT_SIZE(_vHsaEvent)
  type vhsakmt_ccmd_nop_req (line 83) | struct vhsakmt_ccmd_nop_req {
  type vhsakmt_ccmd_query_type (line 90) | enum vhsakmt_ccmd_query_type {
  type query_req_run_time_enable_args (line 112) | typedef struct _query_req_run_time_enable_args {
  type _query_req_node_mem_prop_args (line 120) | struct _query_req_node_mem_prop_args {
  type _query_req_node_cache_prop_args (line 126) | struct _query_req_node_cache_prop_args {
  type _query_req_node_io_link_args (line 134) | struct _query_req_node_io_link_args {
  type _query_tile_config (line 140) | struct _query_tile_config {
  type _query_open_kfd_args (line 147) | struct _query_open_kfd_args {
  type _query_open_kfd_rsp (line 152) | struct _query_open_kfd_rsp {
  type _query_nano_time_rsp (line 158) | struct _query_nano_time_rsp {
  function vhsakmt_ccmd_query_info_req (line 161) | VHSAKMT_STATIC_ASSERT_SIZE(_query_nano_time_rsp)
  type vhsakmt_ccmd_query_info_rsp (line 188) | struct vhsakmt_ccmd_query_info_rsp {
  type event_req_create_args (line 223) | typedef struct _event_req_create_args {
  type _event_req_wait_args (line 231) | struct _event_req_wait_args {
  type _event_req_wait_ext_args (line 238) | struct _event_req_wait_ext_args {
  type _event_req_wait_on_multi_args (line 246) | struct _event_req_wait_on_multi_args {
  type _event_req_wait_on_multi_ext_args (line 255) | struct _event_req_wait_on_multi_ext_args {
  type _event_set_trap_handler_args (line 265) | struct _event_set_trap_handler_args {
  function vhsakmt_ccmd_event_req (line 273) | VHSAKMT_STATIC_ASSERT_SIZE(_event_set_trap_handler_args)
  function VHSAKMT_DEFINE_CAST (line 294) | VHSAKMT_STATIC_ASSERT_SIZE(vhsakmt_ccmd_event_req)
  type memory_req_alloc_args (line 320) | typedef struct _memory_req_alloc_args {
  type _memory_req_free_args (line 328) | struct _memory_req_free_args {
  type _memory_req_map_to_GPU_nodes_args (line 334) | struct _memory_req_map_to_GPU_nodes_args {
  type _memory_map_mem_to_gpu_args (line 345) | struct _memory_map_mem_to_gpu_args {
  type _memory_reg_mem_with_flag (line 353) | struct _memory_reg_mem_with_flag {
  function vhsakmt_ccmd_memory_req (line 359) | VHSAKMT_STATIC_ASSERT_SIZE(_memory_reg_mem_with_flag)
  function VHSAKMT_DEFINE_CAST (line 377) | VHSAKMT_STATIC_ASSERT_SIZE(vhsakmt_ccmd_memory_req)
  function vhsakmt_ccmd_memory_rsp (line 385) | VHSAKMT_STATIC_ASSERT_SIZE(_vhsakmt_ccmd_memory_map_userptr_rsp)
  type vHsaQueueResource (line 408) | typedef struct _vHsaQueueResource {
  type _queue_req_create (line 419) | struct _queue_req_create {
  function vhsakmt_ccmd_queue_req (line 434) | VHSAKMT_STATIC_ASSERT_SIZE(_queue_req_create)
  function VHSAKMT_DEFINE_CAST (line 451) | VHSAKMT_STATIC_ASSERT_SIZE(vhsakmt_ccmd_queue_req)
  function vhsakmt_ccmd_gl_inter_type (line 460) | VHSAKMT_STATIC_ASSERT_SIZE(vhsakmt_ccmd_queue_rsp)
  type gl_inter_req_reg_ghd_to_nodes (line 469) | typedef struct _gl_inter_req_reg_ghd_to_nodes {
  function vhsakmt_ccmd_gl_inter_req (line 475) | VHSAKMT_STATIC_ASSERT_SIZE(_gl_inter_req_reg_ghd_to_nodes)
  function VHSAKMT_DEFINE_CAST (line 486) | VHSAKMT_STATIC_ASSERT_SIZE(vhsakmt_ccmd_gl_inter_req)

FILE: libhsakmt/src/virtio/hsakmt_virtio_queues.c
  function vhsakmt_doorbell_page_size (line 26) | static inline uint64_t vhsakmt_doorbell_page_size(void) { return 0x2000; }
  function vhsakmt_queue_page_size (line 27) | static inline uint64_t vhsakmt_queue_page_size(void) { return getpagesiz...
  function HSAKMT_STATUS (line 29) | HSAKMT_STATUS HSAKMTAPI vhsaKmtSetTrapHandler(HSAuint32 NodeId, void* Tr...
  function vhsakmt_find_aql_rw_bo (line 58) | static int vhsakmt_find_aql_rw_bo(vhsakmt_device_handle dev, uint64_t aq...
  function vhsakmt_create_doorbell_blob_bo (line 70) | static int vhsakmt_create_doorbell_blob_bo(vhsakmt_device_handle dev, ui...
  function vhsakmt_create_queue_rw_blob_bo (line 84) | static int vhsakmt_create_queue_rw_blob_bo(vhsakmt_device_handle dev, si...
  function vhsakmt_create_queue_blob_bo (line 95) | static int vhsakmt_create_queue_blob_bo(vhsakmt_device_handle dev, size_...
  function HSAKMT_STATUS (line 112) | HSAKMT_STATUS HSAKMTAPI vhsaKmtCreateQueueExt(HSAuint32 NodeId, HSA_QUEU...
  function HSAKMT_STATUS (line 228) | HSAKMT_STATUS HSAKMTAPI vhsaKmtCreateQueue(HSAuint32 NodeId, HSA_QUEUE_T...
  function HSAKMT_STATUS (line 236) | HSAKMT_STATUS HSAKMTAPI vhsaKmtDestroyQueue(HSA_QUEUEID QueueId) {

FILE: libhsakmt/src/virtio/hsakmt_virtio_topology.c
  function vhsakmt_set_sys_props (line 26) | static int vhsakmt_set_sys_props(vhsakmt_device_handle dev, HsaSystemPro...
  function vhsakmt_set_node_props (line 48) | static int vhsakmt_set_node_props(vhsakmt_device_handle dev, uint32_t node,
  function HSAKMT_STATUS (line 71) | HSAKMT_STATUS HSAKMTAPI vhsaKmtGetVersion(HsaVersionInfo* v) {
  function HSAKMT_STATUS (line 90) | HSAKMT_STATUS HSAKMTAPI vhsaKmtAcquireSystemProperties(HsaSystemProperti...
  function HSAKMT_STATUS (line 115) | HSAKMT_STATUS HSAKMTAPI vhsaKmtReleaseSystemProperties(void) {
  function HSAKMT_STATUS (line 139) | HSAKMT_STATUS HSAKMTAPI vhsaKmtGetNodeProperties(HSAuint32 NodeId,
  function HSAKMT_STATUS (line 166) | HSAKMT_STATUS HSAKMTAPI vhsaKmtGetXNACKMode(HSAint32* enable) {
  function HSAKMT_STATUS (line 187) | HSAKMT_STATUS HSAKMTAPI vhsaKmtRuntimeEnable(void* rDebug, bool setupTtm...
  function HSAKMT_STATUS (line 207) | HSAKMT_STATUS HSAKMTAPI vhsaKmtRuntimeDisable(void) {
  function HSAKMT_STATUS (line 226) | HSAKMT_STATUS HSAKMTAPI vhsaKmtGetNodeMemoryProperties(HSAuint32 NodeId,...
  function HSAKMT_STATUS (line 251) | HSAKMT_STATUS HSAKMTAPI vhsaKmtGetNodeCacheProperties(HSAuint32 NodeId, ...
  function HSAKMT_STATUS (line 278) | HSAKMT_STATUS HSAKMTAPI vhsaKmtGetNodeIoLinkProperties(HSAuint32 NodeId,...
  function HSAKMT_STATUS (line 303) | HSAKMT_STATUS HSAKMTAPI vhsaKmtGetClockCounters(HSAuint32 NodeId, HsaClo...
  function HSAKMT_STATUS (line 324) | HSAKMT_STATUS HSAKMTAPI vhsaKmtGetRuntimeCapabilities(HSAuint32* caps_ma...

FILE: libhsakmt/src/virtio/hsakmt_virtio_vm.c
  function vhsakmt_reserve_va (line 36) | int vhsakmt_reserve_va(uint64_t start, uint64_t size) {
  function vhsakmt_dereserve_va (line 49) | void vhsakmt_dereserve_va(uint64_t start, uint64_t size) { munmap((void*...
  function vhsakmt_set_scratch_area (line 51) | void vhsakmt_set_scratch_area(vhsakmt_device_handle dev, uint32_t node, ...
  function vhsakmt_is_scratch_mem (line 67) | bool vhsakmt_is_scratch_mem(vhsakmt_device_handle dev, void* addr) {
  function vhsakmt_set_vm_area (line 80) | void vhsakmt_set_vm_area(vhsakmt_device_handle dev, uint64_t start, uint...
  function vhsakmt_is_userptr (line 91) | bool vhsakmt_is_userptr(vhsakmt_device_handle dev, void* addr) {
  function vhsakmt_set_node_doorbell (line 95) | int vhsakmt_set_node_doorbell(vhsakmt_device_handle dev, uint32_t node, ...

FILE: libhsakmt/src/virtio/include/linux/virtgpu_drm.h
  type drm_virtgpu_map (line 61) | struct drm_virtgpu_map {
  type drm_virtgpu_execbuffer_syncobj (line 71) | struct drm_virtgpu_execbuffer_syncobj {
  type drm_virtgpu_execbuffer (line 78) | struct drm_virtgpu_execbuffer {
  type drm_virtgpu_getparam (line 102) | struct drm_virtgpu_getparam {
  type drm_virtgpu_resource_create (line 109) | struct drm_virtgpu_resource_create {
  type drm_virtgpu_resource_info (line 126) | struct drm_virtgpu_resource_info {
  type drm_virtgpu_3d_box (line 133) | struct drm_virtgpu_3d_box {
  type drm_virtgpu_3d_transfer_to_host (line 142) | struct drm_virtgpu_3d_transfer_to_host {
  type drm_virtgpu_3d_transfer_from_host (line 151) | struct drm_virtgpu_3d_transfer_from_host {
  type drm_virtgpu_3d_wait (line 161) | struct drm_virtgpu_3d_wait {
  type drm_virtgpu_get_caps (line 172) | struct drm_virtgpu_get_caps {
  type drm_virtgpu_resource_create_blob (line 180) | struct drm_virtgpu_resource_create_blob {
  type drm_virtgpu_context_set_param (line 212) | struct drm_virtgpu_context_set_param {
  type drm_virtgpu_context_init (line 217) | struct drm_virtgpu_context_init {

FILE: libhsakmt/src/virtio/virtio_gpu.c
  function set_context (line 35) | static int set_context(int fd) {
  function virtio_gpu_map_handle (line 48) | int virtio_gpu_map_handle(struct virtio_gpu_device* vgdev, uint32_t hand...
  function virtio_gpu_unmap (line 66) | void virtio_gpu_unmap(void* addr, uint64_t size) { munmap(addr, size); }
  function virtio_gpu_bo_close (line 68) | static void virtio_gpu_bo_close(struct virtio_gpu_device* vgdev, uint32_...
  function virtio_gpu_shmem_init (line 76) | static int virtio_gpu_shmem_init(struct virtio_gpu_device* vgdev, size_t...
  type virtio_gpu_device (line 102) | struct virtio_gpu_device
  type virtio_gpu_device (line 103) | struct virtio_gpu_device
  function virtio_gpu_close (line 133) | void virtio_gpu_close(struct virtio_gpu_device* vgdev) {
  type virtio_gpu_device (line 145) | struct virtio_gpu_device
  type virtio_gpu_ccmd_req (line 145) | struct virtio_gpu_ccmd_req
  type virtio_gpu_ccmd_rsp (line 161) | struct virtio_gpu_ccmd_rsp
  function virtio_gpu_execbuffer_locked (line 167) | static int virtio_gpu_execbuffer_locked(struct virtio_gpu_device* vgdev,...
  function virtio_gpu_flush_locked (line 197) | static int virtio_gpu_flush_locked(struct virtio_gpu_device* vgdev, int*...
  function virtio_gpu_add_cmd (line 212) | static int virtio_gpu_add_cmd(struct virtio_gpu_device* vgdev, struct vi...
  function fence_before (line 228) | static inline bool fence_before(uint32_t a, uint32_t b) { return (int32_...
  function virtio_gpu_seqno_sync (line 230) | static void virtio_gpu_seqno_sync(struct virtio_gpu_device* vgdev,
  function virtio_gpu_exec_cmd (line 235) | int virtio_gpu_exec_cmd(struct virtio_gpu_device* vgdev, struct virtio_g...
  function virtio_gpu_create_blob (line 261) | int virtio_gpu_create_blob(struct virtio_gpu_device* vgdev,
  function virtio_gpu_destroy_handle (line 266) | int virtio_gpu_destroy_handle(struct virtio_gpu_device* vgdev, uint32_t ...
  function virtio_gpu_res_id (line 274) | int virtio_gpu_res_id(struct virtio_gpu_device* vgdev, uint32_t handle, ...
  function virtio_gpu_get_capset (line 285) | static int virtio_gpu_get_capset(int fd, struct virgl_renderer_capset_hs...
  function virtio_gpu_kfd_open (line 298) | int virtio_gpu_kfd_open(void) {

FILE: libhsakmt/src/virtio/virtio_gpu.h
  type virgl_renderer_capset_hsakmt (line 49) | struct virgl_renderer_capset_hsakmt {
  type virtio_gpu_shmem_base (line 59) | struct virtio_gpu_shmem_base {
  type virtio_gpu_ccmd_req (line 64) | struct virtio_gpu_ccmd_req {
  type virtio_gpu_ccmd_rsp (line 71) | struct virtio_gpu_ccmd_rsp {
  type virtio_gpu_shmem (line 75) | struct virtio_gpu_shmem {
  type virtio_gpu_device (line 85) | struct virtio_gpu_device {
  type virtio_gpu_device (line 103) | struct virtio_gpu_device
  type virtio_gpu_device (line 104) | struct virtio_gpu_device
  type virtio_gpu_device (line 105) | struct virtio_gpu_device
  type virtio_gpu_ccmd_req (line 105) | struct virtio_gpu_ccmd_req
  type virtio_gpu_device (line 107) | struct virtio_gpu_device
  type virtio_gpu_ccmd_req (line 107) | struct virtio_gpu_ccmd_req
  type virtio_gpu_device (line 109) | struct virtio_gpu_device
  type virtio_gpu_device (line 112) | struct virtio_gpu_device
  type drm_virtgpu_resource_create_blob (line 113) | struct drm_virtgpu_resource_create_blob
  type virtio_gpu_device (line 114) | struct virtio_gpu_device
  type virtio_gpu_device (line 115) | struct virtio_gpu_device

FILE: libhsakmt/tests/kfdtest/gtest-1.6.0/gtest-all.cpp
  type testing (line 113) | namespace testing {
    function ScopedFakeTestPartResultReporter (line 124) | class GTEST_API_ ScopedFakeTestPartResultReporter
    function AssertionResult (line 2511) | AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
    type internal (line 6306) | namespace internal {
      function String (line 6353) | static String ExitSummary(int exit_code) {
      function ExitedUnsuccessfully (line 6379) | bool ExitedUnsuccessfully(int exit_status) {
      function String (line 6388) | static String DeathTestThreadWarning(size_t thread_count) {
      type DeathTestOutcome (line 6415) | enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }
      function DeathTestAbort (line 6422) | void DeathTestAbort(const String& message) {
      function String (line 6473) | String GetLastErrnoDescription() {
      function FailFromInternalError (line 6481) | static void FailFromInternalError(int fd) {
      class DeathTestImpl (line 6531) | class DeathTestImpl : public DeathTest {
        method DeathTestImpl (line 6533) | DeathTestImpl(const char* a_statement, const RE* a_regex)
        method RE (line 6549) | const RE* regex() const { return regex_; }
        method spawned (line 6550) | bool spawned() const { return spawned_; }
        method set_spawned (line 6551) | void set_spawned(bool is_spawned) { spawned_ = is_spawned; }
        method status (line 6552) | int status() const { return status_; }
        method set_status (line 6553) | void set_status(int a_status) { status_ = a_status; }
        method DeathTestOutcome (line 6554) | DeathTestOutcome outcome() const { return outcome_; }
        method set_outcome (line 6555) | void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outc...
        method read_fd (line 6556) | int read_fd() const { return read_fd_; }
        method set_read_fd (line 6557) | void set_read_fd(int fd) { read_fd_ = fd; }
        method write_fd (line 6558) | int write_fd() const { return write_fd_; }
        method set_write_fd (line 6559) | void set_write_fd(int fd) { write_fd_ = fd; }
      function FormatDeathTestOutput (line 6662) | static ::std::string FormatDeathTestOutput(const ::std::string& outp...
      class WindowsDeathTest (line 6777) | class WindowsDeathTest : public DeathTestImpl {
        method WindowsDeathTest (line 6779) | WindowsDeathTest(const char* a_statement,
      class ForkingDeathTest (line 6949) | class ForkingDeathTest : public DeathTestImpl {
        method set_child_pid (line 6957) | void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }
      class NoExecDeathTest (line 6986) | class NoExecDeathTest : public ForkingDeathTest {
        method NoExecDeathTest (line 6988) | NoExecDeathTest(const char* a_statement, const RE* a_regex) :
      class ExecDeathTest (line 7040) | class ExecDeathTest : public ForkingDeathTest {
        method ExecDeathTest (line 7042) | ExecDeathTest(const char* a_statement, const RE* a_regex,
      class Arguments (line 7054) | class Arguments {
        method Arguments (line 7056) | Arguments() {
        method AddArgument (line 7066) | void AddArgument(const char* argument) {
        method AddArguments (line 7071) | void AddArguments(const ::std::vector<Str>& arguments) {
      type ExecDeathTestArgs (line 7087) | struct ExecDeathTestArgs {
      function ExecDeathTestChildMain (line 7109) | static int ExecDeathTestChildMain(void* child_arg) {
      function StackLowerThanAddress (line 7149) | bool StackLowerThanAddress(const void* ptr) {
      function StackGrowsDown (line 7154) | bool StackGrowsDown() {
      function pid_t (line 7162) | static pid_t ExecDeathTestFork(char* const* argv, int close_fd) {
      function IsPathSeparator (line 7533) | static bool IsPathSeparator(char c) {
      function FilePath (line 7542) | FilePath FilePath::GetCurrentDir() {
      function FilePath (line 7560) | FilePath FilePath::RemoveExtension(const char* extension) const {
      function FilePath (line 7590) | FilePath FilePath::RemoveDirectoryName() const {
      function FilePath (line 7601) | FilePath FilePath::RemoveFileName() const {
      function FilePath (line 7618) | FilePath FilePath::MakeFileName(const FilePath& directory,
      function FilePath (line 7633) | FilePath FilePath::ConcatPaths(const FilePath& directory,
      function FilePath (line 7721) | FilePath FilePath::GenerateUniqueFileName(const FilePath& directory,
      function FilePath (line 7781) | FilePath FilePath::RemoveTrailingPathSeparator() const {
      function GetThreadCount (line 7900) | size_t GetThreadCount() {
      function GetThreadCount (line 7919) | size_t GetThreadCount() {
      function IsInSet (line 7994) | bool IsInSet(char ch, const char* str) {
      function IsAsciiDigit (line 8001) | bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
      function IsAsciiPunct (line 8002) | bool IsAsciiPunct(char ch) {
      function IsRepeat (line 8005) | bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); }
      function IsAsciiWhiteSpace (line 8006) | bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); }
      function IsAsciiWordChar (line 8007) | bool IsAsciiWordChar(char ch) {
      function IsValidEscape (line 8013) | bool IsValidEscape(char c) {
      function AtomMatchesChar (line 8019) | bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
      function String (line 8041) | String FormatRegexSyntaxError(const char* regex, int index) {
      function ValidateRegex (line 8048) | bool ValidateRegex(const char* regex) {
      function MatchRepetitionAndRegexAtHead (line 8111) | bool MatchRepetitionAndRegexAtHead(
      function MatchRegexAtHead (line 8138) | bool MatchRegexAtHead(const char* regex, const char* str) {
      function MatchRegexAnywhere (line 8174) | bool MatchRegexAnywhere(const char* regex, const char* str) {
      function FormatFileLocation (line 8247) | GTEST_API_ ::std::string FormatFileLocation(const char* file, int li...
      function FormatCompilerIndependentFileLocation (line 8265) | GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
      class CapturedStream (line 8304) | class CapturedStream {
        method CapturedStream (line 8307) | CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
        method String (line 8341) | String GetCapturedString() {
      function String (line 8378) | String CapturedStream::ReadEntireFile(FILE* file) {
      function CaptureStream (line 8408) | void CaptureStream(int fd, const char* stream_name, CapturedStream**...
      function String (line 8417) | String GetCapturedStream(CapturedStream** captured_stream) {
      function CaptureStdout (line 8427) | void CaptureStdout() {
      function CaptureStderr (line 8432) | void CaptureStderr() {
      function String (line 8437) | String GetCapturedStdout() { return GetCapturedStream(&g_captured_st...
      function String (line 8440) | String GetCapturedStderr() { return GetCapturedStream(&g_captured_st...
      type posix (line 8455) | namespace posix {
        function Abort (line 8456) | void Abort() {
      function String (line 8466) | static String FlagToEnvVar(const char* flag) {
      function ParseInt32 (line 8481) | bool ParseInt32(const Message& src_text, const char* str, Int32* val...
      function BoolFromGTestEnv (line 8523) | bool BoolFromGTestEnv(const char* flag, bool default_value) {
      function Int32 (line 8533) | Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) {
      type CharFormat (line 8692) | enum CharFormat {
      function IsPrintableAscii (line 8701) | inline bool IsPrintableAscii(wchar_t c) {
      function CharFormat (line 8710) | static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
      function CharFormat (line 8756) | static CharFormat PrintAsWideStringLiteralTo(wchar_t c, ostream* os) {
      function CharFormat (line 8771) | static CharFormat PrintAsNarrowStringLiteralTo(char c, ostream* os) {
      function PrintCharAndCodeTo (line 8780) | void PrintCharAndCodeTo(Char c, ostream* os) {
      function PrintTo (line 8805) | void PrintTo(unsigned char c, ::std::ostream* os) {
      function PrintTo (line 8808) | void PrintTo(signed char c, ::std::ostream* os) {
      function PrintTo (line 8814) | void PrintTo(wchar_t wc, ostream* os) {
      function PrintCharsAsStringTo (line 8821) | static void PrintCharsAsStringTo(const char* begin, size_t len, ostr...
      function UniversalPrintArray (line 8838) | void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
      function PrintWideCharsAsStringTo (line 8845) | static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len,
      function PrintTo (line 8863) | void PrintTo(const char* s, ostream* os) {
      function PrintTo (line 8880) | void PrintTo(const wchar_t* s, ostream* os) {
      function PrintStringTo (line 8892) | void PrintStringTo(const ::string& s, ostream* os) {
      function PrintStringTo (line 8897) | void PrintStringTo(const ::std::string& s, ostream* os) {
      function PrintWideStringTo (line 8903) | void PrintWideStringTo(const ::wstring& s, ostream* os) {
      function PrintWideStringTo (line 8909) | void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
    type internal (line 6347) | namespace internal {
      function String (line 6353) | static String ExitSummary(int exit_code) {
      function ExitedUnsuccessfully (line 6379) | bool ExitedUnsuccessfully(int exit_status) {
      function String (line 6388) | static String DeathTestThreadWarning(size_t thread_count) {
      type DeathTestOutcome (line 6415) | enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }
      function DeathTestAbort (line 6422) | void DeathTestAbort(const String& message) {
      function String (line 6473) | String GetLastErrnoDescription() {
      function FailFromInternalError (line 6481) | static void FailFromInternalError(int fd) {
      class DeathTestImpl (line 6531) | class DeathTestImpl : public DeathTest {
        method DeathTestImpl (line 6533) | DeathTestImpl(const char* a_statement, const RE* a_regex)
        method RE (line 6549) | const RE* regex() const { return regex_; }
        method spawned (line 6550) | bool spawned() const { return spawned_; }
        method set_spawned (line 6551) | void set_spawned(bool is_spawned) { spawned_ = is_spawned; }
        method status (line 6552) | int status() const { return status_; }
        method set_status (line 6553) | void set_status(int a_status) { status_ = a_status; }
        method DeathTestOutcome (line 6554) | DeathTestOutcome outcome() const { return outcome_; }
        method set_outcome (line 6555) | void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outc...
        method read_fd (line 6556) | int read_fd() const { return read_fd_; }
        method set_read_fd (line 6557) | void set_read_fd(int fd) { read_fd_ = fd; }
        method write_fd (line 6558) | int write_fd() const { return write_fd_; }
        method set_write_fd (line 6559) | void set_write_fd(int fd) { write_fd_ = fd; }
      function FormatDeathTestOutput (line 6662) | static ::std::string FormatDeathTestOutput(const ::std::string& outp...
      class WindowsDeathTest (line 6777) | class WindowsDeathTest : public DeathTestImpl {
        method WindowsDeathTest (line 6779) | WindowsDeathTest(const char* a_statement,
      class ForkingDeathTest (line 6949) | class ForkingDeathTest : public DeathTestImpl {
        method set_child_pid (line 6957) | void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }
      class NoExecDeathTest (line 6986) | class NoExecDeathTest : public ForkingDeathTest {
        method NoExecDeathTest (line 6988) | NoExecDeathTest(const char* a_statement, const RE* a_regex) :
      class ExecDeathTest (line 7040) | class ExecDeathTest : public ForkingDeathTest {
        method ExecDeathTest (line 7042) | ExecDeathTest(const char* a_statement, const RE* a_regex,
      class Arguments (line 7054) | class Arguments {
        method Arguments (line 7056) | Arguments() {
        method AddArgument (line 7066) | void AddArgument(const char* argument) {
        method AddArguments (line 7071) | void AddArguments(const ::std::vector<Str>& arguments) {
      type ExecDeathTestArgs (line 7087) | struct ExecDeathTestArgs {
      function ExecDeathTestChildMain (line 7109) | static int ExecDeathTestChildMain(void* child_arg) {
      function StackLowerThanAddress (line 7149) | bool StackLowerThanAddress(const void* ptr) {
      function StackGrowsDown (line 7154) | bool StackGrowsDown() {
      function pid_t (line 7162) | static pid_t ExecDeathTestFork(char* const* argv, int close_fd) {
      function IsPathSeparator (line 7533) | static bool IsPathSeparator(char c) {
      function FilePath (line 7542) | FilePath FilePath::GetCurrentDir() {
      function FilePath (line 7560) | FilePath FilePath::RemoveExtension(const char* extension) const {
      function FilePath (line 7590) | FilePath FilePath::RemoveDirectoryName() const {
      function FilePath (line 7601) | FilePath FilePath::RemoveFileName() const {
      function FilePath (line 7618) | FilePath FilePath::MakeFileName(const FilePath& directory,
      function FilePath (line 7633) | FilePath FilePath::ConcatPaths(const FilePath& directory,
      function FilePath (line 7721) | FilePath FilePath::GenerateUniqueFileName(const FilePath& directory,
      function FilePath (line 7781) | FilePath FilePath::RemoveTrailingPathSeparator() const {
      function GetThreadCount (line 7900) | size_t GetThreadCount() {
      function GetThreadCount (line 7919) | size_t GetThreadCount() {
      function IsInSet (line 7994) | bool IsInSet(char ch, const char* str) {
      function IsAsciiDigit (line 8001) | bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
      function IsAsciiPunct (line 8002) | bool IsAsciiPunct(char ch) {
      function IsRepeat (line 8005) | bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); }
      function IsAsciiWhiteSpace (line 8006) | bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); }
      function IsAsciiWordChar (line 8007) | bool IsAsciiWordChar(char ch) {
      function IsValidEscape (line 8013) | bool IsValidEscape(char c) {
      function AtomMatchesChar (line 8019) | bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
      function String (line 8041) | String FormatRegexSyntaxError(const char* regex, int index) {
      function ValidateRegex (line 8048) | bool ValidateRegex(const char* regex) {
      function MatchRepetitionAndRegexAtHead (line 8111) | bool MatchRepetitionAndRegexAtHead(
      function MatchRegexAtHead (line 8138) | bool MatchRegexAtHead(const char* regex, const char* str) {
      function MatchRegexAnywhere (line 8174) | bool MatchRegexAnywhere(const char* regex, const char* str) {
      function FormatFileLocation (line 8247) | GTEST_API_ ::std::string FormatFileLocation(const char* file, int li...
      function FormatCompilerIndependentFileLocation (line 8265) | GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
      class CapturedStream (line 8304) | class CapturedStream {
        method CapturedStream (line 8307) | CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
        method String (line 8341) | String GetCapturedString() {
      function String (line 8378) | String CapturedStream::ReadEntireFile(FILE* file) {
      function CaptureStream (line 8408) | void CaptureStream(int fd, const char* stream_name, CapturedStream**...
      function String (line 8417) | String GetCapturedStream(CapturedStream** captured_stream) {
      function CaptureStdout (line 8427) | void CaptureStdout() {
      function CaptureStderr (line 8432) | void CaptureStderr() {
      function String (line 8437) | String GetCapturedStdout() { return GetCapturedStream(&g_captured_st...
      function String (line 8440) | String GetCapturedStderr() { return GetCapturedStream(&g_captured_st...
      type posix (line 8455) | namespace posix {
        function Abort (line 8456) | void Abort() {
      function String (line 8466) | static String FlagToEnvVar(const char* flag) {
      function ParseInt32 (line 8481) | bool ParseInt32(const Message& src_text, const char* str, Int32* val...
      function BoolFromGTestEnv (line 8523) | bool BoolFromGTestEnv(const char* flag, bool default_value) {
      function Int32 (line 8533) | Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) {
      type CharFormat (line 8692) | enum CharFormat {
      function IsPrintableAscii (line 8701) | inline bool IsPrintableAscii(wchar_t c) {
      function CharFormat (line 8710) | static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
      function CharFormat (line 8756) | static CharFormat PrintAsWideStringLiteralTo(wchar_t c, ostream* os) {
      function CharFormat (line 8771) | static CharFormat PrintAsNarrowStringLiteralTo(char c, ostream* os) {
      function PrintCharAndCodeTo (line 8780) | void PrintCharAndCodeTo(Char c, ostream* os) {
      function PrintTo (line 8805) | void PrintTo(unsigned char c, ::std::ostream* os) {
      function PrintTo (line 8808) | void PrintTo(signed char c, ::std::ostream* os) {
      function PrintTo (line 8814) | void PrintTo(wchar_t wc, ostream* os) {
      function PrintCharsAsStringTo (line 8821) | static void PrintCharsAsStringTo(const char* begin, size_t len, ostr...
      function UniversalPrintArray (line 8838) | void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
      function PrintWideCharsAsStringTo (line 8845) | static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len,
      function PrintTo (line 8863) | void PrintTo(const char* s, ostream* os) {
      function PrintTo (line 8880) | void PrintTo(const wchar_t* s, ostream* os) {
      function PrintStringTo (line 8892) | void PrintStringTo(const ::string& s, ostream* os) {
      function PrintStringTo (line 8897) | void PrintStringTo(const ::std::string& s, ostream* os) {
      function PrintWideStringTo (line 8903) | void PrintWideStringTo(const ::wstring& s, ostream* os) {
      function PrintWideStringTo (line 8909) | void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
    function SplitString (line 7307) | static void SplitString(const ::std::string& str, char delimiter,
    function GetStatusFileDescriptor (line 7328) | int GetStatusFileDescriptor(unsigned int parent_process_id,
    function InternalRunDeathTestFlag (line 7393) | InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() {
    type internal (line 7505) | namespace internal {
      function String (line 6353) | static String ExitSummary(int exit_code) {
      function ExitedUnsuccessfully (line 6379) | bool ExitedUnsuccessfully(int exit_status) {
      function String (line 6388) | static String DeathTestThreadWarning(size_t thread_count) {
      type DeathTestOutcome (line 6415) | enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }
      function DeathTestAbort (line 6422) | void DeathTestAbort(const String& message) {
      function String (line 6473) | String GetLastErrnoDescription() {
      function FailFromInternalError (line 6481) | static void FailFromInternalError(int fd) {
      class DeathTestImpl (line 6531) | class DeathTestImpl : public DeathTest {
        method DeathTestImpl (line 6533) | DeathTestImpl(const char* a_statement, const RE* a_regex)
        method RE (line 6549) | const RE* regex() const { return regex_; }
        method spawned (line 6550) | bool spawned() const { return spawned_; }
        method set_spawned (line 6551) | void set_spawned(bool is_spawned) { spawned_ = is_spawned; }
        method status (line 6552) | int status() const { return status_; }
        method set_status (line 6553) | void set_status(int a_status) { status_ = a_status; }
        method DeathTestOutcome (line 6554) | DeathTestOutcome outcome() const { return outcome_; }
        method set_outcome (line 6555) | void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outc...
        method read_fd (line 6556) | int read_fd() const { return read_fd_; }
        method set_read_fd (line 6557) | void set_read_fd(int fd) { read_fd_ = fd; }
        method write_fd (line 6558) | int write_fd() const { return write_fd_; }
        method set_write_fd (line 6559) | void set_write_fd(int fd) { write_fd_ = fd; }
      function FormatDeathTestOutput (line 6662) | static ::std::string FormatDeathTestOutput(const ::std::string& outp...
      class WindowsDeathTest (line 6777) | class WindowsDeathTest : public DeathTestImpl {
        method WindowsDeathTest (line 6779) | WindowsDeathTest(const char* a_statement,
      class ForkingDeathTest (line 6949) | class ForkingDeathTest : public DeathTestImpl {
        method set_child_pid (line 6957) | void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }
      class NoExecDeathTest (line 6986) | class NoExecDeathTest : public ForkingDeathTest {
        method NoExecDeathTest (line 6988) | NoExecDeathTest(const char* a_statement, const RE* a_regex) :
      class ExecDeathTest (line 7040) | class ExecDeathTest : public ForkingDeathTest {
        method ExecDeathTest (line 7042) | ExecDeathTest(const char* a_statement, const RE* a_regex,
      class Arguments (line 7054) | class Arguments {
        method Arguments (line 7056) | Arguments() {
        method AddArgument (line 7066) | void AddArgument(const char* argument) {
        method AddArguments (line 7071) | void AddArguments(const ::std::vector<Str>& arguments) {
      type ExecDeathTestArgs (line 7087) | struct ExecDeathTestArgs {
      function ExecDeathTestChildMain (line 7109) | static int ExecDeathTestChildMain(void* child_arg) {
      function StackLowerThanAddress (line 7149) | bool StackLowerThanAddress(const void* ptr) {
      function StackGrowsDown (line 7154) | bool StackGrowsDown() {
      function pid_t (line 7162) | static pid_t ExecDeathTestFork(char* const* argv, int close_fd) {
      function IsPathSeparator (line 7533) | static bool IsPathSeparator(char c) {
      function FilePath (line 7542) | FilePath FilePath::GetCurrentDir() {
      function FilePath (line 7560) | FilePath FilePath::RemoveExtension(const char* extension) const {
      function FilePath (line 7590) | FilePath FilePath::RemoveDirectoryName() const {
      function FilePath (line 7601) | FilePath FilePath::RemoveFileName() const {
      function FilePath (line 7618) | FilePath FilePath::MakeFileName(const FilePath& directory,
      function FilePath (line 7633) | FilePath FilePath::ConcatPaths(const FilePath& directory,
      function FilePath (line 7721) | FilePath FilePath::GenerateUniqueFileName(const FilePath& directory,
      function FilePath (line 7781) | FilePath FilePath::RemoveTrailingPathSeparator() const {
      function GetThreadCount (line 7900) | size_t GetThreadCount() {
      function GetThreadCount (line 7919) | size_t GetThreadCount() {
      function IsInSet (line 7994) | bool IsInSet(char ch, const char* str) {
      function IsAsciiDigit (line 8001) | bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
      function IsAsciiPunct (line 8002) | bool IsAsciiPunct(char ch) {
      function IsRepeat (line 8005) | bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); }
      function IsAsciiWhiteSpace (line 8006) | bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); }
      function IsAsciiWordChar (line 8007) | bool IsAsciiWordChar(char ch) {
      function IsValidEscape (line 8013) | bool IsValidEscape(char c) {
      function AtomMatchesChar (line 8019) | bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
      function String (line 8041) | String FormatRegexSyntaxError(const char* regex, int index) {
      function ValidateRegex (line 8048) | bool ValidateRegex(const char* regex) {
      function MatchRepetitionAndRegexAtHead (line 8111) | bool MatchRepetitionAndRegexAtHead(
      function MatchRegexAtHead (line 8138) | bool MatchRegexAtHead(const char* regex, const char* str) {
      function MatchRegexAnywhere (line 8174) | bool MatchRegexAnywhere(const char* regex, const char* str) {
      function FormatFileLocation (line 8247) | GTEST_API_ ::std::string FormatFileLocation(const char* file, int li...
      function FormatCompilerIndependentFileLocation (line 8265) | GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
      class CapturedStream (line 8304) | class CapturedStream {
        method CapturedStream (line 8307) | CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
        method String (line 8341) | String GetCapturedString() {
      function String (line 8378) | String CapturedStream::ReadEntireFile(FILE* file) {
      function CaptureStream (line 8408) | void CaptureStream(int fd, const char* stream_name, CapturedStream**...
      function String (line 8417) | String GetCapturedStream(CapturedStream** captured_stream) {
      function CaptureStdout (line 8427) | void CaptureStdout() {
      function CaptureStderr (line 8432) | void CaptureStderr() {
      function String (line 8437) | String GetCapturedStdout() { return GetCapturedStream(&g_captured_st...
      function String (line 8440) | String GetCapturedStderr() { return GetCapturedStream(&g_captured_st...
      type posix (line 8455) | namespace posix {
        function Abort (line 8456) | void Abort() {
      function String (line 8466) | static String FlagToEnvVar(const char* flag) {
      function ParseInt32 (line 8481) | bool ParseInt32(const Message& src_text, const char* str, Int32* val...
      function BoolFromGTestEnv (line 8523) | bool BoolFromGTestEnv(const char* flag, bool default_value) {
      function Int32 (line 8533) | Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) {
      type CharFormat (line 8692) | enum CharFormat {
      function IsPrintableAscii (line 8701) | inline bool IsPrintableAscii(wchar_t c) {
      function CharFormat (line 8710) | static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
      function CharFormat (line 8756) | static CharFormat PrintAsWideStringLiteralTo(wchar_t c, ostream* os) {
      function CharFormat (line 8771) | static CharFormat PrintAsNarrowStringLiteralTo(char c, ostream* os) {
      function PrintCharAndCodeTo (line 8780) | void PrintCharAndCodeTo(Char c, ostream* os) {
      function PrintTo (line 8805) | void PrintTo(unsigned char c, ::std::ostream* os) {
      function PrintTo (line 8808) | void PrintTo(signed char c, ::std::ostream* os) {
      function PrintTo (line 8814) | void PrintTo(wchar_t wc, ostream* os) {
      function PrintCharsAsStringTo (line 8821) | static void PrintCharsAsStringTo(const char* begin, size_t len, ostr...
      function UniversalPrintArray (line 8838) | void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
      function PrintWideCharsAsStringTo (line 8845) | static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len,
      function PrintTo (line 8863) | void PrintTo(const char* s, ostream* os) {
      function PrintTo (line 8880) | void PrintTo(const wchar_t* s, ostream* os) {
      function PrintStringTo (line 8892) | void PrintStringTo(const ::string& s, ostream* os) {
      function PrintStringTo (line 8897) | void PrintStringTo(const ::std::string& s, ostream* os) {
      function PrintWideStringTo (line 8903) | void PrintWideStringTo(const ::wstring& s, ostream* os) {
      function PrintWideStringTo (line 8909) | void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
    type internal (line 7885) | namespace internal {
      function String (line 6353) | static String ExitSummary(int exit_code) {
      function ExitedUnsuccessfully (line 6379) | bool ExitedUnsuccessfully(int exit_status) {
      function String (line 6388) | static String DeathTestThreadWarning(size_t thread_count) {
      type DeathTestOutcome (line 6415) | enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }
      function DeathTestAbort (line 6422) | void DeathTestAbort(const String& message) {
      function String (line 6473) | String GetLastErrnoDescription() {
      function FailFromInternalError (line 6481) | static void FailFromInternalError(int fd) {
      class DeathTestImpl (line 6531) | class DeathTestImpl : public DeathTest {
        method DeathTestImpl (line 6533) | DeathTestImpl(const char* a_statement, const RE* a_regex)
        method RE (line 6549) | const RE* regex() const { return regex_; }
        method spawned (line 6550) | bool spawned() const { return spawned_; }
        method set_spawned (line 6551) | void set_spawned(bool is_spawned) { spawned_ = is_spawned; }
        method status (line 6552) | int status() const { return status_; }
        method set_status (line 6553) | void set_status(int a_status) { status_ = a_status; }
        method DeathTestOutcome (line 6554) | DeathTestOutcome outcome() const { return outcome_; }
        method set_outcome (line 6555) | void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outc...
        method read_fd (line 6556) | int read_fd() const { return read_fd_; }
        method set_read_fd (line 6557) | void set_read_fd(int fd) { read_fd_ = fd; }
        method write_fd (line 6558) | int write_fd() const { return write_fd_; }
        method set_write_fd (line 6559) | void set_write_fd(int fd) { write_fd_ = fd; }
      function FormatDeathTestOutput (line 6662) | static ::std::string FormatDeathTestOutput(const ::std::string& outp...
      class WindowsDeathTest (line 6777) | class WindowsDeathTest : public DeathTestImpl {
        method WindowsDeathTest (line 6779) | WindowsDeathTest(const char* a_statement,
      class ForkingDeathTest (line 6949) | class ForkingDeathTest : public DeathTestImpl {
        method set_child_pid (line 6957) | void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }
      class NoExecDeathTest (line 6986) | class NoExecDeathTest : public ForkingDeathTest {
        method NoExecDeathTest (line 6988) | NoExecDeathTest(const char* a_statement, const RE* a_regex) :
      class ExecDeathTest (line 7040) | class ExecDeathTest : public ForkingDeathTest {
        method ExecDeathTest (line 7042) | ExecDeathTest(const char* a_statement, const RE* a_regex,
      class Arguments (line 7054) | class Arguments {
        method Arguments (line 7056) | Arguments() {
        method AddArgument (line 7066) | void AddArgument(const char* argument) {
        method AddArguments (line 7071) | void AddArguments(const ::std::vector<Str>& arguments) {
      type ExecDeathTestArgs (line 7087) | struct ExecDeathTestArgs {
      function ExecDeathTestChildMain (line 7109) | static int ExecDeathTestChildMain(void* child_arg) {
      function StackLowerThanAddress (line 7149) | bool StackLowerThanAddress(const void* ptr) {
      function StackGrowsDown (line 7154) | bool StackGrowsDown() {
      function pid_t (line 7162) | static pid_t ExecDeathTestFork(char* const* argv, int close_fd) {
      function IsPathSeparator (line 7533) | static bool IsPathSeparator(char c) {
      function FilePath (line 7542) | FilePath FilePath::GetCurrentDir() {
      function FilePath (line 7560) | FilePath FilePath::RemoveExtension(const char* extension) const {
      function FilePath (line 7590) | FilePath FilePath::RemoveDirectoryName() const {
      function FilePath (line 7601) | FilePath FilePath::RemoveFileName() const {
      function FilePath (line 7618) | FilePath FilePath::MakeFileName(const FilePath& directory,
      function FilePath (line 7633) | FilePath FilePath::ConcatPaths(const FilePath& directory,
      function FilePath (line 7721) | FilePath FilePath::GenerateUniqueFileName(const FilePath& directory,
      function FilePath (line 7781) | FilePath FilePath::RemoveTrailingPathSeparator() const {
      function GetThreadCount (line 7900) | size_t GetThreadCount() {
      function GetThreadCount (line 7919) | size_t GetThreadCount() {
      function IsInSet (line 7994) | bool IsInSet(char ch, const char* str) {
      function IsAsciiDigit (line 8001) | bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
      function IsAsciiPunct (line 8002) | bool IsAsciiPunct(char ch) {
      function IsRepeat (line 8005) | bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); }
      function IsAsciiWhiteSpace (line 8006) | bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); }
      function IsAsciiWordChar (line 8007) | bool IsAsciiWordChar(char ch) {
      function IsValidEscape (line 8013) | bool IsValidEscape(char c) {
      function AtomMatchesChar (line 8019) | bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
      function String (line 8041) | String FormatRegexSyntaxError(const char* regex, int index) {
      function ValidateRegex (line 8048) | bool ValidateRegex(const char* regex) {
      function MatchRepetitionAndRegexAtHead (line 8111) | bool MatchRepetitionAndRegexAtHead(
      function MatchRegexAtHead (line 8138) | bool MatchRegexAtHead(const char* regex, const char* str) {
      function MatchRegexAnywhere (line 8174) | bool MatchRegexAnywhere(const char* regex, const char* str) {
      function FormatFileLocation (line 8247) | GTEST_API_ ::std::string FormatFileLocation(const char* file, int li...
      function FormatCompilerIndependentFileLocation (line 8265) | GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
      class CapturedStream (line 8304) | class CapturedStream {
        method CapturedStream (line 8307) | CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
        method String (line 8341) | String GetCapturedString() {
      function String (line 8378) | String CapturedStream::ReadEntireFile(FILE* file) {
      function CaptureStream (line 8408) | void CaptureStream(int fd, const char* stream_name, CapturedStream**...
      function String (line 8417) | String GetCapturedStream(CapturedStream** captured_stream) {
      function CaptureStdout (line 8427) | void CaptureStdout() {
      function CaptureStderr (line 8432) | void CaptureStderr() {
      function String (line 8437) | String GetCapturedStdout() { return GetCapturedStream(&g_captured_st...
      function String (line 8440) | String GetCapturedStderr() { return GetCapturedStream(&g_captured_st...
      type posix (line 8455) | namespace posix {
        function Abort (line 8456) | void Abort() {
      function String (line 8466) | static String FlagToEnvVar(const char* flag) {
      function ParseInt32 (line 8481) | bool ParseInt32(const Message& src_text, const char* str, Int32* val...
      function BoolFromGTestEnv (line 8523) | bool BoolFromGTestEnv(const char* flag, bool default_value) {
      function Int32 (line 8533) | Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) {
      type CharFormat (line 8692) | enum CharFormat {
      function IsPrintableAscii (line 8701) | inline bool IsPrintableAscii(wchar_t c) {
      function CharFormat (line 8710) | static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
      function CharFormat (line 8756) | static CharFormat PrintAsWideStringLiteralTo(wchar_t c, ostream* os) {
      function CharFormat (line 8771) | static CharFormat PrintAsNarrowStringLiteralTo(char c, ostream* os) {
      function PrintCharAndCodeTo (line 8780) | void PrintCharAndCodeTo(Char c, ostream* os) {
      function PrintTo (line 8805) | void PrintTo(unsigned char c, ::std::ostream* os) {
      function PrintTo (line 8808) | void PrintTo(signed char c, ::std::ostream* os) {
      function PrintTo (line 8814) | void PrintTo(wchar_t wc, ostream* os) {
      function PrintCharsAsStringTo (line 8821) | static void PrintCharsAsStringTo(const char* begin, size_t len, ostr...
      function UniversalPrintArray (line 8838) | void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
      function PrintWideCharsAsStringTo (line 8845) | static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len,
      function PrintTo (line 8863) | void PrintTo(const char* s, ostream* os) {
      function PrintTo (line 8880) | void PrintTo(const wchar_t* s, ostream* os) {
      function PrintStringTo (line 8892) | void PrintStringTo(const ::string& s, ostream* os) {
      function PrintStringTo (line 8897) | void PrintStringTo(const ::std::string& s, ostream* os) {
      function PrintWideStringTo (line 8903) | void PrintWideStringTo(const ::wstring& s, ostream* os) {
      function PrintWideStringTo (line 8909) | void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
    function PrintByteSegmentInObjectTo (line 8627) | void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t...
    function PrintBytesInObjectToImpl (line 8646) | void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t c...
    type internal2 (line 8671) | namespace internal2 {
      function PrintBytesInObjectTo (line 8678) | void PrintBytesInObjectTo(const unsigned char* obj_bytes, size_t count,
    type internal (line 8685) | namespace internal {
      function String (line 6353) | static String ExitSummary(int exit_code) {
      function ExitedUnsuccessfully (line 6379) | bool ExitedUnsuccessfully(int exit_status) {
      function String (line 6388) | static String DeathTestThreadWarning(size_t thread_count) {
      type DeathTestOutcome (line 6415) | enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }
      function DeathTestAbort (line 6422) | void DeathTestAbort(const String& message) {
      function String (line 6473) | String GetLastErrnoDescription() {
      function FailFromInternalError (line 6481) | static void FailFromInternalError(int fd) {
      class DeathTestImpl (line 6531) | class DeathTestImpl : public DeathTest {
        method DeathTestImpl (line 6533) | DeathTestImpl(const char* a_statement, const RE* a_regex)
        method RE (line 6549) | const RE* regex() const { return regex_; }
        method spawned (line 6550) | bool spawned() const { return spawned_; }
        method set_spawned (line 6551) | void set_spawned(bool is_spawned) { spawned_ = is_spawned; }
        method status (line 6552) | int status() const { return status_; }
        method set_status (line 6553) | void set_status(int a_status) { status_ = a_status; }
        method DeathTestOutcome (line 6554) | DeathTestOutcome outcome() const { return outcome_; }
        method set_outcome (line 6555) | void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outc...
        method read_fd (line 6556) | int read_fd() const { return read_fd_; }
        method set_read_fd (line 6557) | void set_read_fd(int fd) { read_fd_ = fd; }
        method write_fd (line 6558) | int write_fd() const { return write_fd_; }
        method set_write_fd (line 6559) | void set_write_fd(int fd) { write_fd_ = fd; }
      function FormatDeathTestOutput (line 6662) | static ::std::string FormatDeathTestOutput(const ::std::string& outp...
      class WindowsDeathTest (line 6777) | class WindowsDeathTest : public DeathTestImpl {
        method WindowsDeathTest (line 6779) | WindowsDeathTest(const char* a_statement,
      class ForkingDeathTest (line 6949) | class ForkingDeathTest : public DeathTestImpl {
        method set_child_pid (line 6957) | void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }
      class NoExecDeathTest (line 6986) | class NoExecDeathTest : public ForkingDeathTest {
        method NoExecDeathTest (line 6988) | NoExecDeathTest(const char* a_statement, const RE* a_regex) :
      class ExecDeathTest (line 7040) | class ExecDeathTest : public ForkingDeathTest {
        method ExecDeathTest (line 7042) | ExecDeathTest(const char* a_statement, const RE* a_regex,
      class Arguments (line 7054) | class Arguments {
        method Arguments (line 7056) | Arguments() {
        method AddArgument (line 7066) | void AddArgument(const char* argument) {
        method AddArguments (line 7071) | void AddArguments(const ::std::vector<Str>& arguments) {
      type ExecDeathTestArgs (line 7087) | struct ExecDeathTestArgs {
      function ExecDeathTestChildMain (line 7109) | static int ExecDeathTestChildMain(void* child_arg) {
      function StackLowerThanAddress (line 7149) | bool StackLowerThanAddress(const void* ptr) {
      function StackGrowsDown (line 7154) | bool StackGrowsDown() {
      function pid_t (line 7162) | static pid_t ExecDeathTestFork(char* const* argv, int close_fd) {
      function IsPathSeparator (line 7533) | static bool IsPathSeparator(char c) {
      function FilePath (line 7542) | FilePath FilePath::GetCurrentDir() {
      function FilePath (line 7560) | FilePath FilePath::RemoveExtension(const char* extension) const {
      function FilePath (line 7590) | FilePath FilePath::RemoveDirectoryName() const {
      function FilePath (line 7601) | FilePath FilePath::RemoveFileName() const {
      function FilePath (line 7618) | FilePath FilePath::MakeFileName(const FilePath& directory,
      function FilePath (line 7633) | FilePath FilePath::ConcatPaths(const FilePath& directory,
      function FilePath (line 7721) | FilePath FilePath::GenerateUniqueFileName(const FilePath& directory,
      function FilePath (line 7781) | FilePath FilePath::RemoveTrailingPathSeparator() const {
      function GetThreadCount (line 7900) | size_t GetThreadCount() {
      function GetThreadCount (line 7919) | size_t GetThreadCount() {
      function IsInSet (line 7994) | bool IsInSet(char ch, const char* str) {
      function IsAsciiDigit (line 8001) | bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
      function IsAsciiPunct (line 8002) | bool IsAsciiPunct(char ch) {
      function IsRepeat (line 8005) | bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); }
      function IsAsciiWhiteSpace (line 8006) | bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); }
      function IsAsciiWordChar (line 8007) | bool IsAsciiWordChar(char ch) {
      function IsValidEscape (line 8013) | bool IsValidEscape(char c) {
      function AtomMatchesChar (line 8019) | bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
      function String (line 8041) | String FormatRegexSyntaxError(const char* regex, int index) {
      function ValidateRegex (line 8048) | bool ValidateRegex(const char* regex) {
      function MatchRepetitionAndRegexAtHead (line 8111) | bool MatchRepetitionAndRegexAtHead(
      function MatchRegexAtHead (line 8138) | bool MatchRegexAtHead(const char* regex, const char* str) {
      function MatchRegexAnywhere (line 8174) | bool MatchRegexAnywhere(const char* regex, const char* str) {
      function FormatFileLocation (line 8247) | GTEST_API_ ::std::string FormatFileLocation(const char* file, int li...
      function FormatCompilerIndependentFileLocation (line 8265) | GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
      class CapturedStream (line 8304) | class CapturedStream {
        method CapturedStream (line 8307) | CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
        method String (line 8341) | String GetCapturedString() {
      function String (line 8378) | String CapturedStream::ReadEntireFile(FILE* file) {
      function CaptureStream (line 8408) | void CaptureStream(int fd, const char* stream_name, CapturedStream**...
      function String (line 8417) | String GetCapturedStream(CapturedStream** captured_stream) {
      function CaptureStdout (line 8427) | void CaptureStdout() {
      function CaptureStderr (line 8432) | void CaptureStderr() {
      function String (line 8437) | String GetCapturedStdout() { return GetCapturedStream(&g_captured_st...
      function String (line 8440) | String GetCapturedStderr() { return GetCapturedStream(&g_captured_st...
      type posix (line 8455) | namespace posix {
        function Abort (line 8456) | void Abort() {
      function String (line 8466) | static String FlagToEnvVar(const char* flag) {
      function ParseInt32 (line 8481) | bool ParseInt32(const Message& src_text, const char* str, Int32* val...
      function BoolFromGTestEnv (line 8523) | bool BoolFromGTestEnv(const char* flag, bool default_value) {
      function Int32 (line 8533) | Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) {
      type CharFormat (line 8692) | enum CharFormat {
      function IsPrintableAscii (line 8701) | inline bool IsPrintableAscii(wchar_t c) {
      function CharFormat (line 8710) | static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
      function CharFormat (line 8756) | static CharFormat PrintAsWideStringLiteralTo(wchar_t c, ostream* os) {
      function CharFormat (line 8771) | static CharFormat PrintAsNarrowStringLiteralTo(char c, ostream* os) {
      function PrintCharAndCodeTo (line 8780) | void PrintCharAndCodeTo(Char c, ostream* os) {
      function PrintTo (line 8805) | void PrintTo(unsigned char c, ::std::ostream* os) {
      function PrintTo (line 8808) | void PrintTo(signed char c, ::std::ostream* os) {
      function PrintTo (line 8814) | void PrintTo(wchar_t wc, ostream* os) {
      function PrintCharsAsStringTo (line 8821) | static void PrintCharsAsStringTo(const char* begin, size_t len, ostr...
      function UniversalPrintArray (line 8838) | void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
      function PrintWideCharsAsStringTo (line 8845) | static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len,
      function PrintTo (line 8863) | void PrintTo(const char* s, ostream* os) {
      function PrintTo (line 8880) | void PrintTo(const wchar_t* s, ostream* os) {
      function PrintStringTo (line 8892) | void PrintStringTo(const ::string& s, ostream* os) {
      function PrintStringTo (line 8897) | void PrintStringTo(const ::std::string& s, ostream* os) {
      function PrintWideStringTo (line 8903) | void PrintWideStringTo(const ::wstring& s, ostream* os) {
      function PrintWideStringTo (line 8909) | void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
    function TestPartResult (line 8987) | const TestPartResult& TestPartResultArray::GetTestPartResult(int index...
    type internal (line 9001) | namespace internal {
      function String (line 6353) | static String ExitSummary(int exit_code) {
      function ExitedUnsuccessfully (line 6379) | bool ExitedUnsuccessfully(int exit_status) {
      function String (line 6388) | static String DeathTestThreadWarning(size_t thread_count) {
      type DeathTestOutcome (line 6415) | enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }
      function DeathTestAbort (line 6422) | void DeathTestAbort(const String& message) {
      function String (line 6473) | String GetLastErrnoDescription() {
      function FailFromInternalError (line 6481) | static void FailFromInternalError(int fd) {
      class DeathTestImpl (line 6531) | class DeathTestImpl : public DeathTest {
        method DeathTestImpl (line 6533) | DeathTestImpl(const char* a_statement, const RE* a_regex)
        method RE (line 6549) | const RE* regex() const { return regex_; }
        method spawned (line 6550) | bool spawned() const { return spawned_; }
        method set_spawned (line 6551) | void set_spawned(bool is_spawned) { spawned_ = is_spawned; }
        method status (line 6552) | int status() const { return status_; }
        method set_status (line 6553) | void set_status(int a_status) { status_ = a_status; }
        method DeathTestOutcome (line 6554) | DeathTestOutcome outcome() const { return outcome_; }
        method set_outcome (line 6555) | void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outc...
        method read_fd (line 6556) | int read_fd() const { return read_fd_; }
        method set_read_fd (line 6557) | void set_read_fd(int fd) { read_fd_ = fd; }
        method write_fd (line 6558) | int write_fd() const { return write_fd_; }
        method set_write_fd (line 6559) | void set_write_fd(int fd) { write_fd_ = fd; }
      function FormatDeathTestOutput (line 6662) | static ::std::string FormatDeathTestOutput(const ::std::string& outp...
      class WindowsDeathTest (line 6777) | class WindowsDeathTest : public DeathTestImpl {
        method WindowsDeathTest (line 6779) | WindowsDeathTest(const char* a_statement,
      class ForkingDeathTest (line 6949) | class ForkingDeathTest : public DeathTestImpl {
        method set_child_pid (line 6957) | void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }
      class NoExecDeathTest (line 6986) | class NoExecDeathTest : public ForkingDeathTest {
        method NoExecDeathTest (line 6988) | NoExecDeathTest(const char* a_statement, const RE* a_regex) :
      class ExecDeathTest (line 7040) | class ExecDeathTest : public ForkingDeathTest {
        method ExecDeathTest (line 7042) | ExecDeathTest(const char* a_statement, const RE* a_regex,
      class Arguments (line 7054) | class Arguments {
        method Arguments (line 7056) | Arguments() {
        method AddArgument (line 7066) | void AddArgument(const char* argument) {
        method AddArguments (line 7071) | void AddArguments(const ::std::vector<Str>& arguments) {
      type ExecDeathTestArgs (line 7087) | struct ExecDeathTestArgs {
      function ExecDeathTestChildMain (line 7109) | static int ExecDeathTestChildMain(void* child_arg) {
      function StackLowerThanAddress (line 7149) | bool StackLowerThanAddress(const void* ptr) {
      function StackGrowsDown (line 7154) | bool StackGrowsDown() {
      function pid_t (line 7162) | static pid_t ExecDeathTestFork(char* const* argv, int close_fd) {
      function IsPathSeparator (line 7533) | static bool IsPathSeparator(char c) {
      function FilePath (line 7542) | FilePath FilePath::GetCurrentDir() {
      function FilePath (line 7560) | FilePath FilePath::RemoveExtension(const char* extension) const {
      function FilePath (line 7590) | FilePath FilePath::RemoveDirectoryName() const {
      function FilePath (line 7601) | FilePath FilePath::RemoveFileName() const {
      function FilePath (line 7618) | FilePath FilePath::MakeFileName(const FilePath& directory,
      function FilePath (line 7633) | FilePath FilePath::ConcatPaths(const FilePath& directory,
      function FilePath (line 7721) | FilePath FilePath::GenerateUniqueFileName(const FilePath& directory,
      function FilePath (line 7781) | FilePath FilePath::RemoveTrailingPathSeparator() const {
      function GetThreadCount (line 7900) | size_t GetThreadCount() {
      function GetThreadCount (line 7919) | size_t GetThreadCount() {
      function IsInSet (line 7994) | bool IsInSet(char ch, const char* str) {
      function IsAsciiDigit (line 8001) | bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
      function IsAsciiPunct (line 8002) | bool IsAsciiPunct(char ch) {
      function IsRepeat (line 8005) | bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); }
      function IsAsciiWhiteSpace (line 8006) | bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); }
      function IsAsciiWordChar (line 8007) | bool IsAsciiWordChar(char ch) {
      function IsValidEscape (line 8013) | bool IsValidEscape(char c) {
      function AtomMatchesChar (line 8019) | bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
      function String (line 8041) | String FormatRegexSyntaxError(const char* regex, int index) {
      function ValidateRegex (line 8048) | bool ValidateRegex(const char* regex) {
      function MatchRepetitionAndRegexAtHead (line 8111) | bool MatchRepetitionAndRegexAtHead(
      function MatchRegexAtHead (line 8138) | bool MatchRegexAtHead(const char* regex, const char* str) {
      function MatchRegexAnywhere (line 8174) | bool MatchRegexAnywhere(const char* regex, const char* str) {
      function FormatFileLocation (line 8247) | GTEST_API_ ::std::string FormatFileLocation(const char* file, int li...
      function FormatCompilerIndependentFileLocation (line 8265) | GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
      class CapturedStream (line 8304) | class CapturedStream {
        method CapturedStream (line 8307) | CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
        method String (line 8341) | String GetCapturedString() {
      function String (line 8378) | String CapturedStream::ReadEntireFile(FILE* file) {
      function CaptureStream (line 8408) | void CaptureStream(int fd, const char* stream_name, CapturedStream**...
      function String (line 8417) | String GetCapturedStream(CapturedStream** captured_stream) {
      function CaptureStdout (line 8427) | void CaptureStdout() {
      function CaptureStderr (line 8432) | void CaptureStderr() {
      function String (line 8437) | String GetCapturedStdout() { return GetCapturedStream(&g_captured_st...
      function String (line 8440) | String GetCapturedStderr() { return GetCapturedStream(&g_captured_st...
      type posix (line 8455) | namespace posix {
        function Abort (line 8456) | void Abort() {
      function String (line 8466) | static String FlagToEnvVar(const char* flag) {
      function ParseInt32 (line 8481) | bool ParseInt32(const Message& src_text, const char* str, Int32* val...
      function BoolFromGTestEnv (line 8523) | bool BoolFromGTestEnv(const char* flag, bool default_value) {
      function Int32 (line 8533) | Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) {
      type CharFormat (line 8692) | enum CharFormat {
      function IsPrintableAscii (line 8701) | inline bool IsPrintableAscii(wchar_t c) {
      function CharFormat (line 8710) | static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
      function CharFormat (line 8756) | static CharFormat PrintAsWideStringLiteralTo(wchar_t c, ostream* os) {
      function CharFormat (line 8771) | static CharFormat PrintAsNarrowStringLiteralTo(char c, ostream* os) {
      function PrintCharAndCodeTo (line 8780) | void PrintCharAndCodeTo(Char c, ostream* os) {
      function PrintTo (line 8805) | void PrintTo(unsigned char c, ::std::ostream* os) {
      function PrintTo (line 8808) | void PrintTo(signed char c, ::std::ostream* os) {
      function PrintTo (line 8814) | void PrintTo(wchar_t wc, ostream* os) {
      function PrintCharsAsStringTo (line 8821) | static void PrintCharsAsStringTo(const char* begin, size_t len, ostr...
      function UniversalPrintArray (line 8838) | void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
      function PrintWideCharsAsStringTo (line 8845) | static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len,
      function PrintTo (line 8863) | void PrintTo(const char* s, ostream* os) {
      function PrintTo (line 8880) | void PrintTo(const wchar_t* s, ostream* os) {
      function PrintStringTo (line 8892) | void PrintStringTo(const ::string& s, ostream* os) {
      function PrintStringTo (line 8897) | void PrintStringTo(const ::std::string& s, ostream* os) {
      function PrintWideStringTo (line 8903) | void PrintWideStringTo(const ::wstring& s, ostream* os) {
      function PrintWideStringTo (line 8909) | void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
    type internal (line 9058) | namespace internal {
      function String (line 6353) | static String ExitSummary(int exit_code) {
      function ExitedUnsuccessfully (line 6379) | bool ExitedUnsuccessfully(int exit_status) {
      function String (line 6388) | static String DeathTestThreadWarning(size_t thread_count) {
      type DeathTestOutcome (line 6415) | enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }
      function DeathTestAbort (line 6422) | void DeathTestAbort(const String& message) {
      function String (line 6473) | String GetLastErrnoDescription() {
      function FailFromInternalError (line 6481) | static void FailFromInternalError(int fd) {
      class DeathTestImpl (line 6531) | class DeathTestImpl : public DeathTest {
        method DeathTestImpl (line 6533) | DeathTestImpl(const char* a_statement, const RE* a_regex)
        method RE (line 6549) | const RE* regex() const { return regex_; }
        method spawned (line 6550) | bool spawned() const { return spawned_; }
        method set_spawned (line 6551) | void set_spawned(bool is_spawned) { spawned_ = is_spawned; }
        method status (line 6552) | int status() const { return status_; }
        method set_status (line 6553) | void set_status(int a_status) { status_ = a_status; }
        method DeathTestOutcome (line 6554) | DeathTestOutcome outcome() const { return outcome_; }
        method set_outcome (line 6555) | void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outc...
        method read_fd (line 6556) | int read_fd() const { return read_fd_; }
        method set_read_fd (line 6557) | void set_read_fd(int fd) { read_fd_ = fd; }
        method write_fd (line 6558) | int write_fd() const { return write_fd_; }
        method set_write_fd (line 6559) | void set_write_fd(int fd) { write_fd_ = fd; }
      function FormatDeathTestOutput (line 6662) | static ::std::string FormatDeathTestOutput(const ::std::string& outp...
      class WindowsDeathTest (line 6777) | class WindowsDeathTest : public DeathTestImpl {
        method WindowsDeathTest (line 6779) | WindowsDeathTest(const char* a_statement,
      class ForkingDeathTest (line 6949) | class ForkingDeathTest : public DeathTestImpl {
        method set_child_pid (line 6957) | void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }
      class NoExecDeathTest (line 6986) | class NoExecDeathTest : public ForkingDeathTest {
        method NoExecDeathTest (line 6988) | NoExecDeathTest(const char* a_statement, const RE* a_regex) :
      class ExecDeathTest (line 7040) | class ExecDeathTest : public ForkingDeathTest {
        method ExecDeathTest (line 7042) | ExecDeathTest(const char* a_statement, const RE* a_regex,
      class Arguments (line 7054) | class Arguments {
        method Arguments (line 7056) | Arguments() {
        method AddArgument (line 7066) | void AddArgument(const char* argument) {
        method AddArguments (line 7071) | void AddArguments(const ::std::vector<Str>& arguments) {
      type ExecDeathTestArgs (line 7087) | struct ExecDeathTestArgs {
      function ExecDeathTestChildMain (line 7109) | static int ExecDeathTestChildMain(void* child_arg) {
      function StackLowerThanAddress (line 7149) | bool StackLowerThanAddress(const void* ptr) {
      function StackGrowsDown (line 7154) | bool StackGrowsDown() {
      function pid_t (line 7162) | static pid_t ExecDeathTestFork(char* const* argv, int close_fd) {
      function IsPathSeparator (line 7533) | static bool IsPathSeparator(char c) {
      function FilePath (line 7542) | FilePath FilePath::GetCurrentDir() {
      function FilePath (line 7560) | FilePath FilePath::RemoveExtension(const char* extension) const {
      function FilePath (line 7590) | FilePath FilePath::RemoveDirectoryName() const {
      function FilePath (line 7601) | FilePath FilePath::RemoveFileName() const {
      function FilePath (line 7618) | FilePath FilePath::MakeFileName(const FilePath& directory,
      function FilePath (line 7633) | FilePath FilePath::ConcatPaths(const FilePath& directory,
      function FilePath (line 7721) | FilePath FilePath::GenerateUniqueFileName(const FilePath& directory,
      function FilePath (line 7781) | FilePath FilePath::RemoveTrailingPathSeparator() const {
      function GetThreadCount (line 7900) | size_t GetThreadCount() {
      function GetThreadCount (line 7919) | size_t GetThreadCount() {
      function IsInSet (line 7994) | bool IsInSet(char ch, const char* str) {
      function IsAsciiDigit (line 8001) | bool IsAsciiDigit(char ch) { return '0' <= ch && ch <= '9'; }
      function IsAsciiPunct (line 8002) | bool IsAsciiPunct(char ch) {
      function IsRepeat (line 8005) | bool IsRepeat(char ch) { return IsInSet(ch, "?*+"); }
      function IsAsciiWhiteSpace (line 8006) | bool IsAsciiWhiteSpace(char ch) { return IsInSet(ch, " \f\n\r\t\v"); }
      function IsAsciiWordChar (line 8007) | bool IsAsciiWordChar(char ch) {
      function IsValidEscape (line 8013) | bool IsValidEscape(char c) {
      function AtomMatchesChar (line 8019) | bool AtomMatchesChar(bool escaped, char pattern_char, char ch) {
      function String (line 8041) | String FormatRegexSyntaxError(const char* regex, int index) {
      function ValidateRegex (line 8048) | bool ValidateRegex(const char* regex) {
      function MatchRepetitionAndRegexAtHead (line 8111) | bool MatchRepetitionAndRegexAtHead(
      function MatchRegexAtHead (line 8138) | bool MatchRegexAtHead(const char* regex, const char* str) {
      function MatchRegexAnywhere (line 8174) | bool MatchRegexAnywhere(const char* regex, const char* str) {
      function FormatFileLocation (line 8247) | GTEST_API_ ::std::string FormatFileLocation(const char* file, int li...
      function FormatCompilerIndependentFileLocation (line 8265) | GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
      class CapturedStream (line 8304) | class CapturedStream {
        method CapturedStream (line 8307) | CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) {
        method String (line 8341) | String GetCapturedString() {
      function String (line 8378) | String CapturedStream::ReadEntireFile(FILE* file) {
      function CaptureStream (line 8408) | void CaptureStream(int fd, const char* stream_name, CapturedStream**...
      function String (line 8417) | String GetCapturedStream(CapturedStream** captured_stream) {
      function CaptureStdout (line 8427) | void CaptureStdout() {
      function CaptureStderr (line 8432) | void CaptureStderr() {
      function String (line 8437) | String GetCapturedStdout() { return GetCapturedStream(&g_captured_st...
      function String (line 8440) | String GetCapturedStderr() { return GetCapturedStream(&g_captured_st...
      type posix (line 8455) | namespace posix {
        function Abort (line 8456) | void Abort() {
      function String (line 8466) | static String FlagToEnvVar(const char* flag) {
      function ParseInt32 (line 8481) | bool ParseInt32(const Message& src_text, const char* str, Int32* val...
      function BoolFromGTestEnv (line 8523) | bool BoolFromGTestEnv(const char* flag, bool default_value) {
      function Int32 (line 8533) | Int32 Int32FromGTestEnv(const char* flag, Int32 default_value) {
      type CharFormat (line 8692) | enum CharFormat {
      function IsPrintableAscii (line 8701) | inline bool IsPrintableAscii(wchar_t c) {
      function CharFormat (line 8710) | static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
      function CharFormat (line 8756) | static CharFormat PrintAsWideStringLiteralTo(wchar_t c, ostream* os) {
      function CharFormat (line 8771) | static CharFormat PrintAsNarrowStringLiteralTo(char c, ostream* os) {
      function PrintCharAndCodeTo (line 8780) | void PrintCharAndCodeTo(Char c, ostream* os) {
      function PrintTo (line 8805) | void PrintTo(unsigned char c, ::std::ostream* os) {
      function PrintTo (line 8808) | void PrintTo(signed char c, ::std::ostream* os) {
      function PrintTo (line 8814) | void PrintTo(wchar_t wc, ostream* os) {
      function PrintCharsAsStringTo (line 8821) | static void PrintCharsAsStringTo(const char* begin, size_t len, ostr...
      function UniversalPrintArray (line 8838) | void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
      function PrintWideCharsAsStringTo (line 8845) | static void PrintWideCharsAsStringTo(const wchar_t* begin, size_t len,
      function PrintTo (line 8863) | void PrintTo(const char* s, ostream* os) {
      function PrintTo (line 8880) | void PrintTo(const wchar_t* s, ostream* os) {
      function PrintStringTo (line 8892) | void PrintStringTo(const ::string& s, ostream* os) {
      function PrintStringTo (line 8897) | void PrintStringTo(const ::std::string& s, ostream* os) {
      function PrintWideStringTo (line 8903) | void PrintWideStringTo(const ::wstring& s, ostream* os) {
      function PrintWideStringTo (line 8909) | void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
  function IsSubstringPred (line 2535) | bool IsSubstringPred(const char* needle, const char* haystack) {
  function IsSubstringPred (line 2542) | bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) {
  function IsSubstringPred (line 2551) | bool IsSubstringPred(const StringType& needle,
  function AssertionResult (line 2561) | AssertionResult IsSubstringImpl(
  function AssertionResult (line 2584) | AssertionResult IsSubstring(
  function AssertionResult (line 2590) | AssertionResult IsSubstring(
  function AssertionResult (line 2596) | AssertionResult IsNotSubstring(
  function AssertionResult (line 2602) | AssertionResult IsNotSubstring(
  function AssertionResult (line 2608) | AssertionResult IsSubstring(
  function AssertionResult (line 2614) | AssertionResult IsNotSubstring(
  function AssertionResult (line 2621) | AssertionResult IsSubstring(
  function AssertionResult (line 2627) | AssertionResult IsNotSubstring(
  type internal (line 2634) | namespace internal {
    function AssertionResult (line 2641) | AssertionResult HRESULTFailureHelper(const char* expr,
    function AssertionResult (line 2682) | AssertionResult IsHRESULTSuccess(const char* expr, long hr) {  // NOLINT
    function AssertionResult (line 2689) | AssertionResult IsHRESULTFailure(const char* expr, long hr) {  // NOLINT
    function UInt32 (line 2725) | inline UInt32 ChopLowBits(UInt32* bits, int n) {
    function IsUtf16SurrogatePair (line 2779) | inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
    function UInt32 (line 2785) | inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,
    function String (line 2808) | String WideStringToUtf8(const wchar_t* str, int num_chars) {
    function String (line 2834) | String String::ShowWideCString(const wchar_t * wide_c_str) {
    function String (line 2842) | String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) {
    function AssertionResult (line 2864) | AssertionResult CmpHelperSTREQ(const char* expected_expression,
    function AssertionResult (line 2880) | AssertionResult CmpHelperSTRNE(const char* s1_expression,
    function String (line 3004) | String String::Format(const char * format, ...) {
    function String (line 3039) | String StringStreamToString(::std::stringstream* ss) {
    function String (line 3059) | String AppendUserMessage(const String& gtest_msg,
    function ReportFailureInUnknownLocation (line 3236) | void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
    function Result (line 3375) | Result HandleSehExceptionsInMethodIfSupported(
    function Result (line 3402) | Result HandleExceptionsInMethodIfSupported(
    function TestInfo (line 3533) | TestInfo* MakeAndRegisterTestInfo(
    function ReportInvalidTestCaseType (line 3549) | void ReportInvalidTestCaseType(const char* test_case_name,
    type GTestColor (line 3854) | enum GTestColor {
    function WORD (line 3864) | WORD GetColorAttribute(GTestColor color) {
    function ShouldUseColor (line 3889) | bool ShouldUseColor(bool stdout_is_tty) {
    function ColoredPrintf (line 3924) | void ColoredPrintf(GTestColor color, const char* fmt, ...) {
    function PrintFullTestCommentIfPresent (line 3970) | void PrintFullTestCommentIfPresent(const TestInfo& test_info) {
    class PrettyUnitTestResultPrinter (line 3990) | class PrettyUnitTestResultPrinter : public TestEventListener {
      method PrettyUnitTestResultPrinter (line 3992) | PrettyUnitTestResultPrinter() {}
      method PrintTestName (line 3993) | static void PrintTestName(const char * test_case, const char * test) {
      method OnTestProgramStart (line 3998) | virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsSetUpEnd (line 4001) | virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsTearDownEnd (line 4008) | virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/...
      method OnTestProgramEnd (line 4010) | virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
    class TestEventRepeater (line 4201) | class TestEventRepeater : public TestEventListener {
      method TestEventRepeater (line 4203) | TestEventRepeater() : forwarding_enabled_(true) {}
      method forwarding_enabled (line 4210) | bool forwarding_enabled() const { return forwarding_enabled_; }
      method set_forwarding_enabled (line 4211) | void set_forwarding_enabled(bool enable) { forwarding_enabled_ = ena...
    function TestEventListener (line 4246) | TestEventListener* TestEventRepeater::Release(TestEventListener *liste...
    class XmlUnitTestResultPrinter (line 4314) | class XmlUnitTestResultPrinter : public EmptyTestEventListener {
      method IsNormalizableWhitespace (line 4323) | static bool IsNormalizableWhitespace(char c) {
      method IsValidXmlCharacter (line 4328) | static bool IsValidXmlCharacter(char c) {
      method String (line 4342) | static String EscapeXmlAttribute(const char* str) {
      method String (line 4347) | static String EscapeXmlText(const char* str) { return EscapeXml(str,...
    function String (line 4428) | String XmlUnitTestResultPrinter::EscapeXml(const char* str, bool is_at...
    function string (line 4473) | string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(const stri...
    function FormatTimeInMillisAsSeconds (line 4500) | std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {
    function String (line 4618) | String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(
    class StreamingListener (line 4634) | class StreamingListener : public EmptyTestEventListener {
      method StreamingListener (line 4639) | StreamingListener(const string& host, const string& port)
      method OnTestProgramStart (line 4650) | void OnTestProgramStart(const UnitTest& /* unit_test */) {
      method OnTestProgramEnd (line 4654) | void OnTestProgramEnd(const UnitTest& unit_test) {
      method OnTestIterationStart (line 4664) | void OnTestIterationStart(const UnitTest& /* unit_test */, int itera...
      method OnTestIterationEnd (line 4669) | void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration ...
      method OnTestCaseStart (line 4675) | void OnTestCaseStart(const TestCase& test_case) {
      method OnTestCaseEnd (line 4679) | void OnTestCaseEnd(const TestCase& test_case) {
      method OnTestStart (line 4685) | void OnTestStart(const TestInfo& test_info) {
      method OnTestEnd (line 4689) | void OnTestEnd(const TestInfo& test_info) {
      method OnTestPartResult (line 4696) | void OnTestPartResult(const TestPartResult& test_part_result) {
      method CloseConnection (line 4711) | void CloseConnection() {
      method Send (line 4720) | void Send(const string& message) {
    function string (line 4744) | string StreamingListener::UrlEncode(const char* str) {
    function String (line 4839) | String OsStackTraceGetter::CurrentStackTrace(int, int) {
    class TestCaseNameIs (line 5385) | class TestCaseNameIs {
      method TestCaseNameIs (line 5388) | explicit TestCaseNameIs(const String& name)
    function TestCase (line 5412) | TestCase* UnitTestImpl::GetTestCase(const char* test_case_name,
    function SetUpEnvironment (line 5449) | static void SetUpEnvironment(Environment* env) { env->SetUp(); }
    function TearDownEnvironment (line 5450) | static void TearDownEnvironment(Environment* env) { env->TearDown(); }
    function WriteToShardStatusFileIfNeeded (line 5597) | void WriteToShardStatusFileIfNeeded() {
    function ShouldShard (line 5619) | bool ShouldShard(const char* total_shards_env,
    function Int32 (line 5664) | Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) {
    function ShouldRunTestOnShard (line 5682) | bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_...
    function OsStackTraceGetterInterface (line 5783) | OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
    function TestResult (line 5793) | TestResult* UnitTestImpl::current_test_result() {
    function String (line 5834) | String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
    class ClassUniqueToAlwaysTrue (line 5844) | class ClassUniqueToAlwaysTrue {}
    function IsTrue (line 5847) | bool IsTrue(bool condition) { return condition; }
    function AlwaysTrue (line 5849) | bool AlwaysTrue() {
    function SkipPrefix (line 5862) | bool SkipPrefix(const char* prefix, const char** pstr) {
    function ParseBoolFlag (line 5914) | bool ParseBoolFlag(const char* str, const char* flag, bool* value) {
    function ParseInt32Flag (line 5931) | bool ParseInt32Flag(const char* str, const char* flag, Int32* value) {
    function ParseStringFlag (line 5948) | bool ParseStringFlag(const char* str, const char* flag, String* value) {
    function HasGoogleTestFlagPrefix (line 5966) | static bool HasGoogleTestFlagPrefix(const char* str) {
    function PrintColorEncoded (line 5986) | static void PrintColorEncoded(const char* str) {
    function ParseGoogleTestFlagsOnlyImpl (line 6088) | void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
    function ParseGoogleTestFlagsOnly (line 6158) | void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
    function ParseGoogleTestFlagsOnly (line 6161) | void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {
    function InitGoogleTestImpl (line 6170) | void InitGoogleTestImpl(int* argc, CharType** argv) {
  function TestPartResult (line 3090) | const TestPartResult& TestResult::GetTestPartResult(int i) const {
  function TestProperty (line 3099) | const TestProperty& TestResult::GetTestProperty(int i) const {
  function TestPartFatallyFailed (line 3166) | static bool TestPartFatallyFailed(const TestPartResult& result) {
  function TestPartNonfatallyFailed (line 3176) | static bool TestPartNonfatallyFailed(const TestPartResult& result) {
  type internal (line 3234) | namespace internal {
    function AssertionResult (line 2641) | AssertionResult HRESULTFailureHelper(const char* expr,
    function AssertionResult (line 2682) | AssertionResult IsHRESULTSuccess(const char* expr, long hr) {  // NOLINT
    function AssertionResult (line 2689) | AssertionResult IsHRESULTFailure(const char* expr, long hr) {  // NOLINT
    function UInt32 (line 2725) | inline UInt32 ChopLowBits(UInt32* bits, int n) {
    function IsUtf16SurrogatePair (line 2779) | inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
    function UInt32 (line 2785) | inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,
    function String (line 2808) | String WideStringToUtf8(const wchar_t* str, int num_chars) {
    function String (line 2834) | String String::ShowWideCString(const wchar_t * wide_c_str) {
    function String (line 2842) | String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) {
    function AssertionResult (line 2864) | AssertionResult CmpHelperSTREQ(const char* expected_expression,
    function AssertionResult (line 2880) | AssertionResult CmpHelperSTRNE(const char* s1_expression,
    function String (line 3004) | String String::Format(const char * format, ...) {
    function String (line 3039) | String StringStreamToString(::std::stringstream* ss) {
    function String (line 3059) | String AppendUserMessage(const String& gtest_msg,
    function ReportFailureInUnknownLocation (line 3236) | void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
    function Result (line 3375) | Result HandleSehExceptionsInMethodIfSupported(
    function Result (line 3402) | Result HandleExceptionsInMethodIfSupported(
    function TestInfo (line 3533) | TestInfo* MakeAndRegisterTestInfo(
    function ReportInvalidTestCaseType (line 3549) | void ReportInvalidTestCaseType(const char* test_case_name,
    type GTestColor (line 3854) | enum GTestColor {
    function WORD (line 3864) | WORD GetColorAttribute(GTestColor color) {
    function ShouldUseColor (line 3889) | bool ShouldUseColor(bool stdout_is_tty) {
    function ColoredPrintf (line 3924) | void ColoredPrintf(GTestColor color, const char* fmt, ...) {
    function PrintFullTestCommentIfPresent (line 3970) | void PrintFullTestCommentIfPresent(const TestInfo& test_info) {
    class PrettyUnitTestResultPrinter (line 3990) | class PrettyUnitTestResultPrinter : public TestEventListener {
      method PrettyUnitTestResultPrinter (line 3992) | PrettyUnitTestResultPrinter() {}
      method PrintTestName (line 3993) | static void PrintTestName(const char * test_case, const char * test) {
      method OnTestProgramStart (line 3998) | virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsSetUpEnd (line 4001) | virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsTearDownEnd (line 4008) | virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/...
      method OnTestProgramEnd (line 4010) | virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
    class TestEventRepeater (line 4201) | class TestEventRepeater : public TestEventListener {
      method TestEventRepeater (line 4203) | TestEventRepeater() : forwarding_enabled_(true) {}
      method forwarding_enabled (line 4210) | bool forwarding_enabled() const { return forwarding_enabled_; }
      method set_forwarding_enabled (line 4211) | void set_forwarding_enabled(bool enable) { forwarding_enabled_ = ena...
    function TestEventListener (line 4246) | TestEventListener* TestEventRepeater::Release(TestEventListener *liste...
    class XmlUnitTestResultPrinter (line 4314) | class XmlUnitTestResultPrinter : public EmptyTestEventListener {
      method IsNormalizableWhitespace (line 4323) | static bool IsNormalizableWhitespace(char c) {
      method IsValidXmlCharacter (line 4328) | static bool IsValidXmlCharacter(char c) {
      method String (line 4342) | static String EscapeXmlAttribute(const char* str) {
      method String (line 4347) | static String EscapeXmlText(const char* str) { return EscapeXml(str,...
    function String (line 4428) | String XmlUnitTestResultPrinter::EscapeXml(const char* str, bool is_at...
    function string (line 4473) | string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(const stri...
    function FormatTimeInMillisAsSeconds (line 4500) | std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {
    function String (line 4618) | String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(
    class StreamingListener (line 4634) | class StreamingListener : public EmptyTestEventListener {
      method StreamingListener (line 4639) | StreamingListener(const string& host, const string& port)
      method OnTestProgramStart (line 4650) | void OnTestProgramStart(const UnitTest& /* unit_test */) {
      method OnTestProgramEnd (line 4654) | void OnTestProgramEnd(const UnitTest& unit_test) {
      method OnTestIterationStart (line 4664) | void OnTestIterationStart(const UnitTest& /* unit_test */, int itera...
      method OnTestIterationEnd (line 4669) | void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration ...
      method OnTestCaseStart (line 4675) | void OnTestCaseStart(const TestCase& test_case) {
      method OnTestCaseEnd (line 4679) | void OnTestCaseEnd(const TestCase& test_case) {
      method OnTestStart (line 4685) | void OnTestStart(const TestInfo& test_info) {
      method OnTestEnd (line 4689) | void OnTestEnd(const TestInfo& test_info) {
      method OnTestPartResult (line 4696) | void OnTestPartResult(const TestPartResult& test_part_result) {
      method CloseConnection (line 4711) | void CloseConnection() {
      method Send (line 4720) | void Send(const string& message) {
    function string (line 4744) | string StreamingListener::UrlEncode(const char* str) {
    function String (line 4839) | String OsStackTraceGetter::CurrentStackTrace(int, int) {
    class TestCaseNameIs (line 5385) | class TestCaseNameIs {
      method TestCaseNameIs (line 5388) | explicit TestCaseNameIs(const String& name)
    function TestCase (line 5412) | TestCase* UnitTestImpl::GetTestCase(const char* test_case_name,
    function SetUpEnvironment (line 5449) | static void SetUpEnvironment(Environment* env) { env->SetUp(); }
    function TearDownEnvironment (line 5450) | static void TearDownEnvironment(Environment* env) { env->TearDown(); }
    function WriteToShardStatusFileIfNeeded (line 5597) | void WriteToShardStatusFileIfNeeded() {
    function ShouldShard (line 5619) | bool ShouldShard(const char* total_shards_env,
    function Int32 (line 5664) | Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) {
    function ShouldRunTestOnShard (line 5682) | bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_...
    function OsStackTraceGetterInterface (line 5783) | OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
    function TestResult (line 5793) | TestResult* UnitTestImpl::current_test_result() {
    function String (line 5834) | String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
    class ClassUniqueToAlwaysTrue (line 5844) | class ClassUniqueToAlwaysTrue {}
    function IsTrue (line 5847) | bool IsTrue(bool condition) { return condition; }
    function AlwaysTrue (line 5849) | bool AlwaysTrue() {
    function SkipPrefix (line 5862) | bool SkipPrefix(const char* prefix, const char** pstr) {
    function ParseBoolFlag (line 5914) | bool ParseBoolFlag(const char* str, const char* flag, bool* value) {
    function ParseInt32Flag (line 5931) | bool ParseInt32Flag(const char* str, const char* flag, Int32* value) {
    function ParseStringFlag (line 5948) | bool ParseStringFlag(const char* str, const char* flag, String* value) {
    function HasGoogleTestFlagPrefix (line 5966) | static bool HasGoogleTestFlagPrefix(const char* str) {
    function PrintColorEncoded (line 5986) | static void PrintColorEncoded(const char* str) {
    function ParseGoogleTestFlagsOnlyImpl (line 6088) | void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
    function ParseGoogleTestFlagsOnly (line 6158) | void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
    function ParseGoogleTestFlagsOnly (line 6161) | void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {
    function InitGoogleTestImpl (line 6170) | void InitGoogleTestImpl(int* argc, CharType** argv) {
  function FormatCxxExceptionMessage (line 3336) | static internal::String FormatCxxExceptionMessage(const char* description,
  class GoogleTestFailureException (line 3358) | class GoogleTestFailureException : public ::std::runtime_error {
    method GoogleTestFailureException (line 3360) | explicit GoogleTestFailureException(const TestPartResult& failure)
  type internal (line 3365) | namespace internal {
    function AssertionResult (line 2641) | AssertionResult HRESULTFailureHelper(const char* expr,
    function AssertionResult (line 2682) | AssertionResult IsHRESULTSuccess(const char* expr, long hr) {  // NOLINT
    function AssertionResult (line 2689) | AssertionResult IsHRESULTFailure(const char* expr, long hr) {  // NOLINT
    function UInt32 (line 2725) | inline UInt32 ChopLowBits(UInt32* bits, int n) {
    function IsUtf16SurrogatePair (line 2779) | inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
    function UInt32 (line 2785) | inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,
    function String (line 2808) | String WideStringToUtf8(const wchar_t* str, int num_chars) {
    function String (line 2834) | String String::ShowWideCString(const wchar_t * wide_c_str) {
    function String (line 2842) | String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) {
    function AssertionResult (line 2864) | AssertionResult CmpHelperSTREQ(const char* expected_expression,
    function AssertionResult (line 2880) | AssertionResult CmpHelperSTRNE(const char* s1_expression,
    function String (line 3004) | String String::Format(const char * format, ...) {
    function String (line 3039) | String StringStreamToString(::std::stringstream* ss) {
    function String (line 3059) | String AppendUserMessage(const String& gtest_msg,
    function ReportFailureInUnknownLocation (line 3236) | void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
    function Result (line 3375) | Result HandleSehExceptionsInMethodIfSupported(
    function Result (line 3402) | Result HandleExceptionsInMethodIfSupported(
    function TestInfo (line 3533) | TestInfo* MakeAndRegisterTestInfo(
    function ReportInvalidTestCaseType (line 3549) | void ReportInvalidTestCaseType(const char* test_case_name,
    type GTestColor (line 3854) | enum GTestColor {
    function WORD (line 3864) | WORD GetColorAttribute(GTestColor color) {
    function ShouldUseColor (line 3889) | bool ShouldUseColor(bool stdout_is_tty) {
    function ColoredPrintf (line 3924) | void ColoredPrintf(GTestColor color, const char* fmt, ...) {
    function PrintFullTestCommentIfPresent (line 3970) | void PrintFullTestCommentIfPresent(const TestInfo& test_info) {
    class PrettyUnitTestResultPrinter (line 3990) | class PrettyUnitTestResultPrinter : public TestEventListener {
      method PrettyUnitTestResultPrinter (line 3992) | PrettyUnitTestResultPrinter() {}
      method PrintTestName (line 3993) | static void PrintTestName(const char * test_case, const char * test) {
      method OnTestProgramStart (line 3998) | virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsSetUpEnd (line 4001) | virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsTearDownEnd (line 4008) | virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/...
      method OnTestProgramEnd (line 4010) | virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
    class TestEventRepeater (line 4201) | class TestEventRepeater : public TestEventListener {
      method TestEventRepeater (line 4203) | TestEventRepeater() : forwarding_enabled_(true) {}
      method forwarding_enabled (line 4210) | bool forwarding_enabled() const { return forwarding_enabled_; }
      method set_forwarding_enabled (line 4211) | void set_forwarding_enabled(bool enable) { forwarding_enabled_ = ena...
    function TestEventListener (line 4246) | TestEventListener* TestEventRepeater::Release(TestEventListener *liste...
    class XmlUnitTestResultPrinter (line 4314) | class XmlUnitTestResultPrinter : public EmptyTestEventListener {
      method IsNormalizableWhitespace (line 4323) | static bool IsNormalizableWhitespace(char c) {
      method IsValidXmlCharacter (line 4328) | static bool IsValidXmlCharacter(char c) {
      method String (line 4342) | static String EscapeXmlAttribute(const char* str) {
      method String (line 4347) | static String EscapeXmlText(const char* str) { return EscapeXml(str,...
    function String (line 4428) | String XmlUnitTestResultPrinter::EscapeXml(const char* str, bool is_at...
    function string (line 4473) | string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(const stri...
    function FormatTimeInMillisAsSeconds (line 4500) | std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {
    function String (line 4618) | String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(
    class StreamingListener (line 4634) | class StreamingListener : public EmptyTestEventListener {
      method StreamingListener (line 4639) | StreamingListener(const string& host, const string& port)
      method OnTestProgramStart (line 4650) | void OnTestProgramStart(const UnitTest& /* unit_test */) {
      method OnTestProgramEnd (line 4654) | void OnTestProgramEnd(const UnitTest& unit_test) {
      method OnTestIterationStart (line 4664) | void OnTestIterationStart(const UnitTest& /* unit_test */, int itera...
      method OnTestIterationEnd (line 4669) | void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration ...
      method OnTestCaseStart (line 4675) | void OnTestCaseStart(const TestCase& test_case) {
      method OnTestCaseEnd (line 4679) | void OnTestCaseEnd(const TestCase& test_case) {
      method OnTestStart (line 4685) | void OnTestStart(const TestInfo& test_info) {
      method OnTestEnd (line 4689) | void OnTestEnd(const TestInfo& test_info) {
      method OnTestPartResult (line 4696) | void OnTestPartResult(const TestPartResult& test_part_result) {
      method CloseConnection (line 4711) | void CloseConnection() {
      method Send (line 4720) | void Send(const string& message) {
    function string (line 4744) | string StreamingListener::UrlEncode(const char* str) {
    function String (line 4839) | String OsStackTraceGetter::CurrentStackTrace(int, int) {
    class TestCaseNameIs (line 5385) | class TestCaseNameIs {
      method TestCaseNameIs (line 5388) | explicit TestCaseNameIs(const String& name)
    function TestCase (line 5412) | TestCase* UnitTestImpl::GetTestCase(const char* test_case_name,
    function SetUpEnvironment (line 5449) | static void SetUpEnvironment(Environment* env) { env->SetUp(); }
    function TearDownEnvironment (line 5450) | static void TearDownEnvironment(Environment* env) { env->TearDown(); }
    function WriteToShardStatusFileIfNeeded (line 5597) | void WriteToShardStatusFileIfNeeded() {
    function ShouldShard (line 5619) | bool ShouldShard(const char* total_shards_env,
    function Int32 (line 5664) | Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) {
    function ShouldRunTestOnShard (line 5682) | bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_...
    function OsStackTraceGetterInterface (line 5783) | OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
    function TestResult (line 5793) | TestResult* UnitTestImpl::current_test_result() {
    function String (line 5834) | String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
    class ClassUniqueToAlwaysTrue (line 5844) | class ClassUniqueToAlwaysTrue {}
    function IsTrue (line 5847) | bool IsTrue(bool condition) { return condition; }
    function AlwaysTrue (line 5849) | bool AlwaysTrue() {
    function SkipPrefix (line 5862) | bool SkipPrefix(const char* prefix, const char** pstr) {
    function ParseBoolFlag (line 5914) | bool ParseBoolFlag(const char* str, const char* flag, bool* value) {
    function ParseInt32Flag (line 5931) | bool ParseInt32Flag(const char* str, const char* flag, Int32* value) {
    function ParseStringFlag (line 5948) | bool ParseStringFlag(const char* str, const char* flag, String* value) {
    function HasGoogleTestFlagPrefix (line 5966) | static bool HasGoogleTestFlagPrefix(const char* str) {
    function PrintColorEncoded (line 5986) | static void PrintColorEncoded(const char* str) {
    function ParseGoogleTestFlagsOnlyImpl (line 6088) | void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
    function ParseGoogleTestFlagsOnly (line 6158) | void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
    function ParseGoogleTestFlagsOnly (line 6161) | void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {
    function InitGoogleTestImpl (line 6170) | void InitGoogleTestImpl(int* argc, CharType** argv) {
  type internal (line 3514) | namespace internal {
    function AssertionResult (line 2641) | AssertionResult HRESULTFailureHelper(const char* expr,
    function AssertionResult (line 2682) | AssertionResult IsHRESULTSuccess(const char* expr, long hr) {  // NOLINT
    function AssertionResult (line 2689) | AssertionResult IsHRESULTFailure(const char* expr, long hr) {  // NOLINT
    function UInt32 (line 2725) | inline UInt32 ChopLowBits(UInt32* bits, int n) {
    function IsUtf16SurrogatePair (line 2779) | inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
    function UInt32 (line 2785) | inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,
    function String (line 2808) | String WideStringToUtf8(const wchar_t* str, int num_chars) {
    function String (line 2834) | String String::ShowWideCString(const wchar_t * wide_c_str) {
    function String (line 2842) | String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) {
    function AssertionResult (line 2864) | AssertionResult CmpHelperSTREQ(const char* expected_expression,
    function AssertionResult (line 2880) | AssertionResult CmpHelperSTRNE(const char* s1_expression,
    function String (line 3004) | String String::Format(const char * format, ...) {
    function String (line 3039) | String StringStreamToString(::std::stringstream* ss) {
    function String (line 3059) | String AppendUserMessage(const String& gtest_msg,
    function ReportFailureInUnknownLocation (line 3236) | void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
    function Result (line 3375) | Result HandleSehExceptionsInMethodIfSupported(
    function Result (line 3402) | Result HandleExceptionsInMethodIfSupported(
    function TestInfo (line 3533) | TestInfo* MakeAndRegisterTestInfo(
    function ReportInvalidTestCaseType (line 3549) | void ReportInvalidTestCaseType(const char* test_case_name,
    type GTestColor (line 3854) | enum GTestColor {
    function WORD (line 3864) | WORD GetColorAttribute(GTestColor color) {
    function ShouldUseColor (line 3889) | bool ShouldUseColor(bool stdout_is_tty) {
    function ColoredPrintf (line 3924) | void ColoredPrintf(GTestColor color, const char* fmt, ...) {
    function PrintFullTestCommentIfPresent (line 3970) | void PrintFullTestCommentIfPresent(const TestInfo& test_info) {
    class PrettyUnitTestResultPrinter (line 3990) | class PrettyUnitTestResultPrinter : public TestEventListener {
      method PrettyUnitTestResultPrinter (line 3992) | PrettyUnitTestResultPrinter() {}
      method PrintTestName (line 3993) | static void PrintTestName(const char * test_case, const char * test) {
      method OnTestProgramStart (line 3998) | virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsSetUpEnd (line 4001) | virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsTearDownEnd (line 4008) | virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/...
      method OnTestProgramEnd (line 4010) | virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
    class TestEventRepeater (line 4201) | class TestEventRepeater : public TestEventListener {
      method TestEventRepeater (line 4203) | TestEventRepeater() : forwarding_enabled_(true) {}
      method forwarding_enabled (line 4210) | bool forwarding_enabled() const { return forwarding_enabled_; }
      method set_forwarding_enabled (line 4211) | void set_forwarding_enabled(bool enable) { forwarding_enabled_ = ena...
    function TestEventListener (line 4246) | TestEventListener* TestEventRepeater::Release(TestEventListener *liste...
    class XmlUnitTestResultPrinter (line 4314) | class XmlUnitTestResultPrinter : public EmptyTestEventListener {
      method IsNormalizableWhitespace (line 4323) | static bool IsNormalizableWhitespace(char c) {
      method IsValidXmlCharacter (line 4328) | static bool IsValidXmlCharacter(char c) {
      method String (line 4342) | static String EscapeXmlAttribute(const char* str) {
      method String (line 4347) | static String EscapeXmlText(const char* str) { return EscapeXml(str,...
    function String (line 4428) | String XmlUnitTestResultPrinter::EscapeXml(const char* str, bool is_at...
    function string (line 4473) | string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(const stri...
    function FormatTimeInMillisAsSeconds (line 4500) | std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {
    function String (line 4618) | String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(
    class StreamingListener (line 4634) | class StreamingListener : public EmptyTestEventListener {
      method StreamingListener (line 4639) | StreamingListener(const string& host, const string& port)
      method OnTestProgramStart (line 4650) | void OnTestProgramStart(const UnitTest& /* unit_test */) {
      method OnTestProgramEnd (line 4654) | void OnTestProgramEnd(const UnitTest& unit_test) {
      method OnTestIterationStart (line 4664) | void OnTestIterationStart(const UnitTest& /* unit_test */, int itera...
      method OnTestIterationEnd (line 4669) | void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration ...
      method OnTestCaseStart (line 4675) | void OnTestCaseStart(const TestCase& test_case) {
      method OnTestCaseEnd (line 4679) | void OnTestCaseEnd(const TestCase& test_case) {
      method OnTestStart (line 4685) | void OnTestStart(const TestInfo& test_info) {
      method OnTestEnd (line 4689) | void OnTestEnd(const TestInfo& test_info) {
      method OnTestPartResult (line 4696) | void OnTestPartResult(const TestPartResult& test_part_result) {
      method CloseConnection (line 4711) | void CloseConnection() {
      method Send (line 4720) | void Send(const string& message) {
    function string (line 4744) | string StreamingListener::UrlEncode(const char* str) {
    function String (line 4839) | String OsStackTraceGetter::CurrentStackTrace(int, int) {
    class TestCaseNameIs (line 5385) | class TestCaseNameIs {
      method TestCaseNameIs (line 5388) | explicit TestCaseNameIs(const String& name)
    function TestCase (line 5412) | TestCase* UnitTestImpl::GetTestCase(const char* test_case_name,
    function SetUpEnvironment (line 5449) | static void SetUpEnvironment(Environment* env) { env->SetUp(); }
    function TearDownEnvironment (line 5450) | static void TearDownEnvironment(Environment* env) { env->TearDown(); }
    function WriteToShardStatusFileIfNeeded (line 5597) | void WriteToShardStatusFileIfNeeded() {
    function ShouldShard (line 5619) | bool ShouldShard(const char* total_shards_env,
    function Int32 (line 5664) | Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) {
    function ShouldRunTestOnShard (line 5682) | bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_...
    function OsStackTraceGetterInterface (line 5783) | OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
    function TestResult (line 5793) | TestResult* UnitTestImpl::current_test_result() {
    function String (line 5834) | String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
    class ClassUniqueToAlwaysTrue (line 5844) | class ClassUniqueToAlwaysTrue {}
    function IsTrue (line 5847) | bool IsTrue(bool condition) { return condition; }
    function AlwaysTrue (line 5849) | bool AlwaysTrue() {
    function SkipPrefix (line 5862) | bool SkipPrefix(const char* prefix, const char** pstr) {
    function ParseBoolFlag (line 5914) | bool ParseBoolFlag(const char* str, const char* flag, bool* value) {
    function ParseInt32Flag (line 5931) | bool ParseInt32Flag(const char* str, const char* flag, Int32* value) {
    function ParseStringFlag (line 5948) | bool ParseStringFlag(const char* str, const char* flag, String* value) {
    function HasGoogleTestFlagPrefix (line 5966) | static bool HasGoogleTestFlagPrefix(const char* str) {
    function PrintColorEncoded (line 5986) | static void PrintColorEncoded(const char* str) {
    function ParseGoogleTestFlagsOnlyImpl (line 6088) | void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
    function ParseGoogleTestFlagsOnly (line 6158) | void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
    function ParseGoogleTestFlagsOnly (line 6161) | void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {
    function InitGoogleTestImpl (line 6170) | void InitGoogleTestImpl(int* argc, CharType** argv) {
  class TestNameIs (line 3579) | class TestNameIs {
    method TestNameIs (line 3584) | explicit TestNameIs(const char* name)
  type internal (line 3598) | namespace internal {
    function AssertionResult (line 2641) | AssertionResult HRESULTFailureHelper(const char* expr,
    function AssertionResult (line 2682) | AssertionResult IsHRESULTSuccess(const char* expr, long hr) {  // NOLINT
    function AssertionResult (line 2689) | AssertionResult IsHRESULTFailure(const char* expr, long hr) {  // NOLINT
    function UInt32 (line 2725) | inline UInt32 ChopLowBits(UInt32* bits, int n) {
    function IsUtf16SurrogatePair (line 2779) | inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
    function UInt32 (line 2785) | inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,
    function String (line 2808) | String WideStringToUtf8(const wchar_t* str, int num_chars) {
    function String (line 2834) | String String::ShowWideCString(const wchar_t * wide_c_str) {
    function String (line 2842) | String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) {
    function AssertionResult (line 2864) | AssertionResult CmpHelperSTREQ(const char* expected_expression,
    function AssertionResult (line 2880) | AssertionResult CmpHelperSTRNE(const char* s1_expression,
    function String (line 3004) | String String::Format(const char * format, ...) {
    function String (line 3039) | String StringStreamToString(::std::stringstream* ss) {
    function String (line 3059) | String AppendUserMessage(const String& gtest_msg,
    function ReportFailureInUnknownLocation (line 3236) | void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
    function Result (line 3375) | Result HandleSehExceptionsInMethodIfSupported(
    function Result (line 3402) | Result HandleExceptionsInMethodIfSupported(
    function TestInfo (line 3533) | TestInfo* MakeAndRegisterTestInfo(
    function ReportInvalidTestCaseType (line 3549) | void ReportInvalidTestCaseType(const char* test_case_name,
    type GTestColor (line 3854) | enum GTestColor {
    function WORD (line 3864) | WORD GetColorAttribute(GTestColor color) {
    function ShouldUseColor (line 3889) | bool ShouldUseColor(bool stdout_is_tty) {
    function ColoredPrintf (line 3924) | void ColoredPrintf(GTestColor color, const char* fmt, ...) {
    function PrintFullTestCommentIfPresent (line 3970) | void PrintFullTestCommentIfPresent(const TestInfo& test_info) {
    class PrettyUnitTestResultPrinter (line 3990) | class PrettyUnitTestResultPrinter : public TestEventListener {
      method PrettyUnitTestResultPrinter (line 3992) | PrettyUnitTestResultPrinter() {}
      method PrintTestName (line 3993) | static void PrintTestName(const char * test_case, const char * test) {
      method OnTestProgramStart (line 3998) | virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsSetUpEnd (line 4001) | virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsTearDownEnd (line 4008) | virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/...
      method OnTestProgramEnd (line 4010) | virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
    class TestEventRepeater (line 4201) | class TestEventRepeater : public TestEventListener {
      method TestEventRepeater (line 4203) | TestEventRepeater() : forwarding_enabled_(true) {}
      method forwarding_enabled (line 4210) | bool forwarding_enabled() const { return forwarding_enabled_; }
      method set_forwarding_enabled (line 4211) | void set_forwarding_enabled(bool enable) { forwarding_enabled_ = ena...
    function TestEventListener (line 4246) | TestEventListener* TestEventRepeater::Release(TestEventListener *liste...
    class XmlUnitTestResultPrinter (line 4314) | class XmlUnitTestResultPrinter : public EmptyTestEventListener {
      method IsNormalizableWhitespace (line 4323) | static bool IsNormalizableWhitespace(char c) {
      method IsValidXmlCharacter (line 4328) | static bool IsValidXmlCharacter(char c) {
      method String (line 4342) | static String EscapeXmlAttribute(const char* str) {
      method String (line 4347) | static String EscapeXmlText(const char* str) { return EscapeXml(str,...
    function String (line 4428) | String XmlUnitTestResultPrinter::EscapeXml(const char* str, bool is_at...
    function string (line 4473) | string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(const stri...
    function FormatTimeInMillisAsSeconds (line 4500) | std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {
    function String (line 4618) | String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(
    class StreamingListener (line 4634) | class StreamingListener : public EmptyTestEventListener {
      method StreamingListener (line 4639) | StreamingListener(const string& host, const string& port)
      method OnTestProgramStart (line 4650) | void OnTestProgramStart(const UnitTest& /* unit_test */) {
      method OnTestProgramEnd (line 4654) | void OnTestProgramEnd(const UnitTest& unit_test) {
      method OnTestIterationStart (line 4664) | void OnTestIterationStart(const UnitTest& /* unit_test */, int itera...
      method OnTestIterationEnd (line 4669) | void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration ...
      method OnTestCaseStart (line 4675) | void OnTestCaseStart(const TestCase& test_case) {
      method OnTestCaseEnd (line 4679) | void OnTestCaseEnd(const TestCase& test_case) {
      method OnTestStart (line 4685) | void OnTestStart(const TestInfo& test_info) {
      method OnTestEnd (line 4689) | void OnTestEnd(const TestInfo& test_info) {
      method OnTestPartResult (line 4696) | void OnTestPartResult(const TestPartResult& test_part_result) {
      method CloseConnection (line 4711) | void CloseConnection() {
      method Send (line 4720) | void Send(const string& message) {
    function string (line 4744) | string StreamingListener::UrlEncode(const char* str) {
    function String (line 4839) | String OsStackTraceGetter::CurrentStackTrace(int, int) {
    class TestCaseNameIs (line 5385) | class TestCaseNameIs {
      method TestCaseNameIs (line 5388) | explicit TestCaseNameIs(const String& name)
    function TestCase (line 5412) | TestCase* UnitTestImpl::GetTestCase(const char* test_case_name,
    function SetUpEnvironment (line 5449) | static void SetUpEnvironment(Environment* env) { env->SetUp(); }
    function TearDownEnvironment (line 5450) | static void TearDownEnvironment(Environment* env) { env->TearDown(); }
    function WriteToShardStatusFileIfNeeded (line 5597) | void WriteToShardStatusFileIfNeeded() {
    function ShouldShard (line 5619) | bool ShouldShard(const char* total_shards_env,
    function Int32 (line 5664) | Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) {
    function ShouldRunTestOnShard (line 5682) | bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_...
    function OsStackTraceGetterInterface (line 5783) | OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
    function TestResult (line 5793) | TestResult* UnitTestImpl::current_test_result() {
    function String (line 5834) | String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
    class ClassUniqueToAlwaysTrue (line 5844) | class ClassUniqueToAlwaysTrue {}
    function IsTrue (line 5847) | bool IsTrue(bool condition) { return condition; }
    function AlwaysTrue (line 5849) | bool AlwaysTrue() {
    function SkipPrefix (line 5862) | bool SkipPrefix(const char* prefix, const char** pstr) {
    function ParseBoolFlag (line 5914) | bool ParseBoolFlag(const char* str, const char* flag, bool* value) {
    function ParseInt32Flag (line 5931) | bool ParseInt32Flag(const char* str, const char* flag, Int32* value) {
    function ParseStringFlag (line 5948) | bool ParseStringFlag(const char* str, const char* flag, String* value) {
    function HasGoogleTestFlagPrefix (line 5966) | static bool HasGoogleTestFlagPrefix(const char* str) {
    function PrintColorEncoded (line 5986) | static void PrintColorEncoded(const char* str) {
    function ParseGoogleTestFlagsOnlyImpl (line 6088) | void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
    function ParseGoogleTestFlagsOnly (line 6158) | void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
    function ParseGoogleTestFlagsOnly (line 6161) | void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {
    function InitGoogleTestImpl (line 6170) | void InitGoogleTestImpl(int* argc, CharType** argv) {
  function TestInfo (line 3714) | const TestInfo* TestCase::GetTestInfo(int i) const {
  function TestInfo (line 3721) | TestInfo* TestCase::GetMutableTestInfo(int i) {
  function FormatCountableNoun (line 3783) | static internal::String FormatCountableNoun(int count,
  function FormatTestCount (line 3791) | static internal::String FormatTestCount(int test_count) {
  function FormatTestCaseCount (line 3796) | static internal::String FormatTestCaseCount(int test_case_count) {
  function PrintTestPartResultToString (line 3822) | static internal::String PrintTestPartResultToString(
  function PrintTestPartResult (line 3832) | static void PrintTestPartResult(const TestPartResult& test_part_result) {
  type internal (line 3852) | namespace internal {
    function AssertionResult (line 2641) | AssertionResult HRESULTFailureHelper(const char* expr,
    function AssertionResult (line 2682) | AssertionResult IsHRESULTSuccess(const char* expr, long hr) {  // NOLINT
    function AssertionResult (line 2689) | AssertionResult IsHRESULTFailure(const char* expr, long hr) {  // NOLINT
    function UInt32 (line 2725) | inline UInt32 ChopLowBits(UInt32* bits, int n) {
    function IsUtf16SurrogatePair (line 2779) | inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
    function UInt32 (line 2785) | inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,
    function String (line 2808) | String WideStringToUtf8(const wchar_t* str, int num_chars) {
    function String (line 2834) | String String::ShowWideCString(const wchar_t * wide_c_str) {
    function String (line 2842) | String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) {
    function AssertionResult (line 2864) | AssertionResult CmpHelperSTREQ(const char* expected_expression,
    function AssertionResult (line 2880) | AssertionResult CmpHelperSTRNE(const char* s1_expression,
    function String (line 3004) | String String::Format(const char * format, ...) {
    function String (line 3039) | String StringStreamToString(::std::stringstream* ss) {
    function String (line 3059) | String AppendUserMessage(const String& gtest_msg,
    function ReportFailureInUnknownLocation (line 3236) | void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
    function Result (line 3375) | Result HandleSehExceptionsInMethodIfSupported(
    function Result (line 3402) | Result HandleExceptionsInMethodIfSupported(
    function TestInfo (line 3533) | TestInfo* MakeAndRegisterTestInfo(
    function ReportInvalidTestCaseType (line 3549) | void ReportInvalidTestCaseType(const char* test_case_name,
    type GTestColor (line 3854) | enum GTestColor {
    function WORD (line 3864) | WORD GetColorAttribute(GTestColor color) {
    function ShouldUseColor (line 3889) | bool ShouldUseColor(bool stdout_is_tty) {
    function ColoredPrintf (line 3924) | void ColoredPrintf(GTestColor color, const char* fmt, ...) {
    function PrintFullTestCommentIfPresent (line 3970) | void PrintFullTestCommentIfPresent(const TestInfo& test_info) {
    class PrettyUnitTestResultPrinter (line 3990) | class PrettyUnitTestResultPrinter : public TestEventListener {
      method PrettyUnitTestResultPrinter (line 3992) | PrettyUnitTestResultPrinter() {}
      method PrintTestName (line 3993) | static void PrintTestName(const char * test_case, const char * test) {
      method OnTestProgramStart (line 3998) | virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsSetUpEnd (line 4001) | virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsTearDownEnd (line 4008) | virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/...
      method OnTestProgramEnd (line 4010) | virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
    class TestEventRepeater (line 4201) | class TestEventRepeater : public TestEventListener {
      method TestEventRepeater (line 4203) | TestEventRepeater() : forwarding_enabled_(true) {}
      method forwarding_enabled (line 4210) | bool forwarding_enabled() const { return forwarding_enabled_; }
      method set_forwarding_enabled (line 4211) | void set_forwarding_enabled(bool enable) { forwarding_enabled_ = ena...
    function TestEventListener (line 4246) | TestEventListener* TestEventRepeater::Release(TestEventListener *liste...
    class XmlUnitTestResultPrinter (line 4314) | class XmlUnitTestResultPrinter : public EmptyTestEventListener {
      method IsNormalizableWhitespace (line 4323) | static bool IsNormalizableWhitespace(char c) {
      method IsValidXmlCharacter (line 4328) | static bool IsValidXmlCharacter(char c) {
      method String (line 4342) | static String EscapeXmlAttribute(const char* str) {
      method String (line 4347) | static String EscapeXmlText(const char* str) { return EscapeXml(str,...
    function String (line 4428) | String XmlUnitTestResultPrinter::EscapeXml(const char* str, bool is_at...
    function string (line 4473) | string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(const stri...
    function FormatTimeInMillisAsSeconds (line 4500) | std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {
    function String (line 4618) | String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(
    class StreamingListener (line 4634) | class StreamingListener : public EmptyTestEventListener {
      method StreamingListener (line 4639) | StreamingListener(const string& host, const string& port)
      method OnTestProgramStart (line 4650) | void OnTestProgramStart(const UnitTest& /* unit_test */) {
      method OnTestProgramEnd (line 4654) | void OnTestProgramEnd(const UnitTest& unit_test) {
      method OnTestIterationStart (line 4664) | void OnTestIterationStart(const UnitTest& /* unit_test */, int itera...
      method OnTestIterationEnd (line 4669) | void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration ...
      method OnTestCaseStart (line 4675) | void OnTestCaseStart(const TestCase& test_case) {
      method OnTestCaseEnd (line 4679) | void OnTestCaseEnd(const TestCase& test_case) {
      method OnTestStart (line 4685) | void OnTestStart(const TestInfo& test_info) {
      method OnTestEnd (line 4689) | void OnTestEnd(const TestInfo& test_info) {
      method OnTestPartResult (line 4696) | void OnTestPartResult(const TestPartResult& test_part_result) {
      method CloseConnection (line 4711) | void CloseConnection() {
      method Send (line 4720) | void Send(const string& message) {
    function string (line 4744) | string StreamingListener::UrlEncode(const char* str) {
    function String (line 4839) | String OsStackTraceGetter::CurrentStackTrace(int, int) {
    class TestCaseNameIs (line 5385) | class TestCaseNameIs {
      method TestCaseNameIs (line 5388) | explicit TestCaseNameIs(const String& name)
    function TestCase (line 5412) | TestCase* UnitTestImpl::GetTestCase(const char* test_case_name,
    function SetUpEnvironment (line 5449) | static void SetUpEnvironment(Environment* env) { env->SetUp(); }
    function TearDownEnvironment (line 5450) | static void TearDownEnvironment(Environment* env) { env->TearDown(); }
    function WriteToShardStatusFileIfNeeded (line 5597) | void WriteToShardStatusFileIfNeeded() {
    function ShouldShard (line 5619) | bool ShouldShard(const char* total_shards_env,
    function Int32 (line 5664) | Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) {
    function ShouldRunTestOnShard (line 5682) | bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_...
    function OsStackTraceGetterInterface (line 5783) | OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
    function TestResult (line 5793) | TestResult* UnitTestImpl::current_test_result() {
    function String (line 5834) | String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
    class ClassUniqueToAlwaysTrue (line 5844) | class ClassUniqueToAlwaysTrue {}
    function IsTrue (line 5847) | bool IsTrue(bool condition) { return condition; }
    function AlwaysTrue (line 5849) | bool AlwaysTrue() {
    function SkipPrefix (line 5862) | bool SkipPrefix(const char* prefix, const char** pstr) {
    function ParseBoolFlag (line 5914) | bool ParseBoolFlag(const char* str, const char* flag, bool* value) {
    function ParseInt32Flag (line 5931) | bool ParseInt32Flag(const char* str, const char* flag, Int32* value) {
    function ParseStringFlag (line 5948) | bool ParseStringFlag(const char* str, const char* flag, String* value) {
    function HasGoogleTestFlagPrefix (line 5966) | static bool HasGoogleTestFlagPrefix(const char* str) {
    function PrintColorEncoded (line 5986) | static void PrintColorEncoded(const char* str) {
    function ParseGoogleTestFlagsOnlyImpl (line 6088) | void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
    function ParseGoogleTestFlagsOnly (line 6158) | void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
    function ParseGoogleTestFlagsOnly (line 6161) | void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {
    function InitGoogleTestImpl (line 6170) | void InitGoogleTestImpl(int* argc, CharType** argv) {
  function TestEventListener (line 4874) | TestEventListener* TestEventListeners::Release(TestEventListener* listen...
  function TestEventListener (line 4884) | TestEventListener* TestEventListeners::repeater() { return repeater_; }
  function UnitTest (line 4937) | UnitTest * UnitTest::GetInstance() {
  function TestCase (line 5012) | const TestCase* UnitTest::GetTestCase(int i) const {
  function TestCase (line 5018) | TestCase* UnitTest::GetMutableTestCase(int i) {
  function TestEventListeners (line 5024) | TestEventListeners& UnitTest::listeners() {
  function Environment (line 5038) | Environment* UnitTest::AddEnvironment(Environment* env) {
  function TestCase (line 5202) | const TestCase* UnitTest::current_test_case() const {
  function TestInfo (line 5210) | const TestInfo* UnitTest::current_test_info() const {
  type internal (line 5253) | namespace internal {
    function AssertionResult (line 2641) | AssertionResult HRESULTFailureHelper(const char* expr,
    function AssertionResult (line 2682) | AssertionResult IsHRESULTSuccess(const char* expr, long hr) {  // NOLINT
    function AssertionResult (line 2689) | AssertionResult IsHRESULTFailure(const char* expr, long hr) {  // NOLINT
    function UInt32 (line 2725) | inline UInt32 ChopLowBits(UInt32* bits, int n) {
    function IsUtf16SurrogatePair (line 2779) | inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
    function UInt32 (line 2785) | inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,
    function String (line 2808) | String WideStringToUtf8(const wchar_t* str, int num_chars) {
    function String (line 2834) | String String::ShowWideCString(const wchar_t * wide_c_str) {
    function String (line 2842) | String String::ShowWideCStringQuoted(const wchar_t* wide_c_str) {
    function AssertionResult (line 2864) | AssertionResult CmpHelperSTREQ(const char* expected_expression,
    function AssertionResult (line 2880) | AssertionResult CmpHelperSTRNE(const char* s1_expression,
    function String (line 3004) | String String::Format(const char * format, ...) {
    function String (line 3039) | String StringStreamToString(::std::stringstream* ss) {
    function String (line 3059) | String AppendUserMessage(const String& gtest_msg,
    function ReportFailureInUnknownLocation (line 3236) | void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
    function Result (line 3375) | Result HandleSehExceptionsInMethodIfSupported(
    function Result (line 3402) | Result HandleExceptionsInMethodIfSupported(
    function TestInfo (line 3533) | TestInfo* MakeAndRegisterTestInfo(
    function ReportInvalidTestCaseType (line 3549) | void ReportInvalidTestCaseType(const char* test_case_name,
    type GTestColor (line 3854) | enum GTestColor {
    function WORD (line 3864) | WORD GetColorAttribute(GTestColor color) {
    function ShouldUseColor (line 3889) | bool ShouldUseColor(bool stdout_is_tty) {
    function ColoredPrintf (line 3924) | void ColoredPrintf(GTestColor color, const char* fmt, ...) {
    function PrintFullTestCommentIfPresent (line 3970) | void PrintFullTestCommentIfPresent(const TestInfo& test_info) {
    class PrettyUnitTestResultPrinter (line 3990) | class PrettyUnitTestResultPrinter : public TestEventListener {
      method PrettyUnitTestResultPrinter (line 3992) | PrettyUnitTestResultPrinter() {}
      method PrintTestName (line 3993) | static void PrintTestName(const char * test_case, const char * test) {
      method OnTestProgramStart (line 3998) | virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsSetUpEnd (line 4001) | virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
      method OnEnvironmentsTearDownEnd (line 4008) | virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/...
      method OnTestProgramEnd (line 4010) | virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
    class TestEventRepeater (line 4201) | class TestEventRepeater : public TestEventListener {
      method TestEventRepeater (line 4203) | TestEventRepeater() : forwarding_enabled_(true) {}
      method forwarding_enabled (line 4210) | bool forwarding_enabled() const { return forwarding_enabled_; }
      method set_forwarding_enabled (line 4211) | void set_forwarding_enabled(bool enable) { forwarding_enabled_ = ena...
    function TestEventListener (line 4246) | TestEventListener* TestEventRepeater::Release(TestEventListener *liste...
    class XmlUnitTestResultPrinter (line 4314) | class XmlUnitTestResultPrinter : public EmptyTestEventListener {
      method IsNormalizableWhitespace (line 4323) | static bool IsNormalizableWhitespace(char c) {
      method IsValidXmlCharacter (line 4328) | static bool IsValidXmlCharacter(char c) {
      method String (line 4342) | static String EscapeXmlAttribute(const char* str) {
      method String (line 4347) | static String EscapeXmlText(const char* str) { return EscapeXml(str,...
    function String (line 4428) | String XmlUnitTestResultPrinter::EscapeXml(const char* str, bool is_at...
    function string (line 4473) | string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(const stri...
    function FormatTimeInMillisAsSeconds (line 4500) | std::string FormatTimeInMillisAsSeconds(TimeInMillis ms) {
    function String (line 4618) | String XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(
    class StreamingListener (line 4634) | class StreamingListener : public EmptyTestEventListener {
      method StreamingListener (line 4639) | StreamingListener(const string& host, const string& port)
      method OnTestProgramStart (line 4650) | void OnTestProgramStart(const UnitTest& /* unit_test */) {
      method OnTestProgramEnd (line 4654) | void OnTestProgramEnd(const UnitTest& unit_test) {
      method OnTestIterationStart (line 4664) | void OnTestIterationStart(const UnitTest& /* unit_test */, int itera...
      method OnTestIterationEnd (line 4669) | void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration ...
      method OnTestCaseStart (line 4675) | void OnTestCaseStart(const TestCase& test_case) {
      method OnTestCaseEnd (line 4679) | void OnTestCaseEnd(const TestCase& test_case) {
      method OnTestStart (line 4685) | void OnTestStart(const TestInfo& test_info) {
      method OnTestEnd (line 4689) | void OnTestEnd(const TestInfo& test_info) {
      method OnTestPartResult (line 4696) | void OnTestPartResult(const TestPartResult& test_part_result) {
      method CloseConnection (line 4711) | void CloseConnection() {
      method Send (line 4720) | void Send(const string& message) {
    function string (line 4744) | string StreamingListener::UrlEncode(const char* str) {
    function String (line 4839) | String OsStackTraceGetter::CurrentStackTrace(int, int) {
    class TestCaseNameIs (line 5385) | class TestCaseNameIs {
      method TestCaseNameIs (line 5388) | explicit TestCaseNameIs(const String& name)
    function TestCase (line 5412) | TestCase* UnitTestImpl::GetTestCase(const char* test_case_name,
    function SetUpEnvironment (line 5449) | static void SetUpEnvironment(Environment* env) { env->SetUp(); }
    function TearDownEnvironment (line 5450) | static void TearDownEnvironment(Environment* env) { env->TearDown(); }
    function WriteToShardStatusFileIfNeeded (line 5597) | void WriteToShardStatusFileIfNeeded() {
    function ShouldShard (line 5619) | bool ShouldShard(const char* total_shards_env,
    function Int32 (line 5664) | Int32 Int32FromEnvOrDie(const char* var, Int32 default_val) {
    function ShouldRunTestOnShard (line 5682) | bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_...
    function OsStackTraceGetterInterface (line 5783) | OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
    function TestResult (line 5793) | TestResult* UnitTestImpl::current_test_result() {
    function String (line 5834) | String GetCurrentOsStackTraceExceptTop(UnitTest* /*unit_test*/,
    class ClassUniqueToAlwaysTrue (line 5844) | class ClassUniqueToAlwaysTrue {}
    function IsTrue (line 5847) | bool IsTrue(bool condition) { return condition; }
    function AlwaysTrue (line 5849) | bool AlwaysTrue() {
    function SkipPrefix (line 5862) | bool SkipPrefix(const char* prefix, const char** pstr) {
    function ParseBoolFlag (line 5914) | bool ParseBoolFlag(const char* str, const char* flag, bool* value) {
    function ParseInt32Flag (line 5931) | bool ParseInt32Flag(const char* str, const char* flag, Int32* value) {
    function ParseStringFlag (line 5948) | bool ParseStringFlag(const char* str, const char* flag, String* value) {
    function HasGoogleTestFlagPrefix (line 5966) | static bool HasGoogleTestFlagPrefix(const char* str) {
    function PrintColorEncoded (line 5986) | static void PrintColorEncoded(const char* str) {
    function ParseGoogleTestFlagsOnlyImpl (line 6088) | void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
    function ParseGoogleTestFlagsOnly (line 6158) | void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
    function ParseGoogleTestFlagsOnly (line 6161) | void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) {
    function InitGoogleTestImpl (line 6170) | void InitGoogleTestImpl(int* argc, CharType** argv) {
  function InitGoogleTest (line 6204) | void InitGoogleTest(int* argc, char** argv) {
  function InitGoogleTest (line 6210) | void InitGoogleTest(int* argc, wchar_t** argv) {
  type testing (line 6278) | namespace testing {
    function ScopedFakeTestPartResultReporter (line 124) | class GTEST_API_ ScopedFakeTestPartResultReporter
    function AssertionResult (line 2511) | AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
    type internal (line 6306) | namespace internal {
      function String (line 6353) | static String ExitSummary(int exit_code) {
      function ExitedUnsuccessfully (line 6379) | bool ExitedUnsuccessfully(int exit_status) {
      function String (line 6388) | static String DeathTestThreadWarning(size_t thread_count) {
      type DeathTestOutcome (line 6415) | enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }
      function DeathTestAbort (line 6422) | void DeathTestAbort(const String& message) {
      function String (line 6473) | String GetLastErrnoDescription() {
      function FailFromInternalError (line 6481) | static void FailFromInternalError(int fd) {
      class DeathTestImpl (line 6531) | class DeathTestImpl : public DeathTest {
        method DeathTestImpl (line 6533) | DeathTestImpl(const char* a_statement, const RE* a_regex)
        method RE (line 6549) | const RE* regex() const { return regex_; }
        method spawned (line 6550) | bool spawned() const { return spawned_; }
        method set_spawned (line 6551) | void set_spawned(bool is_spawned) { spawned_ = is_spawned; }
        method status (line 6552) | int status() const { return status_; }
        method set_status (line 6553) | void set_status(int a_status) { status_ = a_status; }
        method DeathTestOutcome (line 6554) | DeathTestOutcome outcome() const { return outcome_; }
        method set_outcome (line 6555) | void set_outcome(DeathTestOutcome an_outcome) { outcome_ = an_outc...
        method read_fd (line 6556) | int read_fd() const { return read_fd_; }
        method set_read_fd (line 6557) | void set_read_fd(int fd) { read_fd_ = fd; }
        method write_fd (line 6558) | int write_fd() const { return write_fd_; }
        method set_write_fd (line 6559) | void set_write_fd(int fd) { write_fd_ = fd; }
      function FormatDeathTestOutput (line 6662) | static ::std::string FormatDeathTestOutput(const ::std::string& outp...
      class WindowsDeathTest (line 6777) | class WindowsDeathTest : public DeathTestImpl {
        method WindowsDeathTest (line 6779) | WindowsDeathTest(const char* a_statement,
      class ForkingDeathTest (line 6949) | class ForkingDeathTest : public DeathTestImpl {
        method set_child_pid (line 6957) | void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; }
      class NoExecDeathTest (line 6986) | class NoExecDeathTest : public ForkingDeathTest {
        method NoExecDeathTest (line 6988) | NoExecDeathTest(const char* a_statement, const RE* a_regex) :
      class ExecDeathTest (line 7040) | class ExecDeathTest : public ForkingDeathTest {
        method ExecDeathTest (line 7042) | ExecDeathTest(const char* a_statement, const RE* a_regex,
      class Arguments (line 7054) | class Arguments {
        method Arguments (line 7056) | Arguments() {
        method AddArgument (line 7066) | void AddArgument(const char* argument) {
        method AddArguments (line 7071) | void AddArguments(const ::std::vector<Str>& arguments) {
      type ExecDeathTestArgs (line 7087) | struct ExecDeathTestArgs {
      function ExecDeathTestChildMain (line 7109) | static int ExecDeathTestChildMain(void* child_arg) {
      function StackLowerThanAddress (line 7149) | bool StackLowerThanAddress(const void* ptr) {
      function StackGrowsDown (line 7154) | bool StackGrowsDown() {
      function pid_t (line 7162) | static pid_t ExecDeathTestFork(char* const* argv, int close_fd) {
      function IsPathSeparator (line 7533) | static bool IsPathSeparator(char c) {
      function FilePath (line 7542) | FilePath FilePath::GetCurrentDir() {
      function FilePath (line 7560) | FilePath FilePath::RemoveExtension(const char* extension) const {
      function FilePath (line 7590) | FilePath FilePath::RemoveDirectoryName() const {
      function FilePath (line 7601) | FilePath FilePath::RemoveFileName() const {
      function FilePath (line 7618) | FilePath FilePath::MakeFileName(const Fi
Copy disabled (too large) Download .json
Condensed preview — 652 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (13,579K chars).
[
  {
    "path": ".gitignore",
    "chars": 236,
    "preview": ".*\n\n#\n# git files that we don't want to ignore even it they are dot-files\n#\n!.gitignore\n!.mailmap\n.github*\npatches-*\nbui"
  },
  {
    "path": "CMakeLists.txt",
    "chars": 15221,
    "preview": "################################################################################\n##\n## The University of Illinois/NCSA\n#"
  },
  {
    "path": "DEBIAN/Binary/postinst.in",
    "chars": 2464,
    "preview": "#!/bin/bash\n\n################################################################################\n##\n## The University of Il"
  },
  {
    "path": "DEBIAN/Binary/prerm.in",
    "chars": 2356,
    "preview": "#!/bin/bash\n\n################################################################################\n##\n## The University of Il"
  },
  {
    "path": "DEBIAN/Dev/postinst.in",
    "chars": 2336,
    "preview": "#!/bin/bash\n\n################################################################################\n##\n## The University of Il"
  },
  {
    "path": "DEBIAN/Dev/prerm.in",
    "chars": 2363,
    "preview": "#!/bin/bash\n\n################################################################################\n##\n## The University of Il"
  },
  {
    "path": "DEBIAN/preinst",
    "chars": 757,
    "preview": "#!/bin/bash\n\necho \"Pre-install check for ROCr.\"\n\n# Check for old installations...\nif ls /usr/lib/libhsa-runtime* 1> /dev"
  },
  {
    "path": "LICENSE.txt",
    "chars": 1748,
    "preview": "The University of Illinois/NCSA\nOpen Source License (NCSA)\n\nCopyright (c) 2014-2025, Advanced Micro Devices, Inc. All ri"
  },
  {
    "path": "README.md",
    "chars": 467,
    "preview": "# ROCR Runtime\n\n> [!CAUTION]\n> The ROCR-Runtime repository is retired, please use the [ROCm/rocm-systems](https://github"
  },
  {
    "path": "RPM/Binary/post.in",
    "chars": 2249,
    "preview": "################################################################################\n##\n## The University of Illinois/NCSA\n#"
  },
  {
    "path": "RPM/Binary/postun.in",
    "chars": 2293,
    "preview": "################################################################################\n##\n## The University of Illinois/NCSA\n#"
  },
  {
    "path": "RPM/Dev/post.in",
    "chars": 2224,
    "preview": "################################################################################\n##\n## The University of Illinois/NCSA\n#"
  },
  {
    "path": "RPM/Dev/postun.in",
    "chars": 2272,
    "preview": "################################################################################\n##\n## The University of Illinois/NCSA\n#"
  },
  {
    "path": "RPM/hsa-rocr.spec.in",
    "chars": 2251,
    "preview": "# Restore old style debuginfo creation for rpm >= 4.14.\n%undefine _debugsource_packages\n%undefine _debuginfo_subpackages"
  },
  {
    "path": "RPM/preinst",
    "chars": 757,
    "preview": "#!/bin/bash\n\necho \"Pre-install check for ROCr.\"\n\n# Check for old installations...\nif ls /usr/lib/libhsa-runtime* 1> /dev"
  },
  {
    "path": "_clang-format",
    "chars": 1851,
    "preview": "---\nLanguage:        Cpp\n# BasedOnStyle:  Google\nAccessModifierOffset: -1\nConstructorInitializerIndentWidth: 4\nAlignEsca"
  },
  {
    "path": "clang-format-diff.py",
    "chars": 5121,
    "preview": "#!/usr/bin/env python3\n#\n#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#\n#\n# Part of th"
  },
  {
    "path": "cmake_modules/utils.cmake",
    "chars": 9018,
    "preview": "################################################################################\n##\n## The University of Illinois/NCSA\n#"
  },
  {
    "path": "format",
    "chars": 158,
    "preview": "#!/bin/bash\nroot=`git rev-parse --show-toplevel`\npushd . > /dev/null\ncd $root\ngit diff -U0 HEAD^ | ./clang-format-diff.p"
  },
  {
    "path": "libhsakmt/CMakeLists.txt",
    "chars": 12911,
    "preview": "################################################################################\n##\n## Copyright (c) 2016 Advanced Micro"
  },
  {
    "path": "libhsakmt/DEBIAN/postinst.in",
    "chars": 459,
    "preview": "#!/bin/bash\n\nset -e\n\n# left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build\ndo_ldconfig() {\n  if [ \""
  },
  {
    "path": "libhsakmt/DEBIAN/prerm.in",
    "chars": 351,
    "preview": "#!/bin/bash\n\nset -e\n\n# left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build\nrm_ldconfig() {\n  if [ \""
  },
  {
    "path": "libhsakmt/LICENSE.md",
    "chars": 2534,
    "preview": "ROCT-Thunk Interface LICENSE\n\nCopyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.\n\nMIT LICENSE:\nPermiss"
  },
  {
    "path": "libhsakmt/README.md",
    "chars": 2965,
    "preview": "# ROCt Library\n\nThis repository includes the user-mode API interfaces used to interact with the ROCk driver.\n\nStarting a"
  },
  {
    "path": "libhsakmt/RPM/hsakmt-roct-devel.spec.in",
    "chars": 2251,
    "preview": "# Restore old style debuginfo creation for rpm >= 4.14.\n%undefine _debugsource_packages\n%undefine _debuginfo_subpackages"
  },
  {
    "path": "libhsakmt/RPM/libhsakmt.spec",
    "chars": 724,
    "preview": "%define name        hsakmt-rocm-dev\n%define version     %{getenv:PACKAGE_VER}\n%define packageroot %{getenv:PACKAGE_DIR}\n"
  },
  {
    "path": "libhsakmt/RPM/post.in",
    "chars": 263,
    "preview": "# left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build\nif [ \"@ENABLE_LDCONFIG@\" == \"ON\" ]; then\n  ec"
  },
  {
    "path": "libhsakmt/RPM/postun.in",
    "chars": 299,
    "preview": "# second term originates from ENABLE_LDCONFIG = ON/OFF at package build\nif [ $1 -le 1 ] && [ \"@ENABLE_LDCONFIG@\" == \"ON\""
  },
  {
    "path": "libhsakmt/cmake_modules/utils.cmake",
    "chars": 5407,
    "preview": "################################################################################\n##\n## The University of Illinois/NCSA\n#"
  },
  {
    "path": "libhsakmt/hsakmt-config.cmake.in",
    "chars": 828,
    "preview": "@PACKAGE_INIT@\n\ninclude( CMakeFindDependencyMacro )\n\n# Locate dependent packages here.  Finding them propagates usage re"
  },
  {
    "path": "libhsakmt/include/hsakmt/hsakmt.h",
    "chars": 31538,
    "preview": "/*\n * Copyright © 2024 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/include/hsakmt/hsakmt_virtio.h",
    "chars": 7084,
    "preview": "/*\n * Copyright © 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/include/hsakmt/hsakmtmodel.h",
    "chars": 1543,
    "preview": "/*\n * Copyright © 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/include/hsakmt/hsakmtmodeliface.h",
    "chars": 4445,
    "preview": "/*\n * Copyright © 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/include/hsakmt/hsakmttypes.h",
    "chars": 68548,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/include/hsakmt/linux/kfd_ioctl.h",
    "chars": 59946,
    "preview": "/*\n * Copyright 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/include/hsakmt/linux/udmabuf.h",
    "chars": 856,
    "preview": "/* GPL-2.0 WITH Linux-syscall-note */\n/*\n * This file was copied from inux-libc-dev package\n * This header provides inte"
  },
  {
    "path": "libhsakmt/libhsakmt.pc.in",
    "chars": 298,
    "preview": "prefix=${pcfiledir}/../..\nexec_prefix=${prefix}\nlibdir=${prefix}/@CMAKE_INSTALL_LIBDIR@\nincludedir=${prefix}/@CMAKE_INST"
  },
  {
    "path": "libhsakmt/src/debug.c",
    "chars": 15445,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/events.c",
    "chars": 15729,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/fmm.c",
    "chars": 135618,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/fmm.h",
    "chars": 4587,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/globals.c",
    "chars": 1650,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/hsakmtmodel.c",
    "chars": 25917,
    "preview": "/*\n * Copyright © 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/libhsakmt.c",
    "chars": 672,
    "preview": "#include <stdio.h>\n#include <errno.h>\n#include <sys/ioctl.h>\n\n#include \"libhsakmt.h\"\n#include \"hsakmt/hsakmtmodel.h\"\n\n/*"
  },
  {
    "path": "libhsakmt/src/libhsakmt.h",
    "chars": 9789,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/libhsakmt.ver",
    "chars": 2111,
    "preview": "HSAKMT_1\n{\nglobal:\nhsaKmtOpenKFD;\nhsaKmtCloseKFD;\nhsaKmtGetVersion;\nhsaKmtAcquireSystemProperties;\nhsaKmtReleaseSystemPr"
  },
  {
    "path": "libhsakmt/src/memory.c",
    "chars": 19684,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/openclose.c",
    "chars": 7495,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/pc_sampling.c",
    "chars": 6943,
    "preview": "/*\n * Copyright © 2023 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/perfctr.c",
    "chars": 19340,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/pmc_table.c",
    "chars": 89235,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/pmc_table.h",
    "chars": 2376,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/queues.c",
    "chars": 25992,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/rbtree.c",
    "chars": 8049,
    "preview": "/*\n * Copyright (C) 2002-2018 Igor Sysoev\n * Copyright (C) 2011-2018 Nginx, Inc.\n * All rights reserved.\n *\n * Redistrib"
  },
  {
    "path": "libhsakmt/src/rbtree.h",
    "chars": 2893,
    "preview": "/*\n * Copyright (C) 2002-2018 Igor Sysoev\n * Copyright (C) 2011-2018 Nginx, Inc.\n * All rights reserved.\n *\n * Redistrib"
  },
  {
    "path": "libhsakmt/src/rbtree_amd.h",
    "chars": 3727,
    "preview": "/*\n * Copyright © 2018 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/spm.c",
    "chars": 2999,
    "preview": "/*\n * Copyright © 2020 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/svm.c",
    "chars": 6721,
    "preview": "/*\n * Copyright © 2020 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/time.c",
    "chars": 2046,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/topology.c",
    "chars": 74630,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n * Copyright 2016-2018 Raptor Engineering, LLC. All Rights Reserved."
  },
  {
    "path": "libhsakmt/src/version.c",
    "chars": 1933,
    "preview": "/*\n * Copyright © 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n *"
  },
  {
    "path": "libhsakmt/src/virtio/CMakeLists.txt",
    "chars": 3938,
    "preview": "\n# Copyright 2025 Advanced Micro Devices, Inc.\n\n# Permission is hereby granted, free of charge, to any person obtaining "
  },
  {
    "path": "libhsakmt/src/virtio/hsakmt_virtio_amdgpu.c",
    "chars": 1997,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/src/virtio/hsakmt_virtio_device.c",
    "chars": 1539,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of ch"
  },
  {
    "path": "libhsakmt/src/virtio/hsakmt_virtio_device.h",
    "chars": 7098,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of ch"
  },
  {
    "path": "libhsakmt/src/virtio/hsakmt_virtio_events.c",
    "chars": 6828,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/src/virtio/hsakmt_virtio_memory.c",
    "chars": 29123,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/src/virtio/hsakmt_virtio_openclose.c",
    "chars": 4481,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/src/virtio/hsakmt_virtio_proto.h",
    "chars": 14507,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/src/virtio/hsakmt_virtio_queues.c",
    "chars": 10691,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/src/virtio/hsakmt_virtio_topology.c",
    "chars": 11186,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/src/virtio/hsakmt_virtio_vm.c",
    "chars": 3781,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/src/virtio/include/linux/virtgpu_drm.h",
    "chars": 8160,
    "preview": "/*\n * Copyright 2013 Red Hat\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person o"
  },
  {
    "path": "libhsakmt/src/virtio/libhsakmt_virtio.ver",
    "chars": 1012,
    "preview": "{\nglobal:\nvhsaKmtOpenKFD;\nvhsaKmtCloseKFD;\nvhsaKmtAllocMemory;\nvhsaKmtFreeMemory;\nvhsaKmtMapMemoryToGPUNodes;\nvhsaKmtUnm"
  },
  {
    "path": "libhsakmt/src/virtio/virtio_gpu.c",
    "chars": 9331,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/src/virtio/virtio_gpu.h",
    "chars": 4010,
    "preview": "/*\n * Copyright 2025 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/tests/kfdtest/.gitignore",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "libhsakmt/tests/kfdtest/CMakeLists.txt",
    "chars": 9517,
    "preview": "#\n# Copyright (C) 2018 Advanced Micro Devices, Inc. All Rights Reserved.\n#\n# Permission is hereby granted, free of charg"
  },
  {
    "path": "libhsakmt/tests/kfdtest/LICENSE.kfdtest",
    "chars": 1139,
    "preview": "KFDTest - KFD unit tests LICENSE\nCopyright (C) 2018 Advanced Micro Devices, Inc. All Rights Reserved.\n\nMIT LICENSE:\nPerm"
  },
  {
    "path": "libhsakmt/tests/kfdtest/README.txt",
    "chars": 733,
    "preview": "1. Note on building kfdtest\n\nTo build this kfdtest application, the following libraries should be already\ninstalled on t"
  },
  {
    "path": "libhsakmt/tests/kfdtest/gtest-1.6.0/gtest/gtest.h",
    "chars": 805378,
    "preview": "// Copyright 2005, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "libhsakmt/tests/kfdtest/gtest-1.6.0/gtest-all.cpp",
    "chars": 337728,
    "preview": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "libhsakmt/tests/kfdtest/include/amdp2ptest.h",
    "chars": 2191,
    "preview": "/*\n * Copyright 2015-2024 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person"
  },
  {
    "path": "libhsakmt/tests/kfdtest/include/asic_reg/gfx_7_2_d.h",
    "chars": 220902,
    "preview": "/*\n * Copyright (C) 2014  Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of "
  },
  {
    "path": "libhsakmt/tests/kfdtest/include/asic_reg/gfx_7_2_enum.h",
    "chars": 343065,
    "preview": "/*\n * Copyright (C) 2014  Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of "
  },
  {
    "path": "libhsakmt/tests/kfdtest/include/asic_reg/gfx_7_2_sh_mask.h",
    "chars": 1006270,
    "preview": "/*\n * Copyright (C) 2014  Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of "
  },
  {
    "path": "libhsakmt/tests/kfdtest/include/kfd_pm4_opcodes.h",
    "chars": 4605,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/include/pm4_pkt_struct_ai.h",
    "chars": 5401,
    "preview": "/*\n * Copyright (C) 2016-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/include/pm4_pkt_struct_ci.h",
    "chars": 4353,
    "preview": "/*\n * Copyright (C) 2012-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/include/pm4_pkt_struct_common.h",
    "chars": 10612,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/include/pm4_pkt_struct_nv.h",
    "chars": 4315,
    "preview": "/*\n * Copyright 2018 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/tests/kfdtest/include/sdma_pkt_struct.h",
    "chars": 9228,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/scripts/kfdtest.exclude",
    "chars": 9986,
    "preview": "declare -A FILTER\n\n# Power management tests\nFILTER[pm]=\\\n\"KFDPMTest.SuspendWithActiveProcess:\"\\\n\"KFDPMTest.SuspendWithId"
  },
  {
    "path": "libhsakmt/tests/kfdtest/scripts/run_kfdtest.sh",
    "chars": 11587,
    "preview": "#!/bin/bash\n#\n# Copyright (C) 2018 Advanced Micro Devices, Inc. All Rights Reserved.\n#\n# Permission is hereby granted, f"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/AqlQueue.cpp",
    "chars": 1667,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/AqlQueue.hpp",
    "chars": 1934,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/Assemble.cpp",
    "chars": 13059,
    "preview": "////////////////////////////////////////////////////////////////////////////////\n//\n// The University of Illinois/NCSA\n/"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/Assemble.hpp",
    "chars": 3320,
    "preview": "////////////////////////////////////////////////////////////////////////////////\n//\n// The University of Illinois/NCSA\n/"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/BaseDebug.cpp",
    "chars": 9601,
    "preview": "/*\n * Copyright (C) 2023 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/BaseDebug.hpp",
    "chars": 2913,
    "preview": "/*\n * Copyright (C) 2023 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/BasePacket.cpp",
    "chars": 2075,
    "preview": "/*\n * Copyright (C) 2017-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/BasePacket.hpp",
    "chars": 2039,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/BaseQueue.cpp",
    "chars": 7550,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/BaseQueue.hpp",
    "chars": 5365,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/Dispatch.cpp",
    "chars": 12173,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/Dispatch.hpp",
    "chars": 2372,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/GoogleTestExtension.cpp",
    "chars": 2689,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/GoogleTestExtension.hpp",
    "chars": 5024,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/IndirectBuffer.cpp",
    "chars": 2380,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/IndirectBuffer.hpp",
    "chars": 2502,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDASMTest.cpp",
    "chars": 2095,
    "preview": "/*\n * Copyright (C) 2022 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDASMTest.hpp",
    "chars": 1436,
    "preview": "/*\n * Copyright (C) 2022 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDBaseComponentTest.cpp",
    "chars": 14469,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDBaseComponentTest.hpp",
    "chars": 6396,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDCWSRTest.cpp",
    "chars": 8640,
    "preview": "/*\n * Copyright (C) 2015-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDCWSRTest.hpp",
    "chars": 1595,
    "preview": "/*\n * Copyright (C) 2015-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDDBGTest.cpp",
    "chars": 29055,
    "preview": "/*\n * Copyright (C) 2016-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDDBGTest.hpp",
    "chars": 1485,
    "preview": "/*\n * Copyright (C) 2016-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDEventTest.cpp",
    "chars": 17758,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDEventTest.hpp",
    "chars": 1701,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDEvictTest.cpp",
    "chars": 20244,
    "preview": "/*\n * Copyright (C) 2017-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDEvictTest.hpp",
    "chars": 2225,
    "preview": "/*\n * Copyright (C) 2017-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDExceptionTest.cpp",
    "chars": 15351,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDExceptionTest.hpp",
    "chars": 2856,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDGWSTest.cpp",
    "chars": 4269,
    "preview": "/*\n * Copyright (C) 2014-2019 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDGWSTest.hpp",
    "chars": 1485,
    "preview": "/*\n * Copyright (C) 2014-2019 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDGraphicsInterop.cpp",
    "chars": 9241,
    "preview": "/*\n * Copyright (C) 2016-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDGraphicsInterop.hpp",
    "chars": 1508,
    "preview": "/*\n * Copyright (C) 2016-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDHWSTest.cpp",
    "chars": 4954,
    "preview": "/*\n * Copyright (C) 2019 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDHWSTest.hpp",
    "chars": 1680,
    "preview": "/*\n * Copyright (C) 2019 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDIPCTest.cpp",
    "chars": 8369,
    "preview": "/*\n * Copyright (C) 2017-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDIPCTest.hpp",
    "chars": 4676,
    "preview": "/*\n * Copyright (C) 2017-2018 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any pe"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDLocalMemoryTest.cpp",
    "chars": 22667,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDLocalMemoryTest.hpp",
    "chars": 1533,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDMemoryTest.cpp",
    "chars": 121852,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDMemoryTest.hpp",
    "chars": 2197,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDMultiProcessTest.cpp",
    "chars": 3098,
    "preview": "/*\n * Copyright (C) 2019 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDMultiProcessTest.hpp",
    "chars": 2762,
    "preview": "/*\n * Copyright (C) 2019 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDNegativeTest.cpp",
    "chars": 11227,
    "preview": "/*\n * Copyright (C) 2024 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDNegativeTest.hpp",
    "chars": 1592,
    "preview": "/*\n * Copyright (C) 2024 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDOpenCloseKFDTest.cpp",
    "chars": 2905,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDOpenCloseKFDTest.hpp",
    "chars": 1762,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDPCSamplingTest.cpp",
    "chars": 11799,
    "preview": "/*\n * Copyright (C) 2023 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDPCSamplingTest.hpp",
    "chars": 1514,
    "preview": "/*\n * Copyright (C) 2023 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDPMTest.cpp",
    "chars": 3298,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDPMTest.hpp",
    "chars": 1475,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDPerfCounters.cpp",
    "chars": 11793,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDPerfCounters.hpp",
    "chars": 1523,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDPerformanceTest.cpp",
    "chars": 15188,
    "preview": "/*\n * Copyright (C) 2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDQMTest.cpp",
    "chars": 100396,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDQMTest.hpp",
    "chars": 3217,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDRASTest.cpp",
    "chars": 5539,
    "preview": "/*\n * Copyright (C) 2019 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDRASTest.hpp",
    "chars": 2066,
    "preview": "/*\n * Copyright (C) 2019 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDSVMEvictTest.cpp",
    "chars": 14519,
    "preview": "/*\n * Copyright (C) 2020 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDSVMEvictTest.hpp",
    "chars": 2794,
    "preview": "/*\n * Copyright (C) 2020 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDSVMRangeTest.cpp",
    "chars": 65382,
    "preview": "/*\n * Copyright (C) 2020 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDSVMRangeTest.hpp",
    "chars": 1648,
    "preview": "/*\n * Copyright (C) 2020 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDTestFlags.hpp",
    "chars": 2649,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDTestMain.cpp",
    "chars": 4115,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDTestUtil.cpp",
    "chars": 31004,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDTestUtil.hpp",
    "chars": 9429,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDTestUtilQueue.cpp",
    "chars": 17387,
    "preview": "/*\n * Copyright (C) 2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDTestUtilQueue.hpp",
    "chars": 2580,
    "preview": "/*\n * Copyright (C) 2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDTopologyTest.cpp",
    "chars": 12275,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/KFDTopologyTest.hpp",
    "chars": 1691,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/LinuxOSWrapper.cpp",
    "chars": 7152,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/OSWrapper.hpp",
    "chars": 3746,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/PM4Packet.cpp",
    "chars": 17745,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/PM4Packet.hpp",
    "chars": 9178,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/PM4Queue.cpp",
    "chars": 3006,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/PM4Queue.hpp",
    "chars": 2551,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/RDMATest.cpp",
    "chars": 7199,
    "preview": "/*\n * Copyright (C) 2016-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/RDMATest.hpp",
    "chars": 1470,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/RDMAUtil.cpp",
    "chars": 2131,
    "preview": "/*\n * Copyright (C) 2016-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/RDMAUtil.hpp",
    "chars": 1443,
    "preview": "/*\n * Copyright (C) 2016-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/SDMAPacket.cpp",
    "chars": 9917,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/SDMAPacket.hpp",
    "chars": 6930,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/SDMAQueue.cpp",
    "chars": 3614,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/SDMAQueue.hpp",
    "chars": 2534,
    "preview": "/*\n * Copyright (C) 2014-2018 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/SDMAQueueByEngId.hpp",
    "chars": 1573,
    "preview": "/*\n * Copyright (C) 2025 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/ShaderStore.cpp",
    "chars": 39070,
    "preview": "/*\n * Copyright (C) 2021 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/ShaderStore.hpp",
    "chars": 2470,
    "preview": "/*\n * Copyright (C) 2021 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free of c"
  },
  {
    "path": "libhsakmt/tests/kfdtest/src/XgmiOptimizedSDMAQueue.hpp",
    "chars": 1571,
    "preview": "/*\n * Copyright (C) 2014-2019 Advanced Micro Devices, Inc. All Rights Reserved.\n *\n * Permission is hereby granted, free"
  },
  {
    "path": "libhsakmt/tests/rdma/simple/app/CMakeLists.txt",
    "chars": 1060,
    "preview": "cmake_minimum_required (VERSION 2.6)\n\nproject (rdma_test)\n\nfind_package(PkgConfig)\npkg_check_modules(DRM REQUIRED libdrm"
  },
  {
    "path": "libhsakmt/tests/rdma/simple/app/rdma_test.cpp",
    "chars": 13065,
    "preview": "/*\n * Copyright 2015 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/tests/rdma/simple/drv/amdp2ptest.c",
    "chars": 11530,
    "preview": "/*\n * Copyright 2015 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/tests/rdma/simple/drv/amdp2ptest.h",
    "chars": 2186,
    "preview": "/*\n * Copyright 2015 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obta"
  },
  {
    "path": "libhsakmt/tests/reopen/CMakeLists.txt",
    "chars": 238,
    "preview": "cmake_minimum_required (VERSION 2.6)\n\nproject (kmtreopen)\n\nlink_directories($ENV{ROOT_OF_ROOTS}/out/lib)\n\ninclude_direct"
  },
  {
    "path": "libhsakmt/tests/reopen/kmtreopen.c",
    "chars": 4080,
    "preview": "#include <dlfcn.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <hsakmt.h>\n\nHSAKMT_STATUS HSAKMTAPI (*pfn_hsaKmtOpenK"
  },
  {
    "path": "rocrtst/.gitignore",
    "chars": 65,
    "preview": "\n*.o\n*.bin\n*.tar\n*.hsaco\n*.orig\n*.obsol\n*.bk\n*.old\n*.cmake\nbuild\n"
  },
  {
    "path": "rocrtst/Kernels/CMakeLists.txt",
    "chars": 5151,
    "preview": "\ncmake_minimum_required(VERSION 2.8.0)\n\n#\n#  Setup build environment\n#\n#  1) Setup env var LLVM_DIR and OCL_BITCODE_DIR "
  },
  {
    "path": "rocrtst/Kernels/binary_search_kernel.cl",
    "chars": 4699,
    "preview": "/*\n * =============================================================================\n *   ROC Runtime Conformance Release"
  },
  {
    "path": "rocrtst/Kernels/read_kernel.cl",
    "chars": 1318,
    "preview": "\n/**\n * @brief Opencl kernel to read from a buffer and sum its values\n * into a destination integer\n *\n * @param src Poi"
  },
  {
    "path": "rocrtst/Kernels/write_kernel.cl",
    "chars": 1247,
    "preview": "\n/**\n * @brief Opencl kernel to write into a buffer the values of const integer list\n *\n * @param dst Pointer to an arra"
  },
  {
    "path": "rocrtst/README.md",
    "chars": 4224,
    "preview": "# Building rocrtst\n\n## Library dependencies\nrocrtst needs hwloc and libnuma to build and run. On Debian systems, for exa"
  },
  {
    "path": "rocrtst/common/base_rocr.cc",
    "chars": 2749,
    "preview": "/*\n * =============================================================================\n *   ROC Runtime Conformance Release"
  },
  {
    "path": "rocrtst/common/base_rocr.h",
    "chars": 8239,
    "preview": "/*\n * =============================================================================\n *   ROC Runtime Conformance Release"
  },
  {
    "path": "rocrtst/common/base_rocr_utils.cc",
    "chars": 18717,
    "preview": "/*\n * =============================================================================\n *   ROC Runtime Conformance Release"
  },
  {
    "path": "rocrtst/common/base_rocr_utils.h",
    "chars": 8634,
    "preview": "/*\n * =============================================================================\n *   ROC Runtime Conformance Release"
  }
]

// ... and 452 more files (download for full content)

About this extraction

This page contains the full source code of the RadeonOpenCompute/ROCR-Runtime GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 652 files (12.5 MB), approximately 3.3M tokens, and a symbol index with 6386 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!