Loading mlir/qir_qrt/qir-types.hpp +2 −3 Original line number Diff line number Diff line Loading @@ -129,14 +129,13 @@ struct Array { bool release_ref() { m_refCount -= 1; qcor::internal::AllocationTracker::get().updateCount(this, m_refCount); if (m_refCount == 0) { qcor::internal::AllocationTracker::get().onDeallocate(this); } return (m_refCount == 0); } int ref_count() const { return m_refCount; } ~Array() { qcor::internal::AllocationTracker::get().onDeallocate(this); } private: // Must be const, i.e. changing the element size is NOT allowed. const int m_itemSizeInBytes; Loading mlir/qir_qrt/tests/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ target_link_libraries(QirQrtTester ${XACC_TEST_LIBRARIES} xacc::xacc qir-qrt qrt # Test compile a QASM -> QIR lowering add_test(NAME mlir_qrt_compile COMMAND ${CMAKE_BINARY_DIR}/qcor ${CMAKE_CURRENT_SOURCE_DIR}/bell_qasm.qasm) link_directories(${XACC_ROOT}/lib) add_executable(QirQrtRefCountTester QirQrtRefCountTester.cpp) add_test(NAME qcor_QirQrtRefCountTester COMMAND QirQrtRefCountTester) target_include_directories(QirQrtRefCountTester PRIVATE . .. ${CMAKE_BINARY_DIR} ${XACC_ROOT}/include/gtest) Loading Loading
mlir/qir_qrt/qir-types.hpp +2 −3 Original line number Diff line number Diff line Loading @@ -129,14 +129,13 @@ struct Array { bool release_ref() { m_refCount -= 1; qcor::internal::AllocationTracker::get().updateCount(this, m_refCount); if (m_refCount == 0) { qcor::internal::AllocationTracker::get().onDeallocate(this); } return (m_refCount == 0); } int ref_count() const { return m_refCount; } ~Array() { qcor::internal::AllocationTracker::get().onDeallocate(this); } private: // Must be const, i.e. changing the element size is NOT allowed. const int m_itemSizeInBytes; Loading
mlir/qir_qrt/tests/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ target_link_libraries(QirQrtTester ${XACC_TEST_LIBRARIES} xacc::xacc qir-qrt qrt # Test compile a QASM -> QIR lowering add_test(NAME mlir_qrt_compile COMMAND ${CMAKE_BINARY_DIR}/qcor ${CMAKE_CURRENT_SOURCE_DIR}/bell_qasm.qasm) link_directories(${XACC_ROOT}/lib) add_executable(QirQrtRefCountTester QirQrtRefCountTester.cpp) add_test(NAME qcor_QirQrtRefCountTester COMMAND QirQrtRefCountTester) target_include_directories(QirQrtRefCountTester PRIVATE . .. ${CMAKE_BINARY_DIR} ${XACC_ROOT}/include/gtest) Loading