-
Notifications
You must be signed in to change notification settings - Fork 4
/
empty_op.cc
executable file
·63 lines (50 loc) · 1.69 KB
/
empty_op.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "empty_op.hpp"
empty_template_t* init_empty_template(code_builder_t* builder, unsigned long dense_block_id)
{
assert(builder != NULL);
assert(builder->op_manager != NULL);
assert(builder->op_manager->matrix != NULL);
sparse_struct_t *matrix = builder->op_manager->matrix;
dense_block_table_item_t* item = matrix->block_coor_table.item_arr[dense_block_id];
if (item->begin_coo_index != item->end_coo_index)
{
cout << "this sub dense block is not empty" << endl;
assert(false);
}
// 需要验证非零元的数量是不是0
empty_template_t* new_template = new empty_template_t();
new_template->matrix = matrix;
new_template->dense_block_index = dense_block_id;
return new_template;
}
// 模板的所有输出都是回车
void store_template_data(empty_template_t *output_template, string output_dir)
{
// 空的
return;
}
string code_of_template_data_struct(empty_template_t *output_template, unsigned long dense_block_id)
{
assert(output_template != NULL);
return "\n";
}
string code_of_read_template_data_from_file_func_define(empty_template_t *output_template, unsigned long dense_block_id)
{
assert(output_template != NULL);
return "\n";
}
string code_of_template_kernal(empty_template_t *output_template, unsigned long dense_block_id)
{
assert(output_template != NULL);
return "\n";
}
string code_of_kernal_function_call(empty_template_t *output_template, unsigned long dense_block_id)
{
assert(output_template != NULL);
return "\n";
}
string code_of_write_template_data_to_gpu(empty_template_t *output_template, unsigned long dense_block_id)
{
assert(output_template != NULL);
return "\n";
}