Files
SaberAlterr 7068894be3 [RISC-V Vector] Add RVV Backend Registration (#2430)
* 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>
2025-09-14 08:14:41 -06:00

44 lines
1.5 KiB
C++

#ifndef SIMDJSON_BUILTIN_BASE_H
#define SIMDJSON_BUILTIN_BASE_H
#include "simdjson/base.h"
#include "simdjson/implementation_detection.h"
namespace simdjson {
#if SIMDJSON_BUILTIN_IMPLEMENTATION_IS(arm64)
namespace arm64 {}
#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(fallback)
namespace fallback {}
#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(haswell)
namespace haswell {}
#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(icelake)
namespace icelake {}
#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(ppc64)
namespace ppc64 {}
#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(westmere)
namespace westmere {}
#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(lsx)
namespace lsx {}
#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(lasx)
namespace lasx {}
#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(rvv)
namespace rvv {}
#else
#error Unknown SIMDJSON_BUILTIN_IMPLEMENTATION
#endif
/**
* Represents the best statically linked simdjson implementation that can be used by the compiling
* program.
*
* Detects what options the program is compiled against, and picks the minimum implementation that
* will work on any computer that can run the program. For example, if you compile with g++
* -march=westmere, it will pick the westmere implementation. The haswell implementation will
* still be available, and can be selected at runtime, but the builtin implementation (and any
* code that uses it) will use westmere.
*/
namespace builtin = SIMDJSON_BUILTIN_IMPLEMENTATION;
} // namespace simdjson
#endif // SIMDJSON_BUILTIN_BASE_H