Skip to content

Commit

Permalink
clang code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NishantPrabhuFujitsu committed Dec 13, 2024
1 parent a0c736a commit 1f13550
Show file tree
Hide file tree
Showing 67 changed files with 3,747 additions and 3,112 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,47 @@ namespace aarch64 {

class jit_convert_emitter : public jit_emitter {
public:
jit_convert_emitter(dnnl::impl::cpu::aarch64::jit_generator *host, dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,
const std::shared_ptr<ov::Node>& n, ov::element::Type exec_prc = ov::element::f32);
jit_convert_emitter(dnnl::impl::cpu::aarch64::jit_generator* host,
dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,
const std::shared_ptr<ov::Node>& n,
ov::element::Type exec_prc = ov::element::f32);

size_t get_inputs_count() const override;

protected:
void emit_data() const override;
void validate_types() const;
template <typename TReg>
void jit_convert_process(const TReg &src, const TReg &dst, ov::element::Type input_type, ov::element::Type output_type,
void jit_convert_process(const TReg& src,
const TReg& dst,
ov::element::Type input_type,
ov::element::Type output_type,
bool is_saturated) const;

ov::element::Type input_type;
ov::element::Type output_type;

private:
template <typename TReg>
inline void cvt_f16_to_f32(const TReg &src, const TReg &dst) const;
inline void cvt_f16_to_f32(const TReg& src, const TReg& dst) const;
template <typename TReg>
inline void cvt_f32_to_f16(const TReg &src, const TReg &dst) const;
inline void cvt_f32_to_f16(const TReg& src, const TReg& dst) const;
template <typename TReg>
inline void cvt_f32_to_i32(const TReg &src, const TReg &dst) const;
inline void cvt_f32_to_i32(const TReg& src, const TReg& dst) const;
template <typename TReg>
inline void cvt_i32_to_f32(const TReg &src, const TReg &dst) const;
inline void cvt_i32_to_f32(const TReg& src, const TReg& dst) const;
template <typename TReg>
inline void cvt_i32_to_i16(const TReg &src, const TReg &dst, bool is_saturated) const;
inline void cvt_i32_to_i16(const TReg& src, const TReg& dst, bool is_saturated) const;
template <typename TReg>
inline void cvt_i16_to_i32(const TReg &src, const TReg &dst) const;
inline void cvt_i16_to_i32(const TReg& src, const TReg& dst) const;
template <typename TReg>
inline void cvt_f16_to_i16(const TReg &src, const TReg &dst) const;
inline void cvt_f16_to_i16(const TReg& src, const TReg& dst) const;
template <typename TReg>
inline void cvt_i16_to_f16(const TReg &src, const TReg &dst) const;
inline void cvt_i16_to_f16(const TReg& src, const TReg& dst) const;
template <typename TReg>
inline void cvt_i16_to_byte(const TReg &src, const TReg &dst, bool is_signed, bool is_saturated) const;
inline void cvt_i16_to_byte(const TReg& src, const TReg& dst, bool is_signed, bool is_saturated) const;
template <typename TReg>
inline void cvt_byte_to_i16(const TReg &src, const TReg &dst, bool is_signed) const;
inline void cvt_byte_to_i16(const TReg& src, const TReg& dst, bool is_signed) const;
};

// This emitter is covered by specification of "Convert" operation. The implementation uses a "warp-around" conversion.
Expand All @@ -56,13 +61,15 @@ class jit_convert_emitter : public jit_emitter {
// 129 -> -127
class jit_convert_truncation_emitter : public jit_convert_emitter {
public:
jit_convert_truncation_emitter(dnnl::impl::cpu::aarch64::jit_generator *host, dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,
const std::shared_ptr<ov::Node>& n, ov::element::Type exec_prc = ov::element::f32);
jit_convert_truncation_emitter(dnnl::impl::cpu::aarch64::jit_generator* host,
dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,
const std::shared_ptr<ov::Node>& n,
ov::element::Type exec_prc = ov::element::f32);

private:
void emit_impl(const std::vector<size_t>& in_idxs, const std::vector<size_t>& out_idxs) const override;
template <dnnl::impl::cpu::aarch64::cpu_isa_t isa>
void emit_isa(const std::vector<size_t> &in_idxs, const std::vector<size_t> &out_idxs) const;
void emit_isa(const std::vector<size_t>& in_idxs, const std::vector<size_t>& out_idxs) const;
};

// This emitter is covered by the common dnnl behavior. The implementation uses a "saturation" conversion.
Expand All @@ -71,15 +78,17 @@ class jit_convert_truncation_emitter : public jit_convert_emitter {
// 129 -> 127
class jit_convert_saturation_emitter : public jit_convert_emitter {
public:
jit_convert_saturation_emitter(dnnl::impl::cpu::aarch64::jit_generator *host, dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,
const std::shared_ptr<ov::Node>& n, ov::element::Type exec_prc = ov::element::f32);
jit_convert_saturation_emitter(dnnl::impl::cpu::aarch64::jit_generator* host,
dnnl::impl::cpu::aarch64::cpu_isa_t host_isa,
const std::shared_ptr<ov::Node>& n,
ov::element::Type exec_prc = ov::element::f32);

private:
void emit_impl(const std::vector<size_t>& in_idxs, const std::vector<size_t>& out_idxs) const override;
template <dnnl::impl::cpu::aarch64::cpu_isa_t isa>
void emit_isa(const std::vector<size_t> &in_idxs, const std::vector<size_t> &out_idxs) const;
void emit_isa(const std::vector<size_t>& in_idxs, const std::vector<size_t>& out_idxs) const;
};

} // namespace aarch64
} // namespace intel_cpu
} // namespace ov
} // namespace aarch64
} // namespace intel_cpu
} // namespace ov
Loading

0 comments on commit 1f13550

Please sign in to comment.