| 270 | } |
| 271 | |
| 272 | void TargetModule::write_to_dir(std::string dir) const { |
| 273 | write_map(m_cv_kern_map, dir, true); |
| 274 | write_map(m_kern_map, dir); |
| 275 | write_map(m_kern_init_map, dir); |
| 276 | write_map(m_kern_workspace_map, dir); |
| 277 | write_map(m_kern_deduce_layout_map, dir); |
| 278 | write_map(m_internal_kern_map, dir); |
| 279 | write_map(m_kern_bin_map, dir); |
| 280 | auto file_path = dir + "/target_helper.cpp"; |
| 281 | std::ofstream out_file(file_path); |
| 282 | auto helper_body = get_helper_module_str(); |
| 283 | out_file << helper_body; |
| 284 | out_file.close(); |
| 285 | } |
| 286 | |
| 287 | } // namespace test |
| 288 | } // namespace megcc |