aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarat Dukhan <maratek@google.com>2019-10-01 12:44:36 -0700
committerMarat Dukhan <maratek@google.com>2019-10-01 12:44:36 -0700
commit0e275fe56094626349c55a524ea8b71a85daa64b (patch)
treed38a16d287d72f519c89cd3a9c4ea81b7b533575 /include
parent9e2825c0ef127a733375b56f81ee29840f5a89ef (diff)
downloadpthreadpool-0e275fe56094626349c55a524ea8b71a85daa64b.tar.gz
Add macro to guard declaration of deprecated APIs
Defining PTHREADPOOL_NO_DEPRECATED_API macro makes pthreadpool.h head omit declarations of deprecated pthreadpool_compute_* APIs
Diffstat (limited to 'include')
-rw-r--r--include/pthreadpool.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/pthreadpool.h b/include/pthreadpool.h
index 9f7f4b3..360f56e 100644
--- a/include/pthreadpool.h
+++ b/include/pthreadpool.h
@@ -161,6 +161,9 @@ void pthreadpool_parallelize_6d_tile_2d(
*/
void pthreadpool_destroy(pthreadpool_t threadpool);
+
+#ifndef PTHREADPOOL_NO_DEPRECATED_API
+
/* Legacy API for compatibility with pre-existing users (e.g. NNPACK) */
#if defined(__GNUC__)
#define PTHREADPOOL_DEPRECATED __attribute__((__deprecated__))
@@ -228,6 +231,8 @@ PTHREADPOOL_DEPRECATED void pthreadpool_compute_4d_tiled(
size_t tile_k,
size_t tile_l);
+#endif /* PTHREADPOOL_NO_DEPRECATED_API */
+
#ifdef __cplusplus
} /* extern "C" */
#endif