This commit is contained in:
John Cupitt 2010-03-15 18:11:36 +00:00
parent 980c03dd67
commit 55d78a4dcf
4 changed files with 27 additions and 12 deletions

View File

@ -32,6 +32,8 @@
- im_render() mask image generation no longer triggers image calc
- threadgroups scale output buffers with number of threads for smalltile ...
improves SMP scaling for narrow images on many-way machines
- default to max number of processors (--vips-concurrency and IM_CONCURRENCY
set >0 can override) on linux and win32
15/1/10 started 7.21.1
- added "written" callbacks, used to implement write to non-vips formats

6
TODO
View File

@ -1,9 +1,3 @@
- try
vips im_rot90 babe.jpg test2.v
wtf, thinstrip output o.O
- doing im_create_fmask() and friends
- how about im_invalidate_area()? we currently repaint the whole window on

View File

@ -213,7 +213,7 @@ AC_TYPE_SIZE_T
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([getcwd gettimeofday getwd memset munmap putenv realpath strcasecmp strchr strcspn strdup strerror strrchr strspn vsnprintf realpath mkstemp mktemp random rand])
AC_CHECK_FUNCS([getcwd gettimeofday getwd memset munmap putenv realpath strcasecmp strchr strcspn strdup strerror strrchr strspn vsnprintf realpath mkstemp mktemp random rand sysconf])
AC_CHECK_LIB(m,cbrt,[AC_DEFINE(HAVE_CBRT,1,[have cbrt() in libm.])])
AC_CHECK_LIB(m,hypot,[AC_DEFINE(HAVE_HYPOT,1,[have hypot() in libm.])])

View File

@ -146,17 +146,32 @@ im_concurrency_get( void )
{
const char *str;
int nthr;
int x;
/* Tell the threads system how much concurrency we expect.
*/
if( im__concurrency > 0 )
nthr = im__concurrency;
else if( (str = g_getenv( IM_CONCURRENCY )) )
nthr = atoi( str );
else
/* Stick to minimum.
*/
else if( (str = g_getenv( IM_CONCURRENCY )) &&
(x = atoi( str )) > 0 )
nthr = x;
else {
nthr = 1;
#ifdef HAVE_SYSCONF
{
x = sysconf( _SC_NPROCESSORS_ONLN );
if( x > 0 )
nthr = x;
}
#endif /*HAVE_SYSCONF*/
#ifdef OS_WIN32
SYSTEM_INFO si;
GetSystemInfo( &si );
nthr = si.dwNumberOfProcessors;
#endif /*OS_WIN32*/
}
if( nthr < 1 || nthr > IM_MAX_THREADS ) {
nthr = IM_CLIP( 1, nthr, IM_MAX_THREADS );
@ -165,6 +180,10 @@ im_concurrency_get( void )
_( "threads clipped to %d" ), nthr );
}
/* Save for next time around.
*/
im_concurrency_set( nthr );
/*
FIXME .. hmm