aboutsummaryrefslogtreecommitdiff
path: root/src/gensvm_pred.c
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2016-05-09 21:20:37 +0200
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2016-05-09 21:20:37 +0200
commitf0ba48b629c6eefbaea4cd7b9ee35ba2aa18d865 (patch)
tree8f7723612e0e60d39956a45e68a18455f9e1c45f /src/gensvm_pred.c
parentAdd err function to write to stderr (diff)
downloadgensvm-f0ba48b629c6eefbaea4cd7b9ee35ba2aa18d865.tar.gz
gensvm-f0ba48b629c6eefbaea4cd7b9ee35ba2aa18d865.zip
remove all unnecessary allocation checks
Diffstat (limited to 'src/gensvm_pred.c')
-rw-r--r--src/gensvm_pred.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/gensvm_pred.c b/src/gensvm_pred.c
index 7835bf6..25a4cc5 100644
--- a/src/gensvm_pred.c
+++ b/src/gensvm_pred.c
@@ -46,23 +46,8 @@ void gensvm_predict_labels(struct GenData *testdata, struct GenModel *model,
// allocate necessary memory
S = Calloc(double, K-1);
- if (S == NULL) {
- fprintf(stderr, "Failed to allocate memory for S in "
- "gensvm_predict_labels.\n");
- exit(1);
- }
ZV = Calloc(double, n*(K-1));
- if (ZV == NULL) {
- fprintf(stderr, "Failed to allocate memory for ZV in "
- "gensvm_predict_labels.\n");
- exit(1);
- }
U = Calloc(double, K*(K-1));
- if (U == NULL) {
- fprintf(stderr, "Failed to allocate memory for U in "
- "gensvm_predict_labels.\n");
- exit(1);
- }
// Generate the simplex matrix
gensvm_simplex_gen(K, U);