#include "gnn_globals.h"Include dependency graph for gnn_phandle.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | gnn_phandle |
| The gnn_phandle type. More... | |
Typedefs | |
| typedef enum _phandle_update | phandle_update |
| A type for update flags. | |
Enumerations | |
| enum | _phandle_update { PHandleCountFlags = 1, PHandleUseFlags = 2 } |
Functions | |
| gnn_phandle * | gnn_phandle_new (size_t size) |
| Creates a new parameter handle. | |
| int | gnn_phandle_unref (gnn_phandle *ph) |
| Unreferences a parameter handle. | |
| int | gnn_phandle_ref (gnn_phandle *ph) |
| References a parameter handle. | |
| gsl_vector * | gnn_phandle_get_w (gnn_phandle *ph) |
| Returns a pointer to the internal parameter vector. | |
| gsl_vector * | gnn_phandle_get_dw (gnn_phandle *ph) |
| Returns a pointer to the internal parameter gradient. | |
| gsl_vector_int * | gnn_phandle_get_f (gnn_phandle *ph) |
| Returns a pointer to the internal frozen flags. | |
| int | gnn_phandle_update (gnn_phandle *ph) |
| Updates the handle's fields. | |
|
|
Definition at line 50 of file gnn_phandle.h. |
|
|
This function returns a pointer to the internal parameter gradient
Definition at line 378 of file gnn_phandle.c. |
|
|
This function returns a pointer to the internal frozen flags It should be remembered that the vector's element have binary values. That is, 0 means "free" parameter, 1 means "frozen" or "fixed" parameter.
Definition at line 404 of file gnn_phandle.c. |
|
|
This function returns a pointer to the internal parameter vector
Definition at line 358 of file gnn_phandle.c. |
|
|
This function allocates a new parameter handle for the given number of parameters. It creates the underlying blocks of parameters, parameter gradients and freeze flags. It's fields are appropiately initialized. Of course, the number of parameters can perfectly be zero. In this case, the creation of the underlying data blocks is ommitted.
Definition at line 219 of file gnn_phandle.c. |
|
|
This function increases the reference count of the parameter handle. It should be called when the parameters are being shared.
Definition at line 305 of file gnn_phandle.c. |
|
|
This function decreases the reference count of the parameter handle. It should be called when the parameters aren't used anymore. If the reference count drops to zero, then the associated parameters aren't used by anyone, triggering the real deallocation of the handle.
Definition at line 279 of file gnn_phandle.c. |
|
|
This function should be called after changes have made to the handle's vectors w, dw or f, to update the fields and check for consistency.
Definition at line 427 of file gnn_phandle.c. |
1.2.18