PostgreSQL Source Code: src/include/utils/ascii.h Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11#ifndef _ASCII_H_
12#define _ASCII_H_
13
15
17
18
19
20
21
22
23
24static inline bool
26{
27 const unsigned char *const s_end = s + len;
30#ifdef USE_NO_SIMD
32#endif
33
35
36 while (s < s_end)
37 {
39
40
41#ifdef USE_NO_SIMD
42
43
44
45
46
47
48
49
50
51
52
53
55#else
56
57
58
59
60
63#endif
64
65
66 highbit_cum = vector8_or(highbit_cum, chunk);
67
68 s += sizeof(chunk);
69 }
70
71
73 return false;
74
75#ifdef USE_NO_SIMD
76
78 return false;
79#endif
80
81 return true;
82}
83
84#endif
void ascii_safe_strlcpy(char *dest, const char *src, size_t destsiz)
static bool is_valid_ascii(const unsigned char *s, int len)
Assert(PointerIsAligned(start, uint64))
static Vector8 vector8_broadcast(const uint8 c)
static void vector8_load(Vector8 *v, const uint8 *s)
static Vector8 vector8_or(const Vector8 v1, const Vector8 v2)
static bool vector8_is_highbit_set(const Vector8 v)