From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 11262A0526; Wed, 8 Jul 2020 22:17:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D09C1DC5E; Wed, 8 Jul 2020 22:16:54 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id B38F31D942 for ; Wed, 8 Jul 2020 22:16:50 +0200 (CEST) IronPort-SDR: twM7Ag+45Z/2ENwQns+F/URVIilJspymfl5Dt0OQczzevZGLhJliv49HQSVNBvPBn+E/Jhyo2g incgczbfmAYQ== X-IronPort-AV: E=McAfee;i="6000,8403,9676"; a="135346078" X-IronPort-AV: E=Sophos;i="5.75,329,1589266800"; d="scan'208";a="135346078" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2020 13:16:49 -0700 IronPort-SDR: BMw/eumzXmBqf5s/JwQRS/s7kOc7+SFvi9UsG18fpirs+AaXVeGfnkcLthLOGZHYWVZSfgbGf+ 2pFsix93KMPg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,329,1589266800"; d="scan'208";a="315988579" Received: from silpixa00400322.ir.intel.com ([10.237.214.86]) by fmsmga002.fm.intel.com with ESMTP; 08 Jul 2020 13:16:48 -0700 From: Vladimir Medvedkin To: dev@dpdk.org Cc: konstantin.ananyev@intel.com, bruce.richardson@intel.com Date: Wed, 8 Jul 2020 21:16:06 +0100 Message-Id: <98b10e12eb46cff65494a94eaf0f04b2dcefd245.1594238610.git.vladimir.medvedkin@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v4 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 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/librte_eal/x86/include/rte_vect.h b/lib/librte_eal/x86/include/rte_vect.h index df5a60762..ae59126bc 100644 --- a/lib/librte_eal/x86/include/rte_vect.h +++ b/lib/librte_eal/x86/include/rte_vect.h @@ -13,6 +13,7 @@ #include #include +#include #include "generic/rte_vect.h" #if (defined(__ICC) || \ @@ -90,6 +91,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)]; +} __rte_aligned(ZMM_SIZE) __rte_x86_zmm_t; + +#endif /* __AVX512F__ */ + #ifdef __cplusplus } #endif -- 2.17.1