53#ifndef ROCRAND_THREEFRY_COMMON_H_
54#define ROCRAND_THREEFRY_COMMON_H_
56#include "rocrand/rocrand_common.h"
59#define SKEIN_MK_64(hi32, lo32) ((lo32) + (((unsigned long long)(hi32)) << 32))
60#define SKEIN_KS_PARITY64 SKEIN_MK_64(0x1BD11BDA, 0xA9FC1A22)
61#define SKEIN_KS_PARITY32 0x1BD11BDA
63namespace rocrand_device
66template<
typename value>
67__forceinline__ __device__ __host__ value rotl(value x,
int d);
70__forceinline__ __device__ __host__
unsigned long long
71 rotl<unsigned long long>(
unsigned long long x,
int d)
73 return (x << (d & 63)) | (x >> ((64 - d) & 63));
77__forceinline__ __device__ __host__
unsigned int rotl<unsigned int>(
unsigned int x,
int d)
79 return (x << (d & 31)) | (x >> ((32 - d) & 31));
82template<
typename value>
83__forceinline__ __device__ __host__ value skein_ks_parity();
86__forceinline__ __device__ __host__
unsigned int skein_ks_parity<unsigned int>()
88 return SKEIN_KS_PARITY32;
92__forceinline__ __device__ __host__
unsigned long long skein_ks_parity<unsigned long long>()
94 return SKEIN_KS_PARITY64;