mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Avoided warning C4458: declaration of 'X' hides class member. (#9541)
This commit is contained in:
parent
f29057c7c0
commit
1aabba7120
4 changed files with 9 additions and 9 deletions
|
|
@ -445,7 +445,7 @@ namespace Dml
|
|||
|
||||
HRESULT STDMETHODCALLTYPE ExecutionProviderImpl::FillTensorWithPattern(
|
||||
IMLOperatorTensor* dst,
|
||||
gsl::span<const std::byte> value // Data type agnostic value, treated as raw bits
|
||||
gsl::span<const std::byte> rawValue // Data type agnostic rawValue, treated as raw bits
|
||||
) const noexcept try
|
||||
{
|
||||
auto mlTensor = MLOperatorTensor(dst).GetDataInterface();
|
||||
|
|
@ -453,7 +453,7 @@ namespace Dml
|
|||
{
|
||||
const AllocationInfo* dstAllocInfo = m_allocator->DecodeDataHandle(mlTensor.Get());
|
||||
ID3D12Resource* dstData = dstAllocInfo->GetResource();
|
||||
m_context->FillBufferWithPattern(dstData, value);
|
||||
m_context->FillBufferWithPattern(dstData, rawValue);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ namespace Dml
|
|||
|
||||
STDMETHOD(FillTensorWithPattern)(
|
||||
IMLOperatorTensor* dst,
|
||||
gsl::span<const std::byte> value
|
||||
gsl::span<const std::byte> rawValue
|
||||
) const noexcept final;
|
||||
|
||||
STDMETHOD(UploadToResource)(ID3D12Resource* dstData, const void* srcData, uint64_t srcDataSize) const noexcept final;
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ size_t AttributeValue::ElementCount() const {
|
|||
}
|
||||
|
||||
void AttributeValue::GetAttribute(
|
||||
MLOperatorAttributeType type,
|
||||
MLOperatorAttributeType attributeType,
|
||||
uint32_t elementCount,
|
||||
size_t elementByteSize,
|
||||
void* value) const {
|
||||
switch (type) {
|
||||
switch (attributeType) {
|
||||
case MLOperatorAttributeType::Float:
|
||||
ML_CHECK_BOOL(floats.size() == 1);
|
||||
__fallthrough;
|
||||
|
|
@ -76,7 +76,7 @@ void AttributeValue::GetAttribute(
|
|||
}
|
||||
|
||||
const std::string* AttributeValue::GetStringAttribute(
|
||||
_In_z_ const char* name,
|
||||
_In_z_ const char* attributeName,
|
||||
uint32_t elementIndex) const {
|
||||
ML_CHECK_BOOL((type == MLOperatorAttributeType::String && elementIndex == 0 && strings.size() == 1) ||
|
||||
(type == MLOperatorAttributeType::StringArray && elementIndex < strings.size()));
|
||||
|
|
@ -1925,4 +1925,4 @@ std::tuple<std::unique_ptr<std::byte[]>, size_t> UnpackTensor(const onnx::Tensor
|
|||
|
||||
return std::make_tuple(std::move(unpackedTensor), tensorByteSize);
|
||||
}
|
||||
} // namespace winrt::Windows::AI::MachineLearning::implementation
|
||||
} // namespace winrt::Windows::AI::MachineLearning::implementation
|
||||
|
|
|
|||
|
|
@ -66,13 +66,13 @@ public:
|
|||
size_t ElementCount() const;
|
||||
|
||||
void GetAttribute(
|
||||
MLOperatorAttributeType type,
|
||||
MLOperatorAttributeType attributeType,
|
||||
uint32_t elementCount,
|
||||
size_t elementByteSize,
|
||||
void* value) const;
|
||||
|
||||
const std::string* GetStringAttribute(
|
||||
_In_z_ const char* name,
|
||||
_In_z_ const char* attributeName,
|
||||
uint32_t elementIndex) const;
|
||||
|
||||
std::string name;
|
||||
|
|
|
|||
Loading…
Reference in a new issue