mirror of
https://github.com/boostorg/compute.git
synced 2026-01-26 18:32:48 +00:00
Implements offline kernel caching
See kylelutz/compute#21 This adds program::build_with_source() function that both creates and builds the program for the given context with supplied source and compile options. In case BOOST_COMPUTE_USE_OFFLINE_CACHE macro is defined, it also saves the compiled program binary for reuse in the offline cache located in $HOME/.boost_compute folder on UNIX-like systems and in %APPDATA%/boost_compute folder on Windows. All internal uses of program::create_with_source() followed by program::build() are replaced with program::build_with_source().
This commit is contained in:
@@ -31,7 +31,9 @@ BOOST_AUTO_TEST_CASE(get_program_info)
|
||||
program.build();
|
||||
|
||||
// check program info
|
||||
#ifndef BOOST_COMPUTE_USE_OFFLINE_CACHE
|
||||
BOOST_CHECK(program.source().empty() == false);
|
||||
#endif
|
||||
BOOST_CHECK(program.get_context() == context);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user