1 | */** |

2 | * * Licensed to the Apache Software Foundation (ASF) under one* |

3 | * * or more contributor license agreements. See the NOTICE file* |

4 | * * distributed with this work for additional information* |

5 | * * regarding copyright ownership. The ASF licenses this file* |

6 | * * to you under the Apache License, Version 2.0 (the* |

7 | * * "License"); you may not use this file except in compliance* |

8 | * * with the License. You may obtain a copy of the License at* |

9 | * ** |

10 | * * http://www.apache.org/licenses/LICENSE-2.0* |

11 | * ** |

12 | * * Unless required by applicable law or agreed to in writing,* |

13 | * * software distributed under the License is distributed on an* |

14 | * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY* |

15 | * * KIND, either express or implied. See the License for the* |

16 | * * specific language governing permissions and limitations* |

17 | * * under the License.* |

18 | * */* |

19 | __#ifndef TVM_NODE_NDARRAY_HASH_EQUAL_H___ |

20 | __#define TVM_NODE_NDARRAY_HASH_EQUAL_H___ |

21 | |

22 | __#include <tvm/runtime/ndarray.h>__ |

23 | |

24 | **namespace** tvm { |

25 | |

26 | **class** SEqualReducer; |

27 | **class** SHashReducer; |

28 | |

29 | */*!* |

30 | * * \brief Test two NDArrays for equality.* |

31 | * * \param lhs The left operand.* |

32 | * * \param rhs The right operand.* |

33 | * * \param equal A Reducer class to reduce the structural equality result of two objects.* |

34 | * * See tvm/node/structural_equal.h.* |

35 | * * \param compare_data Whether or not to consider ndarray raw data in the equality testing.* |

36 | * * \return The equality testing result.* |

37 | * */* |

38 | *bool* NDArrayEqual(*const* runtime::NDArray::Container* lhs, *const* runtime::NDArray::Container* rhs, |

39 | SEqualReducer equal, *bool* compare_data); |

40 | |

41 | */*!* |

42 | * * \brief Hash NDArray.* |

43 | * * \param arr The NDArray to compute the hash for.* |

44 | * * \param hash_reduce A Reducer class to reduce the structural hash value.* |

45 | * * See tvm/node/structural_hash.h.* |

46 | * * \param hash_data Whether or not to hash ndarray raw data.* |

47 | * */* |

48 | *void* NDArrayHash(*const* runtime::NDArray::Container* arr, SHashReducer* hash_reduce, *bool* hash_data); |

49 | |

50 | } *// namespace tvm* |

51 | |

52 | __#endif // TVM_NODE_NDARRAY_HASH_EQUAL_H___ |

53 | |