fix code formating of long function declarations

This commit is contained in:
xaedes 2023-09-16 20:38:23 +02:00
parent 8d82d4c8e6
commit 9139fec7ff
No known key found for this signature in database
GPG key ID: 30030EDD817EA2B1

View file

@ -39,7 +39,9 @@ struct ggml_opt_context * get_train_state_opt(struct train_state * state) {
return state->opt; return state->opt;
} }
struct random_normal_distribution * init_random_normal_distribution(int seed, float mean, float std, float min, float max) { struct random_normal_distribution * init_random_normal_distribution(
int seed, float mean, float std, float min, float max
) {
struct random_normal_distribution * rnd = (struct random_normal_distribution *) malloc(sizeof(struct random_normal_distribution)); struct random_normal_distribution * rnd = (struct random_normal_distribution *) malloc(sizeof(struct random_normal_distribution));
rnd->gen = std::mt19937(seed); rnd->gen = std::mt19937(seed);
rnd->rd = std::normal_distribution<float>{mean, std}; rnd->rd = std::normal_distribution<float>{mean, std};
@ -214,7 +216,8 @@ int64_t get_example_targets_batch(
size_t n_train_data, size_t n_train_data,
bool separate_with_eos, bool separate_with_eos,
bool separate_with_bos, bool separate_with_bos,
bool fill_with_next_samples) { bool fill_with_next_samples
) {
GGML_ASSERT(tokens_input->n_dims == 2); GGML_ASSERT(tokens_input->n_dims == 2);
GGML_ASSERT(target_probs->n_dims == 3); GGML_ASSERT(target_probs->n_dims == 3);
@ -1129,7 +1132,9 @@ void print_common_train_usage(int /*argc*/, char ** argv, const struct train_par
fprintf(stderr, "\n"); fprintf(stderr, "\n");
} }
bool consume_common_train_arg(int argc, char ** argv, int * idx, struct train_params_common * params, bool * invalid_param) { bool consume_common_train_arg(
int argc, char ** argv, int * idx, struct train_params_common * params, bool * invalid_param
) {
int& i = *idx; int& i = *idx;
std::string arg = argv[i]; std::string arg = argv[i];
const std::string arg_prefix = "--"; const std::string arg_prefix = "--";