MCPcopy Create free account
hub / github.com/ModelEngine-Group/flexai / GetStrongSeed

Function GetStrongSeed

GPU-Virtual-Service/gpu-remoting/include/define.h:439–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437 }
438
439 inline uint64_t GetStrongSeed() {
440 uint64_t a = clock();
441 struct timeval currentTime;
442 gettimeofday(&currentTime, NULL);
443 uint64_t b = currentTime.tv_sec * SEC_2_US + currentTime.tv_usec;
444 uint64_t c = getpid();
445
446 // Robert Jenkins' 96 bit Mix Function
447 a = a - b; a = a - c; a = a ^ (c >> 13);
448 b = b - c; b = b - a; b = b ^ (a << 8);
449 c = c - a; c = c - b; c = c ^ (b >> 13);
450 a = a - b; a = a - c; a = a ^ (c >> 12);
451 b = b - c; b = b - a; b = b ^ (a << 16);
452 c = c - a; c = c - b; c = c ^ (b >> 5);
453 a = a - b; a = a - c; a = a ^ (c >> 3);
454 b = b - c; b = b - a; b = b ^ (a << 10);
455 c = c - a; c = c - b; c = c ^ (b >> 15);
456
457 return c;
458 }
459
460 inline void GetIpStrFromSockaddr(const struct sockaddr_storage *sock_addr,
461 char *ip_str, size_t max_size) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected