Skip to content

Commit ff68815

Browse files
author
Alexander Batashev
committed
Remove unused code
Signed-off-by: Alexander Batashev <[email protected]>
1 parent a56f449 commit ff68815

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

sycl/include/CL/sycl/detail/sycl_mem_obj_allocator.hpp

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,8 @@ template <typename T>
1616
class aligned_allocator;
1717

1818
class SYCLMemObjAllocator {
19-
/* class holder_base {
20-
public:
21-
virtual ~holder_base() = default;
22-
virtual void *allocate(std::size_t) = 0;
23-
virtual void deallocate(void *, std::size_t) = 0;
24-
virtual void setAlignment(std::size_t) = 0;
25-
virtual void *getAllocator() = 0;
26-
virtual std::size_t getValueSize() const = 0;
27-
};
28-
*/
2919

3020
protected:
31-
// virtual void setAlignmentImpl(std::size_t) = 0;
3221
virtual void* getAllocatorImpl() = 0;
3322
public:
3423
virtual ~SYCLMemObjAllocator() = default;
@@ -39,34 +28,6 @@ class SYCLMemObjAllocator {
3928
template <typename AllocatorT> AllocatorT getAllocator() {
4029
return *reinterpret_cast<AllocatorT *>(getAllocatorImpl());
4130
}
42-
/* template <typename AllocatorT>
43-
SYCLMemObjAllocator(AllocatorT Allocator)
44-
: MAllocator(std::unique_ptr<holder_base>(
45-
new holder<AllocatorT>(Allocator))){}
46-
47-
template <typename AllocatorT>
48-
SYCLMemObjAllocator()
49-
: MAllocator(std::unique_ptr<holder_base>(
50-
new holder<AllocatorT>(AllocatorT()))){}
51-
52-
void *allocate(std::size_t Count) { return MAllocator->allocate(Count); }
53-
54-
void deallocate(void *Ptr, std::size_t Count) {
55-
MAllocator->deallocate(Ptr, Count);
56-
}
57-
58-
void setAlignment(std::size_t RequiredAlignment) {
59-
MAllocator->setAlignment(RequiredAlignment);
60-
}
61-
62-
template <typename AllocatorT> AllocatorT getAllocator() {
63-
return *reinterpret_cast<AllocatorT *>(MAllocator->getAllocator());
64-
}
65-
66-
std::size_t getValueSize() const { return MAllocator->getValueSize(); }
67-
68-
private:
69-
std::unique_ptr<holder_base> MAllocator;*/
7031
};
7132

7233
template <typename AllocatorT> class SYCLMemObjAllocatorHolder

0 commit comments

Comments
 (0)