Skip to content

Commit 201927e

Browse files
committed
Add gitignore
1 parent 37205dd commit 201927e

15 files changed

+89
-52
lines changed

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"files.associations": {
3+
"vector": "cpp"
4+
}
5+
}

input.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#pragma once
2+
3+
namespace WaitFreeSimulation
4+
{
5+
class Input
6+
{
7+
8+
};
9+
}

normalized_lock_free.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
#pragma once
2-
31
#include "normalized_lock_free.h"
42

normalized_lock_free.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "cas_descriptor.h"
66
#include "contention_measure.h"
77
#include "operation.h"
8-
#include "result.h"
98
#include <vector>
109

1110
namespace WaitFreeSimulation

operation_record.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
#pragma once
21
#include "operation_record.h"
32
#include <_types/_uint32_t.h>
43
#include <algorithm>
54

65
namespace WaitFreeSimulation
76
{
8-
template <class I, class O>
9-
OperationRecord<I, O>::OperationRecord(uint64_t current)
7+
OperationRecord::OperationRecord(uint64_t current)
108
: completed(false),
119
at(current)
1210
{}
1311

14-
template <class I, class O>
15-
OperationRecord<I, O>::OperationRecord(OperationRecord<I, O>& otherRecord):
12+
OperationRecord::OperationRecord(OperationRecord& otherRecord):
1613
completed(otherRecord.completed), at(otherRecord.at)
1714
{}
1815

operation_record.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
#pragma once
22

33
#include "operation_state.h"
4+
#include <vector>
5+
#include "input.h"
6+
#include "output.h"
7+
#include "cas_descriptor.h"
48
#include <cstdint>
59

610
namespace WaitFreeSimulation
711
{
8-
template<class I, class O>
912
class OperationRecord
1013
{
14+
using Cases = std::vector<CasDescriptor>;
15+
1116
public:
1217
bool completed;
1318
uint32_t at;
1419
uint32_t ownerTid; // Owner thread identifier
15-
I input; // Object with operation and input parameters
20+
Input input; // Object with operation and input parameters
1621
OperationState state;
22+
Output out;
23+
Cases casDescriptors;
1724

1825
OperationRecord(uint64_t current);
1926
// Copy constructor
20-
OperationRecord(OperationRecord<I, O>& otherRecord);
27+
OperationRecord(OperationRecord& otherRecord);
2128
};
2229
}

operation_record_box.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
namespace WaitFreeSimulation
44
{
5-
template <class I, class O>
6-
OperationRecordBox<I, O>::OperationRecordBox(OperationRecord<I, O>* value)
5+
OperationRecordBox::OperationRecordBox(OperationRecord* value)
76
: v(value)
87
{}
98

10-
template <class I, class O>
11-
std::atomic<OperationRecord<I, O>*> OperationRecordBox<I, O>::operationPointer() const
12-
{
13-
return v;
14-
}
9+
// std::atomic<OperationRecord*>& OperationRecordBox::operationPointer() const
10+
// {
11+
// return v;
12+
// }
1513
}

operation_record_box.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55

66
namespace WaitFreeSimulation
77
{
8-
template<class I, class O>
98
class OperationRecordBox
109
{
1110
public:
12-
OperationRecordBox(OperationRecord<I, O>* v);
13-
std::atomic<OperationRecord<I, O>*> operationPointer() const;
14-
private:
15-
std::atomic<OperationRecord<I, O>*> v;
11+
OperationRecordBox(OperationRecord* v);
12+
std::atomic<OperationRecord*> v;
1613
};
1714
}

output.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#pragma once
2+
3+
namespace WaitFreeSimulation
4+
{
5+
class Output
6+
{
7+
8+
};
9+
}

0 commit comments

Comments
 (0)