nengel@9: const char *__nanos_family __attribute__((weak)) = "master"; nengel@9: int __nanos_version __attribute__((weak)) = 5015; nengel@9: int __mcc_master __attribute__((weak)) = 5015; nengel@9: int __mcc_openmp __attribute__((weak)) = 5; nengel@9: int __mcc_trunk __attribute__((weak)) = 399; nengel@9: int __mcc_worksharing __attribute__((weak)) = 1000; nengel@9: typedef unsigned char __u_char; nengel@9: typedef unsigned short int __u_short; nengel@9: typedef unsigned int __u_int; nengel@9: typedef unsigned long int __u_long; nengel@9: typedef signed char __int8_t; nengel@9: typedef unsigned char __uint8_t; nengel@9: typedef signed short int __int16_t; nengel@9: typedef unsigned short int __uint16_t; nengel@9: typedef signed int __int32_t; nengel@9: typedef unsigned int __uint32_t; nengel@9: typedef signed long int __int64_t; nengel@9: typedef unsigned long int __uint64_t; nengel@9: typedef long int __quad_t; nengel@9: typedef unsigned long int __u_quad_t; nengel@9: typedef unsigned long int __dev_t; nengel@9: typedef unsigned int __uid_t; nengel@9: typedef unsigned int __gid_t; nengel@9: typedef unsigned long int __ino_t; nengel@9: typedef unsigned long int __ino64_t; nengel@9: typedef unsigned int __mode_t; nengel@9: typedef unsigned long int __nlink_t; nengel@9: typedef long int __off_t; nengel@9: typedef long int __off64_t; nengel@9: typedef int __pid_t; nengel@9: typedef struct nengel@9: { nengel@9: int __val[2]; nengel@9: } __fsid_t; nengel@9: typedef long int __clock_t; nengel@9: typedef unsigned long int __rlim_t; nengel@9: typedef unsigned long int __rlim64_t; nengel@9: typedef unsigned int __id_t; nengel@9: typedef long int __time_t; nengel@9: typedef unsigned int __useconds_t; nengel@9: typedef long int __suseconds_t; nengel@9: typedef int __daddr_t; nengel@9: typedef long int __swblk_t; nengel@9: typedef int __key_t; nengel@9: typedef int __clockid_t; nengel@9: typedef void *__timer_t; nengel@9: typedef long int __blksize_t; nengel@9: typedef long int __blkcnt_t; nengel@9: typedef long int __blkcnt64_t; nengel@9: typedef unsigned long int __fsblkcnt_t; nengel@9: typedef unsigned long int __fsblkcnt64_t; nengel@9: typedef unsigned long int __fsfilcnt_t; nengel@9: typedef unsigned long int __fsfilcnt64_t; nengel@9: typedef long int __ssize_t; nengel@9: typedef __off64_t __loff_t; nengel@9: typedef __quad_t *__qaddr_t; nengel@9: typedef char *__caddr_t; nengel@9: typedef long int __intptr_t; nengel@9: typedef unsigned int __socklen_t; nengel@9: typedef __ssize_t ssize_t; nengel@9: typedef long unsigned int size_t; nengel@9: typedef __gid_t gid_t; nengel@9: typedef __uid_t uid_t; nengel@9: typedef __off_t off_t; nengel@9: typedef __useconds_t useconds_t; nengel@9: typedef __pid_t pid_t; nengel@9: typedef __intptr_t intptr_t; nengel@9: typedef __socklen_t socklen_t; nengel@9: extern int access(__const char *__name, int __type) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int faccessat(int __fd, __const char *__file, int __type, int __flag) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))) __attribute__((__warn_unused_result__)); nengel@9: extern __off_t lseek(int __fd, __off_t __offset, int __whence) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int close(int __fd); nengel@9: extern ssize_t read(int __fd, void *__buf, size_t __nbytes) __attribute__((__warn_unused_result__)); nengel@9: extern ssize_t write(int __fd, __const void *__buf, size_t __n) __attribute__((__warn_unused_result__)); nengel@9: extern ssize_t pread(int __fd, void *__buf, size_t __nbytes, __off_t __offset) __attribute__((__warn_unused_result__)); nengel@9: extern ssize_t pwrite(int __fd, __const void *__buf, size_t __n, __off_t __offset) __attribute__((__warn_unused_result__)); nengel@9: extern int pipe(int __pipedes[2]) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern unsigned int alarm(unsigned int __seconds) __attribute__((__nothrow__, __leaf__)); nengel@9: extern unsigned int sleep(unsigned int __seconds); nengel@9: extern __useconds_t ualarm(__useconds_t __value, __useconds_t __interval) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int usleep(__useconds_t __useconds); nengel@9: extern int pause(void); nengel@9: extern int chown(__const char *__file, __uid_t __owner, __gid_t __group) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int fchown(int __fd, __uid_t __owner, __gid_t __group) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int lchown(__const char *__file, __uid_t __owner, __gid_t __group) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int fchownat(int __fd, __const char *__file, __uid_t __owner, __gid_t __group, int __flag) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))) __attribute__((__warn_unused_result__)); nengel@9: extern int chdir(__const char *__path) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int fchdir(int __fd) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern char *getcwd(char *__buf, size_t __size) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern char *getwd(char *__buf) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__deprecated__)) __attribute__((__warn_unused_result__)); nengel@9: extern int dup(int __fd) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int dup2(int __fd, int __fd2) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char **__environ; nengel@9: extern int execve(__const char *__path, char *__const __argv[], char *__const __envp[]) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int fexecve(int __fd, char *__const __argv[], char *__const __envp[]) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern int execv(__const char *__path, char *__const __argv[]) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int execle(__const char *__path, __const char *__arg, ...) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int execl(__const char *__path, __const char *__arg, ...) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int execvp(__const char *__file, char *__const __argv[]) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int execlp(__const char *__file, __const char *__arg, ...) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int nice(int __inc) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern void _exit(int __status) __attribute__((__noreturn__)); nengel@9: enum nengel@9: { nengel@9: _PC_LINK_MAX, nengel@9: _PC_MAX_CANON, nengel@9: _PC_MAX_INPUT, nengel@9: _PC_NAME_MAX, nengel@9: _PC_PATH_MAX, nengel@9: _PC_PIPE_BUF, nengel@9: _PC_CHOWN_RESTRICTED, nengel@9: _PC_NO_TRUNC, nengel@9: _PC_VDISABLE, nengel@9: _PC_SYNC_IO, nengel@9: _PC_ASYNC_IO, nengel@9: _PC_PRIO_IO, nengel@9: _PC_SOCK_MAXBUF, nengel@9: _PC_FILESIZEBITS, nengel@9: _PC_REC_INCR_XFER_SIZE, nengel@9: _PC_REC_MAX_XFER_SIZE, nengel@9: _PC_REC_MIN_XFER_SIZE, nengel@9: _PC_REC_XFER_ALIGN, nengel@9: _PC_ALLOC_SIZE_MIN, nengel@9: _PC_SYMLINK_MAX, nengel@9: _PC_2_SYMLINKS nengel@9: }; nengel@9: enum nengel@9: { nengel@9: _SC_ARG_MAX, nengel@9: _SC_CHILD_MAX, nengel@9: _SC_CLK_TCK, nengel@9: _SC_NGROUPS_MAX, nengel@9: _SC_OPEN_MAX, nengel@9: _SC_STREAM_MAX, nengel@9: _SC_TZNAME_MAX, nengel@9: _SC_JOB_CONTROL, nengel@9: _SC_SAVED_IDS, nengel@9: _SC_REALTIME_SIGNALS, nengel@9: _SC_PRIORITY_SCHEDULING, nengel@9: _SC_TIMERS, nengel@9: _SC_ASYNCHRONOUS_IO, nengel@9: _SC_PRIORITIZED_IO, nengel@9: _SC_SYNCHRONIZED_IO, nengel@9: _SC_FSYNC, nengel@9: _SC_MAPPED_FILES, nengel@9: _SC_MEMLOCK, nengel@9: _SC_MEMLOCK_RANGE, nengel@9: _SC_MEMORY_PROTECTION, nengel@9: _SC_MESSAGE_PASSING, nengel@9: _SC_SEMAPHORES, nengel@9: _SC_SHARED_MEMORY_OBJECTS, nengel@9: _SC_AIO_LISTIO_MAX, nengel@9: _SC_AIO_MAX, nengel@9: _SC_AIO_PRIO_DELTA_MAX, nengel@9: _SC_DELAYTIMER_MAX, nengel@9: _SC_MQ_OPEN_MAX, nengel@9: _SC_MQ_PRIO_MAX, nengel@9: _SC_VERSION, nengel@9: _SC_PAGESIZE, nengel@9: _SC_RTSIG_MAX, nengel@9: _SC_SEM_NSEMS_MAX, nengel@9: _SC_SEM_VALUE_MAX, nengel@9: _SC_SIGQUEUE_MAX, nengel@9: _SC_TIMER_MAX, nengel@9: _SC_BC_BASE_MAX, nengel@9: _SC_BC_DIM_MAX, nengel@9: _SC_BC_SCALE_MAX, nengel@9: _SC_BC_STRING_MAX, nengel@9: _SC_COLL_WEIGHTS_MAX, nengel@9: _SC_EQUIV_CLASS_MAX, nengel@9: _SC_EXPR_NEST_MAX, nengel@9: _SC_LINE_MAX, nengel@9: _SC_RE_DUP_MAX, nengel@9: _SC_CHARCLASS_NAME_MAX, nengel@9: _SC_2_VERSION, nengel@9: _SC_2_C_BIND, nengel@9: _SC_2_C_DEV, nengel@9: _SC_2_FORT_DEV, nengel@9: _SC_2_FORT_RUN, nengel@9: _SC_2_SW_DEV, nengel@9: _SC_2_LOCALEDEF, nengel@9: _SC_PII, nengel@9: _SC_PII_XTI, nengel@9: _SC_PII_SOCKET, nengel@9: _SC_PII_INTERNET, nengel@9: _SC_PII_OSI, nengel@9: _SC_POLL, nengel@9: _SC_SELECT, nengel@9: _SC_UIO_MAXIOV, nengel@9: _SC_IOV_MAX = _SC_UIO_MAXIOV, nengel@9: _SC_PII_INTERNET_STREAM, nengel@9: _SC_PII_INTERNET_DGRAM, nengel@9: _SC_PII_OSI_COTS, nengel@9: _SC_PII_OSI_CLTS, nengel@9: _SC_PII_OSI_M, nengel@9: _SC_T_IOV_MAX, nengel@9: _SC_THREADS, nengel@9: _SC_THREAD_SAFE_FUNCTIONS, nengel@9: _SC_GETGR_R_SIZE_MAX, nengel@9: _SC_GETPW_R_SIZE_MAX, nengel@9: _SC_LOGIN_NAME_MAX, nengel@9: _SC_TTY_NAME_MAX, nengel@9: _SC_THREAD_DESTRUCTOR_ITERATIONS, nengel@9: _SC_THREAD_KEYS_MAX, nengel@9: _SC_THREAD_STACK_MIN, nengel@9: _SC_THREAD_THREADS_MAX, nengel@9: _SC_THREAD_ATTR_STACKADDR, nengel@9: _SC_THREAD_ATTR_STACKSIZE, nengel@9: _SC_THREAD_PRIORITY_SCHEDULING, nengel@9: _SC_THREAD_PRIO_INHERIT, nengel@9: _SC_THREAD_PRIO_PROTECT, nengel@9: _SC_THREAD_PROCESS_SHARED, nengel@9: _SC_NPROCESSORS_CONF, nengel@9: _SC_NPROCESSORS_ONLN, nengel@9: _SC_PHYS_PAGES, nengel@9: _SC_AVPHYS_PAGES, nengel@9: _SC_ATEXIT_MAX, nengel@9: _SC_PASS_MAX, nengel@9: _SC_XOPEN_VERSION, nengel@9: _SC_XOPEN_XCU_VERSION, nengel@9: _SC_XOPEN_UNIX, nengel@9: _SC_XOPEN_CRYPT, nengel@9: _SC_XOPEN_ENH_I18N, nengel@9: _SC_XOPEN_SHM, nengel@9: _SC_2_CHAR_TERM, nengel@9: _SC_2_C_VERSION, nengel@9: _SC_2_UPE, nengel@9: _SC_XOPEN_XPG2, nengel@9: _SC_XOPEN_XPG3, nengel@9: _SC_XOPEN_XPG4, nengel@9: _SC_CHAR_BIT, nengel@9: _SC_CHAR_MAX, nengel@9: _SC_CHAR_MIN, nengel@9: _SC_INT_MAX, nengel@9: _SC_INT_MIN, nengel@9: _SC_LONG_BIT, nengel@9: _SC_WORD_BIT, nengel@9: _SC_MB_LEN_MAX, nengel@9: _SC_NZERO, nengel@9: _SC_SSIZE_MAX, nengel@9: _SC_SCHAR_MAX, nengel@9: _SC_SCHAR_MIN, nengel@9: _SC_SHRT_MAX, nengel@9: _SC_SHRT_MIN, nengel@9: _SC_UCHAR_MAX, nengel@9: _SC_UINT_MAX, nengel@9: _SC_ULONG_MAX, nengel@9: _SC_USHRT_MAX, nengel@9: _SC_NL_ARGMAX, nengel@9: _SC_NL_LANGMAX, nengel@9: _SC_NL_MSGMAX, nengel@9: _SC_NL_NMAX, nengel@9: _SC_NL_SETMAX, nengel@9: _SC_NL_TEXTMAX, nengel@9: _SC_XBS5_ILP32_OFF32, nengel@9: _SC_XBS5_ILP32_OFFBIG, nengel@9: _SC_XBS5_LP64_OFF64, nengel@9: _SC_XBS5_LPBIG_OFFBIG, nengel@9: _SC_XOPEN_LEGACY, nengel@9: _SC_XOPEN_REALTIME, nengel@9: _SC_XOPEN_REALTIME_THREADS, nengel@9: _SC_ADVISORY_INFO, nengel@9: _SC_BARRIERS, nengel@9: _SC_BASE, nengel@9: _SC_C_LANG_SUPPORT, nengel@9: _SC_C_LANG_SUPPORT_R, nengel@9: _SC_CLOCK_SELECTION, nengel@9: _SC_CPUTIME, nengel@9: _SC_THREAD_CPUTIME, nengel@9: _SC_DEVICE_IO, nengel@9: _SC_DEVICE_SPECIFIC, nengel@9: _SC_DEVICE_SPECIFIC_R, nengel@9: _SC_FD_MGMT, nengel@9: _SC_FIFO, nengel@9: _SC_PIPE, nengel@9: _SC_FILE_ATTRIBUTES, nengel@9: _SC_FILE_LOCKING, nengel@9: _SC_FILE_SYSTEM, nengel@9: _SC_MONOTONIC_CLOCK, nengel@9: _SC_MULTI_PROCESS, nengel@9: _SC_SINGLE_PROCESS, nengel@9: _SC_NETWORKING, nengel@9: _SC_READER_WRITER_LOCKS, nengel@9: _SC_SPIN_LOCKS, nengel@9: _SC_REGEXP, nengel@9: _SC_REGEX_VERSION, nengel@9: _SC_SHELL, nengel@9: _SC_SIGNALS, nengel@9: _SC_SPAWN, nengel@9: _SC_SPORADIC_SERVER, nengel@9: _SC_THREAD_SPORADIC_SERVER, nengel@9: _SC_SYSTEM_DATABASE, nengel@9: _SC_SYSTEM_DATABASE_R, nengel@9: _SC_TIMEOUTS, nengel@9: _SC_TYPED_MEMORY_OBJECTS, nengel@9: _SC_USER_GROUPS, nengel@9: _SC_USER_GROUPS_R, nengel@9: _SC_2_PBS, nengel@9: _SC_2_PBS_ACCOUNTING, nengel@9: _SC_2_PBS_LOCATE, nengel@9: _SC_2_PBS_MESSAGE, nengel@9: _SC_2_PBS_TRACK, nengel@9: _SC_SYMLOOP_MAX, nengel@9: _SC_STREAMS, nengel@9: _SC_2_PBS_CHECKPOINT, nengel@9: _SC_V6_ILP32_OFF32, nengel@9: _SC_V6_ILP32_OFFBIG, nengel@9: _SC_V6_LP64_OFF64, nengel@9: _SC_V6_LPBIG_OFFBIG, nengel@9: _SC_HOST_NAME_MAX, nengel@9: _SC_TRACE, nengel@9: _SC_TRACE_EVENT_FILTER, nengel@9: _SC_TRACE_INHERIT, nengel@9: _SC_TRACE_LOG, nengel@9: _SC_LEVEL1_ICACHE_SIZE, nengel@9: _SC_LEVEL1_ICACHE_ASSOC, nengel@9: _SC_LEVEL1_ICACHE_LINESIZE, nengel@9: _SC_LEVEL1_DCACHE_SIZE, nengel@9: _SC_LEVEL1_DCACHE_ASSOC, nengel@9: _SC_LEVEL1_DCACHE_LINESIZE, nengel@9: _SC_LEVEL2_CACHE_SIZE, nengel@9: _SC_LEVEL2_CACHE_ASSOC, nengel@9: _SC_LEVEL2_CACHE_LINESIZE, nengel@9: _SC_LEVEL3_CACHE_SIZE, nengel@9: _SC_LEVEL3_CACHE_ASSOC, nengel@9: _SC_LEVEL3_CACHE_LINESIZE, nengel@9: _SC_LEVEL4_CACHE_SIZE, nengel@9: _SC_LEVEL4_CACHE_ASSOC, nengel@9: _SC_LEVEL4_CACHE_LINESIZE, nengel@9: _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, nengel@9: _SC_RAW_SOCKETS, nengel@9: _SC_V7_ILP32_OFF32, nengel@9: _SC_V7_ILP32_OFFBIG, nengel@9: _SC_V7_LP64_OFF64, nengel@9: _SC_V7_LPBIG_OFFBIG, nengel@9: _SC_SS_REPL_MAX, nengel@9: _SC_TRACE_EVENT_NAME_MAX, nengel@9: _SC_TRACE_NAME_MAX, nengel@9: _SC_TRACE_SYS_MAX, nengel@9: _SC_TRACE_USER_EVENT_MAX, nengel@9: _SC_XOPEN_STREAMS, nengel@9: _SC_THREAD_ROBUST_PRIO_INHERIT, nengel@9: _SC_THREAD_ROBUST_PRIO_PROTECT nengel@9: }; nengel@9: enum nengel@9: { nengel@9: _CS_PATH, nengel@9: _CS_V6_WIDTH_RESTRICTED_ENVS, nengel@9: _CS_GNU_LIBC_VERSION, nengel@9: _CS_GNU_LIBPTHREAD_VERSION, nengel@9: _CS_V5_WIDTH_RESTRICTED_ENVS, nengel@9: _CS_V7_WIDTH_RESTRICTED_ENVS, nengel@9: _CS_LFS_CFLAGS = 1000, nengel@9: _CS_LFS_LDFLAGS, nengel@9: _CS_LFS_LIBS, nengel@9: _CS_LFS_LINTFLAGS, nengel@9: _CS_LFS64_CFLAGS, nengel@9: _CS_LFS64_LDFLAGS, nengel@9: _CS_LFS64_LIBS, nengel@9: _CS_LFS64_LINTFLAGS, nengel@9: _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, nengel@9: _CS_XBS5_ILP32_OFF32_LDFLAGS, nengel@9: _CS_XBS5_ILP32_OFF32_LIBS, nengel@9: _CS_XBS5_ILP32_OFF32_LINTFLAGS, nengel@9: _CS_XBS5_ILP32_OFFBIG_CFLAGS, nengel@9: _CS_XBS5_ILP32_OFFBIG_LDFLAGS, nengel@9: _CS_XBS5_ILP32_OFFBIG_LIBS, nengel@9: _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, nengel@9: _CS_XBS5_LP64_OFF64_CFLAGS, nengel@9: _CS_XBS5_LP64_OFF64_LDFLAGS, nengel@9: _CS_XBS5_LP64_OFF64_LIBS, nengel@9: _CS_XBS5_LP64_OFF64_LINTFLAGS, nengel@9: _CS_XBS5_LPBIG_OFFBIG_CFLAGS, nengel@9: _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, nengel@9: _CS_XBS5_LPBIG_OFFBIG_LIBS, nengel@9: _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, nengel@9: _CS_POSIX_V6_ILP32_OFF32_CFLAGS, nengel@9: _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, nengel@9: _CS_POSIX_V6_ILP32_OFF32_LIBS, nengel@9: _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, nengel@9: _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, nengel@9: _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, nengel@9: _CS_POSIX_V6_ILP32_OFFBIG_LIBS, nengel@9: _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, nengel@9: _CS_POSIX_V6_LP64_OFF64_CFLAGS, nengel@9: _CS_POSIX_V6_LP64_OFF64_LDFLAGS, nengel@9: _CS_POSIX_V6_LP64_OFF64_LIBS, nengel@9: _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, nengel@9: _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, nengel@9: _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, nengel@9: _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, nengel@9: _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, nengel@9: _CS_POSIX_V7_ILP32_OFF32_CFLAGS, nengel@9: _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, nengel@9: _CS_POSIX_V7_ILP32_OFF32_LIBS, nengel@9: _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, nengel@9: _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, nengel@9: _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, nengel@9: _CS_POSIX_V7_ILP32_OFFBIG_LIBS, nengel@9: _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, nengel@9: _CS_POSIX_V7_LP64_OFF64_CFLAGS, nengel@9: _CS_POSIX_V7_LP64_OFF64_LDFLAGS, nengel@9: _CS_POSIX_V7_LP64_OFF64_LIBS, nengel@9: _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, nengel@9: _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, nengel@9: _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, nengel@9: _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, nengel@9: _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, nengel@9: _CS_V6_ENV, nengel@9: _CS_V7_ENV nengel@9: }; nengel@9: extern long int pathconf(__const char *__path, int __name) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern long int fpathconf(int __fd, int __name) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int sysconf(int __name) __attribute__((__nothrow__, __leaf__)); nengel@9: extern size_t confstr(int __name, char *__buf, size_t __len) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __pid_t getpid(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __pid_t getppid(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __pid_t getpgrp(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __pid_t __getpgid(__pid_t __pid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __pid_t getpgid(__pid_t __pid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int setpgid(__pid_t __pid, __pid_t __pgid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int setpgrp(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __pid_t setsid(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __pid_t getsid(__pid_t __pid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __uid_t getuid(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __uid_t geteuid(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __gid_t getgid(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __gid_t getegid(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int getgroups(int __size, __gid_t __list[]) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int setuid(__uid_t __uid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int setreuid(__uid_t __ruid, __uid_t __euid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int seteuid(__uid_t __uid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int setgid(__gid_t __gid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int setregid(__gid_t __rgid, __gid_t __egid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int setegid(__gid_t __gid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __pid_t fork(void) __attribute__((__nothrow__)); nengel@9: extern __pid_t vfork(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *ttyname(int __fd) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int ttyname_r(int __fd, char *__buf, size_t __buflen) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))) __attribute__((__warn_unused_result__)); nengel@9: extern int isatty(int __fd) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int ttyslot(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int link(__const char *__from, __const char *__to) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))) __attribute__((__warn_unused_result__)); nengel@9: extern int linkat(int __fromfd, __const char *__from, int __tofd, __const char *__to, int __flags) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2, 4))) __attribute__((__warn_unused_result__)); nengel@9: extern int symlink(__const char *__from, __const char *__to) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))) __attribute__((__warn_unused_result__)); nengel@9: extern ssize_t readlink(__const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))) __attribute__((__warn_unused_result__)); nengel@9: extern int symlinkat(__const char *__from, int __tofd, __const char *__to) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 3))) __attribute__((__warn_unused_result__)); nengel@9: extern ssize_t readlinkat(int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2, 3))) __attribute__((__warn_unused_result__)); nengel@9: extern int unlink(__const char *__name) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int unlinkat(int __fd, __const char *__name, int __flag) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern int rmdir(__const char *__path) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern __pid_t tcgetpgrp(int __fd) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int tcsetpgrp(int __fd, __pid_t __pgrp_id) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *getlogin(void); nengel@9: extern int getlogin_r(char *__name, size_t __name_len) __attribute__((__nonnull__(1))); nengel@9: extern int setlogin(__const char *__name) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern char *optarg; nengel@9: extern int optind; nengel@9: extern int opterr; nengel@9: extern int optopt; nengel@9: extern int getopt(int ___argc, char *const *___argv, const char *__shortopts) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int gethostname(char *__name, size_t __len) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int sethostname(__const char *__name, size_t __len) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int sethostid(long int __id) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int getdomainname(char *__name, size_t __len) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int setdomainname(__const char *__name, size_t __len) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int vhangup(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int revoke(__const char *__file) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int profil(unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int acct(__const char *__name) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *getusershell(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void endusershell(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void setusershell(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int daemon(int __nochdir, int __noclose) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int chroot(__const char *__path) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern char *getpass(__const char *__prompt) __attribute__((__nonnull__(1))); nengel@9: extern int fsync(int __fd); nengel@9: extern long int gethostid(void); nengel@9: extern void sync(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int getpagesize(void) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int getdtablesize(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int truncate(__const char *__file, __off_t __length) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int ftruncate(int __fd, __off_t __length) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int brk(void *__addr) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern void *sbrk(intptr_t __delta) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int syscall(long int __sysno, ...) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int lockf(int __fd, int __cmd, __off_t __len) __attribute__((__warn_unused_result__)); nengel@9: extern int fdatasync(int __fildes); nengel@9: extern char *ctermid(char *__s) __attribute__((__nothrow__, __leaf__)); nengel@9: extern ssize_t __read_chk(int __fd, void *__buf, size_t __nbytes, size_t __buflen) __attribute__((__warn_unused_result__)); nengel@9: extern ssize_t __read_alias(int __fd, void *__buf, size_t __nbytes) __asm__ ("""read") __attribute__((__warn_unused_result__)); nengel@9: extern ssize_t __read_chk_warn(int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("""__read_chk") __attribute__((__warn_unused_result__)) __attribute__((__warning__("read called with bigger length than size of ""the destination buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) __attribute__((__warn_unused_result__)) ssize_t read(int __fd, void *__buf, size_t __nbytes) nengel@9: { nengel@9: if (__builtin_object_size(__buf, 0) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__nbytes)) nengel@9: return __read_chk(__fd, __buf, __nbytes, __builtin_object_size(__buf, 0)); nengel@9: if (__nbytes > __builtin_object_size(__buf, 0)) nengel@9: return __read_chk_warn(__fd, __buf, __nbytes, __builtin_object_size(__buf, 0)); nengel@9: } nengel@9: return __read_alias(__fd, __buf, __nbytes); nengel@9: } nengel@9: extern ssize_t __readlink_chk(__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))) __attribute__((__warn_unused_result__)); nengel@9: extern ssize_t __readlink_alias(__const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("""readlink") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))) __attribute__((__warn_unused_result__)); nengel@9: extern ssize_t __readlink_chk_warn(__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("""__readlink_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))) __attribute__((__warn_unused_result__)) __attribute__((__warning__("readlink called with bigger length ""than size of destination buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) __attribute__((__nonnull__(1, 2))) __attribute__((__warn_unused_result__)) ssize_t __attribute__((__nothrow__, __leaf__)) readlink(__const char *__restrict __path, char *__restrict __buf, size_t __len) nengel@9: { nengel@9: if (__builtin_object_size(__buf, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__len)) nengel@9: return __readlink_chk(__path, __buf, __len, __builtin_object_size(__buf, 2 > 1)); nengel@9: if (__len > __builtin_object_size(__buf, 2 > 1)) nengel@9: return __readlink_chk_warn(__path, __buf, __len, __builtin_object_size(__buf, 2 > 1)); nengel@9: } nengel@9: return __readlink_alias(__path, __buf, __len); nengel@9: } nengel@9: extern ssize_t __readlinkat_chk(int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2, 3))) __attribute__((__warn_unused_result__)); nengel@9: extern ssize_t __readlinkat_alias(int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("""readlinkat") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2, 3))) __attribute__((__warn_unused_result__)); nengel@9: extern ssize_t __readlinkat_chk_warn(int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("""__readlinkat_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2, 3))) __attribute__((__warn_unused_result__)) __attribute__((__warning__("readlinkat called with bigger ""length than size of destination ""buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) __attribute__((__nonnull__(2, 3))) __attribute__((__warn_unused_result__)) ssize_t __attribute__((__nothrow__, __leaf__)) readlinkat(int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) nengel@9: { nengel@9: if (__builtin_object_size(__buf, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__len)) nengel@9: return __readlinkat_chk(__fd, __path, __buf, __len, __builtin_object_size(__buf, 2 > 1)); nengel@9: if (__len > __builtin_object_size(__buf, 2 > 1)) nengel@9: return __readlinkat_chk_warn(__fd, __path, __buf, __len, __builtin_object_size(__buf, 2 > 1)); nengel@9: } nengel@9: return __readlinkat_alias(__fd, __path, __buf, __len); nengel@9: } nengel@9: extern char *__getcwd_chk(char *__buf, size_t __size, size_t __buflen) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern char *__getcwd_alias(char *__buf, size_t __size) __asm__ ("""getcwd") __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern char *__getcwd_chk_warn(char *__buf, size_t __size, size_t __buflen) __asm__ ("""__getcwd_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)) __attribute__((__warning__("getcwd caller with bigger length than size of ""destination buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) __attribute__((__warn_unused_result__)) char *__attribute__((__nothrow__, __leaf__)) getcwd(char *__buf, size_t __size) nengel@9: { nengel@9: if (__builtin_object_size(__buf, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__size)) nengel@9: return __getcwd_chk(__buf, __size, __builtin_object_size(__buf, 2 > 1)); nengel@9: if (__size > __builtin_object_size(__buf, 2 > 1)) nengel@9: return __getcwd_chk_warn(__buf, __size, __builtin_object_size(__buf, 2 > 1)); nengel@9: } nengel@9: return __getcwd_alias(__buf, __size); nengel@9: } nengel@9: extern char *__getwd_chk(char *__buf, size_t buflen) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern char *__getwd_warn(char *__buf) __asm__ ("""getwd") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)) __attribute__((__warning__("please use getcwd instead, as getwd ""doesn't specify buffer size"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) __attribute__((__nonnull__(1))) __attribute__((__deprecated__)) __attribute__((__warn_unused_result__)) char *__attribute__((__nothrow__, __leaf__)) getwd(char *__buf) nengel@9: { nengel@9: if (__builtin_object_size(__buf, 2 > 1) != (size_t) - 1) nengel@9: return __getwd_chk(__buf, __builtin_object_size(__buf, 2 > 1)); nengel@9: return __getwd_warn(__buf); nengel@9: } nengel@9: extern size_t __confstr_chk(int __name, char *__buf, size_t __len, size_t __buflen) __attribute__((__nothrow__, __leaf__)); nengel@9: extern size_t __confstr_alias(int __name, char *__buf, size_t __len) __asm__ ("""confstr") __attribute__((__nothrow__, __leaf__)); nengel@9: extern size_t __confstr_chk_warn(int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("""__confstr_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__warning__("confstr called with bigger length than size of destination ""buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) size_t __attribute__((__nothrow__, __leaf__)) confstr(int __name, char *__buf, size_t __len) nengel@9: { nengel@9: if (__builtin_object_size(__buf, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__len)) nengel@9: return __confstr_chk(__name, __buf, __len, __builtin_object_size(__buf, 2 > 1)); nengel@9: if (__builtin_object_size(__buf, 2 > 1) < __len) nengel@9: return __confstr_chk_warn(__name, __buf, __len, __builtin_object_size(__buf, 2 > 1)); nengel@9: } nengel@9: return __confstr_alias(__name, __buf, __len); nengel@9: } nengel@9: extern int __getgroups_chk(int __size, __gid_t __list[], size_t __listlen) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int __getgroups_alias(int __size, __gid_t __list[]) __asm__ ("""getgroups") __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int __getgroups_chk_warn(int __size, __gid_t __list[], size_t __listlen) __asm__ ("""__getgroups_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)) __attribute__((__warning__("getgroups called with bigger group count than what ""can fit into destination buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) getgroups(int __size, __gid_t __list[]) nengel@9: { nengel@9: if (__builtin_object_size(__list, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__size) || __size < 0) nengel@9: return __getgroups_chk(__size, __list, __builtin_object_size(__list, 2 > 1)); nengel@9: if (__size * sizeof(__gid_t) > __builtin_object_size(__list, 2 > 1)) nengel@9: return __getgroups_chk_warn(__size, __list, __builtin_object_size(__list, 2 > 1)); nengel@9: } nengel@9: return __getgroups_alias(__size, __list); nengel@9: } nengel@9: extern int __ttyname_r_chk(int __fd, char *__buf, size_t __buflen, size_t __nreal) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern int __ttyname_r_alias(int __fd, char *__buf, size_t __buflen) __asm__ ("""ttyname_r") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern int __ttyname_r_chk_warn(int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("""__ttyname_r_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))) __attribute__((__warning__("ttyname_r called with bigger buflen than ""size of destination buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) ttyname_r(int __fd, char *__buf, size_t __buflen) nengel@9: { nengel@9: if (__builtin_object_size(__buf, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__buflen)) nengel@9: return __ttyname_r_chk(__fd, __buf, __buflen, __builtin_object_size(__buf, 2 > 1)); nengel@9: if (__buflen > __builtin_object_size(__buf, 2 > 1)) nengel@9: return __ttyname_r_chk_warn(__fd, __buf, __buflen, __builtin_object_size(__buf, 2 > 1)); nengel@9: } nengel@9: return __ttyname_r_alias(__fd, __buf, __buflen); nengel@9: } nengel@9: extern int __getlogin_r_chk(char *__buf, size_t __buflen, size_t __nreal) __attribute__((__nonnull__(1))); nengel@9: extern int __getlogin_r_alias(char *__buf, size_t __buflen) __asm__ ("""getlogin_r") __attribute__((__nonnull__(1))); nengel@9: extern int __getlogin_r_chk_warn(char *__buf, size_t __buflen, size_t __nreal) __asm__ ("""__getlogin_r_chk") __attribute__((__nonnull__(1))) __attribute__((__warning__("getlogin_r called with bigger buflen than ""size of destination buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int getlogin_r(char *__buf, size_t __buflen) nengel@9: { nengel@9: if (__builtin_object_size(__buf, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__buflen)) nengel@9: return __getlogin_r_chk(__buf, __buflen, __builtin_object_size(__buf, 2 > 1)); nengel@9: if (__buflen > __builtin_object_size(__buf, 2 > 1)) nengel@9: return __getlogin_r_chk_warn(__buf, __buflen, __builtin_object_size(__buf, 2 > 1)); nengel@9: } nengel@9: return __getlogin_r_alias(__buf, __buflen); nengel@9: } nengel@9: extern int __gethostname_chk(char *__buf, size_t __buflen, size_t __nreal) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int __gethostname_alias(char *__buf, size_t __buflen) __asm__ ("""gethostname") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int __gethostname_chk_warn(char *__buf, size_t __buflen, size_t __nreal) __asm__ ("""__gethostname_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warning__("gethostname called with bigger buflen than ""size of destination buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) gethostname(char *__buf, size_t __buflen) nengel@9: { nengel@9: if (__builtin_object_size(__buf, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__buflen)) nengel@9: return __gethostname_chk(__buf, __buflen, __builtin_object_size(__buf, 2 > 1)); nengel@9: if (__buflen > __builtin_object_size(__buf, 2 > 1)) nengel@9: return __gethostname_chk_warn(__buf, __buflen, __builtin_object_size(__buf, 2 > 1)); nengel@9: } nengel@9: return __gethostname_alias(__buf, __buflen); nengel@9: } nengel@9: extern int __getdomainname_chk(char *__buf, size_t __buflen, size_t __nreal) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int __getdomainname_alias(char *__buf, size_t __buflen) __asm__ ("""getdomainname") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int __getdomainname_chk_warn(char *__buf, size_t __buflen, size_t __nreal) __asm__ ("""__getdomainname_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)) __attribute__((__warning__("getdomainname called with bigger ""buflen than size of destination ""buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) getdomainname(char *__buf, size_t __buflen) nengel@9: { nengel@9: if (__builtin_object_size(__buf, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__buflen)) nengel@9: return __getdomainname_chk(__buf, __buflen, __builtin_object_size(__buf, 2 > 1)); nengel@9: if (__buflen > __builtin_object_size(__buf, 2 > 1)) nengel@9: return __getdomainname_chk_warn(__buf, __buflen, __builtin_object_size(__buf, 2 > 1)); nengel@9: } nengel@9: return __getdomainname_alias(__buf, __buflen); nengel@9: } nengel@9: struct _IO_FILE; nengel@9: typedef struct _IO_FILE FILE; nengel@9: typedef struct _IO_FILE __FILE; nengel@9: typedef struct nengel@9: { nengel@9: int __count; nengel@9: union nengel@9: { nengel@9: unsigned int __wch; nengel@9: char __wchb[4]; nengel@9: } __value; nengel@9: } __mbstate_t; nengel@9: typedef struct nengel@9: { nengel@9: __off_t __pos; nengel@9: __mbstate_t __state; nengel@9: } _G_fpos_t; nengel@9: typedef struct nengel@9: { nengel@9: __off64_t __pos; nengel@9: __mbstate_t __state; nengel@9: } _G_fpos64_t; nengel@9: typedef int _G_int16_t __attribute__((__mode__(__HI__))); nengel@9: typedef int _G_int32_t __attribute__((__mode__(__SI__))); nengel@9: typedef unsigned int _G_uint16_t __attribute__((__mode__(__HI__))); nengel@9: typedef unsigned int _G_uint32_t __attribute__((__mode__(__SI__))); nengel@9: typedef __builtin_va_list __gnuc_va_list; nengel@9: struct _IO_jump_t; nengel@9: struct _IO_FILE; nengel@9: typedef void _IO_lock_t; nengel@9: struct _IO_marker nengel@9: { nengel@9: struct _IO_marker *_next; nengel@9: struct _IO_FILE *_sbuf; nengel@9: int _pos; nengel@9: }; nengel@9: enum __codecvt_result nengel@9: { nengel@9: __codecvt_ok, nengel@9: __codecvt_partial, nengel@9: __codecvt_error, nengel@9: __codecvt_noconv nengel@9: }; nengel@9: struct _IO_FILE nengel@9: { nengel@9: int _flags; nengel@9: char *_IO_read_ptr; nengel@9: char *_IO_read_end; nengel@9: char *_IO_read_base; nengel@9: char *_IO_write_base; nengel@9: char *_IO_write_ptr; nengel@9: char *_IO_write_end; nengel@9: char *_IO_buf_base; nengel@9: char *_IO_buf_end; nengel@9: char *_IO_save_base; nengel@9: char *_IO_backup_base; nengel@9: char *_IO_save_end; nengel@9: struct _IO_marker *_markers; nengel@9: struct _IO_FILE *_chain; nengel@9: int _fileno; nengel@9: int _flags2; nengel@9: __off_t _old_offset; nengel@9: unsigned short _cur_column; nengel@9: signed char _vtable_offset; nengel@9: char _shortbuf[1]; nengel@9: _IO_lock_t *_lock; nengel@9: __off64_t _offset; nengel@9: void *__pad1; nengel@9: void *__pad2; nengel@9: void *__pad3; nengel@9: void *__pad4; nengel@9: size_t __pad5; nengel@9: int _mode; nengel@9: char _unused2[15 * sizeof(int) - 4 * sizeof(void *) - sizeof(size_t)]; nengel@9: }; nengel@9: typedef struct _IO_FILE _IO_FILE; nengel@9: struct _IO_FILE_plus; nengel@9: extern struct _IO_FILE_plus _IO_2_1_stdin_; nengel@9: extern struct _IO_FILE_plus _IO_2_1_stdout_; nengel@9: extern struct _IO_FILE_plus _IO_2_1_stderr_; nengel@9: typedef __ssize_t __io_read_fn(void *__cookie, char *__buf, size_t __nbytes); nengel@9: typedef __ssize_t __io_write_fn(void *__cookie, __const char *__buf, size_t __n); nengel@9: typedef int __io_seek_fn(void *__cookie, __off64_t *__pos, int __w); nengel@9: typedef int __io_close_fn(void *__cookie); nengel@9: extern int __underflow(_IO_FILE *); nengel@9: extern int __uflow(_IO_FILE *); nengel@9: extern int __overflow(_IO_FILE *, int); nengel@9: extern int _IO_getc(_IO_FILE *__fp); nengel@9: extern int _IO_putc(int __c, _IO_FILE *__fp); nengel@9: extern int _IO_feof(_IO_FILE *__fp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int _IO_ferror(_IO_FILE *__fp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int _IO_peekc_locked(_IO_FILE *__fp); nengel@9: extern void _IO_flockfile(_IO_FILE *) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void _IO_funlockfile(_IO_FILE *) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int _IO_ftrylockfile(_IO_FILE *) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int _IO_vfscanf(_IO_FILE *__restrict , const char *__restrict , __gnuc_va_list, int *__restrict ); nengel@9: extern int _IO_vfprintf(_IO_FILE *__restrict , const char *__restrict , __gnuc_va_list); nengel@9: extern __ssize_t _IO_padn(_IO_FILE *, int, __ssize_t); nengel@9: extern size_t _IO_sgetn(_IO_FILE *, void *, size_t); nengel@9: extern __off64_t _IO_seekoff(_IO_FILE *, __off64_t, int, int); nengel@9: extern __off64_t _IO_seekpos(_IO_FILE *, __off64_t, int); nengel@9: extern void _IO_free_backup_area(_IO_FILE *) __attribute__((__nothrow__, __leaf__)); nengel@9: typedef __gnuc_va_list va_list; nengel@9: typedef _G_fpos_t fpos_t; nengel@9: extern struct _IO_FILE *stdin; nengel@9: extern struct _IO_FILE *stdout; nengel@9: extern struct _IO_FILE *stderr; nengel@9: extern int remove(__const char *__filename) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int rename(__const char *__old, __const char *__new) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int renameat(int __oldfd, __const char *__old, int __newfd, __const char *__new) __attribute__((__nothrow__, __leaf__)); nengel@9: extern FILE *tmpfile(void) __attribute__((__warn_unused_result__)); nengel@9: extern char *tmpnam(char *__s) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern char *tmpnam_r(char *__s) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern char *tempnam(__const char *__dir, __const char *__pfx) __attribute__((__nothrow__, __leaf__)) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)); nengel@9: extern int fclose(FILE *__stream); nengel@9: extern int fflush(FILE *__stream); nengel@9: extern int fflush_unlocked(FILE *__stream); nengel@9: extern FILE *fopen(__const char *__restrict __filename, __const char *__restrict __modes) __attribute__((__warn_unused_result__)); nengel@9: extern FILE *freopen(__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __attribute__((__warn_unused_result__)); nengel@9: extern FILE *fdopen(int __fd, __const char *__modes) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern FILE *fmemopen(void *__s, size_t __len, __const char *__modes) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern FILE *open_memstream(char **__bufloc, size_t *__sizeloc) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern void setbuf(FILE *__restrict __stream, char *__restrict __buf) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int setvbuf(FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void setbuffer(FILE *__restrict __stream, char *__restrict __buf, size_t __size) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void setlinebuf(FILE *__stream) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int fprintf(FILE *__restrict __stream, __const char *__restrict __format, ...); nengel@9: extern int printf(__const char *__restrict __format, ...); nengel@9: extern int sprintf(char *__restrict __s, __const char *__restrict __format, ...) __attribute__((__nothrow__)); nengel@9: extern int vfprintf(FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg); nengel@9: extern int vprintf(__const char *__restrict __format, __gnuc_va_list __arg); nengel@9: extern int vsprintf(char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__((__nothrow__)); nengel@9: extern int snprintf(char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) __attribute__((__nothrow__)) __attribute__((__format__(__printf__, 3, 4))); nengel@9: extern int vsnprintf(char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__((__nothrow__)) __attribute__((__format__(__printf__, 3, 0))); nengel@9: extern int vdprintf(int __fd, __const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__((__format__(__printf__, 2, 0))); nengel@9: extern int dprintf(int __fd, __const char *__restrict __fmt, ...) __attribute__((__format__(__printf__, 2, 3))); nengel@9: extern int fscanf(FILE *__restrict __stream, __const char *__restrict __format, ...) __attribute__((__warn_unused_result__)); nengel@9: extern int scanf(__const char *__restrict __format, ...) __attribute__((__warn_unused_result__)); nengel@9: extern int sscanf(__const char *__restrict __s, __const char *__restrict __format, ...) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int fscanf(FILE *__restrict __stream, __const char *__restrict __format, ...) __asm__ ("""__isoc99_fscanf") __attribute__((__warn_unused_result__)); nengel@9: extern int scanf(__const char *__restrict __format, ...) __asm__ ("""__isoc99_scanf") __attribute__((__warn_unused_result__)); nengel@9: extern int sscanf(__const char *__restrict __s, __const char *__restrict __format, ...) __asm__ ("""__isoc99_sscanf") __attribute__((__nothrow__, __leaf__)); nengel@9: extern int vfscanf(FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__((__format__(__scanf__, 2, 0))) __attribute__((__warn_unused_result__)); nengel@9: extern int vscanf(__const char *__restrict __format, __gnuc_va_list __arg) __attribute__((__format__(__scanf__, 1, 0))) __attribute__((__warn_unused_result__)); nengel@9: extern int vsscanf(__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__((__nothrow__, __leaf__)) __attribute__((__format__(__scanf__, 2, 0))); nengel@9: extern int vfscanf(FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("""__isoc99_vfscanf") __attribute__((__format__(__scanf__, 2, 0))) __attribute__((__warn_unused_result__)); nengel@9: extern int vscanf(__const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("""__isoc99_vscanf") __attribute__((__format__(__scanf__, 1, 0))) __attribute__((__warn_unused_result__)); nengel@9: extern int vsscanf(__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("""__isoc99_vsscanf") __attribute__((__nothrow__, __leaf__)) __attribute__((__format__(__scanf__, 2, 0))); nengel@9: extern int fgetc(FILE *__stream); nengel@9: extern int getc(FILE *__stream); nengel@9: extern int getchar(void); nengel@9: extern int getc_unlocked(FILE *__stream); nengel@9: extern int getchar_unlocked(void); nengel@9: extern int fgetc_unlocked(FILE *__stream); nengel@9: extern int fputc(int __c, FILE *__stream); nengel@9: extern int putc(int __c, FILE *__stream); nengel@9: extern int putchar(int __c); nengel@9: extern int fputc_unlocked(int __c, FILE *__stream); nengel@9: extern int putc_unlocked(int __c, FILE *__stream); nengel@9: extern int putchar_unlocked(int __c); nengel@9: extern int getw(FILE *__stream); nengel@9: extern int putw(int __w, FILE *__stream); nengel@9: extern char *fgets(char *__restrict __s, int __n, FILE *__restrict __stream) __attribute__((__warn_unused_result__)); nengel@9: extern char *gets(char *__s) __attribute__((__warn_unused_result__)); nengel@9: extern __ssize_t __getdelim(char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __attribute__((__warn_unused_result__)); nengel@9: extern __ssize_t getdelim(char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __attribute__((__warn_unused_result__)); nengel@9: extern __ssize_t getline(char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) __attribute__((__warn_unused_result__)); nengel@9: extern int fputs(__const char *__restrict __s, FILE *__restrict __stream); nengel@9: extern int puts(__const char *__s); nengel@9: extern int ungetc(int __c, FILE *__stream); nengel@9: extern size_t fread(void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__((__warn_unused_result__)); nengel@9: extern size_t fwrite(__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s); nengel@9: extern size_t fread_unlocked(void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__((__warn_unused_result__)); nengel@9: extern size_t fwrite_unlocked(__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream); nengel@9: extern int fseek(FILE *__stream, long int __off, int __whence); nengel@9: extern long int ftell(FILE *__stream) __attribute__((__warn_unused_result__)); nengel@9: extern void rewind(FILE *__stream); nengel@9: extern int fseeko(FILE *__stream, __off_t __off, int __whence); nengel@9: extern __off_t ftello(FILE *__stream) __attribute__((__warn_unused_result__)); nengel@9: extern int fgetpos(FILE *__restrict __stream, fpos_t *__restrict __pos); nengel@9: extern int fsetpos(FILE *__stream, __const fpos_t *__pos); nengel@9: extern void clearerr(FILE *__stream) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int feof(FILE *__stream) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int ferror(FILE *__stream) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern void clearerr_unlocked(FILE *__stream) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int feof_unlocked(FILE *__stream) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int ferror_unlocked(FILE *__stream) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern void perror(__const char *__s); nengel@9: extern int sys_nerr; nengel@9: extern __const char *__const sys_errlist[]; nengel@9: extern int fileno(FILE *__stream) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int fileno_unlocked(FILE *__stream) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern FILE *popen(__const char *__command, __const char *__modes) __attribute__((__warn_unused_result__)); nengel@9: extern int pclose(FILE *__stream); nengel@9: extern char *ctermid(char *__s) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void flockfile(FILE *__stream) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int ftrylockfile(FILE *__stream) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern void funlockfile(FILE *__stream) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __inline __attribute__((__gnu_inline__)) int getchar(void) nengel@9: { nengel@9: return _IO_getc(stdin); nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) int fgetc_unlocked(FILE *__fp) nengel@9: { nengel@9: return (__builtin_expect(((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow(__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) int getc_unlocked(FILE *__fp) nengel@9: { nengel@9: return (__builtin_expect(((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow(__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) int getchar_unlocked(void) nengel@9: { nengel@9: return (__builtin_expect(((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow(stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) int putchar(int __c) nengel@9: { nengel@9: return _IO_putc(__c, stdout); nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) int fputc_unlocked(int __c, FILE *__stream) nengel@9: { nengel@9: return (__builtin_expect(((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow(__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) int putc_unlocked(int __c, FILE *__stream) nengel@9: { nengel@9: return (__builtin_expect(((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow(__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) int putchar_unlocked(int __c) nengel@9: { nengel@9: return (__builtin_expect(((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow(stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) int __attribute__((__nothrow__, __leaf__)) feof_unlocked(FILE *__stream) nengel@9: { nengel@9: return (((__stream)->_flags & 0x10) != 0); nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) int __attribute__((__nothrow__, __leaf__)) ferror_unlocked(FILE *__stream) nengel@9: { nengel@9: return (((__stream)->_flags & 0x20) != 0); nengel@9: } nengel@9: extern int __sprintf_chk(char *__restrict __s, int __flag, size_t __slen, __const char *__restrict __format, ...) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __vsprintf_chk(char *__restrict __s, int __flag, size_t __slen, __const char *__restrict __format, __gnuc_va_list __ap) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) sprintf(char *__restrict __s, __const char *__restrict __fmt, ...) nengel@9: { nengel@9: return __builtin___sprintf_chk(__s, 2 - 1, __builtin_object_size(__s, 2 > 1), __fmt, __builtin_va_arg_pack()); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) vsprintf(char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) nengel@9: { nengel@9: return __builtin___vsprintf_chk(__s, 2 - 1, __builtin_object_size(__s, 2 > 1), __fmt, __ap); nengel@9: } nengel@9: extern int __snprintf_chk(char *__restrict __s, size_t __n, int __flag, size_t __slen, __const char *__restrict __format, ...) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __vsnprintf_chk(char *__restrict __s, size_t __n, int __flag, size_t __slen, __const char *__restrict __format, __gnuc_va_list __ap) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) snprintf(char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) nengel@9: { nengel@9: return __builtin___snprintf_chk(__s, __n, 2 - 1, __builtin_object_size(__s, 2 > 1), __fmt, __builtin_va_arg_pack()); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) vsnprintf(char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) nengel@9: { nengel@9: return __builtin___vsnprintf_chk(__s, __n, 2 - 1, __builtin_object_size(__s, 2 > 1), __fmt, __ap); nengel@9: } nengel@9: extern int __fprintf_chk(FILE *__restrict __stream, int __flag, __const char *__restrict __format, ...); nengel@9: extern int __printf_chk(int __flag, __const char *__restrict __format, ...); nengel@9: extern int __vfprintf_chk(FILE *__restrict __stream, int __flag, __const char *__restrict __format, __gnuc_va_list __ap); nengel@9: extern int __vprintf_chk(int __flag, __const char *__restrict __format, __gnuc_va_list __ap); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int fprintf(FILE *__restrict __stream, __const char *__restrict __fmt, ...) nengel@9: { nengel@9: return __fprintf_chk(__stream, 2 - 1, __fmt, __builtin_va_arg_pack()); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int printf(__const char *__restrict __fmt, ...) nengel@9: { nengel@9: return __printf_chk(2 - 1, __fmt, __builtin_va_arg_pack()); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int vprintf(__const char *__restrict __fmt, __gnuc_va_list __ap) nengel@9: { nengel@9: return __vfprintf_chk(stdout, 2 - 1, __fmt, __ap); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int vfprintf(FILE *__restrict __stream, __const char *__restrict __fmt, __gnuc_va_list __ap) nengel@9: { nengel@9: return __vfprintf_chk(__stream, 2 - 1, __fmt, __ap); nengel@9: } nengel@9: extern char *__gets_chk(char *__str, size_t) __attribute__((__warn_unused_result__)); nengel@9: extern char *__gets_warn(char *__str) __asm__ ("""gets") __attribute__((__warn_unused_result__)) __attribute__((__warning__("please use fgets or getline instead, gets can't ""specify buffer size"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) __attribute__((__warn_unused_result__)) char *gets(char *__str) nengel@9: { nengel@9: if (__builtin_object_size(__str, 2 > 1) != (size_t) - 1) nengel@9: return __gets_chk(__str, __builtin_object_size(__str, 2 > 1)); nengel@9: return __gets_warn(__str); nengel@9: } nengel@9: extern char *__fgets_chk(char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __attribute__((__warn_unused_result__)); nengel@9: extern char *__fgets_alias(char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("""fgets") __attribute__((__warn_unused_result__)); nengel@9: extern char *__fgets_chk_warn(char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("""__fgets_chk") __attribute__((__warn_unused_result__)) __attribute__((__warning__("fgets called with bigger size than length ""of destination buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) __attribute__((__warn_unused_result__)) char *fgets(char *__restrict __s, int __n, FILE *__restrict __stream) nengel@9: { nengel@9: if (__builtin_object_size(__s, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__n) || __n <= 0) nengel@9: return __fgets_chk(__s, __builtin_object_size(__s, 2 > 1), __n, __stream); nengel@9: if ((size_t) __n > __builtin_object_size(__s, 2 > 1)) nengel@9: return __fgets_chk_warn(__s, __builtin_object_size(__s, 2 > 1), __n, __stream); nengel@9: } nengel@9: return __fgets_alias(__s, __n, __stream); nengel@9: } nengel@9: extern size_t __fread_chk(void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__((__warn_unused_result__)); nengel@9: extern size_t __fread_alias(void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("""fread") __attribute__((__warn_unused_result__)); nengel@9: extern size_t __fread_chk_warn(void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("""__fread_chk") __attribute__((__warn_unused_result__)) __attribute__((__warning__("fread called with bigger size * nmemb than length ""of destination buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) __attribute__((__warn_unused_result__)) size_t fread(void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) nengel@9: { nengel@9: if (__builtin_object_size(__ptr, 0) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__size) || !__builtin_constant_p(__n) || (__size | __n) >= (((size_t) 1) << (8 * sizeof(size_t) / 2))) nengel@9: return __fread_chk(__ptr, __builtin_object_size(__ptr, 0), __size, __n, __stream); nengel@9: if (__size * __n > __builtin_object_size(__ptr, 0)) nengel@9: return __fread_chk_warn(__ptr, __builtin_object_size(__ptr, 0), __size, __n, __stream); nengel@9: } nengel@9: return __fread_alias(__ptr, __size, __n, __stream); nengel@9: } nengel@9: extern size_t __fread_unlocked_chk(void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __attribute__((__warn_unused_result__)); nengel@9: extern size_t __fread_unlocked_alias(void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("""fread_unlocked") __attribute__((__warn_unused_result__)); nengel@9: extern size_t __fread_unlocked_chk_warn(void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("""__fread_unlocked_chk") __attribute__((__warn_unused_result__)) __attribute__((__warning__("fread_unlocked called with bigger size * nmemb than ""length of destination buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) __attribute__((__warn_unused_result__)) size_t fread_unlocked(void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) nengel@9: { nengel@9: if (__builtin_object_size(__ptr, 0) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__size) || !__builtin_constant_p(__n) || (__size | __n) >= (((size_t) 1) << (8 * sizeof(size_t) / 2))) nengel@9: return __fread_unlocked_chk(__ptr, __builtin_object_size(__ptr, 0), __size, __n, __stream); nengel@9: if (__size * __n > __builtin_object_size(__ptr, 0)) nengel@9: return __fread_unlocked_chk_warn(__ptr, __builtin_object_size(__ptr, 0), __size, __n, __stream); nengel@9: } nengel@9: if (__builtin_constant_p(__size) && __builtin_constant_p(__n) && (__size | __n) < (((size_t) 1) << (8 * sizeof(size_t) / 2)) && __size * __n <= 8) nengel@9: { nengel@9: size_t __cnt = __size * __n; nengel@9: char *__cptr = (char *) __ptr; nengel@9: if (__cnt == 0) nengel@9: return 0; nengel@9: for (; nengel@9: __cnt > 0; nengel@9: --__cnt) nengel@9: { nengel@9: int __c = (__builtin_expect(((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow(__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); nengel@9: if (__c == (- 1)) nengel@9: break; nengel@9: *__cptr++ = __c; nengel@9: } nengel@9: return (__cptr - (char *) __ptr) / __size; nengel@9: } nengel@9: return __fread_unlocked_alias(__ptr, __size, __n, __stream); nengel@9: } nengel@9: typedef signed char int8_t; nengel@9: typedef short int int16_t; nengel@9: typedef int int32_t; nengel@9: typedef long int int64_t; nengel@9: typedef unsigned char uint8_t; nengel@9: typedef unsigned short int uint16_t; nengel@9: typedef unsigned int uint32_t; nengel@9: typedef unsigned long int uint64_t; nengel@9: typedef signed char int_least8_t; nengel@9: typedef short int int_least16_t; nengel@9: typedef int int_least32_t; nengel@9: typedef long int int_least64_t; nengel@9: typedef unsigned char uint_least8_t; nengel@9: typedef unsigned short int uint_least16_t; nengel@9: typedef unsigned int uint_least32_t; nengel@9: typedef unsigned long int uint_least64_t; nengel@9: typedef signed char int_fast8_t; nengel@9: typedef long int int_fast16_t; nengel@9: typedef long int int_fast32_t; nengel@9: typedef long int int_fast64_t; nengel@9: typedef unsigned char uint_fast8_t; nengel@9: typedef unsigned long int uint_fast16_t; nengel@9: typedef unsigned long int uint_fast32_t; nengel@9: typedef unsigned long int uint_fast64_t; nengel@9: typedef unsigned long int uintptr_t; nengel@9: typedef long int intmax_t; nengel@9: typedef unsigned long int uintmax_t; nengel@9: typedef long int ptrdiff_t; nengel@9: typedef int wchar_t; nengel@9: typedef struct nengel@9: { nengel@9: void **address; nengel@9: ptrdiff_t offset; nengel@9: struct nengel@9: { nengel@9: _Bool input : 1; nengel@9: _Bool output : 1; nengel@9: _Bool can_rename : 1; nengel@9: _Bool commutative : 1; nengel@9: } flags; nengel@9: size_t size; nengel@9: } nanos_dependence_internal_t; nengel@9: typedef enum nengel@9: { nengel@9: NANOS_PRIVATE, nengel@9: NANOS_SHARED nengel@9: } nanos_sharing_t; nengel@9: typedef struct nengel@9: { nengel@9: void *original; nengel@9: void *privates; nengel@9: void (*bop)(void *, void *); nengel@9: void (*vop)(int n, void *, void *); nengel@9: void (*cleanup)(void *); nengel@9: } nanos_reduction_t; nengel@9: typedef struct nengel@9: { nengel@9: uint64_t address; nengel@9: nanos_sharing_t sharing; nengel@9: struct nengel@9: { nengel@9: _Bool input : 1; nengel@9: _Bool output : 1; nengel@9: } flags; nengel@9: size_t size; nengel@9: } nanos_copy_data_internal_t; nengel@9: typedef nanos_dependence_internal_t nanos_dependence_t; nengel@9: typedef nanos_copy_data_internal_t nanos_copy_data_t; nengel@9: typedef void *nanos_thread_t; nengel@9: typedef void *nanos_wd_t; nengel@9: typedef struct nengel@9: { nengel@9: int nsect; nengel@9: nanos_wd_t lwd[]; nengel@9: } nanos_compound_wd_data_t; nengel@9: typedef struct nengel@9: { nengel@9: int n; nengel@9: } nanos_repeat_n_info_t; nengel@9: typedef struct nengel@9: { nengel@9: int lower; nengel@9: int upper; nengel@9: int step; nengel@9: _Bool last; nengel@9: int chunk; nengel@9: int stride; nengel@9: int thid; nengel@9: void *args; nengel@9: } nanos_loop_info_t; nengel@9: typedef void *nanos_ws_t; nengel@9: typedef void *nanos_ws_info_t; nengel@9: typedef void *nanos_ws_data_t; nengel@9: typedef void *nanos_ws_item_t; nengel@9: typedef struct nengel@9: { nengel@9: int lower_bound; nengel@9: int upper_bound; nengel@9: int loop_step; nengel@9: int chunk_size; nengel@9: } nanos_ws_info_loop_t; nengel@9: typedef struct nengel@9: { nengel@9: int lower; nengel@9: int upper; nengel@9: _Bool execute : 1; nengel@9: _Bool last : 1; nengel@9: } nanos_ws_item_loop_t; nengel@9: typedef struct nanos_ws_desc nengel@9: { nengel@9: volatile nanos_ws_t ws; nengel@9: nanos_ws_data_t data; nengel@9: struct nanos_ws_desc *next; nengel@9: nanos_thread_t *threads; nengel@9: int nths; nengel@9: } nanos_ws_desc_t; nengel@9: typedef struct nengel@9: { nengel@9: _Bool mandatory_creation : 1; nengel@9: _Bool tied : 1; nengel@9: _Bool reserved0 : 1; nengel@9: _Bool reserved1 : 1; nengel@9: _Bool reserved2 : 1; nengel@9: _Bool reserved3 : 1; nengel@9: _Bool reserved4 : 1; nengel@9: _Bool reserved5 : 1; nengel@9: } nanos_wd_props_t; nengel@9: typedef struct nengel@9: { nengel@9: nanos_thread_t tie_to; nengel@9: unsigned int priority; nengel@9: } nanos_wd_dyn_props_t; nengel@9: typedef struct nengel@9: { nengel@9: void *(*factory)(void *arg); nengel@9: void *arg; nengel@9: } nanos_device_t; nengel@9: typedef enum nengel@9: { nengel@9: NANOS_STATE_START, nengel@9: NANOS_STATE_END, nengel@9: NANOS_SUBSTATE_START, nengel@9: NANOS_SUBSTATE_END, nengel@9: NANOS_BURST_START, nengel@9: NANOS_BURST_END, nengel@9: NANOS_PTP_START, nengel@9: NANOS_PTP_END, nengel@9: NANOS_POINT, nengel@9: EVENT_TYPES nengel@9: } nanos_event_type_t; nengel@9: typedef enum nengel@9: { nengel@9: NANOS_NOT_CREATED, nengel@9: NANOS_NOT_RUNNING, nengel@9: NANOS_STARTUP, nengel@9: NANOS_SHUTDOWN, nengel@9: NANOS_ERROR, nengel@9: NANOS_IDLE, nengel@9: NANOS_RUNTIME, nengel@9: NANOS_RUNNING, nengel@9: NANOS_SYNCHRONIZATION, nengel@9: NANOS_SCHEDULING, nengel@9: NANOS_CREATION, nengel@9: NANOS_MEM_TRANSFER_IN, nengel@9: NANOS_MEM_TRANSFER_OUT, nengel@9: NANOS_MEM_TRANSFER_LOCAL, nengel@9: NANOS_MEM_TRANSFER_DEVICE_IN, nengel@9: NANOS_MEM_TRANSFER_DEVICE_OUT, nengel@9: NANOS_MEM_TRANSFER_DEVICE_LOCAL, nengel@9: NANOS_CACHE, nengel@9: NANOS_YIELD, nengel@9: NANOS_ACQUIRING_LOCK, nengel@9: NANOS_CONTEXT_SWITCH, nengel@9: NANOS_DEBUG, nengel@9: NANOS_EVENT_STATE_TYPES nengel@9: } nanos_event_state_value_t; nengel@9: typedef enum nengel@9: { nengel@9: NANOS_WD_DOMAIN, nengel@9: NANOS_WD_DEPENDENCY, nengel@9: NANOS_WAIT, nengel@9: NANOS_WD_REMOTE, nengel@9: NANOS_XFER_PUT, nengel@9: NANOS_XFER_GET nengel@9: } nanos_event_domain_t; nengel@9: typedef long long nanos_event_id_t; nengel@9: typedef unsigned int nanos_event_key_t; nengel@9: typedef unsigned long long nanos_event_value_t; nengel@9: typedef struct nengel@9: { nengel@9: nanos_event_key_t key; nengel@9: nanos_event_value_t value; nengel@9: } nanos_event_burst_t; nengel@9: typedef struct nengel@9: { nengel@9: nanos_event_state_value_t value; nengel@9: } nanos_event_state_t; nengel@9: typedef struct nengel@9: { nengel@9: unsigned int nkvs; nengel@9: nanos_event_key_t *keys; nengel@9: nanos_event_value_t *values; nengel@9: } nanos_event_point_t; nengel@9: typedef struct nengel@9: { nengel@9: nanos_event_domain_t domain; nengel@9: nanos_event_id_t id; nengel@9: unsigned int nkvs; nengel@9: nanos_event_key_t *keys; nengel@9: nanos_event_value_t *values; nengel@9: } nanos_event_ptp_t; nengel@9: typedef struct nengel@9: { nengel@9: nanos_event_type_t type; nengel@9: union nengel@9: { nengel@9: nanos_event_burst_t burst; nengel@9: nanos_event_state_t state; nengel@9: nanos_event_point_t point; nengel@9: nanos_event_ptp_t ptp; nengel@9: } info; nengel@9: } nanos_event_t; nengel@9: typedef enum nengel@9: { nengel@9: NANOS_LOCK_FREE = 0, nengel@9: NANOS_LOCK_BUSY = 1 nengel@9: } nanos_lock_state_t; nengel@9: typedef struct nanos_lock_t nengel@9: { nengel@9: volatile nanos_lock_state_t _state; nengel@9: } nanos_lock_t; nengel@9: typedef void (*nanos_translate_args_t)(void *, nanos_wd_t); nengel@9: typedef void (nanos_init_func_t)(void *); nengel@9: typedef struct nengel@9: { nengel@9: nanos_init_func_t *func; nengel@9: void *data; nengel@9: } nanos_init_desc_t; nengel@9: typedef void *nanos_wg_t; nengel@9: typedef void *nanos_team_t; nengel@9: typedef void *nanos_sched_t; nengel@9: typedef void *nanos_slicer_t; nengel@9: typedef void *nanos_dd_t; nengel@9: typedef void *nanos_sync_cond_t; nengel@9: typedef unsigned int nanos_copy_id_t; nengel@9: typedef struct nanos_const_wd_definition_tag nengel@9: { nengel@9: nanos_wd_props_t props; nengel@9: size_t data_alignment; nengel@9: size_t num_copies; nengel@9: size_t num_devices; nengel@9: } nanos_const_wd_definition_t; nengel@9: typedef struct nengel@9: { nengel@9: int nthreads; nengel@9: void *arch; nengel@9: } nanos_constraint_t; nengel@9: typedef enum nengel@9: { nengel@9: NANOS_OK = 0, nengel@9: NANOS_UNKNOWN_ERR, nengel@9: NANOS_UNIMPLEMENTED nengel@9: } nanos_err_t; nengel@9: typedef struct nengel@9: { nengel@9: void (*outline)(void *); nengel@9: } nanos_smp_args_t; nengel@9: extern nanos_wd_t nanos_current_wd_(void); nengel@9: extern nanos_wd_t nanos_current_wd(void); nengel@9: extern int nanos_get_wd_id_(nanos_wd_t wd); nengel@9: extern int nanos_get_wd_id(nanos_wd_t wd); nengel@9: extern nanos_slicer_t nanos_find_slicer_(const char *slicer); nengel@9: extern nanos_slicer_t nanos_find_slicer(const char *slicer); nengel@9: extern nanos_ws_t nanos_find_worksharing_(const char *label); nengel@9: extern nanos_ws_t nanos_find_worksharing(const char *label); nengel@9: extern nanos_err_t nanos_create_wd_compact_(nanos_wd_t *wd, nanos_const_wd_definition_t *const_data, nanos_wd_dyn_props_t *dyn_props, size_t data_size, void **data, nanos_wg_t wg, nanos_copy_data_t **copies); nengel@9: extern nanos_err_t nanos_create_wd_compact(nanos_wd_t *wd, nanos_const_wd_definition_t *const_data, nanos_wd_dyn_props_t *dyn_props, size_t data_size, void **data, nanos_wg_t wg, nanos_copy_data_t **copies); nengel@9: extern nanos_err_t nanos_set_translate_function_(nanos_wd_t wd, nanos_translate_args_t translate_args); nengel@9: extern nanos_err_t nanos_set_translate_function(nanos_wd_t wd, nanos_translate_args_t translate_args); nengel@9: extern nanos_err_t nanos_create_sliced_wd_(nanos_wd_t *uwd, size_t num_devices, nanos_device_t *devices, size_t outline_data_size, int outline_data_align, void **outline_data, nanos_wg_t uwg, nanos_slicer_t slicer, nanos_wd_props_t *props, nanos_wd_dyn_props_t *dyn_props, size_t num_copies, nanos_copy_data_t **copies); nengel@9: extern nanos_err_t nanos_create_sliced_wd(nanos_wd_t *uwd, size_t num_devices, nanos_device_t *devices, size_t outline_data_size, int outline_data_align, void **outline_data, nanos_wg_t uwg, nanos_slicer_t slicer, nanos_wd_props_t *props, nanos_wd_dyn_props_t *dyn_props, size_t num_copies, nanos_copy_data_t **copies); nengel@9: extern nanos_err_t nanos_submit_(nanos_wd_t wd, size_t num_deps, nanos_dependence_t *deps, nanos_team_t team); nengel@9: extern nanos_err_t nanos_submit(nanos_wd_t wd, size_t num_deps, nanos_dependence_t *deps, nanos_team_t team); nengel@9: extern nanos_err_t nanos_create_wd_and_run_compact_(nanos_const_wd_definition_t *const_data, nanos_wd_dyn_props_t *dyn_props, size_t data_size, void *data, size_t num_deps, nanos_dependence_t *deps, nanos_copy_data_t *copies, nanos_translate_args_t translate_args); nengel@9: extern nanos_err_t nanos_create_wd_and_run_compact(nanos_const_wd_definition_t *const_data, nanos_wd_dyn_props_t *dyn_props, size_t data_size, void *data, size_t num_deps, nanos_dependence_t *deps, nanos_copy_data_t *copies, nanos_translate_args_t translate_args); nengel@9: extern nanos_err_t nanos_create_for_(void); nengel@9: extern nanos_err_t nanos_create_for(void); nengel@9: extern nanos_err_t nanos_set_internal_wd_data_(nanos_wd_t wd, void *data); nengel@9: extern nanos_err_t nanos_set_internal_wd_data(nanos_wd_t wd, void *data); nengel@9: extern nanos_err_t nanos_get_internal_wd_data_(nanos_wd_t wd, void **data); nengel@9: extern nanos_err_t nanos_get_internal_wd_data(nanos_wd_t wd, void **data); nengel@9: extern nanos_err_t nanos_yield_(void); nengel@9: extern nanos_err_t nanos_yield(void); nengel@9: extern nanos_err_t nanos_slicer_get_specific_data_(nanos_slicer_t slicer, void **data); nengel@9: extern nanos_err_t nanos_slicer_get_specific_data(nanos_slicer_t slicer, void **data); nengel@9: extern nanos_err_t nanos_create_team_(nanos_team_t *team, nanos_sched_t sg, unsigned int *nthreads, nanos_constraint_t *constraints, _Bool reuse, nanos_thread_t *info); nengel@9: extern nanos_err_t nanos_create_team(nanos_team_t *team, nanos_sched_t sg, unsigned int *nthreads, nanos_constraint_t *constraints, _Bool reuse, nanos_thread_t *info); nengel@9: extern nanos_err_t nanos_create_team_mapped_(nanos_team_t *team, nanos_sched_t sg, unsigned int *nthreads, unsigned int *mapping); nengel@9: extern nanos_err_t nanos_create_team_mapped(nanos_team_t *team, nanos_sched_t sg, unsigned int *nthreads, unsigned int *mapping); nengel@9: extern nanos_err_t nanos_leave_team_(); nengel@9: extern nanos_err_t nanos_leave_team(); nengel@9: extern nanos_err_t nanos_end_team_(nanos_team_t team); nengel@9: extern nanos_err_t nanos_end_team(nanos_team_t team); nengel@9: extern nanos_err_t nanos_team_barrier_(void); nengel@9: extern nanos_err_t nanos_team_barrier(void); nengel@9: extern nanos_err_t nanos_single_guard_(_Bool *); nengel@9: extern nanos_err_t nanos_single_guard(_Bool *); nengel@9: extern nanos_err_t nanos_enter_sync_init_(_Bool *b); nengel@9: extern nanos_err_t nanos_enter_sync_init(_Bool *b); nengel@9: extern nanos_err_t nanos_wait_sync_init_(void); nengel@9: extern nanos_err_t nanos_wait_sync_init(void); nengel@9: extern nanos_err_t nanos_release_sync_init_(void); nengel@9: extern nanos_err_t nanos_release_sync_init(void); nengel@9: extern nanos_err_t nanos_team_get_num_starring_threads_(int *n); nengel@9: extern nanos_err_t nanos_team_get_num_starring_threads(int *n); nengel@9: extern nanos_err_t nanos_team_get_starring_threads_(int *n, nanos_thread_t *list_of_threads); nengel@9: extern nanos_err_t nanos_team_get_starring_threads(int *n, nanos_thread_t *list_of_threads); nengel@9: extern nanos_err_t nanos_team_get_num_supporting_threads_(int *n); nengel@9: extern nanos_err_t nanos_team_get_num_supporting_threads(int *n); nengel@9: extern nanos_err_t nanos_team_get_supporting_threads_(int *n, nanos_thread_t *list_of_threads); nengel@9: extern nanos_err_t nanos_team_get_supporting_threads(int *n, nanos_thread_t *list_of_threads); nengel@9: extern nanos_err_t nanos_register_reduction_(nanos_reduction_t *red); nengel@9: extern nanos_err_t nanos_register_reduction(nanos_reduction_t *red); nengel@9: extern nanos_err_t nanos_reduction_get_private_data_(void **copy, void *sink); nengel@9: extern nanos_err_t nanos_reduction_get_private_data(void **copy, void *sink); nengel@9: extern nanos_err_t nanos_worksharing_create_(nanos_ws_desc_t **wsd, nanos_ws_t ws, nanos_ws_info_t *info, _Bool *b); nengel@9: extern nanos_err_t nanos_worksharing_create(nanos_ws_desc_t **wsd, nanos_ws_t ws, nanos_ws_info_t *info, _Bool *b); nengel@9: extern nanos_err_t nanos_worksharing_next_item_(nanos_ws_desc_t *wsd, nanos_ws_item_t *wsi); nengel@9: extern nanos_err_t nanos_worksharing_next_item(nanos_ws_desc_t *wsd, nanos_ws_item_t *wsi); nengel@9: extern nanos_err_t nanos_wg_wait_completion_(nanos_wg_t wg, _Bool avoid_flush); nengel@9: extern nanos_err_t nanos_wg_wait_completion(nanos_wg_t wg, _Bool avoid_flush); nengel@9: extern nanos_err_t nanos_create_int_sync_cond_(nanos_sync_cond_t *sync_cond, volatile int *p, int condition); nengel@9: extern nanos_err_t nanos_create_int_sync_cond(nanos_sync_cond_t *sync_cond, volatile int *p, int condition); nengel@9: extern nanos_err_t nanos_create_bool_sync_cond_(nanos_sync_cond_t *sync_cond, volatile _Bool *p, _Bool condition); nengel@9: extern nanos_err_t nanos_create_bool_sync_cond(nanos_sync_cond_t *sync_cond, volatile _Bool *p, _Bool condition); nengel@9: extern nanos_err_t nanos_sync_cond_wait_(nanos_sync_cond_t *sync_cond); nengel@9: extern nanos_err_t nanos_sync_cond_wait(nanos_sync_cond_t *sync_cond); nengel@9: extern nanos_err_t nanos_sync_cond_signal_(nanos_sync_cond_t *sync_cond); nengel@9: extern nanos_err_t nanos_sync_cond_signal(nanos_sync_cond_t *sync_cond); nengel@9: extern nanos_err_t nanos_destroy_sync_cond_(nanos_sync_cond_t *sync_cond); nengel@9: extern nanos_err_t nanos_destroy_sync_cond(nanos_sync_cond_t *sync_cond); nengel@9: extern nanos_err_t nanos_wait_on_(size_t num_deps, nanos_dependence_t *deps); nengel@9: extern nanos_err_t nanos_wait_on(size_t num_deps, nanos_dependence_t *deps); nengel@9: extern nanos_err_t nanos_init_lock_(nanos_lock_t **lock); nengel@9: extern nanos_err_t nanos_init_lock(nanos_lock_t **lock); nengel@9: extern nanos_err_t nanos_set_lock_(nanos_lock_t *lock); nengel@9: extern nanos_err_t nanos_set_lock(nanos_lock_t *lock); nengel@9: extern nanos_err_t nanos_unset_lock_(nanos_lock_t *lock); nengel@9: extern nanos_err_t nanos_unset_lock(nanos_lock_t *lock); nengel@9: extern nanos_err_t nanos_try_lock_(nanos_lock_t *lock, _Bool *result); nengel@9: extern nanos_err_t nanos_try_lock(nanos_lock_t *lock, _Bool *result); nengel@9: extern nanos_err_t nanos_destroy_lock_(nanos_lock_t *lock); nengel@9: extern nanos_err_t nanos_destroy_lock(nanos_lock_t *lock); nengel@9: extern nanos_err_t nanos_get_addr_(nanos_copy_id_t copy_id, void **addr, nanos_wd_t cwd); nengel@9: extern nanos_err_t nanos_get_addr(nanos_copy_id_t copy_id, void **addr, nanos_wd_t cwd); nengel@9: extern nanos_err_t nanos_copy_value_(void *dst, nanos_copy_id_t copy_id, nanos_wd_t cwd); nengel@9: extern nanos_err_t nanos_copy_value(void *dst, nanos_copy_id_t copy_id, nanos_wd_t cwd); nengel@9: extern nanos_err_t nanos_get_num_running_tasks_(int *num); nengel@9: extern nanos_err_t nanos_get_num_running_tasks(int *num); nengel@9: extern nanos_err_t nanos_start_scheduler_(); nengel@9: extern nanos_err_t nanos_start_scheduler(); nengel@9: extern nanos_err_t nanos_stop_scheduler_(); nengel@9: extern nanos_err_t nanos_stop_scheduler(); nengel@9: extern nanos_err_t nanos_scheduler_enabled_(_Bool *res); nengel@9: extern nanos_err_t nanos_scheduler_enabled(_Bool *res); nengel@9: extern nanos_err_t nanos_wait_until_threads_paused_(); nengel@9: extern nanos_err_t nanos_wait_until_threads_paused(); nengel@9: extern nanos_err_t nanos_wait_until_threads_unpaused_(); nengel@9: extern nanos_err_t nanos_wait_until_threads_unpaused(); nengel@9: extern nanos_err_t nanos_delay_start_(); nengel@9: extern nanos_err_t nanos_delay_start(); nengel@9: extern nanos_err_t nanos_start_(); nengel@9: extern nanos_err_t nanos_start(); nengel@9: extern nanos_err_t nanos_finish_(); nengel@9: extern nanos_err_t nanos_finish(); nengel@9: extern nanos_err_t nanos_malloc_(void **p, size_t size, const char *file, int line); nengel@9: extern nanos_err_t nanos_malloc(void **p, size_t size, const char *file, int line); nengel@9: extern nanos_err_t nanos_free_(void *p); nengel@9: extern nanos_err_t nanos_free(void *p); nengel@9: extern void nanos_handle_error_(nanos_err_t err); nengel@9: extern void nanos_handle_error(nanos_err_t err); nengel@9: extern void *nanos_smp_factory_(void *args); nengel@9: extern void *nanos_smp_factory(void *args); nengel@9: extern nanos_err_t nanos_instrument_register_key_(nanos_event_key_t *event_key, const char *key, const char *description, _Bool abort_when_registered); nengel@9: extern nanos_err_t nanos_instrument_register_key(nanos_event_key_t *event_key, const char *key, const char *description, _Bool abort_when_registered); nengel@9: extern nanos_err_t nanos_instrument_register_value_(nanos_event_value_t *event_value, const char *key, const char *value, const char *description, _Bool abort_when_registered); nengel@9: extern nanos_err_t nanos_instrument_register_value(nanos_event_value_t *event_value, const char *key, const char *value, const char *description, _Bool abort_when_registered); nengel@9: extern nanos_err_t nanos_instrument_register_value_with_val_(nanos_event_value_t val, const char *key, const char *value, const char *description, _Bool abort_when_registered); nengel@9: extern nanos_err_t nanos_instrument_register_value_with_val(nanos_event_value_t val, const char *key, const char *value, const char *description, _Bool abort_when_registered); nengel@9: extern nanos_err_t nanos_instrument_get_key_(const char *key, nanos_event_key_t *event_key); nengel@9: extern nanos_err_t nanos_instrument_get_key(const char *key, nanos_event_key_t *event_key); nengel@9: extern nanos_err_t nanos_instrument_get_value_(const char *key, const char *value, nanos_event_value_t *event_value); nengel@9: extern nanos_err_t nanos_instrument_get_value(const char *key, const char *value, nanos_event_value_t *event_value); nengel@9: extern nanos_err_t nanos_instrument_events_(unsigned int num_events, nanos_event_t events[]); nengel@9: extern nanos_err_t nanos_instrument_events(unsigned int num_events, nanos_event_t events[]); nengel@9: extern nanos_err_t nanos_instrument_enter_state_(nanos_event_state_value_t state); nengel@9: extern nanos_err_t nanos_instrument_enter_state(nanos_event_state_value_t state); nengel@9: extern nanos_err_t nanos_instrument_leave_state_(void); nengel@9: extern nanos_err_t nanos_instrument_leave_state(void); nengel@9: extern nanos_err_t nanos_instrument_enter_burst_(nanos_event_key_t key, nanos_event_value_t value); nengel@9: extern nanos_err_t nanos_instrument_enter_burst(nanos_event_key_t key, nanos_event_value_t value); nengel@9: extern nanos_err_t nanos_instrument_leave_burst_(nanos_event_key_t key); nengel@9: extern nanos_err_t nanos_instrument_leave_burst(nanos_event_key_t key); nengel@9: extern nanos_err_t nanos_instrument_point_event_(unsigned int nkvs, nanos_event_key_t *keys, nanos_event_value_t *values); nengel@9: extern nanos_err_t nanos_instrument_point_event(unsigned int nkvs, nanos_event_key_t *keys, nanos_event_value_t *values); nengel@9: extern nanos_err_t nanos_instrument_ptp_start_(nanos_event_domain_t domain, nanos_event_id_t id, unsigned int nkvs, nanos_event_key_t *keys, nanos_event_value_t *values); nengel@9: extern nanos_err_t nanos_instrument_ptp_start(nanos_event_domain_t domain, nanos_event_id_t id, unsigned int nkvs, nanos_event_key_t *keys, nanos_event_value_t *values); nengel@9: extern nanos_err_t nanos_instrument_ptp_end_(nanos_event_domain_t domain, nanos_event_id_t id, unsigned int nkvs, nanos_event_key_t *keys, nanos_event_value_t *values); nengel@9: extern nanos_err_t nanos_instrument_ptp_end(nanos_event_domain_t domain, nanos_event_id_t id, unsigned int nkvs, nanos_event_key_t *keys, nanos_event_value_t *values); nengel@9: extern nanos_err_t nanos_instrument_disable_state_events_(nanos_event_state_value_t state); nengel@9: extern nanos_err_t nanos_instrument_disable_state_events(nanos_event_state_value_t state); nengel@9: extern nanos_err_t nanos_instrument_enable_state_events_(void); nengel@9: extern nanos_err_t nanos_instrument_enable_state_events(void); nengel@9: extern nanos_err_t nanos_instrument_close_user_fun_event_(); nengel@9: extern nanos_err_t nanos_instrument_close_user_fun_event(); nengel@9: extern nanos_err_t nanos_instrument_enable_(void); nengel@9: extern nanos_err_t nanos_instrument_enable(void); nengel@9: extern nanos_err_t nanos_instrument_disable_(void); nengel@9: extern nanos_err_t nanos_instrument_disable(void); nengel@9: void nanos_reduction_int_vop(int, void *, void *); nengel@9: void nanos_reduction_bop_add_char(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_char(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_uchar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_uchar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_schar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_schar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_short(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_short(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_ushort(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_ushort(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_int(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_int(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_uint(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_uint(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_long(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_long(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_ulong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_ulong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_longlong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_longlong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_ulonglong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_ulonglong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add__Bool(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add__Bool(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_float(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_float(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_double(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_double(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_add_longdouble(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_add_longdouble(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_char(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_char(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_uchar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_uchar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_schar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_schar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_short(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_short(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_ushort(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_ushort(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_int(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_int(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_uint(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_uint(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_long(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_long(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_ulong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_ulong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_longlong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_longlong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_ulonglong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_ulonglong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub__Bool(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub__Bool(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_float(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_float(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_double(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_double(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_sub_longdouble(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_sub_longdouble(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_char(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_char(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_uchar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_uchar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_schar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_schar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_short(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_short(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_ushort(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_ushort(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_int(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_int(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_uint(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_uint(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_long(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_long(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_ulong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_ulong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_longlong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_longlong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_ulonglong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_ulonglong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod__Bool(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod__Bool(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_float(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_float(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_double(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_double(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_prod_longdouble(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_prod_longdouble(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and_char(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and_char(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and_uchar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and_uchar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and_schar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and_schar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and_short(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and_short(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and_ushort(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and_ushort(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and_int(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and_int(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and_uint(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and_uint(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and_long(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and_long(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and_ulong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and_ulong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and_longlong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and_longlong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and_ulonglong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and_ulonglong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_and__Bool(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_and__Bool(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or_char(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or_char(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or_uchar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or_uchar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or_schar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or_schar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or_short(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or_short(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or_ushort(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or_ushort(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or_int(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or_int(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or_uint(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or_uint(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or_long(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or_long(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or_ulong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or_ulong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or_longlong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or_longlong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or_ulonglong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or_ulonglong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_or__Bool(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_or__Bool(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor_char(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor_char(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor_uchar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor_uchar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor_schar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor_schar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor_short(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor_short(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor_ushort(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor_ushort(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor_int(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor_int(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor_uint(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor_uint(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor_long(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor_long(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor_ulong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor_ulong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor_longlong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor_longlong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor_ulonglong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor_ulonglong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_xor__Bool(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_xor__Bool(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_char(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_char(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_uchar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_uchar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_schar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_schar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_short(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_short(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_ushort(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_ushort(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_int(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_int(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_uint(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_uint(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_long(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_long(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_ulong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_ulong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_longlong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_longlong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_ulonglong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_ulonglong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land__Bool(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land__Bool(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_float(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_float(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_double(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_double(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_land_longdouble(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_land_longdouble(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_char(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_char(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_uchar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_uchar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_schar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_schar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_short(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_short(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_ushort(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_ushort(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_int(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_int(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_uint(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_uint(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_long(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_long(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_ulong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_ulong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_longlong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_longlong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_ulonglong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_ulonglong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor__Bool(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor__Bool(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_float(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_float(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_double(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_double(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_lor_longdouble(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_lor_longdouble(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_char(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_char(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_uchar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_uchar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_schar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_schar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_short(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_short(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_ushort(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_ushort(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_int(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_int(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_uint(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_uint(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_long(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_long(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_ulong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_ulong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_longlong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_longlong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_ulonglong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_ulonglong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max__Bool(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max__Bool(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_float(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_float(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_double(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_double(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_max_longdouble(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_max_longdouble(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_char(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_char(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_uchar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_uchar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_schar(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_schar(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_short(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_short(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_ushort(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_ushort(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_int(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_int(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_uint(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_uint(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_long(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_long(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_ulong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_ulong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_longlong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_longlong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_ulonglong(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_ulonglong(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min__Bool(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min__Bool(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_float(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_float(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_double(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_double(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_bop_min_longdouble(void *arg1, void *arg2); nengel@9: void nanos_reduction_vop_min_longdouble(int i, void *arg1, void *arg2); nengel@9: void nanos_reduction_default_cleanup_char(void *r); nengel@9: void nanos_reduction_default_cleanup_uchar(void *r); nengel@9: void nanos_reduction_default_cleanup_schar(void *r); nengel@9: void nanos_reduction_default_cleanup_short(void *r); nengel@9: void nanos_reduction_default_cleanup_ushort(void *r); nengel@9: void nanos_reduction_default_cleanup_int(void *r); nengel@9: void nanos_reduction_default_cleanup_uint(void *r); nengel@9: void nanos_reduction_default_cleanup_long(void *r); nengel@9: void nanos_reduction_default_cleanup_ulong(void *r); nengel@9: void nanos_reduction_default_cleanup_longlong(void *r); nengel@9: void nanos_reduction_default_cleanup_ulonglong(void *r); nengel@9: void nanos_reduction_default_cleanup__Bool(void *r); nengel@9: void nanos_reduction_default_cleanup_float(void *r); nengel@9: void nanos_reduction_default_cleanup_double(void *r); nengel@9: void nanos_reduction_default_cleanup_longdouble(void *r); nengel@9: typedef void *omp_lock_t; nengel@9: typedef void *omp_nest_lock_t; nengel@9: typedef enum omp_sched_t nengel@9: { nengel@9: omp_sched_static = 1, nengel@9: omp_sched_dynamic = 2, nengel@9: omp_sched_guided = 3, nengel@9: omp_sched_auto = 4 nengel@9: } omp_sched_t; nengel@9: extern void omp_set_num_threads(int num_threads); nengel@9: extern int omp_get_num_threads(void); nengel@9: extern int omp_get_max_threads(void); nengel@9: extern int omp_get_thread_num(void); nengel@9: extern int omp_get_num_procs(void); nengel@9: extern int omp_in_parallel(void); nengel@9: extern void omp_set_dynamic(int dynamic_threads); nengel@9: extern int omp_get_dynamic(void); nengel@9: extern void omp_set_nested(int nested); nengel@9: extern int omp_get_nested(void); nengel@9: extern int omp_get_thread_limit(void); nengel@9: extern void omp_set_max_active_levels(int max_active_levels); nengel@9: extern int omp_get_max_active_levels(void); nengel@9: extern void omp_set_schedule(omp_sched_t kind, int modifier); nengel@9: extern void omp_get_schedule(omp_sched_t *kind, int *modifier); nengel@9: extern int omp_get_level(void); nengel@9: extern int omp_get_ancestor_thread_num(int level); nengel@9: extern int omp_get_team_size(int level); nengel@9: extern int omp_get_active_level(void); nengel@9: extern void omp_init_lock(omp_lock_t *lock); nengel@9: extern void omp_destroy_lock(omp_lock_t *lock); nengel@9: extern void omp_set_lock(omp_lock_t *lock); nengel@9: extern void omp_unset_lock(omp_lock_t *lock); nengel@9: extern int omp_test_lock(omp_lock_t *lock); nengel@9: extern void omp_init_nest_lock(omp_nest_lock_t *lock); nengel@9: extern void omp_destroy_nest_lock(omp_nest_lock_t *lock); nengel@9: extern void omp_set_nest_lock(omp_nest_lock_t *lock); nengel@9: extern void omp_unset_nest_lock(omp_nest_lock_t *lock); nengel@9: extern int omp_test_nest_lock(omp_nest_lock_t *lock); nengel@9: extern double omp_get_wtime(void); nengel@9: extern double omp_get_wtick(void); nengel@9: extern int omp_in_final(void); nengel@9: nanos_err_t nanos_omp_single(_Bool *); nengel@9: nanos_err_t nanos_omp_barrier(void); nengel@9: void nanos_omp_set_interface(void *); nengel@9: nanos_err_t nanos_omp_set_implicit(nanos_wd_t uwd); nengel@9: int nanos_omp_get_max_threads(void); nengel@9: nanos_ws_t nanos_omp_find_worksharing(omp_sched_t kind); nengel@9: nanos_err_t nanos_omp_get_schedule(omp_sched_t *kind, int *modifier); nengel@9: typedef __time_t time_t; nengel@9: struct timespec nengel@9: { nengel@9: __time_t tv_sec; nengel@9: long int tv_nsec; nengel@9: }; nengel@9: struct sched_param nengel@9: { nengel@9: int __sched_priority; nengel@9: }; nengel@9: struct __sched_param nengel@9: { nengel@9: int __sched_priority; nengel@9: }; nengel@9: typedef unsigned long int __cpu_mask; nengel@9: typedef struct nengel@9: { nengel@9: __cpu_mask __bits[1024 / (8 * sizeof(__cpu_mask))]; nengel@9: } cpu_set_t; nengel@9: extern int __sched_cpucount(size_t __setsize, const cpu_set_t *__setp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern cpu_set_t *__sched_cpualloc(size_t __count) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern void __sched_cpufree(cpu_set_t *__set) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int sched_setparam(__pid_t __pid, __const struct sched_param *__param) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int sched_getparam(__pid_t __pid, struct sched_param *__param) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int sched_setscheduler(__pid_t __pid, int __policy, __const struct sched_param *__param) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int sched_getscheduler(__pid_t __pid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int sched_yield(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int sched_get_priority_max(int __algorithm) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int sched_get_priority_min(int __algorithm) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int sched_rr_get_interval(__pid_t __pid, struct timespec *__t) __attribute__((__nothrow__, __leaf__)); nengel@9: typedef __clock_t clock_t; nengel@9: typedef __clockid_t clockid_t; nengel@9: typedef __timer_t timer_t; nengel@9: struct tm nengel@9: { nengel@9: int tm_sec; nengel@9: int tm_min; nengel@9: int tm_hour; nengel@9: int tm_mday; nengel@9: int tm_mon; nengel@9: int tm_year; nengel@9: int tm_wday; nengel@9: int tm_yday; nengel@9: int tm_isdst; nengel@9: long int tm_gmtoff; nengel@9: __const char *tm_zone; nengel@9: }; nengel@9: struct itimerspec nengel@9: { nengel@9: struct timespec it_interval; nengel@9: struct timespec it_value; nengel@9: }; nengel@9: struct sigevent; nengel@9: extern clock_t clock(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern time_t time(time_t *__timer) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double difftime(time_t __time1, time_t __time0) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern time_t mktime(struct tm *__tp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern size_t strftime(char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp) __attribute__((__nothrow__, __leaf__)); nengel@9: typedef struct __locale_struct nengel@9: { nengel@9: struct __locale_data *__locales[13]; nengel@9: const unsigned short int *__ctype_b; nengel@9: const int *__ctype_tolower; nengel@9: const int *__ctype_toupper; nengel@9: const char *__names[13]; nengel@9: } *__locale_t; nengel@9: typedef __locale_t locale_t; nengel@9: extern size_t strftime_l(char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp, __locale_t __loc) __attribute__((__nothrow__, __leaf__)); nengel@9: extern struct tm *gmtime(__const time_t *__timer) __attribute__((__nothrow__, __leaf__)); nengel@9: extern struct tm *localtime(__const time_t *__timer) __attribute__((__nothrow__, __leaf__)); nengel@9: extern struct tm *gmtime_r(__const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern struct tm *localtime_r(__const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *asctime(__const struct tm *__tp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *ctime(__const time_t *__timer) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *asctime_r(__const struct tm *__restrict __tp, char *__restrict __buf) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *ctime_r(__const time_t *__restrict __timer, char *__restrict __buf) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *__tzname[2]; nengel@9: extern int __daylight; nengel@9: extern long int __timezone; nengel@9: extern char *tzname[2]; nengel@9: extern void tzset(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int daylight; nengel@9: extern long int timezone; nengel@9: extern int stime(__const time_t *__when) __attribute__((__nothrow__, __leaf__)); nengel@9: extern time_t timegm(struct tm *__tp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern time_t timelocal(struct tm *__tp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int dysize(int __year) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int nanosleep(__const struct timespec *__requested_time, struct timespec *__remaining); nengel@9: extern int clock_getres(clockid_t __clock_id, struct timespec *__res) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int clock_gettime(clockid_t __clock_id, struct timespec *__tp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int clock_settime(clockid_t __clock_id, __const struct timespec *__tp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int clock_nanosleep(clockid_t __clock_id, int __flags, __const struct timespec *__req, struct timespec *__rem); nengel@9: extern int clock_getcpuclockid(pid_t __pid, clockid_t *__clock_id) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int timer_create(clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int timer_delete(timer_t __timerid) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int timer_settime(timer_t __timerid, int __flags, __const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int timer_gettime(timer_t __timerid, struct itimerspec *__value) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int timer_getoverrun(timer_t __timerid) __attribute__((__nothrow__, __leaf__)); nengel@9: typedef unsigned long int pthread_t; nengel@9: typedef union nengel@9: { nengel@9: char __size[56]; nengel@9: long int __align; nengel@9: } pthread_attr_t; nengel@9: typedef struct __pthread_internal_list nengel@9: { nengel@9: struct __pthread_internal_list *__prev; nengel@9: struct __pthread_internal_list *__next; nengel@9: } __pthread_list_t; nengel@9: typedef union nengel@9: { nengel@9: struct __pthread_mutex_s nengel@9: { nengel@9: int __lock; nengel@9: unsigned int __count; nengel@9: int __owner; nengel@9: unsigned int __nusers; nengel@9: int __kind; nengel@9: int __spins; nengel@9: __pthread_list_t __list; nengel@9: } __data; nengel@9: char __size[40]; nengel@9: long int __align; nengel@9: } pthread_mutex_t; nengel@9: typedef union nengel@9: { nengel@9: char __size[4]; nengel@9: int __align; nengel@9: } pthread_mutexattr_t; nengel@9: typedef union nengel@9: { nengel@9: struct nengel@9: { nengel@9: int __lock; nengel@9: unsigned int __futex; nengel@9: __extension__ nengel@9: unsigned long long int __total_seq; nengel@9: __extension__ nengel@9: unsigned long long int __wakeup_seq; nengel@9: __extension__ nengel@9: unsigned long long int __woken_seq; nengel@9: void *__mutex; nengel@9: unsigned int __nwaiters; nengel@9: unsigned int __broadcast_seq; nengel@9: } __data; nengel@9: char __size[48]; nengel@9: __extension__ nengel@9: long long int __align; nengel@9: } pthread_cond_t; nengel@9: typedef union nengel@9: { nengel@9: char __size[4]; nengel@9: int __align; nengel@9: } pthread_condattr_t; nengel@9: typedef unsigned int pthread_key_t; nengel@9: typedef int pthread_once_t; nengel@9: typedef union nengel@9: { nengel@9: struct nengel@9: { nengel@9: int __lock; nengel@9: unsigned int __nr_readers; nengel@9: unsigned int __readers_wakeup; nengel@9: unsigned int __writer_wakeup; nengel@9: unsigned int __nr_readers_queued; nengel@9: unsigned int __nr_writers_queued; nengel@9: int __writer; nengel@9: int __shared; nengel@9: unsigned long int __pad1; nengel@9: unsigned long int __pad2; nengel@9: unsigned int __flags; nengel@9: } __data; nengel@9: char __size[56]; nengel@9: long int __align; nengel@9: } pthread_rwlock_t; nengel@9: typedef union nengel@9: { nengel@9: char __size[8]; nengel@9: long int __align; nengel@9: } pthread_rwlockattr_t; nengel@9: typedef volatile int pthread_spinlock_t; nengel@9: typedef union nengel@9: { nengel@9: char __size[32]; nengel@9: long int __align; nengel@9: } pthread_barrier_t; nengel@9: typedef union nengel@9: { nengel@9: char __size[4]; nengel@9: int __align; nengel@9: } pthread_barrierattr_t; nengel@9: typedef long int __jmp_buf[8]; nengel@9: enum nengel@9: { nengel@9: PTHREAD_CREATE_JOINABLE, nengel@9: PTHREAD_CREATE_DETACHED nengel@9: }; nengel@9: enum nengel@9: { nengel@9: PTHREAD_MUTEX_TIMED_NP, nengel@9: PTHREAD_MUTEX_RECURSIVE_NP, nengel@9: PTHREAD_MUTEX_ERRORCHECK_NP, nengel@9: PTHREAD_MUTEX_ADAPTIVE_NP, nengel@9: PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, nengel@9: PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, nengel@9: PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, nengel@9: PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL nengel@9: }; nengel@9: enum nengel@9: { nengel@9: PTHREAD_MUTEX_STALLED, nengel@9: PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, nengel@9: PTHREAD_MUTEX_ROBUST, nengel@9: PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST nengel@9: }; nengel@9: enum nengel@9: { nengel@9: PTHREAD_RWLOCK_PREFER_READER_NP, nengel@9: PTHREAD_RWLOCK_PREFER_WRITER_NP, nengel@9: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, nengel@9: PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP nengel@9: }; nengel@9: enum nengel@9: { nengel@9: PTHREAD_INHERIT_SCHED, nengel@9: PTHREAD_EXPLICIT_SCHED nengel@9: }; nengel@9: enum nengel@9: { nengel@9: PTHREAD_SCOPE_SYSTEM, nengel@9: PTHREAD_SCOPE_PROCESS nengel@9: }; nengel@9: enum nengel@9: { nengel@9: PTHREAD_PROCESS_PRIVATE, nengel@9: PTHREAD_PROCESS_SHARED nengel@9: }; nengel@9: struct _pthread_cleanup_buffer nengel@9: { nengel@9: void (*__routine)(void *); nengel@9: void *__arg; nengel@9: int __canceltype; nengel@9: struct _pthread_cleanup_buffer *__prev; nengel@9: }; nengel@9: enum nengel@9: { nengel@9: PTHREAD_CANCEL_ENABLE, nengel@9: PTHREAD_CANCEL_DISABLE nengel@9: }; nengel@9: enum nengel@9: { nengel@9: PTHREAD_CANCEL_DEFERRED, nengel@9: PTHREAD_CANCEL_ASYNCHRONOUS nengel@9: }; nengel@9: extern int pthread_create(pthread_t *__restrict __newthread, __const pthread_attr_t *__restrict __attr, void *(*__start_routine)(void *), void *__restrict __arg) __attribute__((__nothrow__)) __attribute__((__nonnull__(1, 3))); nengel@9: extern void pthread_exit(void *__retval) __attribute__((__noreturn__)); nengel@9: extern int pthread_join(pthread_t __th, void **__thread_return); nengel@9: extern int pthread_detach(pthread_t __th) __attribute__((__nothrow__, __leaf__)); nengel@9: extern pthread_t pthread_self(void) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int pthread_equal(pthread_t __thread1, pthread_t __thread2) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int pthread_attr_init(pthread_attr_t *__attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_attr_destroy(pthread_attr_t *__attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_attr_getdetachstate(__const pthread_attr_t *__attr, int *__detachstate) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_attr_setdetachstate(pthread_attr_t *__attr, int __detachstate) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_attr_getguardsize(__const pthread_attr_t *__attr, size_t *__guardsize) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_attr_setguardsize(pthread_attr_t *__attr, size_t __guardsize) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_attr_getschedparam(__const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_attr_setschedparam(pthread_attr_t *__restrict __attr, __const struct sched_param *__restrict __param) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_attr_getschedpolicy(__const pthread_attr_t *__restrict __attr, int *__restrict __policy) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_attr_setschedpolicy(pthread_attr_t *__attr, int __policy) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_attr_getinheritsched(__const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_attr_setinheritsched(pthread_attr_t *__attr, int __inherit) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_attr_getscope(__const pthread_attr_t *__restrict __attr, int *__restrict __scope) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_attr_setscope(pthread_attr_t *__attr, int __scope) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_attr_getstackaddr(__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))) __attribute__((__deprecated__)); nengel@9: extern int pthread_attr_setstackaddr(pthread_attr_t *__attr, void *__stackaddr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__deprecated__)); nengel@9: extern int pthread_attr_getstacksize(__const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_attr_setstacksize(pthread_attr_t *__attr, size_t __stacksize) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_attr_getstack(__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2, 3))); nengel@9: extern int pthread_attr_setstack(pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_setschedparam(pthread_t __target_thread, int __policy, __const struct sched_param *__param) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(3))); nengel@9: extern int pthread_getschedparam(pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2, 3))); nengel@9: extern int pthread_setschedprio(pthread_t __target_thread, int __prio) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int pthread_once(pthread_once_t *__once_control, void (*__init_routine)(void)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_setcancelstate(int __state, int *__oldstate); nengel@9: extern int pthread_setcanceltype(int __type, int *__oldtype); nengel@9: extern int pthread_cancel(pthread_t __th); nengel@9: extern void pthread_testcancel(void); nengel@9: typedef struct nengel@9: { nengel@9: struct nengel@9: { nengel@9: __jmp_buf __cancel_jmp_buf; nengel@9: int __mask_was_saved; nengel@9: } __cancel_jmp_buf[1]; nengel@9: void *__pad[4]; nengel@9: } __pthread_unwind_buf_t __attribute__((__aligned__)); nengel@9: struct __pthread_cleanup_frame nengel@9: { nengel@9: void (*__cancel_routine)(void *); nengel@9: void *__cancel_arg; nengel@9: int __do_it; nengel@9: int __cancel_type; nengel@9: }; nengel@9: extern void __pthread_register_cancel(__pthread_unwind_buf_t *__buf); nengel@9: extern void __pthread_unregister_cancel(__pthread_unwind_buf_t *__buf); nengel@9: extern void __pthread_unwind_next(__pthread_unwind_buf_t *__buf) __attribute__((__noreturn__)) __attribute__((__weak__)); nengel@9: struct __jmp_buf_tag; nengel@9: extern int __sigsetjmp(struct __jmp_buf_tag *__env, int __savemask) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int pthread_mutex_init(pthread_mutex_t *__mutex, __const pthread_mutexattr_t *__mutexattr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutex_destroy(pthread_mutex_t *__mutex) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutex_trylock(pthread_mutex_t *__mutex) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutex_lock(pthread_mutex_t *__mutex) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutex_timedlock(pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime) __attribute__((__nothrow__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_mutex_unlock(pthread_mutex_t *__mutex) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutex_getprioceiling(__const pthread_mutex_t *__restrict __mutex, int *__restrict __prioceiling) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_mutex_setprioceiling(pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 3))); nengel@9: extern int pthread_mutex_consistent(pthread_mutex_t *__mutex) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutexattr_init(pthread_mutexattr_t *__attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutexattr_destroy(pthread_mutexattr_t *__attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutexattr_getpshared(__const pthread_mutexattr_t *__restrict __attr, int *__restrict __pshared) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_mutexattr_setpshared(pthread_mutexattr_t *__attr, int __pshared) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutexattr_gettype(__const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_mutexattr_settype(pthread_mutexattr_t *__attr, int __kind) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutexattr_getprotocol(__const pthread_mutexattr_t *__restrict __attr, int *__restrict __protocol) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_mutexattr_setprotocol(pthread_mutexattr_t *__attr, int __protocol) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutexattr_getprioceiling(__const pthread_mutexattr_t *__restrict __attr, int *__restrict __prioceiling) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *__attr, int __prioceiling) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_mutexattr_getrobust(__const pthread_mutexattr_t *__attr, int *__robustness) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_mutexattr_setrobust(pthread_mutexattr_t *__attr, int __robustness) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_rwlock_init(pthread_rwlock_t *__restrict __rwlock, __const pthread_rwlockattr_t *__restrict __attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_rwlock_destroy(pthread_rwlock_t *__rwlock) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_rwlock_timedrdlock(pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) __attribute__((__nothrow__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_rwlock_timedwrlock(pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) __attribute__((__nothrow__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_rwlock_unlock(pthread_rwlock_t *__rwlock) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_rwlockattr_init(pthread_rwlockattr_t *__attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_rwlockattr_destroy(pthread_rwlockattr_t *__attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_rwlockattr_getpshared(__const pthread_rwlockattr_t *__restrict __attr, int *__restrict __pshared) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *__attr, int __pshared) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_rwlockattr_getkind_np(__const pthread_rwlockattr_t *__restrict __attr, int *__restrict __pref) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *__attr, int __pref) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_cond_init(pthread_cond_t *__restrict __cond, __const pthread_condattr_t *__restrict __cond_attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_cond_destroy(pthread_cond_t *__cond) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_cond_signal(pthread_cond_t *__cond) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_cond_broadcast(pthread_cond_t *__cond) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_cond_wait(pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_cond_timedwait(pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime) __attribute__((__nonnull__(1, 2, 3))); nengel@9: extern int pthread_condattr_init(pthread_condattr_t *__attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_condattr_destroy(pthread_condattr_t *__attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_condattr_getpshared(__const pthread_condattr_t *__restrict __attr, int *__restrict __pshared) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_condattr_setpshared(pthread_condattr_t *__attr, int __pshared) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_condattr_getclock(__const pthread_condattr_t *__restrict __attr, __clockid_t *__restrict __clock_id) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_condattr_setclock(pthread_condattr_t *__attr, __clockid_t __clock_id) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_spin_init(pthread_spinlock_t *__lock, int __pshared) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_spin_destroy(pthread_spinlock_t *__lock) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_spin_lock(pthread_spinlock_t *__lock) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_spin_trylock(pthread_spinlock_t *__lock) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_spin_unlock(pthread_spinlock_t *__lock) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_barrier_init(pthread_barrier_t *__restrict __barrier, __const pthread_barrierattr_t *__restrict __attr, unsigned int __count) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_barrier_destroy(pthread_barrier_t *__barrier) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_barrier_wait(pthread_barrier_t *__barrier) __attribute__((__nothrow__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_barrierattr_init(pthread_barrierattr_t *__attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_barrierattr_destroy(pthread_barrierattr_t *__attr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_barrierattr_getpshared(__const pthread_barrierattr_t *__restrict __attr, int *__restrict __pshared) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int pthread_barrierattr_setpshared(pthread_barrierattr_t *__attr, int __pshared) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_key_create(pthread_key_t *__key, void (*__destr_function)(void *)) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int pthread_key_delete(pthread_key_t __key) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void *pthread_getspecific(pthread_key_t __key) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int pthread_setspecific(pthread_key_t __key, __const void *__pointer) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int pthread_getcpuclockid(pthread_t __thread_id, __clockid_t *__clock_id) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern int pthread_atfork(void (*__prepare)(void), void (*__parent)(void), void (*__child)(void)) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __inline __attribute__((__gnu_inline__)) int __attribute__((__nothrow__, __leaf__)) pthread_equal(pthread_t __thread1, pthread_t __thread2) nengel@9: { nengel@9: return __thread1 == __thread2; nengel@9: } nengel@9: extern int *__errno_location(void) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: void *av_malloc(unsigned int size) __attribute__((__malloc__)); nengel@9: void *av_realloc(void *ptr, unsigned int size); nengel@9: void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size); nengel@9: void av_fast_malloc(void *ptr, unsigned int *size, unsigned int min_size); nengel@9: void av_free(void *ptr); nengel@9: void *av_mallocz(unsigned int size) __attribute__((__malloc__)); nengel@9: char *av_strdup(const char *s) __attribute__((__malloc__)); nengel@9: void av_freep(void *ptr); nengel@9: static __attribute__((always_inline)) inline uint32_t pack16to32(int a, int b) nengel@9: { nengel@9: return (a & 0xFFFF) + (b << 16); nengel@9: } nengel@9: static __attribute__((always_inline)) inline uint16_t pack8to16(int a, int b) nengel@9: { nengel@9: return (a & 0xFF) + (b << 8); nengel@9: } nengel@9: typedef short DCTELEM; nengel@9: enum AVColorPrimaries nengel@9: { nengel@9: AVCOL_PRI_BT709 = 1, nengel@9: AVCOL_PRI_UNSPECIFIED = 2, nengel@9: AVCOL_PRI_BT470M = 4, nengel@9: AVCOL_PRI_BT470BG = 5, nengel@9: AVCOL_PRI_SMPTE170M = 6, nengel@9: AVCOL_PRI_SMPTE240M = 7, nengel@9: AVCOL_PRI_FILM = 8, nengel@9: AVCOL_PRI_NB nengel@9: }; nengel@9: enum AVColorTransferCharacteristic nengel@9: { nengel@9: AVCOL_TRC_BT709 = 1, nengel@9: AVCOL_TRC_UNSPECIFIED = 2, nengel@9: AVCOL_TRC_GAMMA22 = 4, nengel@9: AVCOL_TRC_GAMMA28 = 5, nengel@9: AVCOL_TRC_NB nengel@9: }; nengel@9: enum AVColorSpace nengel@9: { nengel@9: AVCOL_SPC_RGB = 0, nengel@9: AVCOL_SPC_BT709 = 1, nengel@9: AVCOL_SPC_UNSPECIFIED = 2, nengel@9: AVCOL_SPC_FCC = 4, nengel@9: AVCOL_SPC_BT470BG = 5, nengel@9: AVCOL_SPC_SMPTE170M = 6, nengel@9: AVCOL_SPC_SMPTE240M = 7, nengel@9: AVCOL_SPC_NB nengel@9: }; nengel@9: enum AVColorRange nengel@9: { nengel@9: AVCOL_RANGE_UNSPECIFIED = 0, nengel@9: AVCOL_RANGE_MPEG = 1, nengel@9: AVCOL_RANGE_JPEG = 2, nengel@9: AVCOL_RANGE_NB nengel@9: }; nengel@9: typedef enum MMCOOpcode nengel@9: { nengel@9: MMCO_END = 0, nengel@9: MMCO_SHORT2UNUSED, nengel@9: MMCO_LONG2UNUSED, nengel@9: MMCO_SHORT2LONG, nengel@9: MMCO_SET_MAX_LONG, nengel@9: MMCO_RESET, nengel@9: MMCO_LONG nengel@9: } MMCOOpcode; nengel@9: enum nengel@9: { nengel@9: NAL_SLICE = 1, nengel@9: NAL_DPA, nengel@9: NAL_DPB, nengel@9: NAL_DPC, nengel@9: NAL_IDR_SLICE, nengel@9: NAL_SEI, nengel@9: NAL_SPS, nengel@9: NAL_PPS, nengel@9: NAL_AUD, nengel@9: NAL_END_SEQUENCE, nengel@9: NAL_END_STREAM, nengel@9: NAL_FILLER_DATA, nengel@9: NAL_SPS_EXT, nengel@9: NAL_AUXILIARY_SLICE = 19 nengel@9: }; nengel@9: typedef enum nengel@9: { nengel@9: SEI_BUFFERING_PERIOD = 0, nengel@9: SEI_TYPE_PIC_TIMING = 1, nengel@9: SEI_TYPE_USER_DATA_UNREGISTERED = 5, nengel@9: SEI_TYPE_RECOVERY_POINT = 6 nengel@9: } SEI_Type; nengel@9: typedef enum nengel@9: { nengel@9: SEI_PIC_STRUCT_FRAME = 0, nengel@9: SEI_PIC_STRUCT_TOP_FIELD = 1, nengel@9: SEI_PIC_STRUCT_BOTTOM_FIELD = 2, nengel@9: SEI_PIC_STRUCT_TOP_BOTTOM = 3, nengel@9: SEI_PIC_STRUCT_BOTTOM_TOP = 4, nengel@9: SEI_PIC_STRUCT_TOP_BOTTOM_TOP = 5, nengel@9: SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM = 6, nengel@9: SEI_PIC_STRUCT_FRAME_DOUBLING = 7, nengel@9: SEI_PIC_STRUCT_FRAME_TRIPLING = 8 nengel@9: } SEI_PicStructType; nengel@9: typedef struct SPS nengel@9: { nengel@9: int profile_idc; nengel@9: int level_idc; nengel@9: int chroma_format_idc; nengel@9: int transform_bypass; nengel@9: int log2_max_frame_num; nengel@9: int poc_type; nengel@9: int log2_max_poc_lsb; nengel@9: int delta_pic_order_always_zero_flag; nengel@9: int offset_for_non_ref_pic; nengel@9: int offset_for_top_to_bottom_field; nengel@9: int poc_cycle_length; nengel@9: int ref_frame_count; nengel@9: int gaps_in_frame_num_allowed_flag; nengel@9: int mb_width; nengel@9: int mb_height; nengel@9: int frame_mbs_only_flag; nengel@9: int mb_aff; nengel@9: int direct_8x8_inference_flag; nengel@9: int crop; nengel@9: unsigned int crop_left; nengel@9: unsigned int crop_right; nengel@9: unsigned int crop_top; nengel@9: unsigned int crop_bottom; nengel@9: int vui_parameters_present_flag; nengel@9: int num, den; nengel@9: int video_signal_type_present_flag; nengel@9: int full_range; nengel@9: int colour_description_present_flag; nengel@9: enum AVColorPrimaries color_primaries; nengel@9: enum AVColorTransferCharacteristic color_trc; nengel@9: enum AVColorSpace colorspace; nengel@9: int timing_info_present_flag; nengel@9: uint32_t num_units_in_tick; nengel@9: uint32_t time_scale; nengel@9: int fixed_frame_rate_flag; nengel@9: short offset_for_ref_frame[256]; nengel@9: int bitstream_restriction_flag; nengel@9: int num_reorder_frames; nengel@9: int scaling_matrix_present; nengel@9: uint8_t scaling_matrix4[6][16]; nengel@9: uint8_t scaling_matrix8[2][64]; nengel@9: int nal_hrd_parameters_present_flag; nengel@9: int vcl_hrd_parameters_present_flag; nengel@9: int pic_struct_present_flag; nengel@9: int time_offset_length; nengel@9: int cpb_cnt; nengel@9: int initial_cpb_removal_delay_length; nengel@9: int cpb_removal_delay_length; nengel@9: int dpb_output_delay_length; nengel@9: int bit_depth_luma; nengel@9: int bit_depth_chroma; nengel@9: int residual_color_transform_flag; nengel@9: } SPS; nengel@9: typedef struct PPS nengel@9: { nengel@9: unsigned int sps_id; nengel@9: int cabac; nengel@9: int pic_order_present; nengel@9: int slice_group_count; nengel@9: int mb_slice_group_map_type; nengel@9: unsigned int ref_count[2]; nengel@9: int weighted_pred; nengel@9: int weighted_bipred_idc; nengel@9: int init_qp; nengel@9: int init_qs; nengel@9: int chroma_qp_index_offset[2]; nengel@9: int deblocking_filter_parameters_present; nengel@9: int constrained_intra_pred; nengel@9: int redundant_pic_cnt_present; nengel@9: int transform_8x8_mode; nengel@9: uint8_t scaling_matrix4[6][16]; nengel@9: uint8_t scaling_matrix8[2][64]; nengel@9: uint8_t chroma_qp_table[2][64]; nengel@9: int chroma_qp_diff; nengel@9: } PPS; nengel@9: typedef struct TopBorder nengel@9: { nengel@9: uint8_t unfiltered_y[16]; nengel@9: uint8_t unfiltered_cb[8]; nengel@9: uint8_t unfiltered_cr[8]; nengel@9: uint8_t top_borders_y[16 * 4]; nengel@9: uint8_t top_borders_cb[8 * 2]; nengel@9: uint8_t top_borders_cr[8 * 2]; nengel@9: } TopBorder; nengel@9: typedef struct LeftBorder nengel@9: { nengel@9: uint8_t unfiltered_y[17]; nengel@9: uint8_t unfiltered_cb[9]; nengel@9: uint8_t unfiltered_cr[9]; nengel@9: } LeftBorder; nengel@9: typedef struct H264Mb nengel@9: { nengel@9: int16_t mb_x, mb_y; nengel@9: int32_t mb_type; nengel@9: uint16_t cbp; nengel@9: int8_t qscale_mb_xy; nengel@9: int8_t qscale_left_mb_xy; nengel@9: int8_t qscale_top_mb_xy; nengel@9: uint16_t __attribute__((aligned(8))) sub_mb_type[4]; nengel@9: uint8_t __attribute__((aligned(8))) non_zero_count[24]; nengel@9: int16_t __attribute__((aligned(16))) mb[16 * 24]; nengel@9: union nengel@9: { nengel@9: struct nengel@9: { nengel@9: int8_t __attribute__((aligned(8))) ref_index[2][4]; nengel@9: int16_t __attribute__((aligned(16))) mvd[2][16][2]; nengel@9: }; nengel@9: struct nengel@9: { nengel@9: int8_t __attribute__((aligned(8))) intra4x4_pred_mode[16]; nengel@9: int8_t chroma_pred_mode; nengel@9: int8_t intra16x16_pred_mode; nengel@9: }; nengel@9: }; nengel@9: uint8_t __attribute__((aligned(8))) top_border[16 + 2 * 8]; nengel@9: uint8_t __attribute__((aligned(8))) top_border_next[8]; nengel@9: uint8_t __attribute__((aligned(8))) left_border[17 + 2 * 9]; nengel@9: int8_t intra4x4_pred_mode_left[4]; nengel@9: } H264Mb; nengel@9: typedef struct RawFrame nengel@9: { nengel@9: uint8_t *data; nengel@9: int size; nengel@9: unsigned int data_size; nengel@9: int64_t pos; nengel@9: int state; nengel@9: } RawFrame; nengel@9: typedef struct PictureInfo nengel@9: { nengel@9: int ref_poc[2][16]; nengel@9: int ref_count[2]; nengel@9: int poc; nengel@9: int frame_num; nengel@9: int pic_id; nengel@9: int long_ref; nengel@9: int cpn; nengel@9: int slice_type_nos; nengel@9: int reference; nengel@9: } PictureInfo; nengel@9: typedef struct DecodedPicture nengel@9: { nengel@9: int16_t (*motion_val[2])[2]; nengel@9: int16_t (*motion_val_base[2])[2]; nengel@9: int8_t *ref_index[2]; nengel@9: uint32_t *mb_type; nengel@9: uint32_t *mb_type_base; nengel@9: int8_t *intra4x4_pred_mode; nengel@9: int8_t *non_zero_count; nengel@9: uint8_t *data[3]; nengel@9: int linesize[3]; nengel@9: uint8_t *base[3]; nengel@9: int cpn; nengel@9: int poc; nengel@9: int reference; nengel@9: int key_frame; nengel@9: int mmco_reset; nengel@9: } DecodedPicture; nengel@9: extern void __assert_fail(__const char *__assertion, __const char *__file, unsigned int __line, __const char *__function) __attribute__((__nothrow__, __leaf__)) __attribute__((__noreturn__)); nengel@9: extern void __assert_perror_fail(int __errnum, __const char *__file, unsigned int __line, __const char *__function) __attribute__((__nothrow__, __leaf__)) __attribute__((__noreturn__)); nengel@9: extern void __assert(const char *__assertion, const char *__file, int __line) __attribute__((__nothrow__, __leaf__)) __attribute__((__noreturn__)); nengel@9: typedef int64_t x86_reg; nengel@9: typedef struct CABACContext nengel@9: { nengel@9: int low; nengel@9: int range; nengel@9: int outstanding_count; nengel@9: const uint8_t *bytestream_start; nengel@9: const uint8_t *bytestream; nengel@9: const uint8_t *bytestream_end; nengel@9: uint8_t cabac_state[460]; nengel@9: } CABACContext; nengel@9: extern uint8_t ff_h264_mlps_state[4 * 64]; nengel@9: extern uint8_t ff_h264_lps_range[4 * 2 * 64]; nengel@9: extern uint8_t ff_h264_mps_state[2 * 64]; nengel@9: extern uint8_t ff_h264_lps_state[2 * 64]; nengel@9: extern const uint8_t ff_h264_norm_shift[512]; nengel@9: void ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size); nengel@9: void ff_init_cabac_states(void); nengel@9: static void refill(CABACContext *c) nengel@9: { nengel@9: c->low += (c->bytestream[0] << 9) + (c->bytestream[1] << 1); nengel@9: c->low -= ((1 << 16) - 1); nengel@9: c->bytestream += 16 / 8; nengel@9: } nengel@9: static void refill2(CABACContext *c) nengel@9: { nengel@9: int i, x; nengel@9: x = c->low ^ (c->low - 1); nengel@9: i = 7 - ff_h264_norm_shift[x >> (16 - 1)]; nengel@9: x = - ((1 << 16) - 1); nengel@9: x += (c->bytestream[0] << 9) + (c->bytestream[1] << 1); nengel@9: c->low += x << i; nengel@9: c->bytestream += 16 / 8; nengel@9: } nengel@9: static inline void renorm_cabac_decoder(CABACContext *c) nengel@9: { nengel@9: while (c->range < 0x100) nengel@9: { nengel@9: c->range += c->range; nengel@9: c->low += c->low; nengel@9: if (!(c->low & ((1 << 16) - 1))) nengel@9: refill(c); nengel@9: } nengel@9: } nengel@9: static inline void renorm_cabac_decoder_once(CABACContext *c) nengel@9: { nengel@9: int shift = (uint32_t) (c->range - 0x100) >> 31; nengel@9: c->range <<= shift; nengel@9: c->low <<= shift; nengel@9: if (!(c->low & ((1 << 16) - 1))) nengel@9: refill(c); nengel@9: } nengel@9: static __attribute__((always_inline)) inline int get_cabac_inline(CABACContext *c, uint8_t *const state) nengel@9: { nengel@9: int s = *state; nengel@9: int RangeLPS = ff_h264_lps_range[2 * (c->range & 0xC0) + s]; nengel@9: int bit, lps_mask __attribute__((unused)); nengel@9: c->range -= RangeLPS; nengel@9: lps_mask = ((c->range << (16 + 1)) - c->low) >> 31; nengel@9: c->low -= (c->range << (16 + 1)) & lps_mask; nengel@9: c->range += (RangeLPS - c->range) & lps_mask; nengel@9: s ^= lps_mask; nengel@9: *state = (ff_h264_mlps_state + 128)[s]; nengel@9: bit = s & 1; nengel@9: lps_mask = ff_h264_norm_shift[c->range]; nengel@9: c->range <<= lps_mask; nengel@9: c->low <<= lps_mask; nengel@9: if (!(c->low & ((1 << 16) - 1))) nengel@9: refill2(c); nengel@9: return bit; nengel@9: } nengel@9: static int __attribute__((noinline)) __attribute__((unused)) get_cabac_noinline(CABACContext *c, uint8_t *const state) nengel@9: { nengel@9: return get_cabac_inline(c, state); nengel@9: } nengel@9: static int __attribute__((unused)) get_cabac(CABACContext *c, uint8_t *const state) nengel@9: { nengel@9: return get_cabac_inline(c, state); nengel@9: } nengel@9: static int __attribute__((unused)) get_cabac_bypass(CABACContext *c) nengel@9: { nengel@9: int range; nengel@9: c->low += c->low; nengel@9: if (!(c->low & ((1 << 16) - 1))) nengel@9: refill(c); nengel@9: range = c->range << (16 + 1); nengel@9: if (c->low < range) nengel@9: { nengel@9: return 0; nengel@9: } nengel@9: else nengel@9: { nengel@9: c->low -= range; nengel@9: return 1; nengel@9: } nengel@9: } nengel@9: static __attribute__((always_inline)) inline int get_cabac_bypass_sign(CABACContext *c, int val) nengel@9: { nengel@9: int range, mask; nengel@9: c->low += c->low; nengel@9: if (!(c->low & ((1 << 16) - 1))) nengel@9: refill(c); nengel@9: range = c->range << (16 + 1); nengel@9: c->low -= range; nengel@9: mask = c->low >> 31; nengel@9: range &= mask; nengel@9: c->low += range; nengel@9: return (val ^ mask) - mask; nengel@9: } nengel@9: static int __attribute__((unused)) get_cabac_terminate(CABACContext *c) nengel@9: { nengel@9: c->range -= 2; nengel@9: if (c->low < c->range << (16 + 1)) nengel@9: { nengel@9: renorm_cabac_decoder_once(c); nengel@9: return 0; nengel@9: } nengel@9: else nengel@9: { nengel@9: return c->bytestream - c->bytestream_start; nengel@9: } nengel@9: } nengel@9: static __attribute__((always_inline)) inline __attribute__((const)) uint16_t bswap_16(uint16_t x) nengel@9: { nengel@9: __asm__ ("rorw $8, %0": "+r" (x): ); nengel@9: return x; nengel@9: } nengel@9: static __attribute__((always_inline)) inline __attribute__((const)) uint32_t bswap_32(uint32_t x) nengel@9: { nengel@9: __asm__ ("bswap %0": "+r" (x): ); nengel@9: return x; nengel@9: } nengel@9: static inline uint64_t __attribute__((const)) bswap_64(uint64_t x) nengel@9: { nengel@9: __asm__ ("bswap %0": "=r" (x): "0" (x)); nengel@9: return x; nengel@9: } nengel@9: enum nengel@9: { nengel@9: _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), nengel@9: _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), nengel@9: _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), nengel@9: _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), nengel@9: _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), nengel@9: _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), nengel@9: _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), nengel@9: _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), nengel@9: _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), nengel@9: _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), nengel@9: _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), nengel@9: _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) nengel@9: }; nengel@9: extern __const unsigned short int **__ctype_b_loc(void) __attribute__((__nothrow__, __leaf__)) __attribute__((__const)); nengel@9: extern __const __int32_t **__ctype_tolower_loc(void) __attribute__((__nothrow__, __leaf__)) __attribute__((__const)); nengel@9: extern __const __int32_t **__ctype_toupper_loc(void) __attribute__((__nothrow__, __leaf__)) __attribute__((__const)); nengel@9: extern int isalnum(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isalpha(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int iscntrl(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isdigit(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int islower(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isgraph(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isprint(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int ispunct(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isspace(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isupper(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isxdigit(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int tolower(int __c) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int toupper(int __c) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isblank(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isascii(int __c) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int toascii(int __c) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int _toupper(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int _tolower(int) __attribute__((__nothrow__, __leaf__)); nengel@9: extern __inline __attribute__((__gnu_inline__)) int __attribute__((__nothrow__, __leaf__)) tolower(int __c) nengel@9: { nengel@9: return __c >= - 128 && __c < 256 ? (*__ctype_tolower_loc())[__c] : __c; nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) int __attribute__((__nothrow__, __leaf__)) toupper(int __c) nengel@9: { nengel@9: return __c >= - 128 && __c < 256 ? (*__ctype_toupper_loc())[__c] : __c; nengel@9: } nengel@9: extern int isalnum_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isalpha_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int iscntrl_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isdigit_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int islower_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isgraph_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isprint_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int ispunct_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isspace_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isupper_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isxdigit_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int isblank_l(int, __locale_t) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __tolower_l(int __c, __locale_t __l) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int tolower_l(int __c, __locale_t __l) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __toupper_l(int __c, __locale_t __l) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int toupper_l(int __c, __locale_t __l) __attribute__((__nothrow__, __leaf__)); nengel@9: typedef int __gwchar_t; nengel@9: typedef struct nengel@9: { nengel@9: long int quot; nengel@9: long int rem; nengel@9: } imaxdiv_t; nengel@9: extern intmax_t imaxabs(intmax_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denom) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern intmax_t strtoimax(__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__((__nothrow__, __leaf__)); nengel@9: extern uintmax_t strtoumax(__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__((__nothrow__, __leaf__)); nengel@9: extern intmax_t wcstoimax(__const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base) __attribute__((__nothrow__, __leaf__)); nengel@9: extern uintmax_t wcstoumax(__const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int __strtol_internal(__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern __inline __attribute__((__gnu_inline__)) intmax_t __attribute__((__nothrow__, __leaf__)) strtoimax(__const char *__restrict nptr, char **__restrict endptr, int base) nengel@9: { nengel@9: return __strtol_internal(nptr, endptr, base, 0); nengel@9: } nengel@9: extern unsigned long int __strtoul_internal(__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern __inline __attribute__((__gnu_inline__)) uintmax_t __attribute__((__nothrow__, __leaf__)) strtoumax(__const char *__restrict nptr, char **__restrict endptr, int base) nengel@9: { nengel@9: return __strtoul_internal(nptr, endptr, base, 0); nengel@9: } nengel@9: extern long int __wcstol_internal(__const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base, int __group) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern __inline __attribute__((__gnu_inline__)) intmax_t __attribute__((__nothrow__, __leaf__)) wcstoimax(__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) nengel@9: { nengel@9: return __wcstol_internal(nptr, endptr, base, 0); nengel@9: } nengel@9: extern unsigned long int __wcstoul_internal(__const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base, int __group) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern __inline __attribute__((__gnu_inline__)) uintmax_t __attribute__((__nothrow__, __leaf__)) wcstoumax(__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) nengel@9: { nengel@9: return __wcstoul_internal(nptr, endptr, base, 0); nengel@9: } nengel@9: typedef float float_t; nengel@9: typedef double double_t; nengel@9: extern double acos(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __acos(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double asin(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __asin(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double atan(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __atan(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double atan2(double __y, double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __atan2(double __y, double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double cos(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __cos(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double sin(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __sin(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double tan(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __tan(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double cosh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __cosh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double sinh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __sinh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double tanh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __tanh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double acosh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __acosh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double asinh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __asinh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double atanh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __atanh(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double exp(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __exp(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double frexp(double __x, int *__exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __frexp(double __x, int *__exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double ldexp(double __x, int __exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __ldexp(double __x, int __exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double log(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __log(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double log10(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __log10(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double modf(double __x, double *__iptr) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __modf(double __x, double *__iptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern double expm1(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __expm1(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double log1p(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __log1p(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double logb(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __logb(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double exp2(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __exp2(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double log2(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __log2(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double pow(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __pow(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double sqrt(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __sqrt(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double hypot(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __hypot(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double cbrt(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __cbrt(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double ceil(double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double __ceil(double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double fabs(double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double __fabs(double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double floor(double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double __floor(double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double fmod(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __fmod(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __isinf(double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int __finite(double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int isinf(double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int finite(double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double drem(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __drem(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double significand(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __significand(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double copysign(double __x, double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double __copysign(double __x, double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double nan(__const char *__tagb) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double __nan(__const char *__tagb) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int __isnan(double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int isnan(double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double j0(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __j0(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double j1(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __j1(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double jn(int, double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __jn(int, double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double y0(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __y0(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double y1(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __y1(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double yn(int, double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __yn(int, double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double erf(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __erf(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double erfc(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __erfc(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double lgamma(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __lgamma(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double tgamma(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __tgamma(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double gamma(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __gamma(double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double lgamma_r(double, int *__signgamp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __lgamma_r(double, int *__signgamp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double rint(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __rint(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double nextafter(double __x, double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double __nextafter(double __x, double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double nexttoward(double __x, long double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double __nexttoward(double __x, long double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double remainder(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __remainder(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double scalbn(double __x, int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __scalbn(double __x, int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int ilogb(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __ilogb(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double scalbln(double __x, long int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __scalbln(double __x, long int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double nearbyint(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __nearbyint(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double round(double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double __round(double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double trunc(double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double __trunc(double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double remquo(double __x, double __y, int *__quo) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __remquo(double __x, double __y, int *__quo) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int lrint(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int __lrint(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int llrint(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int __llrint(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int lround(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int __lround(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int llround(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int __llround(double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double fdim(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __fdim(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double fmax(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __fmax(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double fmin(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __fmin(double __x, double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __fpclassify(double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int __signbit(double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern double fma(double __x, double __y, double __z) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __fma(double __x, double __y, double __z) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double scalb(double __x, double __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double __scalb(double __x, double __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float acosf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __acosf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float asinf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __asinf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float atanf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __atanf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float atan2f(float __y, float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __atan2f(float __y, float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float cosf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __cosf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float sinf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __sinf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float tanf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __tanf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float coshf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __coshf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float sinhf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __sinhf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float tanhf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __tanhf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float acoshf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __acoshf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float asinhf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __asinhf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float atanhf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __atanhf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float expf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __expf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float frexpf(float __x, int *__exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __frexpf(float __x, int *__exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float ldexpf(float __x, int __exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __ldexpf(float __x, int __exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float logf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __logf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float log10f(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __log10f(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float modff(float __x, float *__iptr) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __modff(float __x, float *__iptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern float expm1f(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __expm1f(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float log1pf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __log1pf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float logbf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __logbf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float exp2f(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __exp2f(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float log2f(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __log2f(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float powf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __powf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float sqrtf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __sqrtf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float hypotf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __hypotf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float cbrtf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __cbrtf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float ceilf(float __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float __ceilf(float __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float fabsf(float __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float __fabsf(float __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float floorf(float __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float __floorf(float __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float fmodf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __fmodf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __isinff(float __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int __finitef(float __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int isinff(float __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int finitef(float __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float dremf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __dremf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float significandf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __significandf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float copysignf(float __x, float __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float __copysignf(float __x, float __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float nanf(__const char *__tagb) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float __nanf(__const char *__tagb) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int __isnanf(float __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int isnanf(float __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float j0f(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __j0f(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float j1f(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __j1f(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float jnf(int, float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __jnf(int, float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float y0f(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __y0f(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float y1f(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __y1f(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float ynf(int, float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __ynf(int, float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float erff(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __erff(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float erfcf(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __erfcf(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float lgammaf(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __lgammaf(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float tgammaf(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __tgammaf(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float gammaf(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __gammaf(float) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float lgammaf_r(float, int *__signgamp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __lgammaf_r(float, int *__signgamp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float rintf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __rintf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float nextafterf(float __x, float __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float __nextafterf(float __x, float __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float nexttowardf(float __x, long double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float __nexttowardf(float __x, long double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float remainderf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __remainderf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float scalbnf(float __x, int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __scalbnf(float __x, int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int ilogbf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __ilogbf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float scalblnf(float __x, long int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __scalblnf(float __x, long int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float nearbyintf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __nearbyintf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float roundf(float __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float __roundf(float __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float truncf(float __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float __truncf(float __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float remquof(float __x, float __y, int *__quo) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __remquof(float __x, float __y, int *__quo) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int lrintf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int __lrintf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int llrintf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int __llrintf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int lroundf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int __lroundf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int llroundf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int __llroundf(float __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float fdimf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __fdimf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float fmaxf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __fmaxf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float fminf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __fminf(float __x, float __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __fpclassifyf(float __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int __signbitf(float __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern float fmaf(float __x, float __y, float __z) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __fmaf(float __x, float __y, float __z) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float scalbf(float __x, float __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern float __scalbf(float __x, float __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double acosl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __acosl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double asinl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __asinl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double atanl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __atanl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double atan2l(long double __y, long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __atan2l(long double __y, long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double cosl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __cosl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double sinl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __sinl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double tanl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __tanl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double coshl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __coshl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double sinhl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __sinhl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double tanhl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __tanhl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double acoshl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __acoshl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double asinhl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __asinhl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double atanhl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __atanhl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double expl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __expl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double frexpl(long double __x, int *__exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __frexpl(long double __x, int *__exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double ldexpl(long double __x, int __exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __ldexpl(long double __x, int __exponent) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double logl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __logl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double log10l(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __log10l(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double modfl(long double __x, long double *__iptr) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __modfl(long double __x, long double *__iptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern long double expm1l(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __expm1l(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double log1pl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __log1pl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double logbl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __logbl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double exp2l(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __exp2l(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double log2l(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __log2l(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double powl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __powl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double sqrtl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __sqrtl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double hypotl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __hypotl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double cbrtl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __cbrtl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double ceill(long double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double __ceill(long double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double fabsl(long double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double __fabsl(long double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double floorl(long double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double __floorl(long double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double fmodl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __fmodl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __isinfl(long double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int __finitel(long double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int isinfl(long double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int finitel(long double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double dreml(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __dreml(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double significandl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __significandl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double copysignl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double __copysignl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double nanl(__const char *__tagb) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double __nanl(__const char *__tagb) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int __isnanl(long double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int isnanl(long double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double j0l(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __j0l(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double j1l(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __j1l(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double jnl(int, long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __jnl(int, long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double y0l(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __y0l(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double y1l(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __y1l(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double ynl(int, long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __ynl(int, long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double erfl(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __erfl(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double erfcl(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __erfcl(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double lgammal(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __lgammal(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double tgammal(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __tgammal(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double gammal(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __gammal(long double) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double lgammal_r(long double, int *__signgamp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __lgammal_r(long double, int *__signgamp) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double rintl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __rintl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double nextafterl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double __nextafterl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double nexttowardl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double __nexttowardl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double remainderl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __remainderl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double scalbnl(long double __x, int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __scalbnl(long double __x, int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int ilogbl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __ilogbl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double scalblnl(long double __x, long int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __scalblnl(long double __x, long int __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double nearbyintl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __nearbyintl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double roundl(long double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double __roundl(long double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double truncl(long double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double __truncl(long double __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double remquol(long double __x, long double __y, int *__quo) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __remquol(long double __x, long double __y, int *__quo) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int lrintl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int __lrintl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int llrintl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int __llrintl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int lroundl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int __lroundl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int llroundl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long long int __llroundl(long double __x) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double fdiml(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __fdiml(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double fmaxl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __fmaxl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double fminl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __fminl(long double __x, long double __y) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int __fpclassifyl(long double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int __signbitl(long double __value) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern long double fmal(long double __x, long double __y, long double __z) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __fmal(long double __x, long double __y, long double __z) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double scalbl(long double __x, long double __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long double __scalbl(long double __x, long double __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int signgam; nengel@9: enum nengel@9: { nengel@9: FP_NAN, nengel@9: FP_INFINITE, nengel@9: FP_ZERO, nengel@9: FP_SUBNORMAL, nengel@9: FP_NORMAL nengel@9: }; nengel@9: typedef enum nengel@9: { nengel@9: _IEEE_ = - 1, nengel@9: _SVID_, nengel@9: _XOPEN_, nengel@9: _POSIX_, nengel@9: _ISOC_ nengel@9: } _LIB_VERSION_TYPE; nengel@9: extern _LIB_VERSION_TYPE _LIB_VERSION; nengel@9: struct exception nengel@9: { nengel@9: int type; nengel@9: char *name; nengel@9: double arg1; nengel@9: double arg2; nengel@9: double retval; nengel@9: }; nengel@9: extern int matherr(struct exception *__exc); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) __signbitf(float __x) nengel@9: { nengel@9: int __m; nengel@9: __asm ("pmovmskb %1, %0": "=r" (__m): "x" (__x)); nengel@9: return __m & 0x8; nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) __signbit(double __x) nengel@9: { nengel@9: int __m; nengel@9: __asm ("pmovmskb %1, %0": "=r" (__m): "x" (__x)); nengel@9: return __m & 0x80; nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) __signbitl(long double __x) nengel@9: { nengel@9: __extension__ nengel@9: union nengel@9: { nengel@9: long double __l; nengel@9: int __i[3]; nengel@9: } __u = {__l:__x}; nengel@9: return (__u.__i[2] & 0x8000) != 0; nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) long int __attribute__((__nothrow__, __leaf__)) lrintf(float __x) nengel@9: { nengel@9: long int __res; nengel@9: __asm ("cvtss2si %1, %0": "=r" (__res): "xm" (__x)); nengel@9: return __res; nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) long int __attribute__((__nothrow__, __leaf__)) lrint(double __x) nengel@9: { nengel@9: long int __res; nengel@9: __asm ("cvtsd2si %1, %0": "=r" (__res): "xm" (__x)); nengel@9: return __res; nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) long long int __attribute__((__nothrow__, __leaf__)) llrintf(float __x) nengel@9: { nengel@9: long long int __res; nengel@9: __asm ("cvtss2si %1, %0": "=r" (__res): "xm" (__x)); nengel@9: return __res; nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) long long int __attribute__((__nothrow__, __leaf__)) llrint(double __x) nengel@9: { nengel@9: long long int __res; nengel@9: __asm ("cvtsd2si %1, %0": "=r" (__res): "xm" (__x)); nengel@9: return __res; nengel@9: } nengel@9: union wait nengel@9: { nengel@9: int w_status; nengel@9: struct nengel@9: { nengel@9: unsigned int __w_termsig : 7; nengel@9: unsigned int __w_coredump : 1; nengel@9: unsigned int __w_retcode : 8; nengel@9: unsigned int : 16; nengel@9: } __wait_terminated; nengel@9: struct nengel@9: { nengel@9: unsigned int __w_stopval : 8; nengel@9: unsigned int __w_stopsig : 8; nengel@9: unsigned int : 16; nengel@9: } __wait_stopped; nengel@9: }; nengel@9: typedef union nengel@9: { nengel@9: union wait *__uptr; nengel@9: int *__iptr; nengel@9: } __WAIT_STATUS __attribute__((__transparent_union__)); nengel@9: typedef struct nengel@9: { nengel@9: int quot; nengel@9: int rem; nengel@9: } div_t; nengel@9: typedef struct nengel@9: { nengel@9: long int quot; nengel@9: long int rem; nengel@9: } ldiv_t; nengel@9: __extension__ nengel@9: typedef struct nengel@9: { nengel@9: long long int quot; nengel@9: long long int rem; nengel@9: } lldiv_t; nengel@9: extern size_t __ctype_get_mb_cur_max(void) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern double atof(__const char *__nptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int atoi(__const char *__nptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern long int atol(__const char *__nptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: __extension__ nengel@9: extern long long int atoll(__const char *__nptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern double strtod(__const char *__restrict __nptr, char **__restrict __endptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern float strtof(__const char *__restrict __nptr, char **__restrict __endptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern long double strtold(__const char *__restrict __nptr, char **__restrict __endptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern long int strtol(__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern unsigned long int strtoul(__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: __extension__ nengel@9: extern long long int strtoq(__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: __extension__ nengel@9: extern unsigned long long int strtouq(__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: __extension__ nengel@9: extern long long int strtoll(__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: __extension__ nengel@9: extern unsigned long long int strtoull(__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern __inline __attribute__((__gnu_inline__)) double __attribute__((__nothrow__, __leaf__)) atof(__const char *__nptr) nengel@9: { nengel@9: return strtod(__nptr, (char **) ((void *) 0)); nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) int __attribute__((__nothrow__, __leaf__)) atoi(__const char *__nptr) nengel@9: { nengel@9: return (int) strtol(__nptr, (char **) ((void *) 0), 10); nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) long int __attribute__((__nothrow__, __leaf__)) atol(__const char *__nptr) nengel@9: { nengel@9: return strtol(__nptr, (char **) ((void *) 0), 10); nengel@9: } nengel@9: __extension__ nengel@9: extern __inline __attribute__((__gnu_inline__)) long long int __attribute__((__nothrow__, __leaf__)) atoll(__const char *__nptr) nengel@9: { nengel@9: return strtoll(__nptr, (char **) ((void *) 0), 10); nengel@9: } nengel@9: extern char *l64a(long int __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern long int a64l(__const char *__s) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: typedef __u_char u_char; nengel@9: typedef __u_short u_short; nengel@9: typedef __u_int u_int; nengel@9: typedef __u_long u_long; nengel@9: typedef __quad_t quad_t; nengel@9: typedef __u_quad_t u_quad_t; nengel@9: typedef __fsid_t fsid_t; nengel@9: typedef __loff_t loff_t; nengel@9: typedef __ino_t ino_t; nengel@9: typedef __dev_t dev_t; nengel@9: typedef __mode_t mode_t; nengel@9: typedef __nlink_t nlink_t; nengel@9: typedef __id_t id_t; nengel@9: typedef __daddr_t daddr_t; nengel@9: typedef __caddr_t caddr_t; nengel@9: typedef __key_t key_t; nengel@9: typedef unsigned long int ulong; nengel@9: typedef unsigned short int ushort; nengel@9: typedef unsigned int uint; nengel@9: typedef unsigned int u_int8_t __attribute__((__mode__(__QI__))); nengel@9: typedef unsigned int u_int16_t __attribute__((__mode__(__HI__))); nengel@9: typedef unsigned int u_int32_t __attribute__((__mode__(__SI__))); nengel@9: typedef unsigned int u_int64_t __attribute__((__mode__(__DI__))); nengel@9: typedef int register_t __attribute__((__mode__(__word__))); nengel@9: typedef int __sig_atomic_t; nengel@9: typedef struct nengel@9: { nengel@9: unsigned long int __val[(1024 / (8 * sizeof(unsigned long int)))]; nengel@9: } __sigset_t; nengel@9: typedef __sigset_t sigset_t; nengel@9: struct timeval nengel@9: { nengel@9: __time_t tv_sec; nengel@9: __suseconds_t tv_usec; nengel@9: }; nengel@9: typedef __suseconds_t suseconds_t; nengel@9: typedef long int __fd_mask; nengel@9: typedef struct nengel@9: { nengel@9: __fd_mask __fds_bits[1024 / (8 * (int) sizeof(__fd_mask))]; nengel@9: } fd_set; nengel@9: typedef __fd_mask fd_mask; nengel@9: extern int select(int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); nengel@9: extern int pselect(int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); nengel@9: extern unsigned long int __fdelt_chk(unsigned long int __d); nengel@9: extern unsigned long int __fdelt_warn(unsigned long int __d) __attribute__((__warning__("bit outside of fd_set selected"))); nengel@9: __extension__ nengel@9: extern unsigned int gnu_dev_major(unsigned long long int __dev) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: __extension__ nengel@9: extern unsigned int gnu_dev_minor(unsigned long long int __dev) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: __extension__ nengel@9: extern unsigned long long int gnu_dev_makedev(unsigned int __major, unsigned int __minor) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: __extension__ nengel@9: extern __inline __attribute__((__gnu_inline__)) __attribute__((__const__)) unsigned int __attribute__((__nothrow__, __leaf__)) gnu_dev_major(unsigned long long int __dev) nengel@9: { nengel@9: return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); nengel@9: } nengel@9: __extension__ nengel@9: extern __inline __attribute__((__gnu_inline__)) __attribute__((__const__)) unsigned int __attribute__((__nothrow__, __leaf__)) gnu_dev_minor(unsigned long long int __dev) nengel@9: { nengel@9: return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); nengel@9: } nengel@9: __extension__ nengel@9: extern __inline __attribute__((__gnu_inline__)) __attribute__((__const__)) unsigned long long int __attribute__((__nothrow__, __leaf__)) gnu_dev_makedev(unsigned int __major, unsigned int __minor) nengel@9: { nengel@9: return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); nengel@9: } nengel@9: typedef __blksize_t blksize_t; nengel@9: typedef __blkcnt_t blkcnt_t; nengel@9: typedef __fsblkcnt_t fsblkcnt_t; nengel@9: typedef __fsfilcnt_t fsfilcnt_t; nengel@9: extern long int random(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void srandom(unsigned int __seed) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *initstate(unsigned int __seed, char *__statebuf, size_t __statelen) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern char *setstate(char *__statebuf) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: struct random_data nengel@9: { nengel@9: int32_t *fptr; nengel@9: int32_t *rptr; nengel@9: int32_t *state; nengel@9: int rand_type; nengel@9: int rand_deg; nengel@9: int rand_sep; nengel@9: int32_t *end_ptr; nengel@9: }; nengel@9: extern int random_r(struct random_data *__restrict __buf, int32_t *__restrict __result) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int srandom_r(unsigned int __seed, struct random_data *__buf) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern int initstate_r(unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2, 4))); nengel@9: extern int setstate_r(char *__restrict __statebuf, struct random_data *__restrict __buf) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int rand(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void srand(unsigned int __seed) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int rand_r(unsigned int *__seed) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double drand48(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern double erand48(unsigned short int __xsubi[3]) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern long int lrand48(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int nrand48(unsigned short int __xsubi[3]) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern long int mrand48(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern long int jrand48(unsigned short int __xsubi[3]) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern void srand48(long int __seedval) __attribute__((__nothrow__, __leaf__)); nengel@9: extern unsigned short int *seed48(unsigned short int __seed16v[3]) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern void lcong48(unsigned short int __param[7]) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: struct drand48_data nengel@9: { nengel@9: unsigned short int __x[3]; nengel@9: unsigned short int __old_x[3]; nengel@9: unsigned short int __c; nengel@9: unsigned short int __init; nengel@9: unsigned long long int __a; nengel@9: }; nengel@9: extern int drand48_r(struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int erand48_r(unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int lrand48_r(struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int nrand48_r(unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int mrand48_r(struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int jrand48_r(unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int srand48_r(long int __seedval, struct drand48_data *__buffer) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern int seed48_r(unsigned short int __seed16v[3], struct drand48_data *__buffer) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int lcong48_r(unsigned short int __param[7], struct drand48_data *__buffer) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern void *malloc(size_t __size) __attribute__((__nothrow__, __leaf__)) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)); nengel@9: extern void *calloc(size_t __nmemb, size_t __size) __attribute__((__nothrow__, __leaf__)) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)); nengel@9: extern void *realloc(void *__ptr, size_t __size) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern void free(void *__ptr) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void cfree(void *__ptr) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void *alloca(size_t __size) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void *valloc(size_t __size) __attribute__((__nothrow__, __leaf__)) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)); nengel@9: extern int posix_memalign(void **__memptr, size_t __alignment, size_t __size) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern void abort(void) __attribute__((__nothrow__, __leaf__)) __attribute__((__noreturn__)); nengel@9: extern int atexit(void (*__func)(void)) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int on_exit(void (*__func)(int __status, void *__arg), void *__arg) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern void exit(int __status) __attribute__((__nothrow__, __leaf__)) __attribute__((__noreturn__)); nengel@9: extern void _Exit(int __status) __attribute__((__nothrow__, __leaf__)) __attribute__((__noreturn__)); nengel@9: extern char *getenv(__const char *__name) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern char *__secure_getenv(__const char *__name) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int putenv(char *__string) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int setenv(__const char *__name, __const char *__value, int __replace) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern int unsetenv(__const char *__name) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int clearenv(void) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *mktemp(char *__template) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int mkstemp(char *__template) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int mkstemps(char *__template, int __suffixlen) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern char *mkdtemp(char *__template) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int system(__const char *__command) __attribute__((__warn_unused_result__)); nengel@9: extern char *realpath(__const char *__restrict __name, char *__restrict __resolved) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: typedef int (*__compar_fn_t)(__const void *, __const void *); nengel@9: extern void *bsearch(__const void *__key, __const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__((__nonnull__(1, 2, 5))) __attribute__((__warn_unused_result__)); nengel@9: extern void qsort(void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__((__nonnull__(1, 4))); nengel@9: extern int abs(int __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)) __attribute__((__warn_unused_result__)); nengel@9: extern long int labs(long int __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)) __attribute__((__warn_unused_result__)); nengel@9: __extension__ nengel@9: extern long long int llabs(long long int __x) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)) __attribute__((__warn_unused_result__)); nengel@9: extern div_t div(int __numer, int __denom) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)) __attribute__((__warn_unused_result__)); nengel@9: extern ldiv_t ldiv(long int __numer, long int __denom) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)) __attribute__((__warn_unused_result__)); nengel@9: __extension__ nengel@9: extern lldiv_t lldiv(long long int __numer, long long int __denom) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)) __attribute__((__warn_unused_result__)); nengel@9: extern char *ecvt(double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(3, 4))) __attribute__((__warn_unused_result__)); nengel@9: extern char *fcvt(double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(3, 4))) __attribute__((__warn_unused_result__)); nengel@9: extern char *gcvt(double __value, int __ndigit, char *__buf) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(3))) __attribute__((__warn_unused_result__)); nengel@9: extern char *qecvt(long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(3, 4))) __attribute__((__warn_unused_result__)); nengel@9: extern char *qfcvt(long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(3, 4))) __attribute__((__warn_unused_result__)); nengel@9: extern char *qgcvt(long double __value, int __ndigit, char *__buf) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(3))) __attribute__((__warn_unused_result__)); nengel@9: extern int ecvt_r(double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(3, 4, 5))); nengel@9: extern int fcvt_r(double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(3, 4, 5))); nengel@9: extern int qecvt_r(long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(3, 4, 5))); nengel@9: extern int qfcvt_r(long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(3, 4, 5))); nengel@9: extern int mblen(__const char *__s, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int mbtowc(wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int wctomb(char *__s, wchar_t __wchar) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern size_t mbstowcs(wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern size_t wcstombs(char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int rpmatch(__const char *__response) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)); nengel@9: extern int getsubopt(char **__restrict __optionp, char *__const *__restrict __tokens, char **__restrict __valuep) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2, 3))) __attribute__((__warn_unused_result__)); nengel@9: extern int getloadavg(double __loadavg[], int __nelem) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern char *__realpath_chk(__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern char *__realpath_alias(__const char *__restrict __name, char *__restrict __resolved) __asm__ ("""realpath") __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern char *__realpath_chk_warn(__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("""__realpath_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)) __attribute__((__warning__("second argument of realpath must be either NULL or at ""least PATH_MAX bytes long buffer"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) __attribute__((__warn_unused_result__)) char *__attribute__((__nothrow__, __leaf__)) realpath(__const char *__restrict __name, char *__restrict __resolved) nengel@9: { nengel@9: if (__builtin_object_size(__resolved, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (__builtin_object_size(__resolved, 2 > 1) < 4096) nengel@9: return __realpath_chk_warn(__name, __resolved, __builtin_object_size(__resolved, 2 > 1)); nengel@9: return __realpath_chk(__name, __resolved, __builtin_object_size(__resolved, 2 > 1)); nengel@9: } nengel@9: return __realpath_alias(__name, __resolved); nengel@9: } nengel@9: extern int __ptsname_r_chk(int __fd, char *__buf, size_t __buflen, size_t __nreal) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern int __ptsname_r_alias(int __fd, char *__buf, size_t __buflen) __asm__ ("""ptsname_r") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern int __ptsname_r_chk_warn(int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("""__ptsname_r_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))) __attribute__((__warning__("ptsname_r called with buflen bigger than ""size of buf"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) int __attribute__((__nothrow__, __leaf__)) ptsname_r(int __fd, char *__buf, size_t __buflen) nengel@9: { nengel@9: if (__builtin_object_size(__buf, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__buflen)) nengel@9: return __ptsname_r_chk(__fd, __buf, __buflen, __builtin_object_size(__buf, 2 > 1)); nengel@9: if (__buflen > __builtin_object_size(__buf, 2 > 1)) nengel@9: return __ptsname_r_chk_warn(__fd, __buf, __buflen, __builtin_object_size(__buf, 2 > 1)); nengel@9: } nengel@9: return __ptsname_r_alias(__fd, __buf, __buflen); nengel@9: } nengel@9: extern int __wctomb_chk(char *__s, wchar_t __wchar, size_t __buflen) __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern int __wctomb_alias(char *__s, wchar_t __wchar) __asm__ ("""wctomb") __attribute__((__nothrow__, __leaf__)) __attribute__((__warn_unused_result__)); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) __attribute__((__warn_unused_result__)) int __attribute__((__nothrow__, __leaf__)) wctomb(char *__s, wchar_t __wchar) nengel@9: { nengel@9: if (__builtin_object_size(__s, 2 > 1) != (size_t) - 1 && 16 > __builtin_object_size(__s, 2 > 1)) nengel@9: return __wctomb_chk(__s, __wchar, __builtin_object_size(__s, 2 > 1)); nengel@9: return __wctomb_alias(__s, __wchar); nengel@9: } nengel@9: extern size_t __mbstowcs_chk(wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __attribute__((__nothrow__, __leaf__)); nengel@9: extern size_t __mbstowcs_alias(wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) __asm__ ("""mbstowcs") __attribute__((__nothrow__, __leaf__)); nengel@9: extern size_t __mbstowcs_chk_warn(wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("""__mbstowcs_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__warning__("mbstowcs called with dst buffer smaller than len ""* sizeof (wchar_t)"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) size_t __attribute__((__nothrow__, __leaf__)) mbstowcs(wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) nengel@9: { nengel@9: if (__builtin_object_size(__dst, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__len)) nengel@9: return __mbstowcs_chk(__dst, __src, __len, __builtin_object_size(__dst, 2 > 1) / sizeof(wchar_t)); nengel@9: if (__len > __builtin_object_size(__dst, 2 > 1) / sizeof(wchar_t)) nengel@9: return __mbstowcs_chk_warn(__dst, __src, __len, __builtin_object_size(__dst, 2 > 1) / sizeof(wchar_t)); nengel@9: } nengel@9: return __mbstowcs_alias(__dst, __src, __len); nengel@9: } nengel@9: extern size_t __wcstombs_chk(char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __attribute__((__nothrow__, __leaf__)); nengel@9: extern size_t __wcstombs_alias(char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) __asm__ ("""wcstombs") __attribute__((__nothrow__, __leaf__)); nengel@9: extern size_t __wcstombs_chk_warn(char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("""__wcstombs_chk") __attribute__((__nothrow__, __leaf__)) __attribute__((__warning__("wcstombs called with dst buffer smaller than len"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) size_t __attribute__((__nothrow__, __leaf__)) wcstombs(char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) nengel@9: { nengel@9: if (__builtin_object_size(__dst, 2 > 1) != (size_t) - 1) nengel@9: { nengel@9: if (!__builtin_constant_p(__len)) nengel@9: return __wcstombs_chk(__dst, __src, __len, __builtin_object_size(__dst, 2 > 1)); nengel@9: if (__len > __builtin_object_size(__dst, 2 > 1)) nengel@9: return __wcstombs_chk_warn(__dst, __src, __len, __builtin_object_size(__dst, 2 > 1)); nengel@9: } nengel@9: return __wcstombs_alias(__dst, __src, __len); nengel@9: } nengel@9: extern void *memcpy(void *__restrict __dest, __const void *__restrict __src, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern void *memmove(void *__dest, __const void *__src, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern void *memccpy(void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern void *memset(void *__s, int __c, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int memcmp(__const void *__s1, __const void *__s2, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern void *memchr(__const void *__s, int __c, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))); nengel@9: extern char *strcpy(char *__restrict __dest, __const char *__restrict __src) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *strncpy(char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *strcat(char *__restrict __dest, __const char *__restrict __src) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *strncat(char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int strcmp(__const char *__s1, __const char *__s2) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int strncmp(__const char *__s1, __const char *__s2, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int strcoll(__const char *__s1, __const char *__s2) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern size_t strxfrm(char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern int strcoll_l(__const char *__s1, __const char *__s2, __locale_t __l) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2, 3))); nengel@9: extern size_t strxfrm_l(char *__dest, __const char *__src, size_t __n, __locale_t __l) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2, 4))); nengel@9: extern char *strdup(__const char *__s) __attribute__((__nothrow__, __leaf__)) __attribute__((__malloc__)) __attribute__((__nonnull__(1))); nengel@9: extern char *strndup(__const char *__string, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__malloc__)) __attribute__((__nonnull__(1))); nengel@9: extern char *strchr(__const char *__s, int __c) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))); nengel@9: extern char *strrchr(__const char *__s, int __c) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))); nengel@9: extern size_t strcspn(__const char *__s, __const char *__reject) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern size_t strspn(__const char *__s, __const char *__accept) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *strpbrk(__const char *__s, __const char *__accept) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *strstr(__const char *__haystack, __const char *__needle) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *strtok(char *__restrict __s, __const char *__restrict __delim) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern char *__strtok_r(char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2, 3))); nengel@9: extern char *strtok_r(char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2, 3))); nengel@9: extern size_t strlen(__const char *__s) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))); nengel@9: extern size_t strnlen(__const char *__string, size_t __maxlen) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))); nengel@9: extern char *strerror(int __errnum) __attribute__((__nothrow__, __leaf__)); nengel@9: extern int strerror_r(int __errnum, char *__buf, size_t __buflen) __asm__ ("""__xpg_strerror_r") __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(2))); nengel@9: extern char *strerror_l(int __errnum, __locale_t __l) __attribute__((__nothrow__, __leaf__)); nengel@9: extern void __bzero(void *__s, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern void bcopy(__const void *__src, void *__dest, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern void bzero(void *__s, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1))); nengel@9: extern int bcmp(__const void *__s1, __const void *__s2, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *index(__const char *__s, int __c) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))); nengel@9: extern char *rindex(__const char *__s, int __c) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1))); nengel@9: extern int ffs(int __i) __attribute__((__nothrow__, __leaf__)) __attribute__((__const__)); nengel@9: extern int strcasecmp(__const char *__s1, __const char *__s2) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern int strncasecmp(__const char *__s1, __const char *__s2, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__pure__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *strsep(char **__restrict __stringp, __const char *__restrict __delim) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *strsignal(int __sig) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *__stpcpy(char *__restrict __dest, __const char *__restrict __src) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *stpcpy(char *__restrict __dest, __const char *__restrict __src) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *__stpncpy(char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern char *stpncpy(char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__nonnull__(1, 2))); nengel@9: extern void *__rawmemchr(const void *__s, int __c); nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strcspn_c1(__const char *__s, int __reject); nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strcspn_c1(__const char *__s, int __reject) nengel@9: { nengel@9: register size_t __result = 0; nengel@9: while (__s[__result] != '\0' && __s[__result] != __reject) nengel@9: ++__result; nengel@9: return __result; nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strcspn_c2(__const char *__s, int __reject1, int __reject2); nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strcspn_c2(__const char *__s, int __reject1, int __reject2) nengel@9: { nengel@9: register size_t __result = 0; nengel@9: while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2) nengel@9: ++__result; nengel@9: return __result; nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strcspn_c3(__const char *__s, int __reject1, int __reject2, int __reject3); nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strcspn_c3(__const char *__s, int __reject1, int __reject2, int __reject3) nengel@9: { nengel@9: register size_t __result = 0; nengel@9: while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2 && __s[__result] != __reject3) nengel@9: ++__result; nengel@9: return __result; nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strspn_c1(__const char *__s, int __accept); nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strspn_c1(__const char *__s, int __accept) nengel@9: { nengel@9: register size_t __result = 0; nengel@9: while (__s[__result] == __accept) nengel@9: ++__result; nengel@9: return __result; nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strspn_c2(__const char *__s, int __accept1, int __accept2); nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strspn_c2(__const char *__s, int __accept1, int __accept2) nengel@9: { nengel@9: register size_t __result = 0; nengel@9: while (__s[__result] == __accept1 || __s[__result] == __accept2) nengel@9: ++__result; nengel@9: return __result; nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strspn_c3(__const char *__s, int __accept1, int __accept2, int __accept3); nengel@9: extern __inline __attribute__((__gnu_inline__)) size_t __strspn_c3(__const char *__s, int __accept1, int __accept2, int __accept3) nengel@9: { nengel@9: register size_t __result = 0; nengel@9: while (__s[__result] == __accept1 || __s[__result] == __accept2 || __s[__result] == __accept3) nengel@9: ++__result; nengel@9: return __result; nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strpbrk_c2(__const char *__s, int __accept1, int __accept2); nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strpbrk_c2(__const char *__s, int __accept1, int __accept2) nengel@9: { nengel@9: while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) nengel@9: ++__s; nengel@9: return *__s == '\0' ? ((void *) 0) : (char *) (size_t) __s; nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strpbrk_c3(__const char *__s, int __accept1, int __accept2, int __accept3); nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strpbrk_c3(__const char *__s, int __accept1, int __accept2, int __accept3) nengel@9: { nengel@9: while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 && *__s != __accept3) nengel@9: ++__s; nengel@9: return *__s == '\0' ? ((void *) 0) : (char *) (size_t) __s; nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strtok_r_1c(char *__s, char __sep, char **__nextp); nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strtok_r_1c(char *__s, char __sep, char **__nextp) nengel@9: { nengel@9: char *__result; nengel@9: if (__s == ((void *) 0)) nengel@9: __s = *__nextp; nengel@9: while (*__s == __sep) nengel@9: ++__s; nengel@9: __result = ((void *) 0); nengel@9: if (*__s != '\0') nengel@9: { nengel@9: __result = __s++; nengel@9: while (*__s != '\0') nengel@9: if (*__s++ == __sep) nengel@9: { nengel@9: __s[- 1] = '\0'; nengel@9: break; nengel@9: } nengel@9: } nengel@9: *__nextp = __s; nengel@9: return __result; nengel@9: } nengel@9: extern char *__strsep_g(char **__stringp, __const char *__delim); nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strsep_1c(char **__s, char __reject); nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strsep_1c(char **__s, char __reject) nengel@9: { nengel@9: register char *__retval = *__s; nengel@9: if (__retval != ((void *) 0) && (*__s = (__extension__ (__builtin_constant_p(__reject) && !__builtin_constant_p(__retval) && (__reject) == '\0' ? (char *) __rawmemchr(__retval, __reject) : __builtin_strchr(__retval, __reject)))) != ((void *) 0)) nengel@9: *(*__s)++ = '\0'; nengel@9: return __retval; nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strsep_2c(char **__s, char __reject1, char __reject2); nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strsep_2c(char **__s, char __reject1, char __reject2) nengel@9: { nengel@9: register char *__retval = *__s; nengel@9: if (__retval != ((void *) 0)) nengel@9: { nengel@9: register char *__cp = __retval; nengel@9: while (1) nengel@9: { nengel@9: if (*__cp == '\0') nengel@9: { nengel@9: __cp = ((void *) 0); nengel@9: break; nengel@9: } nengel@9: if (*__cp == __reject1 || *__cp == __reject2) nengel@9: { nengel@9: *__cp++ = '\0'; nengel@9: break; nengel@9: } nengel@9: ++__cp; nengel@9: } nengel@9: *__s = __cp; nengel@9: } nengel@9: return __retval; nengel@9: } nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strsep_3c(char **__s, char __reject1, char __reject2, char __reject3); nengel@9: extern __inline __attribute__((__gnu_inline__)) char *__strsep_3c(char **__s, char __reject1, char __reject2, char __reject3) nengel@9: { nengel@9: register char *__retval = *__s; nengel@9: if (__retval != ((void *) 0)) nengel@9: { nengel@9: register char *__cp = __retval; nengel@9: while (1) nengel@9: { nengel@9: if (*__cp == '\0') nengel@9: { nengel@9: __cp = ((void *) 0); nengel@9: break; nengel@9: } nengel@9: if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) nengel@9: { nengel@9: *__cp++ = '\0'; nengel@9: break; nengel@9: } nengel@9: ++__cp; nengel@9: } nengel@9: *__s = __cp; nengel@9: } nengel@9: return __retval; nengel@9: } nengel@9: extern char *__strdup(__const char *__string) __attribute__((__nothrow__, __leaf__)) __attribute__((__malloc__)); nengel@9: extern char *__strndup(__const char *__string, size_t __n) __attribute__((__nothrow__, __leaf__)) __attribute__((__malloc__)); nengel@9: extern void __warn_memset_zero_len(void) __attribute__((__warning__("memset used with constant zero length parameter; this could be due to transposed parameters"))); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) void *__attribute__((__nothrow__, __leaf__)) memcpy(void *__restrict __dest, __const void *__restrict __src, size_t __len) nengel@9: { nengel@9: return __builtin___memcpy_chk(__dest, __src, __len, __builtin_object_size(__dest, 0)); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) void *__attribute__((__nothrow__, __leaf__)) memmove(void *__dest, __const void *__src, size_t __len) nengel@9: { nengel@9: return __builtin___memmove_chk(__dest, __src, __len, __builtin_object_size(__dest, 0)); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) void *__attribute__((__nothrow__, __leaf__)) memset(void *__dest, int __ch, size_t __len) nengel@9: { nengel@9: if (__builtin_constant_p(__len) && __len == 0 && (!__builtin_constant_p(__ch) || __ch != 0)) nengel@9: { nengel@9: __warn_memset_zero_len(); nengel@9: return __dest; nengel@9: } nengel@9: return __builtin___memset_chk(__dest, __ch, __len, __builtin_object_size(__dest, 0)); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) void __attribute__((__nothrow__, __leaf__)) bcopy(__const void *__src, void *__dest, size_t __len) nengel@9: { nengel@9: (void) __builtin___memmove_chk(__dest, __src, __len, __builtin_object_size(__dest, 0)); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) void __attribute__((__nothrow__, __leaf__)) bzero(void *__dest, size_t __len) nengel@9: { nengel@9: (void) __builtin___memset_chk(__dest, '\0', __len, __builtin_object_size(__dest, 0)); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) char *__attribute__((__nothrow__, __leaf__)) strcpy(char *__restrict __dest, __const char *__restrict __src) nengel@9: { nengel@9: return __builtin___strcpy_chk(__dest, __src, __builtin_object_size(__dest, 2 > 1)); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) char *__attribute__((__nothrow__, __leaf__)) strncpy(char *__restrict __dest, __const char *__restrict __src, size_t __len) nengel@9: { nengel@9: return __builtin___strncpy_chk(__dest, __src, __len, __builtin_object_size(__dest, 2 > 1)); nengel@9: } nengel@9: extern char *__stpncpy_chk(char *__dest, __const char *__src, size_t __n, size_t __destlen) __attribute__((__nothrow__, __leaf__)); nengel@9: extern char *__stpncpy_alias(char *__dest, __const char *__src, size_t __n) __asm__ ("""stpncpy") __attribute__((__nothrow__, __leaf__)); nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) char *__attribute__((__nothrow__, __leaf__)) stpncpy(char *__dest, __const char *__src, size_t __n) nengel@9: { nengel@9: if (__builtin_object_size(__dest, 2 > 1) != (size_t) - 1 && (!__builtin_constant_p(__n) || __n <= __builtin_object_size(__dest, 2 > 1))) nengel@9: return __stpncpy_chk(__dest, __src, __n, __builtin_object_size(__dest, 2 > 1)); nengel@9: return __stpncpy_alias(__dest, __src, __n); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) char *__attribute__((__nothrow__, __leaf__)) strcat(char *__restrict __dest, __const char *__restrict __src) nengel@9: { nengel@9: return __builtin___strcat_chk(__dest, __src, __builtin_object_size(__dest, 2 > 1)); nengel@9: } nengel@9: extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__, __artificial__)) char *__attribute__((__nothrow__, __leaf__)) strncat(char *__restrict __dest, __const char *__restrict __src, size_t __len) nengel@9: { nengel@9: return __builtin___strncat_chk(__dest, __src, __len, __builtin_object_size(__dest, 2 > 1)); nengel@9: } nengel@9: extern const uint8_t ff_log2_tab[256]; nengel@9: static inline __attribute__((const)) int av_log2_c(unsigned int v) nengel@9: { nengel@9: int n = 0; nengel@9: if (v & 0xffff0000) nengel@9: { nengel@9: v >>= 16; nengel@9: n += 16; nengel@9: } nengel@9: if (v & 0xff00) nengel@9: { nengel@9: v >>= 8; nengel@9: n += 8; nengel@9: } nengel@9: n += ff_log2_tab[v]; nengel@9: return n; nengel@9: } nengel@9: static inline __attribute__((const)) int av_log2_16bit_c(unsigned int v) nengel@9: { nengel@9: int n = 0; nengel@9: if (v & 0xff00) nengel@9: { nengel@9: v >>= 8; nengel@9: n += 8; nengel@9: } nengel@9: n += ff_log2_tab[v]; nengel@9: return n; nengel@9: } nengel@9: static inline __attribute__((const)) int av_clip(int a, int amin, int amax) nengel@9: { nengel@9: if (a < amin) nengel@9: return amin; nengel@9: else nengel@9: if (a > amax) nengel@9: return amax; nengel@9: else nengel@9: return a; nengel@9: } nengel@9: static inline __attribute__((const)) uint8_t av_clip_uint8(int a) nengel@9: { nengel@9: if (a & (~0xFF)) nengel@9: return (- a) >> 31; nengel@9: else nengel@9: return a; nengel@9: } nengel@9: static inline __attribute__((const)) uint16_t av_clip_uint16(int a) nengel@9: { nengel@9: if (a & (~0xFFFF)) nengel@9: return (- a) >> 31; nengel@9: else nengel@9: return a; nengel@9: } nengel@9: static inline __attribute__((const)) int16_t av_clip_int16(int a) nengel@9: { nengel@9: if ((a + 0x8000) & ~0xFFFF) nengel@9: return (a >> 31) ^ 0x7FFF; nengel@9: else nengel@9: return a; nengel@9: } nengel@9: static inline __attribute__((const)) int32_t av_clipl_int32(int64_t a) nengel@9: { nengel@9: if ((a + 0x80000000u) & ~0xFFFFFFFFUL) nengel@9: return (a >> 63) ^ 0x7FFFFFFF; nengel@9: else nengel@9: return a; nengel@9: } nengel@9: static inline __attribute__((const)) float av_clipf(float a, float amin, float amax) nengel@9: { nengel@9: if (a < amin) nengel@9: return amin; nengel@9: else nengel@9: if (a > amax) nengel@9: return amax; nengel@9: else nengel@9: return a; nengel@9: } nengel@9: static inline __attribute__((const)) int av_ceil_log2(int x) nengel@9: { nengel@9: return av_log2_c((x - 1) << 1); nengel@9: } nengel@9: typedef union nengel@9: { nengel@9: uint64_t u64; nengel@9: uint32_t u32[2]; nengel@9: uint16_t u16[4]; nengel@9: uint8_t u8[8]; nengel@9: double f64; nengel@9: float f32[2]; nengel@9: } __attribute__((__may_alias__)) av_alias64; nengel@9: typedef union nengel@9: { nengel@9: uint32_t u32; nengel@9: uint16_t u16[2]; nengel@9: uint8_t u8[4]; nengel@9: float f32; nengel@9: } __attribute__((__may_alias__)) av_alias32; nengel@9: typedef union nengel@9: { nengel@9: uint16_t u16; nengel@9: uint8_t u8[2]; nengel@9: } __attribute__((__may_alias__)) av_alias16; nengel@9: static __attribute__((always_inline)) inline void AV_COPY64(void *d, const void *s) nengel@9: { nengel@9: __asm__ ("movq %1, %%mm0 \n\t""movq %%mm0, %0 \n\t": "=m" (*(uint64_t *) d): "m" (*(const uint64_t *) s): "mm0"); nengel@9: } nengel@9: static __attribute__((always_inline)) inline void AV_SWAP64(void *a, void *b) nengel@9: { nengel@9: __asm__ ("movq %1, %%mm0 \n\t""movq %0, %%mm1 \n\t""movq %%mm0, %0 \n\t""movq %%mm1, %1 \n\t": "+m" (*(uint64_t *) a), "+m" (*(uint64_t *) b): : "mm0", "mm1"); nengel@9: } nengel@9: static __attribute__((always_inline)) inline void AV_ZERO64(void *d) nengel@9: { nengel@9: __asm__ ("pxor %%mm0, %%mm0 \n\t""movq %%mm0, %0 \n\t": "=m" (*(uint64_t *) d): : "mm0"); nengel@9: } nengel@9: static __attribute__((always_inline)) inline void AV_COPY128(void *d, const void *s) nengel@9: { nengel@9: struct v nengel@9: { nengel@9: uint64_t v[2]; nengel@9: }; nengel@9: __asm__ ("movaps %1, %%xmm0 \n\t""movaps %%xmm0, %0 \n\t": "=m" (*(struct v *) d): "m" (*(const struct v *) s): "xmm0"); nengel@9: } nengel@9: static __attribute__((always_inline)) inline void AV_ZERO128(void *d) nengel@9: { nengel@9: struct v nengel@9: { nengel@9: uint64_t v[2]; nengel@9: }; nengel@9: __asm__ ("pxor %%xmm0, %%xmm0 \n\t""movdqa %%xmm0, %0 \n\t": "=m" (*(struct v *) d): : "xmm0"); nengel@9: } nengel@9: void ff_h264_idct8_add_c(uint8_t *dst, DCTELEM *block, int stride); nengel@9: void ff_h264_idct_add_c(uint8_t *dst, DCTELEM *block, int stride); nengel@9: void ff_h264_idct8_dc_add_c(uint8_t *dst, DCTELEM *block, int stride); nengel@9: void ff_h264_idct_dc_add_c(uint8_t *dst, DCTELEM *block, int stride); nengel@9: void ff_h264_lowres_idct_add_c(uint8_t *dst, int stride, DCTELEM *block); nengel@9: void ff_h264_lowres_idct_put_c(uint8_t *dst, int stride, DCTELEM *block); nengel@9: void ff_h264_idct_add16_c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]); nengel@9: void ff_h264_idct_add16intra_c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]); nengel@9: void ff_h264_idct8_add4_c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]); nengel@9: void ff_h264_idct_add8_c(uint8_t **dest, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]); nengel@9: void h264_luma_dc_dequant_idct_c(DCTELEM *block, int qmul); nengel@9: void chroma_dc_dequant_idct_c(DCTELEM *block, int qmul); nengel@9: void ff_vector_fmul_window_c(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len); nengel@9: void ff_float_to_int16_c(int16_t *dst, const float *src, long len); nengel@9: void ff_float_to_int16_interleave_c(int16_t *dst, const float **src, long len, int channels); nengel@9: extern const uint8_t ff_alternate_horizontal_scan[64]; nengel@9: extern const uint8_t ff_alternate_vertical_scan[64]; nengel@9: extern const uint8_t ff_zigzag_direct[64]; nengel@9: extern const uint8_t ff_zigzag248_direct[64]; nengel@9: extern uint32_t ff_squareTbl[512]; nengel@9: extern uint8_t ff_cropTbl[256 + 2 * 1024]; nengel@9: void ff_vp3_idct_c(DCTELEM *block); nengel@9: void ff_vp3_idct_put_c(uint8_t *dest, int line_size, DCTELEM *block); nengel@9: void ff_vp3_idct_add_c(uint8_t *dest, int line_size, DCTELEM *block); nengel@9: void ff_vp3_idct_dc_add_c(uint8_t *dest, int line_size, const DCTELEM *block); nengel@9: void ff_vp3_v_loop_filter_c(uint8_t *src, int stride, int *bounding_values); nengel@9: void ff_vp3_h_loop_filter_c(uint8_t *src, int stride, int *bounding_values); nengel@9: void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, int stride, const int16_t *h_weights, const int16_t *v_weights); nengel@9: void ff_bink_idct_c(DCTELEM *block); nengel@9: void ff_bink_idct_add_c(uint8_t *dest, int linesize, DCTELEM *block); nengel@9: void ff_bink_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block); nengel@9: void ff_put_cavs_qpel8_mc00_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_cavs_qpel8_mc00_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_cavs_qpel16_mc00_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_cavs_qpel16_mc00_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_vc1_mspel_mc00_c(uint8_t *dst, const uint8_t *src, int stride, int rnd); nengel@9: void ff_avg_vc1_mspel_mc00_c(uint8_t *dst, const uint8_t *src, int stride, int rnd); nengel@9: void ff_ea_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block); nengel@9: void ff_img_copy_plane(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height); nengel@9: void ff_shrink22(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height); nengel@9: void ff_shrink44(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height); nengel@9: void ff_shrink88(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height); nengel@9: void ff_gmc_c(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height); nengel@9: typedef void (*op_pixels_func)(uint8_t *block, const uint8_t *pixels, int line_size, int h); nengel@9: typedef void (*tpel_mc_func)(uint8_t *block, const uint8_t *pixels, int line_size, int w, int h); nengel@9: typedef void (*qpel_mc_func)(uint8_t *dst, uint8_t *src, int stride); nengel@9: typedef void (*h264_chroma_mc_func)(uint8_t *dst, uint8_t *src, int srcStride, int h, int x, int y); nengel@9: typedef void (*op_fill_func)(uint8_t *block, uint8_t value, int line_size, int h); nengel@9: void ff_put_qpel16_mc11_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel16_mc11_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel16_mc11_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_qpel16_mc31_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel16_mc31_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel16_mc31_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_qpel16_mc12_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel16_mc12_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel16_mc12_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_qpel16_mc32_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel16_mc32_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel16_mc32_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_qpel16_mc13_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel16_mc13_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel16_mc13_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_qpel16_mc33_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel16_mc33_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel16_mc33_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_qpel8_mc11_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel8_mc11_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel8_mc11_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_qpel8_mc31_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel8_mc31_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel8_mc31_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_qpel8_mc12_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel8_mc12_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel8_mc12_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_qpel8_mc32_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel8_mc32_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel8_mc32_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_qpel8_mc13_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel8_mc13_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel8_mc13_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_qpel8_mc33_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_put_no_rnd_qpel8_mc33_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: void ff_avg_qpel8_mc33_old_c(uint8_t *dst, uint8_t *src, int stride); nengel@9: typedef int (*me_cmp_func)(void *s, uint8_t *blk1, uint8_t *blk2, int line_size, int h); nengel@9: typedef struct ScanTable nengel@9: { nengel@9: const uint8_t *scantable; nengel@9: uint8_t permutated[64]; nengel@9: uint8_t raster_end[64]; nengel@9: } ScanTable; nengel@9: void ff_init_scantable(uint8_t *, ScanTable *st, const uint8_t *src_scantable); nengel@9: void ff_emulated_edge_mc(uint8_t *buf, uint8_t *src, int linesize, int block_w, int block_h, int src_x, int src_y, int w, int h); nengel@9: typedef struct DSPContext nengel@9: { nengel@9: void (*get_pixels)(DCTELEM *block, const uint8_t *pixels, int line_size); nengel@9: void (*diff_pixels)(DCTELEM *block, const uint8_t *s1, const uint8_t *s2, int stride); nengel@9: void (*put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); nengel@9: void (*put_signed_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); nengel@9: void (*put_pixels_nonclamped)(const DCTELEM *block, uint8_t *pixels, int line_size); nengel@9: void (*add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); nengel@9: void (*add_pixels8)(uint8_t *pixels, DCTELEM *block, int line_size); nengel@9: void (*add_pixels4)(uint8_t *pixels, DCTELEM *block, int line_size); nengel@9: void (*clear_block)(DCTELEM *block); nengel@9: void (*clear_blocks)(DCTELEM *blocks); nengel@9: op_pixels_func put_pixels_tab[4][4]; nengel@9: op_pixels_func avg_pixels_tab[4][4]; nengel@9: op_pixels_func put_no_rnd_pixels_tab[4][4]; nengel@9: op_pixels_func avg_no_rnd_pixels_tab[4][4]; nengel@9: void (*put_no_rnd_pixels_l2[2])(uint8_t *block, const uint8_t *a, const uint8_t *b, int line_size, int h); nengel@9: qpel_mc_func put_qpel_pixels_tab[2][16]; nengel@9: qpel_mc_func avg_qpel_pixels_tab[2][16]; nengel@9: qpel_mc_func put_no_rnd_qpel_pixels_tab[2][16]; nengel@9: qpel_mc_func avg_no_rnd_qpel_pixels_tab[2][16]; nengel@9: qpel_mc_func put_mspel_pixels_tab[8]; nengel@9: h264_chroma_mc_func put_h264_chroma_pixels_tab[3]; nengel@9: h264_chroma_mc_func avg_h264_chroma_pixels_tab[3]; nengel@9: h264_chroma_mc_func put_no_rnd_vc1_chroma_pixels_tab[3]; nengel@9: h264_chroma_mc_func avg_no_rnd_vc1_chroma_pixels_tab[3]; nengel@9: qpel_mc_func put_h264_qpel_pixels_tab[4][16]; nengel@9: qpel_mc_func avg_h264_qpel_pixels_tab[4][16]; nengel@9: qpel_mc_func put_2tap_qpel_pixels_tab[4][16]; nengel@9: qpel_mc_func avg_2tap_qpel_pixels_tab[4][16]; nengel@9: void (*fdct)(DCTELEM *block); nengel@9: void (*fdct248)(DCTELEM *block); nengel@9: void (*idct)(DCTELEM *block); nengel@9: void (*idct_put)(uint8_t *dest, int line_size, DCTELEM *block); nengel@9: void (*idct_add)(uint8_t *dest, int line_size, DCTELEM *block); nengel@9: void (*draw_edges)(uint8_t *buf, int wrap, int width, int height, int w); nengel@9: void (*prefetch)(void *mem, int stride, int h); nengel@9: } DSPContext; nengel@9: void dsputil_static_init(void); nengel@9: void dsputil_init(DSPContext *p); nengel@9: int ff_check_alignment(void); nengel@9: void ff_block_permute(DCTELEM *block, uint8_t *permutation, const uint8_t *scantable, int last); nengel@9: void ff_set_cmp(DSPContext *c, me_cmp_func *cmp, int type); nengel@9: static inline uint32_t rnd_avg32(uint32_t a, uint32_t b) nengel@9: { nengel@9: return (a | b) - (((a ^ b) & ~((0x01) * 0x01010101UL)) >> 1); nengel@9: } nengel@9: static inline uint32_t no_rnd_avg32(uint32_t a, uint32_t b) nengel@9: { nengel@9: return (a & b) + (((a ^ b) & ~((0x01) * 0x01010101UL)) >> 1); nengel@9: } nengel@9: int mm_support(void); nengel@9: extern int mm_flags; nengel@9: void dsputil_init_arm(DSPContext *c); nengel@9: void dsputil_init_mmx(DSPContext *c); nengel@9: void dsputil_init_ppc(DSPContext *c); nengel@9: void ff_dsputil_init_dwt(DSPContext *c); nengel@9: static inline void emms(void) nengel@9: { nengel@9: __asm__ volatile("emms;": : : "memory"); nengel@9: } nengel@9: static inline void copy_block2(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride, int h) nengel@9: { nengel@9: int i; nengel@9: for (i = 0; nengel@9: i < h; nengel@9: i++) nengel@9: { nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst))[0] = (((((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])); nengel@9: ((uint8_t *) (dst))[1] = (((((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 8; nengel@9: } nengel@9: while (0); nengel@9: dst += dstStride; nengel@9: src += srcStride; nengel@9: } nengel@9: } nengel@9: static inline void copy_block4(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride, int h) nengel@9: { nengel@9: int i; nengel@9: for (i = 0; nengel@9: i < h; nengel@9: i++) nengel@9: { nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst))[0] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])); nengel@9: ((uint8_t *) (dst))[1] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 8; nengel@9: ((uint8_t *) (dst))[2] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 16; nengel@9: ((uint8_t *) (dst))[3] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: dst += dstStride; nengel@9: src += srcStride; nengel@9: } nengel@9: } nengel@9: static inline void copy_block8(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride, int h) nengel@9: { nengel@9: int i; nengel@9: for (i = 0; nengel@9: i < h; nengel@9: i++) nengel@9: { nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst))[0] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])); nengel@9: ((uint8_t *) (dst))[1] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 8; nengel@9: ((uint8_t *) (dst))[2] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 16; nengel@9: ((uint8_t *) (dst))[3] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst + 4))[0] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])); nengel@9: ((uint8_t *) (dst + 4))[1] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 8; nengel@9: ((uint8_t *) (dst + 4))[2] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 16; nengel@9: ((uint8_t *) (dst + 4))[3] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: dst += dstStride; nengel@9: src += srcStride; nengel@9: } nengel@9: } nengel@9: static inline void copy_block9(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride, int h) nengel@9: { nengel@9: int i; nengel@9: for (i = 0; nengel@9: i < h; nengel@9: i++) nengel@9: { nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst))[0] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])); nengel@9: ((uint8_t *) (dst))[1] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 8; nengel@9: ((uint8_t *) (dst))[2] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 16; nengel@9: ((uint8_t *) (dst))[3] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst + 4))[0] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])); nengel@9: ((uint8_t *) (dst + 4))[1] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 8; nengel@9: ((uint8_t *) (dst + 4))[2] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 16; nengel@9: ((uint8_t *) (dst + 4))[3] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: dst[8] = src[8]; nengel@9: dst += dstStride; nengel@9: src += srcStride; nengel@9: } nengel@9: } nengel@9: static inline void copy_block16(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride, int h) nengel@9: { nengel@9: int i; nengel@9: for (i = 0; nengel@9: i < h; nengel@9: i++) nengel@9: { nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst))[0] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])); nengel@9: ((uint8_t *) (dst))[1] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 8; nengel@9: ((uint8_t *) (dst))[2] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 16; nengel@9: ((uint8_t *) (dst))[3] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst + 4))[0] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])); nengel@9: ((uint8_t *) (dst + 4))[1] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 8; nengel@9: ((uint8_t *) (dst + 4))[2] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 16; nengel@9: ((uint8_t *) (dst + 4))[3] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst + 8))[0] = (((((const uint8_t *) (src + 8))[3] << 24) | (((const uint8_t *) (src + 8))[2] << 16) | (((const uint8_t *) (src + 8))[1] << 8) | ((const uint8_t *) (src + 8))[0])); nengel@9: ((uint8_t *) (dst + 8))[1] = (((((const uint8_t *) (src + 8))[3] << 24) | (((const uint8_t *) (src + 8))[2] << 16) | (((const uint8_t *) (src + 8))[1] << 8) | ((const uint8_t *) (src + 8))[0])) >> 8; nengel@9: ((uint8_t *) (dst + 8))[2] = (((((const uint8_t *) (src + 8))[3] << 24) | (((const uint8_t *) (src + 8))[2] << 16) | (((const uint8_t *) (src + 8))[1] << 8) | ((const uint8_t *) (src + 8))[0])) >> 16; nengel@9: ((uint8_t *) (dst + 8))[3] = (((((const uint8_t *) (src + 8))[3] << 24) | (((const uint8_t *) (src + 8))[2] << 16) | (((const uint8_t *) (src + 8))[1] << 8) | ((const uint8_t *) (src + 8))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst + 12))[0] = (((((const uint8_t *) (src + 12))[3] << 24) | (((const uint8_t *) (src + 12))[2] << 16) | (((const uint8_t *) (src + 12))[1] << 8) | ((const uint8_t *) (src + 12))[0])); nengel@9: ((uint8_t *) (dst + 12))[1] = (((((const uint8_t *) (src + 12))[3] << 24) | (((const uint8_t *) (src + 12))[2] << 16) | (((const uint8_t *) (src + 12))[1] << 8) | ((const uint8_t *) (src + 12))[0])) >> 8; nengel@9: ((uint8_t *) (dst + 12))[2] = (((((const uint8_t *) (src + 12))[3] << 24) | (((const uint8_t *) (src + 12))[2] << 16) | (((const uint8_t *) (src + 12))[1] << 8) | ((const uint8_t *) (src + 12))[0])) >> 16; nengel@9: ((uint8_t *) (dst + 12))[3] = (((((const uint8_t *) (src + 12))[3] << 24) | (((const uint8_t *) (src + 12))[2] << 16) | (((const uint8_t *) (src + 12))[1] << 8) | ((const uint8_t *) (src + 12))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: dst += dstStride; nengel@9: src += srcStride; nengel@9: } nengel@9: } nengel@9: static inline void copy_block17(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride, int h) nengel@9: { nengel@9: int i; nengel@9: for (i = 0; nengel@9: i < h; nengel@9: i++) nengel@9: { nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst))[0] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])); nengel@9: ((uint8_t *) (dst))[1] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 8; nengel@9: ((uint8_t *) (dst))[2] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 16; nengel@9: ((uint8_t *) (dst))[3] = (((((const uint8_t *) (src))[3] << 24) | (((const uint8_t *) (src))[2] << 16) | (((const uint8_t *) (src))[1] << 8) | ((const uint8_t *) (src))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst + 4))[0] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])); nengel@9: ((uint8_t *) (dst + 4))[1] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 8; nengel@9: ((uint8_t *) (dst + 4))[2] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 16; nengel@9: ((uint8_t *) (dst + 4))[3] = (((((const uint8_t *) (src + 4))[3] << 24) | (((const uint8_t *) (src + 4))[2] << 16) | (((const uint8_t *) (src + 4))[1] << 8) | ((const uint8_t *) (src + 4))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst + 8))[0] = (((((const uint8_t *) (src + 8))[3] << 24) | (((const uint8_t *) (src + 8))[2] << 16) | (((const uint8_t *) (src + 8))[1] << 8) | ((const uint8_t *) (src + 8))[0])); nengel@9: ((uint8_t *) (dst + 8))[1] = (((((const uint8_t *) (src + 8))[3] << 24) | (((const uint8_t *) (src + 8))[2] << 16) | (((const uint8_t *) (src + 8))[1] << 8) | ((const uint8_t *) (src + 8))[0])) >> 8; nengel@9: ((uint8_t *) (dst + 8))[2] = (((((const uint8_t *) (src + 8))[3] << 24) | (((const uint8_t *) (src + 8))[2] << 16) | (((const uint8_t *) (src + 8))[1] << 8) | ((const uint8_t *) (src + 8))[0])) >> 16; nengel@9: ((uint8_t *) (dst + 8))[3] = (((((const uint8_t *) (src + 8))[3] << 24) | (((const uint8_t *) (src + 8))[2] << 16) | (((const uint8_t *) (src + 8))[1] << 8) | ((const uint8_t *) (src + 8))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: do nengel@9: { nengel@9: ((uint8_t *) (dst + 12))[0] = (((((const uint8_t *) (src + 12))[3] << 24) | (((const uint8_t *) (src + 12))[2] << 16) | (((const uint8_t *) (src + 12))[1] << 8) | ((const uint8_t *) (src + 12))[0])); nengel@9: ((uint8_t *) (dst + 12))[1] = (((((const uint8_t *) (src + 12))[3] << 24) | (((const uint8_t *) (src + 12))[2] << 16) | (((const uint8_t *) (src + 12))[1] << 8) | ((const uint8_t *) (src + 12))[0])) >> 8; nengel@9: ((uint8_t *) (dst + 12))[2] = (((((const uint8_t *) (src + 12))[3] << 24) | (((const uint8_t *) (src + 12))[2] << 16) | (((const uint8_t *) (src + 12))[1] << 8) | ((const uint8_t *) (src + 12))[0])) >> 16; nengel@9: ((uint8_t *) (dst + 12))[3] = (((((const uint8_t *) (src + 12))[3] << 24) | (((const uint8_t *) (src + 12))[2] << 16) | (((const uint8_t *) (src + 12))[1] << 8) | ((const uint8_t *) (src + 12))[0])) >> 24; nengel@9: } nengel@9: while (0); nengel@9: dst[16] = src[16]; nengel@9: dst += dstStride; nengel@9: src += srcStride; nengel@9: } nengel@9: } nengel@9: typedef void (*h264_weight_func)(uint8_t *block, int stride, int log2_denom, int weight, int offset); nengel@9: typedef void (*h264_biweight_func)(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offset); nengel@9: typedef struct H264DSPContext nengel@9: { nengel@9: h264_weight_func weight_h264_pixels_tab[10]; nengel@9: h264_biweight_func biweight_h264_pixels_tab[10]; nengel@9: void (*h264_v_loop_filter_luma)(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0); nengel@9: void (*h264_h_loop_filter_luma)(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0); nengel@9: void (*h264_v_loop_filter_luma_intra)(uint8_t *pix, int stride, int alpha, int beta); nengel@9: void (*h264_h_loop_filter_luma_intra)(uint8_t *pix, int stride, int alpha, int beta); nengel@9: void (*h264_v_loop_filter_chroma)(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0); nengel@9: void (*h264_h_loop_filter_chroma)(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0); nengel@9: void (*h264_v_loop_filter_chroma_intra)(uint8_t *pix, int stride, int alpha, int beta); nengel@9: void (*h264_h_loop_filter_chroma_intra)(uint8_t *pix, int stride, int alpha, int beta); nengel@9: void (*h264_loop_filter_strength)(int16_t bS[2][4][4], uint8_t nnz[40], int8_t ref[2][40], int16_t mv[2][40][2], int bidir, int edges, int step, int mask_mv0, int mask_mv1, int field); nengel@9: void (*h264_idct_add)(uint8_t *dst, DCTELEM *block, int stride); nengel@9: void (*h264_idct8_add)(uint8_t *dst, DCTELEM *block, int stride); nengel@9: void (*h264_idct_dc_add)(uint8_t *dst, DCTELEM *block, int stride); nengel@9: void (*h264_idct8_dc_add)(uint8_t *dst, DCTELEM *block, int stride); nengel@9: void (*h264_dct)(DCTELEM block[4][4]); nengel@9: void (*h264_idct_add16)(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]); nengel@9: void (*h264_idct8_add4)(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]); nengel@9: void (*h264_idct_add8)(uint8_t **dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]); nengel@9: void (*h264_idct_add16intra)(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]); nengel@9: qpel_mc_func (*qpel_put)[16]; nengel@9: qpel_mc_func (*qpel_avg)[16]; nengel@9: } H264DSPContext; nengel@9: void ff_h264dsp_init(H264DSPContext *c); nengel@9: void ff_h264dsp_init_arm(H264DSPContext *c); nengel@9: void ff_h264dsp_init_ppc(H264DSPContext *c); nengel@9: void ff_h264dsp_init_x86(H264DSPContext *c); nengel@9: typedef struct H264PredContext nengel@9: { nengel@9: void (*pred4x4[9 + 3 + 3])(uint8_t *src, uint8_t *topright, int stride); nengel@9: void (*pred8x8l[9 + 3])(uint8_t *src, int topleft, int topright, int stride); nengel@9: void (*pred8x8[4 + 3 + 4])(uint8_t *src, int stride); nengel@9: void (*pred16x16[4 + 3])(uint8_t *src, int stride); nengel@9: void (*pred4x4_add[2])(uint8_t *pix, const DCTELEM *block, int stride); nengel@9: void (*pred8x8l_add[2])(uint8_t *pix, const DCTELEM *block, int stride); nengel@9: void (*pred8x8_add[3])(uint8_t *pix, const int *block_offset, const DCTELEM *block, int stride); nengel@9: void (*pred16x16_add[3])(uint8_t *pix, const int *block_offset, const DCTELEM *block, int stride); nengel@9: } H264PredContext; nengel@9: void ff_h264_pred_init(H264PredContext *h); nengel@9: void ff_h264_pred_init_arm(H264PredContext *h); nengel@9: typedef struct nengel@9: { nengel@9: const char *class_name; nengel@9: const char *(*item_name)(void *ctx); nengel@9: const struct AVOption *option; nengel@9: int version; nengel@9: } AVClass; nengel@9: void av_log(int level, const char *fmt, ...); nengel@9: void av_vlog(int level, const char *fmt, va_list); nengel@9: int av_log_get_level(void); nengel@9: void av_log_set_level(int); nengel@9: void av_log_set_callback(void (*)(int, const char *, va_list)); nengel@9: void av_log_default_callback(int level, const char *fmt, va_list vl); nengel@9: static inline uint64_t read_time(void) nengel@9: { nengel@9: uint32_t a, d; nengel@9: __asm__ volatile("rdtsc": "=a" (a), "=d" (d): ); nengel@9: return ((uint64_t) d << 32) + a; nengel@9: } nengel@9: static inline int32_t NEG_SSR32(int32_t a, int8_t s) nengel@9: { nengel@9: __asm__ ("sarl %1, %0\n\t": "+r" (a): "ic" ((uint8_t) (- s))); nengel@9: return a; nengel@9: } nengel@9: static inline uint32_t NEG_USR32(uint32_t a, int8_t s) nengel@9: { nengel@9: __asm__ ("shrl %1, %0\n\t": "+r" (a): "ic" ((uint8_t) (- s))); nengel@9: return a; nengel@9: } nengel@9: static __attribute__((always_inline)) inline int MULH(int a, int b) nengel@9: { nengel@9: return ((int64_t) (a) * (int64_t) (b)) >> 32; nengel@9: } nengel@9: static __attribute__((always_inline)) inline unsigned UMULH(unsigned a, unsigned b) nengel@9: { nengel@9: return ((uint64_t) (a) * (uint64_t) (b)) >> 32; nengel@9: } nengel@9: static inline __attribute__((const)) int mid_pred(int a, int b, int c) nengel@9: { nengel@9: if (a > b) nengel@9: { nengel@9: if (c > b) nengel@9: { nengel@9: if (c > a) nengel@9: b = a; nengel@9: else nengel@9: b = c; nengel@9: } nengel@9: } nengel@9: else nengel@9: { nengel@9: if (b > c) nengel@9: { nengel@9: if (c > a) nengel@9: b = c; nengel@9: else nengel@9: b = a; nengel@9: } nengel@9: } nengel@9: return b; nengel@9: } nengel@9: static inline __attribute__((const)) int sign_extend(int val, unsigned bits) nengel@9: { nengel@9: return (val << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits); nengel@9: } nengel@9: static inline __attribute__((const)) unsigned zero_extend(unsigned val, unsigned bits) nengel@9: { nengel@9: return (val << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits); nengel@9: } nengel@9: typedef struct GetBitContext nengel@9: { nengel@9: uint8_t *rbsp; nengel@9: unsigned int rbsp_size; nengel@9: uint8_t *raw; nengel@9: const uint8_t *buffer, *buffer_end; nengel@9: unsigned int alloc_size; nengel@9: unsigned int buf_size; nengel@9: uint32_t *buffer_ptr; nengel@9: uint32_t cache0; nengel@9: uint32_t cache1; nengel@9: int bit_count; nengel@9: int size_in_bits; nengel@9: } GetBitContext; nengel@9: static inline int get_bits_count(const GetBitContext *s) nengel@9: { nengel@9: return ((uint8_t *) s->buffer_ptr - s->buffer) * 8 - 32 + s->bit_count; nengel@9: } nengel@9: static inline void skip_bits_long(GetBitContext *s, int n) nengel@9: { nengel@9: int re_bit_count = (s)->bit_count; nengel@9: uint32_t re_cache0 = (s)->cache0; nengel@9: uint32_t re_cache1 = (s)->cache1; nengel@9: uint32_t *re_buffer_ptr = (s)->buffer_ptr; nengel@9: re_bit_count += n; nengel@9: re_buffer_ptr += re_bit_count >> 5; nengel@9: re_bit_count &= 31; nengel@9: re_cache0 = bswap_32(re_buffer_ptr[- 1]) << re_bit_count; nengel@9: re_cache1 = 0; nengel@9: if (re_bit_count > 0) nengel@9: { nengel@9: const uint32_t next = bswap_32(*re_buffer_ptr); nengel@9: re_cache0 |= NEG_USR32(next, re_bit_count); nengel@9: re_cache1 |= next << re_bit_count; nengel@9: re_buffer_ptr++; nengel@9: re_bit_count -= 32; nengel@9: } nengel@9: (s)->bit_count = re_bit_count; nengel@9: (s)->cache0 = re_cache0; nengel@9: (s)->cache1 = re_cache1; nengel@9: (s)->buffer_ptr = re_buffer_ptr; nengel@9: } nengel@9: static inline int get_xbits(GetBitContext *s, int n) nengel@9: { nengel@9: register int sign; nengel@9: register int32_t cache; nengel@9: int re_bit_count = (s)->bit_count; nengel@9: uint32_t re_cache0 = (s)->cache0; nengel@9: uint32_t re_cache1 = (s)->cache1; nengel@9: uint32_t *re_buffer_ptr = (s)->buffer_ptr; nengel@9: if (re_bit_count > 0) nengel@9: { nengel@9: const uint32_t next = bswap_32(*re_buffer_ptr); nengel@9: re_cache0 |= NEG_USR32(next, re_bit_count); nengel@9: re_cache1 |= next << re_bit_count; nengel@9: re_buffer_ptr++; nengel@9: re_bit_count -= 32; nengel@9: } nengel@9: cache = (re_cache0); nengel@9: sign = (~cache) >> 31; nengel@9: { nengel@9: __asm__ ("shldl %2, %1, %0 \n\t""shll %2, %1 \n\t": "+r" (re_cache0), "+r" (re_cache1): "Ic" ((uint8_t) (n))); nengel@9: re_bit_count += (n); nengel@9: } nengel@9: (s)->bit_count = re_bit_count; nengel@9: (s)->cache0 = re_cache0; nengel@9: (s)->cache1 = re_cache1; nengel@9: (s)->buffer_ptr = re_buffer_ptr; nengel@9: return (NEG_USR32(sign ^ cache, n) ^ sign) - sign; nengel@9: } nengel@9: static inline int get_sbits(GetBitContext *s, int n) nengel@9: { nengel@9: register int tmp; nengel@9: int re_bit_count = (s)->bit_count; nengel@9: uint32_t re_cache0 = (s)->cache0; nengel@9: uint32_t re_cache1 = (s)->cache1; nengel@9: uint32_t *re_buffer_ptr = (s)->buffer_ptr; nengel@9: if (re_bit_count > 0) nengel@9: { nengel@9: const uint32_t next = bswap_32(*re_buffer_ptr); nengel@9: re_cache0 |= NEG_USR32(next, re_bit_count); nengel@9: re_cache1 |= next << re_bit_count; nengel@9: re_buffer_ptr++; nengel@9: re_bit_count -= 32; nengel@9: } nengel@9: tmp = NEG_SSR32(re_cache0, n); nengel@9: { nengel@9: __asm__ ("shldl %2, %1, %0 \n\t""shll %2, %1 \n\t": "+r" (re_cache0), "+r" (re_cache1): "Ic" ((uint8_t) (n))); nengel@9: re_bit_count += (n); nengel@9: } nengel@9: (s)->bit_count = re_bit_count; nengel@9: (s)->cache0 = re_cache0; nengel@9: (s)->cache1 = re_cache1; nengel@9: (s)->buffer_ptr = re_buffer_ptr; nengel@9: return tmp; nengel@9: } nengel@9: static inline unsigned int get_bits(GetBitContext *s, int n) nengel@9: { nengel@9: register int tmp; nengel@9: int re_bit_count = (s)->bit_count; nengel@9: uint32_t re_cache0 = (s)->cache0; nengel@9: uint32_t re_cache1 = (s)->cache1; nengel@9: uint32_t *re_buffer_ptr = (s)->buffer_ptr; nengel@9: if (re_bit_count > 0) nengel@9: { nengel@9: const uint32_t next = bswap_32(*re_buffer_ptr); nengel@9: re_cache0 |= NEG_USR32(next, re_bit_count); nengel@9: re_cache1 |= next << re_bit_count; nengel@9: re_buffer_ptr++; nengel@9: re_bit_count -= 32; nengel@9: } nengel@9: tmp = NEG_USR32(re_cache0, n); nengel@9: { nengel@9: __asm__ ("shldl %2, %1, %0 \n\t""shll %2, %1 \n\t": "+r" (re_cache0), "+r" (re_cache1): "Ic" ((uint8_t) (n))); nengel@9: re_bit_count += (n); nengel@9: } nengel@9: (s)->bit_count = re_bit_count; nengel@9: (s)->cache0 = re_cache0; nengel@9: (s)->cache1 = re_cache1; nengel@9: (s)->buffer_ptr = re_buffer_ptr; nengel@9: return tmp; nengel@9: } nengel@9: static inline unsigned int show_bits(GetBitContext *s, int n) nengel@9: { nengel@9: register int tmp; nengel@9: int re_bit_count = (s)->bit_count; nengel@9: uint32_t re_cache0 = (s)->cache0; nengel@9: uint32_t re_cache1 = (s)->cache1; nengel@9: uint32_t *re_buffer_ptr = (s)->buffer_ptr; nengel@9: if (re_bit_count > 0) nengel@9: { nengel@9: const uint32_t next = bswap_32(*re_buffer_ptr); nengel@9: re_cache0 |= NEG_USR32(next, re_bit_count); nengel@9: re_cache1 |= next << re_bit_count; nengel@9: re_buffer_ptr++; nengel@9: re_bit_count -= 32; nengel@9: } nengel@9: tmp = NEG_USR32(re_cache0, n); nengel@9: return tmp; nengel@9: } nengel@9: static inline void skip_bits(GetBitContext *s, int n) nengel@9: { nengel@9: int re_bit_count = (s)->bit_count; nengel@9: uint32_t re_cache0 = (s)->cache0; nengel@9: uint32_t re_cache1 = (s)->cache1; nengel@9: uint32_t *re_buffer_ptr = (s)->buffer_ptr; nengel@9: if (re_bit_count > 0) nengel@9: { nengel@9: const uint32_t next = bswap_32(*re_buffer_ptr); nengel@9: re_cache0 |= NEG_USR32(next, re_bit_count); nengel@9: re_cache1 |= next << re_bit_count; nengel@9: re_buffer_ptr++; nengel@9: re_bit_count -= 32; nengel@9: } nengel@9: { nengel@9: __asm__ ("shldl %2, %1, %0 \n\t""shll %2, %1 \n\t": "+r" (re_cache0), "+r" (re_cache1): "Ic" ((uint8_t) (n))); nengel@9: re_bit_count += (n); nengel@9: } nengel@9: (s)->bit_count = re_bit_count; nengel@9: (s)->cache0 = re_cache0; nengel@9: (s)->cache1 = re_cache1; nengel@9: (s)->buffer_ptr = re_buffer_ptr; nengel@9: } nengel@9: static inline unsigned int get_bits1(GetBitContext *s) nengel@9: { nengel@9: return get_bits(s, 1); nengel@9: } nengel@9: static inline unsigned int show_bits1(GetBitContext *s) nengel@9: { nengel@9: return show_bits(s, 1); nengel@9: } nengel@9: static inline void skip_bits1(GetBitContext *s) nengel@9: { nengel@9: skip_bits(s, 1); nengel@9: } nengel@9: static inline unsigned int get_bits_long(GetBitContext *s, int n) nengel@9: { nengel@9: if (n <= 32) nengel@9: return get_bits(s, n); nengel@9: else nengel@9: { nengel@9: int ret = get_bits(s, 16) << (n - 16); nengel@9: return ret | get_bits(s, n - 16); nengel@9: } nengel@9: } nengel@9: static inline int get_sbits_long(GetBitContext *s, int n) nengel@9: { nengel@9: return sign_extend(get_bits_long(s, n), n); nengel@9: } nengel@9: static inline unsigned int show_bits_long(GetBitContext *s, int n) nengel@9: { nengel@9: if (n <= 32) nengel@9: return show_bits(s, n); nengel@9: else nengel@9: { nengel@9: GetBitContext gb = *s; nengel@9: return get_bits_long(&gb, n); nengel@9: } nengel@9: } nengel@9: static inline int check_marker(GetBitContext *s, const char *msg) nengel@9: { nengel@9: int bit = get_bits1(s); nengel@9: if (!bit) nengel@9: av_log(32, "Marker bit missing %s\n", msg); nengel@9: return bit; nengel@9: } nengel@9: static inline void init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size) nengel@9: { nengel@9: int buffer_size = (bit_size + 7) >> 3; nengel@9: if (buffer_size < 0 || bit_size < 0) nengel@9: { nengel@9: buffer_size = bit_size = 0; nengel@9: buffer = ((void *) 0); nengel@9: } nengel@9: s->buffer = buffer; nengel@9: s->size_in_bits = bit_size; nengel@9: s->buffer_end = buffer + buffer_size; nengel@9: s->buffer_ptr = (uint32_t *) ((intptr_t) buffer & (~3)); nengel@9: s->bit_count = 32 + 8 * ((intptr_t) buffer & 3); nengel@9: skip_bits_long(s, 0); nengel@9: } nengel@9: static inline void align_get_bits(GetBitContext *s) nengel@9: { nengel@9: int n = (- get_bits_count(s)) & 7; nengel@9: if (n) nengel@9: skip_bits(s, n); nengel@9: } nengel@9: static inline int get_bits_left(GetBitContext *gb) nengel@9: { nengel@9: return gb->size_in_bits - get_bits_count(gb); nengel@9: } nengel@9: enum nengel@9: { nengel@9: PARSE = 0, nengel@9: ENTROPY, nengel@9: REORDER, nengel@9: REORDER2, nengel@9: MBDEC, nengel@9: OUTPUT, nengel@9: STAGES nengel@9: }; nengel@9: enum nengel@9: { nengel@9: TOTAL = 0, nengel@9: FRONT, nengel@9: ED, nengel@9: REC, nengel@9: PROFILE_STAGES nengel@9: }; nengel@9: typedef struct ParserContext nengel@9: { nengel@9: int ifile; nengel@9: int ofile; nengel@9: int buffer_size; nengel@9: int eof_reached; nengel@9: uint8_t *data; nengel@9: int size; nengel@9: uint8_t *cur_ptr; nengel@9: int cur_len; nengel@9: int64_t frame_offset; nengel@9: int64_t cur_offset; nengel@9: int64_t next_frame_offset; nengel@9: int pict_type; nengel@9: int repeat_pict; nengel@9: int key_frame; nengel@9: int64_t pos; nengel@9: int64_t last_pos; nengel@9: int final_frame; nengel@9: uint8_t overread[5]; nengel@9: int overread_cnt; nengel@9: int index; nengel@9: int last_index; nengel@9: int frame_start_found; nengel@9: uint32_t state; nengel@9: } ParserContext; nengel@9: typedef struct NalContext nengel@9: { nengel@9: SPS *sps_buffers[32]; nengel@9: PPS *pps_buffers[256]; nengel@9: SPS sps; nengel@9: PictureInfo picture[16 + 1]; nengel@9: PictureInfo *release_ref[66]; nengel@9: PictureInfo *short_ref[32]; nengel@9: PictureInfo *long_ref[32]; nengel@9: int long_ref_count; nengel@9: int short_ref_count; nengel@9: uint32_t coded_pic_num; nengel@9: int poc_lsb; nengel@9: int poc_msb; nengel@9: uint32_t poc_offset; nengel@9: int delta_poc; nengel@9: int frame_num; nengel@9: int prev_poc_msb; nengel@9: int prev_poc_lsb; nengel@9: int frame_num_offset; nengel@9: int prev_frame_num_offset; nengel@9: int prev_frame_num; nengel@9: int max_pic_num; nengel@9: int redundant_pic_count; nengel@9: int outputed_poc; nengel@9: int ip_id; nengel@9: int b4_stride; nengel@9: int mb_stride; nengel@9: int mb_width; nengel@9: int mb_height; nengel@9: int width; nengel@9: int height; nengel@9: int has_b_frames; nengel@9: SEI_PicStructType sei_pic_struct; nengel@9: int sei_ct_type; nengel@9: int sei_dpb_output_delay; nengel@9: int sei_cpb_removal_delay; nengel@9: int sei_recovery_frame_cnt; nengel@9: int sei_buffering_period_present; nengel@9: int initial_cpb_removal_delay[32]; nengel@9: } NalContext; nengel@9: typedef struct EntropyContext nengel@9: { nengel@9: CABACContext c; nengel@9: H264Mb *m; nengel@9: int top_cbp; nengel@9: int left_cbp; nengel@9: int neighbor_transform_size; nengel@9: uint32_t top_type; nengel@9: uint32_t left_type; nengel@9: uint32_t topright_type; nengel@9: uint32_t topleft_type; nengel@9: int curr_qscale; nengel@9: int chroma_qp[2]; nengel@9: int last_qscale_diff; nengel@9: uint32_t dequant4_buffer[6][52][16]; nengel@9: uint32_t dequant8_buffer[2][52][64]; nengel@9: uint32_t (*dequant4_coeff[6])[16]; nengel@9: uint32_t (*dequant8_coeff[2])[64]; nengel@9: uint8_t (*non_zero_count_top)[8]; nengel@9: uint8_t (*non_zero_count)[8]; nengel@9: uint8_t (*non_zero_count_row[2])[8]; nengel@9: uint8_t __attribute__((aligned(8))) non_zero_count_left[8]; nengel@9: uint8_t (*mvd_top[2])[2]; nengel@9: uint8_t (*mvd[2])[2]; nengel@9: uint8_t (*mvd_table[2][2])[2]; nengel@9: uint8_t *direct_top; nengel@9: uint8_t *direct; nengel@9: uint8_t *direct_table[2]; nengel@9: uint8_t *chroma_pred_mode_top; nengel@9: uint8_t *chroma_pred_mode; nengel@9: uint8_t *chroma_pred_mode_table[2]; nengel@9: uint16_t *cbp_top; nengel@9: uint16_t *cbp; nengel@9: uint16_t *cbp_table[2]; nengel@9: int8_t *qscale_top; nengel@9: int8_t *qscale; nengel@9: int8_t *qscale_table[2]; nengel@9: int8_t *ref_index_top[2]; nengel@9: int8_t *ref_index[2]; nengel@9: int8_t *ref_index_table[2][2]; nengel@9: uint32_t *mb_type_top; nengel@9: uint32_t *mb_type; nengel@9: uint32_t *mb_type_table[2]; nengel@9: int b_stride; nengel@9: int mb_stride; nengel@9: int mb_width; nengel@9: int mb_height; nengel@9: uint8_t *zigzag_scan; nengel@9: uint8_t *zigzag_scan8x8; nengel@9: uint8_t direct_cache[5 * 8]; nengel@9: int8_t __attribute__((aligned(8))) intra4x4_pred_mode_cache[5 * 8]; nengel@9: int16_t __attribute__((aligned(16))) mv_cache[2][5 * 8][2]; nengel@9: int8_t __attribute__((aligned(8))) ref_cache[2][5 * 8]; nengel@9: uint8_t __attribute__((aligned(8))) non_zero_count_cache[6 * 8]; nengel@9: uint8_t __attribute__((aligned(16))) mvd_cache[2][5 * 8][2]; nengel@9: } EntropyContext; nengel@9: typedef struct H264Slice nengel@9: { nengel@9: PPS pps; nengel@9: PictureInfo *current_picture_info; nengel@9: DecodedPicture *curr_pic; nengel@9: int slice_num; nengel@9: int release_ref_cpn[66]; nengel@9: int release_cnt; nengel@9: int qp_thresh; nengel@9: int use_weight; nengel@9: int use_weight_chroma; nengel@9: int luma_log2_weight_denom; nengel@9: int chroma_log2_weight_denom; nengel@9: int16_t luma_weight[16][2][2]; nengel@9: int16_t chroma_weight[16][2][2][2]; nengel@9: int16_t implicit_weight[16][16][2]; nengel@9: int ref_list_cpn[2][16]; nengel@9: PictureInfo *ref_list[2][16]; nengel@9: DecodedPicture *dp_ref_list[2][16]; nengel@9: int ref_count[2]; nengel@9: int slice_type; nengel@9: int slice_type_nos; nengel@9: int slice_alpha_c0_offset; nengel@9: int slice_beta_offset; nengel@9: int direct_8x8_inference_flag; nengel@9: uint8_t list_count; nengel@9: uint32_t coded_pic_num; nengel@9: int poc; nengel@9: int key_frame; nengel@9: int mmco_reset; nengel@9: int ip_id; nengel@9: int transform_bypass; nengel@9: int direct_spatial_mv_pred; nengel@9: int map_col_to_list0[2][16]; nengel@9: int dist_scale_factor[16]; nengel@9: int cabac_init_idc; nengel@9: int nal_ref_idc; nengel@9: int nal_unit_type; nengel@9: int ref2frm[2][64]; nengel@9: int qscale; nengel@9: } H264Slice; nengel@9: typedef struct nengel@9: { nengel@9: H264Slice slice; nengel@9: H264Mb *mbs; nengel@9: DecodedPicture *dp; nengel@9: GetBitContext gb; nengel@9: int lines_taken; nengel@9: int lines_total; nengel@9: int state; nengel@9: int initialized; nengel@9: } SliceBufferEntry; nengel@9: typedef struct RingLineEntry nengel@9: { nengel@9: union nengel@9: { nengel@9: volatile int32_t __attribute__((aligned(64))) mb_cnt; nengel@9: int32_t __attribute__((aligned(64))) pad[16]; nengel@9: }; nengel@9: SliceBufferEntry *sbe; nengel@9: int id; nengel@9: int line; nengel@9: TopBorder *top; nengel@9: struct RingLineEntry *prev_line; nengel@9: } RingLineEntry; nengel@9: typedef struct SuperMBTask nengel@9: { nengel@9: int smb_x; nengel@9: int smb_y; nengel@9: } SuperMBTask; nengel@9: typedef struct SuperMBContext nengel@9: { nengel@9: int nsmb_width; nengel@9: int nsmb_height; nengel@9: int nsmb_3dheight; nengel@9: int smb_width; nengel@9: int smb_height; nengel@9: int refcount; nengel@9: int index; nengel@9: SuperMBTask *smbs[2]; nengel@9: } SuperMBContext; nengel@9: typedef struct MBRecState nengel@9: { nengel@9: int8_t *ref_index_top[2]; nengel@9: int8_t *ref_index[2]; nengel@9: int16_t (*motion_val_top[2])[2]; nengel@9: int16_t (*motion_val[2])[2]; nengel@9: uint32_t *mb_type_top; nengel@9: uint32_t *mb_type; nengel@9: int8_t *list1_ref_index[2]; nengel@9: int16_t (*list1_motion_val[2])[2]; nengel@9: uint32_t *list1_mb_type; nengel@9: int8_t *intra4x4_pred_mode_top; nengel@9: int8_t *intra4x4_pred_mode; nengel@9: int8_t *non_zero_count_top; nengel@9: int8_t *non_zero_count; nengel@9: unsigned int topleft_samples_available; nengel@9: unsigned int topright_samples_available; nengel@9: unsigned int top_samples_available; nengel@9: unsigned int left_samples_available; nengel@9: int top_type; nengel@9: int left_type; nengel@9: int8_t __attribute__((aligned(8))) intra4x4_pred_mode_cache[5 * 8]; nengel@9: int16_t __attribute__((aligned(16))) mv_cache[2][5 * 8][2]; nengel@9: int8_t __attribute__((aligned(8))) ref_cache[2][5 * 8]; nengel@9: uint8_t __attribute__((aligned(8))) non_zero_count_cache[6 * 8]; nengel@9: uint8_t __attribute__((aligned(16))) mvd_cache[2][5 * 8][2]; nengel@9: int16_t __attribute__((aligned(8))) bS[2][4][4]; nengel@9: uint8_t edges[2]; nengel@9: } MBRecState; nengel@9: typedef struct MBRecContext nengel@9: { nengel@9: DSPContext dsp; nengel@9: H264DSPContext hdsp; nengel@9: H264PredContext hpc; nengel@9: MBRecState *mrs; nengel@9: RingLineEntry *rle; nengel@9: uint8_t *scratchpad_y; nengel@9: uint8_t *scratchpad_cb; nengel@9: uint8_t *scratchpad_cr; nengel@9: int linesize; nengel@9: int uvlinesize; nengel@9: int mb_width; nengel@9: int mb_height; nengel@9: int mb_stride; nengel@9: int b_stride; nengel@9: int width; nengel@9: int height; nengel@9: int block_offset[16 + 8]; nengel@9: } MBRecContext; nengel@9: typedef struct OutputContext nengel@9: { nengel@9: int bit_buffer_size; nengel@9: uint8_t *bit_buffer; nengel@9: uint64_t video_size; nengel@9: int frame_number; nengel@9: DecodedPicture *delayed_pic[33]; nengel@9: int dp_cnt; nengel@9: } OutputContext; nengel@9: typedef struct nengel@9: { nengel@9: pthread_mutex_t lock; nengel@9: pthread_cond_t cond; nengel@9: SliceBufferEntry **queue; nengel@9: int size; nengel@9: int cnt; nengel@9: int fi; nengel@9: int fo; nengel@9: } SliceBufferQueue; nengel@9: typedef struct nengel@9: { nengel@9: pthread_mutex_t wslock; nengel@9: pthread_cond_t wscond; nengel@9: pthread_mutex_t swlock; nengel@9: pthread_cond_t swcond; nengel@9: RingLineEntry **queue; nengel@9: int size; nengel@9: int ready; nengel@9: int free; nengel@9: int fi; nengel@9: int fo; nengel@9: } RingLineQueue; nengel@9: typedef struct H264Context nengel@9: { nengel@9: SliceBufferQueue sb_q[STAGES]; nengel@9: RingLineQueue rl_q; nengel@9: pthread_mutex_t lock[STAGES]; nengel@9: pthread_cond_t cond[STAGES]; nengel@9: pthread_mutex_t task_lock; nengel@9: pthread_cond_t task_cond; nengel@9: pthread_attr_t ed_rec_attr[80]; nengel@9: pthread_t ed_rec_thr[80]; nengel@9: int init_threads; nengel@9: pthread_mutex_t ilock; nengel@9: pthread_cond_t icond; nengel@9: const char *file_name; nengel@9: int profile; nengel@9: int start; nengel@9: int touch_start; nengel@9: int setaff; nengel@9: int touch_done; nengel@9: int rl_side_touch; nengel@9: int statmbd; nengel@9: pthread_mutex_t slock; nengel@9: pthread_cond_t scond; nengel@9: pthread_mutex_t tlock; nengel@9: pthread_cond_t tcond; nengel@9: pthread_mutex_t tdlock; nengel@9: pthread_cond_t tdcond; nengel@9: int ed_ppe_threads; nengel@9: int threads; nengel@9: int smt; nengel@9: int acdpb_cnt; nengel@9: int reldpb_cnt; nengel@9: int sb_size; nengel@9: SliceBufferEntry *sb; nengel@9: int free_sb_cnt; nengel@9: int slice_bufs; nengel@9: int max_dpb_cnt; nengel@9: DecodedPicture *dpb; nengel@9: int free_dpb_cnt; nengel@9: int ifile; nengel@9: int ofile; nengel@9: int frame_width; nengel@9: int frame_height; nengel@9: int num_frames; nengel@9: int width; nengel@9: int height; nengel@9: int mb_width; nengel@9: int mb_height; nengel@9: int mb_stride; nengel@9: int b4_stride; nengel@9: int b_stride; nengel@9: int smb_height; nengel@9: int smb_width; nengel@9: pthread_mutex_t smb_lock; nengel@9: pthread_cond_t sdl_cond; nengel@9: pthread_mutex_t sdl_lock; nengel@9: SuperMBContext *smbc; nengel@9: int wave_order; nengel@9: int static_3d; nengel@9: int pipe_bufs; nengel@9: uint8_t zigzag_scan[16]; nengel@9: uint8_t zigzag_scan8x8[64]; nengel@9: int verbose; nengel@9: int no_mbd; nengel@9: int display; nengel@9: int fullscreen; nengel@9: int quit; nengel@9: struct timespec start_time[PROFILE_STAGES]; nengel@9: struct timespec end_time[PROFILE_STAGES]; nengel@9: double last_time[PROFILE_STAGES]; nengel@9: double total_time[PROFILE_STAGES]; nengel@9: } H264Context; nengel@9: void av_read_frame_internal(ParserContext *pc, GetBitContext *gb); nengel@9: ParserContext *get_parse_context(int ifile); nengel@9: void free_parse_context(ParserContext *pc); nengel@9: int decode_nal_units(NalContext *n, H264Slice *s, GetBitContext *gb); nengel@9: NalContext *get_nal_context(int width, int height); nengel@9: void free_nal_context(NalContext *nc); nengel@9: int ff_h264_decode_mb_cabac(EntropyContext *ec, H264Slice *s, CABACContext *c); nengel@9: void ff_h264_init_cabac_states(EntropyContext *ec, H264Slice *s, CABACContext *c); nengel@9: int init_entropy_buf(EntropyContext *ec, H264Slice *s, int line); nengel@9: EntropyContext *get_entropy_context(H264Context *h); nengel@9: void init_dequant_tables(H264Slice *s, EntropyContext *ec); nengel@9: void free_entropy_context(EntropyContext *ec); nengel@9: MBRecContext *get_mbrec_context(H264Context *h); nengel@9: void free_mbrec_context(MBRecContext *d); nengel@9: void h264_decode_mb_internal(MBRecContext *d, MBRecState *mrs, H264Slice *s, H264Mb *m); nengel@9: void init_mbrec_context(MBRecContext *mrc, MBRecState *mrs, H264Slice *s, int line); nengel@9: void ff_h264_pred_direct_motion_rec(MBRecContext *mrc, MBRecState *mrs, H264Slice *s, int *mb_type); nengel@9: int pred_motion_mb_rec(MBRecContext *mrc, MBRecState *mrs, H264Slice *s, H264Mb *m); nengel@9: void start_timer(H264Context *h, int stage); nengel@9: void stop_timer(H264Context *h, int stage); nengel@9: void init_sb_entry(H264Context *h, SliceBufferEntry *sbe); nengel@9: void free_sb_entry(SliceBufferEntry *sb); nengel@9: SliceBufferEntry *get_sb_entry(H264Context *h); nengel@9: void release_sb_entry(H264Context *h, SliceBufferEntry *sb); nengel@9: DecodedPicture *get_dpb_entry(H264Context *h, H264Slice *s); nengel@9: void release_dpb_entry(H264Context *h, DecodedPicture *pic, int mode); nengel@9: void draw_edges(MBRecContext *d, H264Slice *s, int line); nengel@9: int ff_init_slice(NalContext *n, H264Slice *s); nengel@9: void free_picture(PictureInfo *pic); nengel@9: void free_dp(DecodedPicture *pic); nengel@9: void av_start_timer(); nengel@9: int copyEDtoH264Slice(H264Slice *ms, H264Slice *es); nengel@9: void print_report(int frame_number, uint64_t video_size, int is_last_report, int verbose); nengel@9: int ff_alloc_picture_info(NalContext *n, H264Slice *s, PictureInfo *pic); nengel@9: DecodedPicture *output_frame(H264Context *h, OutputContext *oc, DecodedPicture *pic, int fd, int frame_width, int frame_height); nengel@9: OutputContext *get_output_context(H264Context *h); nengel@9: void free_output_context(OutputContext *oc); nengel@9: void freeSuperMBContext(SuperMBContext *smbc); nengel@9: SuperMBContext *getSuperMBContext(H264Context *h, int smb_width, int smb_height); nengel@9: void release_smbc(H264Context *h, SuperMBContext *smbc); nengel@9: SuperMBContext *acquire_smbc(H264Context *h); nengel@9: static inline int get_chroma_qp(H264Slice *s, int t, int qscale) nengel@9: { nengel@9: return s->pps.chroma_qp_table[t][qscale]; nengel@9: } nengel@9: static void parse_task(H264Context *h, ParserContext *pc, NalContext *nc, SliceBufferEntry *sbe) nengel@9: { nengel@9: H264Slice *s; nengel@9: if (!sbe->initialized) nengel@9: { nengel@9: init_sb_entry(h, sbe); nengel@9: sbe->lines_total = h->mb_height; nengel@9: } nengel@9: av_read_frame_internal(pc, &sbe->gb); nengel@9: s = &sbe->slice; nengel@9: decode_nal_units(nc, s, &sbe->gb); nengel@9: } nengel@9: static void decode_slice_entropy_task(H264Context *h, EntropyContext *ec, SliceBufferEntry *sbe) nengel@9: { nengel@9: int i, j; nengel@9: H264Slice *s = &sbe->slice; nengel@9: GetBitContext *gb = &sbe->gb; nengel@9: H264Mb *mbs = sbe->mbs; nengel@9: CABACContext *c = &ec->c; nengel@9: if (!s->pps.cabac) nengel@9: { nengel@9: av_log(16, "Only cabac encoded streams are supported\n"); nengel@9: return; nengel@9: } nengel@9: init_dequant_tables(s, ec); nengel@9: ec->curr_qscale = s->qscale; nengel@9: ec->last_qscale_diff = 0; nengel@9: ec->chroma_qp[0] = get_chroma_qp((H264Slice *) s, 0, s->qscale); nengel@9: ec->chroma_qp[1] = get_chroma_qp((H264Slice *) s, 1, s->qscale); nengel@9: align_get_bits(gb); nengel@9: ff_init_cabac_decoder(c, gb->buffer + get_bits_count(gb) / 8, (get_bits_left(gb) + 7) / 8); nengel@9: ff_h264_init_cabac_states(ec, s, c); nengel@9: for (j = 0; nengel@9: j < ec->mb_height; nengel@9: j++) nengel@9: { nengel@9: init_entropy_buf(ec, s, j); nengel@9: for (i = 0; nengel@9: i < ec->mb_width; nengel@9: i++) nengel@9: { nengel@9: int eos, ret; nengel@9: H264Mb *m = &mbs[i + j * ec->mb_width]; nengel@9: m->mb_x = i; nengel@9: m->mb_y = j; nengel@9: ec->m = m; nengel@9: ret = ff_h264_decode_mb_cabac(ec, s, c); nengel@9: eos = get_cabac_terminate(c); nengel@9: (void) eos; nengel@9: if (ret < 0 || c->bytestream > c->bytestream_end + 2) nengel@9: { nengel@9: av_log(16, "error while decoding MB %d %d, bytestream (%td)\n", m->mb_x, m->mb_y, c->bytestream_end - c->bytestream); nengel@9: return; nengel@9: } nengel@9: } nengel@9: } nengel@9: } nengel@9: static void decode_super_mb_block(MBRecContext *d, H264Slice *s, SuperMBContext *smbc, H264Mb *mbs, int smb_x, int smb_y) nengel@9: { nengel@9: MBRecState mrs; nengel@9: for (int k = 0, i = smb_y; nengel@9: i < smb_y + smbc->smb_height; nengel@9: i++ , k++) nengel@9: { nengel@9: init_mbrec_context(d, &mrs, s, i); nengel@9: for (int j = smb_x - k; nengel@9: j < smb_x - k + smbc->smb_width; nengel@9: j++) nengel@9: { nengel@9: if (i < d->mb_height && j >= 0 && j < d->mb_width) nengel@9: { nengel@9: h264_decode_mb_internal(d, &mrs, s, &mbs[i * d->mb_width + j]); nengel@9: } nengel@9: } nengel@9: } nengel@9: } nengel@9: static void decode_super_mb_task(MBRecContext *d, SliceBufferEntry *sbe, SuperMBContext *smbc, SuperMBTask *ml, SuperMBTask *mur, SuperMBTask *m) nengel@9: { nengel@9: H264Slice *s = &sbe->slice; nengel@9: H264Mb *mbs = sbe->mbs; nengel@9: decode_super_mb_block(d, s, smbc, mbs, m->smb_x, m->smb_y); nengel@9: } nengel@9: static void draw_edges_task(MBRecContext *d, SliceBufferEntry *sbe, SuperMBContext *smbc, SuperMBTask *sm, int line) nengel@9: { nengel@9: H264Slice *s = &sbe->slice; nengel@9: for (int i = line * smbc->smb_height; nengel@9: i < (line + 1) * smbc->smb_height && i < d->mb_height; nengel@9: i++) nengel@9: draw_edges(d, s, i); nengel@9: } nengel@9: typedef struct _nx_data_env_0_t_tag nengel@9: { nengel@9: struct MBRecContext *__tmp_0_0; nengel@9: SliceBufferEntry *__tmp_1_0; nengel@9: struct SuperMBContext *__tmp_2_0; nengel@9: struct SuperMBTask *__tmp_3_0; nengel@9: struct SuperMBTask *__tmp_4_0; nengel@9: struct SuperMBTask *__tmp_5_0; nengel@9: } _nx_data_env_0_t; nengel@9: static void decode_mb_in_slice(H264Context *h, MBRecContext *d, SliceBufferEntry *sbe); nengel@9: static void _smp__ol_decode_mb_in_slice_0(_nx_data_env_0_t *const __restrict__ _args) nengel@9: { nengel@9: struct MBRecContext *___tmp_0_0 = _args->__tmp_0_0; nengel@9: SliceBufferEntry *___tmp_1_0 = _args->__tmp_1_0; nengel@9: struct SuperMBContext *___tmp_2_0 = _args->__tmp_2_0; nengel@9: struct SuperMBTask *___tmp_3_0 = _args->__tmp_3_0; nengel@9: struct SuperMBTask *___tmp_4_0 = _args->__tmp_4_0; nengel@9: struct SuperMBTask *___tmp_5_0 = _args->__tmp_5_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: decode_super_mb_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0), (___tmp_4_0), (___tmp_5_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_1_t_tag nengel@9: { nengel@9: struct MBRecContext *__tmp_0_0; nengel@9: SliceBufferEntry *__tmp_1_0; nengel@9: struct SuperMBContext *__tmp_2_0; nengel@9: struct SuperMBTask *__tmp_3_0; nengel@9: int __tmp_4_0; nengel@9: } _nx_data_env_1_t; nengel@9: static void decode_mb_in_slice(H264Context *h, MBRecContext *d, SliceBufferEntry *sbe); nengel@9: static void _smp__ol_decode_mb_in_slice_1(_nx_data_env_1_t *const __restrict__ _args) nengel@9: { nengel@9: struct MBRecContext *___tmp_0_0 = _args->__tmp_0_0; nengel@9: SliceBufferEntry *___tmp_1_0 = _args->__tmp_1_0; nengel@9: struct SuperMBContext *___tmp_2_0 = _args->__tmp_2_0; nengel@9: struct SuperMBTask *___tmp_3_0 = _args->__tmp_3_0; nengel@9: int ___tmp_4_0 = _args->__tmp_4_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: draw_edges_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0), (___tmp_4_0)); nengel@9: } nengel@9: } nengel@9: static void decode_mb_in_slice(H264Context *h, MBRecContext *d, SliceBufferEntry *sbe) nengel@9: { nengel@9: int i, j; nengel@9: SuperMBContext *smbc = acquire_smbc(h); nengel@9: int smb_height = smbc->nsmb_height, smb_width = smbc->nsmb_width; nengel@9: SuperMBTask *smbs = smbc->smbs[0]; nengel@9: SuperMBTask *sm = ((void *) 0), *sml, *smur; nengel@9: for (j = 0; nengel@9: j < smb_height; nengel@9: j++) nengel@9: { nengel@9: for (i = 0; nengel@9: i < smb_width; nengel@9: i++) nengel@9: { nengel@9: sm = smbs + j * smb_width + i; nengel@9: sml = sm - ((i > 0) ? 1 : 0); nengel@9: smur = sm + (((i < smb_width - 1) && (j > 0)) ? - smb_width + 1 : 0); nengel@9: { nengel@9: struct MBRecContext *__tmp_0 = d; nengel@9: SliceBufferEntry *__tmp_1 = sbe; nengel@9: struct SuperMBContext *__tmp_2 = smbc; nengel@9: struct SuperMBTask *__tmp_3 = sml; nengel@9: struct SuperMBTask *__tmp_4 = smur; nengel@9: struct SuperMBTask *__tmp_5 = sm; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_decode_mb_in_slice_0_smp_args = {(void (*)(void *)) _smp__ol_decode_mb_in_slice_0}; nengel@9: _nx_data_env_0_t *ol_args = (_nx_data_env_0_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_0_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_decode_mb_in_slice_0_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_0_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: ol_args->__tmp_4_0 = __tmp_4; nengel@9: ol_args->__tmp_5_0 = __tmp_5; nengel@9: nanos_dependence_t _dependences[5] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) ol_args->__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_4_0, nengel@9: ((char *) ((__tmp_4)) - (char *) ol_args->__tmp_4_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_5_0, nengel@9: ((char *) ((__tmp_5)) - (char *) ol_args->__tmp_5_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 5, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_0_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: imm_args.__tmp_4_0 = __tmp_4; nengel@9: imm_args.__tmp_5_0 = __tmp_5; nengel@9: nanos_dependence_t _dependences[5] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) imm_args.__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_4_0, nengel@9: ((char *) ((__tmp_4)) - (char *) imm_args.__tmp_4_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_5_0, nengel@9: ((char *) ((__tmp_5)) - (char *) imm_args.__tmp_5_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_0_t), &imm_args, 5, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: } nengel@9: { nengel@9: struct MBRecContext *__tmp_0 = d; nengel@9: SliceBufferEntry *__tmp_1 = sbe; nengel@9: struct SuperMBContext *__tmp_2 = smbc; nengel@9: struct SuperMBTask *__tmp_3 = sm; nengel@9: int __tmp_4 = j; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_decode_mb_in_slice_1_smp_args = {(void (*)(void *)) _smp__ol_decode_mb_in_slice_1}; nengel@9: _nx_data_env_1_t *ol_args = (_nx_data_env_1_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_1_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_decode_mb_in_slice_1_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_1_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: ol_args->__tmp_4_0 = __tmp_4; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) ol_args->__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 3, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_1_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: imm_args.__tmp_4_0 = __tmp_4; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) imm_args.__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_1_t), &imm_args, 3, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: } nengel@9: { nengel@9: struct _dependence_holder nengel@9: { nengel@9: struct SuperMBTask *dep_0; nengel@9: } _dep_holder = {&(*sm)}; nengel@9: nanos_dependence_t _wait_dependences[1] = {{ nengel@9: (void **) &_dep_holder.dep_0, nengel@9: ((char *) ((sm)) - (char *) _dep_holder.dep_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: sizeof (*sm) nengel@9: }}; nengel@9: nanos_wait_on(1, _wait_dependences); nengel@9: } nengel@9: release_smbc(h, smbc); nengel@9: } nengel@9: __attribute__((weak)) nanos_lock_t _nx_u_dpb_critical_lock = {NANOS_LOCK_FREE}; nengel@9: static void decode_slice_mb_task(H264Context *h, MBRecContext *d, SliceBufferEntry *sbe) nengel@9: { nengel@9: H264Slice *s = &sbe->slice; nengel@9: for (int i = 0; nengel@9: i < 2; nengel@9: i++) nengel@9: { nengel@9: for (int j = 0; nengel@9: j < s->ref_count[i]; nengel@9: j++) nengel@9: { nengel@9: if (s->ref_list_cpn[i][j] == - 1) nengel@9: continue; nengel@9: int k; nengel@9: for (k = 0; nengel@9: k < h->max_dpb_cnt; nengel@9: k++) nengel@9: { nengel@9: if (h->dpb[k].reference >= 2 && h->dpb[k].cpn == s->ref_list_cpn[i][j]) nengel@9: { nengel@9: s->dp_ref_list[i][j] = &h->dpb[k]; nengel@9: break; nengel@9: } nengel@9: } nengel@9: } nengel@9: } nengel@9: { nengel@9: nanos_set_lock(&_nx_u_dpb_critical_lock); nengel@9: get_dpb_entry(h, s); nengel@9: nanos_unset_lock(&_nx_u_dpb_critical_lock); nengel@9: } nengel@9: if (!h->no_mbd) nengel@9: { nengel@9: decode_mb_in_slice(h, d, sbe); nengel@9: } nengel@9: for (int i = 0; nengel@9: i < s->release_cnt; nengel@9: i++) nengel@9: { nengel@9: for (int j = 0; nengel@9: j < h->max_dpb_cnt; nengel@9: j++) nengel@9: { nengel@9: if (h->dpb[j].cpn == s->release_ref_cpn[i]) nengel@9: { nengel@9: { nengel@9: nanos_set_lock(&_nx_u_dpb_critical_lock); nengel@9: release_dpb_entry(h, &h->dpb[j], 2); nengel@9: nanos_unset_lock(&_nx_u_dpb_critical_lock); nengel@9: } nengel@9: break; nengel@9: } nengel@9: } nengel@9: } nengel@9: s->release_cnt = 0; nengel@9: } nengel@9: static void decode_3dwave_super_mb_task(MBRecContext *d, SliceBufferEntry *sbe, SuperMBContext *smbc, SuperMBTask *ml, SuperMBTask *mur, SuperMBTask *mprev, SuperMBTask *m) nengel@9: { nengel@9: H264Slice *s = &sbe->slice; nengel@9: H264Mb *mbs = sbe->mbs; nengel@9: decode_super_mb_block(d, s, smbc, mbs, m->smb_x, m->smb_y); nengel@9: } nengel@9: static void init_ref_list_and_get_dpb_task(H264Context *h, MBRecContext *d, SliceBufferEntry *sbe, int *init) nengel@9: { nengel@9: H264Slice *s = &sbe->slice; nengel@9: for (int i = 0; nengel@9: i < 2; nengel@9: i++) nengel@9: { nengel@9: for (int j = 0; nengel@9: j < s->ref_count[i]; nengel@9: j++) nengel@9: { nengel@9: if (s->ref_list_cpn[i][j] == - 1) nengel@9: continue; nengel@9: int k; nengel@9: for (k = 0; nengel@9: k < h->max_dpb_cnt; nengel@9: k++) nengel@9: { nengel@9: if (h->dpb[k].reference >= 2 && h->dpb[k].cpn == s->ref_list_cpn[i][j]) nengel@9: { nengel@9: s->dp_ref_list[i][j] = &h->dpb[k]; nengel@9: break; nengel@9: } nengel@9: } nengel@9: } nengel@9: } nengel@9: { nengel@9: nanos_set_lock(&_nx_u_dpb_critical_lock); nengel@9: get_dpb_entry(h, s); nengel@9: nanos_unset_lock(&_nx_u_dpb_critical_lock); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_2_t_tag nengel@9: { nengel@9: struct MBRecContext *__tmp_0_0; nengel@9: SliceBufferEntry *__tmp_1_0; nengel@9: struct SuperMBContext *__tmp_2_0; nengel@9: struct SuperMBTask *__tmp_3_0; nengel@9: struct SuperMBTask *__tmp_4_0; nengel@9: struct SuperMBTask *__tmp_5_0; nengel@9: struct SuperMBTask *__tmp_6_0; nengel@9: } _nx_data_env_2_t; nengel@9: static SuperMBTask *add_decode_slice_3dwave_tasks(MBRecContext *d, SliceBufferEntry *sbe, SuperMBContext *smbc); nengel@9: static void _smp__ol_add_decode_slice_3dwave_tasks_2(_nx_data_env_2_t *const __restrict__ _args) nengel@9: { nengel@9: struct MBRecContext *___tmp_0_0 = _args->__tmp_0_0; nengel@9: SliceBufferEntry *___tmp_1_0 = _args->__tmp_1_0; nengel@9: struct SuperMBContext *___tmp_2_0 = _args->__tmp_2_0; nengel@9: struct SuperMBTask *___tmp_3_0 = _args->__tmp_3_0; nengel@9: struct SuperMBTask *___tmp_4_0 = _args->__tmp_4_0; nengel@9: struct SuperMBTask *___tmp_5_0 = _args->__tmp_5_0; nengel@9: struct SuperMBTask *___tmp_6_0 = _args->__tmp_6_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: decode_3dwave_super_mb_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0), (___tmp_4_0), (___tmp_5_0), (___tmp_6_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_3_t_tag nengel@9: { nengel@9: struct MBRecContext *__tmp_0_0; nengel@9: SliceBufferEntry *__tmp_1_0; nengel@9: struct SuperMBContext *__tmp_2_0; nengel@9: struct SuperMBTask *__tmp_3_0; nengel@9: int __tmp_4_0; nengel@9: } _nx_data_env_3_t; nengel@9: static SuperMBTask *add_decode_slice_3dwave_tasks(MBRecContext *d, SliceBufferEntry *sbe, SuperMBContext *smbc); nengel@9: static void _smp__ol_add_decode_slice_3dwave_tasks_3(_nx_data_env_3_t *const __restrict__ _args) nengel@9: { nengel@9: struct MBRecContext *___tmp_0_0 = _args->__tmp_0_0; nengel@9: SliceBufferEntry *___tmp_1_0 = _args->__tmp_1_0; nengel@9: struct SuperMBContext *___tmp_2_0 = _args->__tmp_2_0; nengel@9: struct SuperMBTask *___tmp_3_0 = _args->__tmp_3_0; nengel@9: int ___tmp_4_0 = _args->__tmp_4_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: draw_edges_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0), (___tmp_4_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_4_t_tag nengel@9: { nengel@9: struct MBRecContext *__tmp_0_0; nengel@9: SliceBufferEntry *__tmp_1_0; nengel@9: struct SuperMBContext *__tmp_2_0; nengel@9: struct SuperMBTask *__tmp_3_0; nengel@9: struct SuperMBTask *__tmp_4_0; nengel@9: struct SuperMBTask *__tmp_5_0; nengel@9: } _nx_data_env_4_t; nengel@9: static SuperMBTask *add_decode_slice_3dwave_tasks(MBRecContext *d, SliceBufferEntry *sbe, SuperMBContext *smbc); nengel@9: static void _smp__ol_add_decode_slice_3dwave_tasks_4(_nx_data_env_4_t *const __restrict__ _args) nengel@9: { nengel@9: struct MBRecContext *___tmp_0_0 = _args->__tmp_0_0; nengel@9: SliceBufferEntry *___tmp_1_0 = _args->__tmp_1_0; nengel@9: struct SuperMBContext *___tmp_2_0 = _args->__tmp_2_0; nengel@9: struct SuperMBTask *___tmp_3_0 = _args->__tmp_3_0; nengel@9: struct SuperMBTask *___tmp_4_0 = _args->__tmp_4_0; nengel@9: struct SuperMBTask *___tmp_5_0 = _args->__tmp_5_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: decode_super_mb_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0), (___tmp_4_0), (___tmp_5_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_5_t_tag nengel@9: { nengel@9: struct MBRecContext *__tmp_0_0; nengel@9: SliceBufferEntry *__tmp_1_0; nengel@9: struct SuperMBContext *__tmp_2_0; nengel@9: struct SuperMBTask *__tmp_3_0; nengel@9: int __tmp_4_0; nengel@9: } _nx_data_env_5_t; nengel@9: static SuperMBTask *add_decode_slice_3dwave_tasks(MBRecContext *d, SliceBufferEntry *sbe, SuperMBContext *smbc); nengel@9: static void _smp__ol_add_decode_slice_3dwave_tasks_5(_nx_data_env_5_t *const __restrict__ _args) nengel@9: { nengel@9: struct MBRecContext *___tmp_0_0 = _args->__tmp_0_0; nengel@9: SliceBufferEntry *___tmp_1_0 = _args->__tmp_1_0; nengel@9: struct SuperMBContext *___tmp_2_0 = _args->__tmp_2_0; nengel@9: struct SuperMBTask *___tmp_3_0 = _args->__tmp_3_0; nengel@9: int ___tmp_4_0 = _args->__tmp_4_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: draw_edges_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0), (___tmp_4_0)); nengel@9: } nengel@9: } nengel@9: static SuperMBTask *add_decode_slice_3dwave_tasks(MBRecContext *d, SliceBufferEntry *sbe, SuperMBContext *smbc) nengel@9: { nengel@9: int i, j; nengel@9: int smb_3d_height = smbc->nsmb_3dheight; nengel@9: int smb_height = smbc->nsmb_height, smb_width = smbc->nsmb_width; nengel@9: int smb_diff_prev = smb_height - smb_3d_height; nengel@9: SuperMBTask *sm = ((void *) 0), *sml, *smur, *smprev; nengel@9: SuperMBTask *smbs = smbc->smbs[smbc->index++]; nengel@9: smbc->index %= 2; nengel@9: SuperMBTask *smbs_prev = smbc->smbs[smbc->index]; nengel@9: for (j = 0; nengel@9: j < smb_3d_height; nengel@9: j++) nengel@9: { nengel@9: for (i = 0; nengel@9: i < smb_width; nengel@9: i++) nengel@9: { nengel@9: sm = smbs + j * smb_width + i; nengel@9: sml = sm - ((i > 0) ? 1 : 0); nengel@9: smur = sm + (((i < smb_width - 1) && (j > 0)) ? - smb_width + 1 : 0); nengel@9: smprev = smbs_prev + (j + smb_diff_prev + 1) * smb_width - 1; nengel@9: { nengel@9: struct MBRecContext *__tmp_0 = d; nengel@9: SliceBufferEntry *__tmp_1 = sbe; nengel@9: struct SuperMBContext *__tmp_2 = smbc; nengel@9: struct SuperMBTask *__tmp_3 = sml; nengel@9: struct SuperMBTask *__tmp_4 = smur; nengel@9: struct SuperMBTask *__tmp_5 = smprev; nengel@9: struct SuperMBTask *__tmp_6 = sm; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_add_decode_slice_3dwave_tasks_2_smp_args = {(void (*)(void *)) _smp__ol_add_decode_slice_3dwave_tasks_2}; nengel@9: _nx_data_env_2_t *ol_args = (_nx_data_env_2_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_2_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_add_decode_slice_3dwave_tasks_2_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_2_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: ol_args->__tmp_4_0 = __tmp_4; nengel@9: ol_args->__tmp_5_0 = __tmp_5; nengel@9: ol_args->__tmp_6_0 = __tmp_6; nengel@9: nanos_dependence_t _dependences[6] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) ol_args->__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_4_0, nengel@9: ((char *) ((__tmp_4)) - (char *) ol_args->__tmp_4_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_5_0, nengel@9: ((char *) ((__tmp_5)) - (char *) ol_args->__tmp_5_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_6_0, nengel@9: ((char *) ((__tmp_6)) - (char *) ol_args->__tmp_6_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 6, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_2_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: imm_args.__tmp_4_0 = __tmp_4; nengel@9: imm_args.__tmp_5_0 = __tmp_5; nengel@9: imm_args.__tmp_6_0 = __tmp_6; nengel@9: nanos_dependence_t _dependences[6] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) imm_args.__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_4_0, nengel@9: ((char *) ((__tmp_4)) - (char *) imm_args.__tmp_4_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_5_0, nengel@9: ((char *) ((__tmp_5)) - (char *) imm_args.__tmp_5_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_6_0, nengel@9: ((char *) ((__tmp_6)) - (char *) imm_args.__tmp_6_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_2_t), &imm_args, 6, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: } nengel@9: { nengel@9: struct MBRecContext *__tmp_0 = d; nengel@9: SliceBufferEntry *__tmp_1 = sbe; nengel@9: struct SuperMBContext *__tmp_2 = smbc; nengel@9: struct SuperMBTask *__tmp_3 = sm; nengel@9: int __tmp_4 = j; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_add_decode_slice_3dwave_tasks_3_smp_args = {(void (*)(void *)) _smp__ol_add_decode_slice_3dwave_tasks_3}; nengel@9: _nx_data_env_3_t *ol_args = (_nx_data_env_3_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_3_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_add_decode_slice_3dwave_tasks_3_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_3_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: ol_args->__tmp_4_0 = __tmp_4; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) ol_args->__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 3, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_3_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: imm_args.__tmp_4_0 = __tmp_4; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) imm_args.__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_3_t), &imm_args, 3, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: } nengel@9: for (; nengel@9: j < smb_height; nengel@9: j++) nengel@9: { nengel@9: for (i = 0; nengel@9: i < smb_width; nengel@9: i++) nengel@9: { nengel@9: sm = smbs + j * smb_width + i; nengel@9: sml = sm - ((i > 0) ? 1 : 0); nengel@9: smur = sm + (((i < smb_width - 1) && (j > 0)) ? - smb_width + 1 : 0); nengel@9: { nengel@9: struct MBRecContext *__tmp_0 = d; nengel@9: SliceBufferEntry *__tmp_1 = sbe; nengel@9: struct SuperMBContext *__tmp_2 = smbc; nengel@9: struct SuperMBTask *__tmp_3 = sml; nengel@9: struct SuperMBTask *__tmp_4 = smur; nengel@9: struct SuperMBTask *__tmp_5 = sm; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_add_decode_slice_3dwave_tasks_4_smp_args = {(void (*)(void *)) _smp__ol_add_decode_slice_3dwave_tasks_4}; nengel@9: _nx_data_env_4_t *ol_args = (_nx_data_env_4_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_4_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_add_decode_slice_3dwave_tasks_4_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_4_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: ol_args->__tmp_4_0 = __tmp_4; nengel@9: ol_args->__tmp_5_0 = __tmp_5; nengel@9: nanos_dependence_t _dependences[5] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) ol_args->__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_4_0, nengel@9: ((char *) ((__tmp_4)) - (char *) ol_args->__tmp_4_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_5_0, nengel@9: ((char *) ((__tmp_5)) - (char *) ol_args->__tmp_5_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 5, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_4_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: imm_args.__tmp_4_0 = __tmp_4; nengel@9: imm_args.__tmp_5_0 = __tmp_5; nengel@9: nanos_dependence_t _dependences[5] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) imm_args.__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_4_0, nengel@9: ((char *) ((__tmp_4)) - (char *) imm_args.__tmp_4_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_5_0, nengel@9: ((char *) ((__tmp_5)) - (char *) imm_args.__tmp_5_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_4_t), &imm_args, 5, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: } nengel@9: { nengel@9: struct MBRecContext *__tmp_0 = d; nengel@9: SliceBufferEntry *__tmp_1 = sbe; nengel@9: struct SuperMBContext *__tmp_2 = smbc; nengel@9: struct SuperMBTask *__tmp_3 = sm; nengel@9: int __tmp_4 = j; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_add_decode_slice_3dwave_tasks_5_smp_args = {(void (*)(void *)) _smp__ol_add_decode_slice_3dwave_tasks_5}; nengel@9: _nx_data_env_5_t *ol_args = (_nx_data_env_5_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_5_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_add_decode_slice_3dwave_tasks_5_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_5_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: ol_args->__tmp_4_0 = __tmp_4; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) ol_args->__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 3, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_5_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: imm_args.__tmp_4_0 = __tmp_4; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_0_0, nengel@9: ((char *) ((__tmp_0)) - (char *) imm_args.__tmp_0_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_5_t), &imm_args, 3, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: } nengel@9: return sm; nengel@9: } nengel@9: static void release_ref_list_task(H264Context *h, SuperMBContext *smbc, MBRecContext *d, SliceBufferEntry *sbe, SuperMBTask *lastsmb, int *release) nengel@9: { nengel@9: H264Slice *s = &sbe->slice; nengel@9: for (int i = 0; nengel@9: i < s->release_cnt; nengel@9: i++) nengel@9: { nengel@9: for (int j = 0; nengel@9: j < h->max_dpb_cnt; nengel@9: j++) nengel@9: { nengel@9: if (h->dpb[j].cpn == s->release_ref_cpn[i]) nengel@9: { nengel@9: { nengel@9: nanos_set_lock(&_nx_u_dpb_critical_lock); nengel@9: release_dpb_entry(h, &h->dpb[j], 2); nengel@9: nanos_unset_lock(&_nx_u_dpb_critical_lock); nengel@9: } nengel@9: break; nengel@9: } nengel@9: } nengel@9: } nengel@9: s->release_cnt = 0; nengel@9: release_smbc(h, smbc); nengel@9: } nengel@9: static void output_task(H264Context *h, OutputContext *oc, SliceBufferEntry *sbe) nengel@9: { nengel@9: DecodedPicture *out = output_frame(h, oc, sbe->slice.curr_pic, h->ofile, h->frame_width, h->frame_height); nengel@9: if (out) nengel@9: { nengel@9: { nengel@9: nanos_set_lock(&_nx_u_dpb_critical_lock); nengel@9: release_dpb_entry(h, out, 1); nengel@9: nanos_unset_lock(&_nx_u_dpb_critical_lock); nengel@9: } nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_6_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct ParserContext *__tmp_1_0; nengel@9: struct NalContext *__tmp_2_0; nengel@9: SliceBufferEntry *__tmp_3_0; nengel@9: } _nx_data_env_6_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_6(_nx_data_env_6_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct ParserContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: struct NalContext *___tmp_2_0 = _args->__tmp_2_0; nengel@9: SliceBufferEntry *___tmp_3_0 = _args->__tmp_3_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: parse_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_7_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct EntropyContext *__tmp_1_0; nengel@9: SliceBufferEntry *__tmp_2_0; nengel@9: } _nx_data_env_7_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_7(_nx_data_env_7_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct EntropyContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: SliceBufferEntry *___tmp_2_0 = _args->__tmp_2_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: decode_slice_entropy_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_8_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct ParserContext *__tmp_1_0; nengel@9: struct NalContext *__tmp_2_0; nengel@9: SliceBufferEntry *__tmp_3_0; nengel@9: } _nx_data_env_8_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_8(_nx_data_env_8_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct ParserContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: struct NalContext *___tmp_2_0 = _args->__tmp_2_0; nengel@9: SliceBufferEntry *___tmp_3_0 = _args->__tmp_3_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: parse_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_9_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct EntropyContext *__tmp_1_0; nengel@9: SliceBufferEntry *__tmp_2_0; nengel@9: } _nx_data_env_9_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_9(_nx_data_env_9_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct EntropyContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: SliceBufferEntry *___tmp_2_0 = _args->__tmp_2_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: decode_slice_entropy_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_10_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct MBRecContext *__tmp_1_0; nengel@9: SliceBufferEntry *__tmp_2_0; nengel@9: int *__tmp_3_0; nengel@9: } _nx_data_env_10_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_10(_nx_data_env_10_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct MBRecContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: SliceBufferEntry *___tmp_2_0 = _args->__tmp_2_0; nengel@9: int *___tmp_3_0 = _args->__tmp_3_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: init_ref_list_and_get_dpb_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_11_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct SuperMBContext *__tmp_1_0; nengel@9: struct MBRecContext *__tmp_2_0; nengel@9: SliceBufferEntry *__tmp_3_0; nengel@9: struct SuperMBTask *__tmp_4_0; nengel@9: int *__tmp_5_0; nengel@9: } _nx_data_env_11_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_11(_nx_data_env_11_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct SuperMBContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: struct MBRecContext *___tmp_2_0 = _args->__tmp_2_0; nengel@9: SliceBufferEntry *___tmp_3_0 = _args->__tmp_3_0; nengel@9: struct SuperMBTask *___tmp_4_0 = _args->__tmp_4_0; nengel@9: int *___tmp_5_0 = _args->__tmp_5_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: release_ref_list_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0), (___tmp_4_0), (___tmp_5_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_12_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct OutputContext *__tmp_1_0; nengel@9: SliceBufferEntry *__tmp_2_0; nengel@9: } _nx_data_env_12_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_12(_nx_data_env_12_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct OutputContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: SliceBufferEntry *___tmp_2_0 = _args->__tmp_2_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: output_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_13_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct MBRecContext *__tmp_1_0; nengel@9: SliceBufferEntry *__tmp_2_0; nengel@9: int *__tmp_3_0; nengel@9: } _nx_data_env_13_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_13(_nx_data_env_13_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct MBRecContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: SliceBufferEntry *___tmp_2_0 = _args->__tmp_2_0; nengel@9: int *___tmp_3_0 = _args->__tmp_3_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: init_ref_list_and_get_dpb_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_14_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct SuperMBContext *__tmp_1_0; nengel@9: struct MBRecContext *__tmp_2_0; nengel@9: SliceBufferEntry *__tmp_3_0; nengel@9: struct SuperMBTask *__tmp_4_0; nengel@9: int *__tmp_5_0; nengel@9: } _nx_data_env_14_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_14(_nx_data_env_14_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct SuperMBContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: struct MBRecContext *___tmp_2_0 = _args->__tmp_2_0; nengel@9: SliceBufferEntry *___tmp_3_0 = _args->__tmp_3_0; nengel@9: struct SuperMBTask *___tmp_4_0 = _args->__tmp_4_0; nengel@9: int *___tmp_5_0 = _args->__tmp_5_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: release_ref_list_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0), (___tmp_4_0), (___tmp_5_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_15_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct OutputContext *__tmp_1_0; nengel@9: SliceBufferEntry *__tmp_2_0; nengel@9: } _nx_data_env_15_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_15(_nx_data_env_15_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct OutputContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: SliceBufferEntry *___tmp_2_0 = _args->__tmp_2_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: output_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_16_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct ParserContext *__tmp_1_0; nengel@9: struct NalContext *__tmp_2_0; nengel@9: SliceBufferEntry *__tmp_3_0; nengel@9: } _nx_data_env_16_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_16(_nx_data_env_16_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct ParserContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: struct NalContext *___tmp_2_0 = _args->__tmp_2_0; nengel@9: SliceBufferEntry *___tmp_3_0 = _args->__tmp_3_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: parse_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0), (___tmp_3_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_17_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct EntropyContext *__tmp_1_0; nengel@9: SliceBufferEntry *__tmp_2_0; nengel@9: } _nx_data_env_17_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_17(_nx_data_env_17_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct EntropyContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: SliceBufferEntry *___tmp_2_0 = _args->__tmp_2_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: decode_slice_entropy_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_18_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct MBRecContext *__tmp_1_0; nengel@9: SliceBufferEntry *__tmp_2_0; nengel@9: } _nx_data_env_18_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_18(_nx_data_env_18_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct MBRecContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: SliceBufferEntry *___tmp_2_0 = _args->__tmp_2_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: decode_slice_mb_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0)); nengel@9: } nengel@9: } nengel@9: typedef struct _nx_data_env_19_t_tag nengel@9: { nengel@9: struct H264Context *__tmp_0_0; nengel@9: struct OutputContext *__tmp_1_0; nengel@9: SliceBufferEntry *__tmp_2_0; nengel@9: } _nx_data_env_19_t; nengel@9: int h264_decode_ompss(H264Context *h); nengel@9: static void _smp__ol_h264_decode_ompss_19(_nx_data_env_19_t *const __restrict__ _args) nengel@9: { nengel@9: struct H264Context *___tmp_0_0 = _args->__tmp_0_0; nengel@9: struct OutputContext *___tmp_1_0 = _args->__tmp_1_0; nengel@9: SliceBufferEntry *___tmp_2_0 = _args->__tmp_2_0; nengel@9: /* Translation is done by the runtime */ nengel@9: { nengel@9: output_task((___tmp_0_0), (___tmp_1_0), (___tmp_2_0)); nengel@9: } nengel@9: } nengel@9: int h264_decode_ompss(H264Context *h) nengel@9: { nengel@9: const int bufs = h->pipe_bufs; nengel@9: ParserContext *pc; nengel@9: NalContext *nc; nengel@9: EntropyContext *ec[bufs]; nengel@9: MBRecContext *rc[2]; nengel@9: OutputContext *oc; nengel@9: SliceBufferEntry *sbe; nengel@9: SuperMBContext *smbc; nengel@9: DecodedPicture *out; nengel@9: int frames = 0; nengel@9: sbe = av_mallocz(sizeof(SliceBufferEntry) * bufs); nengel@9: pc = get_parse_context(h->ifile); nengel@9: nc = get_nal_context(h->width, h->height); nengel@9: for (int i = 0; nengel@9: i < bufs; nengel@9: i++) nengel@9: { nengel@9: ec[i] = get_entropy_context(h); nengel@9: } nengel@9: for (int i = 0; nengel@9: i < 2; nengel@9: i++) nengel@9: { nengel@9: rc[i] = get_mbrec_context(h); nengel@9: } nengel@9: oc = get_output_context(h); nengel@9: av_start_timer(); nengel@9: int k = 0; nengel@9: int init, release; nengel@9: if (h->static_3d && bufs < h->num_frames) nengel@9: { nengel@9: int num_pre_ed = 0; nengel@9: for (num_pre_ed = 0; nengel@9: num_pre_ed < bufs - 1 && !pc->final_frame; nengel@9: num_pre_ed++) nengel@9: { nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct ParserContext *__tmp_1 = pc; nengel@9: struct NalContext *__tmp_2 = nc; nengel@9: SliceBufferEntry *__tmp_3 = &sbe[k % bufs]; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_6_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_6}; nengel@9: _nx_data_env_6_t *ol_args = (_nx_data_env_6_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_6_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_6_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_6_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct ParserContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct NalContext) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 3, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_6_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct ParserContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct NalContext) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_6_t), &imm_args, 3, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct EntropyContext *__tmp_1 = ec[k % bufs]; nengel@9: SliceBufferEntry *__tmp_2 = &sbe[k % bufs]; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_7_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_7}; nengel@9: _nx_data_env_7_t *ol_args = (_nx_data_env_7_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_7_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_7_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_7_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct EntropyContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 2, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_7_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct EntropyContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_7_t), &imm_args, 2, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: { nengel@9: struct _dependence_holder nengel@9: { nengel@9: struct ParserContext *dep_0; nengel@9: } _dep_holder = {&(*pc)}; nengel@9: nanos_dependence_t _wait_dependences[1] = {{ nengel@9: (void **) &_dep_holder.dep_0, nengel@9: ((char *) ((pc)) - (char *) _dep_holder.dep_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: sizeof (*pc) nengel@9: }}; nengel@9: nanos_wait_on(1, _wait_dependences); nengel@9: } nengel@9: k++; nengel@9: } nengel@9: while (!pc->final_frame && frames++ < h->num_frames && !h->quit) nengel@9: { nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct ParserContext *__tmp_1 = pc; nengel@9: struct NalContext *__tmp_2 = nc; nengel@9: SliceBufferEntry *__tmp_3 = &sbe[k % bufs]; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_8_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_8}; nengel@9: _nx_data_env_8_t *ol_args = (_nx_data_env_8_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_8_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_8_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_8_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct ParserContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct NalContext) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 3, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_8_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct ParserContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct NalContext) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_8_t), &imm_args, 3, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct EntropyContext *__tmp_1 = ec[k % bufs]; nengel@9: SliceBufferEntry *__tmp_2 = &sbe[k % bufs]; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_9_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_9}; nengel@9: _nx_data_env_9_t *ol_args = (_nx_data_env_9_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_9_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_9_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_9_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct EntropyContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 2, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_9_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct EntropyContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_9_t), &imm_args, 2, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: k++; nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct MBRecContext *__tmp_1 = rc[k % 2]; nengel@9: SliceBufferEntry *__tmp_2 = &sbe[k % bufs]; nengel@9: int *__tmp_3 = &init; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_10_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_10}; nengel@9: _nx_data_env_10_t *ol_args = (_nx_data_env_10_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_10_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_10_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_10_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(int) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 3, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_10_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(int) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_10_t), &imm_args, 3, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: smbc = acquire_smbc(h); nengel@9: SuperMBTask *lastsmb = add_decode_slice_3dwave_tasks(rc[k % 2], &sbe[k % bufs], smbc); nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct SuperMBContext *__tmp_1 = smbc; nengel@9: struct MBRecContext *__tmp_2 = rc[k % 2]; nengel@9: SliceBufferEntry *__tmp_3 = &sbe[k % bufs]; nengel@9: struct SuperMBTask *__tmp_4 = lastsmb; nengel@9: int *__tmp_5 = &release; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_11_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_11}; nengel@9: _nx_data_env_11_t *ol_args = (_nx_data_env_11_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_11_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_11_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_11_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: ol_args->__tmp_4_0 = __tmp_4; nengel@9: ol_args->__tmp_5_0 = __tmp_5; nengel@9: nanos_dependence_t _dependences[4] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_4_0, nengel@9: ((char *) ((__tmp_4)) - (char *) ol_args->__tmp_4_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_5_0, nengel@9: ((char *) ((__tmp_5)) - (char *) ol_args->__tmp_5_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(int) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 4, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_11_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: imm_args.__tmp_4_0 = __tmp_4; nengel@9: imm_args.__tmp_5_0 = __tmp_5; nengel@9: nanos_dependence_t _dependences[4] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_4_0, nengel@9: ((char *) ((__tmp_4)) - (char *) imm_args.__tmp_4_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_5_0, nengel@9: ((char *) ((__tmp_5)) - (char *) imm_args.__tmp_5_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(int) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_11_t), &imm_args, 4, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct OutputContext *__tmp_1 = oc; nengel@9: SliceBufferEntry *__tmp_2 = &sbe[k % bufs]; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_12_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_12}; nengel@9: _nx_data_env_12_t *ol_args = (_nx_data_env_12_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_12_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_12_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_12_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct OutputContext) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 2, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_12_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct OutputContext) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_12_t), &imm_args, 2, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: { nengel@9: struct _dependence_holder nengel@9: { nengel@9: struct ParserContext *dep_0; nengel@9: } _dep_holder = {&(*pc)}; nengel@9: nanos_dependence_t _wait_dependences[1] = {{ nengel@9: (void **) &_dep_holder.dep_0, nengel@9: ((char *) ((pc)) - (char *) _dep_holder.dep_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: sizeof (*pc) nengel@9: }}; nengel@9: nanos_wait_on(1, _wait_dependences); nengel@9: } nengel@9: } nengel@9: for (int i = 0; nengel@9: i < num_pre_ed; nengel@9: i++) nengel@9: { nengel@9: k++; nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct MBRecContext *__tmp_1 = rc[k % 2]; nengel@9: SliceBufferEntry *__tmp_2 = &sbe[k % bufs]; nengel@9: int *__tmp_3 = &init; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_13_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_13}; nengel@9: _nx_data_env_13_t *ol_args = (_nx_data_env_13_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_13_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_13_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_13_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(int) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 3, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_13_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(int) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_13_t), &imm_args, 3, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: smbc = acquire_smbc(h); nengel@9: SuperMBTask *lastsmb = add_decode_slice_3dwave_tasks(rc[k % 2], &sbe[k % bufs], smbc); nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct SuperMBContext *__tmp_1 = smbc; nengel@9: struct MBRecContext *__tmp_2 = rc[k % 2]; nengel@9: SliceBufferEntry *__tmp_3 = &sbe[k % bufs]; nengel@9: struct SuperMBTask *__tmp_4 = lastsmb; nengel@9: int *__tmp_5 = &release; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_14_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_14}; nengel@9: _nx_data_env_14_t *ol_args = (_nx_data_env_14_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_14_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_14_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_14_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: ol_args->__tmp_4_0 = __tmp_4; nengel@9: ol_args->__tmp_5_0 = __tmp_5; nengel@9: nanos_dependence_t _dependences[4] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_4_0, nengel@9: ((char *) ((__tmp_4)) - (char *) ol_args->__tmp_4_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_5_0, nengel@9: ((char *) ((__tmp_5)) - (char *) ol_args->__tmp_5_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(int) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 4, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_14_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: imm_args.__tmp_4_0 = __tmp_4; nengel@9: imm_args.__tmp_5_0 = __tmp_5; nengel@9: nanos_dependence_t _dependences[4] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_4_0, nengel@9: ((char *) ((__tmp_4)) - (char *) imm_args.__tmp_4_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct SuperMBTask) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_5_0, nengel@9: ((char *) ((__tmp_5)) - (char *) imm_args.__tmp_5_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(int) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_14_t), &imm_args, 4, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct OutputContext *__tmp_1 = oc; nengel@9: SliceBufferEntry *__tmp_2 = &sbe[k % bufs]; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_15_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_15}; nengel@9: _nx_data_env_15_t *ol_args = (_nx_data_env_15_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_15_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_15_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_15_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct OutputContext) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 2, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_15_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct OutputContext) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_15_t), &imm_args, 2, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: } nengel@9: } nengel@9: else nengel@9: { nengel@9: while (!pc->final_frame && frames++ < h->num_frames && !h->quit) nengel@9: { nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct ParserContext *__tmp_1 = pc; nengel@9: struct NalContext *__tmp_2 = nc; nengel@9: SliceBufferEntry *__tmp_3 = &sbe[k % bufs]; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_16_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_16}; nengel@9: _nx_data_env_16_t *ol_args = (_nx_data_env_16_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_16_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_16_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_16_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: ol_args->__tmp_3_0 = __tmp_3; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) ol_args->__tmp_3_0), nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct ParserContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct NalContext) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 3, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_16_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: imm_args.__tmp_3_0 = __tmp_3; nengel@9: nanos_dependence_t _dependences[3] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_3_0, nengel@9: ((char *) ((__tmp_3)) - (char *) imm_args.__tmp_3_0), nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct ParserContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct NalContext) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_16_t), &imm_args, 3, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct EntropyContext *__tmp_1 = ec[k % bufs]; nengel@9: SliceBufferEntry *__tmp_2 = &sbe[k % bufs]; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_17_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_17}; nengel@9: _nx_data_env_17_t *ol_args = (_nx_data_env_17_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_17_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_17_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_17_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct EntropyContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 2, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_17_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct EntropyContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_17_t), &imm_args, 2, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct MBRecContext *__tmp_1 = rc[0]; nengel@9: SliceBufferEntry *__tmp_2 = &sbe[k % bufs]; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_18_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_18}; nengel@9: _nx_data_env_18_t *ol_args = (_nx_data_env_18_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_18_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_18_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_18_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 2, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_18_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct MBRecContext) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_18_t), &imm_args, 2, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: { nengel@9: struct H264Context *__tmp_0 = h; nengel@9: struct OutputContext *__tmp_1 = oc; nengel@9: SliceBufferEntry *__tmp_2 = &sbe[k % bufs]; nengel@9: { nengel@9: /* SMP device descriptor */ nengel@9: static nanos_smp_args_t _ol_h264_decode_ompss_19_smp_args = {(void (*)(void *)) _smp__ol_h264_decode_ompss_19}; nengel@9: _nx_data_env_19_t *ol_args = (_nx_data_env_19_t *) 0; nengel@9: nanos_wd_t wd = (nanos_wd_t) 0; nengel@9: struct nanos_const_wd_definition_local_t nengel@9: { nengel@9: nanos_const_wd_definition_t base; nengel@9: nanos_device_t devices[1]; nengel@9: }; nengel@9: static struct nanos_const_wd_definition_local_t _const_def = { nengel@9: { nengel@9: { nengel@9: 0, nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: __alignof__(_nx_data_env_19_t), nengel@9: 0, nengel@9: 1 nengel@9: }, nengel@9: {{ nengel@9: nanos_smp_factory, nengel@9: &_ol_h264_decode_ompss_19_smp_args nengel@9: }} nengel@9: }; nengel@9: nanos_wd_dyn_props_t dyn_props = {0}; nengel@9: nanos_err_t err; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_compact(&wd, &_const_def.base, &dyn_props, sizeof(_nx_data_env_19_t), (void **) &ol_args, nanos_current_wd(), (nanos_copy_data_t **) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: if (wd != (nanos_wd_t) 0) nengel@9: { nengel@9: ol_args->__tmp_0_0 = __tmp_0; nengel@9: ol_args->__tmp_1_0 = __tmp_1; nengel@9: ol_args->__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &ol_args->__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) ol_args->__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &ol_args->__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) ol_args->__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct OutputContext) nengel@9: } nengel@9: }; nengel@9: err = nanos_submit(wd, 2, (nanos_dependence_t *) _dependences, (nanos_team_t) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: else nengel@9: { nengel@9: _nx_data_env_19_t imm_args; nengel@9: imm_args.__tmp_0_0 = __tmp_0; nengel@9: imm_args.__tmp_1_0 = __tmp_1; nengel@9: imm_args.__tmp_2_0 = __tmp_2; nengel@9: nanos_dependence_t _dependences[2] = { nengel@9: { nengel@9: (void **) &imm_args.__tmp_2_0, nengel@9: ((char *) ((__tmp_2)) - (char *) imm_args.__tmp_2_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(SliceBufferEntry) nengel@9: }, nengel@9: { nengel@9: (void **) &imm_args.__tmp_1_0, nengel@9: ((char *) ((__tmp_1)) - (char *) imm_args.__tmp_1_0), nengel@9: { nengel@9: 1, nengel@9: 1, nengel@9: 1, nengel@9: 0 nengel@9: }, nengel@9: sizeof(struct OutputContext) nengel@9: } nengel@9: }; nengel@9: dyn_props.priority = 0; nengel@9: err = nanos_create_wd_and_run_compact(&_const_def.base, &dyn_props, sizeof(_nx_data_env_19_t), &imm_args, 2, (nanos_dependence_t *) _dependences, (nanos_copy_data_t *) 0, (void *) 0); nengel@9: if (err != NANOS_OK) nengel@9: nanos_handle_error(err); nengel@9: } nengel@9: } nengel@9: ; nengel@9: } nengel@9: { nengel@9: struct _dependence_holder nengel@9: { nengel@9: struct ParserContext *dep_0; nengel@9: } _dep_holder = {&(*pc)}; nengel@9: nanos_dependence_t _wait_dependences[1] = {{ nengel@9: (void **) &_dep_holder.dep_0, nengel@9: ((char *) ((pc)) - (char *) _dep_holder.dep_0), nengel@9: { nengel@9: 1, nengel@9: 0, nengel@9: 0, nengel@9: 0 nengel@9: }, nengel@9: sizeof (*pc) nengel@9: }}; nengel@9: nanos_wait_on(1, _wait_dependences); nengel@9: } nengel@9: k++; nengel@9: } nengel@9: } nengel@9: nanos_wg_wait_completion(nanos_current_wd(), 0); nengel@9: while ((out = output_frame(h, oc, ((void *) 0), h->ofile, h->frame_width, h->frame_height))) nengel@9: ; nengel@9: h->num_frames = oc->frame_number; nengel@9: free_parse_context(pc); nengel@9: free_nal_context(nc); nengel@9: free_output_context(oc); nengel@9: for (int i = 0; nengel@9: i < bufs; nengel@9: i++) nengel@9: { nengel@9: free_sb_entry(&sbe[i]); nengel@9: free_entropy_context(ec[i]); nengel@9: } nengel@9: av_free(sbe); nengel@9: for (int i = 0; nengel@9: i < 2; nengel@9: i++) nengel@9: { nengel@9: free_mbrec_context(rc[i]); nengel@9: } nengel@9: return 0; nengel@9: } nengel@9: __attribute__((weak, section("nanos_init"))) nanos_init_desc_t __section__nanos_init = { nengel@9: nanos_omp_set_interface, nengel@9: (void *) 0 nengel@9: };