As you know by now, as a rule most functionality in C++ AMP is in the *concurrency* namespace. The exception to that is the C++ AMP math library which introduces two sub namespaces (*precise_math* and *fast_math*), and the textures and short vector types which introduce one sub namespace (graphics).

The other sub namespace is *direct3d*.

## direct3d namespace

You’ve already seen in the *concurrency::direct3d* namespace four DirectX Interop APIs. In *concurrency::graphics::direct3d* there are two more for interop with textures, plus some aliased functions for short vector types.

In the *concurrency::direct3d* namespace there are also 20 functions that you can find in <amp.h>. These intrinsics are offered when you do HLSL programming and, we decided to offer them through C++ AMP too. You can only call them from restrict(amp) functions. The list below is for your reference and it includes links to the HLSL documentation (I also encourage you to open the header file and look at our xml comments in there for each function).

- int abs(int _X)
- float clamp(float _X, float _Min, float _Max)
- int clamp(int _X, int _Min, int _Max)
- unsigned int countbits(unsigned int _X)
- int firstbithigh(int _X)
- int firstbitlow(int _X)
- int imax(int _X, int _Y)
- int imin(int _X, int _Y)
- float mad(float _X, float _Y, float _Z)
- double mad(double _X, double _Y, double _Z)
- int mad(int _X, int _Y, int _Z)
- unsigned int mad(unsigned int _X, unsigned int _Y, unsigned int _Z)
- float noise(float _X)
- float radians(float _X)
- float rcp(float _X)
- unsigned int reversebits(unsigned int _X)
- float saturate(float _X)
- int sign(int _X)
- float smoothstep(float _Min, float _Max, float _X)
- float step(float _Y, float _X)

And that is all you will find in the *direct3d* namespace.

## HLSL intrinsics

Beyond the aforementioned 20 functions, you may be wondering about other HLSL intrinsics and access to them through C++ AMP. Well, if we haven’t wrapped them for you, then you cannot use them. However we have done exactly that for many of them in our fast_math namespace, debug functions, memory fences & barriers, and our atomic operations. If there are other intrinsics that we left out, please ask us about them (e.g. in our MSDN Forum) so we can potentially suggest a workaround or so we can consider them for a future release…