mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
eba02dc1b9
* Attempt 1 - fn targeting GCC won't work with templates with different targets, need to specialize all the way up the call stack. * Compiles properly with cmake. Does not with the Makefile. * Compilation works with Makefile * instruction_set changes to architecture * some aesthetic changes * fix amalgation and tests + aesthetic changes * This now compiles and passes tests under CLANG * Minor correction. * Trying to make it work on ARM * Adding missing namespace * Missing bracket * Fixing minor compilation issues. * Getting parse to use runtime dispatch * Fixing amalgamation script. * Making sure that NEON is supported. * Fixing typo * Merging https://github.com/lemire/simdjson/pull/229 * Manual merge of https://github.com/lemire/simdjson/pull/229 by @jkeiser (second part) * Trying another way. * Removing the paral. * Fixing the make file * Let us make the practice run long enough. * Resolved the awful slowness. * Cleaning the README.md * With runtime dispatching, we should not need flags anymore. * Changing isa detection file's name + fixing typos.
43 lines
1.5 KiB
C++
43 lines
1.5 KiB
C++
#ifndef SIMDJSON_ERR_H
|
|
#define SIMDJSON_ERR_H
|
|
|
|
#include <string>
|
|
|
|
namespace simdjson {
|
|
// Represents the minimal architecture that would support an implementation
|
|
enum class architecture {
|
|
westmere,
|
|
haswell,
|
|
arm64,
|
|
none,
|
|
// TODO remove 'native' in favor of runtime dispatch?
|
|
// the 'native' enum class value should point at a good default on the current machine
|
|
#ifdef IS_X86_64
|
|
native = westmere
|
|
#elif defined(IS_ARM64)
|
|
native = arm64
|
|
#endif
|
|
};
|
|
|
|
enum errorValues {
|
|
SUCCESS = 0,
|
|
CAPACITY, // This ParsedJson can't support a document that big
|
|
MEMALLOC, // Error allocating memory, most likely out of memory
|
|
TAPE_ERROR, // Something went wrong while writing to the tape (stage 2), this is a generic error
|
|
DEPTH_ERROR, // Your document exceeds the user-specified depth limitation
|
|
STRING_ERROR, // Problem while parsing a string
|
|
T_ATOM_ERROR, // Problem while parsing an atom starting with the letter 't'
|
|
F_ATOM_ERROR, // Problem while parsing an atom starting with the letter 'f'
|
|
N_ATOM_ERROR, // Problem while parsing an atom starting with the letter 'n'
|
|
NUMBER_ERROR, // Problem while parsing a number
|
|
UTF8_ERROR, // the input is not valid UTF-8
|
|
UNITIALIZED, // unknown error, or uninitialized document
|
|
EMPTY, // no structural document found
|
|
UNESCAPED_CHARS, // found unescaped characters in a string.
|
|
UNCLOSED_STRING, // missing quote at the end
|
|
UNEXPECTED_ERROR // indicative of a bug in simdjson
|
|
};
|
|
const std::string& errorMsg(const int);
|
|
}
|
|
#endif
|