Skip to content

Commit 7463e19

Browse files
Cleanup headers
Make TUs and headers self-contained, remove unused headers Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
1 parent ac3005a commit 7463e19

File tree

88 files changed

+210
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+210
-117
lines changed

opencl/source/api/api_enter.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
/*
2-
* Copyright (C) 2020-2021 Intel Corporation
2+
* Copyright (C) 2020-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

8+
#pragma once
9+
810
#include "shared/source/utilities/logger.h"
911
#include "shared/source/utilities/perf_profiler.h"
1012

opencl/source/cl_device/cl_device_caps.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "driver_version.h"
2323

24+
#include <sstream>
2425
#include <string>
2526

2627
namespace NEO {

opencl/test/unit_test/offline_compiler/decoder/encoder_tests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include "shared/offline_compiler/source/decoder/binary_decoder.h"
9+
#include "shared/source/helpers/aligned_memory.h"
910
#include "shared/source/helpers/array_count.h"
1011
#include "shared/test/common/helpers/test_files.h"
1112

@@ -576,4 +577,4 @@ TEST(EncoderTests, WhenProcessingDeviceBinaryAndAsmIsAvailableThenAseembleItWith
576577
EXPECT_EQ(encoder.filesMap["kernel_KernelHeap.asm"], encoder.getMockIga()->receivedAsm);
577578
}
578579

579-
} // namespace NEO
580+
} // namespace NEO

opencl/test/unit_test/os_interface/linux/device_command_stream_fixture_context.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
#include "third_party/uapi/prelim/drm/i915_drm.h"
1313

14+
#include <iostream>
15+
1416
int DrmMockCustomPrelimContext::ioctlExtra(unsigned long request, void *arg) {
1517
switch (request) {
1618
case PRELIM_DRM_IOCTL_I915_GEM_CREATE_EXT: {

shared/offline_compiler/source/queries.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

8+
#pragma once
9+
810
#include "shared/source/utilities/const_stringref.h"
911

1012
namespace NEO {

shared/source/aub/aub_helper_add_mmio.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2019-2021 Intel Corporation
2+
* Copyright (C) 2019-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -10,6 +10,8 @@
1010

1111
#include "third_party/aub_stream/headers/aubstream.h"
1212

13+
#include <sstream>
14+
1315
namespace NEO {
1416

1517
MMIOList AubHelper::getAdditionalMmioList() {

shared/source/command_container/cmdcontainer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "shared/source/helpers/debug_helpers.h"
1616
#include "shared/source/helpers/heap_helper.h"
1717
#include "shared/source/helpers/hw_helper.h"
18+
#include "shared/source/helpers/string.h"
1819
#include "shared/source/indirect_heap/indirect_heap.h"
1920
#include "shared/source/memory_manager/allocations_list.h"
2021
#include "shared/source/memory_manager/memory_manager.h"

shared/source/command_container/walker_partition_xehp_and_later.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -10,6 +10,7 @@
1010
#include "shared/source/command_container/command_encoder.h"
1111
#include "shared/source/command_container/walker_partition_interface.h"
1212
#include "shared/source/debug_settings/debug_settings_manager.h"
13+
#include "shared/source/helpers/aligned_memory.h"
1314
#include "shared/source/helpers/basic_math.h"
1415
#include "shared/source/helpers/hw_helper.h"
1516
#include "shared/source/helpers/hw_info.h"
@@ -486,9 +487,9 @@ void programPartitionedWalker(void *&inputAddress, uint32_t &totalBytesProgramme
486487
//inital setup section
487488
1. MI_LOAD_REGISTER(PREDICATION_MASK, active partition mask )
488489
//loop 1 - loop as long as there are partitions to be serviced
489-
2. MI_ATOMIC_INC( ATOMIC LOCATION #31 within CMD buffer )
490+
2. MI_ATOMIC_INC( ATOMIC LOCATION #31 within CMD buffer )
490491
3. MI_LOAD_REGISTER_REG ( ATOMIC RESULT -> WPARID )
491-
4. MI_SET_PREDICATE( WPARID MODE )
492+
4. MI_SET_PREDICATE( WPARID MODE )
492493
5. BATCH_BUFFER_START( LOCATION #28 ) // this will not be executed if partition outside of active virtual partitions
493494
//loop 1 ends here, if we are here it means there are no more partitions
494495
6. MI_SET_PREDICATE ( OFF )

shared/source/command_stream/linear_stream.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,21 @@
1212
namespace NEO {
1313

1414
LinearStream::LinearStream(GraphicsAllocation *gfxAllocation, void *buffer, size_t bufferSize)
15-
: sizeUsed(0), maxAvailableSpace(bufferSize), buffer(buffer), graphicsAllocation(gfxAllocation) {
15+
: maxAvailableSpace(bufferSize), buffer(buffer), graphicsAllocation(gfxAllocation) {
1616
}
1717

1818
LinearStream::LinearStream(void *buffer, size_t bufferSize)
1919
: LinearStream(nullptr, buffer, bufferSize) {
2020
}
2121

2222
LinearStream::LinearStream(GraphicsAllocation *gfxAllocation)
23-
: sizeUsed(0), graphicsAllocation(gfxAllocation) {
23+
: graphicsAllocation(gfxAllocation) {
2424
if (gfxAllocation) {
2525
maxAvailableSpace = gfxAllocation->getUnderlyingBufferSize();
2626
buffer = gfxAllocation->getUnderlyingBuffer();
27-
} else {
28-
maxAvailableSpace = 0;
29-
buffer = nullptr;
3027
}
3128
}
3229

33-
LinearStream::LinearStream()
34-
: LinearStream(nullptr) {
35-
}
36-
3730
LinearStream::LinearStream(void *buffer, size_t bufferSize, CommandContainer *cmdContainer, size_t batchBufferEndSize)
3831
: LinearStream(buffer, bufferSize) {
3932
this->cmdContainer = cmdContainer;

shared/source/command_stream/linear_stream.h

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
#pragma once
99
#include "shared/source/command_container/cmdcontainer.h"
1010
#include "shared/source/helpers/debug_helpers.h"
11-
#include "shared/source/helpers/hw_helper.h"
1211
#include "shared/source/helpers/ptr_math.h"
13-
#include "shared/source/helpers/string.h"
1412

1513
#include <atomic>
1614
#include <cstddef>
@@ -22,11 +20,15 @@ class GraphicsAllocation;
2220
class LinearStream {
2321
public:
2422
virtual ~LinearStream() = default;
25-
LinearStream();
23+
LinearStream() = default;
2624
LinearStream(void *buffer, size_t bufferSize);
27-
LinearStream(GraphicsAllocation *buffer);
25+
LinearStream(GraphicsAllocation *gfxAllocation);
2826
LinearStream(GraphicsAllocation *gfxAllocation, void *buffer, size_t bufferSize);
2927
LinearStream(void *buffer, size_t bufferSize, CommandContainer *cmdContainer, size_t batchBufferEndSize);
28+
29+
LinearStream(const LinearStream &) = delete;
30+
LinearStream &operator=(const LinearStream &) = delete;
31+
3032
void *getCpuBase() const;
3133
void *getSpace(size_t size);
3234
size_t getMaxAvailableSpace() const;
@@ -48,13 +50,13 @@ class LinearStream {
4850
}
4951

5052
protected:
51-
std::atomic<size_t> sizeUsed;
52-
size_t maxAvailableSpace;
53-
void *buffer;
54-
GraphicsAllocation *graphicsAllocation;
55-
CommandContainer *cmdContainer = nullptr;
56-
size_t batchBufferEndSize = 0;
57-
uint64_t gpuBase = 0;
53+
std::atomic<size_t> sizeUsed{0};
54+
size_t maxAvailableSpace{0};
55+
void *buffer{nullptr};
56+
GraphicsAllocation *graphicsAllocation{nullptr};
57+
CommandContainer *cmdContainer{nullptr};
58+
size_t batchBufferEndSize{0};
59+
uint64_t gpuBase{0};
5860
};
5961

6062
inline void *LinearStream::getCpuBase() const {

0 commit comments

Comments
 (0)