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
8c4603c
master
1#pragma once 2#include <type_traits> 3 4// Calling conventions 5#ifdef _MSC_VER 6#define COMLIGHTCALL __stdcall 7#define DECLSPEC_NOVTABLE __declspec(novtable) 8#elif defined(__GNUC__ )|| defined(__clang__ ) 9#if defined(__i386__ ) 10#define COMLIGHTCALL __attribute__((stdcall)) 11#else 12#define COMLIGHTCALL 13#endif 14#define DECLSPEC_NOVTABLE 15#else 16#error Unsupported C++ compiler 17#endif 18 19#include "utils/guid_parse.hpp" 20 21#define DEFINE_INTERFACE_ID (guidString ) static constexpr GUID iid() { return ::ComLight::make_guid( guidString ); } 22 23namespace ComLight 24{ 25// This thing is binary compatible with IUnknown from Windows SDK. See DesktopClient demo project, it uses normal COM interop in .NET framework 4.7 to call my implementation. 26struct DECLSPEC_NOVTABLE IUnknown 27 { 28DEFINE_INTERFACE_ID ("00000000-0000-0000-c000-000000000046" ); 29 30virtual HRESULT COMLIGHTCALL QueryInterface (REFIID riid ,void ** ppvObject )= 0 ; 31 32virtual uint32_t COMLIGHTCALL AddRef ()= 0 ; 33 34virtual uint32_t COMLIGHTCALL Release ()= 0 ; 35 }; 36}