2
0
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:
Denis Demidov
2013-12-26 15:12:01 +04:00
parent 55eeada078
commit 562f149b18
13 changed files with 210 additions and 33 deletions

View File

@@ -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);
}