Introduction to Computer Systems Data vs. Instruction

Data vs. Instruction

Vertical: Instruction
Horizontal: Data

  single data multiple data
single
instruction
SISD
-8086
-6502
-6809
SIMD
-Corei7
multiple
instruction
MISD
-?
-High Reliability
-Apollo
MIMD
-nVidia

int inner_product_sisd(int av[], int bv[])
{
    long it i;
    int result = 0;

    for (i = 0; i < VSIZE; i++)
    {
        result += av[i] * bv[i];
    }


    return result;
}

↑ both do same thing ↓ — but SIMD is faster


int inner_product_simd(vec_t av, vec_t bv)
{
    long int i;
    long result = 0;

    vec_t pv = av * bv;

    for (i = 0; i < VSIZE; i++
    {
        result += pv[i]
    }


    return result;
}