Skip to content

Commit

Permalink
Remove unused functions in rd_kw
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Aug 23, 2024
1 parent 73a8625 commit 3089186
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 319 deletions.
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
Loading

0 comments on commit 3089186

Please sign in to comment.