summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes_vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/nodes_vector.h')
-rw-r--r--compiler/optimizing/nodes_vector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes_vector.h b/compiler/optimizing/nodes_vector.h
index 6a60d6be01..a5f5720f7e 100644
--- a/compiler/optimizing/nodes_vector.h
+++ b/compiler/optimizing/nodes_vector.h
@@ -1529,6 +1529,11 @@ class HVecPredNot final : public HVecPredSetOperation {
DEFAULT_COPY_CONSTRUCTOR(VecPredNot);
};
+// Return the number of elements of the given type that will fit into a vector of given size.
+inline size_t GetNumberOfElementsInVector(size_t vector_size_in_bytes, DataType::Type type) {
+ return vector_size_in_bytes / DataType::Size(type);
+}
+
} // namespace art
#endif // ART_COMPILER_OPTIMIZING_NODES_VECTOR_H_