Removed level-0 macros projrs, grabis.

Details:
- Replaced instances of projrs and grabis macros with newer,
  more general-purpose getris.
This commit is contained in:
Field G. Van Zee
2013-02-12 12:23:48 -06:00
parent 03a260a457
commit 474bac30c9
6 changed files with 5 additions and 289 deletions

View File

@@ -75,8 +75,6 @@
#include "bl2_getris.h"
#include "bl2_grabis.h"
#include "bl2_inverts.h"
#include "bl2_invscals.h"
@@ -85,8 +83,6 @@
#include "bl2_neg2s.h"
#include "bl2_projrs.h"
#include "bl2_scals.h"
#include "bl2_scaljs.h"
#include "bl2_scalcjs.h"

View File

@@ -1,139 +0,0 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2013, The University of Texas
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BLIS_GRABIS_H
#define BLIS_GRABIS_H
// grabis
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
#define bl2_ssgrabis( x, y ) \
{ \
(y) = 0.0F; \
}
#define bl2_dsgrabis( x, y ) \
{ \
(y) = 0.0F; \
}
#define bl2_csgrabis( x, y ) \
{ \
(y) = ( float ) (x).imag; \
}
#define bl2_zsgrabis( x, y ) \
{ \
(y) = ( float ) (x).imag; \
}
#define bl2_sdgrabis( x, y ) \
{ \
(y) = 0.0; \
}
#define bl2_ddgrabis( x, y ) \
{ \
(y) = 0.0; \
}
#define bl2_cdgrabis( x, y ) \
{ \
(y) = ( double ) (x).imag; \
}
#define bl2_zdgrabis( x, y ) \
{ \
(y) = ( double ) (x).imag; \
}
#define bl2_scgrabis( x, y ) \
{ \
(y).real = 0.0F; \
(y).imag = 0.0F; \
}
#define bl2_dcgrabis( x, y ) \
{ \
(y).real = 0.0F; \
(y).imag = 0.0F; \
}
#define bl2_ccgrabis( x, y ) \
{ \
(y).real = ( float ) (x).imag; \
(y).imag = 0.0F; \
}
#define bl2_zcgrabis( x, y ) \
{ \
(y).real = ( float ) (x).imag; \
(y).imag = 0.0F; \
}
#define bl2_szgrabis( x, y ) \
{ \
(y).real = 0.0; \
(y).imag = 0.0; \
}
#define bl2_dzgrabis( x, y ) \
{ \
(y).real = 0.0; \
(y).imag = 0.0; \
}
#define bl2_czgrabis( x, y ) \
{ \
(y).real = ( double ) (x).imag; \
(y).imag = 0.0; \
}
#define bl2_zzgrabis( x, y ) \
{ \
(y).real = ( double ) (x).imag; \
(y).imag = 0.0; \
}
#define bl2_sgrabis( x, y ) \
{ \
bl2_ssgrabis( x, y ); \
}
#define bl2_dgrabis( x, y ) \
{ \
bl2_ddgrabis( x, y ); \
}
#define bl2_cgrabis( x, y ) \
{ \
bl2_ccgrabis( x, y ); \
}
#define bl2_zgrabis( x, y ) \
{ \
bl2_zzgrabis( x, y ); \
}
#endif

View File

@@ -1,139 +0,0 @@
/*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2013, The University of Texas
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of The University of Texas nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef BLIS_PROJRS_H
#define BLIS_PROJRS_H
// projrs
// Notes:
// - The first char encodes the type of x.
// - The second char encodes the type of y.
#define bl2_ssprojrs( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_dsprojrs( x, y ) \
{ \
(y) = ( float ) (x); \
}
#define bl2_csprojrs( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_zsprojrs( x, y ) \
{ \
(y) = ( float ) (x).real; \
}
#define bl2_sdprojrs( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_ddprojrs( x, y ) \
{ \
(y) = ( double ) (x); \
}
#define bl2_cdprojrs( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_zdprojrs( x, y ) \
{ \
(y) = ( double ) (x).real; \
}
#define bl2_scprojrs( x, y ) \
{ \
(y).real = ( float ) (x); \
(y).imag = 0.0F; \
}
#define bl2_dcprojrs( x, y ) \
{ \
(y).real = ( float ) (x); \
(y).imag = 0.0F; \
}
#define bl2_ccprojrs( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = 0.0F; \
}
#define bl2_zcprojrs( x, y ) \
{ \
(y).real = ( float ) (x).real; \
(y).imag = 0.0F; \
}
#define bl2_szprojrs( x, y ) \
{ \
(y).real = ( double ) (x); \
(y).imag = 0.0; \
}
#define bl2_dzprojrs( x, y ) \
{ \
(y).real = ( double ) (x); \
(y).imag = 0.0; \
}
#define bl2_czprojrs( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = 0.0; \
}
#define bl2_zzprojrs( x, y ) \
{ \
(y).real = ( double ) (x).real; \
(y).imag = 0.0; \
}
#define bl2_sprojrs( x, y ) \
{ \
bl2_ssprojrs( x, y ); \
}
#define bl2_dprojrs( x, y ) \
{ \
bl2_ddprojrs( x, y ); \
}
#define bl2_cprojrs( x, y ) \
{ \
bl2_ccprojrs( x, y ); \
}
#define bl2_zprojrs( x, y ) \
{ \
bl2_zzprojrs( x, y ); \
}
#endif

View File

@@ -114,9 +114,8 @@ void PASTEMAC(chx,varname)( \
\
for ( i = 0; i < n; ++i ) \
{ \
/* Grab real and imaginary components of chi1. */ \
PASTEMAC2(chx,chxr,projrs)( *chi1, chi1_r ); \
PASTEMAC2(chx,chxr,grabis)( *chi1, chi1_i ); \
/* Get the real and imaginary components of chi1. */ \
PASTEMAC2(chx,chxr,getris)( *chi1, chi1_r, chi1_i ); \
\
/* Replace chi1_r and chi1_i with their absolute values. */ \
chi1_r = bl2_abs( chi1_r ); \

View File

@@ -126,9 +126,8 @@ void PASTEMAC(chx,varname)( \
\
for ( i = 0; i < n; ++i ) \
{ \
/* Grab real and imaginary components of chi1. */ \
PASTEMAC2(chx,chxr,projrs)( *chi1, chi1_r ); \
PASTEMAC2(chx,chxr,grabis)( *chi1, chi1_i ); \
/* Get the real and imaginary components of chi1. */ \
PASTEMAC2(chx,chxr,getris)( *chi1, chi1_r, chi1_i ); \
\
/* Accumulate real component into sumsq, adjusting scale if
needed. */ \

View File

@@ -1 +1 @@
0.0.2-1
0.0.2-3