-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use fibers to guarantee stack size on Windows (#5873)
* Use fibers for lowering. * Move fibers to Util * Wrap compile_func call in call_with_stack_requirement * Rename call_with_stack_requirement -> run_with_large_stack * Appease clang_format * Add exception handling to run_with_large_stack * clang-format * Fix 32-bit? * Fix error wording for Makefile * Improve naming in run_with_large_stack
- Loading branch information
1 parent
42092e3
commit 59a04e4
Showing
8 changed files
with
138 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,4 +97,4 @@ function(tests) | |
endforeach () | ||
|
||
set(TEST_NAMES "${TEST_NAMES}" PARENT_SCOPE) | ||
endfunction(tests) | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "Halide.h" | ||
#include <iostream> | ||
|
||
int main() { | ||
try { | ||
Halide::Internal::run_with_large_stack([]() { | ||
throw Halide::RuntimeError("Error from run_with_large_stack"); | ||
}); | ||
} catch (const Halide::RuntimeError &ex) { | ||
std::cerr << ex.what() << "\n"; | ||
return 1; | ||
} | ||
|
||
std::cout << "Success!\n"; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters