смотреть со 2й минуты, все политкоректно и дружелюбно...
интересно, если ли еще подобные рассуждения вслух?
Не читал, но осуждаю! Opinions on this personal blog don't necessarily reflect those of my employer.
for i in `find . -type f -name "file*.png"`; do do_view_port.sh `echo $i | sed -e 's/\.png//' -e 's/^.*_//'` done
find . -type f -name "file*.png" | sed -e 's/\.png//' -e 's/^.*_//' |
parallel -j+0 --eta do_view_port.sh {.}
// Buffer Definitions:
//
// cbuffer FilterBlur
// {
//
// float gXfBlurStart; // Offset: 0 Size: 4
// float gXfBlurWidth; // Offset: 4 Size: 4 [unused]
// float2 gXfScreenCenter; // Offset: 8 Size: 8
// float gXfAlpha; // Offset: 16 Size: 4
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ---------------- ---------- ------- ----------- ---- --------
// PointSampler0 sampler NA NA 0 1
// LinearSampler1 sampler NA NA 1 1
// PointSampler0TEXTURE texture float 2d 0 1
// LinearSampler1TEXTURE texture float 2d 1 1
// FilterBlur cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// ---------------- ----- ------ -------- -------- ------ ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
// TEXCOORD 1 zw 1 NONE float
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// ---------------- ----- ------ -------- -------- ------ ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
ps_4_0
dcl_input linear v1.xy
dcl_output o0.xyzw
dcl_constantbuffer cb0[2], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d ( float , float , float , float ) t0
dcl_resource_texture2d ( float , float , float , float ) t1
dcl_temps 2
add r0.xy, v1.xyxx, -cb0[0].zwzz
mad r0.xy, r0.xyxx, cb0[0].xxxx, cb0[0].zwzz
sample r0.xyzw, r0.xyxx, t1.xyzw, s1
sample r1.xyzw, v1.xyxx, t0.xyzw, s0
add r0.xyzw, r0.xyzw, -r1.xyzw
mad o0.xyzw, cb0[1].xxxx, r0.xyzw, r1.xyzw
ret
You must match each call to timeBeginPeriod with a call to timeEndPeriod, specifying the same minimum resolution in both calls. An application can make multiple timeBeginPeriod calls as long as each call is matched with a call to timeEndPeriod.
You must match each call to timeBeginPeriod with a call to timeEndPeriod, specifying the same minimum resolution in both calls. An application can make multiple timeBeginPeriod calls as long as each call is matched with a call to timeEndPeriod.
MMRESULT __stdcall timeBeginPeriod(UINT uPeriod)
{
UINT v1; // esi@1
char *v2; // eax@2
__int16 v3; // cx@3
int v4; // eax@8
MMRESULT v5; // esi@10
MMRESULT result; // eax@11
v1 = uPeriod;
if ( uPeriod < TDD_MAXRESOLUTION )
{
result = 97;
}
else
{
JUMPOUT(uPeriod, dword_41B28FE4, loc_41B0A0A1);
EnterCriticalSection(&ResolutionCritSec);
v2 = (char *)&word_41B28FF6[v1 - TDD_MAXRESOLUTION];
if ( *(_WORD *)v2 == -1 )
{
LeaveCriticalSection(&ResolutionCritSec);
result = 97;
}
else
{
v3 = *(_WORD *)v2 + 1;
*(_WORD *)v2 = v3;
if ( v3 != 1 || v1 >= saved_value_2 )
{
v5 = 0;
}
else
{
if ( WPP_GLOBAL_Control != &WPP_GLOBAL_Control
&& *((_DWORD *)WPP_GLOBAL_Control + 7) & 0x400000
&& *((_BYTE *)WPP_GLOBAL_Control + 25) >= 5u )
WPP_SF_P(
*((_DWORD *)WPP_GLOBAL_Control + 4),
*((_DWORD *)WPP_GLOBAL_Control + 5),
16,
(int)dword_41B02720,
v1);
v4 = 10000 * v1;
uPeriod = 10000 * v1;
if ( 10000 * v1 < MinimumTime )
{
v4 = MinimumTime;
uPeriod = MinimumTime;
}
if ( NtSetTimerResolution(&uPeriod, v4, 1, &uPeriod) < 0 )
{
if ( WPP_GLOBAL_Control != &WPP_GLOBAL_Control && *((_DWORD *)WPP_GLOBAL_Control + 7) & 0x400000 )
{
if ( *((_BYTE *)WPP_GLOBAL_Control + 25) >= 1u )
WPP_SF_P(
*((_DWORD *)WPP_GLOBAL_Control + 4),
*((_DWORD *)WPP_GLOBAL_Control + 5),
17,
(int)dword_41B02720,
v1);
}
--word_41B28FF6[v1 - TDD_MAXRESOLUTION];
v5 = 97;
}
else
{
saved_value = v1;
v5 = 0;
saved_value_2 = (uPeriod + 9900) / 0x2710;
}
}
LeaveCriticalSection(&ResolutionCritSec);
result = v5;
}
}
return result;
}
//----- (41B09FEB) --------------------------------------------------------
MMRESULT __stdcall timeEndPeriod(UINT uPeriod)
{
UINT v1; // esi@1
char *v2; // eax@3
__int16 v3; // cx@4
int v4; // ecx@9
MMRESULT v5; // esi@10
MMRESULT result; // eax@11
char v7; // [sp+4h] [bp-4h]@9
v1 = uPeriod;
if ( uPeriod < TDD_MAXRESOLUTION )
{
result = 97;
}
else
{
if ( uPeriod >= dword_41B28FE4 )
{
result = 0;
}
else
{
EnterCriticalSection(&ResolutionCritSec);
v2 = (char *)&unk_41B28FF6 + 2 * (v1 - TDD_MAXRESOLUTION);
if ( *(_WORD *)v2 )
{
v3 = *(_WORD *)v2 - 1;
*(_WORD *)v2 = v3;
if ( !v3 && v1 == saved_value )
{
while ( v1 < dword_41B28FE4 && !*(_WORD *)v2 )
{
++v1;
v2 += 2;
}
NtSetTimerResolution(dword_41B28FE4, 10000 * saved_value_2, 0, &v7);
saved_value_2 = dword_41B28FE4;
saved_value = v1;
if ( v1 < dword_41B28FE4 )
{
if ( WPP_GLOBAL_Control != &WPP_GLOBAL_Control
&& *((_DWORD *)WPP_GLOBAL_Control + 7) & 0x400000
&& *((_BYTE *)WPP_GLOBAL_Control + 25) >= 5u )
WPP_SF_P(
*((_DWORD *)WPP_GLOBAL_Control + 4),
*((_DWORD *)WPP_GLOBAL_Control + 5),
20,
(int)dword_41B02720,
v1);
if ( NtSetTimerResolution(v4, 10000 * v1, 1, &uPeriod) < 0 )
{
if ( WPP_GLOBAL_Control != &WPP_GLOBAL_Control && *((_DWORD *)WPP_GLOBAL_Control + 7) & 0x400000 )
{
if ( *((_BYTE *)WPP_GLOBAL_Control + 25) >= 1u )
WPP_SF_P(
*((_DWORD *)WPP_GLOBAL_Control + 4),
*((_DWORD *)WPP_GLOBAL_Control + 5),
21,
(int)dword_41B02720,
v1);
}
}
else
{
saved_value_2 = (uPeriod + 9999) / 0x2710;
}
}
}
v5 = 0;
}
else
{
v5 = 97;
}
LeaveCriticalSection(&ResolutionCritSec);
result = v5;
}
}
return result;
}
if ( !v3 && v1 == saved_value )inside timeEndPeriod, right :)?
MMRESULT __stdcall timeGetDevCaps(LPTIMECAPS ptc, UINT cbtc)
{
MMRESULT result; // eax@3
if ( cbtc >= 8 && ptc )
{
ptc->wPeriodMin = TDD_MAXRESOLUTION;
ptc->wPeriodMax = 1000000;
result = 0;
}
else
{
result = 97;
}
return result;
|
|||||||||||||||||
|
|||||||||||||||||
|
|||||||||||||||||
tbb::tick_count start = tbb::tick_count::now();
parallel_invoke( [&]() {preload(argv[1],first);},[&]() {preload(argv[2],second);} );
// preload #1 0.118449 seconds , :: parallel_invoke
// preload #2 0.130777 seconds , :: preload, preload
can be, as you can see, ~10% faster ( measured via tbb::tick_count, for sure )