Skip to content

Commit 924cbf2

Browse files
committed
Updating the singleheader
1 parent ea25e21 commit 924cbf2

3 files changed

Lines changed: 12 additions & 9 deletions

File tree

‎singleheader/amalgamate_demo.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on Tue Jul 7 15:13:17 EDT 2020. Do not edit! */
1+
/* auto-generated on Tue Jul 7 15:39:55 EDT 2020. Do not edit! */
22

33
#include <iostream>
44
#include "simdjson.h"

‎singleheader/simdjson.cpp‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on Tue Jul 7 15:13:17 EDT 2020. Do not edit! */
1+
/* auto-generated on Tue Jul 7 15:39:55 EDT 2020. Do not edit! */
22
/* begin file src/simdjson.cpp */
33
#include "simdjson.h"
44

@@ -2649,7 +2649,7 @@ really_inline int8x16_t make_int8x16_t(int8_t x1, int8_t x2, int8_t x3, int8_
26492649
template<typename T>
26502650
struct simd8x64 {
26512651
static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
2652-
static_assert(NUM_CHUNKS == 4);
2652+
static_assert(NUM_CHUNKS == 4, "ARM kernel should use four registers per 64-byte block.");
26532653
const simd8<T> chunks[NUM_CHUNKS];
26542654

26552655
simd8x64(const simd8x64<T>& o) = delete; // no copy allowed
@@ -3554,7 +3554,8 @@ namespace utf8_validation {
35543554
really_inline void check_next_input(const simd8x64<uint8_t>& input) {
35553555
if (unlikely(!is_ascii(input))) {
35563556
// you might think that a for-loop would work, but under Visual Studio, it is not good enough.
3557-
static_assert((simd8x64<uint8_t>::NUM_CHUNKS == 2) || (simd8x64<uint8_t>::NUM_CHUNKS == 4));
3557+
static_assert((simd8x64<uint8_t>::NUM_CHUNKS == 2) || (simd8x64<uint8_t>::NUM_CHUNKS == 4),
3558+
"We support either two or four chunks per 64-byte block.");
35583559
if(simd8x64<uint8_t>::NUM_CHUNKS == 2) {
35593560
this->check_utf8_bytes(input.chunks[0], this->prev_input_block);
35603561
this->check_utf8_bytes(input.chunks[1], input.chunks[0]);
@@ -8022,7 +8023,7 @@ namespace simd {
80228023
template<typename T>
80238024
struct simd8x64 {
80248025
static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
8025-
static_assert(NUM_CHUNKS == 2);
8026+
static_assert(NUM_CHUNKS == 2, "Haswell kernel should use two registers per 64-byte block.");
80268027
const simd8<T> chunks[NUM_CHUNKS];
80278028

80288029
simd8x64(const simd8x64<T>& o) = delete; // no copy allowed
@@ -8871,7 +8872,8 @@ namespace utf8_validation {
88718872
really_inline void check_next_input(const simd8x64<uint8_t>& input) {
88728873
if (unlikely(!is_ascii(input))) {
88738874
// you might think that a for-loop would work, but under Visual Studio, it is not good enough.
8874-
static_assert((simd8x64<uint8_t>::NUM_CHUNKS == 2) || (simd8x64<uint8_t>::NUM_CHUNKS == 4));
8875+
static_assert((simd8x64<uint8_t>::NUM_CHUNKS == 2) || (simd8x64<uint8_t>::NUM_CHUNKS == 4),
8876+
"We support either two or four chunks per 64-byte block.");
88758877
if(simd8x64<uint8_t>::NUM_CHUNKS == 2) {
88768878
this->check_utf8_bytes(input.chunks[0], this->prev_input_block);
88778879
this->check_utf8_bytes(input.chunks[1], input.chunks[0]);
@@ -11208,7 +11210,7 @@ namespace simd {
1120811210
template<typename T>
1120911211
struct simd8x64 {
1121011212
static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
11211-
static_assert(NUM_CHUNKS == 4);
11213+
static_assert(NUM_CHUNKS == 4, "Westmere kernel should use four registers per 64-byte block.");
1121211214
const simd8<T> chunks[NUM_CHUNKS];
1121311215

1121411216
simd8x64(const simd8x64<T>& o) = delete; // no copy allowed
@@ -12073,7 +12075,8 @@ namespace utf8_validation {
1207312075
really_inline void check_next_input(const simd8x64<uint8_t>& input) {
1207412076
if (unlikely(!is_ascii(input))) {
1207512077
// you might think that a for-loop would work, but under Visual Studio, it is not good enough.
12076-
static_assert((simd8x64<uint8_t>::NUM_CHUNKS == 2) || (simd8x64<uint8_t>::NUM_CHUNKS == 4));
12078+
static_assert((simd8x64<uint8_t>::NUM_CHUNKS == 2) || (simd8x64<uint8_t>::NUM_CHUNKS == 4),
12079+
"We support either two or four chunks per 64-byte block.");
1207712080
if(simd8x64<uint8_t>::NUM_CHUNKS == 2) {
1207812081
this->check_utf8_bytes(input.chunks[0], this->prev_input_block);
1207912082
this->check_utf8_bytes(input.chunks[1], input.chunks[0]);

‎singleheader/simdjson.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on Tue Jul 7 15:13:17 EDT 2020. Do not edit! */
1+
/* auto-generated on Tue Jul 7 15:39:55 EDT 2020. Do not edit! */
22
/* begin file include/simdjson.h */
33
#ifndef SIMDJSON_H
44
#define SIMDJSON_H

0 commit comments

Comments
 (0)