From 66e31e19cb85680cc6f1753efc0a6c7f2e43cf18 Mon Sep 17 00:00:00 2001 From: Elias Kohout Date: Thu, 7 Sep 2023 19:42:32 +0200 Subject: [PATCH] Changed array equals function definition. --- tensorarray.c | 4 ++-- tensorarray.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorarray.c b/tensorarray.c index 2371568..784d1bb 100644 --- a/tensorarray.c +++ b/tensorarray.c @@ -1,6 +1,6 @@ #include "tensorarray.h" -bool tarray_equals(dtype* a1, dtype* a2, uint32_t len) +bool tarray_equals(const dtype* a1, const dtype* a2, uint32_t len) { /* Checks whether to arrays are equal. If one or both arrays are array * pointers are NULL, false is returned. @@ -18,7 +18,7 @@ bool tarray_equals(dtype* a1, dtype* a2, uint32_t len) return true; } -bool tarray_uint32_equals(uint32_t* a1, uint32_t* a2, uint32_t len) +bool tarray_uint32_equals(const uint32_t* a1, const uint32_t* a2, uint32_t len) { /* Checks whether to arrays of the type uint32_t are equal. If one or both * arrays are array pointers are NULL, false is returned. diff --git a/tensorarray.h b/tensorarray.h index 8663baa..a71dad4 100644 --- a/tensorarray.h +++ b/tensorarray.h @@ -6,7 +6,7 @@ #include #include "dtype.h" -inline bool tarray_equals(dtype* a1, dtype* a2, uint32_t len); -inline bool tarray_uint32_equals(uint32_t* a1, uint32_t* a2, uint32_t len); +inline bool tarray_equals(const dtype* a1, const dtype* a2, uint32_t len); +inline bool tarray_uint32_equals(const uint32_t* a1, const uint32_t* a2, uint32_t len); #endif // _TENSORARRAY_H_INCLUDED_