| 78 | } |
| 79 | |
| 80 | void write_array2(const Context& ctx) { |
| 81 | // Write some simple data to cells (1, 1), (2, 4) and (2, 3). |
| 82 | std::vector<int> coords_rows = {3}; |
| 83 | std::vector<int> coords_cols = {1}; |
| 84 | std::vector<int> a_data = {4}; |
| 85 | std::vector<uint32_t> b_data = {4}; |
| 86 | |
| 87 | // Open the array for writing and create the query. |
| 88 | Array array(ctx, array_uri, TILEDB_WRITE); |
| 89 | Query query(ctx, array, TILEDB_WRITE); |
| 90 | query.set_layout(TILEDB_UNORDERED) |
| 91 | .set_data_buffer("a", a_data) |
| 92 | .set_data_buffer("b", b_data) |
| 93 | .set_data_buffer("rows", coords_rows) |
| 94 | .set_data_buffer("cols", coords_cols); |
| 95 | |
| 96 | // Perform the write and close the array. |
| 97 | query.submit(); |
| 98 | array.close(); |
| 99 | } |
| 100 | |
| 101 | void read_array(const Context& ctx) { |
| 102 | // Prepare the array for reading |
no test coverage detected