Udostępnij za pośrednictwem


_mm_stream_ss

Microsoft Specific

Writes 32-bit data to a memory location without polluting the caches.

void _mm_stream_ss(
   float * Dest,
   __m128 Source
);

Parameters

  • [out] Dest
    A pointer to the location where the source data is written.

  • [in] Source
    A 128-bit number that contains the float value to be written in its bottom 32 bits..

Return Value

None.

Requirements

Intrinsic

Architecture

_mm_stream_ss

SSE4a

Header file <intrin.h>

Remarks

This intrinsic generates the movntss instruction. To determine hardware support for this instruction, call the __cpuid intrinsic with InfoType=0x80000001and check bit 6 of CPUInfo[2] (ECX). This bit is 1 when the instruction is supported, and 0 otherwise.

If you run code that uses the _mm_stream_ss intrinsic on hardware that does not support the movntss instruction, the results are unpredictable.

Example

// Compile this sample with: /EHsc
#include <iostream>
#include <intrin.h>
using namespace std;

int main()
{
    __m128 vals;
    float f[4];

    f[0] = -1.;
    f[1] = -2.;
    f[2] = -3.;
    f[3] = -4.;
    vals.m128_f32[0] = 0.;
    vals.m128_f32[1] = 1.;
    vals.m128_f32[2] = 2.;
    vals.m128_f32[3] = 3.;
    _mm_stream_ss(&f[3], vals);
    cout << "f[0] = " << f[0] << ", f[1] = " << f[1] << endl;
    cout << "f[1] = " << f[1] << ", f[3] = " << f[3] << endl;
}
f[0] = -1, f[1] = -2
f[2] = -3, f[3] = 3

END Microsoft Specific

Copyright 2007 by Advanced Micro Devices, Inc. All rights reserved. Reproduced with permission from Advanced Micro Devices, Inc.

See Also

Reference

_mm_stream_sd

_mm_stream_ps

_mm_store_ss

_mm_sfence

Streaming SIMD Extensions that Support the Cache

Compiler Intrinsics