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 250C8A0352; Thu, 14 May 2020 14:28:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D41F31D8FB; Thu, 14 May 2020 14:28:38 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 97AA41D8E4 for ; Thu, 14 May 2020 14:28:35 +0200 (CEST) IronPort-SDR: vdbF+v4bUE8+WvaOwPhtmcHQ5yX+RbkKATxODPu9Du4ZZLSnG6c+7/fbguCLsbF9dmp0hbv/0h WlxnLui01wxg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 05:28:35 -0700 IronPort-SDR: 8BVHQYYEitY66apS1jBAauCYOkBR0rERKZbVpUW8S850yqp6n/jtzO0Qgy71pak2n0+6MWEVHu feQGPHpYzhKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,391,1583222400"; d="scan'208";a="464313898" Received: from silpixa00400072.ir.intel.com ([10.237.222.213]) by fmsmga005.fm.intel.com with ESMTP; 14 May 2020 05:28:34 -0700 From: Vladimir Medvedkin To: dev@dpdk.org Cc: konstantin.ananyev@intel.com, bruce.richardson@intel.com Date: Thu, 14 May 2020 13:28:25 +0100 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: <1583757826-375246-1-git-send-email-vladimir.medvedkin@intel.com> Subject: [dpdk-dev] [PATCH v2 1/6] 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 --- 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 -- 2.7.4