Add restrict

Add restrict for better pointer optimizations. This is not being applied
to `addToList()' because that function we want to thread later on.
This commit is contained in:
Nicolás A. Ortega 2016-12-13 11:26:12 +01:00
parent 2e9326b5fb
commit 449fef2994
No known key found for this signature in database
GPG Key ID: 614272579C2070D1

View File

@ -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]);
}