pitrou commented on a change in pull request #7029:
URL: https://github.com/apache/arrow/pull/7029#discussion_r421433620



##########
File path: cpp/src/arrow/util/spaced_sse_table_codegen.py
##########
@@ -0,0 +1,208 @@
+#!/bin/python
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Generate the mask of lookup table for spaced compress and expand
+# Modified from original source:
+# https://github.com/lemire/simdprune/blob/master/scripts/epi32.py
+# https://github.com/lemire/simdprune/blob/master/scripts/epi8.py
+# The original copyright notice follows.
+
+# This code is released under the
+# Apache License Version 2.0 http://www.apache.org/licenses/.
+# (c) Daniel Lemire
+
+# Usage: python3 spaced_sse_table_codegen.py > spaced_sse_table_generated.cc
+
+
+def print_mask_expand_table(pack_width, mask_length):
+    """
+    Generate the lookup mask table for SSE expand shuffle control mask.
+    Ex, for epi32 full table(pack_width = 4(32/8), mask_length = 16(128/8)), 
the available mask

Review comment:
       For me, this doesn't really make things much clearer. What is a "epi32"? 
What does "pack_width = 4(32/8)" mean? Also, what does the special value "0x80" 
mean? Why "0x80"?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to