Please enter what you're looking for to continue your search
 

_mm256_add_pd
ADD TO COMPARE ADDED TO COMPARE

 Location: Arithmetic  >  Vector Add
 CPU Extensions: AVX
Purpose:
Add packed double-precision (64-bit) floating-point elements in a and b
Result:

A 256-bit vector that contains the result of the addition.

Example:
#include <immintrin.h>
#include <stdio.h>
int main() {
 __m256d a = _mm256_set_pd(1.5, 2.5, 3.5, 4.5);
 __m256d b = _mm256_set_pd(4.0, 3.0, 2.0, 1.0);
 __m256d result = _mm256_add_pd(a, b);
 double* res = (double*)&result;
 for (int i = 0; i < 4; ++i) {
   printf("%f ", res[i]);
  }
  printf("\n");

  return 0;
 }

Prototypes

Assembly Instruction:
vaddpd
Usage:
__m256d result = _mm256_add_pd( __m256d a, __m256d b )
Performance Metrics:
📊 Unlock Performance Insights

Get access to detailed performance metrics including latency, throughput, and CPU-specific benchmarks for this intrinsic.

SIMD Intrinsics Summary
SIMD Engines: 6
C Intrinsics: 10444
NEON: 4353
AVX2: 405
AVX512: 4717
SSE4.2: 598
VSX: 192
IBM-Z: 179