1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef INCLUDED_OPENCL_INC_OPENCL_ZONE_HXX
11 #define INCLUDED_OPENCL_INC_OPENCL_ZONE_HXX
13 #include <opencl/opencldllapi.h>
15 // FIXME: post back-port, templatize me and share with OpenGLZone.
16 class OPENCL_DLLPUBLIC OpenCLZone
18 /// how many times have we entered a CL zone
19 static volatile sal_uInt64 gnEnterCount
;
20 /// how many times have we left a new CL zone
21 static volatile sal_uInt64 gnLeaveCount
;
22 static volatile bool gbInInitialTest
;
34 gbInInitialTest
= false;
37 static bool isInZone()
39 return gnEnterCount
!= gnLeaveCount
;
42 static bool isInInitialTest()
44 return gbInInitialTest
;
47 static void hardDisable();
48 static void enterInitialTest();
51 #endif // INCLUDED_OPENCL_INC_OPENCL_ZONE_HXX
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */