mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
A few changes to the sharedarray object.
This commit is contained in:
parent
4ebf7c893d
commit
0894b608d1
1 changed files with 5 additions and 18 deletions
|
|
@ -17,18 +17,14 @@ private:
|
|||
//==========================================================================
|
||||
// Data members
|
||||
std::unique_ptr<T[]> data_;
|
||||
int64_t size_;
|
||||
int64_t capacity_;
|
||||
int64_t size_ {0};
|
||||
int64_t capacity_ {0};
|
||||
|
||||
public:
|
||||
//==========================================================================
|
||||
// Constructors
|
||||
|
||||
SharedArray()
|
||||
{
|
||||
capacity_ = 0;
|
||||
size_ = 0;
|
||||
}
|
||||
SharedArray() = default;
|
||||
|
||||
SharedArray(int64_t capacity) : capacity_(capacity)
|
||||
{
|
||||
|
|
@ -73,18 +69,9 @@ public:
|
|||
capacity_ = 0;
|
||||
}
|
||||
|
||||
int64_t size()
|
||||
{
|
||||
int size;
|
||||
#pragma omp atomic read
|
||||
size = size_;
|
||||
return size;
|
||||
}
|
||||
int64_t size() {return size_;}
|
||||
|
||||
int64_t capacity()
|
||||
{
|
||||
return capacity_;
|
||||
}
|
||||
int64_t capacity() {return capacity_;}
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue