Remove inline attributes

This commit is contained in:
Niko 2025-08-13 13:17:15 -07:00
parent 96bbf7b89b
commit 623e5a40cb
No known key found for this signature in database
3 changed files with 0 additions and 57 deletions

View file

@ -114,7 +114,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_n_vocab (struct whisper_context * ctx)`
#[inline]
pub fn n_vocab(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_n_vocab(self.ctx) }
}
@ -126,7 +125,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_n_text_ctx (struct whisper_context * ctx);`
#[inline]
pub fn n_text_ctx(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_n_text_ctx(self.ctx) }
}
@ -138,7 +136,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_n_audio_ctx (struct whisper_context * ctx);`
#[inline]
pub fn n_audio_ctx(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_n_audio_ctx(self.ctx) }
}
@ -147,7 +144,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_is_multilingual(struct whisper_context * ctx)`
#[inline]
pub fn is_multilingual(&self) -> bool {
unsafe { whisper_rs_sys::whisper_is_multilingual(self.ctx) != 0 }
}
@ -159,7 +155,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_n_vocab (struct whisper_context * ctx);`
#[inline]
pub fn model_n_vocab(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_n_vocab(self.ctx) }
}
@ -171,7 +166,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_n_audio_ctx (struct whisper_context * ctx)`
#[inline]
pub fn model_n_audio_ctx(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_n_audio_ctx(self.ctx) }
}
@ -183,7 +177,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_n_audio_state(struct whisper_context * ctx);`
#[inline]
pub fn model_n_audio_state(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_n_audio_state(self.ctx) }
}
@ -195,7 +188,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_n_audio_head (struct whisper_context * ctx);`
#[inline]
pub fn model_n_audio_head(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_n_audio_head(self.ctx) }
}
@ -207,7 +199,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_n_audio_layer(struct whisper_context * ctx);`
#[inline]
pub fn model_n_audio_layer(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_n_audio_layer(self.ctx) }
}
@ -219,7 +210,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_n_text_ctx (struct whisper_context * ctx)`
#[inline]
pub fn model_n_text_ctx(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_n_text_ctx(self.ctx) }
}
@ -231,7 +221,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_n_text_state (struct whisper_context * ctx);`
#[inline]
pub fn model_n_text_state(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_n_text_state(self.ctx) }
}
@ -243,7 +232,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_n_text_head (struct whisper_context * ctx);`
#[inline]
pub fn model_n_text_head(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_n_text_head(self.ctx) }
}
@ -255,7 +243,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_n_text_layer (struct whisper_context * ctx);`
#[inline]
pub fn model_n_text_layer(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_n_text_layer(self.ctx) }
}
@ -267,7 +254,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_n_mels (struct whisper_context * ctx);`
#[inline]
pub fn model_n_mels(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_n_mels(self.ctx) }
}
@ -279,7 +265,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_ftype (struct whisper_context * ctx);`
#[inline]
pub fn model_ftype(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_ftype(self.ctx) }
}
@ -291,7 +276,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `int whisper_model_type (struct whisper_context * ctx);`
#[inline]
pub fn model_type(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_model_type(self.ctx) }
}
@ -350,7 +334,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_eot (struct whisper_context * ctx)`
#[inline]
pub fn token_eot(&self) -> WhisperTokenId {
unsafe { whisper_rs_sys::whisper_token_eot(self.ctx) }
}
@ -359,7 +342,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_sot (struct whisper_context * ctx)`
#[inline]
pub fn token_sot(&self) -> WhisperTokenId {
unsafe { whisper_rs_sys::whisper_token_sot(self.ctx) }
}
@ -368,7 +350,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_solm(struct whisper_context * ctx)`
#[inline]
pub fn token_solm(&self) -> WhisperTokenId {
unsafe { whisper_rs_sys::whisper_token_solm(self.ctx) }
}
@ -377,7 +358,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_prev(struct whisper_context * ctx)`
#[inline]
pub fn token_prev(&self) -> WhisperTokenId {
unsafe { whisper_rs_sys::whisper_token_prev(self.ctx) }
}
@ -386,7 +366,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_nosp(struct whisper_context * ctx)`
#[inline]
pub fn token_nosp(&self) -> WhisperTokenId {
unsafe { whisper_rs_sys::whisper_token_nosp(self.ctx) }
}
@ -395,7 +374,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_not (struct whisper_context * ctx)`
#[inline]
pub fn token_not(&self) -> WhisperTokenId {
unsafe { whisper_rs_sys::whisper_token_not(self.ctx) }
}
@ -404,7 +382,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_beg (struct whisper_context * ctx)`
#[inline]
pub fn token_beg(&self) -> WhisperTokenId {
unsafe { whisper_rs_sys::whisper_token_beg(self.ctx) }
}
@ -416,7 +393,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_lang(struct whisper_context * ctx, int lang_id)`
#[inline]
pub fn token_lang(&self, lang_id: c_int) -> WhisperTokenId {
unsafe { whisper_rs_sys::whisper_token_lang(self.ctx, lang_id) }
}
@ -425,7 +401,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `void whisper_print_timings(struct whisper_context * ctx)`
#[inline]
pub fn print_timings(&self) {
unsafe { whisper_rs_sys::whisper_print_timings(self.ctx) }
}
@ -434,7 +409,6 @@ impl WhisperInnerContext {
///
/// # C++ equivalent
/// `void whisper_reset_timings(struct whisper_context * ctx)`
#[inline]
pub fn reset_timings(&self) {
unsafe { whisper_rs_sys::whisper_reset_timings(self.ctx) }
}
@ -458,7 +432,6 @@ impl WhisperInnerContext {
}
impl Drop for WhisperInnerContext {
#[inline]
fn drop(&mut self) {
unsafe { whisper_rs_sys::whisper_free(self.ctx) };
}

View file

@ -76,7 +76,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_n_vocab (struct whisper_context * ctx)`
#[inline]
pub fn n_vocab(&self) -> c_int {
self.ctx.n_vocab()
}
@ -88,7 +87,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_n_text_ctx (struct whisper_context * ctx);`
#[inline]
pub fn n_text_ctx(&self) -> c_int {
self.ctx.n_text_ctx()
}
@ -100,7 +98,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_n_audio_ctx (struct whisper_context * ctx);`
#[inline]
pub fn n_audio_ctx(&self) -> c_int {
self.ctx.n_audio_ctx()
}
@ -109,7 +106,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_is_multilingual(struct whisper_context * ctx)`
#[inline]
pub fn is_multilingual(&self) -> bool {
self.ctx.is_multilingual()
}
@ -121,7 +117,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_n_vocab (struct whisper_context * ctx);`
#[inline]
pub fn model_n_vocab(&self) -> c_int {
self.ctx.model_n_vocab()
}
@ -133,7 +128,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_n_audio_ctx (struct whisper_context * ctx)`
#[inline]
pub fn model_n_audio_ctx(&self) -> c_int {
self.ctx.model_n_audio_ctx()
}
@ -145,7 +139,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_n_audio_state(struct whisper_context * ctx);`
#[inline]
pub fn model_n_audio_state(&self) -> c_int {
self.ctx.model_n_audio_state()
}
@ -157,7 +150,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_n_audio_head (struct whisper_context * ctx);`
#[inline]
pub fn model_n_audio_head(&self) -> c_int {
self.ctx.model_n_audio_head()
}
@ -169,7 +161,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_n_audio_layer(struct whisper_context * ctx);`
#[inline]
pub fn model_n_audio_layer(&self) -> c_int {
self.ctx.model_n_audio_layer()
}
@ -181,7 +172,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_n_text_ctx (struct whisper_context * ctx)`
#[inline]
pub fn model_n_text_ctx(&self) -> c_int {
self.ctx.model_n_text_ctx()
}
@ -193,7 +183,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_n_text_state (struct whisper_context * ctx);`
#[inline]
pub fn model_n_text_state(&self) -> c_int {
self.ctx.model_n_text_state()
}
@ -205,7 +194,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_n_text_head (struct whisper_context * ctx);`
#[inline]
pub fn model_n_text_head(&self) -> c_int {
self.ctx.model_n_text_head()
}
@ -217,7 +205,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_n_text_layer (struct whisper_context * ctx);`
#[inline]
pub fn model_n_text_layer(&self) -> c_int {
self.ctx.model_n_text_layer()
}
@ -229,7 +216,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_n_mels (struct whisper_context * ctx);`
#[inline]
pub fn model_n_mels(&self) -> c_int {
self.ctx.model_n_mels()
}
@ -241,7 +227,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_ftype (struct whisper_context * ctx);`
#[inline]
pub fn model_ftype(&self) -> c_int {
self.ctx.model_ftype()
}
@ -253,7 +238,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `int whisper_model_type (struct whisper_context * ctx);`
#[inline]
pub fn model_type(&self) -> c_int {
self.ctx.model_type()
}
@ -300,7 +284,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_eot (struct whisper_context * ctx)`
#[inline]
pub fn token_eot(&self) -> WhisperTokenId {
self.ctx.token_eot()
}
@ -309,7 +292,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_sot (struct whisper_context * ctx)`
#[inline]
pub fn token_sot(&self) -> WhisperTokenId {
self.ctx.token_sot()
}
@ -318,7 +300,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_solm(struct whisper_context * ctx)`
#[inline]
pub fn token_solm(&self) -> WhisperTokenId {
self.ctx.token_solm()
}
@ -327,7 +308,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_prev(struct whisper_context * ctx)`
#[inline]
pub fn token_prev(&self) -> WhisperTokenId {
self.ctx.token_prev()
}
@ -336,7 +316,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_nosp(struct whisper_context * ctx)`
#[inline]
pub fn token_nosp(&self) -> WhisperTokenId {
self.ctx.token_nosp()
}
@ -345,7 +324,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_not (struct whisper_context * ctx)`
#[inline]
pub fn token_not(&self) -> WhisperTokenId {
self.ctx.token_not()
}
@ -354,7 +332,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_beg (struct whisper_context * ctx)`
#[inline]
pub fn token_beg(&self) -> WhisperTokenId {
self.ctx.token_beg()
}
@ -366,7 +343,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `whisper_token whisper_token_lang(struct whisper_context * ctx, int lang_id)`
#[inline]
pub fn token_lang(&self, lang_id: c_int) -> WhisperTokenId {
self.ctx.token_lang(lang_id)
}
@ -375,7 +351,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `void whisper_print_timings(struct whisper_context * ctx)`
#[inline]
pub fn print_timings(&self) {
self.ctx.print_timings()
}
@ -384,7 +359,6 @@ impl WhisperContext {
///
/// # C++ equivalent
/// `void whisper_reset_timings(struct whisper_context * ctx)`
#[inline]
pub fn reset_timings(&self) {
self.ctx.reset_timings()
}

View file

@ -252,7 +252,6 @@ impl WhisperState {
///
/// # C++ equivalent
/// `int whisper_n_len_from_state(struct whisper_context * ctx)`
#[inline]
pub fn n_len(&self) -> Result<c_int, WhisperError> {
Ok(unsafe { whisper_rs_sys::whisper_n_len_from_state(self.ptr) })
}
@ -264,7 +263,6 @@ impl WhisperState {
///
/// # C++ equivalent
/// `int whisper_n_vocab (struct whisper_context * ctx)`
#[inline]
pub fn n_vocab(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_n_vocab(self.ctx.ctx) }
}
@ -317,7 +315,6 @@ impl WhisperState {
///
/// # C++ equivalent
/// `int whisper_full_n_segments(struct whisper_context * ctx)`
#[inline]
pub fn full_n_segments(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_full_n_segments_from_state(self.ptr) }
}
@ -326,7 +323,6 @@ impl WhisperState {
///
/// # C++ equivalent
/// `int whisper_full_lang_id_from_state(struct whisper_state * state);`
#[inline]
pub fn full_lang_id_from_state(&self) -> c_int {
unsafe { whisper_rs_sys::whisper_full_lang_id_from_state(self.ptr) }
}