From: Vincent JARDIN Subject: Re: SIMD accelerated crush_do_rule proof of concept Date: Mon, 29 Aug 2016 16:08:55 +0200 Message-ID: References: <57C41F9E.7090309@dachary.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from mail-wm0-f43.google.com ([74.125.82.43]:37500 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756135AbcH2OJC (ORCPT ); Mon, 29 Aug 2016 10:09:02 -0400 Received: by mail-wm0-f43.google.com with SMTP id i5so94154322wmg.0 for ; Mon, 29 Aug 2016 07:09:01 -0700 (PDT) In-Reply-To: Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Sage Weil , Loic Dachary Cc: Ceph Development Le 29/08/2016 à 15:55, Sage Weil a écrit : > To answer your question, the only real risk/problem I see is that we need > to keep the perfectly in sync with the non-optimized variant I do propose a generic implementation that allows to share SIMD on ARM, Intel and others (Altivec), https://github.com/dachary/ceph/commit/71ae4584d9ed57f70aad718d0ffe206a01e91fef You can try the following, For instance, #include #include { __v32qi va, vb; va = (__v32qi) { 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 4, 1, 0 }; vb = (__v32qi) { 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; __v32qi res = va ^ vb; } it will produce the optimized Neon or AVX, AVX2 according to each targets.