aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/array3d.h
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/compiler/xla/array3d.h')
-rw-r--r--tensorflow/compiler/xla/array3d.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/tensorflow/compiler/xla/array3d.h b/tensorflow/compiler/xla/array3d.h
index 46bc1a6392..654af8f030 100644
--- a/tensorflow/compiler/xla/array3d.h
+++ b/tensorflow/compiler/xla/array3d.h
@@ -39,15 +39,11 @@ class Array3D {
public:
// Creates an array of dimensions n1 x n2 x n3, uninitialized values.
Array3D(const int64 n1, const int64 n2, const int64 n3)
- : n1_(n1), n2_(n2), n3_(n3) {
- values_.resize(n1 * n2 * n3);
- }
+ : n1_(n1), n2_(n2), n3_(n3), values_(n1 * n2 * n3) {}
// Creates an array of dimensions n1 x n2 x n3, initialized to value.
Array3D(const int64 n1, const int64 n2, const int64 n3, const T value)
- : Array3D(n1, n2, n3) {
- Fill(value);
- }
+ : n1_(n1), n2_(n2), n3_(n3), values_(n1 * n2 * n3, value) {}
// Creates an array from the given nested initializer list. The outer
// initializer list is the first dimension, and so on.