Skip to content

Commit

Permalink
docs: add weights_destroy and flower_destroy docs references
Browse files Browse the repository at this point in the history
  • Loading branch information
F33RNI committed Feb 26, 2024
1 parent 36fee5d commit 7388327
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,34 @@ Below is an example of an extremely simple classifier capable of just comparing
```

11. Free memory
>
> ```c
> void weights_destroy(weights_s *weights,
> bool destroy_struct,
> bool destroy_internal_array)
> ```
>
> Frees memory allocated by weights struct.
>
> **Parameters**
> - `weights`: pointer to `weights_s` struct or NULL
> - `destroy_struct`: true to destroy struct itself (set to false if struct was defined manually)
> - `destroy_internal_array`: true to also destroy `weights->weights` array
> ```c
> void flower_destroy(flower_s *flower,
> bool destroy_petals,
> bool destroy_weights_array,
> bool destroy_bias_weights_array)
> ```
>
> Frees memory allocated by flower struct.
>
> **Parameters**
> - `flower`: pointer to `flower_s` struct
> - `destroy_petals`: true to also destroy each petal
> - `destroy_weights_array`: true to also destroy `weights->weights` array for each petal, false to not
> - `destroy_bias_weights_array`: true to also destroy `bias_weights->weights` array for each petal, false to not
```c
// Destroy internal array of weights
Expand Down

0 comments on commit 7388327

Please sign in to comment.