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
707 B27 linesraw
1#include "stdafx.h"
2
3BOOL __stdcall DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
4{
5	// Perform actions based on the reason for calling.
6	switch( fdwReason )
7	{
8	case DLL_PROCESS_ATTACH:
9		// Initialize once for each new process. Return FALSE to fail DLL load.
10		DisableThreadLibraryCalls( (HMODULE)hinstDLL );
11		break;
12	case DLL_THREAD_ATTACH:
13		// Do thread-specific initialization.
14		break;
15	case DLL_THREAD_DETACH:
16		// Do thread-specific cleanup.
17		break;
18	case DLL_PROCESS_DETACH:
19		if( lpvReserved != nullptr )
20		{
21			break; // do not do cleanup if process termination scenario
22		}
23		// Perform any necessary cleanup
24		break;
25	}
26	return TRUE;  // Successful DLL_PROCESS_ATTACH.
27}