Skip to content

Commit

Permalink
shared_ptr to const emitter context
Browse files Browse the repository at this point in the history
  • Loading branch information
chenhu-wang committed Jan 28, 2021
1 parent 0c2a3bf commit 17195f4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void jit_emitter::prepare_table() {

void jit_emitter::emit(const std::vector<int> &in_idxs, const std::vector<int> &out_idxs,
const std::vector<int> &pool_vec_idxs, const std::vector<int> &pool_gpr_idxs,
const std::shared_ptr<emitter_context> &emit_context) {
const std::shared_ptr<const emitter_context> &emit_context) {
emitter_preamble(in_idxs, out_idxs, pool_vec_idxs, pool_gpr_idxs);

emit_impl(in_idxs, out_idxs, pool_vec_idxs, pool_gpr_idxs, emit_context.get());
Expand Down
2 changes: 1 addition & 1 deletion inference-engine/src/mkldnn_plugin/nodes/common/emitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class jit_emitter {

virtual void emit(const std::vector<int> &in_idxs, const std::vector<int> &out_idxs,
const std::vector<int> &pool_vec_idxs = {}, const std::vector<int> &pool_gpr_idxs = {},
const std::shared_ptr<emitter_context> &emit_context = nullptr);
const std::shared_ptr<const emitter_context> &emit_context = nullptr);
virtual void emit_table();
virtual size_t get_inputs_num() = 0;
virtual size_t aux_vecs_count() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ size_t jit_mkldnn_emitter::get_inputs_num() { return 1; }

void jit_mkldnn_emitter::emit(const std::vector<int> &in_vec_idxs, const std::vector<int> &out_vec_idxs,
const std::vector<int> &pool_vec_idxs, const std::vector<int> &pool_gpr_idxs,
const std::shared_ptr<emitter_context> &emit_context) {
const std::shared_ptr<const emitter_context> &emit_context) {
if (host_isa_ == cpu::x64::sse41) {
if (out_vec_idxs[0] != in_vec_idxs[0])
h->uni_vmovups(Xmm(out_vec_idxs[0]), Xmm(in_vec_idxs[0]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class jit_mkldnn_emitter : public jit_emitter {

void emit(const std::vector<int> &in_vec_idxs, const std::vector<int> &out_vec_idxs,
const std::vector<int> &pool_vec_idxs = {}, const std::vector<int> &pool_gpr_idxs = {},
const std::shared_ptr<emitter_context> &emit_context = nullptr) override;
const std::shared_ptr<const emitter_context> &emit_context = nullptr) override;

void emit_table() override;

Expand Down

0 comments on commit 17195f4

Please sign in to comment.