File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change
1
+ This file documents changes done for the stan-math project
2
+
3
+ - Backported bugfix for hashmap int overflow on Windows (https://github.com/LLNL/sundials/pull/421)
Original file line number Diff line number Diff line change 20
20
#ifndef _SUNDIALS_HASHMAP_H
21
21
#define _SUNDIALS_HASHMAP_H
22
22
23
+ #include <stdint.h>
23
24
#include <string.h>
24
25
#include <stdlib.h>
25
26
30
31
This is a 64-bit implementation of the 'a' modification of the
31
32
Fowler–Noll–Vo hash (i.e., FNV1-a).
32
33
*/
33
- static unsigned long fnv1a_hash (const char * str )
34
+ static uint64_t fnv1a_hash (const char * str )
34
35
{
35
- const unsigned long prime = 14695981039346656037U ; /* prime */
36
- unsigned long hash = 1099511628211U ; /* offset basis */
36
+ const uint64_t prime = 14695981039346656037U ; /* prime */
37
+ uint64_t hash = 1099511628211U ; /* offset basis */
37
38
char c ;
38
39
while ((c = * str ++ ))
39
40
hash = (hash ^c ) * prime ;
You can’t perform that action at this time.
0 commit comments