mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
7068894be3
* WIP: initial RVV implementation Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn> * Fix issue with SIMDJSON_CONDITIONAL_INCLUDE in rvv/implementation.h Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn> * drop RISC-V V-extension auto-detection in cmake - Remove CMake logic that adds -DSIMDJSON_IS_RVV=1. - Let SIMDJSON_IS_RVV be determined by portability.h. - Translate placeholder comment to English. Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn> * fixing amalgamation. Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn> * adding base Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn> --------- Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn> Co-authored-by: Daniel Lemire <daniel@lemire.me>
29 lines
1017 B
C++
29 lines
1017 B
C++
#ifndef SIMDJSON_RVV_IMPLEMENTATION_H
|
|
#define SIMDJSON_RVV_IMPLEMENTATION_H
|
|
|
|
#ifndef SIMDJSON_CONDITIONAL_INCLUDE
|
|
#define SIMDJSON_CONDITIONAL_INCLUDE
|
|
#include "simdjson/base.h"
|
|
#include "simdjson/implementation.h"
|
|
#include "simdjson/internal/instruction_set.h"
|
|
#endif // SIMDJSON_CONDITIONAL_INCLUDE
|
|
|
|
namespace simdjson {
|
|
namespace rvv {
|
|
|
|
class implementation final: public simdjson::implementation {
|
|
public:
|
|
simdjson_inline implementation() : simdjson::implementation("rvv", "RISC-V Vector Extension", 0) {}
|
|
simdjson_warn_unused error_code create_dom_parser_implementation(
|
|
size_t capacity,
|
|
size_t max_depth,
|
|
std::unique_ptr<internal::dom_parser_implementation>& dst
|
|
) const noexcept final;
|
|
simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
|
|
simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
|
|
};
|
|
|
|
} // namespace rvv
|
|
} // namespace simdjson
|
|
|
|
#endif // SIMDJSON_RVV_IMPLEMENTATION_H
|