!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/src/linux-headers-4.4.0-210/include/linux/   drwxr-xr-x
Free 9.89 GB of 29.4 GB (33.65%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     average.h (1.48 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#ifndef _LINUX_AVERAGE_H
#define _LINUX_AVERAGE_H

/* Exponentially weighted moving average (EWMA) */

#define DECLARE_EWMA(name, _factor, _weight)                \
    struct ewma_##name {                        \
        unsigned long internal;                    \
    };                                \
    static inline void ewma_##name##_init(struct ewma_##name *e)    \
    {                                \
        BUILD_BUG_ON(!__builtin_constant_p(_factor));        \
        BUILD_BUG_ON(!__builtin_constant_p(_weight));        \
        BUILD_BUG_ON_NOT_POWER_OF_2(_factor);            \
        BUILD_BUG_ON_NOT_POWER_OF_2(_weight);            \
        e->internal = 0;                    \
    }                                \
    static inline unsigned long                    \
    ewma_##name##_read(struct ewma_##name *e)            \
    {                                \
        BUILD_BUG_ON(!__builtin_constant_p(_factor));        \
        BUILD_BUG_ON(!__builtin_constant_p(_weight));        \
        BUILD_BUG_ON_NOT_POWER_OF_2(_factor);            \
        BUILD_BUG_ON_NOT_POWER_OF_2(_weight);            \
        return e->internal >> ilog2(_factor);            \
    }                                \
    static inline void ewma_##name##_add(struct ewma_##name *e,    \
                         unsigned long val)        \
    {                                \
        unsigned long internal = ACCESS_ONCE(e->internal);    \
        unsigned long weight = ilog2(_weight);            \
        unsigned long factor = ilog2(_factor);            \
                                    \
        BUILD_BUG_ON(!__builtin_constant_p(_factor));        \
        BUILD_BUG_ON(!__builtin_constant_p(_weight));        \
        BUILD_BUG_ON_NOT_POWER_OF_2(_factor);            \
        BUILD_BUG_ON_NOT_POWER_OF_2(_weight);            \
                                    \
        ACCESS_ONCE(e->internal) = internal ?            \
            (((internal << weight) - internal) +        \
                (val << factor)) >> weight :        \
            (val << factor);                \
    }

#endif /* _LINUX_AVERAGE_H */

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0048 ]--