| 137 | |
| 138 | volatile bool finish_checked_with_data = false; |
| 139 | int finish_callback_with_data( |
| 140 | const LiteIO* outputs, const LiteTensor* output_tensors, size_t size, |
| 141 | void* user_data) { |
| 142 | finish_checked_with_data = true; |
| 143 | auto check_func = [&]() { |
| 144 | if (user_data != NULL) { |
| 145 | std::cout << "finish_callback user_data addr=" << std::hex << user_data |
| 146 | << std::endl; |
| 147 | } |
| 148 | ASSERT_EQ(size, 1); |
| 149 | ASSERT_EQ( |
| 150 | std::string(outputs->name), |
| 151 | "TRUE_DIV(EXP[12065],reduce0[12067])[12077]"); |
| 152 | LiteLayout layout; |
| 153 | LITE_get_tensor_layout(*output_tensors, &layout); |
| 154 | ASSERT_EQ(layout.shapes[1], 1000); |
| 155 | }; |
| 156 | check_func(); |
| 157 | return 0; |
| 158 | } |
| 159 | |
| 160 | } // namespace |
| 161 |
nothing calls this directly
no test coverage detected