diff options
| author | Konstantin <const@const.me> | 2023-01-16 14:52:43 +0100 |
|---|---|---|
| committer | Konstantin <const@const.me> | 2023-01-16 14:52:43 +0100 |
| commit | 8c4603c73675958efc960fbd4bb599a2909d106a (patch) | |
| tree | 714dc6fc9a1672d5fd7f89676b97e10959662abc /Whisper/modelFactory.cpp | |
| parent | 990a8d0dbaefc996244097397259e92758b15cce (diff) | |
Source codes
Diffstat (limited to 'Whisper/modelFactory.cpp')
| -rw-r--r-- | Whisper/modelFactory.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Whisper/modelFactory.cpp b/Whisper/modelFactory.cpp new file mode 100644 index 0000000..a708551 --- /dev/null +++ b/Whisper/modelFactory.cpp @@ -0,0 +1,19 @@ +#include "stdafx.h" +#include "modelFactory.h" +#include "API/iContext.cl.h" + +HRESULT COMLIGHTCALL Whisper::loadModel( const wchar_t* path, eModelImplementation impl, const sLoadModelCallbacks* callbacks, iModel** pp ) +{ + switch( impl ) + { + case eModelImplementation::GPU: + return loadGpuModel( path, false, callbacks, pp ); + case eModelImplementation::Hybrid: + return loadGpuModel( path, true, callbacks, pp ); + case eModelImplementation::Reference: + return loadReferenceCpuModel( path, pp ); + } + + logError( u8"Unknown model implementation 0x%X", (int)impl ); + return E_INVALIDARG; +}
\ No newline at end of file |
