#if (defined(__ARM_NEON__) || defined(__ARM_NEON))
#include <arm_neon.h>
-static void NEON_accum32(uint32_t *s, const unsigned char *buf,
- size_t len)
-{
+static void NEON_accum32(uint32_t *s, const unsigned char *buf, size_t len) {
static const uint8_t taps[32] = {
32, 31, 30, 29, 28, 27, 26, 25,
24, 23, 22, 21, 20, 19, 18, 17,
s[1] = vget_lane_u32(as, 1);
}
-static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf,
- size_t len)
-{
+static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf, size_t len) {
/* Oldie K&R code integration. */
unsigned int i;
for (i = 0; i < len; ++i) {
}
}
-uint32_t adler32_neon(uint32_t adler, const unsigned char *buf,
- size_t len)
-{
+uint32_t adler32_neon(uint32_t adler, const unsigned char *buf, size_t len) {
if (!buf)
return 1L;
#define __NEON_ADLER32__
#if (defined(__ARM_NEON__) || defined(__ARM_NEON))
-// Depending on the compiler flavor, size_t may be defined in
-// one or the other header. See:
+// Depending on the compiler flavor, size_t may be defined in one or the other header. See:
// http://stackoverflow.com/questions/26410466/gcc-linaro-compiler-throws-error-unknown-type-name-size-t
#include <stdint.h>
#include <stddef.h>
-uint32_t adler32_neon(uint32_t adler, const unsigned char *buf,
- size_t len);
+uint32_t adler32_neon(uint32_t adler, const unsigned char *buf, size_t len);
#endif
#endif
# include <stddef.h>
#endif
-uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, size_t len)
-{
+uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, size_t len) {
register uint32_t c;
register const uint16_t *buf2;
register const uint32_t *buf4;
#include "deflate_p.h"
#include "functable.h"
-extern ZLIB_INTERNAL int read_buf (z_stream *strm, unsigned char *buf, unsigned size);
+extern ZLIB_INTERNAL int read_buf(z_stream *strm, unsigned char *buf, unsigned size);
#if __ARM_NEON
#include <arm_neon.h>
/* SIMD version of hash_chain rebase */
-static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size)
-{
+static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size) {
register uint16x8_t v, *p;
register size_t n;
}
#else
/* generic version for hash rebase */
-static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size)
-{
+static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size) {
unsigned int i;
for (i = 0; i < entries; i++) {
table[i] = (table[i] >= window_size) ? (table[i] - window_size) : NIL;
}
}
- Assert((unsigned long)s->strstart <= s->window_size - MIN_LOOKAHEAD,
- "not enough room for search");
+ Assert((unsigned long)s->strstart <= s->window_size - MIN_LOOKAHEAD, "not enough room for search");
}
#if (defined(__ARM_NEON__) || defined(__ARM_NEON))
#include <arm_neon.h>
-static void NEON_accum32(uint32_t *s, const unsigned char *buf,
- size_t len)
-{
+static void NEON_accum32(uint32_t *s, const unsigned char *buf, size_t len) {
static const uint8_t taps[32] = {
32, 31, 30, 29, 28, 27, 26, 25,
24, 23, 22, 21, 20, 19, 18, 17,
s[1] = vget_lane_u32(as, 1);
}
-static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf,
- size_t len)
-{
+static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf, size_t len) {
/* Oldie K&R code integration. */
unsigned int i;
for (i = 0; i < len; ++i) {
}
}
-uint32_t adler32_neon(uint32_t adler, const unsigned char *buf,
- size_t len)
-{
+uint32_t adler32_neon(uint32_t adler, const unsigned char *buf, size_t len) {
if (!buf)
return 1L;
#define __NEON_ADLER32__
#if (defined(__ARM_NEON__) || defined(__ARM_NEON))
-// Depending on the compiler flavor, size_t may be defined in
-// one or the other header. See:
+// Depending on the compiler flavor, size_t may be defined in one or the other header. See:
// http://stackoverflow.com/questions/26410466/gcc-linaro-compiler-throws-error-unknown-type-name-size-t
#include <stdint.h>
#include <stddef.h>
-uint32_t adler32_neon(uint32_t adler, const unsigned char *buf,
- size_t len);
+uint32_t adler32_neon(uint32_t adler, const unsigned char *buf, size_t len);
#endif
#endif
# include <stddef.h>
#endif
-uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, size_t len)
-{
+uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, size_t len) {
register uint32_t c;
register const uint16_t *buf2;
register const uint32_t *buf4;
#include <armintr.h>
#if defined(_MSC_VER) && !defined(__clang__)
-static __forceinline unsigned long __builtin_ctzl(unsigned long value)
-{
+static __forceinline unsigned long __builtin_ctzl(unsigned long value) {
return _arm_clz(_arm_rbit(value));
}
#endif
#include "deflate_p.h"
#include "functable.h"
-extern ZLIB_INTERNAL int read_buf (z_stream *strm, unsigned char *buf, unsigned size);
+extern ZLIB_INTERNAL int read_buf(z_stream *strm, unsigned char *buf, unsigned size);
#if __ARM_NEON__
#include <arm_neon.h>
/* SIMD version of hash_chain rebase */
-static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size)
-{
+static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size) {
register uint16x8_t v, *p;
register size_t n;
}
#else
/* generic version for hash rebase */
-static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size)
-{
+static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size) {
unsigned int i;
for (i = 0; i < entries; i++) {
table[i] = (table[i] >= window_size) ? (table[i] - window_size) : NIL;
}
}
- Assert((unsigned long)s->strstart <= s->window_size - MIN_LOOKAHEAD,
- "not enough room for search");
+ Assert((unsigned long)s->strstart <= s->window_size - MIN_LOOKAHEAD, "not enough room for search");
}