From 449fef299425a110abe8ba382ed31b64f56224be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega?= Date: Tue, 13 Dec 2016 11:26:12 +0100 Subject: [PATCH] Add restrict Add restrict for better pointer optimizations. This is not being applied to `addToList()' because that function we want to thread later on. --- src/list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/list.c b/src/list.c index 81182f7..44d2b81 100644 --- a/src/list.c +++ b/src/list.c @@ -8,7 +8,7 @@ */ #define BLOCK_SIZE 1024 -void initList(List *l) { +void initList(List *restrict l) { l->list = malloc(sizeof(mpz_t) * BLOCK_SIZE); if(!l->list) { fprintf(stderr, "Failed to allocate memory to list!\n"); @@ -18,7 +18,7 @@ void initList(List *l) { l->end = 0; } -void deInitList(List *l) { +void deInitList(List *restrict l) { for(ulli i = 0; i < l->size; ++i) { mpz_clear(l->list[i]); }