From 54c082dc354878fb9138e613cf2956c64ae12123 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Thu, 4 Jun 2015 09:41:16 +0100 Subject: [PATCH] Allow traceIndex on a different index to distribute replicated across a vector index --- lib/tensors/Tensor_trace.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/tensors/Tensor_trace.h b/lib/tensors/Tensor_trace.h index f6778496..9c85080e 100644 --- a/lib/tensors/Tensor_trace.h +++ b/lib/tensors/Tensor_trace.h @@ -72,5 +72,18 @@ auto traceIndex(const iMatrix &arg) -> iMatrix::TensorLevel != Level >::type * =nullptr> inline +auto traceIndex(const iVector &arg) -> iVector(arg._internal[0])),N> +{ + iVector(arg._internal[0])),N> ret; + for(int i=0;i(arg._internal[i]); + } + return ret; +} + } #endif