Changed array equals function definition.

This commit is contained in:
2023-09-07 19:42:32 +02:00
parent 6f320f593c
commit 66e31e19cb
2 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
#include "tensorarray.h" #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 /* Checks whether to arrays are equal. If one or both arrays are array
* pointers are NULL, false is returned. * pointers are NULL, false is returned.
@@ -18,7 +18,7 @@ bool tarray_equals(dtype* a1, dtype* a2, uint32_t len)
return true; 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 /* Checks whether to arrays of the type uint32_t are equal. If one or both
* arrays are array pointers are NULL, false is returned. * arrays are array pointers are NULL, false is returned.

View File

@@ -6,7 +6,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "dtype.h" #include "dtype.h"
inline bool tarray_equals(dtype* a1, dtype* a2, uint32_t len); inline bool tarray_equals(const dtype* a1, const dtype* a2, uint32_t len);
inline bool tarray_uint32_equals(uint32_t* a1, uint32_t* a2, uint32_t len); inline bool tarray_uint32_equals(const uint32_t* a1, const uint32_t* a2, uint32_t len);
#endif // _TENSORARRAY_H_INCLUDED_ #endif // _TENSORARRAY_H_INCLUDED_