@@ -640,43 +640,6 @@ void Pipeline::compile_jit(const Target &target_arg) {
640640 contents->jit_module = jit_module;
641641}
642642
643- template <typename A, typename B>
644- void set_handler (A &a, B b) {
645- a = (A)b;
646- }
647-
648- void Pipeline::set_error_handler (void (*handler)(void *, const char *)) {
649- user_assert (defined ()) << " Pipeline is undefined\n " ;
650- set_handler (contents->jit_handlers .custom_error , handler);
651- }
652-
653- void Pipeline::set_custom_allocator (void *(*cust_malloc)(void *, size_t ),
654- void (*cust_free)(void *, void *)) {
655- user_assert (defined ()) << " Pipeline is undefined\n " ;
656- set_handler (contents->jit_handlers .custom_malloc , cust_malloc);
657- set_handler (contents->jit_handlers .custom_free , cust_free);
658- }
659-
660- void Pipeline::set_custom_do_par_for (int (*cust_do_par_for)(void *, int (*)(void *, int , uint8_t *), int, int, uint8_t *)) {
661- user_assert (defined ()) << " Pipeline is undefined\n " ;
662- set_handler (contents->jit_handlers .custom_do_par_for , cust_do_par_for);
663- }
664-
665- void Pipeline::set_custom_do_task (int (*cust_do_task)(void *, int (*)(void *, int , uint8_t *), int, uint8_t *)) {
666- user_assert (defined ()) << " Pipeline is undefined\n " ;
667- set_handler (contents->jit_handlers .custom_do_task , cust_do_task);
668- }
669-
670- void Pipeline::set_custom_trace (int (*trace_fn)(void *, const halide_trace_event_t *)) {
671- user_assert (defined ()) << " Pipeline is undefined\n " ;
672- set_handler (contents->jit_handlers .custom_trace , trace_fn);
673- }
674-
675- void Pipeline::set_custom_print (void (*cust_print)(void *, const char *)) {
676- user_assert (defined ()) << " Pipeline is undefined\n " ;
677- set_handler (contents->jit_handlers .custom_print , cust_print);
678- }
679-
680643void Pipeline::set_jit_externs (const std::map<std::string, JITExtern> &externs) {
681644 user_assert (defined ()) << " Pipeline is undefined\n " ;
682645 contents->jit_externs = externs;
0 commit comments