Skip to content

Commit dac23cd

Browse files
committed
cpu: tidy: modernize-use
1 parent f72e2ee commit dac23cd

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/cpu/rnn/rnn_utils.hpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ struct rnn_conf_t {
316316
size_t weights_iter_comp_offset = 0, weights_iter_pack_size = 0;
317317
size_t weights_projection_comp_offset = 0, weights_projection_pack_size = 0;
318318

319-
bool copy_bias = 0;
319+
bool copy_bias = false;
320320
int weights_layer_ld = 0, weights_layer_nld = 0;
321321
int diff_weights_layer_ld = 0, diff_weights_layer_nld = 0;
322322
int weights_iter_ld = 0, weights_iter_nld = 0;
@@ -347,9 +347,10 @@ struct rnn_conf_t {
347347
int dst_iter_c_ld_ = 0, dst_iter_c_nld_ = 0;
348348

349349
int weights_iter_compensation_size = 0, weights_layer_compensation_size = 0;
350-
bool is_fwd = 0, is_training = 0, is_lbr = 0, is_lstm_peephole = 0,
351-
is_lstm_projection = 0, is_augru = 0, is_orig_gru = 0;
352-
bool use_workspace = 0;
350+
bool is_fwd = false, is_training = false, is_lbr = false,
351+
is_lstm_peephole = false, is_lstm_projection = false, is_augru = false,
352+
is_orig_gru = false;
353+
bool use_workspace = false;
353354

354355
// Size of workspace for each tensor in bytes
355356
// Notes:

src/cpu/x64/gemm/gemm_driver.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2018-2020 Intel Corporation
2+
* Copyright 2018-2025 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ dnnl_status_t gemm_driver(const char *transA, const char *transB,
3636
const b_type *b, const dim_t *ldb, const b_type *ob, const float *beta,
3737
c_type *c, const dim_t *ldc, const c_type *oc,
3838
const bool force_jit_nocopy_gemm, pack_type packing = pack_type::none,
39-
gemm_pack_storage_t *pack_dst = NULL, bool measure_only = false);
39+
gemm_pack_storage_t *pack_dst = nullptr, bool measure_only = false);
4040

4141
void prep_ref_gemm_s8u8s32_pack(
4242
bool do_a, dim_t rows, dim_t cols, gemm_pack_storage_t *pack_dst);

src/cpu/x64/gemm/gemm_pack_storage.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2019-2023 Intel Corporation
2+
* Copyright 2019-2025 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -108,14 +108,14 @@ struct gemm_pack_storage_t {
108108

109109
template <typename data_type>
110110
data_type *row_sums(int ithr, dim_t r0, dim_t cblock) const {
111-
if (!has_row_sums()) return NULL;
111+
if (!has_row_sums()) return nullptr;
112112
auto id = thread_to_slice(ithr);
113113
return get_block<data_type>(sums_header->slice[id], r0, cblock);
114114
}
115115

116116
template <typename data_type>
117117
data_type *col_sums(int ithr, dim_t rblock, dim_t c0) const {
118-
if (!has_col_sums()) return NULL;
118+
if (!has_col_sums()) return nullptr;
119119
auto id = thread_to_slice(ithr);
120120
return get_block<data_type>(sums_header->slice[id], rblock, c0);
121121
}

0 commit comments

Comments
 (0)