C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

daal_atomic_int.h
1 /* file: daal_atomic_int.h */
2 /*******************************************************************************
3 * Copyright 2014-2020 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *******************************************************************************/
17 
18 /*
19 //++
20 // Declaration of class for atomic operations with int
21 //--
22 */
23 
24 #ifndef __DAAL_ATOMIC_INT_H__
25 #define __DAAL_ATOMIC_INT_H__
26 
27 #include "services/daal_defines.h"
28 #include "services/daal_memory.h"
29 
30 namespace daal
31 {
32 namespace services
33 {
34 
35 namespace interface1
36 {
47 template<typename dataType = int>
48 class DAAL_EXPORT Atomic
49 {
50 public:
55  dataType inc();
56 
61  dataType dec();
62 
67  void set(dataType value);
68 
73  dataType get() const;
74 
78  Atomic();
79 
84  Atomic(dataType value);
85 
87  ~Atomic();
88 
89 protected:
90  void *_ptr;
91 
92 private:
93  Atomic(const Atomic &);
94 };
95 
96 
99 } // namespace interface1
100 using interface1::Atomic;
101 
102 typedef Atomic<int> AtomicInt;
103 
104 }
105 }
106 
107 #endif
daal::services::interface1::Atomic
Class that represents an atomic object.
Definition: daal_atomic_int.h:48
daal_defines.h
daal::algorithms::math::abs::value
Definition: abs_types.h:88

For more complete information about compiler optimizations, see our Optimization Notice.