![]() |
P4C
The P4 Compiler
|
#include <hashexpr.h>
Classes | |
class | Crc |
class | Mask |
class | PhvRef |
class | Random |
class | SExtend |
class | Slice |
class | Stripe |
class | Xor |
class | XorHash |
XOR hashing algorithm implemented on the hashing matrix. More... | |
Public Member Functions | |
virtual void | build_algorithm ()=0 |
virtual bool | check_ixbar (InputXbar *ix, InputXbar::HashTable ht)=0 |
virtual void | dbprint (std::ostream &out) const |
void | find_input (Phv::Ref what, std::vector< ixbar_input_t > &inputs, InputXbar *ix, InputXbar::HashTable hash_table) |
virtual void | gen_data (bitvec &data, int bit, InputXbar *ix, InputXbar::HashTable hash_table) |
void | gen_ixbar_init (ixbar_init_t *ixbar_init, std::vector< ixbar_input_t > &inputs, std::vector< hash_matrix_output_t > &outputs, int logical_hash_bit, InputXbar *ix, InputXbar::HashTable hash_table) |
virtual void | gen_ixbar_inputs (std::vector< ixbar_input_t > &inputs, InputXbar *ix, InputXbar::HashTable hash_table)=0 |
virtual Phv::Ref * | get_ghost_slice () |
std::vector< Phv::Ref > | get_sources (int bit) const |
virtual void | get_sources (int bit, std::vector< Phv::Ref > &) const =0 |
virtual int | input_size ()=0 |
virtual bool | match_phvref (const Phv::Ref &ref) |
bool | operator!= (const HashExpr &a) const |
virtual bool | operator== (const HashExpr &) const =0 |
virtual int | width ()=0 |
![]() | |
void | print () const |
Static Public Member Functions | |
static HashExpr * | create (gress_t, int stage, const value_t &) |
Public Attributes | |
bfn_hash_algorithm_t | hash_algorithm = {} |
int | lineno |
Protected Member Functions | |
HashExpr (int l) | |
Copyright (C) 2024 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
|
inlinevirtual |
Implements P4::IHasDbPrint.
|
virtual |
The function call for PhvRef, Random, Identity, and Crc functions. The input xbar is initialized, and the data returned writes out a vector of inputs. For Stripe, Slice, and others, they recursively will call this function
void HashExpr::gen_ixbar_init | ( | ixbar_init_t * | ixbar_init, |
std::vector< ixbar_input_t > & | inputs, | ||
std::vector< hash_matrix_output_t > & | outputs, | ||
int | logical_hash_bit, | ||
InputXbar * | ix, | ||
InputXbar::HashTable | hash_table ) |
Generating a list of ixbar_input_t and hash_matrix_output_t to be sent to the dynamic_hash library. The vectors are part of the function call as they must be on the stack to avoid using new and delete