From patchwork Tue May 19 12:12:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Medvedkin X-Patchwork-Id: 70429 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A8130A0093; Tue, 19 May 2020 14:13:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3B5E61D603; Tue, 19 May 2020 14:13:11 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 2592A1D17A for ; Tue, 19 May 2020 14:13:08 +0200 (CEST) IronPort-SDR: UDyakGzUoIbeG6blDHe2dGHQgosGGJzZokn+KLpIzKQQvwAfOaxQaQOcfANMFIUw+zDjNKcTuG foZ+xL6HPsXw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 05:13:08 -0700 IronPort-SDR: ey3Vb5f01eWyZs/GpQ0XWlgJsoBkizanCV/cwKVgmED8w9t6Q2qmTZt2OhlEuvTtOdWToCQGKL ZwQ5N829xiAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,410,1583222400"; d="scan'208";a="288938419" Received: from silpixa00400072.ir.intel.com ([10.237.222.213]) by fmsmga004.fm.intel.com with ESMTP; 19 May 2020 05:13:07 -0700 From: Vladimir Medvedkin To: dev@dpdk.org Cc: konstantin.ananyev@intel.com, bruce.richardson@intel.com Date: Tue, 19 May 2020 13:12:56 +0100 Message-Id: <895e07b9a83234251f3a6b6a43dc360ee9b7edc6.1589890262.git.vladimir.medvedkin@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v3 1/8] eal: introduce zmm type for AVX 512-bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" New data type to manipulate 512 bit AVX values. Signed-off-by: Vladimir Medvedkin Acked-by: Konstantin Ananyev --- lib/librte_eal/x86/include/rte_vect.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/librte_eal/x86/include/rte_vect.h b/lib/librte_eal/x86/include/rte_vect.h index df5a607..ffe4f7d 100644 --- a/lib/librte_eal/x86/include/rte_vect.h +++ b/lib/librte_eal/x86/include/rte_vect.h @@ -90,6 +90,26 @@ __extension__ ({ \ }) #endif /* (defined(__ICC) && __ICC < 1210) */ +#ifdef __AVX512F__ + +typedef __m512i __x86_zmm_t; + +#define ZMM_SIZE (sizeof(__x86_zmm_t)) +#define ZMM_MASK (ZMM_SIZE - 1) + +typedef union __rte_x86_zmm { + __x86_zmm_t z; + ymm_t y[ZMM_SIZE / sizeof(ymm_t)]; + xmm_t x[ZMM_SIZE / sizeof(xmm_t)]; + uint8_t u8[ZMM_SIZE / sizeof(uint8_t)]; + uint16_t u16[ZMM_SIZE / sizeof(uint16_t)]; + uint32_t u32[ZMM_SIZE / sizeof(uint32_t)]; + uint64_t u64[ZMM_SIZE / sizeof(uint64_t)]; + double pd[ZMM_SIZE / sizeof(double)]; +} __attribute__((__aligned__(ZMM_SIZE))) __rte_x86_zmm_t; + +#endif /* __AVX512F__ */ + #ifdef __cplusplus } #endif