1 1.1 mrg /* 2 1.1 mrg * Copyright 2016 Sven Verdoolaege 3 1.1 mrg * 4 1.1 mrg * Use of this software is governed by the MIT license 5 1.1 mrg * 6 1.1 mrg * Written by Sven Verdoolaege 7 1.1 mrg */ 8 1.1 mrg 9 1.1 mrg #include <isl_multi_macro.h> 10 1.1 mrg #include <isl/hash.h> 11 1.1 mrg 12 1.1 mrg /* Return a hash value that digests "multi". 13 1.1 mrg */ 14 1.1 mrg uint32_t FN(MULTI(BASE),get_hash)(__isl_keep MULTI(BASE) *multi) 15 1.1 mrg { 16 1.1 mrg int i; 17 1.1 mrg uint32_t hash; 18 1.1 mrg 19 1.1 mrg if (!multi) 20 1.1 mrg return 0; 21 1.1 mrg 22 1.1 mrg hash = isl_hash_init(); 23 1.1 mrg for (i = 0; i < multi->n; ++i) { 24 1.1 mrg uint32_t el_hash; 25 1.1 mrg el_hash = FN(EL,get_hash)(multi->u.p[i]); 26 1.1 mrg isl_hash_hash(hash, el_hash); 27 1.1 mrg } 28 1.1 mrg 29 1.1 mrg return hash; 30 1.1 mrg } 31