"vscode:/vscode.git/clone" did not exist on "0bec80e535d9271d79df909a0d13b7634cfa47e4"
Commit 9607aef2 authored by Paul's avatar Paul
Browse files

Fix clang tidy warnings

parent c88ab964
......@@ -117,19 +117,19 @@ struct schedule_model
void sched(program& p, instruction_ref ins, std::size_t n) const
{
assert((*this).private_detail_te_handle_mem_var);
(*this).private_detail_te_get_handle().sched(p, std::move(ins), std::move(n));
(*this).private_detail_te_get_handle().sched(p, ins, n);
}
void wait(program& p, instruction_ref ins, std::size_t wait_id) const
{
assert((*this).private_detail_te_handle_mem_var);
(*this).private_detail_te_get_handle().wait(p, std::move(ins), std::move(wait_id));
(*this).private_detail_te_get_handle().wait(p, ins, wait_id);
}
void record(program& p, instruction_ref ins, std::size_t wait_id) const
{
assert((*this).private_detail_te_handle_mem_var);
(*this).private_detail_te_get_handle().record(p, std::move(ins), std::move(wait_id));
(*this).private_detail_te_get_handle().record(p, ins, wait_id);
}
std::size_t weight(const operation& op) const
......@@ -192,19 +192,19 @@ struct schedule_model
void sched(program& p, instruction_ref ins, std::size_t n) const override
{
private_detail_te_value.sched(p, std::move(ins), std::move(n));
private_detail_te_value.sched(p, ins, n);
}
void wait(program& p, instruction_ref ins, std::size_t wait_id) const override
{
private_detail_te_value.wait(p, std::move(ins), std::move(wait_id));
private_detail_te_value.wait(p, ins, wait_id);
}
void record(program& p, instruction_ref ins, std::size_t wait_id) const override
{
private_detail_te_value.record(p, std::move(ins), std::move(wait_id));
private_detail_te_value.record(p, ins, wait_id);
}
std::size_t weight(const operation& op) const override
......
......@@ -25,7 +25,7 @@ struct record_event
return {};
}
void finalize(context& ctx, const shape&, std::vector<shape>) { ctx.create_events(event); }
void finalize(context& ctx, const shape&, const std::vector<shape>&) { ctx.create_events(event); }
};
struct wait_event
......
......@@ -209,7 +209,7 @@ std::vector<T> unique(std::vector<T> x)
std::vector<std::size_t> get_wait_for(std::vector<std::size_t> wait_for)
{
return unique(wait_for);
return unique(std::move(wait_for));
}
std::vector<std::size_t> get_wait_for(std::size_t wait_on, std::vector<std::size_t> wait_for)
......
import string, sys, re, os
trivial = [
'std::size_t',
'instruction_ref'
]
headers = '''
#include <algorithm>
#include <cassert>
......@@ -286,7 +292,7 @@ def convert_member(d, struct_name):
member['this'] = x
if 'const' in t:
member['member_const'] = 'const'
if t.endswith(('&', '*')):
if t.endswith(('&', '*')) or t in trivial:
if use_member: member_args.append(x)
args.append(arg_name)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment