mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 17:31:51 +03:00
Implement new Vermicelli16 acceleration functions using SVE2.
The scheme utilises the MATCH and NMATCH instructions to scan for 16 characters at the same rate as vermicelli scans for one. Change-Id: Ie2cef904c56651e6108593c668e9b65bc001a886
This commit is contained in:
committed by
Konstantinos Margaritis
parent
b6a7ee7e84
commit
b54710d208
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
* Copyright (c) 2021, Arm Limited
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -29,6 +30,7 @@
|
||||
#include "accel.h"
|
||||
#include "accelcompile.h"
|
||||
#include "shufticompile.h"
|
||||
#include "vermicellicompile.h"
|
||||
#include "trufflecompile.h"
|
||||
#include "nfagraph/ng_limex_accel.h" /* for constants */
|
||||
#include "util/bitutils.h"
|
||||
@@ -71,6 +73,16 @@ void buildAccelSingle(const AccelInfo &info, AccelAux *aux) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SVE2
|
||||
if (outs <= 16) {
|
||||
aux->accel_type = ACCEL_VERM16;
|
||||
aux->verm16.offset = offset;
|
||||
vermicelli16Build(info.single_stops, (u8 *)&aux->verm16.mask);
|
||||
DEBUG_PRINTF("building vermicelli16\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
DEBUG_PRINTF("attempting shufti for %zu chars\n", outs);
|
||||
if (-1 != shuftiBuildMasks(info.single_stops, (u8 *)&aux->shufti.lo,
|
||||
(u8 *)&aux->shufti.hi)) {
|
||||
|
||||
Reference in New Issue
Block a user