Lines Matching refs:srcVector
2455 template <class T> void swizzle_vector_for_image( T *srcVector, const cl_image_format *imageFormat ) in swizzle_vector_for_image() argument
2461 srcVector[ 0 ] = srcVector[ 3 ]; in swizzle_vector_for_image()
2475 srcVector[ 1 ] = srcVector[ 3 ]; in swizzle_vector_for_image()
2478 temp = srcVector[ 3 ]; in swizzle_vector_for_image()
2479 srcVector[ 3 ] = srcVector[ 2 ]; in swizzle_vector_for_image()
2480 srcVector[ 2 ] = srcVector[ 1 ]; in swizzle_vector_for_image()
2481 srcVector[ 1 ] = srcVector[ 0 ]; in swizzle_vector_for_image()
2482 srcVector[ 0 ] = temp; in swizzle_vector_for_image()
2486 temp = srcVector[ 0 ]; in swizzle_vector_for_image()
2487 srcVector[ 0 ] = srcVector[ 2 ]; in swizzle_vector_for_image()
2488 srcVector[ 2 ] = temp; in swizzle_vector_for_image()
2491 srcVector[ 3 ] = srcVector[ 0 ]; in swizzle_vector_for_image()
2492 srcVector[ 2 ] = srcVector[ 0 ]; in swizzle_vector_for_image()
2493 srcVector[ 1 ] = srcVector[ 0 ]; in swizzle_vector_for_image()
2496 srcVector[ 2 ] = srcVector[ 0 ]; in swizzle_vector_for_image()
2497 srcVector[ 1 ] = srcVector[ 0 ]; in swizzle_vector_for_image()
2501 temp = srcVector[ 3 ]; in swizzle_vector_for_image()
2502 srcVector[ 3 ] = srcVector[ 2 ]; in swizzle_vector_for_image()
2503 srcVector[ 2 ] = srcVector[ 1 ]; in swizzle_vector_for_image()
2504 srcVector[ 1 ] = srcVector[ 0 ]; in swizzle_vector_for_image()
2505 srcVector[ 0 ] = temp; in swizzle_vector_for_image()
2510 temp = srcVector[ 0 ]; in swizzle_vector_for_image()
2511 srcVector[ 0 ] = srcVector[ 2 ]; in swizzle_vector_for_image()
2512 srcVector[ 2 ] = temp; in swizzle_vector_for_image()
2520 void pack_image_pixel( unsigned int *srcVector, const cl_image_format *imageFormat, void *outData ) in pack_image_pixel() argument
2522 swizzle_vector_for_image<unsigned int>( srcVector, imageFormat ); in pack_image_pixel()
2531 ptr[ i ] = (unsigned char)SATURATE( srcVector[ i ], 0, 255 ); in pack_image_pixel()
2538 ptr[ i ] = (unsigned short)SATURATE( srcVector[ i ], 0, 65535 ); in pack_image_pixel()
2545 ptr[ i ] = (unsigned int)srcVector[ i ]; in pack_image_pixel()
2553 void pack_image_pixel( int *srcVector, const cl_image_format *imageFormat, void *outData ) in pack_image_pixel() argument
2555 swizzle_vector_for_image<int>( srcVector, imageFormat ); in pack_image_pixel()
2564 ptr[ i ] = (char)SATURATE( srcVector[ i ], -128, 127 ); in pack_image_pixel()
2571 ptr[ i ] = (short)SATURATE( srcVector[ i ], -32768, 32767 ); in pack_image_pixel()
2578 ptr[ i ] = (int)srcVector[ i ]; in pack_image_pixel()
2606 void pack_image_pixel( float *srcVector, const cl_image_format *imageFormat, void *outData ) in pack_image_pixel() argument
2608 swizzle_vector_for_image<float>( srcVector, imageFormat ); in pack_image_pixel()
2620 ptr[ i ] = float2half_rte( srcVector[ i ] ); in pack_image_pixel()
2624 ptr[ i ] = float2half_rtz( srcVector[ i ] ); in pack_image_pixel()
2638 ptr[ i ] = srcVector[ i ]; in pack_image_pixel()
2646 ptr[ i ] = (cl_char)NORMALIZE_SIGNED( srcVector[ i ], -127.0f, 127.f ); in pack_image_pixel()
2653 ptr[ i ] = (short)NORMALIZE_SIGNED( srcVector[ i ], -32767.f, 32767.f ); in pack_image_pixel()
2661 ptr[ 0 ] = (unsigned char)( sRGBmap( srcVector[ 0 ] ) + 0.5 ); in pack_image_pixel()
2662 ptr[ 1 ] = (unsigned char)( sRGBmap( srcVector[ 1 ] ) + 0.5 ); in pack_image_pixel()
2663 ptr[ 2 ] = (unsigned char)( sRGBmap( srcVector[ 2 ] ) + 0.5 ); in pack_image_pixel()
2665 ptr[ 3 ] = (unsigned char)NORMALIZE( srcVector[ 3 ], 255.f ); in pack_image_pixel()
2670 ptr[ i ] = (unsigned char)NORMALIZE( srcVector[ i ], 255.f ); in pack_image_pixel()
2686 ptr[ i ] = (unsigned short)NORMALIZE( srcVector[ i ], 65535.f ); in pack_image_pixel()
2692 ptr[ 0 ] = ( ( (unsigned short)NORMALIZE( srcVector[ 0 ], 31.f ) & 31 ) << 10 ) | in pack_image_pixel()
2693 ( ( (unsigned short)NORMALIZE( srcVector[ 1 ], 31.f ) & 31 ) << 5 ) | in pack_image_pixel()
2694 ( ( (unsigned short)NORMALIZE( srcVector[ 2 ], 31.f ) & 31 ) << 0 ); in pack_image_pixel()
2700 ptr[ 0 ] = ( ( (unsigned short)NORMALIZE( srcVector[ 0 ], 31.f ) & 31 ) << 11 ) | in pack_image_pixel()
2701 ( ( (unsigned short)NORMALIZE( srcVector[ 1 ], 63.f ) & 63 ) << 5 ) | in pack_image_pixel()
2702 ( ( (unsigned short)NORMALIZE( srcVector[ 2 ], 31.f ) & 31 ) << 0 ); in pack_image_pixel()
2708 ptr[ 0 ] = ( ( (unsigned int)NORMALIZE( srcVector[ 0 ], 1023.f ) & 1023 ) << 20 ) | in pack_image_pixel()
2709 ( ( (unsigned int)NORMALIZE( srcVector[ 1 ], 1023.f ) & 1023 ) << 10 ) | in pack_image_pixel()
2710 ( ( (unsigned int)NORMALIZE( srcVector[ 2 ], 1023.f ) & 1023 ) << 0 ); in pack_image_pixel()
2717 ptr[ i ] = (cl_char)CONVERT_INT( srcVector[ i ], -127.0f, 127.f, 127 ); in pack_image_pixel()
2724 ptr[ i ] = (short)CONVERT_INT( srcVector[ i ], -32767.f, 32767.f, 32767 ); in pack_image_pixel()
2731 …ptr[ i ] = (int)CONVERT_INT( srcVector[ i ], MAKE_HEX_FLOAT( -0x1.0p31f, -1, 31), MAKE_HEX_FLOAT( … in pack_image_pixel()
2738 ptr[ i ] = (cl_uchar)CONVERT_UINT( srcVector[ i ], 255.f, CL_UCHAR_MAX ); in pack_image_pixel()
2745 ptr[ i ] = (cl_ushort)CONVERT_UINT( srcVector[ i ], 32767.f, CL_USHRT_MAX ); in pack_image_pixel()
2752 …ptr[ i ] = (cl_uint)CONVERT_UINT( srcVector[ i ], MAKE_HEX_FLOAT( 0x1.fffffep31f, 0x1fffffe, 31-23… in pack_image_pixel()
2761 cl_float f = fmaxf( srcVector[i], -1.0f ); in pack_image_pixel()
2779 void pack_image_pixel_error( const float *srcVector, const cl_image_format *imageFormat, const void… in pack_image_pixel_error() argument
2789 errors[i] = Ulp_Error_Half( ptr[i], srcVector[i] ); in pack_image_pixel_error()
2799 errors[i] = Ulp_Error( ptr[i], srcVector[i] ); in pack_image_pixel_error()
2809 errors[i] = ptr[i] - NORMALIZE_SIGNED_UNROUNDED( srcVector[ i ], -127.0f, 127.f ); in pack_image_pixel_error()
2818 … errors[i] = ptr[i] - NORMALIZE_SIGNED_UNROUNDED( srcVector[ i ], -32767.f, 32767.f ); in pack_image_pixel_error()
2827 errors[i] = ptr[i] - NORMALIZE_UNROUNDED( srcVector[ i ], 255.f ); in pack_image_pixel_error()
2836 errors[i] = ptr[i] - NORMALIZE_UNROUNDED( srcVector[ i ], 65535.f ); in pack_image_pixel_error()
2844 errors[0] = ((ptr[0] >> 10) & 31) - NORMALIZE_UNROUNDED( srcVector[ 0 ], 31.f ); in pack_image_pixel_error()
2845 errors[1] = ((ptr[0] >> 5) & 31) - NORMALIZE_UNROUNDED( srcVector[ 1 ], 31.f ); in pack_image_pixel_error()
2846 errors[2] = ((ptr[0] >> 0) & 31) - NORMALIZE_UNROUNDED( srcVector[ 2 ], 31.f ); in pack_image_pixel_error()
2854 errors[0] = ((ptr[0] >> 11) & 31) - NORMALIZE_UNROUNDED( srcVector[ 0 ], 31.f ); in pack_image_pixel_error()
2855 errors[1] = ((ptr[0] >> 5) & 63) - NORMALIZE_UNROUNDED( srcVector[ 1 ], 63.f ); in pack_image_pixel_error()
2856 errors[2] = ((ptr[0] >> 0) & 31) - NORMALIZE_UNROUNDED( srcVector[ 2 ], 31.f ); in pack_image_pixel_error()
2864 errors[0] = ((ptr[0] >> 20) & 1023) - NORMALIZE_UNROUNDED( srcVector[ 0 ], 1023.f ); in pack_image_pixel_error()
2865 errors[1] = ((ptr[0] >> 10) & 1023) - NORMALIZE_UNROUNDED( srcVector[ 1 ], 1023.f ); in pack_image_pixel_error()
2866 errors[2] = ((ptr[0] >> 0) & 1023) - NORMALIZE_UNROUNDED( srcVector[ 2 ], 1023.f ); in pack_image_pixel_error()
2875 errors[ i ] = ptr[i] - CONVERT_INT( srcVector[ i ], -127.0f, 127.f, 127 ); in pack_image_pixel_error()
2883 errors[i] = ptr[ i ] - CONVERT_INT( srcVector[ i ], -32767.f, 32767.f, 32767 ); in pack_image_pixel_error()
2890 …errors[i] = (cl_float)((cl_long) ptr[ i ] - (cl_long) CONVERT_INT( srcVector[ i ], MAKE_HEX_FLOAT(… in pack_image_pixel_error()
2897 … errors[i] = (cl_int) ptr[ i ] - (cl_int) CONVERT_UINT( srcVector[ i ], 255.f, CL_UCHAR_MAX ); in pack_image_pixel_error()
2904 … errors[i] = (cl_int) ptr[ i ] - (cl_int) CONVERT_UINT( srcVector[ i ], 32767.f, CL_USHRT_MAX ); in pack_image_pixel_error()
2911 …errors[i] = (cl_float)((cl_long) ptr[ i ] - (cl_long)CONVERT_UINT( srcVector[ i ], MAKE_HEX_FLOAT(… in pack_image_pixel_error()
2920 …errors[i] = ptr[i] - NORMALIZE_SIGNED_UNROUNDED( ((int) srcVector[ i ] - 16384), -16384.f, 49151.f… in pack_image_pixel_error()