mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 23:33:20 +08:00
Updating files modified in 2018 only. Older files remain with old style copyright header Change-Id: Ic99f2e190ad74b4b7f2bd79dd7b9fa5fbe36ec92 Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
32 lines
692 B
C++
32 lines
692 B
C++
/*
|
|
* Copyright (C) 2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "runtime/helpers/properties_helper.h"
|
|
|
|
#include <vector>
|
|
#include <mutex>
|
|
|
|
namespace OCLRT {
|
|
|
|
class MapOperationsHandler {
|
|
public:
|
|
virtual ~MapOperationsHandler() = default;
|
|
|
|
bool add(void *ptr, size_t ptrLength, cl_map_flags &mapFlags, MemObjSizeArray &size, MemObjOffsetArray &offset, uint32_t mipLevel);
|
|
void remove(void *mappedPtr);
|
|
bool find(void *mappedPtr, MapInfo &outMapInfo);
|
|
size_t size() const;
|
|
|
|
protected:
|
|
bool isOverlapping(MapInfo &inputMapInfo);
|
|
std::vector<MapInfo> mappedPointers;
|
|
mutable std::mutex mtx;
|
|
};
|
|
|
|
} // namespace OCLRT
|