sPyNNaker neural_modelling 7.1.1
Loading...
Searching...
No Matches
elimination_random_by_weight_impl.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 The University of Manchester
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
20
21elimination_params_t *synaptogenesis_elimination_init(uint8_t **data) {
22 elimination_params_t *elim_params =
23 spin1_malloc(sizeof(elimination_params_t));
24 if (elim_params == NULL) {
25 log_error("Out of memory when allocating parameters");
27 }
28 spin1_memcpy(elim_params, *data, sizeof(elimination_params_t));
29 log_debug("Elimination random by weight prob_dep=%u prob_pot=%u thresh=%u",
30 elim_params->prob_elim_depression,
31 elim_params->prob_elim_potentiation,
32 elim_params->threshold);
33 *data += sizeof(elimination_params_t);
34 return elim_params;
35}
void log_error(const char *message,...)
void log_debug(const char *message,...)
elimination_params_t * synaptogenesis_elimination_init(uint8_t **data)
Read and return an elimination parameter data structure from the data stream.
Synapse elimination by weighted random selection.
RTE_SWERR
void rt_error(uint code,...)
#define NULL
void spin1_memcpy(void *dst, void const *src, uint len)