Skip to content

Commit 1c8fa51

Browse files
committed
add maybe_unused to is_supported_storage_kind
1 parent bdd68a6 commit 1c8fa51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bindings/cpp/src/svs_runtime_utils.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,22 +252,22 @@ auto make_storage(Tag&& SVS_UNUSED(tag), Args&&... args) {
252252
return make_storage<StorageType_t<Tag>>(std::forward<Args>(args)...);
253253
}
254254

255-
inline bool is_supported_storage_kind(StorageKind kind) {
255+
inline bool is_supported_storage_kind([[maybe_unused]] StorageKind kind) {
256+
#ifdef SVS_RUNTIME_ENABLE_LVQ_LEANVEC
256257
if (is_lvq_storage(kind) || is_leanvec_storage(kind)) {
257258
return svs::detail::lvq_leanvec_enabled();
258259
}
260+
#endif
259261
return true;
260262
}
261263

262264
template <typename F, typename... Args>
263265
auto dispatch_storage_kind(StorageKind kind, F&& f, Args&&... args) {
264-
#ifdef SVS_RUNTIME_ENABLE_LVQ_LEANVEC
265266
if (!is_supported_storage_kind(kind)) {
266267
throw StatusException(
267268
ErrorCode::NOT_IMPLEMENTED, "Requested storage kind is not supported by CPU"
268269
);
269270
}
270-
#endif
271271
switch (kind) {
272272
case StorageKind::FP32:
273273
return f(FP32Tag{}, std::forward<Args>(args)...);

0 commit comments

Comments
 (0)