Add support for CPU-only execution in C++ API.
Change-Id: Ifa6c211965eb14bfb9408404971e19827e7f5dc8
diff --git a/cpp/rsCppStructs.h b/cpp/rsCppStructs.h
index 6d0c89d..bee43d8 100644
--- a/cpp/rsCppStructs.h
+++ b/cpp/rsCppStructs.h
@@ -43,7 +43,8 @@
RS();
virtual ~RS();
- bool init();
+ bool init() { return init(false); }
+ bool init(bool forceCpu);
void setErrorHandler(ErrorHandlerFunc_t func);
ErrorHandlerFunc_t getErrorHandler() { return mErrorFunc; }
@@ -56,7 +57,7 @@
RsContext getContext() { return mContext; }
private:
- bool init(int targetApi);
+ bool init(int targetApi, bool forceCpu);
static void * threadProc(void *);
static bool gInitialized;