C++ API Reference for Intel® Data Analytics Acceleration Library 2019

daal_atomic_int.h
1 /* file: daal_atomic_int.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 /*
17 //++
18 // Declaration of class for atomic operations with int
19 //--
20 */
21 
22 #ifndef __DAAL_ATOMIC_INT_H__
23 #define __DAAL_ATOMIC_INT_H__
24 
25 #include "services/daal_defines.h"
26 #include "services/daal_memory.h"
27 
28 namespace daal
29 {
30 namespace services
31 {
32 
33 namespace interface1
34 {
45 template<typename dataType = int>
46 class DAAL_EXPORT Atomic
47 {
48 public:
53  dataType inc();
54 
59  dataType dec();
60 
65  void set(dataType value);
66 
71  dataType get() const;
72 
76  Atomic();
77 
82  Atomic(dataType value);
83 
85  ~Atomic();
86 
87 protected:
88  void *_ptr;
89 
90 private:
91  Atomic(const Atomic &);
92 };
93 
94 
97 } // namespace interface1
98 using interface1::Atomic;
99 
100 typedef Atomic<int> AtomicInt;
101 
102 }
103 }
104 
105 #endif
daal
Definition: algorithm_base_common.h:31
daal_defines.h
daal::services::interface1::Atomic
Class that represents an atomic object.
Definition: daal_atomic_int.h:46
daal::algorithms::math::abs::value
Definition: abs_types.h:86

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