From f6e4d9bb597f8dcf2c00c50e37ba30a19b4d5693 Mon Sep 17 00:00:00 2001 From: qwerty2501 <939468+qwerty2501@users.noreply.github.com> Date: Thu, 25 Aug 2022 19:40:21 +0900 Subject: [PATCH] =?UTF-8?q?is=5Fgpu=5Fmode=E3=81=AB=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/voicevox_core/src/publish.rs | 6 +++--- crates/voicevox_core_c_api/src/lib.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/voicevox_core/src/publish.rs b/crates/voicevox_core/src/publish.rs index c7f710f18..fa3563c43 100644 --- a/crates/voicevox_core/src/publish.rs +++ b/crates/voicevox_core/src/publish.rs @@ -64,7 +64,7 @@ impl VoicevoxCore { Ok(()) } - pub fn is_use_gpu(&self) -> bool { + pub fn is_gpu_mode(&self) -> bool { self.use_gpu } @@ -656,7 +656,7 @@ mod tests { #[rstest] fn is_use_gpu_works() { let internal = VoicevoxCore::new_with_mutex(); - assert_eq!(false, internal.lock().unwrap().is_use_gpu()); + assert_eq!(false, internal.lock().unwrap().is_gpu_mode()); internal .lock() .unwrap() @@ -665,7 +665,7 @@ mod tests { ..Default::default() }) .unwrap(); - assert_eq!(false, internal.lock().unwrap().is_use_gpu()); + assert_eq!(false, internal.lock().unwrap().is_gpu_mode()); } #[rstest] diff --git a/crates/voicevox_core_c_api/src/lib.rs b/crates/voicevox_core_c_api/src/lib.rs index d475f705f..36a40c547 100644 --- a/crates/voicevox_core_c_api/src/lib.rs +++ b/crates/voicevox_core_c_api/src/lib.rs @@ -76,8 +76,8 @@ pub extern "C" fn voicevox_load_model(speaker_id: usize) -> VoicevoxResultCode { } #[no_mangle] -pub extern "C" fn voicevox_is_use_gpu() -> bool { - lock_internal().is_use_gpu() +pub extern "C" fn voicevox_is_gpu_mode() -> bool { + lock_internal().is_gpu_mode() } #[no_mangle]