yum-archive/TaSTT-Whisper

High-performance GPGPU inference of OpenAI's Whisper automatic speech recognition (ASR) model

git clone https://git.yummers.dev/yum-archive/TaSTT-Whisper

KonstantinSource codes8c4603c

master
367 B22 linesraw
1#pragma once
2#include "device.h"
3#include <assert.h>
4
5namespace DirectCompute
6{
7	class MappedResource
8	{
9		D3D11_MAPPED_SUBRESOURCE mapped;
10		ID3D11Resource* resource;
11	public:
12		MappedResource();
13		HRESULT map( ID3D11Resource* res, bool reading );
14		~MappedResource();
15
16		void* data() const
17		{
18			assert( nullptr != mapped.pData );
19			return mapped.pData;
20		}
21	};
22}