Patching things up and adding tests.
This commit is contained in:
parent
74178fd1c2
commit
b6997a56df
42
.drone.yml
42
.drone.yml
|
@ -1,4 +1,46 @@
|
|||
kind: pipeline
|
||||
name: i386-gcc # we do not support 32-bit systems, but we run tests
|
||||
platform: { os: linux, arch: amd64 }
|
||||
steps:
|
||||
- name: Build and Test
|
||||
image: i386/ubuntu
|
||||
environment:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
BUILD_FLAGS: -- -j
|
||||
CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=ON
|
||||
CTEST_FLAGS: -j4 --output-on-failure -E checkperf -E numberparsingcheck # A ULP marging 1 is detected on 32-bit GCC
|
||||
commands:
|
||||
- apt-get update -qq
|
||||
- apt-get install -y g++ cmake gcc
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- cmake --build . $BUILD_FLAGS
|
||||
- ctest $CTEST_FLAGS
|
||||
---
|
||||
kind: pipeline
|
||||
name: i386-clang # we do not support 32-bit systems, but we run tests
|
||||
platform: { os: linux, arch: amd64 }
|
||||
steps:
|
||||
- name: Build and Test
|
||||
image: i386/ubuntu
|
||||
environment:
|
||||
CC: clang-6.0
|
||||
CXX: clang++-6.0
|
||||
BUILD_FLAGS: -- -j
|
||||
CMAKE_FLAGS: -DSIMDJSON_BUILD_STATIC=ON
|
||||
CTEST_FLAGS: -j4 --output-on-failure -E checkperf
|
||||
commands:
|
||||
- apt-get update -qq
|
||||
- apt-get install -y clang++-6.0 cmake
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake $CMAKE_FLAGS ..
|
||||
- cmake --build . $BUILD_FLAGS
|
||||
- ctest $CTEST_FLAGS
|
||||
---
|
||||
kind: pipeline
|
||||
name: gcc9
|
||||
platform: { os: linux, arch: amd64 }
|
||||
steps:
|
||||
|
|
|
@ -81,15 +81,15 @@ really_inline T tape_ref::next_tape_value() const noexcept {
|
|||
}
|
||||
|
||||
really_inline uint32_t internal::tape_ref::get_string_length() const noexcept {
|
||||
uint64_t string_buf_index = size_t(tape_value());
|
||||
size_t string_buf_index = size_t(tape_value());
|
||||
uint32_t len;
|
||||
memcpy(&len, &doc->string_buf[size_t(string_buf_index)], sizeof(len));
|
||||
return len;
|
||||
}
|
||||
|
||||
really_inline const char * internal::tape_ref::get_c_str() const noexcept {
|
||||
uint64_t string_buf_index = size_t(tape_value());
|
||||
return reinterpret_cast<const char *>(&doc->string_buf[size_t(string_buf_index) + sizeof(uint32_t)]);
|
||||
size_t string_buf_index = size_t(tape_value());
|
||||
return reinterpret_cast<const char *>(&doc->string_buf[string_buf_index + sizeof(uint32_t)]);
|
||||
}
|
||||
|
||||
inline std::string_view internal::tape_ref::get_string_view() const noexcept {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* auto-generated on Fri Jun 26 01:04:15 UTC 2020. Do not edit! */
|
||||
/* auto-generated on Fri Jun 26 15:35:58 UTC 2020. Do not edit! */
|
||||
|
||||
#include <iostream>
|
||||
#include "simdjson.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* auto-generated on Fri Jun 26 01:04:15 UTC 2020. Do not edit! */
|
||||
/* auto-generated on Fri Jun 26 15:35:58 UTC 2020. Do not edit! */
|
||||
/* begin file src/simdjson.cpp */
|
||||
#include "simdjson.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* auto-generated on Fri Jun 26 01:04:15 UTC 2020. Do not edit! */
|
||||
/* auto-generated on Fri Jun 26 15:35:58 UTC 2020. Do not edit! */
|
||||
/* begin file include/simdjson.h */
|
||||
#ifndef SIMDJSON_H
|
||||
#define SIMDJSON_H
|
||||
|
@ -7647,15 +7647,15 @@ really_inline T tape_ref::next_tape_value() const noexcept {
|
|||
}
|
||||
|
||||
really_inline uint32_t internal::tape_ref::get_string_length() const noexcept {
|
||||
uint64_t string_buf_index = size_t(tape_value());
|
||||
size_t string_buf_index = size_t(tape_value());
|
||||
uint32_t len;
|
||||
memcpy(&len, &doc->string_buf[size_t(string_buf_index)], sizeof(len));
|
||||
return len;
|
||||
}
|
||||
|
||||
really_inline const char * internal::tape_ref::get_c_str() const noexcept {
|
||||
uint64_t string_buf_index = size_t(tape_value());
|
||||
return reinterpret_cast<const char *>(&doc->string_buf[size_t(string_buf_index) + sizeof(uint32_t)]);
|
||||
size_t string_buf_index = size_t(tape_value());
|
||||
return reinterpret_cast<const char *>(&doc->string_buf[string_buf_index + sizeof(uint32_t)]);
|
||||
}
|
||||
|
||||
inline std::string_view internal::tape_ref::get_string_view() const noexcept {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#ifndef SIMDJSON_SIMDPRUNE_TABLES_H
|
||||
#define SIMDJSON_SIMDPRUNE_TABLES_H
|
||||
|
||||
|
||||
#if SIMDJSON_IMPLEMENTATION_ARM64 || SIMDJSON_IMPLEMENTATION_HASWELL || SIMDJSON_IMPLEMENTATION_WESTMERE
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace simdjson { // table modified and copied from
|
||||
|
@ -127,4 +131,6 @@ static const uint64_t thintable_epi8[256] = {
|
|||
|
||||
} // namespace simdjson
|
||||
|
||||
|
||||
#endif // SIMDJSON_IMPLEMENTATION_ARM64 || SIMDJSON_IMPLEMENTATION_HASWELL || SIMDJSON_IMPLEMENTATION_WESTMERE
|
||||
#endif // SIMDJSON_SIMDPRUNE_TABLES_H
|
||||
|
|
Loading…
Reference in New Issue