Files
UnrealEngineUWP/Engine/Source/Developer/DerivedDataCache/Private/DerivedDataCachePrivate.h
devin doucette 836757d1c2 DDC: Moved GDDCIOThreadPool out of Core
The DDC thread pool is a temporary workaround for issues with high-latency cache accesses happening on regular worker thread, which are reduced in number in 5.0 compared to 4.27. Moving it to be private within DDC will keep it easy to remove once the high-latency caches are accessed through an async API.

#rb Zousar.Shaker
#rnx
#preflight 61e5b194873f2ea48f3e0b02

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18634975 in //UE5/Release-5.0/... via CL 18634980 via CL 18634997
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18637555 by devin doucette in ue5-main branch]
2022-01-18 04:45:24 -05:00

40 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreTypes.h"
#include "Containers/StringFwd.h"
#include "Misc/AsciiSet.h"
class FDerivedDataCacheInterface;
class FQueuedThreadPool;
namespace UE::DerivedData { class FCacheRecord; }
namespace UE::DerivedData { class ICache; }
namespace UE::DerivedData { struct FCacheKey; }
namespace UE::DerivedData::Private
{
// Created by CreateCache
extern FQueuedThreadPool* GCacheThreadPool;
// Implemented in DerivedDataCache.cpp
ICache* CreateCache(FDerivedDataCacheInterface** OutLegacyCache);
// Implemented in DerivedDataCacheRecord.cpp
uint64 GetCacheRecordCompressedSize(const FCacheRecord& Record);
uint64 GetCacheRecordTotalRawSize(const FCacheRecord& Record);
uint64 GetCacheRecordRawSize(const FCacheRecord& Record);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <typename CharType>
inline bool IsValidCacheBucketName(TStringView<CharType> Name)
{
constexpr FAsciiSet Valid("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
return !Name.IsEmpty() && Name.Len() < 256 && FAsciiSet::HasOnly(Name, Valid);
}
} // UE::DerivedData::Private