Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove more unused c code #1008

Merged
merged 3 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ add_library(
${opt_srcs}
resdata/rd_rsthead.cpp
resdata/rd_sum_tstep.cpp
resdata/rd_rst_file.cpp
resdata/rd_grid_cache.cpp
resdata/smspec_node.cpp
resdata/rd_kw_grdecl.cpp
Expand Down Expand Up @@ -282,7 +281,6 @@ foreach(
rd_file_view
test_rd_file_index
test_transactions
rd_rst_file
rd_sum_writer
rd_filenames
rd_make_date_no_shift
Expand Down
38 changes: 3 additions & 35 deletions lib/include/resdata/rd_kw.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,42 +48,28 @@ void rd_kw_set_data_ptr(rd_kw_type *rd_kw, void *data);
void rd_kw_fwrite_data(const rd_kw_type *_rd_kw, fortio_type *fortio);
bool rd_kw_fread_realloc_data(rd_kw_type *rd_kw, fortio_type *fortio);
rd_data_type rd_kw_get_data_type(const rd_kw_type *);
const char *rd_kw_get_header8(const rd_kw_type *);
const char *rd_kw_get_header(const rd_kw_type *rd_kw);
rd_kw_type *rd_kw_alloc_empty(void);
rd_read_status_enum rd_kw_fread_header(rd_kw_type *, fortio_type *);
void rd_kw_set_header_name(rd_kw_type *, const char *);
bool rd_kw_fseek_kw(const char *, bool, bool, fortio_type *);
bool rd_kw_fseek_last_kw(const char *, bool, fortio_type *);
void rd_kw_inplace_update_file(const rd_kw_type *, const char *, int);
void rd_kw_fskip(fortio_type *);
void rd_kw_alloc_data(rd_kw_type *);
void rd_kw_alloc_double_data(rd_kw_type *rd_kw, double *values);
void rd_kw_alloc_float_data(rd_kw_type *rd_kw, float *values);
bool rd_kw_fread_realloc(rd_kw_type *, fortio_type *);
void rd_kw_fread(rd_kw_type *, fortio_type *);
rd_kw_type *rd_kw_fread_alloc(fortio_type *);
rd_kw_type *rd_kw_alloc_actnum(const rd_kw_type *porv_kw, float porv_limit);
void rd_kw_free_data(rd_kw_type *);
void rd_kw_fread_indexed_data(fortio_type *fortio, offset_type data_offset,
rd_data_type, int element_count,
const int_vector_type *index_map, char *buffer);
void rd_kw_free(rd_kw_type *);
void rd_kw_free__(void *);
rd_kw_type *rd_kw_alloc_copy(const rd_kw_type *);
rd_kw_type *rd_kw_alloc_sub_copy(const rd_kw_type *src, const char *new_kw,
int offset, int count);
const void *rd_kw_copyc__(const void *);
rd_kw_type *rd_kw_alloc_slice_copy(const rd_kw_type *src, int index1,
int index2, int stride);
void rd_kw_resize(rd_kw_type *rd_kw, int new_size);
//void * rd_kw_get_data_ref(const rd_kw_type *);
void *rd_kw_alloc_data_copy(const rd_kw_type *);
void rd_kw_memcpy(rd_kw_type *, const rd_kw_type *);
void rd_kw_get_memcpy_data(const rd_kw_type *, void *);
void rd_kw_get_memcpy_float_data(const rd_kw_type *rd_kw, float *target);
void rd_kw_get_memcpy_double_data(const rd_kw_type *rd_kw, double *target);
void rd_kw_get_memcpy_int_data(const rd_kw_type *rd_kw, int *target);
void rd_kw_set_memcpy_data(rd_kw_type *, const void *);
bool rd_kw_fwrite(const rd_kw_type *, fortio_type *);
void rd_kw_iget(const rd_kw_type *, int, void *);
Expand All @@ -95,49 +81,33 @@ const char *rd_kw_iget_string_ptr(const rd_kw_type *, int);
const char *rd_kw_iget_char_ptr(const rd_kw_type *rd_kw, int i);
void *rd_kw_iget_ptr(const rd_kw_type *, int);
int rd_kw_get_size(const rd_kw_type *);
bool rd_kw_ichar_eq(const rd_kw_type *, int, const char *);
rd_kw_type *rd_kw_alloc(const char *header, int size, rd_data_type);
rd_kw_type *rd_kw_alloc_new(const char *, int, rd_data_type, const void *);
rd_kw_type *rd_kw_alloc_new_shared(const char *, int, rd_data_type, void *);
rd_kw_type *rd_kw_alloc_global_copy(const rd_kw_type *src,
const rd_kw_type *actnum);
void rd_kw_fwrite_param(const char *, bool, const char *, rd_data_type, int,
void *);
void rd_kw_fwrite_param_fortio(fortio_type *, const char *, rd_data_type, int,
void *);
void rd_kw_summarize(const rd_kw_type *rd_kw);
void rd_kw_fread_double_param(const char *, bool, double *);
float rd_kw_iget_as_float(const rd_kw_type *rd_kw, int i);
double rd_kw_iget_as_double(const rd_kw_type *rd_kw, int i);
void rd_kw_get_data_as_double(const rd_kw_type *, double *);
void rd_kw_get_data_as_float(const rd_kw_type *rd_kw, float *float_data);
bool rd_kw_name_equal(const rd_kw_type *rd_kw, const char *name);
bool rd_kw_header_eq(const rd_kw_type *rd_kw1, const rd_kw_type *rd_kw2);
bool rd_kw_equal(const rd_kw_type *rd_kw1, const rd_kw_type *rd_kw2);
bool rd_kw_size_and_type_equal(const rd_kw_type *rd_kw1,
const rd_kw_type *rd_kw2);
bool rd_kw_icmp_string(const rd_kw_type *rd_kw, int index,
const char *other_string);
bool rd_kw_numeric_equal(const rd_kw_type *rd_kw1, const rd_kw_type *rd_kw2,
double abs_diff, double rel_diff);
bool rd_kw_block_equal(const rd_kw_type *rd_kw1, const rd_kw_type *rd_kw2,
int cmp_elements);
bool rd_kw_data_equal(const rd_kw_type *rd_kw, const void *data);
bool rd_kw_content_equal(const rd_kw_type *rd_kw1, const rd_kw_type *rd_kw2);
bool rd_kw_fskip_data__(rd_data_type, int, fortio_type *);
bool rd_kw_fskip_data(rd_kw_type *rd_kw, fortio_type *fortio);
bool rd_kw_fread_data(rd_kw_type *rd_kw, fortio_type *fortio);
void rd_kw_fskip_header(fortio_type *fortio);
bool rd_kw_size_and_numeric_type_equal(const rd_kw_type *kw1,
const rd_kw_type *kw2);
bool rd_kw_inplace_safe_div(rd_kw_type *target_kw, const rd_kw_type *divisor);
void rd_kw_inplace_sqrt(rd_kw_type *kw);

bool rd_kw_is_kw_file(fortio_type *fortio);

int rd_kw_element_sum_int(const rd_kw_type *rd_kw);
double rd_kw_element_sum_float(const rd_kw_type *rd_kw);
void rd_kw_inplace_inv(rd_kw_type *my_kw);
void rd_kw_element_sum(const rd_kw_type *, void *);
void rd_kw_element_sum_indexed(const rd_kw_type *rd_kw,
const int_vector_type *index_list, void *_sum);
Expand All @@ -147,11 +117,6 @@ void *rd_kw_get_void_ptr(const rd_kw_type *rd_kw);
void rd_kw_fprintf_data(const rd_kw_type *rd_kw, const char *fmt, FILE *stream);
void rd_kw_memcpy_data(rd_kw_type *target, const rd_kw_type *src);

bool rd_kw_assert_numeric(const rd_kw_type *kw);
bool rd_kw_assert_binary(const rd_kw_type *kw1, const rd_kw_type *kw2);

void rd_kw_scalar_set_bool(rd_kw_type *rd_kw, bool bool_value);
void rd_kw_scalar_set__(rd_kw_type *rd_kw, const void *value);
void rd_kw_scalar_set_float_or_double(rd_kw_type *rd_kw, double value);

#define RD_KW_SCALAR_SET_TYPED_HEADER(ctype) \
Expand Down Expand Up @@ -187,6 +152,9 @@ void rd_kw_copy_indexed(rd_kw_type *target_kw, const int_vector_type *index_set,
const rd_kw_type *src_kw);

bool rd_kw_assert_binary_numeric(const rd_kw_type *kw1, const rd_kw_type *kw2);
bool rd_kw_assert_numeric(const rd_kw_type *kw);
bool rd_kw_assert_binary(const rd_kw_type *kw1, const rd_kw_type *kw2);

#define RD_KW_ASSERT_TYPED_BINARY_OP_HEADER(ctype) \
bool rd_kw_assert_binary_##ctype(const rd_kw_type *kw1, \
const rd_kw_type *kw2)
Expand Down
30 changes: 0 additions & 30 deletions lib/include/resdata/rd_rst_file.hpp

This file was deleted.

1 change: 0 additions & 1 deletion lib/include/resdata/well/well_conn_collection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ typedef struct well_conn_collection_struct well_conn_collection_type;

well_conn_collection_type *well_conn_collection_alloc(void);
void well_conn_collection_free(well_conn_collection_type *wellcc);
void well_conn_collection_free__(void *arg);
int well_conn_collection_get_size(const well_conn_collection_type *wellcc);
const well_conn_type *
well_conn_collection_iget_const(const well_conn_collection_type *wellcc,
Expand Down
Loading