fix no-orc builds
This commit is contained in:
parent
95a74cbf28
commit
3115310bb7
@ -110,11 +110,12 @@ VipsVector *vips_vector_new( const char *name, int dsize );
|
|||||||
|
|
||||||
void vips_vector_constant( VipsVector *vector,
|
void vips_vector_constant( VipsVector *vector,
|
||||||
char *name, int value, int size );
|
char *name, int value, int size );
|
||||||
int vips_vector_source_name( VipsVector *vector, char *name, int size );
|
|
||||||
void vips_vector_source_scanline( VipsVector *vector,
|
void vips_vector_source_scanline( VipsVector *vector,
|
||||||
char *name, int line, int size );
|
char *name, int line, int size );
|
||||||
void vips_vector_temporary( VipsVector *vector, char *name, int size );
|
int vips_vector_source_name( VipsVector *vector, const char *name, int size );
|
||||||
int vips_vector_parameter( VipsVector *vector, char *name, int size );
|
void vips_vector_temporary( VipsVector *vector, const char *name, int size );
|
||||||
|
int vips_vector_parameter( VipsVector *vector, const char *name, int size );
|
||||||
|
int vips_vector_destination( VipsVector *vector, const char *name, int size );
|
||||||
void vips_vector_asm2( VipsVector *vector,
|
void vips_vector_asm2( VipsVector *vector,
|
||||||
const char *op, const char *a, const char *b );
|
const char *op, const char *a, const char *b );
|
||||||
void vips_vector_asm3( VipsVector *vector,
|
void vips_vector_asm3( VipsVector *vector,
|
||||||
|
@ -177,6 +177,7 @@ vips_vector_new( const char *name, int dsize )
|
|||||||
#ifdef DEBUG_TRACE
|
#ifdef DEBUG_TRACE
|
||||||
printf( "%s = orc_program_new();\n", vector->unique_name );
|
printf( "%s = orc_program_new();\n", vector->unique_name );
|
||||||
#endif /*DEBUG_TRACE*/
|
#endif /*DEBUG_TRACE*/
|
||||||
|
#endif /*HAVE_ORC*/
|
||||||
|
|
||||||
/* We always make d1, our callers make either a single point source, or
|
/* We always make d1, our callers make either a single point source, or
|
||||||
* for area ops, a set of scanlines.
|
* for area ops, a set of scanlines.
|
||||||
@ -185,14 +186,7 @@ vips_vector_new( const char *name, int dsize )
|
|||||||
* var you create will have id 0 :-( The first var is unlikely to fail
|
* var you create will have id 0 :-( The first var is unlikely to fail
|
||||||
* anyway.
|
* anyway.
|
||||||
*/
|
*/
|
||||||
vector->d1 = orc_program_add_destination( vector->program,
|
vector->d1 = vips_vector_destination( vector, "d1", dsize );
|
||||||
dsize, "d1" );
|
|
||||||
#ifdef DEBUG_TRACE
|
|
||||||
printf( "orc_program_add_destination( %s, %d, \"d1\" );\n",
|
|
||||||
vector->unique_name, dsize );
|
|
||||||
#endif /*DEBUG_TRACE*/
|
|
||||||
vector->n_destination += 1;
|
|
||||||
#endif /*HAVE_ORC*/
|
|
||||||
|
|
||||||
return( vector );
|
return( vector );
|
||||||
}
|
}
|
||||||
@ -274,29 +268,6 @@ vips_vector_constant( VipsVector *vector, char *name, int value, int size )
|
|||||||
#endif /*HAVE_ORC*/
|
#endif /*HAVE_ORC*/
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
vips_vector_source_name( VipsVector *vector, char *name, int size )
|
|
||||||
{
|
|
||||||
int var;
|
|
||||||
|
|
||||||
#ifdef HAVE_ORC
|
|
||||||
g_assert( orc_program_find_var_by_name( vector->program, name ) == -1 );
|
|
||||||
|
|
||||||
if( !(var = orc_program_add_source( vector->program, size, name )) )
|
|
||||||
vips_vector_error( vector );
|
|
||||||
vector->s[vector->n_source] = var;
|
|
||||||
#ifdef DEBUG_TRACE
|
|
||||||
printf( "orc_program_add_source( %s, %d, \"%s\" );\n",
|
|
||||||
vector->unique_name, size, name );
|
|
||||||
#endif /*DEBUG_TRACE*/
|
|
||||||
vector->n_source += 1;
|
|
||||||
#else /*!HAVE_ORC*/
|
|
||||||
var = -1;
|
|
||||||
#endif /*HAVE_ORC*/
|
|
||||||
|
|
||||||
return( var );
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
vips_vector_source_scanline( VipsVector *vector,
|
vips_vector_source_scanline( VipsVector *vector,
|
||||||
char *name, int line, int size )
|
char *name, int line, int size )
|
||||||
@ -321,8 +292,31 @@ vips_vector_source_scanline( VipsVector *vector,
|
|||||||
#endif /*HAVE_ORC*/
|
#endif /*HAVE_ORC*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
vips_vector_source_name( VipsVector *vector, const char *name, int size )
|
||||||
|
{
|
||||||
|
int var;
|
||||||
|
|
||||||
|
#ifdef HAVE_ORC
|
||||||
|
g_assert( orc_program_find_var_by_name( vector->program, name ) == -1 );
|
||||||
|
|
||||||
|
if( !(var = orc_program_add_source( vector->program, size, name )) )
|
||||||
|
vips_vector_error( vector );
|
||||||
|
vector->s[vector->n_source] = var;
|
||||||
|
#ifdef DEBUG_TRACE
|
||||||
|
printf( "orc_program_add_source( %s, %d, \"%s\" );\n",
|
||||||
|
vector->unique_name, size, name );
|
||||||
|
#endif /*DEBUG_TRACE*/
|
||||||
|
vector->n_source += 1;
|
||||||
|
#else /*!HAVE_ORC*/
|
||||||
|
var = -1;
|
||||||
|
#endif /*HAVE_ORC*/
|
||||||
|
|
||||||
|
return( var );
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
vips_vector_temporary( VipsVector *vector, char *name, int size )
|
vips_vector_temporary( VipsVector *vector, const char *name, int size )
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ORC
|
#ifdef HAVE_ORC
|
||||||
g_assert( orc_program_find_var_by_name( vector->program, name ) == -1 );
|
g_assert( orc_program_find_var_by_name( vector->program, name ) == -1 );
|
||||||
@ -339,7 +333,7 @@ vips_vector_temporary( VipsVector *vector, char *name, int size )
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
vips_vector_parameter( VipsVector *vector, char *name, int size )
|
vips_vector_parameter( VipsVector *vector, const char *name, int size )
|
||||||
{
|
{
|
||||||
int var;
|
int var;
|
||||||
|
|
||||||
@ -362,6 +356,27 @@ vips_vector_parameter( VipsVector *vector, char *name, int size )
|
|||||||
return ( var );
|
return ( var );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
vips_vector_destination( VipsVector *vector, const char *name, int size )
|
||||||
|
{
|
||||||
|
int var;
|
||||||
|
|
||||||
|
#ifdef HAVE_ORC
|
||||||
|
g_assert( orc_program_find_var_by_name( vector->program, name ) == -1 );
|
||||||
|
|
||||||
|
var = orc_program_add_destination( vector->program, size, name );
|
||||||
|
#ifdef DEBUG_TRACE
|
||||||
|
printf( "orc_program_add_destination( %d, \"%s\" );\n",
|
||||||
|
size, name );
|
||||||
|
#endif /*DEBUG_TRACE*/
|
||||||
|
vector->n_destination += 1;
|
||||||
|
#else /*!HAVE_ORC*/
|
||||||
|
var = -1;
|
||||||
|
#endif /*HAVE_ORC*/
|
||||||
|
|
||||||
|
return( var );
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
vips_vector_full( VipsVector *vector )
|
vips_vector_full( VipsVector *vector )
|
||||||
{
|
{
|
||||||
|
@ -167,11 +167,11 @@ vips_reducev_compile_section( VipsReducev *reducev, Pass *pass, gboolean first )
|
|||||||
/* We have two destinations: the final output image (8-bit) and the
|
/* We have two destinations: the final output image (8-bit) and the
|
||||||
* intermediate buffer if this is not the final pass (16-bit).
|
* intermediate buffer if this is not the final pass (16-bit).
|
||||||
*/
|
*/
|
||||||
pass->d2 = orc_program_add_destination( v->program, 2, "d2" );
|
pass->d2 = vips_vector_destination( v, "d2", 2 );
|
||||||
|
|
||||||
/* "r" is the array of sums from the previous pass (if any).
|
/* "r" is the array of sums from the previous pass (if any).
|
||||||
*/
|
*/
|
||||||
pass->r = vips_vector_source_name( v, (char *) "r", 2 );
|
pass->r = vips_vector_source_name( v, "r", 2 );
|
||||||
|
|
||||||
/* The value we fetch from the image, the accumulated sum.
|
/* The value we fetch from the image, the accumulated sum.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user