Program Listing for File playback-preprocessor.h
↰ Return to documentation for file (include\playback\playback-preprocessor.h
)
/******************************************************************************
© Intel Corporation.
This software and the related documents are Intel copyrighted materials,
and your use of them is governed by the express license under which they
were provided to you ("License"). Unless the License provides otherwise,
you may not use, modify, copy, publish, distribute, disclose or transmit
this software or the related documents without Intel's prior written
permission.
This software and the related documents are provided as is, with no express
or implied warranties, other than those that are expressly stated in the
License.
******************************************************************************/
#pragma once
#include "playback/stream-data-bookmark.h"
#include "playback/callable-cache.h"
#include "playback/sync-handler.h"
#include <memory>
#include <functional>
namespace gpa {
namespace playback {
class StreamData;
class Callable;
struct PlaybackPreprocessorConfig
{
bool enableCrossGPU;
bool enableSyncResolving;
};
class PlaybackPreprocessor
{
public:
static constexpr PlaybackPreprocessorConfig sDefaultConfig = {false, true};
PlaybackPreprocessor(StreamData* streamData, StreamDataBookmark const& rangeBegin, StreamDataBookmark const& rangeEnd,
PlaybackPreprocessorConfig config = sDefaultConfig, uint64_t targetQueueId = 0);
PlaybackPreprocessor(StreamData* streamData, PlaybackPreprocessorConfig config = sDefaultConfig);
using EnumerateCallback = std::function<void(Callable& callable)>;
void EnumerateCallsBeforeRangeRepeat(Callable& originalCall, EnumerateCallback callback);
void EnumerateAdditionalRangeCalls(EnumerateCallback callback);
const CallableCache& GetRangeCache();
private:
std::unique_ptr<sync_handler::SyncHandler> mSyncHandler;
CallableCache mRangeCache;
};
} // namespace playback
} // namespace gpa