/src/simdjson/include/simdjson/westmere/implementation.h
Line | Count | Source |
1 | | #ifndef SIMDJSON_WESTMERE_IMPLEMENTATION_H |
2 | | #define SIMDJSON_WESTMERE_IMPLEMENTATION_H |
3 | | |
4 | | #ifndef SIMDJSON_CONDITIONAL_INCLUDE |
5 | | #include "simdjson/westmere/base.h" |
6 | | #include "simdjson/implementation.h" |
7 | | #include "simdjson/internal/instruction_set.h" |
8 | | #endif // SIMDJSON_CONDITIONAL_INCLUDE |
9 | | |
10 | | // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE |
11 | | namespace simdjson { |
12 | | namespace westmere { |
13 | | |
14 | | /** |
15 | | * @private |
16 | | */ |
17 | | class implementation final : public simdjson::implementation { |
18 | | public: |
19 | 12 | simdjson_inline implementation() : simdjson::implementation("westmere", "Intel/AMD SSE4.2", internal::instruction_set::SSE42 | internal::instruction_set::PCLMULQDQ) {} |
20 | | simdjson_warn_unused error_code create_dom_parser_implementation( |
21 | | size_t capacity, |
22 | | size_t max_length, |
23 | | std::unique_ptr<internal::dom_parser_implementation>& dst |
24 | | ) const noexcept final; |
25 | | simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; |
26 | | simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; |
27 | | }; |
28 | | |
29 | | } // namespace westmere |
30 | | } // namespace simdjson |
31 | | |
32 | | #endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H |