Skip to content

Commit ae5f9b9

Browse files
committed
Got rid of def.h files by moving some shared stuff into interface_fwd files: KasperskyLab#121
1 parent d7fcb78 commit ae5f9b9

8 files changed

Lines changed: 14 additions & 47 deletions

File tree

knp/backends/cpu/cpu-library/include/knp/backends/cpu-library/impl/populations/altai/impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020
#pragma once
2121

22+
#include <knp/backends/cpu-library/impl/populations/interface_fwd.h>
2223
#include <knp/core/population.h>
2324

2425
#include <limits>

knp/backends/cpu/cpu-library/include/knp/backends/cpu-library/impl/populations/altai/interface.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
*/
2020
#pragma once
2121

22-
// This include does not work at the end of the day. But its here so code analyzer will work properly.
23-
#include <knp/backends/cpu-library/impl/populations/interface_fwd.h>
24-
2522
#include <vector>
2623

2724
#include "impl.h"

knp/backends/cpu/cpu-library/include/knp/backends/cpu-library/impl/populations/blifat/impl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
*/
2020
#pragma once
2121

22+
#include <knp/backends/cpu-library/impl/populations/interface_fwd.h>
23+
2224
#include <limits>
2325

2426
#include "stdp.h"

knp/backends/cpu/cpu-library/include/knp/backends/cpu-library/impl/populations/blifat/interface.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
*/
2020
#pragma once
2121

22-
// This include does not work at the end of the day. But its here so code analyzer will work properly.
23-
#include <knp/backends/cpu-library/impl/populations/interface_fwd.h>
24-
2522
#include <vector>
2623

2724
#include "impl.h"

knp/backends/cpu/cpu-library/include/knp/backends/cpu-library/impl/projections/delta/impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
#pragma once
2121

22-
#include <knp/backends/cpu-library/impl/projections/shared/def.h>
22+
#include <knp/backends/cpu-library/impl/projections/interface_fwd.h>
2323
#include <knp/backends/cpu-library/impl/projections/training/stdp/interface.h>
2424
#include <knp/core/message_endpoint.h>
2525
#include <knp/core/projection.h>

knp/backends/cpu/cpu-library/include/knp/backends/cpu-library/impl/projections/delta/interface.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
*/
2020
#pragma once
2121

22-
// This include does not work at the end of the day. But its here so code analyzer will work properly.
23-
#include <knp/backends/cpu-library/impl/projections/interface_fwd.h>
24-
2522
#include <unordered_map>
2623
#include <vector>
2724

knp/backends/cpu/cpu-library/include/knp/backends/cpu-library/impl/projections/interface_fwd.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,16 @@
2828
#include <unordered_map>
2929
#include <vector>
3030

31-
#include "shared/def.h"
3231

32+
namespace knp::backends::cpu::projections
33+
{
34+
35+
/**
36+
* @brief Type of the message queue.
37+
*/
38+
using MessageQueue = std::unordered_map<uint64_t, knp::core::messaging::SynapticImpactMessage>;
3339

34-
namespace knp::backends::cpu::projections::impl
40+
namespace impl
3541
{
3642

3743
/**
@@ -64,4 +70,5 @@ void calculate_projection_multithreaded_interface(
6470
knp::core::Projection<Synapse> &projection, const std::unordered_map<knp::core::Step, size_t> &message_in_data,
6571
MessageQueue &future_messages, uint64_t step_n, size_t part_start, size_t part_size, std::mutex &mutex);
6672

67-
} //namespace knp::backends::cpu::projections::impl
73+
} //namespace impl
74+
} //namespace knp::backends::cpu::projections

knp/backends/cpu/cpu-library/include/knp/backends/cpu-library/impl/projections/shared/def.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)