29 #include "grk_config_private.h"
40 #define _USE_MATH_DEFINES
64 #if defined(GROK_HAVE_FSEEKO) && !defined(fseek)
70 # define GROK_FSEEK(stream,offset,whence) _fseeki64(stream, offset,whence)
71 # define GROK_FSTAT(fildes,stat_buff) _fstati64(fildes, stat_buff)
72 # define GROK_FTELL(stream) _ftelli64(stream)
73 # define GROK_STAT_STRUCT_T struct _stati64
74 # define GROK_STAT(path,stat_buff) _stati64(path, stat_buff)
76 # define GROK_FSEEK(stream,offset,whence) fseek(stream,offset,whence)
77 # define GROK_FSTAT(fildes,stat_buff) fstat(fildes,stat_buff)
78 # define GROK_FTELL(stream) ftell(stream)
79 # define GROK_STAT_STRUCT_T struct stat
80 # define GROK_STAT(path,stat_buff) stat(path,stat_buff)
99 #define GRK_RESTRICT __restrict__
105 #ifdef __has_attribute
106 #if __has_attribute(no_sanitize)
107 #define GROK_NOSANITIZE(kind) __attribute__((no_sanitize(kind)))
110 #ifndef GROK_NOSANITIZE
111 #define GROK_NOSANITIZE(kind)
116 #if defined(_MSC_VER)
121 return _mm_cvt_ss2si(_mm_load_ss(&f));
122 #elif defined(_M_IX86)
131 return (
long)((f>0.0f) ? (f + 0.5f) : (f - 0.5f));
140 #if defined(_MSC_VER) && (_MSC_VER < 1400)
141 #define vsnprintf _vsnprintf
145 #if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER) && defined(_M_IX86)
147 # pragma intrinsic(__emul)
150 #define GRK_UNUSED(x) (void)x
Implementation of a packet iterator (PI)
Sparse buffer management.
static long grk_lrintf(float f)
Definition: grk_includes.h:135