Unverified Commit 49349a57 authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

Pretty format for opt_kernels (#4492)

Co-authored-by: 's avatarSang Ik Lee <sang.ik.lee@intel.com>
parent b007440a
......@@ -40,7 +40,11 @@ namespace ngraph
{
for (index[1] = 0; index[1] < out_shape[1]; ++index[1])
{
out[index[0] * out_strides[0] + index[1]] = in[in_index];
// clang-format off
out[index[0] * out_strides[0] +
index[1]] =
in[in_index];
// clang-format on
}
}
}
......@@ -59,8 +63,12 @@ namespace ngraph
{
for (index[2] = 0; index[2] < out_shape[2]; ++index[2])
{
out[index[0] * out_strides[0] + index[1] * out_strides[1] + index[2]] =
in[in_index];
// clang-format off
out[index[0] * out_strides[0] +
index[1] * out_strides[1] +
index[2]] =
in[in_index];
// clang-format on
}
}
}
......@@ -81,8 +89,13 @@ namespace ngraph
{
for (index[3] = 0; index[3] < out_shape[3]; ++index[3])
{
out[index[0] * out_strides[0] + index[1] * out_strides[1] +
index[2] * out_strides[2] + index[3]] = in[in_index];
// clang-format off
out[index[0] * out_strides[0] +
index[1] * out_strides[1] +
index[2] * out_strides[2] +
index[3]] =
in[in_index];
// clang-format on
}
}
}
......@@ -106,9 +119,14 @@ namespace ngraph
{
for (index[4] = 0; index[4] < out_shape[4]; ++index[4])
{
out[index[0] * out_strides[0] + index[1] * out_strides[1] +
index[2] * out_strides[2] + index[3] * out_strides[3] +
index[4]] = in[in_index];
// clang-format off
out[index[0] * out_strides[0] +
index[1] * out_strides[1] +
index[2] * out_strides[2] +
index[3] * out_strides[3] +
index[4]] =
in[in_index];
// clang-format on
}
}
}
......@@ -135,9 +153,15 @@ namespace ngraph
{
for (index[5] = 0; index[5] < out_shape[5]; ++index[5])
{
out[index[0] * out_strides[0] + index[1] * out_strides[1] +
index[2] * out_strides[2] + index[3] * out_strides[3] +
index[4] * out_strides[4] + index[5]] = in[in_index];
// clang-format off
out[index[0] * out_strides[0] +
index[1] * out_strides[1] +
index[2] * out_strides[2] +
index[3] * out_strides[3] +
index[4] * out_strides[4] +
index[5]] =
in[in_index];
// clang-format on
}
}
}
......
......@@ -76,7 +76,10 @@ namespace ngraph
{
for (in_index[1] = 0; in_index[1] < size[1]; ++in_index[1])
{
*out++ = in[*map_index[0] * in_shape[1] + *map_index[1]];
// clang-format off
*out++ = in[*map_index[0] * in_shape[1] +
*map_index[1]];
// clang-format on
}
}
}
......@@ -102,8 +105,11 @@ namespace ngraph
{
for (in_index[2] = 0; in_index[2] < size[2]; ++in_index[2])
{
// clang-format off
*out++ = in[*map_index[0] * in_shape[1] * in_shape[2] +
*map_index[1] * in_shape[2] + *map_index[2]];
*map_index[1] * in_shape[2] +
*map_index[2]];
// clang-format on
}
}
}
......@@ -132,10 +138,13 @@ namespace ngraph
{
for (in_index[3] = 0; in_index[3] < size[3]; ++in_index[3])
{
// clang-format off
*out++ =
in[*map_index[0] * in_shape[1] * in_shape[2] * in_shape[3] +
*map_index[1] * in_shape[2] * in_shape[3] +
*map_index[2] * in_shape[3] + *map_index[3]];
*map_index[2] * in_shape[3] +
*map_index[3]];
// clang-format on
}
}
}
......@@ -167,12 +176,14 @@ namespace ngraph
{
for (in_index[4] = 0; in_index[4] < size[4]; ++in_index[4])
{
// clang-format off
*out++ =
in[*map_index[0] * in_shape[1] * in_shape[2] * in_shape[3] *
in_shape[4] +
in[*map_index[0] * in_shape[1] * in_shape[2] * in_shape[3] * in_shape[4] +
*map_index[1] * in_shape[2] * in_shape[3] * in_shape[4] +
*map_index[2] * in_shape[3] * in_shape[4] +
*map_index[3] * in_shape[4] + *map_index[4]];
*map_index[3] * in_shape[4] +
*map_index[4]];
// clang-format on
}
}
}
......@@ -207,14 +218,14 @@ namespace ngraph
{
for (in_index[5] = 0; in_index[5] < size[5]; ++in_index[5])
{
*out++ = in[*map_index[0] * in_shape[1] * in_shape[2] *
in_shape[3] * in_shape[4] * in_shape[5] +
*map_index[1] * in_shape[2] * in_shape[3] *
in_shape[4] * in_shape[5] +
*map_index[2] * in_shape[3] * in_shape[4] *
in_shape[5] +
// clang-format off
*out++ = in[*map_index[0] * in_shape[1] * in_shape[2] * in_shape[3] * in_shape[4] * in_shape[5] +
*map_index[1] * in_shape[2] * in_shape[3] * in_shape[4] * in_shape[5] +
*map_index[2] * in_shape[3] * in_shape[4] * in_shape[5] +
*map_index[3] * in_shape[4] * in_shape[5] +
*map_index[4] * in_shape[5] + *map_index[5]];
*map_index[4] * in_shape[5] +
*map_index[5]];
// clang-format on
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment