diff --git a/RTCP/Cobalt/CobaltTest/CMakeLists.txt b/RTCP/Cobalt/CobaltTest/CMakeLists.txt index 0849cea4911d786cefe8d6d03333eb4bc6275831..514f4cb87fcbff5a6cf7c65cd6f9ba1f4198be7e 100644 --- a/RTCP/Cobalt/CobaltTest/CMakeLists.txt +++ b/RTCP/Cobalt/CobaltTest/CMakeLists.txt @@ -2,11 +2,6 @@ lofar_package(CobaltTest 1.0 DEPENDS GPUProc OutputProc) -# Handle options USE_CUDA and USE_OPENCL. -if(USE_CUDA AND NOT USE_OPENCL) - add_definitions(-DUSE_CUDA) -elseif(USE_OPENCL AND NOT USE_CUDA) - add_definitions(-DUSE_OPENCL) -endif() +add_definitions(-DUSE_CUDA) add_subdirectory(test) diff --git a/RTCP/Cobalt/GPUProc/CMakeLists.txt b/RTCP/Cobalt/GPUProc/CMakeLists.txt index 4c9c804bcc1f29ec6175ca2720cd23e194040a17..9db80cbd69f49875cb99f94b314ade5496b7c8c5 100644 --- a/RTCP/Cobalt/GPUProc/CMakeLists.txt +++ b/RTCP/Cobalt/GPUProc/CMakeLists.txt @@ -1,49 +1,23 @@ # $Id$ -# Handle options USE_CUDA and USE_OPENCL. -if(USE_CUDA AND NOT USE_OPENCL) - set(_gpuproc_deps "") - - # We use runtime compilation, except for 2 tests compiled by nvcc. - # nvcc passes our C++ flags to GCC for C compilation printing spurious warnings. Suppress. - set(CUDA_PROPAGATE_HOST_FLAGS OFF) - lofar_find_package(CUDA 4.1 REQUIRED) - lofar_find_package(CUDADriver REQUIRED) - - add_definitions(-DUSE_CUDA) - if(LOFAR_BUILD_VARIANT MATCHES "^DEBUG$") - list(APPEND CUDA_NVCC_FLAGS -g -G) - endif() - - if(0) # for dev to see what is available how; disabled to reduce spam - message(STATUS "CUDA_FOUND = ${CUDA_FOUND}") - message(STATUS "CUDA_VERSION_MAJOR = ${CUDA_VERSION_MAJOR}") - message(STATUS "CUDA_VERSION_MINOR = ${CUDA_VERSION_MINOR}") - message(STATUS "CUDA_VERSION = ${CUDA_VERSION}") # sometimes avail if CUDA_VERSION_STRING is not - message(STATUS "CUDA_VERSION_STRING = ${CUDA_VERSION_STRING}") - message(STATUS "CUDA_TOOLKIT_ROOT_DIR = ${CUDA_TOOLKIT_ROOT_DIR}") - message(STATUS "CUDA_SDK_ROOT_DIR = ${CUDA_SDK_ROOT_DIR}") - message(STATUS "CUDA_INCLUDE_DIRS = ${CUDA_INCLUDE_DIRS}") - message(STATUS "CUDA_LIBRARIES = ${CUDA_LIBRARIES}") - message(STATUS "CUDA_CUFFT_LIBRARIES = ${CUDA_CUFFT_LIBRARIES}") - message(STATUS "CUDA_CUBLAS_LIBRARIES = ${CUDA_CUBLAS_LIBRARIES}") - message(STATUS "CUDA_curand_LIBRARY = ${CUDA_curand_LIBRARY}") - message(STATUS "CUDA_cusparse_LIBRARY = ${CUDA_cusparse_LIBRARY}") - message(STATUS "CUDA_npp_LIBRARY = ${CUDA_npp_LIBRARY}") - message(STATUS "CUDA_nvcuvenc_LIBRARY = ${CUDA_nvcuvenc_LIBRARY}") - message(STATUS "CUDA_nvcuvid_LIBRARY = ${CUDA_nvcuvid_LIBRARY}") - - message(STATUS "CUDADRIVER_FOUND = ${CUDADRIVER_FOUND}") - message(STATUS "CUDADRIVER_LIBRARIES = ${CUDADRIVER_LIBRARIES}") - endif() - -elseif(USE_OPENCL AND NOT USE_CUDA) - set(_gpuproc_deps OpenCL_FFT) - lofar_find_package(OpenCL REQUIRED) - add_definitions(-DUSE_OPENCL) -else() - message(WARNING - "Either CUDA or OpenCL must be enabled to build GPUProc.") +# Note: in Cobalt1 the initial implementation was in OpenCL. +# But the dev-team changed to CUDA quite soon. +# The OpenCL implementation was sort of mirrored and kept in sync with the CUDA implementation. +# But, the OpenCL was never really used in production... +# So, for Cobalt2 we (Jan David and Jorrit) decided to remove the OpenCL implementation to reduced maintenance costs. +# If we would like to see/use the OpenCL implementation, just have a look in svn history. + +set(_gpuproc_deps "") + +# We use runtime compilation, except for 2 tests compiled by nvcc. +# nvcc passes our C++ flags to GCC for C compilation printing spurious warnings. Suppress. +set(CUDA_PROPAGATE_HOST_FLAGS OFF) +lofar_find_package(CUDA 4.1 REQUIRED) +lofar_find_package(CUDADriver REQUIRED) + +add_definitions(-DUSE_CUDA) +if(LOFAR_BUILD_VARIANT MATCHES "^DEBUG$") + list(APPEND CUDA_NVCC_FLAGS -g -G) endif() lofar_package(GPUProc 1.0 DEPENDS Common Stream ApplCommon CoInterface InputProc MACIO BrokenAntennaInfo MessageBus Docker ${_gpuproc_deps}) @@ -51,7 +25,6 @@ lofar_package(GPUProc 1.0 DEPENDS Common Stream ApplCommon CoInterface InputProc lofar_find_package(OpenMP REQUIRED) lofar_find_package(Boost REQUIRED) lofar_find_package(MPI REQUIRED) -#lofar_find_package(ALGLIB) lofar_find_package(LibNuma) lofar_find_package(FFTW3 COMPONENTS single double threads REQUIRED) lofar_find_package(UnitTest++) diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl deleted file mode 100644 index aec27fa0e5f7f87406b08be5c7100a9415fe18d9..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl +++ /dev/null @@ -1,557 +0,0 @@ -//# BeamFormer.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#define MAX(A,B) ((A)>(B) ? (A) : (B)) -#define NR_PASSES MAX((NR_STATIONS + 6) / 16, 1) // gives best results on GTX 680 -#define NR_STATIONS_PER_PASS ((NR_STATIONS + NR_PASSES - 1) / NR_PASSES) - -#if NR_STATIONS_PER_PASS > 32 -#error "need more passes to beam form this number of stations" -#endif - - -typedef __global float2 (*ComplexVoltagesType)[NR_CHANNELS][NR_SAMPLES_PER_CHANNEL][NR_TABS][NR_POLARIZATIONS]; -typedef __global float4 (*BandPassCorrectedType)[NR_STATIONS][NR_CHANNELS][NR_SAMPLES_PER_CHANNEL]; -typedef __global float2 (*WeightsType)[NR_STATIONS][NR_CHANNELS][NR_TABS]; - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *samplesPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - BandPassCorrectedType samples = (BandPassCorrectedType) samplesPtr; - WeightsType weights = (WeightsType) weightsPtr; - - uint pol = get_local_id(0); - uint tab = get_local_id(1); - uint channel = get_global_id(2); - - float2 sample; - __local union { - float2 samples[NR_STATIONS_PER_PASS][16][NR_POLARIZATIONS]; - float4 samples4[NR_STATIONS_PER_PASS][16]; - } _local; - -#pragma unroll - for (uint first_station = 0; first_station < NR_STATIONS; first_station += NR_STATIONS_PER_PASS) { -#if NR_STATIONS_PER_PASS >= 1 - float2 weight_00; - - if (first_station + 0 < NR_STATIONS) - weight_00 = (*weights)[first_station + 0][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 2 - float2 weight_01; - - if (first_station + 1 < NR_STATIONS) - weight_01 = (*weights)[first_station + 1][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 3 - float2 weight_02; - - if (first_station + 2 < NR_STATIONS) - weight_02 = (*weights)[first_station + 2][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 4 - float2 weight_03; - - if (first_station + 3 < NR_STATIONS) - weight_03 = (*weights)[first_station + 3][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 5 - float2 weight_04; - - if (first_station + 4 < NR_STATIONS) - weight_04 = (*weights)[first_station + 4][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 6 - float2 weight_05; - - if (first_station + 5 < NR_STATIONS) - weight_05 = (*weights)[first_station + 5][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 7 - float2 weight_06; - - if (first_station + 6 < NR_STATIONS) - weight_06 = (*weights)[first_station + 6][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 8 - float2 weight_07; - - if (first_station + 7 < NR_STATIONS) - weight_07 = (*weights)[first_station + 7][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 9 - float2 weight_08; - - if (first_station + 8 < NR_STATIONS) - weight_08 = (*weights)[first_station + 8][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 10 - float2 weight_09; - - if (first_station + 9 < NR_STATIONS) - weight_09 = (*weights)[first_station + 9][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 11 - float2 weight_10; - - if (first_station + 10 < NR_STATIONS) - weight_10 = (*weights)[first_station + 10][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 12 - float2 weight_11; - - if (first_station + 11 < NR_STATIONS) - weight_11 = (*weights)[first_station + 11][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 13 - float2 weight_12; - - if (first_station + 12 < NR_STATIONS) - weight_12 = (*weights)[first_station + 12][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 14 - float2 weight_13; - - if (first_station + 13 < NR_STATIONS) - weight_13 = (*weights)[first_station + 13][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 15 - float2 weight_14; - - if (first_station + 14 < NR_STATIONS) - weight_14 = (*weights)[first_station + 14][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 16 - float2 weight_15; - - if (first_station + 15 < NR_STATIONS) - weight_15 = (*weights)[first_station + 15][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 17 - float2 weight_16; - - if (first_station + 16 < NR_STATIONS) - weight_16 = (*weights)[first_station + 16][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 18 - float2 weight_17; - - if (first_station + 17 < NR_STATIONS) - weight_17 = (*weights)[first_station + 17][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 19 - float2 weight_18; - - if (first_station + 18 < NR_STATIONS) - weight_18 = (*weights)[first_station + 18][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 20 - float2 weight_19; - - if (first_station + 19 < NR_STATIONS) - weight_19 = (*weights)[first_station + 19][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 21 - float2 weight_20; - - if (first_station + 20 < NR_STATIONS) - weight_20 = (*weights)[first_station + 20][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 22 - float2 weight_21; - - if (first_station + 21 < NR_STATIONS) - weight_21 = (*weights)[first_station + 21][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 23 - float2 weight_22; - - if (first_station + 22 < NR_STATIONS) - weight_22 = (*weights)[first_station + 22][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 24 - float2 weight_23; - - if (first_station + 23 < NR_STATIONS) - weight_23 = (*weights)[first_station + 23][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 25 - float2 weight_24; - - if (first_station + 24 < NR_STATIONS) - weight_24 = (*weights)[first_station + 24][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 26 - float2 weight_25; - - if (first_station + 25 < NR_STATIONS) - weight_25 = (*weights)[first_station + 25][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 27 - float2 weight_26; - - if (first_station + 26 < NR_STATIONS) - weight_26 = (*weights)[first_station + 26][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 28 - float2 weight_27; - - if (first_station + 27 < NR_STATIONS) - weight_27 = (*weights)[first_station + 27][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 29 - float2 weight_28; - - if (first_station + 28 < NR_STATIONS) - weight_28 = (*weights)[first_station + 28][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 30 - float2 weight_29; - - if (first_station + 29 < NR_STATIONS) - weight_29 = (*weights)[first_station + 29][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 31 - float2 weight_30; - - if (first_station + 30 < NR_STATIONS) - weight_30 = (*weights)[first_station + 30][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 32 - float2 weight_31; - - if (first_station + 31 < NR_STATIONS) - weight_31 = (*weights)[first_station + 31][channel][tab]; -#endif - - for (uint time = 0; time < NR_SAMPLES_PER_CHANNEL; time += 16) { - for (uint i = get_local_id(0) + NR_POLARIZATIONS * get_local_id(1); i < NR_STATIONS_PER_PASS * 16; i += NR_TABS * NR_POLARIZATIONS) { - uint t = i % 16; - uint s = i / 16; - - if (NR_SAMPLES_PER_CHANNEL % 16 == 0 || time + t < NR_SAMPLES_PER_CHANNEL) - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + s < NR_STATIONS) - _local.samples4[0][i] = convert_float4((*samples)[first_station + s][channel][time + t]); - } - - barrier(CLK_LOCAL_MEM_FENCE); - - for (uint t = 0; t < (NR_SAMPLES_PER_CHANNEL % 16 == 0 ? 16 : min(16U, NR_SAMPLES_PER_CHANNEL - time)); t++) { - float2 sum = first_station == 0 ? 0 : (*complexVoltages)[channel][time + t][tab][pol]; - -#if NR_STATIONS_PER_PASS >= 1 - if (first_station + 1 < NR_STATIONS) { - sample = _local.samples[ 0][t][pol]; - sum += weight_00.xx * sample; - sum += weight_00.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 2 - if (first_station + 2 < NR_STATIONS) { - sample = _local.samples[ 1][t][pol]; - sum += weight_01.xx * sample; - sum += weight_01.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 3 - if (first_station + 3 < NR_STATIONS) { - sample = _local.samples[ 2][t][pol]; - sum += weight_02.xx * sample; - sum += weight_02.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 4 - if (first_station + 4 < NR_STATIONS) { - sample = _local.samples[ 3][t][pol]; - sum += weight_03.xx * sample; - sum += weight_03.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 5 - if (first_station + 5 < NR_STATIONS) { - sample = _local.samples[ 4][t][pol]; - sum += weight_04.xx * sample; - sum += weight_04.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 6 - if (first_station + 6 < NR_STATIONS) { - sample = _local.samples[ 5][t][pol]; - sum += weight_05.xx * sample; - sum += weight_05.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 7 - if (first_station + 7 < NR_STATIONS) { - sample = _local.samples[ 6][t][pol]; - sum += weight_06.xx * sample; - sum += weight_06.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 8 - if (first_station + 8 < NR_STATIONS) { - sample = _local.samples[ 7][t][pol]; - sum += weight_07.xx * sample; - sum += weight_07.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 9 - if (first_station + 9 < NR_STATIONS) { - sample = _local.samples[ 8][t][pol]; - sum += weight_08.xx * sample; - sum += weight_08.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 10 - if (first_station + 10 < NR_STATIONS) { - sample = _local.samples[ 9][t][pol]; - sum += weight_09.xx * sample; - sum += weight_09.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 11 - if (first_station + 11 < NR_STATIONS) { - sample = _local.samples[10][t][pol]; - sum += weight_10.xx * sample; - sum += weight_10.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 12 - if (first_station + 12 < NR_STATIONS) { - sample = _local.samples[11][t][pol]; - sum += weight_11.xx * sample; - sum += weight_11.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 13 - if (first_station + 13 < NR_STATIONS) { - sample = _local.samples[12][t][pol]; - sum += weight_12.xx * sample; - sum += weight_12.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 14 - if (first_station + 14 < NR_STATIONS) { - sample = _local.samples[13][t][pol]; - sum += weight_13.xx * sample; - sum += weight_13.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 15 - if (first_station + 15 < NR_STATIONS) { - sample = _local.samples[14][t][pol]; - sum += weight_14.xx * sample; - sum += weight_14.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 16 - if (first_station + 15 < NR_STATIONS) { - sample = _local.samples[15][t][pol]; - sum += weight_15.xx * sample; - sum += weight_15.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 17 - if (first_station + 16 < NR_STATIONS) { - sample = _local.samples[16][t][pol]; - sum += weight_16.xx * sample; - sum += weight_16.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 18 - if (first_station + 17 < NR_STATIONS) { - sample = _local.samples[17][t][pol]; - sum += weight_17.xx * sample; - sum += weight_17.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 19 - if (first_station + 18 < NR_STATIONS) { - sample = _local.samples[18][t][pol]; - sum += weight_18.xx * sample; - sum += weight_18.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 20 - if (first_station + 19 < NR_STATIONS) { - sample = _local.samples[19][t][pol]; - sum += weight_19.xx * sample; - sum += weight_19.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 21 - if (first_station + 20 < NR_STATIONS) { - sample = _local.samples[20][t][pol]; - sum += weight_20.xx * sample; - sum += weight_20.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 22 - if (first_station + 21 < NR_STATIONS) { - sample = _local.samples[21][t][pol]; - sum += weight_21.xx * sample; - sum += weight_21.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 23 - if (first_station + 22 < NR_STATIONS) { - sample = _local.samples[22][t][pol]; - sum += weight_22.xx * sample; - sum += weight_22.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 24 - if (first_station + 23 < NR_STATIONS) { - sample = _local.samples[23][t][pol]; - sum += weight_23.xx * sample; - sum += weight_23.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 25 - if (first_station + 25 < NR_STATIONS) { - sample = _local.samples[24][t][pol]; - sum += weight_24.xx * sample; - sum += weight_24.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 26 - if (first_station + 25 < NR_STATIONS) { - sample = _local.samples[25][t][pol]; - sum += weight_25.xx * sample; - sum += weight_25.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 27 - if (first_station + 26 < NR_STATIONS) { - sample = _local.samples[26][t][pol]; - sum += weight_26.xx * sample; - sum += weight_26.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 28 - if (first_station + 27 < NR_STATIONS) { - sample = _local.samples[27][t][pol]; - sum += weight_27.xx * sample; - sum += weight_27.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 29 - if (first_station + 28 < NR_STATIONS) { - sample = _local.samples[28][t][pol]; - sum += weight_28.xx * sample; - sum += weight_28.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 30 - if (first_station + 29 < NR_STATIONS) { - sample = _local.samples[29][t][pol]; - sum += weight_29.xx * sample; - sum += weight_29.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 31 - if (first_station + 30 < NR_STATIONS) { - sample = _local.samples[30][t][pol]; - sum += weight_30.xx * sample; - sum += weight_30.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 32 - if (first_station + 31 < NR_STATIONS) { - sample = _local.samples[31][t][pol]; - sum += weight_31.xx * sample; - sum += weight_31.yy * (float2) (-sample.y, sample.x); - } -#endif - - (*complexVoltages)[channel][time + t][tab][pol] = sum; - } - - barrier(CLK_LOCAL_MEM_FENCE); - } - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.4x3 b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.4x3 deleted file mode 100644 index 3570e6598cb798d479e9381a2f00d4b170471fac..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.4x3 +++ /dev/null @@ -1,118 +0,0 @@ -#define NR_CHANNELS_PER_BLOCK 4 - - -typedef __global float4 (*ComplexVoltagesType)[NR_TABS][NR_SAMPLES_PER_INTEGRATION][NR_CHANNELS]; -//typedef __global float4 (*CorrectedDataType)[NR_STATIONS][NR_CHANNELS][NR_SAMPLES_PER_INTEGRATION]; -typedef __global float4 (*CorrectedDataType)[NR_STATIONS][NR_SAMPLES_PER_INTEGRATION][NR_CHANNELS]; -typedef __global float2 (*WeightsType)[NR_STATIONS][NR_CHANNELS][NR_TABS]; - -float2 cmul(float2 a, float2 b) -{ - return (float2) { a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x }; -} - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *correctedDataPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - CorrectedDataType correctedData = (CorrectedDataType) correctedDataPtr; - WeightsType weights = (WeightsType) weightsPtr; - - uint first_tab = 3 * get_global_id(0); - uint channel = get_global_id(1); - uint first_station = 4 * get_global_id(2); - - float2 weight_0_0 = (*weights)[first_station + 0][channel][first_tab + 0]; - float2 weight_0_1 = (*weights)[first_station + 0][channel][first_tab + 1]; - float2 weight_0_2 = (*weights)[first_station + 0][channel][first_tab + 2]; - float2 weight_1_0 = (*weights)[first_station + 1][channel][first_tab + 0]; - float2 weight_1_1 = (*weights)[first_station + 1][channel][first_tab + 1]; - float2 weight_1_2 = (*weights)[first_station + 1][channel][first_tab + 2]; - float2 weight_2_0 = (*weights)[first_station + 2][channel][first_tab + 0]; - float2 weight_2_1 = (*weights)[first_station + 2][channel][first_tab + 1]; - float2 weight_2_2 = (*weights)[first_station + 2][channel][first_tab + 2]; - float2 weight_3_0 = (*weights)[first_station + 3][channel][first_tab + 0]; - float2 weight_3_1 = (*weights)[first_station + 3][channel][first_tab + 1]; - float2 weight_3_2 = (*weights)[first_station + 3][channel][first_tab + 2]; - - __local float4 local_sums[3][NR_STATIONS / 4][NR_CHANNELS_PER_BLOCK][NR_TABS / 3]; - - for (int time = 0 - first_station / 4; time < NR_SAMPLES_PER_INTEGRATION + NR_STATIONS - first_station / 4; time++) { - barrier(CLK_LOCAL_MEM_FENCE); - - float4 sum_0, sum_1, sum_2; - - if (first_station == 0) { - sum_0 = sum_1 = sum_2 = (float4) { 0, 0, 0, 0 }; - } else { - sum_0 = local_sums[0][get_local_id(2) - 1][get_local_id(1)][get_local_id(0)]; - sum_1 = local_sums[1][get_local_id(2) - 1][get_local_id(1)][get_local_id(0)]; - sum_2 = local_sums[2][get_local_id(2) - 1][get_local_id(1)][get_local_id(0)]; - } - - float4 sample_0 = (*correctedData)[first_station + 0][time][channel]; - float4 sample_1 = (*correctedData)[first_station + 1][time][channel]; - float4 sample_2 = (*correctedData)[first_station + 2][time][channel]; - float4 sample_3 = (*correctedData)[first_station + 3][time][channel]; - - sum_0 += weight_0_0.xxxx * sample_0; - sum_1 += weight_0_1.xxxx * sample_0; - sum_2 += weight_0_2.xxxx * sample_0; - sum_0 += weight_0_1.yyyy * (float4) { -sample_0.y, sample_0.x, -sample_0.w, sample_0.z }; - sum_1 += weight_0_1.yyyy * (float4) { -sample_0.y, sample_0.x, -sample_0.w, sample_0.z }; - sum_2 += weight_0_1.yyyy * (float4) { -sample_0.y, sample_0.x, -sample_0.w, sample_0.z }; - - sum_0 += weight_1_0.xxxx * sample_1; - sum_1 += weight_1_1.xxxx * sample_1; - sum_2 += weight_1_2.xxxx * sample_1; - sum_0 += weight_1_1.yyyy * (float4) { -sample_1.y, sample_1.x, -sample_1.w, sample_1.z }; - sum_1 += weight_1_1.yyyy * (float4) { -sample_1.y, sample_1.x, -sample_1.w, sample_1.z }; - sum_2 += weight_1_1.yyyy * (float4) { -sample_1.y, sample_1.x, -sample_1.w, sample_1.z }; - - sum_0 += weight_2_0.xxxx * sample_2; - sum_1 += weight_2_1.xxxx * sample_2; - sum_2 += weight_2_2.xxxx * sample_2; - sum_0 += weight_2_1.yyyy * (float4) { -sample_2.y, sample_2.x, -sample_2.w, sample_2.z }; - sum_1 += weight_2_1.yyyy * (float4) { -sample_2.y, sample_2.x, -sample_2.w, sample_2.z }; - sum_2 += weight_2_1.yyyy * (float4) { -sample_2.y, sample_2.x, -sample_2.w, sample_2.z }; - - sum_0 += weight_3_0.xxxx * sample_3; - sum_1 += weight_3_1.xxxx * sample_3; - sum_2 += weight_3_2.xxxx * sample_3; - sum_0 += weight_3_1.yyyy * (float4) { -sample_3.y, sample_3.x, -sample_3.w, sample_3.z }; - sum_1 += weight_3_1.yyyy * (float4) { -sample_3.y, sample_3.x, -sample_3.w, sample_3.z }; - sum_2 += weight_3_1.yyyy * (float4) { -sample_3.y, sample_3.x, -sample_3.w, sample_3.z }; - - barrier(CLK_LOCAL_MEM_FENCE); - - if (first_station + 4 < NR_STATIONS) { - local_sums[0][get_local_id(2)][get_local_id(1)][get_local_id(0)] = sum_0; - local_sums[1][get_local_id(2)][get_local_id(1)][get_local_id(0)] = sum_1; - local_sums[2][get_local_id(2)][get_local_id(1)][get_local_id(0)] = sum_2; - } else if (time >= 0) { - (*complexVoltages)[first_tab + 0][time][channel] = sum_0; - (*complexVoltages)[first_tab + 1][time][channel] = sum_1; - (*complexVoltages)[first_tab + 2][time][channel] = sum_2; - } - -#if 0 - local_complex_voltages[tab][local_time_or_channel] = sum; - - barrier(CLK_LOCAL_MEM_FENCE); - - (*complexVoltages)[transposed_tab][start_time + local_time][transposed_channel] = local_complex_voltages[transposed_tab][transposed_channel]; -#elif defined STOKES_I || defined STOKES_IQUV - float powerX = sum.x * sum.x + sum.y * sum.y; - float powerY = sum.z * sum.z + sum.w * sum.w; - - (*stokes)[tab][0][0][time_or_channel] = powerX + powerY; -#if defined STOKES_IQUV - (*stokes)[tab][1][0][time_or_channel] = powerX - powerY; - (*stokes)[tab][2][0][time_or_channel] = 2 * (sum.x * sum.z + sum.y * sum.w); - (*stokes)[tab][3][0][time_or_channel] = 2 * (sum.y * sum.z - sum.x * sum.w); -#endif -#endif - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.6x3 b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.6x3 deleted file mode 100644 index e51aa78e3bcdece43cea17bff70e8ee19434ed62..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.6x3 +++ /dev/null @@ -1,140 +0,0 @@ -#define NR_CHANNELS_PER_BLOCK 8 - - -typedef __global float4 (*ComplexVoltagesType)[NR_TABS][NR_SAMPLES_PER_INTEGRATION][NR_CHANNELS]; -//typedef __global float4 (*CorrectedDataType)[NR_STATIONS][NR_CHANNELS][NR_SAMPLES_PER_INTEGRATION]; -typedef __global float4 (*CorrectedDataType)[NR_STATIONS][NR_SAMPLES_PER_INTEGRATION][NR_CHANNELS]; -typedef __global float2 (*WeightsType)[NR_STATIONS][NR_CHANNELS][NR_TABS]; - -float2 cmul(float2 a, float2 b) -{ - return (float2) { a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x }; -} - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *correctedDataPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - CorrectedDataType correctedData = (CorrectedDataType) correctedDataPtr; - WeightsType weights = (WeightsType) weightsPtr; - - uint first_tab = 3 * get_global_id(0); - uint channel = get_global_id(1); - uint first_station = 6 * get_global_id(2); - - float2 weight_0_0 = (*weights)[first_station + 0][channel][first_tab + 0]; - float2 weight_0_1 = (*weights)[first_station + 0][channel][first_tab + 1]; - float2 weight_0_2 = (*weights)[first_station + 0][channel][first_tab + 2]; - float2 weight_1_0 = (*weights)[first_station + 1][channel][first_tab + 0]; - float2 weight_1_1 = (*weights)[first_station + 1][channel][first_tab + 1]; - float2 weight_1_2 = (*weights)[first_station + 1][channel][first_tab + 2]; - float2 weight_2_0 = (*weights)[first_station + 2][channel][first_tab + 0]; - float2 weight_2_1 = (*weights)[first_station + 2][channel][first_tab + 1]; - float2 weight_2_2 = (*weights)[first_station + 2][channel][first_tab + 2]; - float2 weight_3_0 = (*weights)[first_station + 3][channel][first_tab + 0]; - float2 weight_3_1 = (*weights)[first_station + 3][channel][first_tab + 1]; - float2 weight_3_2 = (*weights)[first_station + 3][channel][first_tab + 2]; - float2 weight_4_0 = (*weights)[first_station + 4][channel][first_tab + 0]; - float2 weight_4_1 = (*weights)[first_station + 4][channel][first_tab + 1]; - float2 weight_4_2 = (*weights)[first_station + 4][channel][first_tab + 2]; - float2 weight_5_0 = (*weights)[first_station + 5][channel][first_tab + 0]; - float2 weight_5_1 = (*weights)[first_station + 5][channel][first_tab + 1]; - float2 weight_5_2 = (*weights)[first_station + 5][channel][first_tab + 2]; - - __local float4 local_sums[3][NR_STATIONS / 6][NR_CHANNELS_PER_BLOCK][NR_TABS / 3]; - - for (int time = 0 - first_station / 6; time < NR_SAMPLES_PER_INTEGRATION + NR_STATIONS - first_station / 6; time++) { - barrier(CLK_LOCAL_MEM_FENCE); - - float4 sum_0, sum_1, sum_2; - - if (first_station == 0) { - sum_0 = sum_1 = sum_2 = (float4) { 0, 0, 0, 0 }; - } else { - sum_0 = local_sums[0][get_local_id(2) - 1][get_local_id(1)][get_local_id(0)]; - sum_1 = local_sums[1][get_local_id(2) - 1][get_local_id(1)][get_local_id(0)]; - sum_2 = local_sums[2][get_local_id(2) - 1][get_local_id(1)][get_local_id(0)]; - } - - float4 sample_0 = (*correctedData)[first_station + 0][time][channel]; - float4 sample_1 = (*correctedData)[first_station + 1][time][channel]; - float4 sample_2 = (*correctedData)[first_station + 2][time][channel]; - float4 sample_3 = (*correctedData)[first_station + 3][time][channel]; - float4 sample_4 = (*correctedData)[first_station + 4][time][channel]; - float4 sample_5 = (*correctedData)[first_station + 5][time][channel]; - - sum_0 += weight_0_0.xxxx * sample_0; - sum_1 += weight_0_1.xxxx * sample_0; - sum_2 += weight_0_2.xxxx * sample_0; - sum_0 += weight_0_1.yyyy * (float4) { -sample_0.y, sample_0.x, -sample_0.w, sample_0.z }; - sum_1 += weight_0_1.yyyy * (float4) { -sample_0.y, sample_0.x, -sample_0.w, sample_0.z }; - sum_2 += weight_0_1.yyyy * (float4) { -sample_0.y, sample_0.x, -sample_0.w, sample_0.z }; - - sum_0 += weight_1_0.xxxx * sample_1; - sum_1 += weight_1_1.xxxx * sample_1; - sum_2 += weight_1_2.xxxx * sample_1; - sum_0 += weight_1_1.yyyy * (float4) { -sample_1.y, sample_1.x, -sample_1.w, sample_1.z }; - sum_1 += weight_1_1.yyyy * (float4) { -sample_1.y, sample_1.x, -sample_1.w, sample_1.z }; - sum_2 += weight_1_1.yyyy * (float4) { -sample_1.y, sample_1.x, -sample_1.w, sample_1.z }; - - sum_0 += weight_2_0.xxxx * sample_2; - sum_1 += weight_2_1.xxxx * sample_2; - sum_2 += weight_2_2.xxxx * sample_2; - sum_0 += weight_2_1.yyyy * (float4) { -sample_2.y, sample_2.x, -sample_2.w, sample_2.z }; - sum_1 += weight_2_1.yyyy * (float4) { -sample_2.y, sample_2.x, -sample_2.w, sample_2.z }; - sum_2 += weight_2_1.yyyy * (float4) { -sample_2.y, sample_2.x, -sample_2.w, sample_2.z }; - - sum_0 += weight_3_0.xxxx * sample_3; - sum_1 += weight_3_1.xxxx * sample_3; - sum_2 += weight_3_2.xxxx * sample_3; - sum_0 += weight_3_1.yyyy * (float4) { -sample_3.y, sample_3.x, -sample_3.w, sample_3.z }; - sum_1 += weight_3_1.yyyy * (float4) { -sample_3.y, sample_3.x, -sample_3.w, sample_3.z }; - sum_2 += weight_3_1.yyyy * (float4) { -sample_3.y, sample_3.x, -sample_3.w, sample_3.z }; - - sum_0 += weight_4_0.xxxx * sample_4; - sum_1 += weight_4_1.xxxx * sample_4; - sum_2 += weight_4_2.xxxx * sample_4; - sum_0 += weight_4_1.yyyy * (float4) { -sample_4.y, sample_4.x, -sample_4.w, sample_4.z }; - sum_1 += weight_4_1.yyyy * (float4) { -sample_4.y, sample_4.x, -sample_4.w, sample_4.z }; - sum_2 += weight_4_1.yyyy * (float4) { -sample_4.y, sample_4.x, -sample_4.w, sample_4.z }; - - sum_0 += weight_5_0.xxxx * sample_5; - sum_1 += weight_5_1.xxxx * sample_5; - sum_2 += weight_5_2.xxxx * sample_5; - sum_0 += weight_5_1.yyyy * (float4) { -sample_5.y, sample_5.x, -sample_5.w, sample_5.z }; - sum_1 += weight_5_1.yyyy * (float4) { -sample_5.y, sample_5.x, -sample_5.w, sample_5.z }; - sum_2 += weight_5_1.yyyy * (float4) { -sample_5.y, sample_5.x, -sample_5.w, sample_5.z }; - - barrier(CLK_LOCAL_MEM_FENCE); - - if (first_station + 6 < NR_STATIONS) { - local_sums[0][get_local_id(2)][get_local_id(1)][get_local_id(0)] = sum_0; - local_sums[1][get_local_id(2)][get_local_id(1)][get_local_id(0)] = sum_1; - local_sums[2][get_local_id(2)][get_local_id(1)][get_local_id(0)] = sum_2; - } else if (time >= 0) { - (*complexVoltages)[first_tab + 0][time][channel] = sum_0; - (*complexVoltages)[first_tab + 1][time][channel] = sum_1; - (*complexVoltages)[first_tab + 2][time][channel] = sum_2; - } - -#if 0 - local_complex_voltages[tab][local_time_or_channel] = sum; - - barrier(CLK_LOCAL_MEM_FENCE); - - (*complexVoltages)[transposed_tab][start_time + local_time][transposed_channel] = local_complex_voltages[transposed_tab][transposed_channel]; -#elif defined STOKES_I || defined STOKES_IQUV - float powerX = sum.x * sum.x + sum.y * sum.y; - float powerY = sum.z * sum.z + sum.w * sum.w; - - (*stokes)[tab][0][0][time_or_channel] = powerX + powerY; -#if defined STOKES_IQUV - (*stokes)[tab][1][0][time_or_channel] = powerX - powerY; - (*stokes)[tab][2][0][time_or_channel] = 2 * (sum.x * sum.z + sum.y * sum.w); - (*stokes)[tab][3][0][time_or_channel] = 2 * (sum.y * sum.z - sum.x * sum.w); -#endif -#endif - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.bak b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.bak deleted file mode 100644 index 3e87f0c00d905bab678cab8903a588ba17a56880..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.bak +++ /dev/null @@ -1,536 +0,0 @@ -#define MAX(A,B) ((A)>(B) ? (A) : (B)) -#define NR_PASSES MAX((NR_STATIONS + 6) / 16, 1) // gives best results on GTX 680 -#define NR_STATIONS_PER_PASS ((NR_STATIONS + NR_PASSES - 1) / NR_PASSES) - -#if NR_STATIONS_PER_PASS > 32 -#error "need more passes to beam form this number of stations" -#endif - - -typedef __global float2 (*ComplexVoltagesType)[NR_TABS][NR_POLARIZATIONS][NR_CHANNELS][NR_TIMES_PER_BLOCK]; -typedef __global float4 (*BandPassCorrectedType)[NR_STATIONS][NR_CHANNELS][NR_TIMES_PER_BLOCK]; -typedef __global float2 (*WeightsType)[NR_STATIONS][NR_CHANNELS][NR_TABS]; - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *samplesPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - BandPassCorrectedType samples = (BandPassCorrectedType) samplesPtr; - WeightsType weights = (WeightsType) weightsPtr; - - uint minor_time = get_local_id(0); - uint tab = get_global_id(1); - uint channel = get_global_id(2); - - float4 sample; - __local float4 local_samples[NR_STATIONS_PER_PASS][16]; - -#pragma unroll - for (uint first_station = 0; first_station < NR_STATIONS; first_station += NR_STATIONS_PER_PASS) { -#if NR_STATIONS_PER_PASS >= 1 - float2 weight_00; - - if (first_station + 0 < NR_STATIONS) - weight_00 = (*weights)[first_station + 0][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 2 - float2 weight_01; - - if (first_station + 1 < NR_STATIONS) - weight_01 = (*weights)[first_station + 1][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 3 - float2 weight_02; - - if (first_station + 2 < NR_STATIONS) - weight_02 = (*weights)[first_station + 2][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 4 - float2 weight_03; - - if (first_station + 3 < NR_STATIONS) - weight_03 = (*weights)[first_station + 3][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 5 - float2 weight_04; - - if (first_station + 4 < NR_STATIONS) - weight_04 = (*weights)[first_station + 4][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 6 - float2 weight_05; - - if (first_station + 5 < NR_STATIONS) - weight_05 = (*weights)[first_station + 5][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 7 - float2 weight_06; - - if (first_station + 6 < NR_STATIONS) - weight_06 = (*weights)[first_station + 6][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 8 - float2 weight_07; - - if (first_station + 7 < NR_STATIONS) - weight_07 = (*weights)[first_station + 7][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 9 - float2 weight_08; - - if (first_station + 8 < NR_STATIONS) - weight_08 = (*weights)[first_station + 8][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 10 - float2 weight_09; - - if (first_station + 9 < NR_STATIONS) - weight_09 = (*weights)[first_station + 9][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 11 - float2 weight_10; - - if (first_station + 10 < NR_STATIONS) - weight_10 = (*weights)[first_station + 10][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 12 - float2 weight_11; - - if (first_station + 11 < NR_STATIONS) - weight_11 = (*weights)[first_station + 11][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 13 - float2 weight_12; - - if (first_station + 12 < NR_STATIONS) - weight_12 = (*weights)[first_station + 12][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 14 - float2 weight_13; - - if (first_station + 13 < NR_STATIONS) - weight_13 = (*weights)[first_station + 13][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 15 - float2 weight_14; - - if (first_station + 14 < NR_STATIONS) - weight_14 = (*weights)[first_station + 14][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 16 - float2 weight_15; - - if (first_station + 15 < NR_STATIONS) - weight_15 = (*weights)[first_station + 15][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 17 - float2 weight_16; - - if (first_station + 16 < NR_STATIONS) - weight_16 = (*weights)[first_station + 16][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 18 - float2 weight_17; - - if (first_station + 17 < NR_STATIONS) - weight_17 = (*weights)[first_station + 17][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 19 - float2 weight_18; - - if (first_station + 18 < NR_STATIONS) - weight_18 = (*weights)[first_station + 18][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 20 - float2 weight_19; - - if (first_station + 19 < NR_STATIONS) - weight_19 = (*weights)[first_station + 19][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 21 - float2 weight_20; - - if (first_station + 20 < NR_STATIONS) - weight_20 = (*weights)[first_station + 20][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 22 - float2 weight_21; - - if (first_station + 21 < NR_STATIONS) - weight_21 = (*weights)[first_station + 21][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 23 - float2 weight_22; - - if (first_station + 22 < NR_STATIONS) - weight_22 = (*weights)[first_station + 22][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 24 - float2 weight_23; - - if (first_station + 23 < NR_STATIONS) - weight_23 = (*weights)[first_station + 23][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 25 - float2 weight_24; - - if (first_station + 24 < NR_STATIONS) - weight_24 = (*weights)[first_station + 24][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 26 - float2 weight_25; - - if (first_station + 25 < NR_STATIONS) - weight_25 = (*weights)[first_station + 25][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 27 - float2 weight_26; - - if (first_station + 26 < NR_STATIONS) - weight_26 = (*weights)[first_station + 26][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 28 - float2 weight_27; - - if (first_station + 27 < NR_STATIONS) - weight_27 = (*weights)[first_station + 27][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 29 - float2 weight_28; - - if (first_station + 28 < NR_STATIONS) - weight_28 = (*weights)[first_station + 28][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 30 - float2 weight_29; - - if (first_station + 29 < NR_STATIONS) - weight_29 = (*weights)[first_station + 29][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 31 - float2 weight_30; - - if (first_station + 30 < NR_STATIONS) - weight_30 = (*weights)[first_station + 30][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 32 - float2 weight_31; - - if (first_station + 31 < NR_STATIONS) - weight_31 = (*weights)[first_station + 31][channel][tab]; -#endif - - for (uint time = 0; time < NR_TIMES_PER_BLOCK; time += 16) { -#if 1 - for (uint i = get_local_id(0) + 16 * get_local_id(1); i < NR_STATIONS_PER_PASS * 16; i += get_local_size(0) * get_local_size(1)) { - uint t = i % 16; - uint s = i / 16; - - if (NR_TIMES_PER_BLOCK % 16 == 0 || time + t < NR_TIMES_PER_BLOCK) - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + s < NR_STATIONS) - local_samples[0][i] = (*samples)[first_station + s][channel][time + t]; - } - - barrier(CLK_LOCAL_MEM_FENCE); -#endif - - /*for (uint t = 0; t < (NR_TIMES_PER_BLOCK % 16 == 0 ? 16 : min(16U, NR_TIMES_PER_BLOCK - time)); t ++)*/ { - float4 sum = first_station == 0 ? 0 : (float4) ((*complexVoltages)[tab][0][channel][time + minor_time], (*complexVoltages)[tab][1][channel][time + minor_time]); - -#if NR_STATIONS_PER_PASS >= 1 - if (first_station + 1 < NR_STATIONS) { - sample = local_samples[0][minor_time]; - sum += weight_00.xxxx * sample; - sum += weight_00.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 2 - if (first_station + 2 < NR_STATIONS) { - sample = local_samples[1][minor_time]; - sum += weight_01.xxxx * sample; - sum += weight_01.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 3 - if (first_station + 3 < NR_STATIONS) { - sample = local_samples[2][minor_time]; - sum += weight_02.xxxx * sample; - sum += weight_02.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 4 - if (first_station + 4 < NR_STATIONS) { - sample = local_samples[3][minor_time]; - sum += weight_03.xxxx * sample; - sum += weight_03.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 5 - if (first_station + 5 < NR_STATIONS) { - sample = local_samples[4][minor_time]; - sum += weight_04.xxxx * sample; - sum += weight_04.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 6 - if (first_station + 6 < NR_STATIONS) { - sample = local_samples[5][minor_time]; - sum += weight_05.xxxx * sample; - sum += weight_05.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 7 - if (first_station + 7 < NR_STATIONS) { - sample = local_samples[6][minor_time]; - sum += weight_06.xxxx * sample; - sum += weight_06.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 8 - if (first_station + 8 < NR_STATIONS) { - sample = local_samples[7][minor_time]; - sum += weight_07.xxxx * sample; - sum += weight_07.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 9 - if (first_station + 9 < NR_STATIONS) { - sample = local_samples[8][minor_time]; - sum += weight_08.xxxx * sample; - sum += weight_08.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 10 - if (first_station + 10 < NR_STATIONS) { - sample = local_samples[9][minor_time]; - sum += weight_09.xxxx * sample; - sum += weight_09.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 11 - if (first_station + 11 < NR_STATIONS) { - sample = local_samples[10][minor_time]; - sum += weight_10.xxxx * sample; - sum += weight_10.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 12 - if (first_station + 12 < NR_STATIONS) { - sample = local_samples[11][minor_time]; - sum += weight_11.xxxx * sample; - sum += weight_11.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 13 - if (first_station + 13 < NR_STATIONS) { - sample = local_samples[12][minor_time]; - sum += weight_12.xxxx * sample; - sum += weight_12.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 14 - if (first_station + 14 < NR_STATIONS) { - sample = local_samples[13][minor_time]; - sum += weight_13.xxxx * sample; - sum += weight_13.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 15 - if (first_station + 15 < NR_STATIONS) { - sample = local_samples[14][minor_time]; - sum += weight_14.xxxx * sample; - sum += weight_14.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 16 - if (first_station + 15 < NR_STATIONS) { - sample = local_samples[15][minor_time]; - sum += weight_15.xxxx * sample; - sum += weight_15.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 17 - if (first_station + 16 < NR_STATIONS) { - sample = local_samples[16][minor_time]; - sum += weight_16.xxxx * sample; - sum += weight_16.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 18 - if (first_station + 17 < NR_STATIONS) { - sample = local_samples[17][minor_time]; - sum += weight_17.xxxx * sample; - sum += weight_17.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 19 - if (first_station + 18 < NR_STATIONS) { - sample = local_samples[18][minor_time]; - sum += weight_18.xxxx * sample; - sum += weight_18.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 20 - if (first_station + 19 < NR_STATIONS) { - sample = local_samples[19][minor_time]; - sum += weight_19.xxxx * sample; - sum += weight_19.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 21 - if (first_station + 20 < NR_STATIONS) { - sample = local_samples[20][minor_time]; - sum += weight_20.xxxx * sample; - sum += weight_20.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 22 - if (first_station + 21 < NR_STATIONS) { - sample = local_samples[21][minor_time]; - sum += weight_21.xxxx * sample; - sum += weight_21.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 23 - if (first_station + 22 < NR_STATIONS) { - sample = local_samples[22][minor_time]; - sum += weight_22.xxxx * sample; - sum += weight_22.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 24 - if (first_station + 23 < NR_STATIONS) { - sample = local_samples[23][minor_time]; - sum += weight_23.xxxx * sample; - sum += weight_23.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 25 - if (first_station + 25 < NR_STATIONS) { - sample = local_samples[24][minor_time]; - sum += weight_24.xxxx * sample; - sum += weight_24.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 26 - if (first_station + 25 < NR_STATIONS) { - sample = local_samples[25][minor_time]; - sum += weight_25.xxxx * sample; - sum += weight_25.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 27 - if (first_station + 26 < NR_STATIONS) { - sample = local_samples[26][minor_time]; - sum += weight_26.xxxx * sample; - sum += weight_26.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 28 - if (first_station + 27 < NR_STATIONS) { - sample = local_samples[27][minor_time]; - sum += weight_27.xxxx * sample; - sum += weight_27.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 29 - if (first_station + 28 < NR_STATIONS) { - sample = local_samples[28][minor_time]; - sum += weight_28.xxxx * sample; - sum += weight_28.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 30 - if (first_station + 29 < NR_STATIONS) { - sample = local_samples[29][minor_time]; - sum += weight_29.xxxx * sample; - sum += weight_29.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 31 - if (first_station + 30 < NR_STATIONS) { - sample = local_samples[30][minor_time]; - sum += weight_30.xxxx * sample; - sum += weight_30.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - -#if NR_STATIONS_PER_PASS >= 32 - if (first_station + 31 < NR_STATIONS) { - sample = local_samples[31][minor_time]; - sum += weight_31.xxxx * sample; - sum += weight_31.yyyy * (float4) (-sample.y, sample.x, -sample.w, sample.z); - } -#endif - - (*complexVoltages)[tab][0][channel][time + minor_time] = sum.xy; - (*complexVoltages)[tab][1][channel][time + minor_time] = sum.zw; - } - - barrier(CLK_LOCAL_MEM_FENCE); - } - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.not b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.not deleted file mode 100644 index 1bd98a2fb00cb622ead6c57925621124c30890c9..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.not +++ /dev/null @@ -1,148 +0,0 @@ -#define NR_CHANNELS_PER_BLOCK 2 - - -typedef __global float4 (*ComplexVoltagesType)[NR_TABS][NR_SAMPLES_PER_INTEGRATION][NR_CHANNELS]; -//typedef __global float4 (*CorrectedDataType)[NR_STATIONS][NR_CHANNELS][NR_SAMPLES_PER_INTEGRATION]; -typedef __global float4 (*CorrectedDataType)[NR_STATIONS][NR_SAMPLES_PER_INTEGRATION][NR_CHANNELS]; -typedef __global float2 (*WeightsType)[NR_STATIONS][NR_CHANNELS][NR_TABS]; - -float2 cmul(float2 a, float2 b) -{ - return (float2) { a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x }; -} - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *correctedDataPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - CorrectedDataType correctedData = (CorrectedDataType) correctedDataPtr; - WeightsType weights = (WeightsType) weightsPtr; - - uint first_tab = 3 * get_local_id(0); - uint channel = get_global_id(1); - uint first_station = 6 * get_local_id(2); - - float2 weight_0_0 = (*weights)[first_station + 0][channel][first_tab + 0]; - float2 weight_0_1 = (*weights)[first_station + 0][channel][first_tab + 1]; - float2 weight_0_2 = (*weights)[first_station + 0][channel][first_tab + 2]; - float2 weight_1_0 = (*weights)[first_station + 1][channel][first_tab + 0]; - float2 weight_1_1 = (*weights)[first_station + 1][channel][first_tab + 1]; - float2 weight_1_2 = (*weights)[first_station + 1][channel][first_tab + 2]; - float2 weight_2_0 = (*weights)[first_station + 2][channel][first_tab + 0]; - float2 weight_2_1 = (*weights)[first_station + 2][channel][first_tab + 1]; - float2 weight_2_2 = (*weights)[first_station + 2][channel][first_tab + 2]; - float2 weight_3_0 = (*weights)[first_station + 3][channel][first_tab + 0]; - float2 weight_3_1 = (*weights)[first_station + 3][channel][first_tab + 1]; - float2 weight_3_2 = (*weights)[first_station + 3][channel][first_tab + 2]; - float2 weight_4_0 = (*weights)[first_station + 4][channel][first_tab + 0]; - float2 weight_4_1 = (*weights)[first_station + 4][channel][first_tab + 1]; - float2 weight_4_2 = (*weights)[first_station + 4][channel][first_tab + 2]; - float2 weight_5_0 = (*weights)[first_station + 5][channel][first_tab + 0]; - float2 weight_5_1 = (*weights)[first_station + 5][channel][first_tab + 1]; - float2 weight_5_2 = (*weights)[first_station + 5][channel][first_tab + 2]; - - __local float4 local_sums[3][NR_STATIONS / 6 - 1][NR_CHANNELS_PER_BLOCK][NR_TABS / 3]; - - for (int i = 0; i < 2 * get_local_id(2); i++) - barrier(CLK_LOCAL_MEM_FENCE); - - for (int time = 0; time < (int) NR_SAMPLES_PER_INTEGRATION; time++) { - barrier(CLK_LOCAL_MEM_FENCE); - - float4 sum_0, sum_1, sum_2; - - if (first_station == 0) { - sum_0 = sum_1 = sum_2 = (float4) { 0, 0, 0, 0 }; - } else { - sum_0 = local_sums[0][get_local_id(2) - 1][get_local_id(1)][get_local_id(0)]; - sum_1 = local_sums[1][get_local_id(2) - 1][get_local_id(1)][get_local_id(0)]; - sum_2 = local_sums[2][get_local_id(2) - 1][get_local_id(1)][get_local_id(0)]; - } - - float4 sample_0 = (*correctedData)[first_station + 0][time][channel]; - float4 sample_1 = (*correctedData)[first_station + 1][time][channel]; - float4 sample_2 = (*correctedData)[first_station + 2][time][channel]; - float4 sample_3 = (*correctedData)[first_station + 3][time][channel]; - float4 sample_4 = (*correctedData)[first_station + 4][time][channel]; - float4 sample_5 = (*correctedData)[first_station + 5][time][channel]; - - sum_0 += weight_0_0.xxxx * sample_0; - sum_1 += weight_0_1.xxxx * sample_0; - sum_2 += weight_0_2.xxxx * sample_0; - float4 sample_0_tr = (float4) { -sample_0.y, sample_0.x, -sample_0.w, sample_0.z }; - sum_0 += weight_0_0.yyyy * sample_0_tr; - sum_1 += weight_0_1.yyyy * sample_0_tr; - sum_2 += weight_0_2.yyyy * sample_0_tr; - - sum_0 += weight_1_0.xxxx * sample_1; - sum_1 += weight_1_1.xxxx * sample_1; - sum_2 += weight_1_2.xxxx * sample_1; - float4 sample_1_tr = (float4) { -sample_1.y, sample_1.x, -sample_1.w, sample_1.z }; - sum_0 += weight_1_0.yyyy * sample_1_tr; - sum_1 += weight_1_1.yyyy * sample_1_tr; - sum_2 += weight_1_2.yyyy * sample_1_tr; - - sum_0 += weight_2_0.xxxx * sample_2; - sum_1 += weight_2_1.xxxx * sample_2; - sum_2 += weight_2_2.xxxx * sample_2; - float4 sample_2_tr = (float4) { -sample_2.y, sample_2.x, -sample_2.w, sample_2.z }; - sum_0 += weight_2_0.yyyy * sample_2_tr; - sum_1 += weight_2_1.yyyy * sample_2_tr; - sum_2 += weight_2_2.yyyy * sample_2_tr; - - sum_0 += weight_3_0.xxxx * sample_3; - sum_1 += weight_3_1.xxxx * sample_3; - sum_2 += weight_3_2.xxxx * sample_3; - float4 sample_3_tr = (float4) { -sample_3.y, sample_3.x, -sample_3.w, sample_3.z }; - sum_0 += weight_3_0.yyyy * sample_3_tr; - sum_1 += weight_3_1.yyyy * sample_3_tr; - sum_2 += weight_3_2.yyyy * sample_3_tr; - - sum_0 += weight_4_0.xxxx * sample_4; - sum_1 += weight_4_1.xxxx * sample_4; - sum_2 += weight_4_2.xxxx * sample_4; - float4 sample_4_tr = (float4) { -sample_4.y, sample_4.x, -sample_4.w, sample_4.z }; - sum_0 += weight_4_0.yyyy * sample_4_tr; - sum_1 += weight_4_1.yyyy * sample_4_tr; - sum_2 += weight_4_2.yyyy * sample_4_tr; - - sum_0 += weight_5_0.xxxx * sample_5; - sum_1 += weight_5_1.xxxx * sample_5; - sum_2 += weight_5_2.xxxx * sample_5; - float4 sample_5_tr = (float4) { -sample_5.y, sample_5.x, -sample_5.w, sample_5.z }; - sum_0 += weight_5_0.yyyy * sample_5_tr; - sum_1 += weight_5_1.yyyy * sample_5_tr; - sum_2 += weight_5_2.yyyy * sample_5_tr; - - barrier(CLK_LOCAL_MEM_FENCE); - - if (first_station + 6 < NR_STATIONS) { - local_sums[0][get_local_id(2)][get_local_id(1)][get_local_id(0)] = sum_0; - local_sums[1][get_local_id(2)][get_local_id(1)][get_local_id(0)] = sum_1; - local_sums[2][get_local_id(2)][get_local_id(1)][get_local_id(0)] = sum_2; - } else { - (*complexVoltages)[first_tab + 0][time][channel] = sum_0; - (*complexVoltages)[first_tab + 1][time][channel] = sum_1; - (*complexVoltages)[first_tab + 2][time][channel] = sum_2; - } - - for (int i = 0; i < 2 * (get_local_size(2) - 1 - get_local_id(2)); i++) - barrier(CLK_LOCAL_MEM_FENCE); - -#if 0 -#if defined STOKES_I || defined STOKES_IQUV - float powerX = sum.x * sum.x + sum.y * sum.y; - float powerY = sum.z * sum.z + sum.w * sum.w; - - (*stokes)[tab][0][0][time_or_channel] = powerX + powerY; -#if defined STOKES_IQUV - (*stokes)[tab][1][0][time_or_channel] = powerX - powerY; - (*stokes)[tab][2][0][time_or_channel] = 2 * (sum.x * sum.z + sum.y * sum.w); - (*stokes)[tab][3][0][time_or_channel] = 2 * (sum.y * sum.z - sum.x * sum.w); -#endif -#endif -#endif - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.ok b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.ok deleted file mode 100644 index 6bd1a3afc83afad117a6fd608552561f73324818..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.ok +++ /dev/null @@ -1,536 +0,0 @@ -#define MAX(A,B) ((A)>(B) ? (A) : (B)) -#define NR_PASSES MAX((NR_STATIONS + 6) / 16, 1) // gives best results on GTX 680 -#define NR_STATIONS_PER_PASS ((NR_STATIONS + NR_PASSES - 1) / NR_PASSES) - -#if NR_STATIONS_PER_PASS > 32 -#error "need more passes to beam form this number of stations" -#endif - - -typedef __global float2 (*ComplexVoltagesType)[NR_CHANNELS][NR_TIMES_PER_BLOCK][NR_TABS][NR_POLARIZATIONS]; -typedef __global float4 (*BandPassCorrectedType)[NR_STATIONS][NR_CHANNELS][NR_TIMES_PER_BLOCK]; -typedef __global float2 (*WeightsType)[NR_STATIONS][NR_CHANNELS][NR_TABS]; - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *samplesPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - BandPassCorrectedType samples = (BandPassCorrectedType) samplesPtr; - WeightsType weights = (WeightsType) weightsPtr; - - uint pol = get_local_id(0); - uint tab = get_local_id(1); - uint channel = get_global_id(2); - - float2 sample; - __local union { - float2 samples[NR_STATIONS_PER_PASS][16][NR_POLARIZATIONS]; - float4 samples4[NR_STATIONS_PER_PASS][16]; - } _local; - -#pragma unroll - for (uint first_station = 0; first_station < NR_STATIONS; first_station += NR_STATIONS_PER_PASS) { -#if NR_STATIONS_PER_PASS >= 1 - float2 weight_00; - - if (first_station + 0 < NR_STATIONS) - weight_00 = (*weights)[first_station + 0][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 2 - float2 weight_01; - - if (first_station + 1 < NR_STATIONS) - weight_01 = (*weights)[first_station + 1][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 3 - float2 weight_02; - - if (first_station + 2 < NR_STATIONS) - weight_02 = (*weights)[first_station + 2][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 4 - float2 weight_03; - - if (first_station + 3 < NR_STATIONS) - weight_03 = (*weights)[first_station + 3][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 5 - float2 weight_04; - - if (first_station + 4 < NR_STATIONS) - weight_04 = (*weights)[first_station + 4][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 6 - float2 weight_05; - - if (first_station + 5 < NR_STATIONS) - weight_05 = (*weights)[first_station + 5][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 7 - float2 weight_06; - - if (first_station + 6 < NR_STATIONS) - weight_06 = (*weights)[first_station + 6][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 8 - float2 weight_07; - - if (first_station + 7 < NR_STATIONS) - weight_07 = (*weights)[first_station + 7][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 9 - float2 weight_08; - - if (first_station + 8 < NR_STATIONS) - weight_08 = (*weights)[first_station + 8][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 10 - float2 weight_09; - - if (first_station + 9 < NR_STATIONS) - weight_09 = (*weights)[first_station + 9][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 11 - float2 weight_10; - - if (first_station + 10 < NR_STATIONS) - weight_10 = (*weights)[first_station + 10][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 12 - float2 weight_11; - - if (first_station + 11 < NR_STATIONS) - weight_11 = (*weights)[first_station + 11][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 13 - float2 weight_12; - - if (first_station + 12 < NR_STATIONS) - weight_12 = (*weights)[first_station + 12][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 14 - float2 weight_13; - - if (first_station + 13 < NR_STATIONS) - weight_13 = (*weights)[first_station + 13][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 15 - float2 weight_14; - - if (first_station + 14 < NR_STATIONS) - weight_14 = (*weights)[first_station + 14][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 16 - float2 weight_15; - - if (first_station + 15 < NR_STATIONS) - weight_15 = (*weights)[first_station + 15][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 17 - float2 weight_16; - - if (first_station + 16 < NR_STATIONS) - weight_16 = (*weights)[first_station + 16][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 18 - float2 weight_17; - - if (first_station + 17 < NR_STATIONS) - weight_17 = (*weights)[first_station + 17][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 19 - float2 weight_18; - - if (first_station + 18 < NR_STATIONS) - weight_18 = (*weights)[first_station + 18][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 20 - float2 weight_19; - - if (first_station + 19 < NR_STATIONS) - weight_19 = (*weights)[first_station + 19][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 21 - float2 weight_20; - - if (first_station + 20 < NR_STATIONS) - weight_20 = (*weights)[first_station + 20][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 22 - float2 weight_21; - - if (first_station + 21 < NR_STATIONS) - weight_21 = (*weights)[first_station + 21][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 23 - float2 weight_22; - - if (first_station + 22 < NR_STATIONS) - weight_22 = (*weights)[first_station + 22][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 24 - float2 weight_23; - - if (first_station + 23 < NR_STATIONS) - weight_23 = (*weights)[first_station + 23][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 25 - float2 weight_24; - - if (first_station + 24 < NR_STATIONS) - weight_24 = (*weights)[first_station + 24][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 26 - float2 weight_25; - - if (first_station + 25 < NR_STATIONS) - weight_25 = (*weights)[first_station + 25][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 27 - float2 weight_26; - - if (first_station + 26 < NR_STATIONS) - weight_26 = (*weights)[first_station + 26][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 28 - float2 weight_27; - - if (first_station + 27 < NR_STATIONS) - weight_27 = (*weights)[first_station + 27][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 29 - float2 weight_28; - - if (first_station + 28 < NR_STATIONS) - weight_28 = (*weights)[first_station + 28][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 30 - float2 weight_29; - - if (first_station + 29 < NR_STATIONS) - weight_29 = (*weights)[first_station + 29][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 31 - float2 weight_30; - - if (first_station + 30 < NR_STATIONS) - weight_30 = (*weights)[first_station + 30][channel][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 32 - float2 weight_31; - - if (first_station + 31 < NR_STATIONS) - weight_31 = (*weights)[first_station + 31][channel][tab]; -#endif - - for (uint time = 0; time < NR_TIMES_PER_BLOCK; time += 16) { - for (uint i = get_local_id(0) + NR_POLARIZATIONS * get_local_id(1); i < NR_STATIONS_PER_PASS * 16; i += NR_TABS * NR_POLARIZATIONS) { - uint t = i % 16; - uint s = i / 16; - - if (NR_TIMES_PER_BLOCK % 16 == 0 || time + t < NR_TIMES_PER_BLOCK) - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + s < NR_STATIONS) - _local.samples4[0][i] = convert_float4((*samples)[first_station + s][channel][time + t]); - } - - barrier(CLK_LOCAL_MEM_FENCE); - - for (uint t = 0; t < (NR_TIMES_PER_BLOCK % 16 == 0 ? 16 : min(16U, NR_TIMES_PER_BLOCK - time)); t++) { - float2 sum = first_station == 0 ? 0 : (*complexVoltages)[channel][time + t][tab][pol]; - -#if NR_STATIONS_PER_PASS >= 1 - if (first_station + 1 < NR_STATIONS) { - sample = _local.samples[ 0][t][pol]; - sum += weight_00.xx * sample; - sum += weight_00.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 2 - if (first_station + 2 < NR_STATIONS) { - sample = _local.samples[ 1][t][pol]; - sum += weight_01.xx * sample; - sum += weight_01.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 3 - if (first_station + 3 < NR_STATIONS) { - sample = _local.samples[ 2][t][pol]; - sum += weight_02.xx * sample; - sum += weight_02.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 4 - if (first_station + 4 < NR_STATIONS) { - sample = _local.samples[ 3][t][pol]; - sum += weight_03.xx * sample; - sum += weight_03.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 5 - if (first_station + 5 < NR_STATIONS) { - sample = _local.samples[ 4][t][pol]; - sum += weight_04.xx * sample; - sum += weight_04.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 6 - if (first_station + 6 < NR_STATIONS) { - sample = _local.samples[ 5][t][pol]; - sum += weight_05.xx * sample; - sum += weight_05.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 7 - if (first_station + 7 < NR_STATIONS) { - sample = _local.samples[ 6][t][pol]; - sum += weight_06.xx * sample; - sum += weight_06.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 8 - if (first_station + 8 < NR_STATIONS) { - sample = _local.samples[ 7][t][pol]; - sum += weight_07.xx * sample; - sum += weight_07.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 9 - if (first_station + 9 < NR_STATIONS) { - sample = _local.samples[ 8][t][pol]; - sum += weight_08.xx * sample; - sum += weight_08.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 10 - if (first_station + 10 < NR_STATIONS) { - sample = _local.samples[ 9][t][pol]; - sum += weight_09.xx * sample; - sum += weight_09.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 11 - if (first_station + 11 < NR_STATIONS) { - sample = _local.samples[10][t][pol]; - sum += weight_10.xx * sample; - sum += weight_10.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 12 - if (first_station + 12 < NR_STATIONS) { - sample = _local.samples[11][t][pol]; - sum += weight_11.xx * sample; - sum += weight_11.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 13 - if (first_station + 13 < NR_STATIONS) { - sample = _local.samples[12][t][pol]; - sum += weight_12.xx * sample; - sum += weight_12.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 14 - if (first_station + 14 < NR_STATIONS) { - sample = _local.samples[13][t][pol]; - sum += weight_13.xx * sample; - sum += weight_13.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 15 - if (first_station + 15 < NR_STATIONS) { - sample = _local.samples[14][t][pol]; - sum += weight_14.xx * sample; - sum += weight_14.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 16 - if (first_station + 15 < NR_STATIONS) { - sample = _local.samples[15][t][pol]; - sum += weight_15.xx * sample; - sum += weight_15.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 17 - if (first_station + 16 < NR_STATIONS) { - sample = _local.samples[16][t][pol]; - sum += weight_16.xx * sample; - sum += weight_16.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 18 - if (first_station + 17 < NR_STATIONS) { - sample = _local.samples[17][t][pol]; - sum += weight_17.xx * sample; - sum += weight_17.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 19 - if (first_station + 18 < NR_STATIONS) { - sample = _local.samples[18][t][pol]; - sum += weight_18.xx * sample; - sum += weight_18.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 20 - if (first_station + 19 < NR_STATIONS) { - sample = _local.samples[19][t][pol]; - sum += weight_19.xx * sample; - sum += weight_19.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 21 - if (first_station + 20 < NR_STATIONS) { - sample = _local.samples[20][t][pol]; - sum += weight_20.xx * sample; - sum += weight_20.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 22 - if (first_station + 21 < NR_STATIONS) { - sample = _local.samples[21][t][pol]; - sum += weight_21.xx * sample; - sum += weight_21.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 23 - if (first_station + 22 < NR_STATIONS) { - sample = _local.samples[22][t][pol]; - sum += weight_22.xx * sample; - sum += weight_22.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 24 - if (first_station + 23 < NR_STATIONS) { - sample = _local.samples[23][t][pol]; - sum += weight_23.xx * sample; - sum += weight_23.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 25 - if (first_station + 25 < NR_STATIONS) { - sample = _local.samples[24][t][pol]; - sum += weight_24.xx * sample; - sum += weight_24.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 26 - if (first_station + 25 < NR_STATIONS) { - sample = _local.samples[25][t][pol]; - sum += weight_25.xx * sample; - sum += weight_25.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 27 - if (first_station + 26 < NR_STATIONS) { - sample = _local.samples[26][t][pol]; - sum += weight_26.xx * sample; - sum += weight_26.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 28 - if (first_station + 27 < NR_STATIONS) { - sample = _local.samples[27][t][pol]; - sum += weight_27.xx * sample; - sum += weight_27.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 29 - if (first_station + 28 < NR_STATIONS) { - sample = _local.samples[28][t][pol]; - sum += weight_28.xx * sample; - sum += weight_28.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 30 - if (first_station + 29 < NR_STATIONS) { - sample = _local.samples[29][t][pol]; - sum += weight_29.xx * sample; - sum += weight_29.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 31 - if (first_station + 30 < NR_STATIONS) { - sample = _local.samples[30][t][pol]; - sum += weight_30.xx * sample; - sum += weight_30.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 32 - if (first_station + 31 < NR_STATIONS) { - sample = _local.samples[31][t][pol]; - sum += weight_31.xx * sample; - sum += weight_31.yy * (float2) (-sample.y, sample.x); - } -#endif - - (*complexVoltages)[channel][time + t][tab][pol] = sum; - } - - barrier(CLK_LOCAL_MEM_FENCE); - } - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.orig b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.orig deleted file mode 100644 index 43ae0e90cb39fd79c6393dd194b6aa8b95695a96..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/BeamFormer.cl.orig +++ /dev/null @@ -1,149 +0,0 @@ -typedef __global float4 (*ComplexVoltagesType)[NR_CHANNELS][NR_TIMES_PER_BLOCK][NR_TABS]; -//typedef __global float4 (*CorrectedDataType)[NR_STATIONS][NR_CHANNELS][NR_TIMES_PER_BLOCK]; -typedef __global float4 (*CorrectedDataType)[NR_STATIONS][NR_TIMES_PER_BLOCK][NR_CHANNELS]; -typedef __global float2 (*WeightsType)[NR_STATIONS][NR_CHANNELS][NR_TABS]; - -float2 cmul(float2 a, float2 b) -{ - return (float2) { a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x }; -} - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *correctedDataPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - CorrectedDataType correctedData = (CorrectedDataType) correctedDataPtr; - WeightsType weights = (WeightsType) weightsPtr; - - uint first_tab = 3 * get_local_id(0); - uint first_station = 6 * get_local_id(1); - uint channel = get_global_id(2); - - bool lastGroupOfStations = first_station + 6 == NR_STATIONS; - - float2 weight_0_0 = (*weights)[first_station + 0][channel][first_tab + 0]; - float2 weight_0_1 = (*weights)[first_station + 0][channel][first_tab + 1]; - float2 weight_0_2 = (*weights)[first_station + 0][channel][first_tab + 2]; - float2 weight_1_0 = (*weights)[first_station + 1][channel][first_tab + 0]; - float2 weight_1_1 = (*weights)[first_station + 1][channel][first_tab + 1]; - float2 weight_1_2 = (*weights)[first_station + 1][channel][first_tab + 2]; - float2 weight_2_0 = (*weights)[first_station + 2][channel][first_tab + 0]; - float2 weight_2_1 = (*weights)[first_station + 2][channel][first_tab + 1]; - float2 weight_2_2 = (*weights)[first_station + 2][channel][first_tab + 2]; - float2 weight_3_0 = (*weights)[first_station + 3][channel][first_tab + 0]; - float2 weight_3_1 = (*weights)[first_station + 3][channel][first_tab + 1]; - float2 weight_3_2 = (*weights)[first_station + 3][channel][first_tab + 2]; - float2 weight_4_0 = (*weights)[first_station + 4][channel][first_tab + 0]; - float2 weight_4_1 = (*weights)[first_station + 4][channel][first_tab + 1]; - float2 weight_4_2 = (*weights)[first_station + 4][channel][first_tab + 2]; - float2 weight_5_0 = (*weights)[first_station + 5][channel][first_tab + 0]; - float2 weight_5_1 = (*weights)[first_station + 5][channel][first_tab + 1]; - float2 weight_5_2 = (*weights)[first_station + 5][channel][first_tab + 2]; - - __local float4 local_sums[3][NR_STATIONS / 6][NR_TABS / 3]; - float4 sample_0, sample_1, sample_2, sample_3, sample_4, sample_5; - float4 sum_0, sum_1, sum_2; - - if (first_station == 0) { - local_sums[0][0][get_local_id(0)] = (float4) { 0, 0, 0, 0 }; - local_sums[1][0][get_local_id(0)] = (float4) { 0, 0, 0, 0 }; - local_sums[2][0][get_local_id(0)] = (float4) { 0, 0, 0, 0 }; - } - - for (int time = 0 - get_local_id(1); time < (int) (NR_TIMES_PER_BLOCK + NR_STATIONS / 6 - 1 - get_local_id(1)); time++) { - bool validTime = time >= 0 && time < NR_TIMES_PER_BLOCK; - - if (validTime) { - sample_0 = (*correctedData)[first_station + 0][time][channel]; - sample_1 = (*correctedData)[first_station + 1][time][channel]; - sample_2 = (*correctedData)[first_station + 2][time][channel]; - sample_3 = (*correctedData)[first_station + 3][time][channel]; - sample_4 = (*correctedData)[first_station + 4][time][channel]; - sample_5 = (*correctedData)[first_station + 5][time][channel]; - - sum_0 = local_sums[0][get_local_id(1)][get_local_id(0)]; - sum_1 = local_sums[1][get_local_id(1)][get_local_id(0)]; - sum_2 = local_sums[2][get_local_id(1)][get_local_id(0)]; - - sum_0 += weight_0_0.xxxx * sample_0; - sum_1 += weight_0_1.xxxx * sample_0; - sum_2 += weight_0_2.xxxx * sample_0; - float4 sample_0_tr = (float4) { -sample_0.y, sample_0.x, -sample_0.w, sample_0.z }; - sum_0 += weight_0_0.yyyy * sample_0_tr; - sum_1 += weight_0_1.yyyy * sample_0_tr; - sum_2 += weight_0_2.yyyy * sample_0_tr; - - sum_0 += weight_1_0.xxxx * sample_1; - sum_1 += weight_1_1.xxxx * sample_1; - sum_2 += weight_1_2.xxxx * sample_1; - float4 sample_1_tr = (float4) { -sample_1.y, sample_1.x, -sample_1.w, sample_1.z }; - sum_0 += weight_1_0.yyyy * sample_1_tr; - sum_1 += weight_1_1.yyyy * sample_1_tr; - sum_2 += weight_1_2.yyyy * sample_1_tr; - - sum_0 += weight_2_0.xxxx * sample_2; - sum_1 += weight_2_1.xxxx * sample_2; - sum_2 += weight_2_2.xxxx * sample_2; - float4 sample_2_tr = (float4) { -sample_2.y, sample_2.x, -sample_2.w, sample_2.z }; - sum_0 += weight_2_0.yyyy * sample_2_tr; - sum_1 += weight_2_1.yyyy * sample_2_tr; - sum_2 += weight_2_2.yyyy * sample_2_tr; - - sum_0 += weight_3_0.xxxx * sample_3; - sum_1 += weight_3_1.xxxx * sample_3; - sum_2 += weight_3_2.xxxx * sample_3; - float4 sample_3_tr = (float4) { -sample_3.y, sample_3.x, -sample_3.w, sample_3.z }; - sum_0 += weight_3_0.yyyy * sample_3_tr; - sum_1 += weight_3_1.yyyy * sample_3_tr; - sum_2 += weight_3_2.yyyy * sample_3_tr; - - sum_0 += weight_4_0.xxxx * sample_4; - sum_1 += weight_4_1.xxxx * sample_4; - sum_2 += weight_4_2.xxxx * sample_4; - float4 sample_4_tr = (float4) { -sample_4.y, sample_4.x, -sample_4.w, sample_4.z }; - sum_0 += weight_4_0.yyyy * sample_4_tr; - sum_1 += weight_4_1.yyyy * sample_4_tr; - sum_2 += weight_4_2.yyyy * sample_4_tr; - - sum_0 += weight_5_0.xxxx * sample_5; - sum_1 += weight_5_1.xxxx * sample_5; - sum_2 += weight_5_2.xxxx * sample_5; - float4 sample_5_tr = (float4) { -sample_5.y, sample_5.x, -sample_5.w, sample_5.z }; - sum_0 += weight_5_0.yyyy * sample_5_tr; - sum_1 += weight_5_1.yyyy * sample_5_tr; - sum_2 += weight_5_2.yyyy * sample_5_tr; - } - - barrier(CLK_LOCAL_MEM_FENCE); - - if (validTime) { - if (lastGroupOfStations) { - (*complexVoltages)[channel][time][first_tab + 0] = sum_0; - (*complexVoltages)[channel][time][first_tab + 1] = sum_1; - (*complexVoltages)[channel][time][first_tab + 2] = sum_2; - } else { - local_sums[0][get_local_id(1) + 1][get_local_id(0)] = sum_0; - local_sums[1][get_local_id(1) + 1][get_local_id(0)] = sum_1; - local_sums[2][get_local_id(1) + 1][get_local_id(0)] = sum_2; - } - } - - barrier(CLK_LOCAL_MEM_FENCE); - -#if 0 -#if defined STOKES_I || defined STOKES_IQUV - float powerX = sum.x * sum.x + sum.y * sum.y; - float powerY = sum.z * sum.z + sum.w * sum.w; - - (*stokes)[tab][0][0][time_or_channel] = powerX + powerY; -#if defined STOKES_IQUV - (*stokes)[tab][1][0][time_or_channel] = powerX - powerY; - (*stokes)[tab][2][0][time_or_channel] = 2 * (sum.x * sum.z + sum.y * sum.w); - (*stokes)[tab][3][0][time_or_channel] = 2 * (sum.y * sum.z - sum.x * sum.w); -#endif -#endif -#endif - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/CoherentStokes.cl b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/CoherentStokes.cl deleted file mode 100644 index 8491fe641b5ac4013120bfe33aef5ad5ca040995..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/CoherentStokes.cl +++ /dev/null @@ -1,152 +0,0 @@ -//# CoherentStokes.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -__kernel void coherentStokes(__global void *restrict stokesDataPtr, - __global const void *restrict complexVoltagesPtr) -{ - typedef __global float (*StokesType)[NR_TABS][NR_COHERENT_STOKES][NR_SAMPLES_PER_CHANNEL / COHERENT_STOKES_TIME_INTEGRATION_FACTOR][NR_CHANNELS]; - typedef __global float4 (*ComplexVoltagesType)[NR_CHANNELS][NR_SAMPLES_PER_CHANNEL / COHERENT_STOKES_TIME_INTEGRATION_FACTOR][COHERENT_STOKES_TIME_INTEGRATION_FACTOR][NR_TABS]; - - StokesType stokesData = (StokesType) stokesDataPtr; - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - - __local float tmp[NR_COHERENT_STOKES][16][17]; - - uint tabBase = 16 * get_global_id(1); - uint chBase = 16 * get_global_id(2); - - uint tabOffsetR = get_local_id(0) & 15; - uint tabR = tabBase + tabOffsetR; - uint chOffsetR = get_local_id(0) >> 4; - uint channelR = chBase + chOffsetR; - bool doR = NR_TABS % 16 == 0 || tabR < NR_TABS; - - uint tabOffsetW = get_local_id(0) >> 4; - uint tabW = tabBase + tabOffsetW; - uint chOffsetW = get_local_id(0) & 15; - uint channelW = chBase + chOffsetW; - bool doW = NR_TABS % 16 == 0 || tabW < NR_TABS; - - for (uint time = 0; time < NR_SAMPLES_PER_CHANNEL / COHERENT_STOKES_TIME_INTEGRATION_FACTOR; time++) { - float stokesI = 0; -#if NR_COHERENT_STOKES == 4 - float stokesQ = 0, halfStokesU = 0, halfStokesV = 0; -#endif - - if (doR) { - for (uint t = 0; t < COHERENT_STOKES_TIME_INTEGRATION_FACTOR; t++) { - float4 sample = (*complexVoltages)[channelR][time][t][tabR]; - float2 X = sample.xy, Y = sample.zw; - float powerX = X.x * X.x + X.y * X.y; - float powerY = Y.x * Y.x + Y.y * Y.y; - stokesI += powerX + powerY; -#if NR_COHERENT_STOKES == 4 - stokesQ += powerX - powerY; - halfStokesU += X.x * Y.x + X.y * Y.y; - halfStokesV += X.y * Y.x - X.x * Y.y; -#endif - } - - tmp[0][tabOffsetR][chOffsetR] = stokesI; -#if NR_COHERENT_STOKES == 4 - tmp[1][tabOffsetR][chOffsetR] = stokesQ; - tmp[2][tabOffsetR][chOffsetR] = 2 * halfStokesU; - tmp[3][tabOffsetR][chOffsetR] = 2 * halfStokesV; -#endif - } - - barrier(CLK_LOCAL_MEM_FENCE); - - if (doW) - for (uint stokes = 0; stokes < NR_COHERENT_STOKES; stokes++) - (*stokesData)[tabW][stokes][time][channelW] = tmp[stokes][tabOffsetW][chOffsetW]; - - barrier(CLK_LOCAL_MEM_FENCE); - } -} - - -#if 0 -__kernel void computeStokes(__global void *restrict stokesDataPtr, - __global const void *restrict dedispersedDataPtr) -{ - typedef __global float (*StokesType)[NR_TABS][NR_COHERENT_STOKES][NR_SAMPLES_PER_CHANNEL / COHERENT_STOKES_TIME_INTEGRATION_FACTOR][NR_CHANNELS]; - typedef __global float2 (*DedispersedDataType)[NR_TABS][NR_POLARIZATIONS][NR_CHANNELS][NR_SAMPLES_PER_CHANNEL]; - - StokesType stokesData = (StokesType) stokesDataPtr; - DedispersedDataType dedispersedData = (DedispersedDataType) dedispersedDataPtr; - - __local float tmp[NR_COHERENT_STOKES][16][17]; - - uint timeBase = 16 * get_global_id(1); - uint chBase = 16 * get_global_id(2); - - uint timeOffsetR = get_local_id(0) & 15; - uint timeR = timeBase + tabOffsetR; - uint chOffsetR = get_local_id(0) >> 4; - uint channelR = chBase + chOffsetR; - bool doR = NR_TABS % 16 == 0 || tabR < NR_TABS; - - uint tabOffsetW = get_local_id(0) >> 4; - uint tabW = tabBase + tabOffsetW; - uint chOffsetW = get_local_id(0) & 15; - uint channelW = chBase + chOffsetW; - bool doW = NR_TABS % 16 == 0 || tabW < NR_TABS; - - for (uint time = 0; time < NR_SAMPLES_PER_CHANNEL / COHERENT_STOKES_TIME_INTEGRATION_FACTOR; time++) { - float stokesI = 0; -#if NR_COHERENT_STOKES == 4 - float stokesQ = 0, halfStokesU = 0, halfStokesV = 0; -#endif - - if (doR) { - for (uint t = 0; t < COHERENT_STOKES_TIME_INTEGRATION_FACTOR; t++) { - float4 sample = (*complexVoltages)[channelR][time][t][tabR]; - float2 X = sample.xy, Y = sample.zw; - float powerX = X.x * X.x + X.y * X.y; - float powerY = Y.x * Y.x + Y.y * Y.y; - stokesI += powerX + powerY; -#if NR_COHERENT_STOKES == 4 - stokesQ += powerX - powerY; - halfStokesU += X.x * Y.x + X.y * Y.y; - halfStokesV += X.y * Y.x - X.x * Y.y; -#endif - } - - tmp[0][tabOffsetR][chOffsetR] = stokesI; -#if NR_COHERENT_STOKES == 4 - tmp[1][tabOffsetR][chOffsetR] = stokesQ; - tmp[2][tabOffsetR][chOffsetR] = 2 * halfStokesU; - tmp[3][tabOffsetR][chOffsetR] = 2 * halfStokesV; -#endif - } - - barrier(CLK_LOCAL_MEM_FENCE); - - if (doW) - for (uint stokes = 0; stokes < NR_COHERENT_STOKES; stokes++) - (*stokesData)[tabW][stokes][time][channelW] = tmp[stokes][tabOffsetW][chOffsetW]; - - barrier(CLK_LOCAL_MEM_FENCE); - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/CoherentStokes.cl.ok b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/CoherentStokes.cl.ok deleted file mode 100644 index 07cc1a63b15bfa5a7e73053f2392a854af6fa6cb..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/CoherentStokes.cl.ok +++ /dev/null @@ -1,63 +0,0 @@ -__kernel void computeStokes(__global void *restrict stokesDataPtr, - __global const void *restrict complexVoltagesPtr) -{ - typedef __global float (*StokesType)[NR_TABS][NR_STOKES][NR_TIMES_PER_BLOCK / STOKES_INTEGRATION_SAMPLES][NR_CHANNELS]; - typedef __global float4 (*ComplexVoltagesType)[NR_CHANNELS][NR_TIMES_PER_BLOCK / STOKES_INTEGRATION_SAMPLES][STOKES_INTEGRATION_SAMPLES][NR_TABS]; - - StokesType stokesData = (StokesType) stokesDataPtr; - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - - __local float tmp[NR_STOKES][16][17]; - - uint tabBase = 16 * get_global_id(1); - uint chBase = 16 * get_global_id(2); - - uint tabOffsetR = get_local_id(0) & 15; - uint tabR = tabBase + tabOffsetR; - uint chOffsetR = get_local_id(0) >> 4; - uint channelR = chBase + chOffsetR; - bool doR = NR_TABS % 16 == 0 || tabR < NR_TABS; - - uint tabOffsetW = get_local_id(0) >> 4; - uint tabW = tabBase + tabOffsetW; - uint chOffsetW = get_local_id(0) & 15; - uint channelW = chBase + chOffsetW; - bool doW = NR_TABS % 16 == 0 || tabW < NR_TABS; - - for (uint time = 0; time < NR_TIMES_PER_BLOCK / STOKES_INTEGRATION_SAMPLES; time++) { - float stokesI = 0; -#if NR_STOKES == 4 - float stokesQ = 0, halfStokesU = 0, halfStokesV = 0; -#endif - - if (doR) { - for (uint t = 0; t < STOKES_INTEGRATION_SAMPLES; t++) { - float4 sample = (*complexVoltages)[channelR][time][t][tabR]; - float2 X = sample.xy, Y = sample.zw; - float powerX = X.x * X.x + X.y * X.y; - float powerY = Y.x * Y.x + Y.y * Y.y; - stokesI += powerX + powerY; -#if NR_STOKES == 4 - stokesQ += powerX - powerY; - halfStokesU += X.x * Y.x + X.y * Y.y; - halfStokesV += X.y * Y.x - X.x * Y.y; -#endif - } - - tmp[0][tabOffsetR][chOffsetR] = stokesI; -#if NR_STOKES == 4 - tmp[1][tabOffsetR][chOffsetR] = stokesQ; - tmp[2][tabOffsetR][chOffsetR] = 2 * halfStokesU; - tmp[3][tabOffsetR][chOffsetR] = 2 * halfStokesV; -#endif - } - - barrier(CLK_LOCAL_MEM_FENCE); - - if (doW) - for (uint stokes = 0; stokes < NR_STOKES; stokes++) - (*stokesData)[tabW][stokes][time][channelW] = tmp[stokes][tabOffsetW][chOffsetW]; - - barrier(CLK_LOCAL_MEM_FENCE); - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/Dedispersion.cl b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/Dedispersion.cl deleted file mode 100644 index d51a9e1b877309e06012bb0910c0a5ca28ce2cf3..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/Dedispersion.cl +++ /dev/null @@ -1,82 +0,0 @@ -//# Dedispersion.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include "math.cl" - - -// | DM beam pol ch subtime subch. | SB -// -------+-------------------------------+--- -// taper | x | x -// factor | x x x | x -// sample | x x x x x | x - -#define CHANNEL_BANDWIDTH (SUBBAND_BANDWIDTH / NR_CHANNELS) -#define SUB_CHANNEL_BANDWIDTH (CHANNEL_BANDWIDTH / DEDISPERSION_FFT_SIZE) - -typedef __global float2 (*BufferType)[NR_TABS][NR_POLARIZATIONS][NR_CHANNELS][NR_SAMPLES_PER_CHANNEL / DEDISPERSION_FFT_SIZE][DEDISPERSION_FFT_SIZE]; - - -__kernel void applyChirp(__global void *bufferPtr, - __global float *DMs, - float subbandFrequency) -{ - __local float local_DMs[NR_TABS]; - - for (int i = get_local_id(0); i < NR_TABS; i += get_local_size(0)) - local_DMs[i] = DMs[i] * 2.0f * (float) M_PI * 4.149e15f; - - barrier(CLK_LOCAL_MEM_FENCE); - - BufferType buffer = (BufferType) bufferPtr; - - uint subChannel = get_global_id(0); - uint time = get_global_id(1); - uint channel = get_global_id(2); - -#if NR_CHANNELS > 1 - float subbandBaseFrequency = subbandFrequency - .5f * (float) SUBBAND_BANDWIDTH; - float channel0frequency = subbandBaseFrequency + channel * CHANNEL_BANDWIDTH; -#else - float channel0frequency = subbandFrequency; -#endif - - float binFrequency = subChannel * SUB_CHANNEL_BANDWIDTH; - - if (subChannel > DEDISPERSION_FFT_SIZE) - binFrequency -= CHANNEL_BANDWIDTH; - - float taper = native_rsqrt(1 + pow(binFrequency / (.47f * (float) CHANNEL_BANDWIDTH), 80.0f)) * DEDISPERSION_FFT_SIZE; - float frequencyDiv = binFrequency / channel0frequency; - float frequencyFac = frequencyDiv * frequencyDiv / (channel0frequency + binFrequency); - - for (uint tab = 0; tab < NR_TABS; tab++) { - float DM = local_DMs[tab]; - - /* if (DM > 0) */ { - float2 sampleX = (*buffer)[tab][0][channel][time][subChannel]; - float2 sampleY = (*buffer)[tab][1][channel][time][subChannel]; - float2 factor = cexp(DM * frequencyFac) * taper; - - (*buffer)[tab][0][channel][time][subChannel] = cmul(factor, sampleX); - (*buffer)[tab][1][channel][time][subChannel] = cmul(factor, sampleY); - } - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/IncoherentStokes.cl b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/IncoherentStokes.cl deleted file mode 100644 index 51edf76e3dcfe4fc92ac0552abb829b7c7738fe4..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/IncoherentStokes.cl +++ /dev/null @@ -1,66 +0,0 @@ -//# IncoherentStokes.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -typedef __global float (*IncoherentStokesType)[NR_INCOHERENT_STOKES][NR_SAMPLES_PER_CHANNEL / INCOHERENT_STOKES_TIME_INTEGRATION_FACTOR][NR_CHANNELS]; -typedef __global float4 (*InputType)[NR_STATIONS][NR_CHANNELS][NR_SAMPLES_PER_CHANNEL / INCOHERENT_STOKES_TIME_INTEGRATION_FACTOR][INCOHERENT_STOKES_TIME_INTEGRATION_FACTOR]; - - -__kernel void incoherentStokes(__global void *restrict stokesPtr, - __global const void *restrict inputPtr) -{ - IncoherentStokesType stokes = (IncoherentStokesType) stokesPtr; - InputType input = (InputType) inputPtr; - - uint time = get_global_id(0); - uint channel = get_global_id(1); - - if (time >= NR_SAMPLES_PER_CHANNEL / INCOHERENT_STOKES_TIME_INTEGRATION_FACTOR) - return; - - float stokesI = 0; -#if NR_INCOHERENT_STOKES == 4 - float stokesQ = 0, halfStokesU = 0, halfStokesV = 0; -#endif - - for (uint station = 0; station < NR_STATIONS; station++) { - for (uint t = 0; t < INCOHERENT_STOKES_TIME_INTEGRATION_FACTOR; t++) { - float4 sample = (*input)[station][channel][time][t]; - float2 X = sample.xy; - float2 Y = sample.zw; - float powerX = X.x * X.x + X.y * X.y; - float powerY = Y.x * Y.x + Y.y * Y.y; - - stokesI += powerX + powerY; -#if NR_INCOHERENT_STOKES == 4 - stokesQ += powerX - powerY; - halfStokesU += X.x * Y.x + X.y * Y.y; - halfStokesV += X.y * Y.x - X.x * Y.y; -#endif - } - } - - (*stokes)[0][time][channel] = stokesI; -#if NR_INCOHERENT_STOKES == 4 - (*stokes)[1][time][channel] = stokesQ; - (*stokes)[2][time][channel] = 2 * halfStokesU; - (*stokes)[3][time][channel] = 2 * halfStokesV; -#endif -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/IntToFloat.cl b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/IntToFloat.cl deleted file mode 100644 index 4ead4d543f73899bc8f113d7bd6794eac4ef88d5..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/IntToFloat.cl +++ /dev/null @@ -1,46 +0,0 @@ -//# IntToFloat.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#if NR_BITS_PER_SAMPLE == 16 -typedef short2 SampleType; -#elif NR_BITS_PER_SAMPLE == 8 -typedef char2 SampleType; -#else -#error unsupport NR_BITS_PER_SAMPLE -#endif - -typedef __global SampleType (*SampledDataType)[NR_STATIONS][NR_SAMPLES_PER_SUBBAND][NR_POLARIZATIONS]; -typedef __global float2 (*ConvertedDataType)[NR_STATIONS][NR_POLARIZATIONS][NR_SAMPLES_PER_SUBBAND]; - - -__kernel void intToFloat(__global void *restrict convertedDataPtr, - __global const void *restrict sampledDataPtr) -{ - ConvertedDataType convertedData = (ConvertedDataType) convertedDataPtr; - SampledDataType sampledData = (SampledDataType) sampledDataPtr; - - uint station = get_global_id(1); - - for (uint time = get_local_id(0); time < NR_SAMPLES_PER_SUBBAND; time += get_local_size(0)) { - (*convertedData)[station][0][time] = convert_float2((*sampledData)[station][time][0]); - (*convertedData)[station][1][time] = convert_float2((*sampledData)[station][time][1]); - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/Transpose.cl b/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/Transpose.cl deleted file mode 100644 index 971883fe6284c0ddd6500e9817f911094f061875..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/BeamFormer/Transpose.cl +++ /dev/null @@ -1,109 +0,0 @@ -//# Transpose.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#if 0 -typedef __global float2 (*TransposedDataType)[NR_TABS][NR_POLARIZATIONS][NR_SAMPLES_PER_CHANNEL][NR_CHANNELS]; -typedef __global float4 (*ComplexVoltagesType)[NR_CHANNELS][NR_SAMPLES_PER_CHANNEL][NR_TABS]; - -__kernel void transposeComplexVoltages(__global void *restrict transposedDataPtr, - __global const void *restrict complexVoltagesPtr) -{ - TransposedDataType transposedData = (TransposedDataType) transposedDataPtr; - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - - __local float4 tmp[16][17]; - - uint tabBase = 16 * get_global_id(1); - uint chBase = 16 * get_global_id(2); - - uint tabOffsetR = get_local_id(0) & 15; - uint tabR = tabBase + tabOffsetR; - uint chOffsetR = get_local_id(0) >> 4; - uint channelR = chBase + chOffsetR; - bool doR = NR_TABS % 16 == 0 || tabR < NR_TABS; - - uint tabOffsetW = get_local_id(0) >> 4; - uint tabW = tabBase + tabOffsetW; - uint chOffsetW = get_local_id(0) & 15; - uint channelW = chBase + chOffsetW; - bool doW = NR_TABS % 16 == 0 || tabW < NR_TABS; - - for (int time = 0; time < NR_SAMPLES_PER_CHANNEL; time++) { - if (doR) - tmp[tabOffsetR][chOffsetR] = (*complexVoltages)[channelR][time][tabR]; - - barrier(CLK_LOCAL_MEM_FENCE); - - if (doW) { - float4 sample = tmp[tabOffsetW][chOffsetW]; - (*transposedData)[tabW][0][time][channelW] = sample.xy; - (*transposedData)[tabW][1][time][channelW] = sample.zw; - } - - barrier(CLK_LOCAL_MEM_FENCE); - } -} - -#else - -typedef __global float2 (*TransposedDataType)[NR_TABS][NR_POLARIZATIONS][NR_CHANNELS][NR_SAMPLES_PER_CHANNEL]; -typedef __global float4 (*ComplexVoltagesType)[NR_CHANNELS][NR_SAMPLES_PER_CHANNEL][NR_TABS]; - -__kernel void transposeComplexVoltages(__global void *restrict transposedDataPtr, - __global const void *restrict complexVoltagesPtr) -{ - TransposedDataType transposedData = (TransposedDataType) transposedDataPtr; - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - - __local float4 tmp[16][17]; - - uint tabBase = 16 * get_global_id(1); - uint timeBase = 16 * get_global_id(2); - - uint tabOffsetR = get_local_id(0) & 15; - uint tabR = tabBase + tabOffsetR; - uint timeOffsetR = get_local_id(0) >> 4; - uint timeR = timeBase + timeOffsetR; - bool doR = NR_TABS % 16 == 0 || tabR < NR_TABS; - - uint tabOffsetW = get_local_id(0) >> 4; - uint tabW = tabBase + tabOffsetW; - uint timeOffsetW = get_local_id(0) & 15; - uint timeW = timeBase + timeOffsetW; - bool doW = NR_TABS % 16 == 0 || tabW < NR_TABS; - - for (int channel = 0; channel < NR_CHANNELS; channel++) { - if (doR) - tmp[tabOffsetR][timeOffsetR] = (*complexVoltages)[timeR][channel][tabR]; - - barrier(CLK_LOCAL_MEM_FENCE); - - if (doW) { - float4 sample = tmp[tabOffsetW][timeOffsetW]; - (*transposedData)[tabW][0][channel][timeW] = sample.xy; - (*transposedData)[tabW][1][channel][timeW] = sample.zw; - } - - barrier(CLK_LOCAL_MEM_FENCE); - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/CMakeLists.txt b/RTCP/Cobalt/GPUProc/src/opencl/CMakeLists.txt deleted file mode 100644 index 3923ababad474f1e551249e4c93aabe5ef022cd1..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# $Id$ - -install(FILES - Correlator.cl - DelayAndBandPass.cl - #fft2.cl - FFT.cl - FIR.cl - math.cl - NewCorrelator.cl - DESTINATION share/gpu/kernels) diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Correlator.cl b/RTCP/Cobalt/GPUProc/src/opencl/Correlator.cl deleted file mode 100644 index 977f8e90791807e4c8f9833d900054478bcba6e6..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Correlator.cl +++ /dev/null @@ -1,641 +0,0 @@ -//# Correlator.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include "math.cl" - -#define NR_BASELINES (NR_STATIONS * (NR_STATIONS + 1) / 2) - -#if NR_STATIONS == 288 -# if defined NVIDIA_CUDA -# define BLOCK_SIZE 8 -# elif NR_SAMPLES_PER_CHANNEL % 6 == 0 -# define BLOCK_SIZE 6 -# else -# define BLOCK_SIZE 4 -# endif -#elif NR_SAMPLES_PER_CHANNEL % 24 == 0 -# define BLOCK_SIZE 24 -#else -# define BLOCK_SIZE 16 -#endif - -typedef __global fcomplex2 (*CorrectedDataType)[NR_STATIONS][NR_CHANNELS][NR_SAMPLES_PER_CHANNEL]; -typedef __global fcomplex4 (*VisibilitiesType)[NR_BASELINES][NR_CHANNELS]; - - -//#pragma OPENCL EXTENSION cl_intel_printf : enable - -/*! - * Computes correlations between all pairs of stations (baselines) and X,Y - * polarizations. Also computes all station (and pol) auto-correlations. - * - * We consider the output space shaped as a triangle of S*(S-1)/2 full - * correlations, plus S auto-correlations at the hypothenuse (S = NR_STATIONS). - * This correlator consists of various versions, correlate_NxN, that differ in - * used register block size. We have 1x1 (this kernel), 2x2, 3x3, and 4x4. - * Measure, then select the fastest for your platform. - * - * Beyond dozens of antenna fields (exact number depends on observation, - * software and hardware parameters), our kernels in NewCorrelator.cl are - * significantly faster than these correlator kernels. - * - * \param[out] visibilitiesPtr 2D output array of visibilities. Each visibility contains the 4 polarization pairs, XX, XY, YX, YY, each of complex float type. - * \param[in] correctedDataPtr 3D input array of samples. Each sample contains the 2 polarizations X, Y, each of complex float type. - * - * Pre-processor input symbols (some are tied to the execution configuration) - * Symbol | Valid Values | Description - * ----------------------- | ----------------------- | ----------- - * NR_STATIONS | >= 1 | number of antenna fields - * NR_SAMPLES_PER_CHANNEL | multiple of BLOCK_SIZE | number of input samples per channel - * NR_CHANNELS | > 1 (TODO: supp 1 ch) | number of frequency channels per subband - * Note that for > 1 channels, NR_CHANNELS-1 channels are actually processed, - * because the second PPF has "corrupted" channel 0. (An inverse PPF can disambiguate.) \n - * Note that this kernel assumes (but does not use) NR_POLARIZATIONS == 2. - * - * Execution configuration: - * - Work dim == 2 (can be 1 iff NR_CHANNELS <= 2) - * + Inner dim: the NxN baseline(s) the thread processes - * + Outer dim: the channel the thread processes - * - Work group size: (no restrictions (but processes BLOCK_SIZE * NR_STATIONS), 1) \n - * Each work group loads samples from all stations to do the NxN set of correlations - * for one of the channels. Some threads in _NxN kernels do not write off-edge output. - * - Global size: (>= NR_BASELINES and a multiple of work group size, number of actually processed channels) - */ -__kernel void correlate(__global void *visibilitiesPtr, - __global const void *correctedDataPtr - ) -{ - VisibilitiesType visibilities = (VisibilitiesType) visibilitiesPtr; - CorrectedDataType correctedData = (CorrectedDataType) correctedDataPtr; - - __local float samples[4][BLOCK_SIZE][NR_STATIONS | 1]; // avoid power-of-2 - - uint baseline = get_global_id(0); - uint channel = get_global_id(1) + 1; - uint stat_0 = convert_uint_rtz(sqrt(convert_float(8 * baseline + 1)) - 0.99999f) / 2; - uint stat_A = baseline - stat_0 * (stat_0 + 1) / 2; - - float4 visR = (float4) 0, visI = (float4) 0; - - for (uint major = 0; major < NR_SAMPLES_PER_CHANNEL; major += BLOCK_SIZE) { - // load data into local memory - for (uint i = get_local_id(0); i < BLOCK_SIZE * NR_STATIONS; i += get_local_size(0)) { - uint time = i % BLOCK_SIZE; - uint stat = i / BLOCK_SIZE; - - fcomplex2 sample = (*correctedData)[stat][channel][major + time]; - - samples[0][time][stat] = sample.x; - samples[1][time][stat] = sample.y; - samples[2][time][stat] = sample.z; - samples[3][time][stat] = sample.w; - } - - barrier(CLK_LOCAL_MEM_FENCE); - - // compute correlations - if (baseline < NR_BASELINES) { - for (uint time = 0; time < BLOCK_SIZE; time++) { - fcomplex2 sample_1, sample_A; - sample_1.x = samples[0][time][stat_0]; - sample_1.y = samples[1][time][stat_0]; - sample_1.z = samples[2][time][stat_0]; - sample_1.w = samples[3][time][stat_0]; - sample_A.x = samples[0][time][stat_A]; - sample_A.y = samples[1][time][stat_A]; - sample_A.z = samples[2][time][stat_A]; - sample_A.w = samples[3][time][stat_A]; - - visR += sample_1.xxzz * sample_A.xzxz; - visI += sample_1.yyww * sample_A.xzxz; - visR += sample_1.yyww * sample_A.ywyw; - visI -= sample_1.xxzz * sample_A.ywyw; - } - } - - barrier(CLK_LOCAL_MEM_FENCE); - } - - // write visibilities - if (baseline < NR_BASELINES) - (*visibilities)[baseline][channel] = (fcomplex4) { visR.x, visI.x, visR.y, visI.y, visR.z, visI.z, visR.w, visI.w }; -} - - -/*! - * See the correlate() kernel. - */ -__kernel void correlate_2x2(__global void *visibilitiesPtr, - __global const void *correctedDataPtr - ) -{ - VisibilitiesType visibilities = (VisibilitiesType) visibilitiesPtr; - CorrectedDataType correctedData = (CorrectedDataType) correctedDataPtr; - - __local fcomplex2 samples[2][BLOCK_SIZE][(NR_STATIONS + 1) / 2 | 1]; // avoid power-of-2 - - uint channel = get_global_id(1) + 1; - uint block = get_global_id(0); - - uint x = convert_uint_rtz(sqrt(convert_float(8 * block + 1)) - 0.99999f) / 2; - uint y = block - x * (x + 1) / 2; - - uint stat_A = 2 * x; - - bool compute_correlations = stat_A < NR_STATIONS; - - float4 vis_0A_r = (float4) 0, vis_0A_i = (float4) 0; - float4 vis_0B_r = (float4) 0, vis_0B_i = (float4) 0; - float4 vis_1A_r = (float4) 0, vis_1A_i = (float4) 0; - float4 vis_1B_r = (float4) 0, vis_1B_i = (float4) 0; - - for (uint major = 0; major < NR_SAMPLES_PER_CHANNEL; major += BLOCK_SIZE) { - // load data into local memory -#pragma unroll 1 - for (uint i = get_local_id(0); i < BLOCK_SIZE * NR_STATIONS; i += get_local_size(0)) { - uint time = i % BLOCK_SIZE; - uint stat = i / BLOCK_SIZE; - - samples[stat & 1][time][stat / 2] = (*correctedData)[stat][channel][major + time]; - } - - barrier(CLK_LOCAL_MEM_FENCE); - - if (compute_correlations) { - for (uint time = 0; time < BLOCK_SIZE; time++) { - float4 sample_0 = samples[0][time][y]; - float4 sample_A = samples[0][time][x]; - float4 sample_B = samples[1][time][x]; - float4 sample_1 = samples[1][time][y]; - - vis_0A_r += sample_0.xxzz * sample_A.xzxz; - vis_0A_i += sample_0.yyww * sample_A.xzxz; - vis_0B_r += sample_0.xxzz * sample_B.xzxz; - vis_0B_i += sample_0.yyww * sample_B.xzxz; - vis_1A_r += sample_1.xxzz * sample_A.xzxz; - vis_1A_i += sample_1.yyww * sample_A.xzxz; - vis_1B_r += sample_1.xxzz * sample_B.xzxz; - vis_1B_i += sample_1.yyww * sample_B.xzxz; - - vis_0A_r += sample_0.yyww * sample_A.ywyw; - vis_0A_i -= sample_0.xxzz * sample_A.ywyw; - vis_0B_r += sample_0.yyww * sample_B.ywyw; - vis_0B_i -= sample_0.xxzz * sample_B.ywyw; - vis_1A_r += sample_1.yyww * sample_A.ywyw; - vis_1A_i -= sample_1.xxzz * sample_A.ywyw; - vis_1B_r += sample_1.yyww * sample_B.ywyw; - vis_1B_i -= sample_1.xxzz * sample_B.ywyw; - } - } - - barrier(CLK_LOCAL_MEM_FENCE); - } - - // write visibilities - uint stat_0 = 2 * y; - uint stat_1 = stat_0 + 1; - uint stat_B = stat_A + 1; - bool do_baseline_0A = stat_A < NR_STATIONS; - bool do_baseline_0B = stat_B < NR_STATIONS; - bool do_baseline_1A = do_baseline_0A && stat_1 <= stat_A; - bool do_baseline_1B = do_baseline_0B; - - if (do_baseline_0A) { - uint baseline = (stat_A * (stat_A + 1) / 2) + stat_0; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_0A_r.x, vis_0A_i.x, vis_0A_r.y, vis_0A_i.y, vis_0A_r.z, vis_0A_i.z, vis_0A_r.w, vis_0A_i.w }; - } - - if (do_baseline_0B) { - uint baseline = (stat_B * (stat_B + 1) / 2) + stat_0; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_0B_r.x, vis_0B_i.x, vis_0B_r.y, vis_0B_i.y, vis_0B_r.z, vis_0B_i.z, vis_0B_r.w, vis_0B_i.w }; - } - - if (do_baseline_1A) { - uint baseline = (stat_A * (stat_A + 1) / 2) + stat_1; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_1A_r.x, vis_1A_i.x, vis_1A_r.y, vis_1A_i.y, vis_1A_r.z, vis_1A_i.z, vis_1A_r.w, vis_1A_i.w }; - } - - if (do_baseline_1B) { - uint baseline = (stat_B * (stat_B + 1) / 2) + stat_1; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_1B_r.x, vis_1B_i.x, vis_1B_r.y, vis_1B_i.y, vis_1B_r.z, vis_1B_i.z, vis_1B_r.w, vis_1B_i.w }; - } -} - - -/*! - * See the correlate() kernel. - */ -__kernel void correlate_3x3(__global void *visibilitiesPtr, - __global const void *correctedDataPtr - ) -{ - VisibilitiesType visibilities = (VisibilitiesType) visibilitiesPtr; - CorrectedDataType correctedData = (CorrectedDataType) correctedDataPtr; - - __local fcomplex2 samples[3][BLOCK_SIZE][(NR_STATIONS + 2) / 3 | 1]; // avoid power-of-2 - - uint channel = get_global_id(1) + 1; - uint block = get_global_id(0); - - uint x = convert_uint_rtz(sqrt(convert_float(8 * block + 1)) - 0.99999f) / 2; - uint y = block - x * (x + 1) / 2; - - uint stat_A = 3 * x; - - bool compute_correlations = stat_A < NR_STATIONS; - - float4 vis_0A_r = (float4) 0, vis_0A_i = (float4) 0; - float4 vis_0B_r = (float4) 0, vis_0B_i = (float4) 0; - float4 vis_0C_r = (float4) 0, vis_0C_i = (float4) 0; - float4 vis_1A_r = (float4) 0, vis_1A_i = (float4) 0; - float4 vis_1B_r = (float4) 0, vis_1B_i = (float4) 0; - float4 vis_1C_r = (float4) 0, vis_1C_i = (float4) 0; - float4 vis_2A_r = (float4) 0, vis_2A_i = (float4) 0; - float4 vis_2B_r = (float4) 0, vis_2B_i = (float4) 0; - float4 vis_2C_r = (float4) 0, vis_2C_i = (float4) 0; - - for (uint major = 0; major < NR_SAMPLES_PER_CHANNEL; major += BLOCK_SIZE) { - // load data into local memory -#pragma unroll 1 - for (uint i = get_local_id(0); i < BLOCK_SIZE * NR_STATIONS; i += get_local_size(0)) { - uint time = i % BLOCK_SIZE; - uint stat = i / BLOCK_SIZE; - - samples[stat % 3][time][stat / 3] = (*correctedData)[stat][channel][major + time]; - } - - barrier(CLK_LOCAL_MEM_FENCE); - - if (compute_correlations) { - for (uint time = 0; time < BLOCK_SIZE; time++) { - fcomplex2 sample_0 = samples[0][time][y]; - fcomplex2 sample_A = samples[0][time][x]; - fcomplex2 sample_B = samples[1][time][x]; - fcomplex2 sample_C = samples[2][time][x]; - fcomplex2 sample_1 = samples[1][time][y]; - fcomplex2 sample_2 = samples[2][time][y]; - - vis_0A_r += sample_0.xxzz * sample_A.xzxz; - vis_0A_i += sample_0.yyww * sample_A.xzxz; - vis_0B_r += sample_0.xxzz * sample_B.xzxz; - vis_0B_i += sample_0.yyww * sample_B.xzxz; - vis_0C_r += sample_0.xxzz * sample_C.xzxz; - vis_0C_i += sample_0.yyww * sample_C.xzxz; - vis_1A_r += sample_1.xxzz * sample_A.xzxz; - vis_1A_i += sample_1.yyww * sample_A.xzxz; - vis_1B_r += sample_1.xxzz * sample_B.xzxz; - vis_1B_i += sample_1.yyww * sample_B.xzxz; - vis_1C_r += sample_1.xxzz * sample_C.xzxz; - vis_1C_i += sample_1.yyww * sample_C.xzxz; - vis_2A_r += sample_2.xxzz * sample_A.xzxz; - vis_2A_i += sample_2.yyww * sample_A.xzxz; - vis_2B_r += sample_2.xxzz * sample_B.xzxz; - vis_2B_i += sample_2.yyww * sample_B.xzxz; - vis_2C_r += sample_2.xxzz * sample_C.xzxz; - vis_2C_i += sample_2.yyww * sample_C.xzxz; - - vis_0A_r += sample_0.yyww * sample_A.ywyw; - vis_0A_i -= sample_0.xxzz * sample_A.ywyw; - vis_0B_r += sample_0.yyww * sample_B.ywyw; - vis_0B_i -= sample_0.xxzz * sample_B.ywyw; - vis_0C_r += sample_0.yyww * sample_C.ywyw; - vis_0C_i -= sample_0.xxzz * sample_C.ywyw; - vis_1A_r += sample_1.yyww * sample_A.ywyw; - vis_1A_i -= sample_1.xxzz * sample_A.ywyw; - vis_1B_r += sample_1.yyww * sample_B.ywyw; - vis_1B_i -= sample_1.xxzz * sample_B.ywyw; - vis_1C_r += sample_1.yyww * sample_C.ywyw; - vis_1C_i -= sample_1.xxzz * sample_C.ywyw; - vis_2A_r += sample_2.yyww * sample_A.ywyw; - vis_2A_i -= sample_2.xxzz * sample_A.ywyw; - vis_2B_r += sample_2.yyww * sample_B.ywyw; - vis_2B_i -= sample_2.xxzz * sample_B.ywyw; - vis_2C_r += sample_2.yyww * sample_C.ywyw; - vis_2C_i -= sample_2.xxzz * sample_C.ywyw; - } - } - - barrier(CLK_LOCAL_MEM_FENCE); - } - - // write visibilities - uint stat_0 = 3 * y; - uint stat_1 = stat_0 + 1; - uint stat_2 = stat_0 + 2; - uint stat_B = stat_A + 1; - uint stat_C = stat_A + 2; - - bool do_baseline_0A = stat_0 < NR_STATIONS && stat_A < NR_STATIONS && stat_0 <= stat_A; - bool do_baseline_0B = stat_0 < NR_STATIONS && stat_B < NR_STATIONS && stat_0 <= stat_B; - bool do_baseline_0C = stat_0 < NR_STATIONS && stat_C < NR_STATIONS && stat_0 <= stat_C; - bool do_baseline_1A = stat_1 < NR_STATIONS && stat_A < NR_STATIONS && stat_1 <= stat_A; - bool do_baseline_1B = stat_1 < NR_STATIONS && stat_B < NR_STATIONS && stat_1 <= stat_B; - bool do_baseline_1C = stat_1 < NR_STATIONS && stat_C < NR_STATIONS && stat_1 <= stat_C; - bool do_baseline_2A = stat_2 < NR_STATIONS && stat_A < NR_STATIONS && stat_2 <= stat_A; - bool do_baseline_2B = stat_2 < NR_STATIONS && stat_B < NR_STATIONS && stat_2 <= stat_B; - bool do_baseline_2C = stat_2 < NR_STATIONS && stat_C < NR_STATIONS && stat_2 <= stat_C; - - if (do_baseline_0A) { - uint baseline = (stat_A * (stat_A + 1) / 2) + stat_0; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_0A_r.x, vis_0A_i.x, vis_0A_r.y, vis_0A_i.y, vis_0A_r.z, vis_0A_i.z, vis_0A_r.w, vis_0A_i.w }; - } - - if (do_baseline_0B) { - uint baseline = (stat_B * (stat_B + 1) / 2) + stat_0; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_0B_r.x, vis_0B_i.x, vis_0B_r.y, vis_0B_i.y, vis_0B_r.z, vis_0B_i.z, vis_0B_r.w, vis_0B_i.w }; - } - - if (do_baseline_0C) { - uint baseline = (stat_C * (stat_C + 1) / 2) + stat_0; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_0C_r.x, vis_0C_i.x, vis_0C_r.y, vis_0C_i.y, vis_0C_r.z, vis_0C_i.z, vis_0C_r.w, vis_0C_i.w }; - } - - if (do_baseline_1A) { - uint baseline = (stat_A * (stat_A + 1) / 2) + stat_1; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_1A_r.x, vis_1A_i.x, vis_1A_r.y, vis_1A_i.y, vis_1A_r.z, vis_1A_i.z, vis_1A_r.w, vis_1A_i.w }; - } - - if (do_baseline_1B) { - uint baseline = (stat_B * (stat_B + 1) / 2) + stat_1; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_1B_r.x, vis_1B_i.x, vis_1B_r.y, vis_1B_i.y, vis_1B_r.z, vis_1B_i.z, vis_1B_r.w, vis_1B_i.w }; - } - - if (do_baseline_1C) { - uint baseline = (stat_C * (stat_C + 1) / 2) + stat_1; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_1C_r.x, vis_1C_i.x, vis_1C_r.y, vis_1C_i.y, vis_1C_r.z, vis_1C_i.z, vis_1C_r.w, vis_1C_i.w }; - } - - if (do_baseline_2A) { - uint baseline = (stat_A * (stat_A + 1) / 2) + stat_2; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_2A_r.x, vis_2A_i.x, vis_2A_r.y, vis_2A_i.y, vis_2A_r.z, vis_2A_i.z, vis_2A_r.w, vis_2A_i.w }; - } - - if (do_baseline_2B) { - uint baseline = (stat_B * (stat_B + 1) / 2) + stat_2; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_2B_r.x, vis_2B_i.x, vis_2B_r.y, vis_2B_i.y, vis_2B_r.z, vis_2B_i.z, vis_2B_r.w, vis_2B_i.w }; - } - - if (do_baseline_2C) { - uint baseline = (stat_C * (stat_C + 1) / 2) + stat_2; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_2C_r.x, vis_2C_i.x, vis_2C_r.y, vis_2C_i.y, vis_2C_r.z, vis_2C_i.z, vis_2C_r.w, vis_2C_i.w }; - } -} - - -/*! - * See the correlate() kernel. - */ -__kernel void correlate_4x4(__global void *visibilitiesPtr, - __global const void *correctedDataPtr - ) -{ - VisibilitiesType visibilities = (VisibilitiesType) visibilitiesPtr; - CorrectedDataType correctedData = (CorrectedDataType) correctedDataPtr; - - __local fcomplex2 samples[4][BLOCK_SIZE][(NR_STATIONS + 3) / 4 | 1]; // avoid power-of-2 - - uint channel = get_global_id(1) + 1; - uint block = get_global_id(0); - - uint x = convert_uint_rtz(sqrt(convert_float(8 * block + 1)) - 0.99999f) / 2; - uint y = block - x * (x + 1) / 2; - - uint stat_A = 4 * x; - - bool compute_correlations = stat_A < NR_STATIONS; - - float4 vis_0A_r = (float4) 0, vis_0A_i = (float4) 0; - float4 vis_0B_r = (float4) 0, vis_0B_i = (float4) 0; - float4 vis_0C_r = (float4) 0, vis_0C_i = (float4) 0; - float4 vis_0D_r = (float4) 0, vis_0D_i = (float4) 0; - float4 vis_1A_r = (float4) 0, vis_1A_i = (float4) 0; - float4 vis_1B_r = (float4) 0, vis_1B_i = (float4) 0; - float4 vis_1C_r = (float4) 0, vis_1C_i = (float4) 0; - float4 vis_1D_r = (float4) 0, vis_1D_i = (float4) 0; - float4 vis_2A_r = (float4) 0, vis_2A_i = (float4) 0; - float4 vis_2B_r = (float4) 0, vis_2B_i = (float4) 0; - float4 vis_2C_r = (float4) 0, vis_2C_i = (float4) 0; - float4 vis_2D_r = (float4) 0, vis_2D_i = (float4) 0; - float4 vis_3A_r = (float4) 0, vis_3A_i = (float4) 0; - float4 vis_3B_r = (float4) 0, vis_3B_i = (float4) 0; - float4 vis_3C_r = (float4) 0, vis_3C_i = (float4) 0; - float4 vis_3D_r = (float4) 0, vis_3D_i = (float4) 0; - - for (uint major = 0; major < NR_SAMPLES_PER_CHANNEL; major += BLOCK_SIZE) { - // load data into local memory -#pragma unroll 1 - for (uint i = get_local_id(0); i < BLOCK_SIZE * NR_STATIONS; i += get_local_size(0)) { - uint time = i % BLOCK_SIZE; - uint stat = i / BLOCK_SIZE; - - samples[stat % 4][time][stat / 4] = (*correctedData)[stat][channel][major + time]; - } - - barrier(CLK_LOCAL_MEM_FENCE); - - if (compute_correlations) { - for (uint time = 0; time < BLOCK_SIZE; time++) { - fcomplex2 sample_0 = samples[0][time][y]; - fcomplex2 sample_A = samples[0][time][x]; - fcomplex2 sample_B = samples[1][time][x]; - fcomplex2 sample_C = samples[2][time][x]; - fcomplex2 sample_D = samples[3][time][x]; - fcomplex2 sample_1 = samples[1][time][y]; - fcomplex2 sample_2 = samples[2][time][y]; - fcomplex2 sample_3 = samples[3][time][y]; - - vis_0A_r += sample_0.xxzz * sample_A.xzxz; - vis_0A_i += sample_0.yyww * sample_A.xzxz; - vis_0B_r += sample_0.xxzz * sample_B.xzxz; - vis_0B_i += sample_0.yyww * sample_B.xzxz; - vis_0C_r += sample_0.xxzz * sample_C.xzxz; - vis_0C_i += sample_0.yyww * sample_C.xzxz; - vis_0D_r += sample_0.xxzz * sample_D.xzxz; - vis_0D_i += sample_0.yyww * sample_D.xzxz; - vis_1A_r += sample_1.xxzz * sample_A.xzxz; - vis_1A_i += sample_1.yyww * sample_A.xzxz; - vis_1B_r += sample_1.xxzz * sample_B.xzxz; - vis_1B_i += sample_1.yyww * sample_B.xzxz; - vis_1C_r += sample_1.xxzz * sample_C.xzxz; - vis_1C_i += sample_1.yyww * sample_C.xzxz; - vis_1D_r += sample_1.xxzz * sample_D.xzxz; - vis_1D_i += sample_1.yyww * sample_D.xzxz; - vis_2A_r += sample_2.xxzz * sample_A.xzxz; - vis_2A_i += sample_2.yyww * sample_A.xzxz; - vis_2B_r += sample_2.xxzz * sample_B.xzxz; - vis_2B_i += sample_2.yyww * sample_B.xzxz; - vis_2C_r += sample_2.xxzz * sample_C.xzxz; - vis_2C_i += sample_2.yyww * sample_C.xzxz; - vis_2D_r += sample_2.xxzz * sample_D.xzxz; - vis_2D_i += sample_2.yyww * sample_D.xzxz; - vis_3A_r += sample_3.xxzz * sample_A.xzxz; - vis_3A_i += sample_3.yyww * sample_A.xzxz; - vis_3B_r += sample_3.xxzz * sample_B.xzxz; - vis_3B_i += sample_3.yyww * sample_B.xzxz; - vis_3C_r += sample_3.xxzz * sample_C.xzxz; - vis_3C_i += sample_3.yyww * sample_C.xzxz; - vis_3D_r += sample_3.xxzz * sample_D.xzxz; - vis_3D_i += sample_3.yyww * sample_D.xzxz; - - vis_0A_r += sample_0.yyww * sample_A.ywyw; - vis_0A_i -= sample_0.xxzz * sample_A.ywyw; - vis_0B_r += sample_0.yyww * sample_B.ywyw; - vis_0B_i -= sample_0.xxzz * sample_B.ywyw; - vis_0C_r += sample_0.yyww * sample_C.ywyw; - vis_0C_i -= sample_0.xxzz * sample_C.ywyw; - vis_0D_r += sample_0.yyww * sample_D.ywyw; - vis_0D_i -= sample_0.xxzz * sample_D.ywyw; - vis_1A_r += sample_1.yyww * sample_A.ywyw; - vis_1A_i -= sample_1.xxzz * sample_A.ywyw; - vis_1B_r += sample_1.yyww * sample_B.ywyw; - vis_1B_i -= sample_1.xxzz * sample_B.ywyw; - vis_1C_r += sample_1.yyww * sample_C.ywyw; - vis_1C_i -= sample_1.xxzz * sample_C.ywyw; - vis_1D_r += sample_1.yyww * sample_D.ywyw; - vis_1D_i -= sample_1.xxzz * sample_D.ywyw; - vis_2A_r += sample_2.yyww * sample_A.ywyw; - vis_2A_i -= sample_2.xxzz * sample_A.ywyw; - vis_2B_r += sample_2.yyww * sample_B.ywyw; - vis_2B_i -= sample_2.xxzz * sample_B.ywyw; - vis_2C_r += sample_2.yyww * sample_C.ywyw; - vis_2C_i -= sample_2.xxzz * sample_C.ywyw; - vis_2D_r += sample_2.yyww * sample_D.ywyw; - vis_2D_i -= sample_2.xxzz * sample_D.ywyw; - vis_3A_r += sample_3.yyww * sample_A.ywyw; - vis_3A_i -= sample_3.xxzz * sample_A.ywyw; - vis_3B_r += sample_3.yyww * sample_B.ywyw; - vis_3B_i -= sample_3.xxzz * sample_B.ywyw; - vis_3C_r += sample_3.yyww * sample_C.ywyw; - vis_3C_i -= sample_3.xxzz * sample_C.ywyw; - vis_3D_r += sample_3.yyww * sample_D.ywyw; - vis_3D_i -= sample_3.xxzz * sample_D.ywyw; - } - } - - barrier(CLK_LOCAL_MEM_FENCE); - } - - // write visibilities - uint stat_0 = 4 * y; - uint stat_1 = stat_0 + 1; - uint stat_2 = stat_0 + 2; - uint stat_3 = stat_0 + 3; - uint stat_B = stat_A + 1; - uint stat_C = stat_A + 2; - uint stat_D = stat_A + 3; - - bool do_baseline_0A = stat_0 < NR_STATIONS && stat_A < NR_STATIONS && stat_0 <= stat_A; - bool do_baseline_0B = stat_0 < NR_STATIONS && stat_B < NR_STATIONS && stat_0 <= stat_B; - bool do_baseline_0C = stat_0 < NR_STATIONS && stat_C < NR_STATIONS && stat_0 <= stat_C; - bool do_baseline_0D = stat_0 < NR_STATIONS && stat_D < NR_STATIONS && stat_0 <= stat_D; - bool do_baseline_1A = stat_1 < NR_STATIONS && stat_A < NR_STATIONS && stat_1 <= stat_A; - bool do_baseline_1B = stat_1 < NR_STATIONS && stat_B < NR_STATIONS && stat_1 <= stat_B; - bool do_baseline_1C = stat_1 < NR_STATIONS && stat_C < NR_STATIONS && stat_1 <= stat_C; - bool do_baseline_1D = stat_1 < NR_STATIONS && stat_D < NR_STATIONS && stat_1 <= stat_D; - bool do_baseline_2A = stat_2 < NR_STATIONS && stat_A < NR_STATIONS && stat_2 <= stat_A; - bool do_baseline_2B = stat_2 < NR_STATIONS && stat_B < NR_STATIONS && stat_2 <= stat_B; - bool do_baseline_2C = stat_2 < NR_STATIONS && stat_C < NR_STATIONS && stat_2 <= stat_C; - bool do_baseline_2D = stat_2 < NR_STATIONS && stat_D < NR_STATIONS && stat_2 <= stat_D; - bool do_baseline_3A = stat_3 < NR_STATIONS && stat_A < NR_STATIONS && stat_3 <= stat_A; - bool do_baseline_3B = stat_3 < NR_STATIONS && stat_B < NR_STATIONS && stat_3 <= stat_B; - bool do_baseline_3C = stat_3 < NR_STATIONS && stat_C < NR_STATIONS && stat_3 <= stat_C; - bool do_baseline_3D = stat_3 < NR_STATIONS && stat_D < NR_STATIONS && stat_3 <= stat_D; - - if (do_baseline_0A) { - uint baseline = (stat_A * (stat_A + 1) / 2) + stat_0; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_0A_r.x, vis_0A_i.x, vis_0A_r.y, vis_0A_i.y, vis_0A_r.z, vis_0A_i.z, vis_0A_r.w, vis_0A_i.w }; - } - - if (do_baseline_0B) { - uint baseline = (stat_B * (stat_B + 1) / 2) + stat_0; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_0B_r.x, vis_0B_i.x, vis_0B_r.y, vis_0B_i.y, vis_0B_r.z, vis_0B_i.z, vis_0B_r.w, vis_0B_i.w }; - } - - if (do_baseline_0C) { - uint baseline = (stat_C * (stat_C + 1) / 2) + stat_0; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_0C_r.x, vis_0C_i.x, vis_0C_r.y, vis_0C_i.y, vis_0C_r.z, vis_0C_i.z, vis_0C_r.w, vis_0C_i.w }; - } - - if (do_baseline_0D) { - uint baseline = (stat_D * (stat_D + 1) / 2) + stat_0; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_0D_r.x, vis_0D_i.x, vis_0D_r.y, vis_0D_i.y, vis_0D_r.z, vis_0D_i.z, vis_0D_r.w, vis_0D_i.w }; - } - - if (do_baseline_1A) { - uint baseline = (stat_A * (stat_A + 1) / 2) + stat_1; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_1A_r.x, vis_1A_i.x, vis_1A_r.y, vis_1A_i.y, vis_1A_r.z, vis_1A_i.z, vis_1A_r.w, vis_1A_i.w }; - } - - if (do_baseline_1B) { - uint baseline = (stat_B * (stat_B + 1) / 2) + stat_1; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_1B_r.x, vis_1B_i.x, vis_1B_r.y, vis_1B_i.y, vis_1B_r.z, vis_1B_i.z, vis_1B_r.w, vis_1B_i.w }; - } - - if (do_baseline_1C) { - uint baseline = (stat_C * (stat_C + 1) / 2) + stat_1; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_1C_r.x, vis_1C_i.x, vis_1C_r.y, vis_1C_i.y, vis_1C_r.z, vis_1C_i.z, vis_1C_r.w, vis_1C_i.w }; - } - - if (do_baseline_1D) { - uint baseline = (stat_D * (stat_D + 1) / 2) + stat_1; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_1D_r.x, vis_1D_i.x, vis_1D_r.y, vis_1D_i.y, vis_1D_r.z, vis_1D_i.z, vis_1D_r.w, vis_1D_i.w }; - } - - if (do_baseline_2A) { - uint baseline = (stat_A * (stat_A + 1) / 2) + stat_2; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_2A_r.x, vis_2A_i.x, vis_2A_r.y, vis_2A_i.y, vis_2A_r.z, vis_2A_i.z, vis_2A_r.w, vis_2A_i.w }; - } - - if (do_baseline_2B) { - uint baseline = (stat_B * (stat_B + 1) / 2) + stat_2; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_2B_r.x, vis_2B_i.x, vis_2B_r.y, vis_2B_i.y, vis_2B_r.z, vis_2B_i.z, vis_2B_r.w, vis_2B_i.w }; - } - - if (do_baseline_2C) { - uint baseline = (stat_C * (stat_C + 1) / 2) + stat_2; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_2C_r.x, vis_2C_i.x, vis_2C_r.y, vis_2C_i.y, vis_2C_r.z, vis_2C_i.z, vis_2C_r.w, vis_2C_i.w }; - } - - if (do_baseline_2D) { - uint baseline = (stat_D * (stat_D + 1) / 2) + stat_2; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_2D_r.x, vis_2D_i.x, vis_2D_r.y, vis_2D_i.y, vis_2D_r.z, vis_2D_i.z, vis_2D_r.w, vis_2D_i.w }; - } - - if (do_baseline_3A) { - uint baseline = (stat_A * (stat_A + 1) / 2) + stat_3; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_3A_r.x, vis_3A_i.x, vis_3A_r.y, vis_3A_i.y, vis_3A_r.z, vis_3A_i.z, vis_3A_r.w, vis_3A_i.w }; - } - - if (do_baseline_3B) { - uint baseline = (stat_B * (stat_B + 1) / 2) + stat_3; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_3B_r.x, vis_3B_i.x, vis_3B_r.y, vis_3B_i.y, vis_3B_r.z, vis_3B_i.z, vis_3B_r.w, vis_3B_i.w }; - } - - if (do_baseline_3C) { - uint baseline = (stat_C * (stat_C + 1) / 2) + stat_3; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_3C_r.x, vis_3C_i.x, vis_3C_r.y, vis_3C_i.y, vis_3C_r.z, vis_3C_i.z, vis_3C_r.w, vis_3C_i.w }; - } - - if (do_baseline_3D) { - uint baseline = (stat_D * (stat_D + 1) / 2) + stat_3; - (*visibilities)[baseline][channel] = (fcomplex4) { vis_3D_r.x, vis_3D_i.x, vis_3D_r.y, vis_3D_i.y, vis_3D_r.z, vis_3D_i.z, vis_3D_r.w, vis_3D_i.w }; - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/DelayAndBandPass.cl b/RTCP/Cobalt/GPUProc/src/opencl/DelayAndBandPass.cl deleted file mode 100644 index b9de841b77dbbbb64437ac4c21588c9d6109b2f1..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/DelayAndBandPass.cl +++ /dev/null @@ -1,195 +0,0 @@ -//# DelayAndBandPass.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include "math.cl" - -/** @file - * This file contains an OpenCL implementation of the GPU kernel for the delay - * and bandpass correction. - * - * Usually, this kernel will be run after the polyphase filter kernel FIR.cl. In - * that case, the input data for this kernel is already in floating point format - * (@c NR_CHANNELS > 1). However, if this kernel is the first in row, then the - * input data is still in integer format (@c NR_CHANNELS == 1), and this kernel - * needs to do the integer-to-float conversion. - * - * @attention The following pre-processor variables must be supplied when - * compiling this program. Please take the pre-conditions for these variables - * into account: - * - @c NR_CHANNELS: 1 or a multiple of 16 - * - if @c NR_CHANNELS == 1 (input data is in integer format): - * - @c NR_BITS_PER_SAMPLE: 8 or 16 - * - @c NR_SAMPLES_PER_SUBBAND: a multiple of 16 - * - if @c NR_CHANNELS > 1 (input data is in floating point format): - * - @c NR_SAMPLES_PER_CHANNEL: a multiple of 16 - * - @c NR_POLARIZATIONS: 2 - * - @c SUBBAND_WIDTH: a multiple of @c NR_CHANNELS - */ - -#if NR_CHANNELS == 1 -#undef BANDPASS_CORRECTION -#endif - - -typedef __global fcomplex2 (*restrict OutputDataType)[NR_STATIONS][NR_CHANNELS][NR_SAMPLES_PER_CHANNEL]; -#if NR_CHANNELS == 1 -#if NR_BITS_PER_SAMPLE == 16 -typedef __global short_complex2 (*restrict InputDataType)[NR_STATIONS][NR_SAMPLES_PER_SUBBAND]; -#elif NR_BITS_PER_SAMPLE == 8 -typedef __global char_complex2 (*restrict InputDataType)[NR_STATIONS][NR_SAMPLES_PER_SUBBAND]; -#else -#error unsupport NR_BITS_PER_SAMPLE -#endif -#else -typedef __global fcomplex (*restrict InputDataType)[NR_STATIONS][NR_POLARIZATIONS][NR_SAMPLES_PER_CHANNEL][NR_CHANNELS]; -#endif -typedef __global const float2 (*restrict DelaysType)[NR_BEAMS][NR_STATIONS]; // 2 Polarizations; in seconds -typedef __global const float2 (*restrict PhaseOffsetsType)[NR_STATIONS]; // 2 Polarizations; in radians -typedef __global const float (*restrict BandPassFactorsType)[NR_CHANNELS]; - - -/** - * This kernel perfroms three operations on the input data: - * - Apply a fine delay by doing a per channel phase correction. - * - Apply a bandpass correction to compensate for the errors introduced by the - * polyphase filter that produced the subbands. This error is deterministic, - * hence it can be fully compensated for. - * - Transpose the data so that the time slices for each channel are placed - * consecutively in memory. - * - * @param[out] correctedDataPtr pointer to output data of ::OutputDataType, - * a 3D array [station][channel][sample] - * of ::fcomplex2 (2 complex polarizations) - * @param[in] filteredDataPtr pointer to input data; this can either be a - * 4D array [station][polarization][sample][channel] - * of ::fcomplex, or a 2D array [station][subband] - * of ::short_complex2 or ::char_complex2, - * depending on the value of @c NR_CHANNELS - * @param[in] subbandFrequency center freqency of the subband - * @param[in] beam index number of the beam - * @param[in] delaysAtBeginPtr pointer to delay data of ::DelaysType, - * a 2D array [beam][station] of float2 (real: - * 2 polarizations), containing delays in - * seconds at begin of integration period - * @param[in] delaysAfterEndPtr pointer to delay data of ::DelaysType, - * a 2D array [beam][station] of float2 (real: - * 2 polarizations), containing delays in - * seconds after end of integration period - * @param[in] phaseOffsetsPtr pointer to phase offset data of - * ::PhaseOffsetsType, a 1D array [station] of - * float2 (real: 2 polarizations), containing - * phase offsets in radians - * @param[in] bandPassFactorsPtr pointer to bandpass correction data of - * ::BandPassFactorsType, a 1D array [channel] of - * float, containing bandpass correction factors - */ -__kernel __attribute__((reqd_work_group_size(16 * 16, 1, 1))) -void applyDelaysAndCorrectBandPass(__global fcomplex *restrict correctedDataPtr, - __global const fcomplex *restrict filteredDataPtr, - float subbandFrequency, - unsigned beam, - __global const float2 *restrict delaysAtBeginPtr, - __global const float2 *restrict delaysAfterEndPtr, - __global const float2 *restrict phaseOffsetsPtr, - __global const float *restrict bandPassFactorsPtr) -{ - OutputDataType outputData = (OutputDataType) correctedDataPtr; - InputDataType inputData = (InputDataType) filteredDataPtr; - DelaysType delaysAtBegin = (DelaysType) delaysAtBeginPtr; - DelaysType delaysAfterEnd = (DelaysType) delaysAfterEndPtr; - PhaseOffsetsType phaseOffsets = (PhaseOffsetsType) phaseOffsetsPtr; - -#if NR_CHANNELS > 1 - BandPassFactorsType bandPassFactors = (BandPassFactorsType) bandPassFactorsPtr; - - __local fcomplex2 tmp[16][17]; // one too wide to allow coalesced reads - - uint major = get_global_id(0) / 16; - uint minor = get_global_id(0) % 16; - uint channel = get_global_id(1) * 16; -#endif - uint station = get_global_id(2); - -#if defined DELAY_COMPENSATION -#if NR_CHANNELS == 1 - float frequency = subbandFrequency; -#else - float frequency = subbandFrequency - .5f * SUBBAND_BANDWIDTH + (channel + minor) * (SUBBAND_BANDWIDTH / NR_CHANNELS); -#endif - float2 delayAtBegin = (*delaysAtBegin)[beam][station]; - float2 delayAfterEnd = (*delaysAfterEnd)[beam][station]; - float2 phiBegin = -2 * 3.1415926535f * delayAtBegin; - float2 phiEnd = -2 * 3.1415926535f * delayAfterEnd; - float2 deltaPhi = (phiEnd - phiBegin) / NR_SAMPLES_PER_CHANNEL; -#if NR_CHANNELS == 1 - float2 myPhiBegin = (phiBegin + get_local_id(0) * deltaPhi) * frequency + (*phaseOffsets)[station]; - float2 myPhiDelta = get_local_size(0) * deltaPhi * frequency; -#else - float2 myPhiBegin = (phiBegin + major * deltaPhi) * frequency + (*phaseOffsets)[station]; - float2 myPhiDelta = 16 * deltaPhi * frequency; -#endif - fcomplex vX = cexp(myPhiBegin.x); - fcomplex vY = cexp(myPhiBegin.y); - fcomplex dvX = cexp(myPhiDelta.x); - fcomplex dvY = cexp(myPhiDelta.y); -#endif - -#if defined BANDPASS_CORRECTION - float weight = (*bandPassFactors)[channel + minor]; -#endif - -#if defined DELAY_COMPENSATION && defined BANDPASS_CORRECTION - vX *= weight; - vY *= weight; -#endif - -#if NR_CHANNELS == 1 - for (uint time = get_local_id(0); time < NR_SAMPLES_PER_SUBBAND; time += get_local_size(0)) { - fcomplex2 samples = convert_float4((*inputData)[station][time]); - fcomplex sampleX = samples.s01; - fcomplex sampleY = samples.s23; -#else - for (uint time = 0; time < NR_SAMPLES_PER_CHANNEL; time += 16) { - fcomplex sampleX = (*inputData)[station][0][time + major][channel + minor]; - fcomplex sampleY = (*inputData)[station][1][time + major][channel + minor]; -#endif - -#if defined DELAY_COMPENSATION - sampleX = cmul(sampleX, vX); - sampleY = cmul(sampleY, vY); - vX = cmul(vX, dvX); - vY = cmul(vY, dvY); -#elif defined BANDPASS_CORRECTION - sampleX *= weight; - sampleY *= weight; -#endif - -#if NR_CHANNELS == 1 - (*outputData)[station][0][time] = (float4) (sampleX, sampleY); -#else - tmp[major][minor] = (float4) (sampleX, sampleY); - barrier(CLK_LOCAL_MEM_FENCE); - - (*outputData)[station][channel + major][time + minor] = tmp[minor][major]; - barrier(CLK_LOCAL_MEM_FENCE); -#endif - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/FFT.cl b/RTCP/Cobalt/GPUProc/src/opencl/FFT.cl deleted file mode 100644 index fc5ed2e3c4051cc286ee52f9c89b943e689eefae..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/FFT.cl +++ /dev/null @@ -1,283 +0,0 @@ -// Run kernel fft0 with global dim = {64*BatchSize}, local dim={64} -#ifndef M_PI -//#define M_PI 0x1.921fb54442d18p+1 -#define M_PI 3.1415926536f -#endif -#define complexMul(a,b) ((float2)(mad(-(a).y, (b).y, (a).x * (b).x), mad((a).y, (b).x, (a).x * (b).y))) -#define conj(a) ((float2)((a).x, -(a).y)) -#define conjTransp(a) ((float2)(-(a).y, (a).x)) - -#define fftKernel2(a,dir) \ - { \ - float2 c = (a)[0]; \ - (a)[0] = c + (a)[1]; \ - (a)[1] = c - (a)[1]; \ - } - -#define fftKernel2S(d1,d2,dir) \ - { \ - float2 c = (d1); \ - (d1) = c + (d2); \ - (d2) = c - (d2); \ - } - -#define fftKernel4(a,dir) \ - { \ - fftKernel2S((a)[0], (a)[2], dir); \ - fftKernel2S((a)[1], (a)[3], dir); \ - fftKernel2S((a)[0], (a)[1], dir); \ - (a)[3] = (float2)(dir) * (conjTransp((a)[3])); \ - fftKernel2S((a)[2], (a)[3], dir); \ - float2 c = (a)[1]; \ - (a)[1] = (a)[2]; \ - (a)[2] = c; \ - } - -#define fftKernel4s(a0,a1,a2,a3,dir) \ - { \ - fftKernel2S((a0), (a2), dir); \ - fftKernel2S((a1), (a3), dir); \ - fftKernel2S((a0), (a1), dir); \ - (a3) = (float2)(dir) * (conjTransp((a3))); \ - fftKernel2S((a2), (a3), dir); \ - float2 c = (a1); \ - (a1) = (a2); \ - (a2) = c; \ - } - -#define bitreverse8(a) \ - { \ - float2 c; \ - c = (a)[1]; \ - (a)[1] = (a)[4]; \ - (a)[4] = c; \ - c = (a)[3]; \ - (a)[3] = (a)[6]; \ - (a)[6] = c; \ - } - -#define fftKernel8(a,dir) \ - { \ - const float2 w1 = (float2)(0x1.6a09e6p-1f, dir * 0x1.6a09e6p-1f); \ - const float2 w3 = (float2)(-0x1.6a09e6p-1f, dir * 0x1.6a09e6p-1f); \ - float2 c; \ - fftKernel2S((a)[0], (a)[4], dir); \ - fftKernel2S((a)[1], (a)[5], dir); \ - fftKernel2S((a)[2], (a)[6], dir); \ - fftKernel2S((a)[3], (a)[7], dir); \ - (a)[5] = complexMul(w1, (a)[5]); \ - (a)[6] = (float2)(dir) * (conjTransp((a)[6])); \ - (a)[7] = complexMul(w3, (a)[7]); \ - fftKernel2S((a)[0], (a)[2], dir); \ - fftKernel2S((a)[1], (a)[3], dir); \ - fftKernel2S((a)[4], (a)[6], dir); \ - fftKernel2S((a)[5], (a)[7], dir); \ - (a)[3] = (float2)(dir) * (conjTransp((a)[3])); \ - (a)[7] = (float2)(dir) * (conjTransp((a)[7])); \ - fftKernel2S((a)[0], (a)[1], dir); \ - fftKernel2S((a)[2], (a)[3], dir); \ - fftKernel2S((a)[4], (a)[5], dir); \ - fftKernel2S((a)[6], (a)[7], dir); \ - bitreverse8((a)); \ - } - -#define bitreverse4x4(a) \ - { \ - float2 c; \ - c = (a)[1]; (a)[1] = (a)[4]; (a)[4] = c; \ - c = (a)[2]; (a)[2] = (a)[8]; (a)[8] = c; \ - c = (a)[3]; (a)[3] = (a)[12]; (a)[12] = c; \ - c = (a)[6]; (a)[6] = (a)[9]; (a)[9] = c; \ - c = (a)[7]; (a)[7] = (a)[13]; (a)[13] = c; \ - c = (a)[11]; (a)[11] = (a)[14]; (a)[14] = c; \ - } - -#define fftKernel16(a,dir) \ - { \ - const float w0 = 0x1.d906bcp-1f; \ - const float w1 = 0x1.87de2ap-2f; \ - const float w2 = 0x1.6a09e6p-1f; \ - fftKernel4s((a)[0], (a)[4], (a)[8], (a)[12], dir); \ - fftKernel4s((a)[1], (a)[5], (a)[9], (a)[13], dir); \ - fftKernel4s((a)[2], (a)[6], (a)[10], (a)[14], dir); \ - fftKernel4s((a)[3], (a)[7], (a)[11], (a)[15], dir); \ - (a)[5] = complexMul((a)[5], (float2)(w0, dir * w1)); \ - (a)[6] = complexMul((a)[6], (float2)(w2, dir * w2)); \ - (a)[7] = complexMul((a)[7], (float2)(w1, dir * w0)); \ - (a)[9] = complexMul((a)[9], (float2)(w2, dir * w2)); \ - (a)[10] = (float2)(dir) * (conjTransp((a)[10])); \ - (a)[11] = complexMul((a)[11], (float2)(-w2, dir * w2)); \ - (a)[13] = complexMul((a)[13], (float2)(w1, dir * w0)); \ - (a)[14] = complexMul((a)[14], (float2)(-w2, dir * w2)); \ - (a)[15] = complexMul((a)[15], (float2)(-w0, dir * -w1)); \ - fftKernel4((a), dir); \ - fftKernel4((a) + 4, dir); \ - fftKernel4((a) + 8, dir); \ - fftKernel4((a) + 12, dir); \ - bitreverse4x4((a)); \ - } - -#define bitreverse32(a) \ - { \ - float2 c1, c2; \ - c1 = (a)[2]; (a)[2] = (a)[1]; c2 = (a)[4]; (a)[4] = c1; c1 = (a)[8]; (a)[8] = c2; c2 = (a)[16]; (a)[16] = c1; (a)[1] = c2; \ - c1 = (a)[6]; (a)[6] = (a)[3]; c2 = (a)[12]; (a)[12] = c1; c1 = (a)[24]; (a)[24] = c2; c2 = (a)[17]; (a)[17] = c1; (a)[3] = c2; \ - c1 = (a)[10]; (a)[10] = (a)[5]; c2 = (a)[20]; (a)[20] = c1; c1 = (a)[9]; (a)[9] = c2; c2 = (a)[18]; (a)[18] = c1; (a)[5] = c2; \ - c1 = (a)[14]; (a)[14] = (a)[7]; c2 = (a)[28]; (a)[28] = c1; c1 = (a)[25]; (a)[25] = c2; c2 = (a)[19]; (a)[19] = c1; (a)[7] = c2; \ - c1 = (a)[22]; (a)[22] = (a)[11]; c2 = (a)[13]; (a)[13] = c1; c1 = (a)[26]; (a)[26] = c2; c2 = (a)[21]; (a)[21] = c1; (a)[11] = c2; \ - c1 = (a)[30]; (a)[30] = (a)[15]; c2 = (a)[29]; (a)[29] = c1; c1 = (a)[27]; (a)[27] = c2; c2 = (a)[23]; (a)[23] = c1; (a)[15] = c2; \ - } - -#define fftKernel32(a,dir) \ - { \ - fftKernel2S((a)[0], (a)[16], dir); \ - fftKernel2S((a)[1], (a)[17], dir); \ - fftKernel2S((a)[2], (a)[18], dir); \ - fftKernel2S((a)[3], (a)[19], dir); \ - fftKernel2S((a)[4], (a)[20], dir); \ - fftKernel2S((a)[5], (a)[21], dir); \ - fftKernel2S((a)[6], (a)[22], dir); \ - fftKernel2S((a)[7], (a)[23], dir); \ - fftKernel2S((a)[8], (a)[24], dir); \ - fftKernel2S((a)[9], (a)[25], dir); \ - fftKernel2S((a)[10], (a)[26], dir); \ - fftKernel2S((a)[11], (a)[27], dir); \ - fftKernel2S((a)[12], (a)[28], dir); \ - fftKernel2S((a)[13], (a)[29], dir); \ - fftKernel2S((a)[14], (a)[30], dir); \ - fftKernel2S((a)[15], (a)[31], dir); \ - (a)[17] = complexMul((a)[17], (float2)(0x1.f6297cp-1f, dir * 0x1.8f8b84p-3f)); \ - (a)[18] = complexMul((a)[18], (float2)(0x1.d906bcp-1f, dir * 0x1.87de2ap-2f)); \ - (a)[19] = complexMul((a)[19], (float2)(0x1.a9b662p-1f, dir * 0x1.1c73b4p-1f)); \ - (a)[20] = complexMul((a)[20], (float2)(0x1.6a09e6p-1f, dir * 0x1.6a09e6p-1f)); \ - (a)[21] = complexMul((a)[21], (float2)(0x1.1c73b4p-1f, dir * 0x1.a9b662p-1f)); \ - (a)[22] = complexMul((a)[22], (float2)(0x1.87de2ap-2f, dir * 0x1.d906bcp-1f)); \ - (a)[23] = complexMul((a)[23], (float2)(0x1.8f8b84p-3f, dir * 0x1.f6297cp-1f)); \ - (a)[24] = complexMul((a)[24], (float2)(0x0p+0f, dir * 0x1p+0f)); \ - (a)[25] = complexMul((a)[25], (float2)(-0x1.8f8b84p-3f, dir * 0x1.f6297cp-1f)); \ - (a)[26] = complexMul((a)[26], (float2)(-0x1.87de2ap-2f, dir * 0x1.d906bcp-1f)); \ - (a)[27] = complexMul((a)[27], (float2)(-0x1.1c73b4p-1f, dir * 0x1.a9b662p-1f)); \ - (a)[28] = complexMul((a)[28], (float2)(-0x1.6a09e6p-1f, dir * 0x1.6a09e6p-1f)); \ - (a)[29] = complexMul((a)[29], (float2)(-0x1.a9b662p-1f, dir * 0x1.1c73b4p-1f)); \ - (a)[30] = complexMul((a)[30], (float2)(-0x1.d906bcp-1f, dir * 0x1.87de2ap-2f)); \ - (a)[31] = complexMul((a)[31], (float2)(-0x1.f6297cp-1f, dir * 0x1.8f8b84p-3f)); \ - fftKernel16((a), dir); \ - fftKernel16((a) + 16, dir); \ - bitreverse32((a)); \ - } - -__kernel void \ - clFFT_1DTwistInterleaved(__global float2 *in, unsigned int startRow, unsigned int numCols, unsigned int N, unsigned int numRowsToProcess, int dir) \ - { \ - float2 a, w; \ - float ang; \ - unsigned int j; \ - unsigned int i = get_global_id(0); \ - unsigned int startIndex = i; \ - \ - if(i < numCols) \ - { \ - for(j = 0; j < numRowsToProcess; j++) \ - { \ - a = in[startIndex]; \ - ang = 2.0f * M_PI * dir * i * (startRow + j) / N; \ - w = (float2)(native_cos(ang), native_sin(ang)); \ - a = complexMul(a, w); \ - in[startIndex] = a; \ - startIndex += numCols; \ - } \ - } \ - } \ - __kernel void fft0(__global float2 *in_out) -{ - const int dir = -1; - __local float2 sMem[4][272]; - int i, j; - float ang, angf; - __local float2 *lMemStore, *lMemLoad; - float2 a0, a1, a2, a3; - int offset = (get_group_id(0) * 4 + get_local_id(1)) * 256 + get_local_id(0); - in_out += offset; - a0 = in_out[0]; - a1 = in_out[64]; - a2 = in_out[128]; - a3 = in_out[192]; - fftKernel4s(a0, a1, a2, a3, dir); - angf = (float) get_local_id(0); - ang = dir * ( 2.0f * M_PI * 1.0f / 256.0f ) * angf; - float2 w0 = (float2)(native_cos(ang), native_sin(ang)); - ang = dir * ( 2.0f * M_PI * 2.0f / 256.0f ) * angf; - float2 w1 = (float2)(native_cos(ang), native_sin(ang)); - ang = dir * ( 2.0f * M_PI * 3.0f / 256.0f ) * angf; - float2 w2 = (float2)(native_cos(ang), native_sin(ang)); - a1 = complexMul(a1, w0); - a2 = complexMul(a2, w1); - a3 = complexMul(a3, w2); - lMemStore = &sMem[get_local_id(1)][get_local_id(0)]; - j = get_local_id(0) & 3; - i = get_local_id(0) >> 2; - lMemLoad = &sMem[get_local_id(1)][j * 68 + i]; - lMemStore[0] = a0; - lMemStore[68] = a1; - lMemStore[136] = a2; - lMemStore[204] = a3; - barrier(CLK_LOCAL_MEM_FENCE); - a0 = lMemLoad[0]; - a1 = lMemLoad[16]; - a2 = lMemLoad[32]; - a3 = lMemLoad[48]; - barrier(CLK_LOCAL_MEM_FENCE); - fftKernel4s(a0, a1, a2, a3, dir); - angf = (float) (get_local_id(0) >> 2); - ang = dir * ( 2.0f * M_PI * 1.0f / 64.0f ) * angf; - float2 w3 = (float2)(native_cos(ang), native_sin(ang)); - ang = dir * ( 2.0f * M_PI * 2.0f / 64.0f ) * angf; - float2 w4 = (float2)(native_cos(ang), native_sin(ang)); - ang = dir * ( 2.0f * M_PI * 3.0f / 64.0f ) * angf; - float2 w5 = (float2)(native_cos(ang), native_sin(ang)); - a1 = complexMul(a1, w3); - a2 = complexMul(a2, w4); - a3 = complexMul(a3, w5); - j = (get_local_id(0) & 15) >> 2; - i = (get_local_id(0) >> 4) * 4 + (get_local_id(0) & 3); - lMemLoad = &sMem[get_local_id(1)][j * 68 + i]; - lMemStore[0] = a0; - lMemStore[68] = a1; - lMemStore[136] = a2; - lMemStore[204] = a3; - barrier(CLK_LOCAL_MEM_FENCE); - a0 = lMemLoad[0]; - a1 = lMemLoad[16]; - a2 = lMemLoad[32]; - a3 = lMemLoad[48]; - barrier(CLK_LOCAL_MEM_FENCE); - fftKernel4s(a0, a1, a2, a3, dir); - angf = (float) (get_local_id(0) >> 4); - ang = dir * ( 2.0f * M_PI * 1.0f / 16.0f ) * angf; - float2 w6 = (float2)(native_cos(ang), native_sin(ang)); - ang = dir * ( 2.0f * M_PI * 2.0f / 16.0f ) * angf; - float2 w7 = (float2)(native_cos(ang), native_sin(ang)); - ang = dir * ( 2.0f * M_PI * 3.0f / 16.0f ) * angf; - float2 w8 = (float2)(native_cos(ang), native_sin(ang)); - a1 = complexMul(a1, w6); - a2 = complexMul(a2, w7); - a3 = complexMul(a3, w8); - j = get_local_id(0) >> 4; - i = get_local_id(0) & 15; - lMemLoad = &sMem[get_local_id(1)][j * 64 + i]; - lMemStore[0] = a0; - lMemStore[64] = a1; - lMemStore[128] = a2; - lMemStore[192] = a3; - barrier(CLK_LOCAL_MEM_FENCE); - a0 = lMemLoad[0]; - a1 = lMemLoad[16]; - a2 = lMemLoad[32]; - a3 = lMemLoad[48]; - fftKernel4s(a0, a1, a2, a3, dir); - in_out[0] = a0; - in_out[64] = a1; - in_out[128] = a2; - in_out[192] = a3; -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/FIR.cl b/RTCP/Cobalt/GPUProc/src/opencl/FIR.cl deleted file mode 100644 index ad6f9eb302e944c559c0ba72129074a6e3b080c6..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/FIR.cl +++ /dev/null @@ -1,421 +0,0 @@ -//# FIR.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#define COMPLEX 2 // do not change - -#if NR_BITS_PER_SAMPLE == 16 -typedef short SampleType; -#elif NR_BITS_PER_SAMPLE == 8 -typedef char SampleType; -#else -#error unsupported NR_BITS_PER_SAMPLE -#endif - -typedef __global SampleType (*SampledDataType)[NR_STATIONS][NR_TAPS - 1 + NR_SAMPLES_PER_CHANNEL][NR_CHANNELS][NR_POLARIZATIONS * COMPLEX]; -typedef __global float (*FilteredDataType)[NR_STATIONS][NR_POLARIZATIONS][NR_SAMPLES_PER_CHANNEL][NR_CHANNELS][COMPLEX]; -typedef __global const float16 (*WeightsType)[NR_CHANNELS]; - - -/*! - * Applies the Finite Input Response filter defined by the weightsPtr array - * to the sampledDataPtr array. Output is written into the filteredDataPtr - * array. The filter works on complex numbers. The weights are real values only. - * - * Input values are first converted to (complex) float. - * The kernel also reorders the polarization dimension and expects the weights - * per channel in reverse order. If an FFT is applied afterwards, the weights - * of the odd channels are often supplied negated to get the resulting channels - * in increasing order of frequency. - * - * \param[out] filteredDataPtr 4D output array of floats - * \param[in] sampledDataPtr 4D input array of signed chars or shorts - * \param[in] weightsPtr 2D per-channel FIR filter coefficient array of floats (considering float16 as a dim) - * - * Pre-processor input symbols (some are tied to the execution configuration) - * Symbol | Valid Values | Description - * ----------------------- | --------------------------- | ----------- - * NR_STATIONS | >= 1 | number of antenna fields - * NR_TAPS | 1--16 | number of FIR filtering coefficients - * NR_SAMPLES_PER_CHANNEL | multiple of NR_TAPS and > 0 | number of input samples per channel - * NR_BITS_PER_SAMPLE | 8 or 16 | number of bits of signed integral value type of sampledDataPtr (TODO: support 4) - * NR_CHANNELS | multiple of 16 and > 0 | number of frequency channels per subband - * NR_POLARIZATIONS | power of 2 | number of polarizations - * - * Execution configuration: (TODO: enforce using __attribute__ reqd_work_group_size) - * - Work dim == 2 (can be 1 iff NR_STATIONS == 1) - * + Inner dim: the channel, pol, real/imag the thread processes - * + Outer dim: the station the thread processes - * - Work group size: must divide global size, no other kernel restrictions - * - Global size: (NR_CHANNELS * NR_POLARIZATIONS * 2, NR_STATIONS) - * - * TODO: convert complex dim to fcomplex (=float2 in math.cl) in device code and to complex<float> in host code. - */ -__kernel void FIR_filter(__global void *filteredDataPtr, - __global const void *sampledDataPtr, - __global const void *weightsPtr) -{ - SampledDataType sampledData = (SampledDataType) sampledDataPtr; - FilteredDataType filteredData = (FilteredDataType) filteredDataPtr; - WeightsType weightsData = (WeightsType) weightsPtr; - - uint cpr = get_global_id(0); -#if 0 - // Straight index calc for NR_CHANNELS == 1 - uint pol_ri = cpr & 3; - uint channel = cpr >> 2; - uint ri = cpr & 1; - uint pol = pol_ri >> 1; -#else - uint ri = cpr & 1; - uint channel = (cpr >> 1) % NR_CHANNELS; - uint pol = (cpr >> 1) / NR_CHANNELS; - uint pol_ri = (pol << 1) | ri; -#endif - uint station = get_global_id(1); - - //#pragma OPENCL EXTENSION cl_amd_printf : enable - - const float16 weights = (*weightsData)[channel]; - float16 delayLine; - float16 sum; - - delayLine.s0 = convert_float((*sampledData)[station][0][channel][pol_ri]); - delayLine.s1 = convert_float((*sampledData)[station][1][channel][pol_ri]); - delayLine.s2 = convert_float((*sampledData)[station][2][channel][pol_ri]); - delayLine.s3 = convert_float((*sampledData)[station][3][channel][pol_ri]); - delayLine.s4 = convert_float((*sampledData)[station][4][channel][pol_ri]); - delayLine.s5 = convert_float((*sampledData)[station][5][channel][pol_ri]); - delayLine.s6 = convert_float((*sampledData)[station][6][channel][pol_ri]); - delayLine.s7 = convert_float((*sampledData)[station][7][channel][pol_ri]); - delayLine.s8 = convert_float((*sampledData)[station][8][channel][pol_ri]); - delayLine.s9 = convert_float((*sampledData)[station][9][channel][pol_ri]); - delayLine.sA = convert_float((*sampledData)[station][10][channel][pol_ri]); - delayLine.sB = convert_float((*sampledData)[station][11][channel][pol_ri]); - delayLine.sC = convert_float((*sampledData)[station][12][channel][pol_ri]); - delayLine.sD = convert_float((*sampledData)[station][13][channel][pol_ri]); - delayLine.sE = convert_float((*sampledData)[station][14][channel][pol_ri]); - - for (uint time = 0; time < NR_SAMPLES_PER_CHANNEL; time += NR_TAPS) { - delayLine.sF = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 0][channel][pol_ri]); - sum.s0 = weights.sF * delayLine.s0; - delayLine.s0 = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 1][channel][pol_ri]); - sum.s0 += weights.sE * delayLine.s1; - sum.s0 += weights.sD * delayLine.s2; - sum.s0 += weights.sC * delayLine.s3; - sum.s0 += weights.sB * delayLine.s4; - sum.s0 += weights.sA * delayLine.s5; - sum.s0 += weights.s9 * delayLine.s6; - sum.s0 += weights.s8 * delayLine.s7; - sum.s0 += weights.s7 * delayLine.s8; - sum.s0 += weights.s6 * delayLine.s9; - sum.s0 += weights.s5 * delayLine.sA; - sum.s0 += weights.s4 * delayLine.sB; - sum.s0 += weights.s3 * delayLine.sC; - sum.s0 += weights.s2 * delayLine.sD; - sum.s0 += weights.s1 * delayLine.sE; - sum.s0 += weights.s0 * delayLine.sF; - (*filteredData)[station][pol][time + 0][channel][ri] = sum.s0; - - sum.s1 = weights.sF * delayLine.s1; - delayLine.s1 = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 2][channel][pol_ri]); - sum.s1 += weights.sE * delayLine.s2; - sum.s1 += weights.sD * delayLine.s3; - sum.s1 += weights.sC * delayLine.s4; - sum.s1 += weights.sB * delayLine.s5; - sum.s1 += weights.sA * delayLine.s6; - sum.s1 += weights.s9 * delayLine.s7; - sum.s1 += weights.s8 * delayLine.s8; - sum.s1 += weights.s7 * delayLine.s9; - sum.s1 += weights.s6 * delayLine.sA; - sum.s1 += weights.s5 * delayLine.sB; - sum.s1 += weights.s4 * delayLine.sC; - sum.s1 += weights.s3 * delayLine.sD; - sum.s1 += weights.s2 * delayLine.sE; - sum.s1 += weights.s1 * delayLine.sF; - sum.s1 += weights.s0 * delayLine.s0; - (*filteredData)[station][pol][time + 1][channel][ri] = sum.s1; - - sum.s2 = weights.sF * delayLine.s2; - delayLine.s2 = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 3][channel][pol_ri]); - sum.s2 += weights.sE * delayLine.s3; - sum.s2 += weights.sD * delayLine.s4; - sum.s2 += weights.sC * delayLine.s5; - sum.s2 += weights.sB * delayLine.s6; - sum.s2 += weights.sA * delayLine.s7; - sum.s2 += weights.s9 * delayLine.s8; - sum.s2 += weights.s8 * delayLine.s9; - sum.s2 += weights.s7 * delayLine.sA; - sum.s2 += weights.s6 * delayLine.sB; - sum.s2 += weights.s5 * delayLine.sC; - sum.s2 += weights.s4 * delayLine.sD; - sum.s2 += weights.s3 * delayLine.sE; - sum.s2 += weights.s2 * delayLine.sF; - sum.s2 += weights.s1 * delayLine.s0; - sum.s2 += weights.s0 * delayLine.s1; - (*filteredData)[station][pol][time + 2][channel][ri] = sum.s2; - - sum.s3 = weights.sF * delayLine.s3; - delayLine.s3 = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 4][channel][pol_ri]); - sum.s3 += weights.sE * delayLine.s4; - sum.s3 += weights.sD * delayLine.s5; - sum.s3 += weights.sC * delayLine.s6; - sum.s3 += weights.sB * delayLine.s7; - sum.s3 += weights.sA * delayLine.s8; - sum.s3 += weights.s9 * delayLine.s9; - sum.s3 += weights.s8 * delayLine.sA; - sum.s3 += weights.s7 * delayLine.sB; - sum.s3 += weights.s6 * delayLine.sC; - sum.s3 += weights.s5 * delayLine.sD; - sum.s3 += weights.s4 * delayLine.sE; - sum.s3 += weights.s3 * delayLine.sF; - sum.s3 += weights.s2 * delayLine.s0; - sum.s3 += weights.s1 * delayLine.s1; - sum.s3 += weights.s0 * delayLine.s2; - (*filteredData)[station][pol][time + 3][channel][ri] = sum.s3; - - sum.s4 = weights.sF * delayLine.s4; - delayLine.s4 = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 5][channel][pol_ri]); - sum.s4 += weights.sE * delayLine.s5; - sum.s4 += weights.sD * delayLine.s6; - sum.s4 += weights.sC * delayLine.s7; - sum.s4 += weights.sB * delayLine.s8; - sum.s4 += weights.sA * delayLine.s9; - sum.s4 += weights.s9 * delayLine.sA; - sum.s4 += weights.s8 * delayLine.sB; - sum.s4 += weights.s7 * delayLine.sC; - sum.s4 += weights.s6 * delayLine.sD; - sum.s4 += weights.s5 * delayLine.sE; - sum.s4 += weights.s4 * delayLine.sF; - sum.s4 += weights.s3 * delayLine.s0; - sum.s4 += weights.s2 * delayLine.s1; - sum.s4 += weights.s1 * delayLine.s2; - sum.s4 += weights.s0 * delayLine.s3; - (*filteredData)[station][pol][time + 4][channel][ri] = sum.s4; - - sum.s5 = weights.sF * delayLine.s5; - delayLine.s5 = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 6][channel][pol_ri]); - sum.s5 += weights.sE * delayLine.s6; - sum.s5 += weights.sD * delayLine.s7; - sum.s5 += weights.sC * delayLine.s8; - sum.s5 += weights.sB * delayLine.s9; - sum.s5 += weights.sA * delayLine.sA; - sum.s5 += weights.s9 * delayLine.sB; - sum.s5 += weights.s8 * delayLine.sC; - sum.s5 += weights.s7 * delayLine.sD; - sum.s5 += weights.s6 * delayLine.sE; - sum.s5 += weights.s5 * delayLine.sF; - sum.s5 += weights.s4 * delayLine.s0; - sum.s5 += weights.s3 * delayLine.s1; - sum.s5 += weights.s2 * delayLine.s2; - sum.s5 += weights.s1 * delayLine.s3; - sum.s5 += weights.s0 * delayLine.s4; - (*filteredData)[station][pol][time + 5][channel][ri] = sum.s5; - - sum.s6 = weights.sF * delayLine.s6; - delayLine.s6 = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 7][channel][pol_ri]); - sum.s6 += weights.sE * delayLine.s7; - sum.s6 += weights.sD * delayLine.s8; - sum.s6 += weights.sC * delayLine.s9; - sum.s6 += weights.sB * delayLine.sA; - sum.s6 += weights.sA * delayLine.sB; - sum.s6 += weights.s9 * delayLine.sC; - sum.s6 += weights.s8 * delayLine.sD; - sum.s6 += weights.s7 * delayLine.sE; - sum.s6 += weights.s6 * delayLine.sF; - sum.s6 += weights.s5 * delayLine.s0; - sum.s6 += weights.s4 * delayLine.s1; - sum.s6 += weights.s3 * delayLine.s2; - sum.s6 += weights.s2 * delayLine.s3; - sum.s6 += weights.s1 * delayLine.s4; - sum.s6 += weights.s0 * delayLine.s5; - (*filteredData)[station][pol][time + 6][channel][ri] = sum.s6; - - sum.s7 = weights.sF * delayLine.s7; - delayLine.s7 = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 8][channel][pol_ri]); - sum.s7 += weights.sE * delayLine.s8; - sum.s7 += weights.sD * delayLine.s9; - sum.s7 += weights.sC * delayLine.sA; - sum.s7 += weights.sB * delayLine.sB; - sum.s7 += weights.sA * delayLine.sC; - sum.s7 += weights.s9 * delayLine.sD; - sum.s7 += weights.s8 * delayLine.sE; - sum.s7 += weights.s7 * delayLine.sF; - sum.s7 += weights.s6 * delayLine.s0; - sum.s7 += weights.s5 * delayLine.s1; - sum.s7 += weights.s4 * delayLine.s2; - sum.s7 += weights.s3 * delayLine.s3; - sum.s7 += weights.s2 * delayLine.s4; - sum.s7 += weights.s1 * delayLine.s5; - sum.s7 += weights.s0 * delayLine.s6; - (*filteredData)[station][pol][time + 7][channel][ri] = sum.s7; - - sum.s8 = weights.sF * delayLine.s8; - delayLine.s8 = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 9][channel][pol_ri]); - sum.s8 += weights.sE * delayLine.s9; - sum.s8 += weights.sD * delayLine.sA; - sum.s8 += weights.sC * delayLine.sB; - sum.s8 += weights.sB * delayLine.sC; - sum.s8 += weights.sA * delayLine.sD; - sum.s8 += weights.s9 * delayLine.sE; - sum.s8 += weights.s8 * delayLine.sF; - sum.s8 += weights.s7 * delayLine.s0; - sum.s8 += weights.s6 * delayLine.s1; - sum.s8 += weights.s5 * delayLine.s2; - sum.s8 += weights.s4 * delayLine.s3; - sum.s8 += weights.s3 * delayLine.s4; - sum.s8 += weights.s2 * delayLine.s5; - sum.s8 += weights.s1 * delayLine.s6; - sum.s8 += weights.s0 * delayLine.s7; - (*filteredData)[station][pol][time + 8][channel][ri] = sum.s8; - - sum.s9 = weights.sF * delayLine.s9; - delayLine.s9 = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 10][channel][pol_ri]); - sum.s9 += weights.sE * delayLine.sA; - sum.s9 += weights.sD * delayLine.sB; - sum.s9 += weights.sC * delayLine.sC; - sum.s9 += weights.sB * delayLine.sD; - sum.s9 += weights.sA * delayLine.sE; - sum.s9 += weights.s9 * delayLine.sF; - sum.s9 += weights.s8 * delayLine.s0; - sum.s9 += weights.s7 * delayLine.s1; - sum.s9 += weights.s6 * delayLine.s2; - sum.s9 += weights.s5 * delayLine.s3; - sum.s9 += weights.s4 * delayLine.s4; - sum.s9 += weights.s3 * delayLine.s5; - sum.s9 += weights.s2 * delayLine.s6; - sum.s9 += weights.s1 * delayLine.s7; - sum.s9 += weights.s0 * delayLine.s8; - (*filteredData)[station][pol][time + 9][channel][ri] = sum.s9; - - sum.sA = weights.sF * delayLine.sA; - delayLine.sA = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 11][channel][pol_ri]); - sum.sA += weights.sE * delayLine.sB; - sum.sA += weights.sD * delayLine.sC; - sum.sA += weights.sC * delayLine.sD; - sum.sA += weights.sB * delayLine.sE; - sum.sA += weights.sA * delayLine.sF; - sum.sA += weights.s9 * delayLine.s0; - sum.sA += weights.s8 * delayLine.s1; - sum.sA += weights.s7 * delayLine.s2; - sum.sA += weights.s6 * delayLine.s3; - sum.sA += weights.s5 * delayLine.s4; - sum.sA += weights.s4 * delayLine.s5; - sum.sA += weights.s3 * delayLine.s6; - sum.sA += weights.s2 * delayLine.s7; - sum.sA += weights.s1 * delayLine.s8; - sum.sA += weights.s0 * delayLine.s9; - (*filteredData)[station][pol][time + 10][channel][ri] = sum.sA; - - sum.sB = weights.sF * delayLine.sB; - delayLine.sB = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 12][channel][pol_ri]); - sum.sB += weights.sE * delayLine.sC; - sum.sB += weights.sD * delayLine.sD; - sum.sB += weights.sC * delayLine.sE; - sum.sB += weights.sB * delayLine.sF; - sum.sB += weights.sA * delayLine.s0; - sum.sB += weights.s9 * delayLine.s1; - sum.sB += weights.s8 * delayLine.s2; - sum.sB += weights.s7 * delayLine.s3; - sum.sB += weights.s6 * delayLine.s4; - sum.sB += weights.s5 * delayLine.s5; - sum.sB += weights.s4 * delayLine.s6; - sum.sB += weights.s3 * delayLine.s7; - sum.sB += weights.s2 * delayLine.s8; - sum.sB += weights.s1 * delayLine.s9; - sum.sB += weights.s0 * delayLine.sA; - (*filteredData)[station][pol][time + 11][channel][ri] = sum.sB; - - sum.sC = weights.sF * delayLine.sC; - delayLine.sC = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 13][channel][pol_ri]); - sum.sC += weights.sE * delayLine.sD; - sum.sC += weights.sD * delayLine.sE; - sum.sC += weights.sC * delayLine.sF; - sum.sC += weights.sB * delayLine.s0; - sum.sC += weights.sA * delayLine.s1; - sum.sC += weights.s9 * delayLine.s2; - sum.sC += weights.s8 * delayLine.s3; - sum.sC += weights.s7 * delayLine.s4; - sum.sC += weights.s6 * delayLine.s5; - sum.sC += weights.s5 * delayLine.s6; - sum.sC += weights.s4 * delayLine.s7; - sum.sC += weights.s3 * delayLine.s8; - sum.sC += weights.s2 * delayLine.s9; - sum.sC += weights.s1 * delayLine.sA; - sum.sC += weights.s0 * delayLine.sB; - (*filteredData)[station][pol][time + 12][channel][ri] = sum.sC; - - sum.sD = weights.sF * delayLine.sD; - delayLine.sD = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 14][channel][pol_ri]); - sum.sD += weights.sE * delayLine.sE; - sum.sD += weights.sD * delayLine.sF; - sum.sD += weights.sC * delayLine.s0; - sum.sD += weights.sB * delayLine.s1; - sum.sD += weights.sA * delayLine.s2; - sum.sD += weights.s9 * delayLine.s3; - sum.sD += weights.s8 * delayLine.s4; - sum.sD += weights.s7 * delayLine.s5; - sum.sD += weights.s6 * delayLine.s6; - sum.sD += weights.s5 * delayLine.s7; - sum.sD += weights.s4 * delayLine.s8; - sum.sD += weights.s3 * delayLine.s9; - sum.sD += weights.s2 * delayLine.sA; - sum.sD += weights.s1 * delayLine.sB; - sum.sD += weights.s0 * delayLine.sC; - (*filteredData)[station][pol][time + 13][channel][ri] = sum.sD; - - sum.sE = weights.sF * delayLine.sE; - delayLine.sE = convert_float((*sampledData)[station][time + NR_TAPS - 1 + 15][channel][pol_ri]); - sum.sE += weights.sE * delayLine.sF; - sum.sE += weights.sD * delayLine.s0; - sum.sE += weights.sC * delayLine.s1; - sum.sE += weights.sB * delayLine.s2; - sum.sE += weights.sA * delayLine.s3; - sum.sE += weights.s9 * delayLine.s4; - sum.sE += weights.s8 * delayLine.s5; - sum.sE += weights.s7 * delayLine.s6; - sum.sE += weights.s6 * delayLine.s7; - sum.sE += weights.s5 * delayLine.s8; - sum.sE += weights.s4 * delayLine.s9; - sum.sE += weights.s3 * delayLine.sA; - sum.sE += weights.s2 * delayLine.sB; - sum.sE += weights.s1 * delayLine.sC; - sum.sE += weights.s0 * delayLine.sD; - (*filteredData)[station][pol][time + 14][channel][ri] = sum.sE; - - sum.sF = weights.sF * delayLine.sF; - sum.sF += weights.sE * delayLine.s0; - sum.sF += weights.sD * delayLine.s1; - sum.sF += weights.sC * delayLine.s2; - sum.sF += weights.sB * delayLine.s3; - sum.sF += weights.sA * delayLine.s4; - sum.sF += weights.s9 * delayLine.s5; - sum.sF += weights.s8 * delayLine.s6; - sum.sF += weights.s7 * delayLine.s7; - sum.sF += weights.s6 * delayLine.s8; - sum.sF += weights.s5 * delayLine.s9; - sum.sF += weights.s4 * delayLine.sA; - sum.sF += weights.s3 * delayLine.sB; - sum.sF += weights.s2 * delayLine.sC; - sum.sF += weights.s1 * delayLine.sD; - sum.sF += weights.s0 * delayLine.sE; - (*filteredData)[station][pol][time + 15][channel][ri] = sum.sF; - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerKernel.cc deleted file mode 100644 index 43ff420c8d015515027ce3fef327418dbccb06c8..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerKernel.cc +++ /dev/null @@ -1,61 +0,0 @@ -//# BeamFormerKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "BeamFormerKernel.h" - -#include <algorithm> - -#include <Common/lofar_complex.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - BeamFormerKernel::BeamFormerKernel(const Parset &ps, cl::Program &program, cl::Buffer &devComplexVoltages, cl::Buffer &devCorrectedData, cl::Buffer &devBeamFormerWeights) - : - Kernel(ps, program, "complexVoltages") - { - setArg(0, devComplexVoltages); - setArg(1, devCorrectedData); - setArg(2, devBeamFormerWeights); - - globalWorkSize = cl::NDRange(NR_POLARIZATIONS, ps.nrTABs(0), ps.nrChannelsPerSubband()); - localWorkSize = cl::NDRange(NR_POLARIZATIONS, ps.nrTABs(0), 1); - - // FIXME: nrTABs - //queue.enqueueNDRangeKernel(*this, cl::NullRange, cl::NDRange(16, ps.nrTABs(0), ps.nrChannelsPerSubband()), cl::NDRange(16, ps.nrTABs(0), 1), 0, &event); - - size_t count = ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() * NR_POLARIZATIONS; - size_t nrWeightsBytes = ps.settings.antennaFields.size() * ps.nrTABs(0) * ps.nrChannelsPerSubband() * NR_POLARIZATIONS * sizeof(std::complex<float>); - size_t nrSampleBytesPerPass = count * ps.settings.antennaFields.size() * sizeof(std::complex<float>); - size_t nrComplexVoltagesBytesPerPass = count * ps.nrTABs(0) * sizeof(std::complex<float>); - unsigned nrPasses = std::max((ps.settings.antennaFields.size() + 6) / 16, 1U); - nrOperations = count * ps.settings.antennaFields.size() * ps.nrTABs(0) * 8; - nrBytesRead = nrWeightsBytes + nrSampleBytesPerPass + (nrPasses - 1) * nrComplexVoltagesBytesPerPass; - nrBytesWritten = nrPasses * nrComplexVoltagesBytesPerPass; - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerKernel.h deleted file mode 100644 index e4fa3735d360ff578e9d512d309b7d1e259eb9e8..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerKernel.h +++ /dev/null @@ -1,45 +0,0 @@ -//# BeamFormerKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_BEAM_FORMER_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_BEAM_FORMER_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - class BeamFormerKernel : public Kernel - { - public: - BeamFormerKernel(const Parset &ps, cl::Program &program, cl::Buffer &devComplexVoltages, - cl::Buffer &devCorrectedData, cl::Buffer &devBeamFormerWeights); - }; - - - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerTransposeKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerTransposeKernel.cc deleted file mode 100644 index 076ce93751221775eb62a3b9b70daa002a719c1f..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerTransposeKernel.cc +++ /dev/null @@ -1,55 +0,0 @@ -//# BeamFormerTransposeKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "BeamFormerTransposeKernel.h" - -#include <Common/lofar_complex.h> -#include <Common/LofarLogger.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - - BeamFormerTransposeKernel::BeamFormerTransposeKernel(const Parset &ps, cl::Program &program, cl::Buffer &devTransposedData, cl::Buffer &devComplexVoltages) - : - Kernel(ps, program, "transposeComplexVoltages") - { - ASSERT(ps.nrSamplesPerChannel() % 16 == 0); - setArg(0, devTransposedData); - setArg(1, devComplexVoltages); - - //globalWorkSize = cl::NDRange(256, (ps.nrTABs(0) + 15) / 16, (ps.nrChannelsPerSubband() + 15) / 16); - globalWorkSize = cl::NDRange(256, (ps.nrTABs(0) + 15) / 16, ps.nrSamplesPerChannel() / 16); - localWorkSize = cl::NDRange(256, 1, 1); - - nrOperations = 0; - nrBytesRead = (size_t) ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() * ps.nrTABs(0) * NR_POLARIZATIONS * sizeof(std::complex<float>), - //nrBytesWritten = (size_t) ps.nrTABs(0) * NR_POLARIZATIONS * ps.nrSamplesPerChannel() * ps.nrChannelsPerSubband() * sizeof(std::complex<float>); - nrBytesWritten = (size_t) ps.nrTABs(0) * NR_POLARIZATIONS * ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() * sizeof(std::complex<float>); - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerTransposeKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerTransposeKernel.h deleted file mode 100644 index 5dd97dc8676f6f2e9b4250c5a798800385609acc..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/BeamFormerTransposeKernel.h +++ /dev/null @@ -1,44 +0,0 @@ -//# BeamFormerTransposeKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_BEAM_FORMER_TRANSPOSE_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_BEAM_FORMER_TRANSPOSE_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - class BeamFormerTransposeKernel : public Kernel - { - public: - BeamFormerTransposeKernel(const Parset &ps, cl::Program &program, - cl::Buffer &devTransposedData, cl::Buffer &devComplexVoltages); - - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CoherentStokesKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CoherentStokesKernel.cc deleted file mode 100644 index 6a11c6d5660d8c0f5c7453359381ae23c59aa73c..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CoherentStokesKernel.cc +++ /dev/null @@ -1,54 +0,0 @@ -//# CoherentStokesKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "CoherentStokesKernel.h" - -#include <Common/lofar_complex.h> -#include <Common/LofarLogger.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - - CoherentStokesKernel::CoherentStokesKernel(const Parset &ps, cl::Program &program, cl::Buffer &devStokesData, cl::Buffer &devComplexVoltages) - : - Kernel(ps, program, "coherentStokes") - { - ASSERT(ps.nrChannelsPerSubband() >= 16 && ps.nrChannelsPerSubband() % 16 == 0); - ASSERT(ps.nrCoherentStokes() == 1 || ps.nrCoherentStokes() == 4); - setArg(0, devStokesData); - setArg(1, devComplexVoltages); - - globalWorkSize = cl::NDRange(256, (ps.nrTABs(0) + 15) / 16, (ps.nrChannelsPerSubband() + 15) / 16); - localWorkSize = cl::NDRange(256, 1, 1); - - nrOperations = (size_t) ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() * ps.nrTABs(0) * (ps.nrCoherentStokes() == 1 ? 8 : 20 + 2.0 / ps.coherentStokesTimeIntegrationFactor()); - nrBytesRead = (size_t) ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() * ps.nrTABs(0) * NR_POLARIZATIONS * sizeof(std::complex<float>); - nrBytesWritten = (size_t) ps.nrTABs(0) * ps.nrCoherentStokes() * ps.nrSamplesPerChannel() / ps.coherentStokesTimeIntegrationFactor() * ps.nrChannelsPerSubband() * sizeof(float); - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CoherentStokesKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CoherentStokesKernel.h deleted file mode 100644 index fd89371575a2511bc0f1cdfcd06cedf6a9667df2..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CoherentStokesKernel.h +++ /dev/null @@ -1,45 +0,0 @@ -//# CoherentStokesKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_COHERENT_STOKES_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_COHERENT_STOKES_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - - class CoherentStokesKernel : public Kernel - { - public: - CoherentStokesKernel(const Parset &ps, cl::Program &program, - cl::Buffer &devStokesData, cl::Buffer &devComplexVoltages); - - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CorrelatorKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CorrelatorKernel.cc deleted file mode 100644 index 3a576ddbe1cc78adf85550d900bd0d41be699553..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CorrelatorKernel.cc +++ /dev/null @@ -1,234 +0,0 @@ -//# CorrelatorKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "CorrelatorKernel.h" - -#include <vector> -#include <algorithm> - -#include <Common/lofar_complex.h> -#include <Common/LofarLogger.h> -#include <CoInterface/Align.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - - CorrelatorKernel::CorrelatorKernel(const Parset &ps, - cl::CommandQueue &queue, - cl::Program &program, - cl::Buffer &devVisibilities, - cl::Buffer &devCorrectedData) - : -# if defined USE_4X4 - Kernel(ps, program, "correlate_4x4") -# elif defined USE_3X3 - Kernel(ps, program, "correlate_3x3") -# elif defined USE_2X2 - Kernel(ps, program, "correlate_2x2") -# else - Kernel(ps, program, "correlate") -# endif - { - setArg(0, devVisibilities); - setArg(1, devCorrectedData); - - size_t maxNrThreads, preferredMultiple; - getWorkGroupInfo(queue.getInfo<CL_QUEUE_DEVICE>(), CL_KERNEL_WORK_GROUP_SIZE, &maxNrThreads); - - std::vector<cl_context_properties> properties; - queue.getInfo<CL_QUEUE_CONTEXT>().getInfo(CL_CONTEXT_PROPERTIES, &properties); - - if (cl::Platform((cl_platform_id) properties[1]).getInfo<CL_PLATFORM_NAME>() == "AMD Accelerated Parallel Processing") - preferredMultiple = 256; - else - getWorkGroupInfo(queue.getInfo<CL_QUEUE_DEVICE>(), CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, &preferredMultiple); - -# if defined USE_4X4 - unsigned quartStations = (ps.settings.antennaFields.size() + 2) / 4; - unsigned nrBlocks = quartStations * (quartStations + 1) / 2; -# elif defined USE_3X3 - unsigned thirdStations = (ps.settings.antennaFields.size() + 2) / 3; - unsigned nrBlocks = thirdStations * (thirdStations + 1) / 2; -# elif defined USE_2X2 - unsigned halfStations = (ps.settings.antennaFields.size() + 1) / 2; - unsigned nrBlocks = halfStations * (halfStations + 1) / 2; -# else - unsigned nrBlocks = ps.nrBaselines(); -# endif - unsigned nrPasses = ceilDiv(nrBlocks, maxNrThreads); - unsigned nrThreads = ceilDiv(nrBlocks, nrPasses); - nrThreads = align(nrThreads, preferredMultiple); - //LOG_DEBUG_STR("nrBlocks = " << nrBlocks << ", nrPasses = " << nrPasses << ", preferredMultiple = " << preferredMultiple << ", nrThreads = " << nrThreads); - - unsigned nrUsableChannels = std::max(ps.nrChannelsPerSubband() - 1, 1U); - globalWorkSize = cl::NDRange(nrPasses * nrThreads, nrUsableChannels); - localWorkSize = cl::NDRange(nrThreads, 1); - - nrOperations = (size_t) nrUsableChannels * ps.nrBaselines() * ps.nrSamplesPerChannel() * 32; - nrBytesRead = (size_t) nrPasses * ps.settings.antennaFields.size() * nrUsableChannels * ps.nrSamplesPerChannel() * NR_POLARIZATIONS * sizeof(std::complex<float>); - nrBytesWritten = (size_t) ps.nrBaselines() * nrUsableChannels * NR_POLARIZATIONS * NR_POLARIZATIONS * sizeof(std::complex<float>); - } - - size_t CorrelatorKernel::bufferSize(const Parset& ps, BufferType bufferType) - { - switch (bufferType) { - case INPUT_DATA: - return - ps.nrSamplesPerSubband() * ps.settings.antennaFields.size() * - NR_POLARIZATIONS * sizeof(std::complex<float>); - case OUTPUT_DATA: - return - ps.nrBaselines() * ps.nrChannelsPerSubband() * - NR_POLARIZATIONS * NR_POLARIZATIONS * sizeof(std::complex<float>); - default: - THROW(GPUProcException, "Invalid bufferType (" << bufferType << ")"); - } - } - -#if defined USE_NEW_CORRELATOR - -// CorrelatorKernel::CorrelatorKernel(const Parset &ps, cl::CommandQueue &queue, cl::Program &program, cl::Buffer &devVisibilities, cl::Buffer &devCorrectedData) -// : -// # if defined USE_2X2 -// Kernel(ps, program, "correlate") -// # else -// # error not implemented -// # endif -// { -// setArg(0, devVisibilities); -// setArg(1, devCorrectedData); - -// unsigned nrRectanglesPerSide = (ps.settings.antennaFields.size() - 1) / (2 * 16); -// unsigned nrRectangles = nrRectanglesPerSide * (nrRectanglesPerSide + 1) / 2; -// //LOG_DEBUG_STR("nrRectangles = " << nrRectangles); - -// unsigned nrBlocksPerSide = (ps.settings.antennaFields.size() + 2 * 16 - 1) / (2 * 16); -// unsigned nrBlocks = nrBlocksPerSide * (nrBlocksPerSide + 1) / 2; -// //LOG_DEBUG_STR("nrBlocks = " << nrBlocks); - -// unsigned nrUsableChannels = std::max(ps.nrChannelsPerSubband() - 1, 1U); -// globalWorkSize = cl::NDRange(16 * 16, nrBlocks, nrUsableChannels); -// localWorkSize = cl::NDRange(16 * 16, 1, 1); - -// // FIXME -// //nrOperations = (size_t) (32 * 32) * nrRectangles * nrUsableChannels * ps.nrSamplesPerChannel() * 32; -// nrOperations = (size_t) ps.nrBaselines() * ps.nrSamplesPerSubband() * 32; -// nrBytesRead = (size_t) (32 + 32) * nrRectangles * nrUsableChannels * ps.nrSamplesPerChannel() * NR_POLARIZATIONS * sizeof(std::complex<float>); -// nrBytesWritten = (size_t) (32 * 32) * nrRectangles * nrUsableChannels * NR_POLARIZATIONS * NR_POLARIZATIONS * sizeof(std::complex<float>); -// } - - CorrelateRectangleKernel::CorrelateRectangleKernel(const Parset &ps, cl::CommandQueue &queue, cl::Program &program, cl::Buffer &devVisibilities, cl::Buffer &devCorrectedData) - : -# if defined USE_2X2 - Kernel(ps, program, "correlateRectangleKernel") -# else -# error not implemented -# endif - { - setArg(0, devVisibilities); - setArg(1, devCorrectedData); - - unsigned nrRectanglesPerSide = (ps.settings.antennaFields.size() - 1) / (2 * 16); - unsigned nrRectangles = nrRectanglesPerSide * (nrRectanglesPerSide + 1) / 2; - LOG_DEBUG_STR("nrRectangles = " << nrRectangles); - - unsigned nrUsableChannels = std::max(ps.nrChannelsPerSubband() - 1, 1U); - globalWorkSize = cl::NDRange(16 * 16, nrRectangles, nrUsableChannels); - localWorkSize = cl::NDRange(16 * 16, 1, 1); - - nrOperations = (size_t) (32 * 32) * nrRectangles * nrUsableChannels * ps.nrSamplesPerChannel() * 32; - nrBytesRead = (size_t) (32 + 32) * nrRectangles * nrUsableChannels * ps.nrSamplesPerChannel() * NR_POLARIZATIONS * sizeof(std::complex<float>); - nrBytesWritten = (size_t) (32 * 32) * nrRectangles * nrUsableChannels * NR_POLARIZATIONS * NR_POLARIZATIONS * sizeof(std::complex<float>); - } - - - size_t CorrelatorRectangleKernel::bufferSize(const Parset& ps, BufferType bufferType) - { - switch (bufferType) { - case INPUT_DATA: - return - ps.nrSamplesPerSubband() * ps.settings.antennaFields.size() * - NR_POLARIZATIONS * sizeof(std::complex<float>); - case OUTPUT_DATA: - return - ps.nrBaselines() * ps.nrChannelsPerSubband() * - NR_POLARIZATIONS * NR_POLARIZATIONS * sizeof(std::complex<float>); - default: - THROW(GPUProcException, "Invalid bufferType (" << bufferType << ")"); - } - } - - - CorrelateTriangleKernel::CorrelateTriangleKernel(const Parset &ps, cl::CommandQueue &queue, cl::Program &program, cl::Buffer &devVisibilities, cl::Buffer &devCorrectedData) - : -# if defined USE_2X2 - Kernel(ps, program, "correlateTriangleKernel") -# else -# error not implemented -# endif - { - setArg(0, devVisibilities); - setArg(1, devCorrectedData); - - unsigned nrTriangles = (ps.settings.antennaFields.size() + 2 * 16 - 1) / (2 * 16); - unsigned nrMiniBlocksPerSide = 16; - unsigned nrMiniBlocks = nrMiniBlocksPerSide * (nrMiniBlocksPerSide + 1) / 2; - size_t preferredMultiple; - getWorkGroupInfo(queue.getInfo<CL_QUEUE_DEVICE>(), CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, &preferredMultiple); - unsigned nrThreads = align(nrMiniBlocks, preferredMultiple); - - LOG_DEBUG_STR("nrTriangles = " << nrTriangles << ", nrMiniBlocks = " << nrMiniBlocks << ", nrThreads = " << nrThreads); - - unsigned nrUsableChannels = std::max(ps.nrChannelsPerSubband() - 1, 1U); - globalWorkSize = cl::NDRange(nrThreads, nrTriangles, nrUsableChannels); - localWorkSize = cl::NDRange(nrThreads, 1, 1); - - nrOperations = (size_t) (32 * 32 / 2) * nrTriangles * nrUsableChannels * ps.nrSamplesPerChannel() * 32; - nrBytesRead = (size_t) 32 * nrTriangles * nrUsableChannels * ps.nrSamplesPerChannel() * NR_POLARIZATIONS * sizeof(std::complex<float>); - nrBytesWritten = (size_t) (32 * 32 / 2) * nrTriangles * nrUsableChannels * NR_POLARIZATIONS * NR_POLARIZATIONS * sizeof(std::complex<float>); - } - - size_t CorrelatorTriangleKernel::bufferSize(const Parset& ps, BufferType bufferType) - { - switch (bufferType) { - case INPUT_DATA: - return - ps.nrSamplesPerSubband() * ps.settings.antennaFields.size() * - NR_POLARIZATIONS * sizeof(std::complex<float>); - case OUTPUT_DATA: - return - ps.nrBaselines() * ps.nrChannelsPerSubband() * - NR_POLARIZATIONS * NR_POLARIZATIONS * sizeof(std::complex<float>); - default: - THROW(GPUProcException, "Invalid bufferType (" << bufferType << ")"); - } - } - -#endif - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CorrelatorKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CorrelatorKernel.h deleted file mode 100644 index 476ecd2555465157a2f89fc78779d74d7ebed877..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/CorrelatorKernel.h +++ /dev/null @@ -1,103 +0,0 @@ -//# CorrelatorKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_CORRELATOR_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_CORRELATOR_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/global_defines.h> -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - - class CorrelatorKernel : public Kernel - { - public: - CorrelatorKernel(const Parset &ps, - cl::CommandQueue &queue, - cl::Program &program, - cl::Buffer &devVisibilities, - cl::Buffer &devCorrectedData); - - enum BufferType - { - INPUT_DATA, - OUTPUT_DATA - }; - - // Return required buffer size for \a bufferType - static size_t bufferSize(const Parset& ps, BufferType bufferType); - - }; - -#if defined USE_NEW_CORRELATOR - - class CorrelateRectangleKernel : public Kernel - { - public: - CorrelateRectangleKernel(const Parset &ps, - cl::CommandQueue &queue, - cl::Program &program, - cl::Buffer &devVisibilities, - cl::Buffer &devCorrectedData); - - enum BufferType - { - INPUT_DATA, - OUTPUT_DATA - }; - - // Return required buffer size for \a bufferType - static size_t bufferSize(const Parset& ps, BufferType bufferType); - - }; - - class CorrelateTriangleKernel : public Kernel - { - public: - CorrelateTriangleKernel(const Parset &ps, - cl::CommandQueue &queue, - cl::Program &program, - cl::Buffer &devVisibilities, - cl::Buffer &devCorrectedData); - - enum BufferType - { - INPUT_DATA, - OUTPUT_DATA - }; - - // Return required buffer size for \a bufferType - static size_t bufferSize(const Parset& ps, BufferType bufferType); - - }; - -#endif - - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionBackwardFFTkernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionBackwardFFTkernel.cc deleted file mode 100644 index 30adf3405ffb6ec504929cef64b0efe2b2b60d58..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionBackwardFFTkernel.cc +++ /dev/null @@ -1,43 +0,0 @@ -//# DedispersionBackwardFFTkernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "DedispersionBackwardFFTkernel.h" - -#include <Common/LofarLogger.h> - -#include <GPUProc/global_defines.h> -#include "FFT_Kernel.h" - -namespace LOFAR -{ - namespace Cobalt - { - DedispersionBackwardFFTkernel::DedispersionBackwardFFTkernel(const Parset &ps, cl::Context &context, cl::Buffer &buffer) - : - FFT_Kernel(context, ps.dedispersionFFTsize(), ps.nrTABs(0) * NR_POLARIZATIONS * ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() / ps.dedispersionFFTsize(), false, buffer) - { - ASSERT(ps.nrSamplesPerChannel() % ps.dedispersionFFTsize() == 0); - } - } - -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionBackwardFFTkernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionBackwardFFTkernel.h deleted file mode 100644 index eb9af7638703bbb07179bce0985b102332287c65..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionBackwardFFTkernel.h +++ /dev/null @@ -1,43 +0,0 @@ -//# DedispersionBackwardFFTkernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_DEDISPERSION_BACKWARD_FFTKERNEL_H -#define LOFAR_GPUPROC_OPENCL_DEDISPERSION_BACKWARD_FFTKERNEL_H - -#include <CoInterface/Parset.h> - -#include "FFT_Kernel.h" - -namespace LOFAR -{ - namespace Cobalt - { - class DedispersionBackwardFFTkernel : public FFT_Kernel - { - public: - DedispersionBackwardFFTkernel(const Parset &ps, cl::Context &context, cl::Buffer &buffer); - - }; - } - -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionChirpKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionChirpKernel.cc deleted file mode 100644 index aef67cee619f691d87dc4cfcbb156d185d2ca093..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionChirpKernel.cc +++ /dev/null @@ -1,72 +0,0 @@ -//# DedispersionChirpKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "DedispersionChirpKernel.h" - -#include <Common/lofar_complex.h> -#include <Common/LofarLogger.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - DedispersionChirpKernel::DedispersionChirpKernel(const Parset &ps, cl::Program &program, cl::CommandQueue &queue, cl::Buffer &buffer, cl::Buffer &DMs) - : - Kernel(ps, program, "applyChirp") - { - setArg(0, buffer); - setArg(1, DMs); - - size_t maxNrThreads; - getWorkGroupInfo(queue.getInfo<CL_QUEUE_DEVICE>(), CL_KERNEL_WORK_GROUP_SIZE, &maxNrThreads); - unsigned fftSize = ps.dedispersionFFTsize(); - - globalWorkSize = cl::NDRange(fftSize, ps.nrSamplesPerChannel() / fftSize, ps.nrChannelsPerSubband()); - //std::cout << "globalWorkSize = NDRange(" << fftSize << ", " << ps.nrSamplesPerChannel() / fftSize << ", " << ps.nrChannelsPerSubband() << ')' << std::endl; - - if (fftSize <= maxNrThreads) { - localWorkSize = cl::NDRange(fftSize, 1, maxNrThreads / fftSize); - //std::cout << "localWorkSize = NDRange(" << fftSize << ", 1, " << maxNrThreads / fftSize << ')' << std::endl; - } else { - unsigned divisor; - - for (divisor = 1; fftSize / divisor > maxNrThreads || fftSize % divisor != 0; divisor++) - ; - - localWorkSize = cl::NDRange(fftSize / divisor, 1, 1); - //std::cout << "localWorkSize = NDRange(" << fftSize / divisor << ", 1, 1))" << std::endl; - } - - nrOperations = (size_t) NR_POLARIZATIONS * ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() * (9 * ps.nrTABs(0) + 17), - nrBytesRead = nrBytesWritten = sizeof(std::complex<float>) * ps.nrTABs(0) * NR_POLARIZATIONS * ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel(); - } - - void DedispersionChirpKernel::enqueue(cl::CommandQueue &queue, PerformanceCounter &counter, double subbandFrequency) - { - setArg(2, (float) subbandFrequency); - Kernel::enqueue(queue, counter); - } - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionChirpKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionChirpKernel.h deleted file mode 100644 index f5c520a29a422ccab9e3d96cebcf7e0f1e9f476a..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionChirpKernel.h +++ /dev/null @@ -1,49 +0,0 @@ -//# DedispersionChirpKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_DEDISPERSION_CHIRP_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_DEDISPERSION_CHIRP_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> -#include <GPUProc/PerformanceCounter.h> - -namespace LOFAR -{ - namespace Cobalt - { - - class DedispersionChirpKernel : public Kernel - { - public: - DedispersionChirpKernel(const Parset &ps, cl::Program &program, - cl::CommandQueue &queue, cl::Buffer &buffer, cl::Buffer &DMs); - - void enqueue(cl::CommandQueue &queue, PerformanceCounter &counter, double subbandFrequency); - - }; - - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionForwardFFTkernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionForwardFFTkernel.cc deleted file mode 100644 index 4c71c180fb009567a29fadb56a8df3e5021d8ea4..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionForwardFFTkernel.cc +++ /dev/null @@ -1,43 +0,0 @@ -//# DedispersionForwardFFTkernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "DedispersionForwardFFTkernel.h" - -#include <Common/LofarLogger.h> - -#include <GPUProc/global_defines.h> -#include "FFT_Kernel.h" - -namespace LOFAR -{ - namespace Cobalt - { - DedispersionForwardFFTkernel::DedispersionForwardFFTkernel(const Parset &ps, cl::Context &context, cl::Buffer &buffer) - : - FFT_Kernel(context, ps.dedispersionFFTsize(), ps.nrTABs(0) * NR_POLARIZATIONS * ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() / ps.dedispersionFFTsize(), true, buffer) - { - ASSERT(ps.nrSamplesPerChannel() % ps.dedispersionFFTsize() == 0); - } - } - -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionForwardFFTkernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionForwardFFTkernel.h deleted file mode 100644 index d54c43e9b1ed755ec404f7ec58f88320967c446e..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DedispersionForwardFFTkernel.h +++ /dev/null @@ -1,42 +0,0 @@ -//# DedispersionForwardFFTkernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_DEDISPERSION_FORWARD_FFTKERNEL_H -#define LOFAR_GPUPROC_OPENCL_DEDISPERSION_FORWARD_FFTKERNEL_H - -#include <CoInterface/Parset.h> - -#include "FFT_Kernel.h" - -namespace LOFAR -{ - namespace Cobalt - { - class DedispersionForwardFFTkernel : public FFT_Kernel - { - public: - DedispersionForwardFFTkernel(const Parset &ps, cl::Context &context, cl::Buffer &buffer); - - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DelayAndBandPassKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DelayAndBandPassKernel.cc deleted file mode 100644 index 18d1fdaa69170c80753f9446b26944f8fc9b2e1e..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DelayAndBandPassKernel.cc +++ /dev/null @@ -1,99 +0,0 @@ -//# DelayAndBandPassKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "DelayAndBandPassKernel.h" - -#include <Common/lofar_complex.h> -#include <Common/LofarLogger.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - DelayAndBandPassKernel::DelayAndBandPassKernel(const Parset &ps, cl::Program &program, - cl::Buffer &devCorrectedData, cl::Buffer &devFilteredData, - cl::Buffer &devDelaysAtBegin, cl::Buffer &devDelaysAfterEnd, - cl::Buffer &devPhaseOffsets, cl::Buffer &devBandPassCorrectionWeights) - : - Kernel(ps, program, "applyDelaysAndCorrectBandPass") - { - ASSERT(ps.nrChannelsPerSubband() % 16 == 0 || ps.nrChannelsPerSubband() == 1); - ASSERT(ps.nrSamplesPerChannel() % 16 == 0); - - setArg(0, devCorrectedData); - setArg(1, devFilteredData); - setArg(4, devDelaysAtBegin); - setArg(5, devDelaysAfterEnd); - setArg(6, devPhaseOffsets); - setArg(7, devBandPassCorrectionWeights); - - globalWorkSize = cl::NDRange(256, ps.nrChannelsPerSubband() == 1 ? 1 : ps.nrChannelsPerSubband() / 16, ps.settings.antennaFields.size()); - localWorkSize = cl::NDRange(256, 1, 1); - - size_t nrSamples = ps.settings.antennaFields.size() * ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() * NR_POLARIZATIONS; - nrOperations = nrSamples * 12; - nrBytesRead = nrBytesWritten = nrSamples * sizeof(std::complex<float>); - } - - void DelayAndBandPassKernel::enqueue(cl::CommandQueue &queue, PerformanceCounter &counter, unsigned subband) - { - setArg(2, (float) ps.subbandToFrequencyMapping()[subband]); - setArg(3, 0); // beam - Kernel::enqueue(queue, counter); - } - - size_t - DelayAndBandPassKernel::bufferSize(const Parset& ps, BufferType bufferType) - { - switch (bufferType) { - case INPUT_DATA: - if (ps.nrChannelsPerSubband() == 1) - return - ps.settings.antennaFields.size() * NR_POLARIZATIONS * - ps.nrSamplesPerSubband() * ps.nrBytesPerComplexSample(); - else - return - ps.settings.antennaFields.size() * NR_POLARIZATIONS * - ps.nrSamplesPerSubband() * sizeof(std::complex<float>); - case OUTPUT_DATA: - return - ps.settings.antennaFields.size() * NR_POLARIZATIONS * - ps.nrSamplesPerSubband() * sizeof(std::complex<float>); - case DELAYS: - return - ps.nrBeams() * ps.settings.antennaFields.size() * NR_POLARIZATIONS * sizeof(float); - case PHASE_OFFSETS: - return - ps.settings.antennaFields.size() * NR_POLARIZATIONS * sizeof(float); - case BAND_PASS_CORRECTION_WEIGHTS: - return - ps.nrChannelsPerSubband() * sizeof(float); - default: - THROW(GPUProcException, "Invalid bufferType (" << bufferType << ")"); - } - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DelayAndBandPassKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DelayAndBandPassKernel.h deleted file mode 100644 index a4b8df2d44d7b754b077296391fba89357eba688..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/DelayAndBandPassKernel.h +++ /dev/null @@ -1,68 +0,0 @@ -//# DelayAndBandPassKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_DELAY_AND_BAND_PASS_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_DELAY_AND_BAND_PASS_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> -#include <GPUProc/PerformanceCounter.h> - -namespace LOFAR -{ - namespace Cobalt - { - - class DelayAndBandPassKernel : public Kernel - { - public: - DelayAndBandPassKernel(const Parset &ps, - cl::Program &program, - cl::Buffer &devCorrectedData, - cl::Buffer &devFilteredData, - cl::Buffer &devDelaysAtBegin, - cl::Buffer &devDelaysAfterEnd, - cl::Buffer &devPhaseOffsets, - cl::Buffer &devBandPassCorrectionWeights); - - void enqueue(cl::CommandQueue &queue, - PerformanceCounter &counter, - unsigned subband); - - enum BufferType - { - INPUT_DATA, - OUTPUT_DATA, - DELAYS, - PHASE_OFFSETS, - BAND_PASS_CORRECTION_WEIGHTS - }; - - // Return required buffer size for \a bufferType - static size_t bufferSize(const Parset& ps, BufferType bufferType); - - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Kernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Kernel.cc deleted file mode 100644 index 6cdadd3dfb6763be73ee9876528ca3e6bf655e60..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Kernel.cc +++ /dev/null @@ -1,88 +0,0 @@ -//# FFT_Kernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include <vector> - -#include <Common/LofarLogger.h> -#include <GPUProc/global_defines.h> - -#include "FFT_Kernel.h" - -namespace LOFAR -{ - namespace Cobalt - { - - FFT_Kernel::FFT_Kernel(cl::Context &context, unsigned fftSize, unsigned nrFFTs, bool forward, cl::Buffer &buffer) - : - nrFFTs(nrFFTs), - fftSize(fftSize) -#if defined USE_CUSTOM_FFT - { - ASSERT(fftSize == 256); - ASSERT(forward); - std::vector<cl::Device> devices = context.getInfo<CL_CONTEXT_DEVICES>(); - cl::Program program = createProgram(context, devices, "FFT.cl", ""); - kernel = cl::Kernel(program, "fft0"); - kernel.setArg(0, buffer); - } -#else - , direction(forward ? clFFT_Forward : clFFT_Inverse), - plan(context, fftSize), - buffer(buffer) - { - } -#endif - - void FFT_Kernel::enqueue(cl::CommandQueue &queue, PerformanceCounter &counter) - { -#if defined USE_CUSTOM_FFT - queue.enqueueNDRangeKernel(kernel, cl::NullRange, cl::NDRange(nrFFTs * 64 / 4, 4), cl::NDRange(64, 4), 0, &event); -#else - cl_int error = clFFT_ExecuteInterleaved(queue(), plan.plan, nrFFTs, direction, buffer(), buffer(), 0, 0, &event()); - - if (error != CL_SUCCESS) - throw cl::Error(error, "clFFT_ExecuteInterleaved"); -#endif - - counter.doOperation(event, - (size_t) nrFFTs * 5 * fftSize * log2(fftSize), - (size_t) nrFFTs * fftSize * sizeof(std::complex<float>), - (size_t) nrFFTs * fftSize * sizeof(std::complex<float>)); - } - - size_t FFT_Kernel::bufferSize(const Parset& ps, BufferType bufferType) - { - switch (bufferType) { - case INPUT_DATA: - case OUTPUT_DATA: - return - ps.settings.antennaFields.size() * NR_POLARIZATIONS * - ps.nrSamplesPerSubband() * sizeof(std::complex<float>); - default: - THROW(GPUProcException, "Invalid bufferType (" << bufferType << ")"); - } - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Kernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Kernel.h deleted file mode 100644 index 833323ad6ff0fe4b8e25c59be928a71544a9d22b..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Kernel.h +++ /dev/null @@ -1,66 +0,0 @@ -//# FFT_Kernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_FFT_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_FFT_KERNEL_H - -#include <CoInterface/Parset.h> - -#include <GPUProc/gpu_incl.h> -#include <GPUProc/PerformanceCounter.h> -#include "FFT_Plan.h" - -namespace LOFAR -{ - namespace Cobalt - { - class FFT_Kernel - { - public: - FFT_Kernel(cl::Context &context, unsigned fftSize, - unsigned nrFFTs, bool forward, cl::Buffer &buffer); - - void enqueue(cl::CommandQueue &queue, PerformanceCounter &counter); - - enum BufferType - { - INPUT_DATA, - OUTPUT_DATA - }; - - // Return required buffer size for \a bufferType - static size_t bufferSize(const Parset& ps, BufferType bufferType); - - private: - unsigned nrFFTs, fftSize; -#if defined USE_CUSTOM_FFT - cl::Kernel kernel; -#else - clFFT_Direction direction; - FFT_Plan plan; - cl::Buffer &buffer; -#endif - cl::Event event; - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Plan.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Plan.cc deleted file mode 100644 index 796bce3d37c5eb9d638c8d048e66c1e77038a6a5..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Plan.cc +++ /dev/null @@ -1,49 +0,0 @@ -//# FFT_Plan.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "FFT_Plan.h" - -namespace LOFAR -{ - namespace Cobalt - { - FFT_Plan::FFT_Plan(cl::Context &context, unsigned fftSize) - { - clFFT_Dim3 dim = { fftSize, 1, 1 }; - cl_int error; - plan = clFFT_CreatePlan(context(), dim, clFFT_1D, clFFT_InterleavedComplexFormat, &error); - - if (error != CL_SUCCESS) - throw cl::Error(error, "clFFT_CreatePlan"); - - //clFFT_DumpPlan(plan, stdout); - } - - FFT_Plan::~FFT_Plan() - { - clFFT_DestroyPlan(plan); - } - - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Plan.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Plan.h deleted file mode 100644 index c92990ede004ca89d01fd6077db0963a353c12ef..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FFT_Plan.h +++ /dev/null @@ -1,45 +0,0 @@ -//# FFT_Plan.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_FFT_PLAN_H -#define LOFAR_GPUPROC_OPENCL_FFT_PLAN_H - -#include <CoInterface/Parset.h> - -#include <GPUProc/gpu_incl.h> -#include <OpenCL_FFT/clFFT.h> - -namespace LOFAR -{ - namespace Cobalt - { - - class FFT_Plan - { - public: - FFT_Plan(cl::Context &context, unsigned fftSize); - ~FFT_Plan(); - clFFT_Plan plan; - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FIR_FilterKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FIR_FilterKernel.cc deleted file mode 100644 index 668cc39b7ecb2cb2360ebc9332a010f55681e800..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FIR_FilterKernel.cc +++ /dev/null @@ -1,75 +0,0 @@ -//# FIR_FilterKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "FIR_FilterKernel.h" - -#include <Common/lofar_complex.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - FIR_FilterKernel::FIR_FilterKernel(const Parset &ps, cl::CommandQueue &queue, cl::Program &program, cl::Buffer &devFilteredData, cl::Buffer &devInputSamples, cl::Buffer &devFIRweights) - : - Kernel(ps, program, "FIR_filter") - { - setArg(0, devFilteredData); - setArg(1, devInputSamples); - setArg(2, devFIRweights); - - size_t maxNrThreads; - getWorkGroupInfo(queue.getInfo<CL_QUEUE_DEVICE>(), CL_KERNEL_WORK_GROUP_SIZE, &maxNrThreads); - unsigned totalNrThreads = ps.nrChannelsPerSubband() * NR_POLARIZATIONS * 2; - unsigned nrPasses = (totalNrThreads + maxNrThreads - 1) / maxNrThreads; - globalWorkSize = cl::NDRange(totalNrThreads, ps.settings.antennaFields.size()); - localWorkSize = cl::NDRange(totalNrThreads / nrPasses, 1); - - size_t nrSamples = (size_t) ps.settings.antennaFields.size() * ps.nrChannelsPerSubband() * NR_POLARIZATIONS; - nrOperations = nrSamples * ps.nrSamplesPerChannel() * NR_TAPS * 2 * 2; - nrBytesRead = nrSamples * (NR_TAPS - 1 + ps.nrSamplesPerChannel()) * ps.nrBytesPerComplexSample(); - nrBytesWritten = nrSamples * ps.nrSamplesPerChannel() * sizeof(std::complex<float>); - } - - size_t FIR_FilterKernel::bufferSize(const Parset& ps, BufferType bufferType) - { - switch (bufferType) { - case INPUT_DATA: - return - (ps.nrHistorySamples() + ps.nrSamplesPerSubband()) * - ps.settings.antennaFields.size() * NR_POLARIZATIONS * ps.nrBytesPerComplexSample(); - case OUTPUT_DATA: - return - ps.nrSamplesPerSubband() * ps.settings.antennaFields.size() * - NR_POLARIZATIONS * sizeof(std::complex<float>); - case FILTER_WEIGHTS: - return - ps.nrChannelsPerSubband() * NR_TAPS * sizeof(float); - default: - THROW(GPUProcException, "Invalid bufferType (" << bufferType << ")"); - } - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FIR_FilterKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FIR_FilterKernel.h deleted file mode 100644 index aa016ab51a1e1a8d71020842e5126961740152ed..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/FIR_FilterKernel.h +++ /dev/null @@ -1,59 +0,0 @@ -//# FIR_FilterKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_FIR_FILTER_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_FIR_FILTER_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - class FIR_FilterKernel : public Kernel - { - public: - FIR_FilterKernel(const Parset &ps, - cl::CommandQueue &queue, - cl::Program &program, - cl::Buffer &devFilteredData, - cl::Buffer &devInputSamples, - cl::Buffer &devFIRweights); - - enum BufferType - { - INPUT_DATA, - OUTPUT_DATA, - FILTER_WEIGHTS - }; - - // Return required buffer size for \a bufferType - static size_t bufferSize(const Parset& ps, BufferType bufferType); - - - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Filter_FFT_Kernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Filter_FFT_Kernel.cc deleted file mode 100644 index 37820f4bbe2c84de2f19e2df82c4104d19884c7d..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Filter_FFT_Kernel.cc +++ /dev/null @@ -1,39 +0,0 @@ -//# Filter_FFT_Kernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "Filter_FFT_Kernel.h" - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - Filter_FFT_Kernel::Filter_FFT_Kernel(const Parset &ps, cl::Context &context, cl::Buffer &devFilteredData) - : - FFT_Kernel(context, ps.nrChannelsPerSubband(), ps.settings.antennaFields.size() * NR_POLARIZATIONS * ps.nrSamplesPerChannel(), true, devFilteredData) - { - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Filter_FFT_Kernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Filter_FFT_Kernel.h deleted file mode 100644 index 05b8d1711880c0dc16bd37e716f6f1d2a11e6f8b..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Filter_FFT_Kernel.h +++ /dev/null @@ -1,45 +0,0 @@ -//# Filter_FFT_Kernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_FILTER_FFT_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_FILTER_FFT_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "FFT_Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - class Filter_FFT_Kernel : public FFT_Kernel - { - public: - Filter_FFT_Kernel(const Parset &ps, cl::Context &context, - cl::Buffer &devFilteredData); - - }; - - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IncoherentStokesKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IncoherentStokesKernel.cc deleted file mode 100644 index b997f6343cc7e2725a95fba9b56bf3e39e7aedc0..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IncoherentStokesKernel.cc +++ /dev/null @@ -1,56 +0,0 @@ -//# IncoherentStokesKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "IncoherentStokesKernel.h" - -#include <Common/lofar_complex.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - IncoherentStokesKernel::IncoherentStokesKernel(const Parset &ps, cl::CommandQueue &queue, - cl::Program &program, cl::Buffer &devIncoherentStokes, cl::Buffer &devInputSamples) - : - Kernel(ps, program, "incoherentStokes") - { - setArg(0, devIncoherentStokes); - setArg(1, devInputSamples); - - unsigned nrTimes = ps.nrSamplesPerChannel() / ps.incoherentStokesTimeIntegrationFactor(); - size_t maxNrThreads; - getWorkGroupInfo(queue.getInfo<CL_QUEUE_DEVICE>(), CL_KERNEL_WORK_GROUP_SIZE, &maxNrThreads); - unsigned nrPasses = (nrTimes + maxNrThreads - 1) / maxNrThreads; - unsigned nrTimesPerPass = (nrTimes + nrPasses - 1) / nrPasses; - globalWorkSize = cl::NDRange(nrTimesPerPass * nrPasses, ps.nrChannelsPerSubband()); - localWorkSize = cl::NDRange(nrTimesPerPass, 1); - - nrOperations = ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() * ps.settings.antennaFields.size() * (ps.nrIncoherentStokes() == 1 ? 8 : 20 + 2.0 / ps.incoherentStokesTimeIntegrationFactor()); - nrBytesRead = (size_t) ps.settings.antennaFields.size() * ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() * NR_POLARIZATIONS * sizeof(std::complex<float>); - nrBytesWritten = (size_t) ps.nrIncoherentStokes() * nrTimes * ps.nrChannelsPerSubband() * sizeof(float); - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IncoherentStokesKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IncoherentStokesKernel.h deleted file mode 100644 index e7317addbc0479e29a051175aa02e62224a5598c..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IncoherentStokesKernel.h +++ /dev/null @@ -1,45 +0,0 @@ -//# IncoherentStokesKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_INCOHERENT_STOKES_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_INCOHERENT_STOKES_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - - class IncoherentStokesKernel : public Kernel - { - public: - IncoherentStokesKernel(const Parset &ps, cl::CommandQueue &queue, cl::Program &program, - cl::Buffer &devIncoherentStokes, cl::Buffer &devInputSamples); - }; - - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IntToFloatKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IntToFloatKernel.cc deleted file mode 100644 index 33a33aa7a44e37694916ff04d767c5f49d3564d4..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IntToFloatKernel.cc +++ /dev/null @@ -1,54 +0,0 @@ -//# IntToFloatKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "IntToFloatKernel.h" - -#include <Common/lofar_complex.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - IntToFloatKernel::IntToFloatKernel(const Parset &ps, cl::CommandQueue &queue, cl::Program &program, cl::Buffer &devFilteredData, cl::Buffer &devInputSamples) - : - Kernel(ps, program, "intToFloat") - { - setArg(0, devFilteredData); - setArg(1, devInputSamples); - - size_t maxNrThreads; - getWorkGroupInfo(queue.getInfo<CL_QUEUE_DEVICE>(), CL_KERNEL_WORK_GROUP_SIZE, &maxNrThreads); - globalWorkSize = cl::NDRange(maxNrThreads, ps.settings.antennaFields.size()); - localWorkSize = cl::NDRange(maxNrThreads, 1); - - size_t nrSamples = ps.settings.antennaFields.size() * ps.nrSamplesPerChannel() * ps.nrChannelsPerSubband() * NR_POLARIZATIONS; - nrOperations = nrSamples * 2; - nrBytesRead = nrSamples * 2 * ps.nrBitsPerSample() / 8; - nrBytesWritten = nrSamples * sizeof(std::complex<float>); - } - - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IntToFloatKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IntToFloatKernel.h deleted file mode 100644 index d3412ab9209cf9330ca5a0cea671229035cb35de..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/IntToFloatKernel.h +++ /dev/null @@ -1,44 +0,0 @@ -//# IntToFloatKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_INT_TO_FLOAT_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_INT_TO_FLOAT_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - class IntToFloatKernel : public Kernel - { - public: - IntToFloatKernel(const Parset &ps, cl::CommandQueue &queue, cl::Program &program, - cl::Buffer &devFilteredData, cl::Buffer &devInputSamples); - }; - } - -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Kernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Kernel.cc deleted file mode 100644 index decb888c853c8406e5249de52ba27572020aabe5..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Kernel.cc +++ /dev/null @@ -1,53 +0,0 @@ -//# Kernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "Kernel.h" - -namespace LOFAR -{ - namespace Cobalt - { - Kernel::Kernel(const Parset &ps, cl::Program &program, const char *name) - : - cl::Kernel(program, name), - ps(ps) - { - } - - void Kernel::enqueue(cl::CommandQueue &queue, PerformanceCounter &counter) - { - // AMD complains if we submit 0-sized work - for (unsigned dim = 0; dim < globalWorkSize.dimensions(); dim++) - if (globalWorkSize[dim] == 0) - return; - - queue.enqueueNDRangeKernel(*this, - cl::NullRange, - globalWorkSize, - localWorkSize, - 0, - &event); - counter.doOperation(event, nrOperations, nrBytesRead, nrBytesWritten); - } - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Kernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Kernel.h deleted file mode 100644 index 5cf6b0b50c01354b09f8be16ee74513d2e553107..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/Kernel.h +++ /dev/null @@ -1,50 +0,0 @@ -//# Kernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_KERNEL_H - -#include <CoInterface/Parset.h> - -#include <GPUProc/gpu_incl.h> -#include <GPUProc/PerformanceCounter.h> - -namespace LOFAR -{ - namespace Cobalt - { - class Kernel : public cl::Kernel - { - public: - Kernel(const Parset &ps, cl::Program &program, const char *name); - - void enqueue(cl::CommandQueue &queue, PerformanceCounter &counter); - - protected: - cl::Event event; - const Parset &ps; - cl::NDRange globalWorkSize, localWorkSize; - size_t nrOperations, nrBytesRead, nrBytesWritten; - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_BeamFormerKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_BeamFormerKernel.cc deleted file mode 100644 index bd70925c2573c1e688009ec0cf021d648c271929..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_BeamFormerKernel.cc +++ /dev/null @@ -1,75 +0,0 @@ -//# UHEP_BeamFormerKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "UHEP_BeamFormerKernel.h" - -#include <algorithm> - -#include <Common/lofar_complex.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - UHEP_BeamFormerKernel::UHEP_BeamFormerKernel(const Parset &ps, cl::Program &program, cl::Buffer &devComplexVoltages, cl::Buffer &devInputSamples, cl::Buffer &devBeamFormerWeights) - : - Kernel(ps, program, "complexVoltages") - { - setArg(0, devComplexVoltages); - setArg(1, devInputSamples); - setArg(2, devBeamFormerWeights); - -#if 1 - globalWorkSize = cl::NDRange(NR_POLARIZATIONS, ps.nrTABs(0), ps.nrSubbands()); - localWorkSize = cl::NDRange(NR_POLARIZATIONS, ps.nrTABs(0), 1); - - size_t count = ps.nrSubbands() * (ps.nrSamplesPerChannel() + NR_STATION_FILTER_TAPS - 1) * NR_POLARIZATIONS; - size_t nrWeightsBytes = ps.settings.antennaFields.size() * ps.nrTABs(0) * ps.nrSubbands() * NR_POLARIZATIONS * sizeof(std::complex<float>); - size_t nrSampleBytes = count * ps.settings.antennaFields.size() * ps.nrBytesPerComplexSample(); - size_t nrComplexVoltagesBytesPerPass = count * ps.nrTABs(0) * sizeof(std::complex<float>); - unsigned nrPasses = std::max((ps.settings.antennaFields.size() + 6) / 16, 1U); - nrOperations = count * ps.settings.antennaFields.size() * ps.nrTABs(0) * 8; - nrBytesRead = nrWeightsBytes + nrSampleBytes + (nrPasses - 1) * nrComplexVoltagesBytesPerPass; - nrBytesWritten = nrPasses * nrComplexVoltagesBytesPerPass; -#else - ASSERT(ps.nrTABs(0) % 3 == 0); - ASSERT(ps.settings.antennaFields.size() % 6 == 0); - unsigned nrThreads = NR_POLARIZATIONS * (ps.nrTABs(0) / 3) * (ps.settings.antennaFields.size() / 6); - globalWorkSize = cl::NDRange(nrThreads, ps.nrSubbands()); - localWorkSize = cl::NDRange(nrThreads, 1); - //globalWorkSize = cl::NDRange(ps.settings.antennaFields.size() / 6, ps.nrTABs(0) / 3, ps.nrSubbands()); - //localWorkSize = cl::NDRange(ps.settings.antennaFields.size() / 6, ps.nrTABs(0) / 3, 1); - - size_t count = ps.nrSubbands() * (ps.nrSamplesPerChannel() + NR_STATION_FILTER_TAPS - 1) * NR_POLARIZATIONS; - size_t nrWeightsBytes = ps.settings.antennaFields.size() * ps.nrTABs(0) * ps.nrSubbands() * NR_POLARIZATIONS * sizeof(std::complex<float>); - size_t nrSampleBytes = count * ps.settings.antennaFields.size() * ps.nrBytesPerComplexSample(); - size_t nrComplexVoltagesBytes = count * ps.nrTABs(0) * sizeof(std::complex<float>); - nrOperations = count * ps.settings.antennaFields.size() * ps.nrTABs(0) * 8; - nrBytesRead = nrWeightsBytes + nrSampleBytes; - nrBytesWritten = nrComplexVoltagesBytes; -#endif - } - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_BeamFormerKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_BeamFormerKernel.h deleted file mode 100644 index 3caffa7aa14a7fc61bfcf49418594fbe6ad45e1f..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_BeamFormerKernel.h +++ /dev/null @@ -1,43 +0,0 @@ -//# UHEP_BeamFormerKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_UHEP_BEAM_FORMER_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_UHEP_BEAM_FORMER_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - class UHEP_BeamFormerKernel : public Kernel - { - public: - UHEP_BeamFormerKernel(const Parset &ps, cl::Program &program, - cl::Buffer &devComplexVoltages, cl::Buffer &devInputSamples, cl::Buffer &devBeamFormerWeights); - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFFT_Kernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFFT_Kernel.cc deleted file mode 100644 index 76352a74e9f05d9d58ad75529b42e988f4ff5c57..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFFT_Kernel.cc +++ /dev/null @@ -1,51 +0,0 @@ -//# UHEP_InvFFT_Kernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "UHEP_InvFFT_Kernel.h" - -#include <Common/lofar_complex.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - UHEP_InvFFT_Kernel::UHEP_InvFFT_Kernel(const Parset &ps, cl::Program &program, cl::Buffer &devFFTedData) - : - Kernel(ps, program, "inv_fft") - { - setArg(0, devFFTedData); - setArg(1, devFFTedData); - - globalWorkSize = cl::NDRange(128, ps.nrTABs(0) * NR_POLARIZATIONS * ps.nrSamplesPerChannel()); - localWorkSize = cl::NDRange(128, 1); - - size_t nrFFTs = (size_t) ps.nrTABs(0) * NR_POLARIZATIONS * (ps.nrSamplesPerChannel() + NR_STATION_FILTER_TAPS - 1); - nrOperations = nrFFTs * 5 * 1024 * 10; - nrBytesRead = nrFFTs * 512 * sizeof(std::complex<float>); - nrBytesWritten = nrFFTs * 1024 * sizeof(float); - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFFT_Kernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFFT_Kernel.h deleted file mode 100644 index 247290d851ddea6dca4a1796f4465efc6994b040..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFFT_Kernel.h +++ /dev/null @@ -1,43 +0,0 @@ -//# UHEP_InvFFT_Kernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_UHEP_INV_FFT_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_UHEP_INV_FFT_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - class UHEP_InvFFT_Kernel : public Kernel - { - public: - UHEP_InvFFT_Kernel(const Parset &ps, cl::Program &program, cl::Buffer &devFFTedData); - - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFIR_Kernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFIR_Kernel.cc deleted file mode 100644 index d324b66914bcfb770e56e3c90c4b6321a9d73994..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFIR_Kernel.cc +++ /dev/null @@ -1,57 +0,0 @@ -//# UHEP_InvFIR_Kernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "UHEP_InvFIR_Kernel.h" - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - UHEP_InvFIR_Kernel::UHEP_InvFIR_Kernel(const Parset &ps, cl::CommandQueue &queue, - cl::Program &program, cl::Buffer &devInvFIRfilteredData, cl::Buffer &devFFTedData, - cl::Buffer &devInvFIRfilterWeights) - : - Kernel(ps, program, "invFIRfilter") - { - setArg(0, devInvFIRfilteredData); - setArg(1, devFFTedData); - setArg(2, devInvFIRfilterWeights); - - size_t maxNrThreads, nrThreads; - getWorkGroupInfo(queue.getInfo<CL_QUEUE_DEVICE>(), CL_KERNEL_WORK_GROUP_SIZE, &maxNrThreads); - // round down to nearest power of two - for (nrThreads = 1024; nrThreads > maxNrThreads; nrThreads /= 2) - ; - - globalWorkSize = cl::NDRange(1024, NR_POLARIZATIONS, ps.nrTABs(0)); - localWorkSize = cl::NDRange(nrThreads, 1, 1); - - size_t count = ps.nrTABs(0) * NR_POLARIZATIONS * 1024; - nrOperations = count * ps.nrSamplesPerChannel() * NR_STATION_FILTER_TAPS * 2; - nrBytesRead = count * (ps.nrSamplesPerChannel() + NR_STATION_FILTER_TAPS - 1) * sizeof(float); - nrBytesWritten = count * ps.nrSamplesPerChannel() * sizeof(float); - } - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFIR_Kernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFIR_Kernel.h deleted file mode 100644 index 327714ade26503b181452942fd50cd7f8b64e0c7..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_InvFIR_Kernel.h +++ /dev/null @@ -1,45 +0,0 @@ -//# UHEP_InvFIR_Kernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_UHEP_INV_FIR_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_UHEP_INV_FIR_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - class UHEP_InvFIR_Kernel : public Kernel - { - public: - UHEP_InvFIR_Kernel(const Parset &ps, cl::CommandQueue &queue, - cl::Program &program, cl::Buffer &devInvFIRfilteredData, - cl::Buffer &devFFTedData, cl::Buffer &devInvFIRfilterWeights); - }; - - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TransposeKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TransposeKernel.cc deleted file mode 100644 index cad70527749397b2e3af4ddf42fed769370b7984..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TransposeKernel.cc +++ /dev/null @@ -1,52 +0,0 @@ -//# UHEP_TransposeKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "UHEP_TransposeKernel.h" - -#include <Common/lofar_complex.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - UHEP_TransposeKernel::UHEP_TransposeKernel(const Parset &ps, cl::Program &program, cl::Buffer &devFFTedData, cl::Buffer &devComplexVoltages, cl::Buffer &devReverseSubbandMapping) - : - Kernel(ps, program, "UHEP_Transpose") - { - setArg(0, devFFTedData); - setArg(1, devComplexVoltages); - setArg(2, devReverseSubbandMapping); - - globalWorkSize = cl::NDRange(256, (ps.nrTABs(0) + 15) / 16, 512 / 16); - localWorkSize = cl::NDRange(256, 1, 1); - - nrOperations = 0; - nrBytesRead = (size_t) ps.nrSubbands() * (ps.nrSamplesPerChannel() + NR_STATION_FILTER_TAPS - 1) * ps.nrTABs(0) * NR_POLARIZATIONS * sizeof(std::complex<float>); - nrBytesWritten = (size_t) ps.nrTABs(0) * NR_POLARIZATIONS * (ps.nrSamplesPerChannel() + NR_STATION_FILTER_TAPS - 1) * 512 * sizeof(std::complex<float>); - } - - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TransposeKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TransposeKernel.h deleted file mode 100644 index 9469184a29ef04250fb76235c19c12cdc60ceec8..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TransposeKernel.h +++ /dev/null @@ -1,44 +0,0 @@ -//# UHEP_TransposeKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_UHEP_TRANSPOSE_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_UHEP_TRANSPOSE_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - class UHEP_TransposeKernel : public Kernel - { - public: - UHEP_TransposeKernel(const Parset &ps, cl::Program &program, - cl::Buffer &devFFTedData, cl::Buffer &devComplexVoltages, cl::Buffer &devReverseSubbandMapping); - }; - - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TriggerKernel.cc b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TriggerKernel.cc deleted file mode 100644 index 0305164f9a1f8c9f8c3f75cfcc22b6e02cef67e4..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TriggerKernel.cc +++ /dev/null @@ -1,48 +0,0 @@ -//# UHEP_TriggerKernel.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "UHEP_TriggerKernel.h" - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - UHEP_TriggerKernel::UHEP_TriggerKernel(const Parset &ps, cl::Program &program, cl::Buffer &devTriggerInfo, cl::Buffer &devInvFIRfilteredData) - : - Kernel(ps, program, "trigger") - { - setArg(0, devTriggerInfo); - setArg(1, devInvFIRfilteredData); - - globalWorkSize = cl::NDRange(16, 16, ps.nrTABs(0)); - localWorkSize = cl::NDRange(16, 16, 1); - - nrOperations = (size_t) ps.nrTABs(0) * ps.nrSamplesPerChannel() * 1024 * (3 /* power */ + 2 /* window */ + 1 /* max */ + 7 /* mean/variance */); - nrBytesRead = (size_t) ps.nrTABs(0) * NR_POLARIZATIONS * ps.nrSamplesPerChannel() * 1024 * sizeof(float); - nrBytesWritten = (size_t) ps.nrTABs(0) * sizeof(TriggerInfo); - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TriggerKernel.h b/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TriggerKernel.h deleted file mode 100644 index bc7b031c6a0eb9272122ebc2120572543b54e6c7..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Kernels/UHEP_TriggerKernel.h +++ /dev/null @@ -1,52 +0,0 @@ -//# UHEP_TriggerKernel.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_UHEP_TRIGGER_KERNEL_H -#define LOFAR_GPUPROC_OPENCL_UHEP_TRIGGER_KERNEL_H - -#include <CoInterface/Parset.h> - -#include "Kernel.h" -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - - - struct TriggerInfo { - float mean, variance, bestValue; - unsigned bestApproxIndex; - }; - - class UHEP_TriggerKernel : public Kernel - { - public: - UHEP_TriggerKernel(const Parset &ps, cl::Program &program, - cl::Buffer &devTriggerInfo, cl::Buffer &devInvFIRfilteredData); - - }; - - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/MultiDimArrayHostBuffer.h b/RTCP/Cobalt/GPUProc/src/opencl/MultiDimArrayHostBuffer.h deleted file mode 100644 index 41d48185c8c925545bc37f86a8588ebb1e39a2a7..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/MultiDimArrayHostBuffer.h +++ /dev/null @@ -1,188 +0,0 @@ -//# MultiDimArrayHostBuffer.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_MULTI_DIM_ARRAY_HOST_BUFFER_H -#define LOFAR_GPUPROC_OPENCL_MULTI_DIM_ARRAY_HOST_BUFFER_H - -#include <CoInterface/Allocator.h> -#include <CoInterface/MultiDimArray.h> - -#include "gpu_incl.h" - -namespace LOFAR -{ - namespace Cobalt - { - - // A buffer on the GPU (device), to which CPU (host) buffers can be attached. - class DeviceBuffer - { - public: - DeviceBuffer( cl::CommandQueue &queue, cl_mem_flags flags, size_t size ) - : - size(size), - queue(queue), - flags(flags), - buffer(queue.getInfo<CL_QUEUE_CONTEXT>(), flags | CL_MEM_ALLOC_HOST_PTR, size) - { - } - - const size_t size; - cl::CommandQueue &queue; - const cl_mem_flags flags; - cl::Buffer buffer; - - // Stores transfer information - cl::Event event; - - operator cl::Buffer & () - { - return buffer; - } - - // Copies data to the GPU - void hostToDevice(void *ptr, size_t size, bool synchronous = false) - { - ASSERT(size <= this->size); - - queue.enqueueWriteBuffer(buffer, synchronous ? CL_TRUE : CL_FALSE, 0, size, ptr, 0, &event); - } - - // Copies data from the GPU - void deviceToHost(void *ptr, size_t size, bool synchronous = false) - { - ASSERT(size <= this->size); - - queue.enqueueReadBuffer(buffer, synchronous ? CL_TRUE : CL_FALSE, 0, size, ptr, 0, &event); - } - - // Allocates a buffer for transfer with the GPU - void *allocateHostBuffer( size_t size, cl_mem_flags hostBufferFlags = CL_MEM_READ_WRITE ) - { - ASSERT(size <= this->size); - - return queue.enqueueMapBuffer(buffer, CL_TRUE, map_flags(hostBufferFlags), 0, size); - } - - // Deallocates a buffer for transfer with the GPU - void deallocateHostBuffer( void *ptr ) - { - queue.enqueueUnmapMemObject(buffer, ptr); - } - - private: - // Can't copy cl::Buffer - DeviceBuffer(const DeviceBuffer &other); - - // Convert the cl_mem_flags to cl_map_flags - static cl_map_flags map_flags(cl_mem_flags flags) { - return flags & CL_MEM_READ_WRITE ? CL_MAP_READ | CL_MAP_WRITE - : flags & CL_MEM_READ_ONLY ? CL_MAP_READ - : flags & CL_MEM_WRITE_ONLY ? CL_MAP_WRITE - : 0; - } - }; - - // A buffer on the CPU (host), attached to a buffer on the GPU (device) - class HostBuffer - { - public: - HostBuffer( DeviceBuffer &deviceBuffer, size_t size, cl_mem_flags hostBufferFlags = CL_MEM_READ_WRITE ) - : - deviceBuffer(deviceBuffer), - ptr(deviceBuffer.allocateHostBuffer(size, hostBufferFlags)), - size(size) - { - } - - ~HostBuffer() - { - deviceBuffer.deallocateHostBuffer(ptr); - } - - void hostToDevice(bool synchronous = false) - { - deviceBuffer.hostToDevice(ptr, size, synchronous); - } - - void deviceToHost(bool synchronous = false) - { - deviceBuffer.deviceToHost(ptr, size, synchronous); - } - - DeviceBuffer &deviceBuffer; - - operator cl::Buffer& () { - return deviceBuffer; - } - - protected: - void * const ptr; - const size_t size; - - private: - // Copying is expensive (requires allocation), - // so forbid it to prevent accidental copying. - HostBuffer(const HostBuffer &other); - }; - - // A MultiDimArray allocated as a HostBuffer - template <typename T, size_t DIM> - class MultiArrayHostBuffer : public HostBuffer, public MultiDimArray<T, DIM> - { - public: - template <typename ExtentList> - MultiArrayHostBuffer(const ExtentList &extents, cl_mem_flags hostBufferFlags, DeviceBuffer &deviceBuffer) - : - HostBuffer(deviceBuffer, this->nrElements(extents) * sizeof(T), hostBufferFlags), - MultiDimArray<T,DIM>(extents, static_cast<T*>(ptr), true) - { - } - - size_t bytesize() const - { - return this->num_elements() * sizeof(T); - } - }; - - // A 1:1 buffer on CPU and GPU - template <typename T, size_t DIM> - class MultiArraySharedBuffer : public DeviceBuffer, public MultiArrayHostBuffer<T, DIM> - { - public: - template <typename ExtentList> - MultiArraySharedBuffer(const ExtentList &extents, cl::CommandQueue &queue, cl_mem_flags hostBufferFlags = CL_MEM_READ_WRITE, cl_mem_flags deviceBufferFlags = CL_MEM_READ_WRITE) - : - DeviceBuffer(queue, deviceBufferFlags, this->nrElements(extents) * sizeof(T)), - MultiArrayHostBuffer<T, DIM>(extents, hostBufferFlags, *this) - { - } - - // Select the desired interface - using HostBuffer::hostToDevice; - using HostBuffer::deviceToHost; - using DeviceBuffer::operator cl::Buffer&; - }; - - } // namespace Cobalt -} // namespace LOFAR - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/NewCorrelator.cl b/RTCP/Cobalt/GPUProc/src/opencl/NewCorrelator.cl deleted file mode 100644 index 80f490650623d1e96615064f716dfb3c234b1e0a..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/NewCorrelator.cl +++ /dev/null @@ -1,657 +0,0 @@ -//# NewCorrelator.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include "math.cl" - -#define NR_STATIONS_PER_BLOCK 32 -#define NR_TIMES_PER_BLOCK 8 - -#define NR_BASELINES (NR_STATIONS * (NR_STATIONS + 1) / 2) - - -typedef __global fcomplex2 (*CorrectedDataType)[NR_STATIONS][NR_CHANNELS][NR_SAMPLES_PER_CHANNEL]; -typedef __global fcomplex4 (*VisibilitiesType)[NR_BASELINES][NR_CHANNELS]; - - -/*! - * Correlate one triangle. Only used in unit test, though similar to sub-routine used below. - */ -__kernel -void correlateTriangleKernel(__global void *visibilitiesPtr, - __global const void *correctedDataPtr) -{ - VisibilitiesType visibilities = (VisibilitiesType) visibilitiesPtr; - CorrectedDataType correctedData = (CorrectedDataType) correctedDataPtr; - - __local fcomplex2 samples[2][NR_TIMES_PER_BLOCK][NR_STATIONS_PER_BLOCK / 2 | 1]; - uint channel = get_global_id(2) + 1; - uint block = get_global_id(1); - -#if NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 - uint firstStation = block * NR_STATIONS_PER_BLOCK; - uint nrStationsThisBlock = NR_STATIONS_PER_BLOCK; -#else - uint lastStation = block * NR_STATIONS_PER_BLOCK + NR_STATIONS % NR_STATIONS_PER_BLOCK; - uint firstStation = block == 0 ? 0 : lastStation - NR_STATIONS_PER_BLOCK; - uint nrStationsThisBlock = lastStation - firstStation; -#endif - - uint miniBlock = get_local_id(0); - uint statXoffset = convert_uint_rtz(sqrt(convert_float(8 * miniBlock + 1)) - 0.99999f) / 2; - uint statYoffset = miniBlock - statXoffset * (statXoffset + 1) / 2; - - statXoffset *= 2, statYoffset *= 2; - - float4 vis_0A_r = 0, vis_0A_i = 0; - float4 vis_0B_r = 0, vis_0B_i = 0; - float4 vis_1A_r = 0, vis_1A_i = 0; - float4 vis_1B_r = 0, vis_1B_i = 0; - - bool doCorrelate = statXoffset < nrStationsThisBlock; - - for (uint major = 0; major < NR_SAMPLES_PER_CHANNEL; major += NR_TIMES_PER_BLOCK) { - // load data into local memory - barrier(CLK_LOCAL_MEM_FENCE); - - for (uint i = get_local_id(0); i < nrStationsThisBlock * NR_TIMES_PER_BLOCK; i += get_local_size(0)) { - uint time = i % NR_TIMES_PER_BLOCK; - uint stat = i / NR_TIMES_PER_BLOCK; - - samples[stat % 2][time][stat / 2] = (*correctedData)[firstStation + stat][channel][major + time]; - } - - barrier(CLK_LOCAL_MEM_FENCE); - -#pragma unroll 1 - for (uint time = 0; time < NR_TIMES_PER_BLOCK; time++) { - fcomplex2 sample_0, sample_1, sample_A, sample_B; - - if (doCorrelate) { - sample_0 = samples[0][time][statYoffset / 2]; - sample_A = samples[0][time][statXoffset / 2]; - sample_B = samples[1][time][statXoffset / 2]; - sample_1 = samples[1][time][statYoffset / 2]; - - vis_0A_r += sample_0.xxzz * sample_A.xzxz; - vis_0A_i += sample_0.yyww * sample_A.xzxz; - vis_0B_r += sample_0.xxzz * sample_B.xzxz; - vis_0B_i += sample_0.yyww * sample_B.xzxz; - vis_1A_r += sample_1.xxzz * sample_A.xzxz; - vis_1A_i += sample_1.yyww * sample_A.xzxz; - vis_1B_r += sample_1.xxzz * sample_B.xzxz; - vis_1B_i += sample_1.yyww * sample_B.xzxz; - - vis_0A_r += sample_0.yyww * sample_A.ywyw; - vis_0A_i -= sample_0.xxzz * sample_A.ywyw; - vis_0B_r += sample_0.yyww * sample_B.ywyw; - vis_0B_i -= sample_0.xxzz * sample_B.ywyw; - vis_1A_r += sample_1.yyww * sample_A.ywyw; - vis_1A_i -= sample_1.xxzz * sample_A.ywyw; - vis_1B_r += sample_1.yyww * sample_B.ywyw; - vis_1B_i -= sample_1.xxzz * sample_B.ywyw; - } - } - } - - int statY = firstStation + statYoffset; - uint statX = firstStation + statXoffset; - uint baseline = (statX * (statX + 1) / 2) + statY; - - if (statXoffset < nrStationsThisBlock) { - (*visibilities)[baseline ][channel].even = vis_0A_r; - (*visibilities)[baseline ][channel].odd = vis_0A_i; - } - - if (statXoffset < nrStationsThisBlock && statXoffset != statYoffset) { - (*visibilities)[baseline + 1][channel].even = vis_1A_r; - (*visibilities)[baseline + 1][channel].odd = vis_1A_i; - } - - if (statXoffset + 1 < nrStationsThisBlock) { - (*visibilities)[baseline + statX + 1][channel].even = vis_0B_r; - (*visibilities)[baseline + statX + 1][channel].odd = vis_0B_i; - (*visibilities)[baseline + statX + 2][channel].even = vis_1B_r; - (*visibilities)[baseline + statX + 2][channel].odd = vis_1B_i; - } -} - - -/*! - * Correlate one rectangle. Only used in unit test, though similar to sub-routine used below. - */ -__kernel __attribute__((reqd_work_group_size(NR_STATIONS_PER_BLOCK * NR_STATIONS_PER_BLOCK / 4, 1, 1))) -void correlateRectangleKernel(__global void *visibilitiesPtr, - __global const void *correctedDataPtr) -{ - VisibilitiesType visibilities = (VisibilitiesType) visibilitiesPtr; - CorrectedDataType correctedData = (CorrectedDataType) correctedDataPtr; - - __local fcomplex2 samplesX[2][NR_TIMES_PER_BLOCK][NR_STATIONS_PER_BLOCK / 2 | 1]; - __local fcomplex2 samplesY[2][NR_TIMES_PER_BLOCK][NR_STATIONS_PER_BLOCK / 2 | 1]; - - uint block = get_global_id(1); - uint blockX = convert_uint_rtz(sqrt(convert_float(8 * block + 1)) - 0.99999f) / 2; - uint blockY = block - blockX * (blockX + 1) / 2; - -#if NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 - uint firstStationX = (blockX + 1) * NR_STATIONS_PER_BLOCK; - uint firstStationY = blockY * NR_STATIONS_PER_BLOCK; -#else - uint firstStationX = blockX * NR_STATIONS_PER_BLOCK + NR_STATIONS % NR_STATIONS_PER_BLOCK; - int firstStationY = (blockY - 1) * NR_STATIONS_PER_BLOCK + NR_STATIONS % NR_STATIONS_PER_BLOCK; -#endif - - uint statXoffset = get_local_id(0) / (NR_STATIONS_PER_BLOCK / 2); - uint statYoffset = get_local_id(0) % (NR_STATIONS_PER_BLOCK / 2); - - float4 vis_0A_r = 0, vis_0A_i = 0; - float4 vis_0B_r = 0, vis_0B_i = 0; - float4 vis_1A_r = 0, vis_1A_i = 0; - float4 vis_1B_r = 0, vis_1B_i = 0; - - uint loadTime = get_local_id(0) % NR_TIMES_PER_BLOCK; - uint loadStat = get_local_id(0) / NR_TIMES_PER_BLOCK; - - bool doCorrelateLower = NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 || (int) (firstStationY + 2 * statYoffset) >= 0; - bool doCorrelateUpper = NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 || (int) (firstStationY + 2 * statYoffset) >= -1; - bool doLoadY = NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 || (int) (firstStationY + loadStat) >= 0; - - uint channel = get_global_id(2) + 1; - - for (uint major = 0; major < NR_SAMPLES_PER_CHANNEL; major += NR_TIMES_PER_BLOCK) { - // load data into local memory - fcomplex2 sampleX = (*correctedData)[firstStationX + loadStat][channel][major + loadTime]; - fcomplex2 sampleY; - - if (doLoadY) - sampleY = (*correctedData)[firstStationY + loadStat][channel][major + loadTime]; - - barrier(CLK_LOCAL_MEM_FENCE); - - samplesX[loadStat % 2][loadTime][loadStat / 2] = sampleX; - - if (doLoadY) - samplesY[loadStat % 2][loadTime][loadStat / 2] = sampleY; - - barrier(CLK_LOCAL_MEM_FENCE); - -#pragma unroll 1 - for (uint time = 0; time < NR_TIMES_PER_BLOCK; time++) { - fcomplex2 sample_0, sample_1, sample_A, sample_B; - - if (doCorrelateLower) { - sample_0 = samplesY[0][time][statYoffset]; - } - - if (doCorrelateUpper) { - sample_A = samplesX[0][time][statXoffset]; - sample_B = samplesX[1][time][statXoffset]; - sample_1 = samplesY[1][time][statYoffset]; - } - - if (doCorrelateLower) { - vis_0A_r += sample_0.xxzz * sample_A.xzxz; - vis_0A_i += sample_0.yyww * sample_A.xzxz; - vis_0B_r += sample_0.xxzz * sample_B.xzxz; - vis_0B_i += sample_0.yyww * sample_B.xzxz; - vis_0A_r += sample_0.yyww * sample_A.ywyw; - vis_0A_i -= sample_0.xxzz * sample_A.ywyw; - vis_0B_r += sample_0.yyww * sample_B.ywyw; - vis_0B_i -= sample_0.xxzz * sample_B.ywyw; - } - - if (doCorrelateUpper) { - vis_1A_r += sample_1.xxzz * sample_A.xzxz; - vis_1A_i += sample_1.yyww * sample_A.xzxz; - vis_1B_r += sample_1.xxzz * sample_B.xzxz; - vis_1B_i += sample_1.yyww * sample_B.xzxz; - vis_1A_r += sample_1.yyww * sample_A.ywyw; - vis_1A_i -= sample_1.xxzz * sample_A.ywyw; - vis_1B_r += sample_1.yyww * sample_B.ywyw; - vis_1B_i -= sample_1.xxzz * sample_B.ywyw; - } - } - } - - int statY = firstStationY + 2 * statYoffset; - uint statX = firstStationX + 2 * statXoffset; - uint baseline = (statX * (statX + 1) / 2) + statY; - - if (doCorrelateLower) { - (*visibilities)[baseline ][channel].even = vis_0A_r; - (*visibilities)[baseline ][channel].odd = vis_0A_i; - (*visibilities)[baseline + statX + 1][channel].even = vis_0B_r; - (*visibilities)[baseline + statX + 1][channel].odd = vis_0B_i; - } - - if (doCorrelateUpper) { - (*visibilities)[baseline + 1][channel].even = vis_1A_r; - (*visibilities)[baseline + 1][channel].odd = vis_1A_i; - (*visibilities)[baseline + statX + 2][channel].even = vis_1B_r; - (*visibilities)[baseline + statX + 2][channel].odd = vis_1B_i; - } -} - -//////////////////////////////////////////////////////////////////////////////// - -/*! - * unused in favor of correlateTriangle2(). - */ -void correlateTriangle(VisibilitiesType visibilities, - CorrectedDataType correctedData, - __local fcomplex2 samples[2][NR_TIMES_PER_BLOCK][NR_STATIONS_PER_BLOCK / 2 | 1], - uint block) -{ - uint channel = get_global_id(2) + 1; - -#if NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 - uint firstStation = block * NR_STATIONS_PER_BLOCK; -#else - int firstStation = (block - 1) * NR_STATIONS_PER_BLOCK + NR_STATIONS % NR_STATIONS_PER_BLOCK; -#endif - - bool doCorrelate = false, doAutoCorrelate = false, doNearAutoCorrelate = false; - uint statXoffset, statYoffset; - - if (get_local_id(0) < 128) { - uint miniBlock = get_local_id(0); - uint miniBlockX = convert_uint_rtz(sqrt(convert_float(8 * miniBlock + 1)) - 0.99999f) / 2; - uint miniBlockY = miniBlock - miniBlockX * (miniBlockX + 1) / 2; - - statXoffset = 2 * miniBlockX + 2; - statYoffset = 2 * miniBlockY; - doCorrelate = statXoffset < NR_STATIONS_PER_BLOCK && (NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 || (int) (firstStation + statYoffset) >= 0); - } else if (get_local_id(0) < 128 + NR_STATIONS_PER_BLOCK / 2) { - statXoffset = statYoffset = 2 * (get_local_id(0) - 128); - // actually, it is the visibility one right of statXoffset - doNearAutoCorrelate = (int) (firstStation + statXoffset) >= 0; - } else if (get_local_id(0) >= 192 && get_local_id(0) < 192 + NR_STATIONS_PER_BLOCK) { - statXoffset = statYoffset = get_local_id(0) - 192; - doAutoCorrelate = NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 || (int) (firstStation + statYoffset) >= 0; - } - - float4 vis_0A_r = 0, vis_0A_i = 0; - float4 vis_0B_r = 0, vis_0B_i = 0; - float4 vis_1A_r = 0, vis_1A_i = 0; - float4 vis_1B_r = 0, vis_1B_i = 0; - - uint loadTime = get_local_id(0) % NR_TIMES_PER_BLOCK; - uint loadStat = get_local_id(0) / NR_TIMES_PER_BLOCK; - - bool doLoad = NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 || (int) (firstStation + loadStat) >= 0; - - for (uint major = 0; major < NR_SAMPLES_PER_CHANNEL; major += NR_TIMES_PER_BLOCK) { - // load data into local memory - fcomplex2 sample; - - if (doLoad) - sample = (*correctedData)[firstStation + loadStat][channel][major + loadTime]; - - barrier(CLK_LOCAL_MEM_FENCE); - - if (doLoad) - samples[loadStat % 2][loadTime][loadStat / 2] = sample; - - barrier(CLK_LOCAL_MEM_FENCE); - -#pragma unroll 1 - for (uint time = 0; time < NR_TIMES_PER_BLOCK; time++) { - if (doCorrelate) { - fcomplex2 sample_0 = samples[0][time][statYoffset / 2]; - fcomplex2 sample_A = samples[0][time][statXoffset / 2]; - fcomplex2 sample_B = samples[1][time][statXoffset / 2]; - fcomplex2 sample_1 = samples[1][time][statYoffset / 2]; - - vis_0A_r += sample_0.xxzz * sample_A.xzxz; - vis_0A_i += sample_0.yyww * sample_A.xzxz; - vis_0B_r += sample_0.xxzz * sample_B.xzxz; - vis_0B_i += sample_0.yyww * sample_B.xzxz; - vis_0A_r += sample_0.yyww * sample_A.ywyw; - vis_0A_i -= sample_0.xxzz * sample_A.ywyw; - vis_0B_r += sample_0.yyww * sample_B.ywyw; - vis_0B_i -= sample_0.xxzz * sample_B.ywyw; - - vis_1A_r += sample_1.xxzz * sample_A.xzxz; - vis_1A_i += sample_1.yyww * sample_A.xzxz; - vis_1B_r += sample_1.xxzz * sample_B.xzxz; - vis_1B_i += sample_1.yyww * sample_B.xzxz; - vis_1A_r += sample_1.yyww * sample_A.ywyw; - vis_1A_i -= sample_1.xxzz * sample_A.ywyw; - vis_1B_r += sample_1.yyww * sample_B.ywyw; - vis_1B_i -= sample_1.xxzz * sample_B.ywyw; - } - - if (doAutoCorrelate) { - fcomplex2 sample_0 = samples[statYoffset % 2][time][statYoffset / 2]; - vis_0A_r.xyw += sample_0.xxz * sample_0.xzz; - vis_0A_i.y += sample_0.y * sample_0.z; - vis_0A_r.xyw += sample_0.yyw * sample_0.yww; - vis_0A_i.y -= sample_0.x * sample_0.w; - } - - if (doNearAutoCorrelate) { - fcomplex2 sample_0 = samples[0][time][statYoffset / 2]; - fcomplex2 sample_B = samples[1][time][statXoffset / 2]; - vis_0B_r += sample_0.xxzz * sample_B.xzxz; - vis_0B_i += sample_0.yyww * sample_B.xzxz; - vis_0B_r += sample_0.yyww * sample_B.ywyw; - vis_0B_i -= sample_0.xxzz * sample_B.ywyw; - } - } - } - - if (doAutoCorrelate) { - vis_0A_r.z = vis_0A_r.y; - vis_0A_i.z = -vis_0A_i.y; - } - - int statY = firstStation + statYoffset; - uint statX = firstStation + statXoffset; - uint baseline = (statX * (statX + 1) / 2) + statY; - - if (doCorrelate || doAutoCorrelate) { - (*visibilities)[baseline ][channel].even = vis_0A_r; - (*visibilities)[baseline ][channel].odd = vis_0A_i; - } - - if (doCorrelate || doNearAutoCorrelate) { - (*visibilities)[baseline + statX + 1][channel].even = vis_0B_r; - (*visibilities)[baseline + statX + 1][channel].odd = vis_0B_i; - } - - if (doCorrelate) { - (*visibilities)[baseline + 1][channel].even = vis_1A_r; - (*visibilities)[baseline + 1][channel].odd = vis_1A_i; - (*visibilities)[baseline + statX + 2][channel].even = vis_1B_r; - (*visibilities)[baseline + statX + 2][channel].odd = vis_1B_i; - } -} - - -void correlateTriangle2(VisibilitiesType visibilities, - CorrectedDataType correctedData, - __local fcomplex2 samples[2][NR_TIMES_PER_BLOCK][NR_STATIONS_PER_BLOCK / 2 | 1], - uint block - ) -{ - uint channel = get_global_id(2) + 1; - -#if NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 - uint firstStation = block * NR_STATIONS_PER_BLOCK; - //uint lastStation = firstStation + NR_STATIONS_PER_BLOCK; - uint nrStationsThisBlock = NR_STATIONS_PER_BLOCK; -#else - uint lastStation = block * NR_STATIONS_PER_BLOCK + NR_STATIONS % NR_STATIONS_PER_BLOCK; - uint firstStation = block == 0 ? 0 : lastStation - NR_STATIONS_PER_BLOCK; - uint nrStationsThisBlock = lastStation - firstStation; -#endif - - uint miniBlock = get_local_id(0); - uint statXoffset = convert_uint_rtz(sqrt(convert_float(8 * miniBlock + 1)) - 0.99999f) / 2; - uint statYoffset = miniBlock - statXoffset * (statXoffset + 1) / 2; - - statXoffset *= 2, statYoffset *= 2; - - //bool doCorrelate = statXoffset < nrStationsThisBlock; - - float4 vis_0A_r = 0, vis_0A_i = 0; - float4 vis_0B_r = 0, vis_0B_i = 0; - float4 vis_1A_r = 0, vis_1A_i = 0; - float4 vis_1B_r = 0, vis_1B_i = 0; - - uint loadTime = get_local_id(0) % NR_TIMES_PER_BLOCK; - uint loadStat = get_local_id(0) / NR_TIMES_PER_BLOCK; - - bool doCorrelateLeft = statXoffset < nrStationsThisBlock; - //bool doCorrelateRight = statXoffset + 1 < nrStationsThisBlock; - bool doLoad = NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 || loadStat < nrStationsThisBlock; - - for (uint major = 0; major < NR_SAMPLES_PER_CHANNEL; major += NR_TIMES_PER_BLOCK) { - // load data into local memory - float4 sample; - - if (doLoad) - sample = (*correctedData)[firstStation + loadStat][channel][major + loadTime]; - - barrier(CLK_LOCAL_MEM_FENCE); - - if (doLoad) - samples[loadStat % 2][loadTime][loadStat / 2] = sample; - - barrier(CLK_LOCAL_MEM_FENCE); - -#pragma unroll 1 - for (uint time = 0; time < NR_TIMES_PER_BLOCK; time++) { - float4 sample_0, sample_1, sample_A, sample_B; - - if (doCorrelateLeft) { - sample_0 = samples[0][time][statYoffset / 2]; - sample_A = samples[0][time][statXoffset / 2]; - sample_B = samples[1][time][statXoffset / 2]; - sample_1 = samples[1][time][statYoffset / 2]; - - vis_0A_r += sample_0.xxzz * sample_A.xzxz; - vis_0A_i += sample_0.yyww * sample_A.xzxz; - vis_0B_r += sample_0.xxzz * sample_B.xzxz; - vis_0B_i += sample_0.yyww * sample_B.xzxz; - vis_1A_r += sample_1.xxzz * sample_A.xzxz; - vis_1A_i += sample_1.yyww * sample_A.xzxz; - vis_1B_r += sample_1.xxzz * sample_B.xzxz; - vis_1B_i += sample_1.yyww * sample_B.xzxz; - - vis_0A_r += sample_0.yyww * sample_A.ywyw; - vis_0A_i -= sample_0.xxzz * sample_A.ywyw; - vis_0B_r += sample_0.yyww * sample_B.ywyw; - vis_0B_i -= sample_0.xxzz * sample_B.ywyw; - vis_1A_r += sample_1.yyww * sample_A.ywyw; - vis_1A_i -= sample_1.xxzz * sample_A.ywyw; - vis_1B_r += sample_1.yyww * sample_B.ywyw; - vis_1B_i -= sample_1.xxzz * sample_B.ywyw; - } - } - } - - int statY = firstStation + statYoffset; - uint statX = firstStation + statXoffset; - uint baseline = (statX * (statX + 1) / 2) + statY; - - if (statXoffset < nrStationsThisBlock) { - (*visibilities)[baseline ][channel].even = vis_0A_r; - (*visibilities)[baseline ][channel].odd = vis_0A_i; - } - - if (statXoffset < nrStationsThisBlock && statYoffset + 1 < nrStationsThisBlock) { - (*visibilities)[baseline + 1][channel].even = vis_1A_r; - (*visibilities)[baseline + 1][channel].odd = vis_1A_i; - } - - if (statXoffset + 1 < nrStationsThisBlock) { - (*visibilities)[baseline + statX + 1][channel].even = vis_0B_r; - (*visibilities)[baseline + statX + 1][channel].odd = vis_0B_i; - (*visibilities)[baseline + statX + 2][channel].even = vis_1B_r; - (*visibilities)[baseline + statX + 2][channel].odd = vis_1B_i; - } -} - - -void correlateRectangle(VisibilitiesType visibilities, - CorrectedDataType correctedData, - __local fcomplex2 samplesX[2][NR_TIMES_PER_BLOCK][NR_STATIONS_PER_BLOCK / 2 | 1], - __local fcomplex2 samplesY[2][NR_TIMES_PER_BLOCK][NR_STATIONS_PER_BLOCK / 2 | 1], - uint blockX, - uint blockY - ) -{ - uint channel = get_global_id(2) + 1; - -#if NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 - uint firstStationX = blockX * NR_STATIONS_PER_BLOCK; - uint firstStationY = blockY * NR_STATIONS_PER_BLOCK; -#else - uint firstStationX = (blockX - 1) * NR_STATIONS_PER_BLOCK + NR_STATIONS % NR_STATIONS_PER_BLOCK; - int firstStationY = (blockY - 1) * NR_STATIONS_PER_BLOCK + NR_STATIONS % NR_STATIONS_PER_BLOCK; -#endif - - uint statXoffset = get_local_id(0) / (NR_STATIONS_PER_BLOCK / 2); - uint statYoffset = get_local_id(0) % (NR_STATIONS_PER_BLOCK / 2); - - float4 vis_0A_r = 0, vis_0A_i = 0; - float4 vis_0B_r = 0, vis_0B_i = 0; - float4 vis_1A_r = 0, vis_1A_i = 0; - float4 vis_1B_r = 0, vis_1B_i = 0; - - uint loadTime = get_local_id(0) % NR_TIMES_PER_BLOCK; - uint loadStat = get_local_id(0) / NR_TIMES_PER_BLOCK; - - bool doCorrelateLower = NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 || (int) (firstStationY + 2 * statYoffset) >= 0; - bool doCorrelateUpper = NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 || (int) (firstStationY + 2 * statYoffset) >= -1; - bool doLoadY = NR_STATIONS % NR_STATIONS_PER_BLOCK == 0 || (int) (firstStationY + loadStat) >= 0; - - for (uint major = 0; major < NR_SAMPLES_PER_CHANNEL; major += NR_TIMES_PER_BLOCK) { - // load data into local memory - fcomplex2 sampleX = (*correctedData)[firstStationX + loadStat][channel][major + loadTime]; - fcomplex2 sampleY; - - if (doLoadY) - sampleY = (*correctedData)[firstStationY + loadStat][channel][major + loadTime]; - - barrier(CLK_LOCAL_MEM_FENCE); - - samplesX[loadStat % 2][loadTime][loadStat / 2] = sampleX; - - if (doLoadY) - samplesY[loadStat % 2][loadTime][loadStat / 2] = sampleY; - - barrier(CLK_LOCAL_MEM_FENCE); - -#pragma unroll 1 - for (uint time = 0; time < NR_TIMES_PER_BLOCK; time++) { - fcomplex2 sample_0, sample_1, sample_A, sample_B; - - if (doCorrelateLower) { - sample_0 = samplesY[0][time][statYoffset]; - } - - if (doCorrelateUpper) { - sample_A = samplesX[0][time][statXoffset]; - sample_B = samplesX[1][time][statXoffset]; - sample_1 = samplesY[1][time][statYoffset]; - } - - if (doCorrelateLower) { - vis_0A_r += sample_0.xxzz * sample_A.xzxz; - vis_0A_i += sample_0.yyww * sample_A.xzxz; - vis_0B_r += sample_0.xxzz * sample_B.xzxz; - vis_0B_i += sample_0.yyww * sample_B.xzxz; - vis_0A_r += sample_0.yyww * sample_A.ywyw; - vis_0A_i -= sample_0.xxzz * sample_A.ywyw; - vis_0B_r += sample_0.yyww * sample_B.ywyw; - vis_0B_i -= sample_0.xxzz * sample_B.ywyw; - } - - if (doCorrelateUpper) { - vis_1A_r += sample_1.xxzz * sample_A.xzxz; - vis_1A_i += sample_1.yyww * sample_A.xzxz; - vis_1B_r += sample_1.xxzz * sample_B.xzxz; - vis_1B_i += sample_1.yyww * sample_B.xzxz; - vis_1A_r += sample_1.yyww * sample_A.ywyw; - vis_1A_i -= sample_1.xxzz * sample_A.ywyw; - vis_1B_r += sample_1.yyww * sample_B.ywyw; - vis_1B_i -= sample_1.xxzz * sample_B.ywyw; - } - } - } - - int statY = firstStationY + 2 * statYoffset; - uint statX = firstStationX + 2 * statXoffset; - uint baseline = (statX * (statX + 1) / 2) + statY; - - if (doCorrelateLower) { - (*visibilities)[baseline ][channel].even = vis_0A_r; - (*visibilities)[baseline ][channel].odd = vis_0A_i; - (*visibilities)[baseline + statX + 1][channel].even = vis_0B_r; - (*visibilities)[baseline + statX + 1][channel].odd = vis_0B_i; - } - - if (doCorrelateUpper) { - (*visibilities)[baseline + 1][channel].even = vis_1A_r; - (*visibilities)[baseline + 1][channel].odd = vis_1A_i; - (*visibilities)[baseline + statX + 2][channel].even = vis_1B_r; - (*visibilities)[baseline + statX + 2][channel].odd = vis_1B_i; - } -} - - -/*! - * Computes correlations between all pairs of stations (baselines) and X,Y - * polarizations. Also computes all station (and pol) auto-correlations. - * - * We consider the output space shaped as a triangle of S*(S-1)/2 full - * correlations, plus S auto-correlations at the hypothenuse (S = NR_STATIONS). - * With this correlator, the space is divided into blocks of N/2 x N/2 (with - * N = NR_STATIONS_PER_BLOCK) correlations. Each work group works on a block - * (may have partial output) and only loads samples from the stations along its - * two edges. - * - * This scheme is favorable when the number of stations exceeds the dozens. - * For small problem sizes (up to dozens of stations (standard LOFAR, usually)) - * (exact number depends on observation, software and hardware parameters), - * our kernels in Correlator.cl may be significantly faster than this - * correlator. This implementation shines especially on LOFAR AARTFAAC's - * 288 input antenna streams. - * - * \param[out] visibilitiesPtr 2D output array of visibilities. Each visibility contains the 4 polarization pairs, XX, XY, YX, YY, each of complex float type. - * \param[in] correctedDataPtr 3D input array of samples. Each sample contains the 2 polarizations X, Y, each of complex float type. - * - * Pre-processor input symbols (some are tied to the execution configuration) - * Symbol | Valid Values | Description - * ----------------------- | ------------------------------- | ----------- - * NR_STATIONS | >= 1 | number of antenna fields - * NR_SAMPLES_PER_CHANNEL | multiple of NR_TIMES_PER_BLOCK | number of input samples per channel - * NR_CHANNELS | > 1 (TODO: supp 1 ch) | number of frequency channels per subband - * Note that for > 1 channels, NR_CHANNELS-1 channels are actually processed, - * because the second PPF has "corrupted" channel 0. (An inverse PPF can disambiguate.) \n - * Note that this kernel assumes (but does not use) NR_POLARIZATIONS == 2. - * - * Execution configuration: - * - Work dim == 3 (can be 1 iff NR_CHANNELS <= 2) - * + Inner dim: the baseline the thread processes - * + Middle dim: the block number the work group of the thread processes - * + Outer dim: the channel the thread processes - * - Work group size: (N/2 * N/2, 1, 1) with N = NR_STATIONS_PER_BLOCK \n - * - Global size: (N/2 * N/2, number of blocks (full and partial), number of actually processed channels) - */ -__kernel __attribute__((reqd_work_group_size(NR_STATIONS_PER_BLOCK * NR_STATIONS_PER_BLOCK / 4, 1, 1))) -void correlate(__global void *visibilitiesPtr, - __global const void *correctedDataPtr) -{ - __local fcomplex2 samplesX[2][NR_TIMES_PER_BLOCK][NR_STATIONS_PER_BLOCK / 2 | 1]; - __local fcomplex2 samplesY[2][NR_TIMES_PER_BLOCK][NR_STATIONS_PER_BLOCK / 2 | 1]; - - uint block = get_global_id(1); - uint blockX = convert_uint_rtz(sqrt(convert_float(8 * block + 1)) - 0.99999f) / 2; - uint blockY = block - blockX * (blockX + 1) / 2; - - if (blockX == blockY) - correlateTriangle2((VisibilitiesType) visibilitiesPtr, (CorrectedDataType) correctedDataPtr, samplesX, blockX); - else - correlateRectangle((VisibilitiesType) visibilitiesPtr, (CorrectedDataType) correctedDataPtr, samplesX, samplesY, blockX, blockY); -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/PerformanceCounter.cc b/RTCP/Cobalt/GPUProc/src/opencl/PerformanceCounter.cc deleted file mode 100644 index ee4cd7807035240a87e2920fedd6d7a4e65c87c9..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/PerformanceCounter.cc +++ /dev/null @@ -1,170 +0,0 @@ -//# PerformanceCounter.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "PerformanceCounter.h" - -#include <iostream> -#include <iomanip> -#include <sstream> - -#include <Common/LofarLogger.h> -#include <Common/PrettyUnits.h> -#include <GPUProc/OpenMP_Lock.h> - -using namespace std; - -namespace LOFAR -{ - namespace Cobalt - { - PerformanceCounter::PerformanceCounter(const std::string &name, bool profiling, bool logAtDestruction) - : - name(name), - profiling(profiling), - logAtDestruction(logAtDestruction), - nrActiveEvents(0) - { - } - - - PerformanceCounter::~PerformanceCounter() - { - waitForAllOperations(); - - if (logAtDestruction) { - LOG_INFO_STR(total.log(name)); - } - } - - - void PerformanceCounter::waitForAllOperations() - { - ScopedLock sl(mutex); - - while (nrActiveEvents > 0) - activeEventsLowered.wait(mutex); - } - - - struct PerformanceCounter::figures PerformanceCounter::getTotal() - { - ScopedLock sl(mutex); - - return total; - } - - - std::string PerformanceCounter::figures::log(const std::string &name) const - { - std::stringstream str; - - // Mimic output of NSTimer::print (in LCS/Common/Timer.cc) - str << left << setw(25) << name << ": " << right - << "avg = " << PrettyTime(avrRuntime()) << ", " - << "total = " << PrettyTime(runtime) << ", " - << "count = " << setw(9) << nrEvents << ", " - - << setprecision(3) - << "GFLOP/s = " << FLOPs() / 1e9 << ", " - << "read = " << readSpeed() / 1e9 << " GB/s, " - << "written = " << writeSpeed() / 1e9 << " GB/s, " - << "total I/O = " << (readSpeed() + writeSpeed()) / 1e9 << " GB/s"; - - return str.str(); - } - - - void PerformanceCounter::eventCompleteCallBack(cl_event ev, cl_int /*status*/, void *userdata) - { - struct callBackArgs *args = static_cast<struct callBackArgs *>(userdata); - - try { - // extract performance information - cl::Event event(ev); - - size_t queued = event.getProfilingInfo<CL_PROFILING_COMMAND_QUEUED>(); - size_t submitted = event.getProfilingInfo<CL_PROFILING_COMMAND_SUBMIT>(); - size_t start = event.getProfilingInfo<CL_PROFILING_COMMAND_START>(); - size_t stop = event.getProfilingInfo<CL_PROFILING_COMMAND_END>(); - double seconds = (stop - start) / 1e9; - - // sanity checks - ASSERT(seconds >= 0); - ASSERTSTR(seconds < 15, "Kernel took " << seconds << " seconds to execute: thread " << omp_get_thread_num() << ": " << queued << ' ' << submitted - queued << ' ' << start - queued << ' ' << stop - queued); - - args->figures.runtime = seconds; - - // add figures to total - { - ScopedLock sl(args->this_->mutex); - args->this_->total += args->figures; - } - - // cl::~Event() decreases ref count - } catch (cl::Error &error) { - // ignore errors in callBack function (OpenCL library not exception safe) - } - - // we're done -- release event and possibly signal destructor - { - ScopedLock sl(args->this_->mutex); - args->this_->nrActiveEvents--; - args->this_->activeEventsLowered.signal(); - } - - delete args; - } - - - void PerformanceCounter::doOperation(cl::Event &event, size_t nrOperations, size_t nrBytesRead, size_t nrBytesWritten) - { - if (!profiling) - return; - - // reference count between C and C++ conversions is serously broken in C++ wrapper - cl_event ev = event(); - cl_int error = clRetainEvent(ev); - - if (error != CL_SUCCESS) - throw cl::Error(error, "clRetainEvent"); - - // obtain run time information - struct callBackArgs *args = new callBackArgs; - args->this_ = this; - args->figures.nrOperations = nrOperations; - args->figures.nrBytesRead = nrBytesRead; - args->figures.nrBytesWritten = nrBytesWritten; - args->figures.runtime = 0.0; - args->figures.nrEvents = 1; - - { - // allocate event as active - ScopedLock sl(mutex); - nrActiveEvents++; - } - - event.setCallback(CL_COMPLETE, &PerformanceCounter::eventCompleteCallBack, args); - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/PerformanceCounter.h b/RTCP/Cobalt/GPUProc/src/opencl/PerformanceCounter.h deleted file mode 100644 index 3502a29aba8fa5f6b5ecfd93058e607e785183f7..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/PerformanceCounter.h +++ /dev/null @@ -1,135 +0,0 @@ -//# PerformanceCounter.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_PERFORMANCECOUNTER_H -#define LOFAR_GPUPROC_OPENCL_PERFORMANCECOUNTER_H - -#include <string> - -#include <Common/Thread/Mutex.h> -#include <Common/Thread/Condition.h> - -#include "gpu_incl.h" - -namespace LOFAR -{ - namespace Cobalt - { - class PerformanceCounter - { - public: - // name of counter, for logging purposes - const std::string name; - - // whether we collect profiling information in the first place - const bool profiling; - - // Initialise the counter, giving it a name. - // - // If profiling == false, no actual performance statistics are - // gathered. - PerformanceCounter(const std::string &name, bool profiling, bool logAtDestruction = false); - ~PerformanceCounter(); - - // register an operation covered by `event'. runtime will be determined by OpenCL, the - // rest of the figures have to be provided. - void doOperation(cl::Event &, size_t nrOperations, size_t nrBytesRead, size_t nrBytesWritten); - - // performance figures - struct figures { - size_t nrOperations; - size_t nrBytesRead; - size_t nrBytesWritten; - double runtime; - - size_t nrEvents; - - figures() : nrOperations(0), nrBytesRead(0), nrBytesWritten(0), runtime(0.0), nrEvents(0) - { - } - - struct figures &operator+=(const struct figures &other) - { - nrOperations += other.nrOperations; - nrBytesRead += other.nrBytesRead; - nrBytesWritten += other.nrBytesWritten; - runtime += other.runtime; - nrEvents += other.nrEvents; - - return *this; - } - - double avrRuntime() const - { - return runtime / nrEvents; - } - double FLOPs() const - { - return nrOperations / runtime; - } - double readSpeed() const - { - return nrBytesRead / runtime; - } - double writeSpeed() const - { - return nrBytesWritten / runtime; - } - - std::string log(const std::string &name = "timer") const; - }; - - // Return once all scheduled operations have completed - void waitForAllOperations(); - - // Return current running total figures - struct figures getTotal(); - - // Log the total figures - void logTotal(); - - private: - // whether to log the performance when ~PerformanceCounter is - // called - const bool logAtDestruction; - - // performance totals - struct figures total; - - // number of events that still have a callback waiting - size_t nrActiveEvents; - Condition activeEventsLowered; - - // lock for total and nrActiveEvents - Mutex mutex; - - // call-back to get runtime information - struct callBackArgs { - PerformanceCounter *this_; - struct figures figures; - }; - - static void eventCompleteCallBack(cl_event, cl_int /*status*/, void *userdata); - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/BeamFormerPipeline.cc b/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/BeamFormerPipeline.cc deleted file mode 100644 index db2c028277d1ef3bd4a991fa57e24bc63170ce5a..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/BeamFormerPipeline.cc +++ /dev/null @@ -1,73 +0,0 @@ -//# BeamFormerPipeline.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "BeamFormerPipeline.h" - -#include <Common/LofarLogger.h> - -#include <GPUProc/OpenMP_Lock.h> -#include <GPUProc/SubbandProcs/BeamFormerSubbandProc.h> - -namespace LOFAR -{ - namespace Cobalt - { - BeamFormerPipeline::BeamFormerPipeline(const Parset &ps) - : - Pipeline(ps), - intToFloatCounter("int-to-float", profiling), - fftCounter("FFT", profiling), - delayAndBandPassCounter("delay/bp", profiling), - beamFormerCounter("beamformer", profiling), - transposeCounter("transpose", profiling), - dedispersionForwardFFTcounter("ddisp.fw.FFT", profiling), - dedispersionChirpCounter("chirp", profiling), - dedispersionBackwardFFTcounter("ddisp.bw.FFT", profiling), - samplesCounter("samples", profiling) - { - double startTime = omp_get_wtime(); - -#pragma omp parallel sections - { -#pragma omp section - intToFloatProgram = createProgram("BeamFormer/IntToFloat.cl"); -#pragma omp section - delayAndBandPassProgram = createProgram("DelayAndBandPass.cl"); -#pragma omp section - beamFormerProgram = createProgram("BeamFormer/BeamFormer.cl"); -#pragma omp section - transposeProgram = createProgram("BeamFormer/Transpose.cl"); -#pragma omp section - dedispersionChirpProgram = createProgram("BeamFormer/Dedispersion.cl"); - } - - LOG_DEBUG_STR("compile time = " << omp_get_wtime() - startTime); - } - - void BeamFormerPipeline::doWork() - { -#pragma omp parallel num_threads((profiling ? 1 : 2) * nrGPUs) - BeamFormerSubbandProc(*this, omp_get_thread_num() % nrGPUs).doWork(); - } - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/BeamFormerPipeline.h b/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/BeamFormerPipeline.h deleted file mode 100644 index faf9f938ce6e330cec898b1345f20cd6448583c3..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/BeamFormerPipeline.h +++ /dev/null @@ -1,50 +0,0 @@ -//# BeamFormerPipeline.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_BEAMFORMERPIPELINE_H -#define LOFAR_GPUPROC_OPENCL_BEAMFORMERPIPELINE_H - -#include <CoInterface/Parset.h> - -#include <GPUProc/gpu_incl.h> -#include <GPUProc/PerformanceCounter.h> -#include "Pipeline.h" - -namespace LOFAR -{ - namespace Cobalt - { - class BeamFormerPipeline : public Pipeline - { - public: - BeamFormerPipeline(const Parset &); - - void doWork(); - - cl::Program intToFloatProgram, delayAndBandPassProgram, beamFormerProgram, transposeProgram, dedispersionChirpProgram; - - PerformanceCounter intToFloatCounter, fftCounter, delayAndBandPassCounter, beamFormerCounter, transposeCounter, dedispersionForwardFFTcounter, dedispersionChirpCounter, dedispersionBackwardFFTcounter; - PerformanceCounter samplesCounter; - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/CorrelatorPipeline.cc b/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/CorrelatorPipeline.cc deleted file mode 100644 index 1161c874ac60915103b63462f454a4c070dfa9d6..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/CorrelatorPipeline.cc +++ /dev/null @@ -1,460 +0,0 @@ -//# CorrelatorPipeline.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "CorrelatorPipeline.h" - -#include <iomanip> - -#include <Common/LofarLogger.h> -#include <ApplCommon/PosixTime.h> -#include <Stream/Stream.h> -#include <Stream/FileStream.h> -#include <Stream/NullStream.h> -#include <Stream/StreamDescriptor.h> -#include <CoInterface/CorrelatedData.h> -#include <CoInterface/Stream.h> - -#include <InputProc/SampleType.h> -#include <InputProc/Transpose/MPIReceiveStations.h> - -#include <GPUProc/OpenMP_Lock.h> -#include <GPUProc/SubbandProcs/CorrelatorSubbandProc.h> -#include <GPUProc/SubbandProcs/SubbandProc.h> - -using namespace std; - -namespace LOFAR -{ - namespace Cobalt - { - - CorrelatorPipeline::CorrelatorPipeline(const Parset &ps) - : - Pipeline(ps), - subbandPool(ps.nrSubbands()), - filterBank(true, NR_TAPS, ps.nrChannelsPerSubband(), KAISER) - { - filterBank.negateWeights(); - double startTime = omp_get_wtime(); - - //#pragma omp parallel sections - { - programs.firFilterProgram = createProgram("FIR.cl"); - programs.delayAndBandPassProgram = createProgram("DelayAndBandPass.cl"); -#if defined USE_NEW_CORRELATOR - programs.correlatorProgram = createProgram("NewCorrelator.cl"); -#else - programs.correlatorProgram = createProgram("Correlator.cl"); -#endif - } - LOG_DEBUG_STR("compile time = " << omp_get_wtime() - startTime); - } - - void CorrelatorPipeline::doWork() - { - size_t nrSubbandProcs = (profiling ? 1 : 2) * nrGPUs; - vector< SmartPtr<CorrelatorSubbandProc> > workQueues(nrSubbandProcs); - - for (size_t i = 0; i < workQueues.size(); ++i) { - workQueues[i] = new CorrelatorSubbandProc(ps, // Configuration - context, // Opencl context - devices[i % nrGPUs], // The GPU this workQueue is connected to - i % nrGPUs, // The GPU index - programs, // The compiled kernels, const - filterBank); // The filter set to use. Const - } - - for (unsigned sb = 0; sb < ps.nrSubbands(); sb++) { - // Allow 10 blocks to be in the best-effort queue. - // TODO: make this dynamic based on memory or time - subbandPool[sb].bequeue = new BestEffortQueue< SmartPtr<CorrelatedDataHostBuffer> >(3, ps.realTime()); - } - - double startTime = ps.startTime(); - double stopTime = ps.stopTime(); - double blockTime = ps.CNintegrationTime(); - - size_t nrBlocks = floor((stopTime - startTime) / blockTime); - - //sections = program segments defined by the following omp section directive - // are distributed for parallel execution among available threads - //parallel = directive explicitly instructs the compiler to parallelize the chosen block of code. - // The two sections in this function are done in parallel with a seperate set of threads. -# pragma omp parallel sections - { - /* - * BLOCK OF SUBBANDS -> WORKQUEUE INPUTPOOL - */ -# pragma omp section - { - switch (ps.nrBitsPerSample()) { - default: - case 16: - receiveInput< SampleType<i16complex> >(nrBlocks, workQueues); - break; - case 8: - receiveInput< SampleType<i8complex> >(nrBlocks, workQueues); - break; - case 4: - receiveInput< SampleType<i4complex> >(nrBlocks, workQueues); - break; - } - } - - - /* - * WORKQUEUE INPUTPOOL -> WORKQUEUE OUTPUTPOOL - * - * Perform GPU processing, one thread per workQueue. - */ -# pragma omp section - { -# pragma omp parallel for num_threads(workQueues.size()) - for (size_t i = 0; i < workQueues.size(); ++i) { - CorrelatorSubbandProc &queue = *workQueues[i]; - - // run the queue - queue.timers["CPU - total"]->start(); - processSubbands(queue); - queue.timers["CPU - total"]->stop(); - - // Signal end of output - queue.outputPool.filled.append(NULL, false); - } - } - - /* - * WORKQUEUE OUTPUTPOOL -> SUBBANDPOOL - * - * Perform post-processing, one thread per workQueue. - */ -# pragma omp section - { -# pragma omp parallel for num_threads(workQueues.size()) - for (size_t i = 0; i < workQueues.size(); ++i) { - CorrelatorSubbandProc &queue = *workQueues[i]; - - // run the queue - postprocessSubbands(queue); - } - - // Signal end of output - for (size_t subband = 0; subband < ps.nrSubbands(); ++subband) { - subbandPool[subband].bequeue->noMore(); - } - } - - /* - * SUBBANDPOOL -> STORAGE STREAMS (best effort) - */ -# pragma omp section - { -# pragma omp parallel for num_threads(ps.nrSubbands()) - for (size_t subband = 0; subband < ps.nrSubbands(); ++subband) { - // write subband to Storage - writeSubband(subband); - } - } - } - - // gather performance figures - for (size_t i = 0; i < workQueues.size(); ++i ) { - performance.addQueue(*workQueues[i]); - } - - // log performance figures - performance.log(workQueues.size()); - } - - - // Record type needed by receiveInput. Before c++0x, a local type - // can't be a template argument, so we'll have to define this type - // globally. - struct inputData_t { - // An InputData object suited for storing one subband from all - // stations. - SmartPtr<SubbandProcInputData> data; - - // The SubbandProc associated with the data - CorrelatorSubbandProc *queue; - }; - - template<typename SampleT> void CorrelatorPipeline::receiveInput( size_t nrBlocks, const std::vector< SmartPtr<CorrelatorSubbandProc> > &workQueues ) - { - // The length of a block in samples - size_t blockSize = ps.nrHistorySamples() + ps.nrSamplesPerSubband(); - - // SEND: For now, the n stations are sent by the first n ranks. - vector<int> stationRanks(ps.settings.antennaFields.size()); - for (size_t stat = 0; stat < ps.settings.antennaFields.size(); ++stat) { - stationRanks[stat] = stat; - } - - // RECEIVE: For now, we receive ALL beamlets. - vector<size_t> subbands(ps.nrSubbands()); - for (size_t subband = 0; subband < ps.nrSubbands(); ++subband) { - subbands[subband] = subband; - } - - // Set up the MPI environment. - MPIReceiveStations receiver(stationRanks, subbands, blockSize); - - // Create a block object to hold all information for receiving one - // block. - vector<struct MPIReceiveStations::Block<SampleT> > blocks(ps.settings.antennaFields.size()); - - for (size_t stat = 0; stat < ps.settings.antennaFields.size(); ++stat) { - blocks[stat].beamlets.resize(ps.nrSubbands()); - } - - size_t workQueueIterator = 0; - - for (size_t block = 0; block < nrBlocks; block++) { - // Receive the samples of all subbands from the stations for this - // block. - - // The set of InputData objects we're using for this block. - vector<struct inputData_t> inputDatas(ps.nrSubbands()); - - for (size_t subband = 0; subband < ps.nrSubbands(); ++subband) { - // Fetch an input object to store this subband. For now, blindly - // round-robin over the work queues. - CorrelatorSubbandProc &queue = *workQueues[workQueueIterator++ % workQueues.size()]; - - // Fetch an input object to fill from the selected queue. - // NOTE: We'll put it in a SmartPtr right away! - SmartPtr<SubbandProcInputData> data = queue.inputPool.free.remove(); - - // Annotate the block - data->block = block; - data->subband = subband; - - // Incorporate it in the receiver's input set. - for (size_t stat = 0; stat < ps.settings.antennaFields.size(); ++stat) { - blocks[stat].beamlets[subband].samples = reinterpret_cast<SampleT*>(&data->inputSamples[stat][0][0][0]); - } - - // Record the block (transfers ownership) - inputDatas[subband].data = data; - inputDatas[subband].queue = &queue; - } - - // Receive all subbands from all stations - LOG_INFO_STR("[block " << block << "] Reading input samples"); - receiver.receiveBlock<SampleT>(blocks); - - // Process and forward the received input to the processing threads - for (size_t subband = 0; subband < ps.nrSubbands(); ++subband) { - CorrelatorSubbandProc &queue = *inputDatas[subband].queue; - SmartPtr<SubbandProcInputData> data = inputDatas[subband].data; - - // Translate the metadata as provided by receiver - for (size_t stat = 0; stat < ps.settings.antennaFields.size(); ++stat) { - SubbandMetaData &metaData = blocks[stat].beamlets[subband].metaData; - - // extract and apply the flags - // TODO: Not in this thread! Add a preprocess thread maybe? - data->inputFlags[stat] = metaData.flags; - - data->flagInputSamples(stat, metaData); - - // extract and assign the delays for the station beams - for (unsigned pol = 0; pol < NR_POLARIZATIONS; pol++) - { - unsigned sap = ps.settings.subbands[subband].SAP; - - data->delaysAtBegin[sap][stat][pol] = metaData.stationBeam.delayAtBegin; - data->delaysAfterEnd[sap][stat][pol] = metaData.stationBeam.delayAfterEnd; - data->phaseOffsets[stat][pol] = 0.0; - } - } - - queue.inputPool.filled.append(data); - } - - LOG_DEBUG_STR("[block " << block << "] Forwarded input to processing"); - } - - // Signal end of input - for (size_t i = 0; i < workQueues.size(); ++i) { - workQueues[i]->inputPool.filled.append(NULL, false); - } - } - - template void CorrelatorPipeline::receiveInput< SampleType<i16complex> >( size_t nrBlocks, const std::vector< SmartPtr<CorrelatorSubbandProc> > &workQueues ); - template void CorrelatorPipeline::receiveInput< SampleType<i8complex> >( size_t nrBlocks, const std::vector< SmartPtr<CorrelatorSubbandProc> > &workQueues ); - template void CorrelatorPipeline::receiveInput< SampleType<i4complex> >( size_t nrBlocks, const std::vector< SmartPtr<CorrelatorSubbandProc> > &workQueues ); - - - void CorrelatorPipeline::processSubbands(CorrelatorSubbandProc &workQueue) - { - SmartPtr<SubbandProcInputData> input; - - // Keep fetching input objects until end-of-input - while ((input = workQueue.inputPool.filled.remove()) != NULL) { - size_t block = input->block; - unsigned subband = input->subband; - - if (subband == 0 || subband == ps.nrSubbands() - 1) { - LOG_INFO_STR("[block " << block << ", subband " << subband << "] Processing start"); - } - - // Also fetch an output object to store results - SmartPtr<CorrelatedDataHostBuffer> output = workQueue.outputPool.free.remove(); - ASSERT(output != NULL); // Only we signal end-of-data, so we should never receive it - - output->block = block; - output->subband = subband; - - // Perform calculations - workQueue.timers["CPU - process"]->start(); - workQueue.processSubband(*input, *output); - workQueue.timers["CPU - process"]->stop(); - - // Hand off output to post processing - workQueue.outputPool.filled.append(output); - ASSERT(!output); - - // Give back input data for a refill - workQueue.inputPool.free.append(input); - ASSERT(!input); - - if (subband == 0 || subband == ps.nrSubbands() - 1) { - LOG_DEBUG_STR("[block " << block << ", subband " << subband << "] Forwarded output to post processing"); - } - } - } - - - void CorrelatorPipeline::postprocessSubbands(CorrelatorSubbandProc &workQueue) - { - SmartPtr<CorrelatedDataHostBuffer> output; - - size_t nrBlocksForwarded = 0; - size_t nrBlocksDropped = 0; - time_t lastLogTime = 0; - - // Keep fetching output objects until end-of-output - while ((output = workQueue.outputPool.filled.remove()) != NULL) { - size_t block = output->block; - unsigned subband = output->subband; - - if (subband == 0 || subband == ps.nrSubbands() - 1) { - LOG_INFO_STR("[block " << block << ", subband " << subband << "] Post processing start"); - } - - workQueue.timers["CPU - postprocess"]->start(); - workQueue.postprocessSubband(*output); - workQueue.timers["CPU - postprocess"]->stop(); - - // Hand off output, force in-order as Storage expects it that way - subbandPool[subband].sync.waitFor(block); - - // We do the ordering, so we set the sequence numbers - output->setSequenceNumber(block); - - if (!subbandPool[subband].bequeue->append(output)) { - nrBlocksDropped++; - //LOG_WARN_STR("[block " << block << "] Dropped for subband " << subband); - - // Give back to queue - workQueue.outputPool.free.append(output); - } else { - nrBlocksForwarded++; - } - - // Allow next block to be written - subbandPool[subband].sync.advanceTo(block + 1); - - ASSERT(!output); - - if (subband == 0 || subband == ps.nrSubbands() - 1) { - LOG_DEBUG_STR("[block " << block << ", subband " << subband << "] Forwarded output to writer"); - } - - if (time(0) != lastLogTime) { - lastLogTime = time(0); - - LOG_INFO_STR("Forwarded " << nrBlocksForwarded << " blocks, dropped " << nrBlocksDropped << " blocks"); - } - } - } - - - void CorrelatorPipeline::writeSubband( unsigned subband ) - { - SmartPtr<Stream> outputStream; - - // Connect to output stream - try { - if (ps.getHostName(CORRELATED_DATA, subband) == "") { - // an empty host name means 'write to disk directly', to - // make debugging easier for now - outputStream = new FileStream(ps.getFileName(CORRELATED_DATA, subband), 0666); - } else { - // connect to the Storage_main process for this output - const std::string desc = getStreamDescriptorBetweenIONandStorage(ps, CORRELATED_DATA, subband); - - outputStream = createStream(desc, false, 0); - } - } catch(Exception &ex) { - LOG_ERROR_STR("Dropping rest of subband " << subband << ": " << ex); - - outputStream = new NullStream; - } - - SmartPtr<CorrelatedDataHostBuffer> output; - - // Process pool elements until end-of-output - while ((output = subbandPool[subband].bequeue->remove()) != NULL) { - size_t block = output->block; - unsigned subband = output->subband; - - CorrelatorSubbandProc &queue = output->queue; // cache queue object, because `output' will be destroyed - - if (subband == 0 || subband == ps.nrSubbands() - 1) { - LOG_INFO_STR("[block " << block << ", subband " << subband << "] Writing start"); - } - - // Write block to disk - try { - output->write(outputStream.get(), true); - } catch(Exception &ex) { - LOG_ERROR_STR("Dropping rest of subband " << subband << ": " << ex); - - outputStream = new NullStream; - } - - // Hand the object back to the workQueue it originally came from - queue.outputPool.free.append(output); - - ASSERT(!output); - - if (subband == 0 || subband == ps.nrSubbands() - 1) { - LOG_INFO_STR("[block " << block << ", subband " << subband << "] Done"); - } - } - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/CorrelatorPipeline.h b/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/CorrelatorPipeline.h deleted file mode 100644 index 38fb6212d639e40139764a3c0666fa588d021fd4..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/CorrelatorPipeline.h +++ /dev/null @@ -1,84 +0,0 @@ -//# CorrelatorPipeline.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_CORRELATOR_PIPELINE_H -#define LOFAR_GPUPROC_OPENCL_CORRELATOR_PIPELINE_H - -#include <CoInterface/Parset.h> -#include <CoInterface/SlidingPointer.h> - -#include <GPUProc/gpu_incl.h> -#include <GPUProc/BestEffortQueue.h> -#include <GPUProc/FilterBank.h> -#include <GPUProc/SubbandProcs/CorrelatorSubbandProc.h> -#include "Pipeline.h" -#include "CorrelatorPipelinePrograms.h" - -namespace LOFAR -{ - namespace Cobalt - { - // Correlator pipeline, connect input, correlator SubbandProcs and output in parallel (OpenMP). - // Connect all parts of the pipeline together: set up connections with the input stream - // each in a seperate thread. Start two SubbandProcs for each GPU in the system. - // These process independently, but can overlap each others compute with host/device I/O. - // The SubbandProcs are then filled with data from the input stream and started. - // After all data is collected the output is written, again in parallel. - // This class contains most CPU side parallelism. - // It also contains two 'data' members that are shared between queues. - class CorrelatorPipeline : public Pipeline - { - public: - CorrelatorPipeline(const Parset &); - - // for each subband get data from input stream, sync, start the kernels to process all data, write output in parallel - void doWork(); - - // for each block, read all subbands from all stations, and divide the work over the workQueues - template<typename SampleT> void receiveInput( size_t nrBlocks, const std::vector< SmartPtr<CorrelatorSubbandProc> > &workQueues ); - - // process subbands on the GPU - void processSubbands(CorrelatorSubbandProc &workQueue); - - // postprocess subbands on the CPU - void postprocessSubbands(CorrelatorSubbandProc &workQueue); - - // send subbands to Storage - void writeSubband(unsigned subband); - - private: - struct Output { - // synchronisation to write blocks in-order - SlidingPointer<size_t> sync; - - // output data queue - SmartPtr< BestEffortQueue< SmartPtr<CorrelatedDataHostBuffer> > > bequeue; - }; - - std::vector<struct Output> subbandPool; // [subband] - - FilterBank filterBank; - CorrelatorPipelinePrograms programs; - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/CorrelatorPipelinePrograms.h b/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/CorrelatorPipelinePrograms.h deleted file mode 100644 index 3e220aa22772ef42eeb561174d04ce360fdb3e1a..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/CorrelatorPipelinePrograms.h +++ /dev/null @@ -1,40 +0,0 @@ -//# CorrelatorPipelinePrograms.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_CORRELATOR_PIPELINE_PROGRAMS_H -#define LOFAR_GPUPROC_OPENCL_CORRELATOR_PIPELINE_PROGRAMS_H - -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - struct CorrelatorPipelinePrograms - { - cl::Program firFilterProgram; - cl::Program delayAndBandPassProgram; - cl::Program correlatorProgram; - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/Pipeline.cc b/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/Pipeline.cc deleted file mode 100644 index 8f1a2b424f14822372acabfcd237bc1c133f091e..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/Pipeline.cc +++ /dev/null @@ -1,130 +0,0 @@ -//# Pipeline.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "Pipeline.h" - -#include <Common/LofarLogger.h> -#include <Common/lofar_iomanip.h> - -#include <GPUProc/opencl/gpu_utils.h> - -namespace LOFAR -{ - namespace Cobalt - { - - - Pipeline::Pipeline(const Parset &ps) - : - ps(ps) - { - createContext(context, devices); - } - - - cl::Program Pipeline::createProgram(const char *sources) - { - return LOFAR::Cobalt::createProgram(ps, context, devices, sources); - } - - - void Pipeline::Performance::addQueue(SubbandProc &queue) - { - ScopedLock sl(totalsMutex); - - // add performance counters - for (map<string, SmartPtr<PerformanceCounter> >::iterator i = queue.counters.begin(); i != queue.counters.end(); ++i) { - - const string &name = i->first; - PerformanceCounter *counter = i->second.get(); - - counter->waitForAllOperations(); - - total_counters[name] += counter->getTotal(); - } - - // add timers - for (map<string, SmartPtr<NSTimer> >::iterator i = queue.timers.begin(); i != queue.timers.end(); ++i) { - - const string &name = i->first; - NSTimer *timer = i->second.get(); - - if (!total_timers[name]) - total_timers[name] = new NSTimer(name, false, false); - - *total_timers[name] += *timer; - } - } - - void Pipeline::Performance::log(size_t nrSubbandProcs) - { - // Group figures based on their prefix before " - ", so "compute - FIR" - // belongs to group "compute". - map<string, PerformanceCounter::figures> counter_groups; - - for (map<string, PerformanceCounter::figures>::const_iterator i = total_counters.begin(); i != total_counters.end(); ++i) { - size_t n = i->first.find(" - "); - - // discard counters without group - if (n == string::npos) - continue; - - // determine group name - string group = i->first.substr(0, n); - - // add to group - counter_groups[group] += i->second; - } - - // Log all performance totals at DEBUG level - for (map<string, PerformanceCounter::figures>::const_iterator i = total_counters.begin(); i != total_counters.end(); ++i) { - LOG_DEBUG_STR(i->second.log(i->first)); - } - - for (map<string, SmartPtr<NSTimer> >::const_iterator i = total_timers.begin(); i != total_timers.end(); ++i) { - LOG_DEBUG_STR(*(i->second)); - } - - // Log all group totals at INFO level - for (map<string, PerformanceCounter::figures>::const_iterator i = counter_groups.begin(); i != counter_groups.end(); ++i) { - LOG_INFO_STR(i->second.log(i->first)); - } - - // Log specific performance figures for regression tests at INFO level - double wall_seconds = total_timers["CPU - total"]->getAverage(); - double gpu_seconds = counter_groups["compute"].runtime / nrGPUs; - double spin_seconds = total_timers["GPU - wait"]->getAverage(); - double input_seconds = total_timers["CPU - read input"]->getElapsed() / nrSubbandProcs; - double cpu_seconds = total_timers["CPU - process"]->getElapsed() / nrSubbandProcs; - double postprocess_seconds = total_timers["CPU - postprocess"]->getElapsed() / nrSubbandProcs; - - LOG_INFO_STR("Wall seconds spent processing : " << fixed << setw(8) << setprecision(3) << wall_seconds); - LOG_INFO_STR("GPU seconds spent computing, per GPU: " << fixed << setw(8) << setprecision(3) << gpu_seconds); - LOG_INFO_STR("Spin seconds spent polling, per block: " << fixed << setw(8) << setprecision(3) << spin_seconds); - LOG_INFO_STR("CPU seconds spent on input, per WQ: " << fixed << setw(8) << setprecision(3) << input_seconds); - LOG_INFO_STR("CPU seconds spent processing, per WQ: " << fixed << setw(8) << setprecision(3) << cpu_seconds); - LOG_INFO_STR("CPU seconds spent postprocessing, per WQ: " << fixed << setw(8) << setprecision(3) << postprocess_seconds); - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/Pipeline.h b/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/Pipeline.h deleted file mode 100644 index 759e0a893e48fc90a27e33b6fc899328806fdd84..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/Pipeline.h +++ /dev/null @@ -1,74 +0,0 @@ -//# Pipeline.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_PIPELINE_H -#define LOFAR_GPUPROC_OPENCL_PIPELINE_H - -#include <string> -#include <vector> - -#include <Common/LofarTypes.h> -#include <Common/Thread/Queue.h> -#include <CoInterface/Parset.h> -#include <CoInterface/SmartPtr.h> - -#include <GPUProc/global_defines.h> -#include <GPUProc/OpenMP_Lock.h> -#include <GPUProc/gpu_incl.h> -#include <GPUProc/SubbandProcs/SubbandProc.h> -#include <GPUProc/PerformanceCounter.h> - -namespace LOFAR -{ - namespace Cobalt - { - class Pipeline - { - public: - Pipeline(const Parset &ps); - - cl::Program createProgram(const char *sources); - - const Parset &ps; - cl::Context context; - std::vector<cl::Device> devices; - -#if defined USE_B7015 - OMP_Lock hostToDeviceLock[4], deviceToHostLock[4]; -#endif - - protected: - // combines all functionality needed for getting the total from a set of counters - struct Performance { - std::map<std::string, PerformanceCounter::figures> total_counters; - std::map<std::string, SmartPtr<NSTimer> > total_timers; - // lock on the shared data - Mutex totalsMutex; - // add the counter in this queue - void addQueue(SubbandProc &queue); - // Print a logline with results - void log(size_t nrSubbandProcs); - } performance; - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/UHEP_Pipeline.cc b/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/UHEP_Pipeline.cc deleted file mode 100644 index cdb5f9a95b88b61515bf8ec931e2d128a91f7058..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/UHEP_Pipeline.cc +++ /dev/null @@ -1,82 +0,0 @@ -//# UHEP_Pipeline.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "UHEP_Pipeline.h" - -#include <Common/LofarLogger.h> - -#include <GPUProc/global_defines.h> -#include <GPUProc/OpenMP_Lock.h> -#include <GPUProc/SubbandProcs/UHEP_SubbandProc.h> - -namespace LOFAR -{ - namespace Cobalt - { - UHEP_Pipeline::UHEP_Pipeline(const Parset &ps) - : - Pipeline(ps), - beamFormerCounter("beamformer", profiling), - transposeCounter("transpose", profiling), - invFFTcounter("inv. FFT", profiling), - invFIRfilterCounter("inv. FIR", profiling), - triggerCounter("trigger", profiling), - beamFormerWeightsCounter("BF weights", profiling), - samplesCounter("samples", profiling) - { - double startTime = omp_get_wtime(); - -#pragma omp parallel sections - { -#pragma omp section - beamFormerProgram = createProgram("UHEP/BeamFormer.cl"); -#pragma omp section - transposeProgram = createProgram("UHEP/Transpose.cl"); -#pragma omp section - invFFTprogram = createProgram("UHEP/InvFFT.cl"); -#pragma omp section - invFIRfilterProgram = createProgram("UHEP/InvFIR.cl"); -#pragma omp section - triggerProgram = createProgram("UHEP/Trigger.cl"); - } - - LOG_DEBUG_STR("compile time = " << omp_get_wtime() - startTime); - } - - void UHEP_Pipeline::doWork() - { - float delaysAtBegin[ps.nrBeams()][ps.settings.antennaFields.size()][NR_POLARIZATIONS] __attribute__((aligned(32))); - float delaysAfterEnd[ps.nrBeams()][ps.settings.antennaFields.size()][NR_POLARIZATIONS] __attribute__((aligned(32))); - float phaseOffsets[ps.settings.antennaFields.size()][NR_POLARIZATIONS] __attribute__((aligned(32))); - - memset(delaysAtBegin, 0, sizeof delaysAtBegin); - memset(delaysAfterEnd, 0, sizeof delaysAfterEnd); - memset(phaseOffsets, 0, sizeof phaseOffsets); - delaysAtBegin[0][2][0] = 1e-6, delaysAfterEnd[0][2][0] = 1.1e-6; - -#pragma omp parallel num_threads((profiling ? 1 : 2) * nrGPUs) - UHEP_SubbandProc(*this, omp_get_thread_num() % nrGPUs).doWork(&delaysAtBegin[0][0][0], &delaysAfterEnd[0][0][0], &phaseOffsets[0][0]); - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/UHEP_Pipeline.h b/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/UHEP_Pipeline.h deleted file mode 100644 index bdabfd7deb305151d3261e5cfc26bbc87f046fd7..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/Pipelines/UHEP_Pipeline.h +++ /dev/null @@ -1,51 +0,0 @@ -//# UHEP_Pipeline.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_UHEP_PIPELINE_H -#define LOFAR_GPUPROC_OPENCL_UHEP_PIPELINE_H - -#include <CoInterface/Parset.h> - -#include <GPUProc/gpu_incl.h> -#include <GPUProc/PerformanceCounter.h> -#include "Pipeline.h" - -namespace LOFAR -{ - namespace Cobalt - { - - class UHEP_Pipeline : public Pipeline - { - public: - UHEP_Pipeline(const Parset &); - - void doWork(); - - cl::Program beamFormerProgram, transposeProgram, invFFTprogram, invFIRfilterProgram, triggerProgram; - PerformanceCounter beamFormerCounter, transposeCounter, invFFTcounter, invFIRfilterCounter, triggerCounter; - PerformanceCounter beamFormerWeightsCounter, samplesCounter; - }; - - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl deleted file mode 100644 index 78a9526da817a3c7f445c4b2c8a99e43444b5ee8..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl +++ /dev/null @@ -1,803 +0,0 @@ -//# BeamFormer.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#define MAX(A,B) ((A)>(B) ? (A) : (B)) -#define NR_PASSES MAX((NR_STATIONS + 6) / 16, 1) // gives best results on GTX 680 -#define NR_STATIONS_PER_PASS ((NR_STATIONS + NR_PASSES - 1) / NR_PASSES) - -#if NR_STATIONS_PER_PASS > 48 -#error "need more passes to beam form this number of stations" -#endif - -#if NR_BITS_PER_SAMPLE == 8 -typedef char4 SampleType; -#else -typedef short4 SampleType; -#endif - - -typedef __global float2 (*ComplexVoltagesType)[NR_SUBBANDS][NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1][NR_TABS][NR_POLARIZATIONS]; -typedef __global SampleType (*SamplesType)[NR_STATIONS][NR_SUBBANDS][NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1]; -typedef __global float2 (*WeightsType)[NR_STATIONS][NR_SUBBANDS][NR_TABS]; - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *samplesPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - SamplesType samples = (SamplesType) samplesPtr; - WeightsType weights = (WeightsType) weightsPtr; - - uint pol = get_local_id(0); - uint tab = get_local_id(1); - uint subband = get_global_id(2); - - float2 sample; - __local union { - float2 samples[NR_STATIONS_PER_PASS][16][NR_POLARIZATIONS]; - float4 samples4[NR_STATIONS_PER_PASS][16]; - } _local; - -#pragma unroll - for (uint first_station = 0; first_station < NR_STATIONS; first_station += NR_STATIONS_PER_PASS) { -#if NR_STATIONS_PER_PASS >= 1 - float2 weight_00; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 0 < NR_STATIONS) - weight_00 = (*weights)[first_station + 0][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 2 - float2 weight_01; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 1 < NR_STATIONS) - weight_01 = (*weights)[first_station + 1][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 3 - float2 weight_02; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 2 < NR_STATIONS) - weight_02 = (*weights)[first_station + 2][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 4 - float2 weight_03; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 3 < NR_STATIONS) - weight_03 = (*weights)[first_station + 3][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 5 - float2 weight_04; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 4 < NR_STATIONS) - weight_04 = (*weights)[first_station + 4][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 6 - float2 weight_05; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 5 < NR_STATIONS) - weight_05 = (*weights)[first_station + 5][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 7 - float2 weight_06; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 6 < NR_STATIONS) - weight_06 = (*weights)[first_station + 6][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 8 - float2 weight_07; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 7 < NR_STATIONS) - weight_07 = (*weights)[first_station + 7][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 9 - float2 weight_08; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 8 < NR_STATIONS) - weight_08 = (*weights)[first_station + 8][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 10 - float2 weight_09; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 9 < NR_STATIONS) - weight_09 = (*weights)[first_station + 9][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 11 - float2 weight_10; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 10 < NR_STATIONS) - weight_10 = (*weights)[first_station + 10][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 12 - float2 weight_11; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 11 < NR_STATIONS) - weight_11 = (*weights)[first_station + 11][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 13 - float2 weight_12; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 12 < NR_STATIONS) - weight_12 = (*weights)[first_station + 12][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 14 - float2 weight_13; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 13 < NR_STATIONS) - weight_13 = (*weights)[first_station + 13][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 15 - float2 weight_14; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 14 < NR_STATIONS) - weight_14 = (*weights)[first_station + 14][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 16 - float2 weight_15; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 15 < NR_STATIONS) - weight_15 = (*weights)[first_station + 15][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 17 - float2 weight_16; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 16 < NR_STATIONS) - weight_16 = (*weights)[first_station + 16][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 18 - float2 weight_17; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 17 < NR_STATIONS) - weight_17 = (*weights)[first_station + 17][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 19 - float2 weight_18; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 18 < NR_STATIONS) - weight_18 = (*weights)[first_station + 18][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 20 - float2 weight_19; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 19 < NR_STATIONS) - weight_19 = (*weights)[first_station + 19][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 21 - float2 weight_20; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 20 < NR_STATIONS) - weight_20 = (*weights)[first_station + 20][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 22 - float2 weight_21; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 21 < NR_STATIONS) - weight_21 = (*weights)[first_station + 21][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 23 - float2 weight_22; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 22 < NR_STATIONS) - weight_22 = (*weights)[first_station + 22][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 24 - float2 weight_23; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 23 < NR_STATIONS) - weight_23 = (*weights)[first_station + 23][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 25 - float2 weight_24; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 24 < NR_STATIONS) - weight_24 = (*weights)[first_station + 24][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 26 - float2 weight_25; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 25 < NR_STATIONS) - weight_25 = (*weights)[first_station + 25][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 27 - float2 weight_26; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 26 < NR_STATIONS) - weight_26 = (*weights)[first_station + 26][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 28 - float2 weight_27; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 27 < NR_STATIONS) - weight_27 = (*weights)[first_station + 27][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 29 - float2 weight_28; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 28 < NR_STATIONS) - weight_28 = (*weights)[first_station + 28][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 30 - float2 weight_29; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 29 < NR_STATIONS) - weight_29 = (*weights)[first_station + 29][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 31 - float2 weight_30; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 30 < NR_STATIONS) - weight_30 = (*weights)[first_station + 30][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 32 - float2 weight_31; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 31 < NR_STATIONS) - weight_31 = (*weights)[first_station + 31][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 33 - float2 weight_32; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 32 < NR_STATIONS) - weight_32 = (*weights)[first_station + 32][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 34 - float2 weight_33; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 33 < NR_STATIONS) - weight_33 = (*weights)[first_station + 33][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 35 - float2 weight_34; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 34 < NR_STATIONS) - weight_34 = (*weights)[first_station + 34][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 36 - float2 weight_35; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 35 < NR_STATIONS) - weight_35 = (*weights)[first_station + 35][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 37 - float2 weight_36; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 36 < NR_STATIONS) - weight_36 = (*weights)[first_station + 36][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 38 - float2 weight_37; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 37 < NR_STATIONS) - weight_37 = (*weights)[first_station + 37][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 39 - float2 weight_38; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 38 < NR_STATIONS) - weight_38 = (*weights)[first_station + 38][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 40 - float2 weight_39; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 39 < NR_STATIONS) - weight_39 = (*weights)[first_station + 39][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 41 - float2 weight_40; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 40 < NR_STATIONS) - weight_40 = (*weights)[first_station + 40][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 42 - float2 weight_41; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 41 < NR_STATIONS) - weight_41 = (*weights)[first_station + 41][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 43 - float2 weight_42; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 42 < NR_STATIONS) - weight_42 = (*weights)[first_station + 42][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 44 - float2 weight_43; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 43 < NR_STATIONS) - weight_43 = (*weights)[first_station + 43][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 45 - float2 weight_44; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 44 < NR_STATIONS) - weight_44 = (*weights)[first_station + 44][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 46 - float2 weight_45; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 45 < NR_STATIONS) - weight_45 = (*weights)[first_station + 45][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 47 - float2 weight_46; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 46 < NR_STATIONS) - weight_46 = (*weights)[first_station + 46][subband][tab]; -#endif - -#if NR_STATIONS_PER_PASS >= 48 - float2 weight_47; - - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 47 < NR_STATIONS) - weight_47 = (*weights)[first_station + 47][subband][tab]; -#endif - - for (uint time = 0; time < NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1; time += 16) { - barrier(CLK_LOCAL_MEM_FENCE); - - for (uint i = get_local_id(0) + NR_POLARIZATIONS * get_local_id(1); i < NR_STATIONS_PER_PASS * 16; i += NR_TABS * NR_POLARIZATIONS) { - uint t = i % 16; - uint s = i / 16; - - if (time + t < NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1) - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + s < NR_STATIONS) - _local.samples4[0][i] = convert_float4((*samples)[first_station + s][subband][time + t]); - } - - barrier(CLK_LOCAL_MEM_FENCE); - - for (uint t = 0; t < min(16U, (NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1 - time)); t++) { - float2 sum = first_station == 0 ? 0 : (*complexVoltages)[subband][time + t][tab][pol]; - -#if NR_STATIONS_PER_PASS >= 1 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 1 < NR_STATIONS) { - sample = _local.samples[ 0][t][pol]; - sum += weight_00.xx * sample; - sum += weight_00.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 2 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 2 < NR_STATIONS) { - sample = _local.samples[ 1][t][pol]; - sum += weight_01.xx * sample; - sum += weight_01.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 3 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 3 < NR_STATIONS) { - sample = _local.samples[ 2][t][pol]; - sum += weight_02.xx * sample; - sum += weight_02.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 4 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 4 < NR_STATIONS) { - sample = _local.samples[ 3][t][pol]; - sum += weight_03.xx * sample; - sum += weight_03.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 5 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 5 < NR_STATIONS) { - sample = _local.samples[ 4][t][pol]; - sum += weight_04.xx * sample; - sum += weight_04.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 6 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 6 < NR_STATIONS) { - sample = _local.samples[ 5][t][pol]; - sum += weight_05.xx * sample; - sum += weight_05.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 7 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 7 < NR_STATIONS) { - sample = _local.samples[ 6][t][pol]; - sum += weight_06.xx * sample; - sum += weight_06.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 8 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 8 < NR_STATIONS) { - sample = _local.samples[ 7][t][pol]; - sum += weight_07.xx * sample; - sum += weight_07.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 9 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 9 < NR_STATIONS) { - sample = _local.samples[ 8][t][pol]; - sum += weight_08.xx * sample; - sum += weight_08.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 10 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 10 < NR_STATIONS) { - sample = _local.samples[ 9][t][pol]; - sum += weight_09.xx * sample; - sum += weight_09.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 11 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 11 < NR_STATIONS) { - sample = _local.samples[10][t][pol]; - sum += weight_10.xx * sample; - sum += weight_10.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 12 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 12 < NR_STATIONS) { - sample = _local.samples[11][t][pol]; - sum += weight_11.xx * sample; - sum += weight_11.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 13 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 13 < NR_STATIONS) { - sample = _local.samples[12][t][pol]; - sum += weight_12.xx * sample; - sum += weight_12.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 14 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 14 < NR_STATIONS) { - sample = _local.samples[13][t][pol]; - sum += weight_13.xx * sample; - sum += weight_13.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 15 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 15 < NR_STATIONS) { - sample = _local.samples[14][t][pol]; - sum += weight_14.xx * sample; - sum += weight_14.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 16 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 15 < NR_STATIONS) { - sample = _local.samples[15][t][pol]; - sum += weight_15.xx * sample; - sum += weight_15.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 17 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 16 < NR_STATIONS) { - sample = _local.samples[16][t][pol]; - sum += weight_16.xx * sample; - sum += weight_16.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 18 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 17 < NR_STATIONS) { - sample = _local.samples[17][t][pol]; - sum += weight_17.xx * sample; - sum += weight_17.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 19 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 18 < NR_STATIONS) { - sample = _local.samples[18][t][pol]; - sum += weight_18.xx * sample; - sum += weight_18.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 20 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 19 < NR_STATIONS) { - sample = _local.samples[19][t][pol]; - sum += weight_19.xx * sample; - sum += weight_19.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 21 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 20 < NR_STATIONS) { - sample = _local.samples[20][t][pol]; - sum += weight_20.xx * sample; - sum += weight_20.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 22 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 21 < NR_STATIONS) { - sample = _local.samples[21][t][pol]; - sum += weight_21.xx * sample; - sum += weight_21.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 23 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 22 < NR_STATIONS) { - sample = _local.samples[22][t][pol]; - sum += weight_22.xx * sample; - sum += weight_22.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 24 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 23 < NR_STATIONS) { - sample = _local.samples[23][t][pol]; - sum += weight_23.xx * sample; - sum += weight_23.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 25 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 25 < NR_STATIONS) { - sample = _local.samples[24][t][pol]; - sum += weight_24.xx * sample; - sum += weight_24.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 26 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 25 < NR_STATIONS) { - sample = _local.samples[25][t][pol]; - sum += weight_25.xx * sample; - sum += weight_25.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 27 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 26 < NR_STATIONS) { - sample = _local.samples[26][t][pol]; - sum += weight_26.xx * sample; - sum += weight_26.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 28 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 27 < NR_STATIONS) { - sample = _local.samples[27][t][pol]; - sum += weight_27.xx * sample; - sum += weight_27.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 29 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 28 < NR_STATIONS) { - sample = _local.samples[28][t][pol]; - sum += weight_28.xx * sample; - sum += weight_28.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 30 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 29 < NR_STATIONS) { - sample = _local.samples[29][t][pol]; - sum += weight_29.xx * sample; - sum += weight_29.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 31 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 30 < NR_STATIONS) { - sample = _local.samples[30][t][pol]; - sum += weight_30.xx * sample; - sum += weight_30.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 32 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 31 < NR_STATIONS) { - sample = _local.samples[31][t][pol]; - sum += weight_31.xx * sample; - sum += weight_31.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 33 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 32 < NR_STATIONS) { - sample = _local.samples[32][t][pol]; - sum += weight_32.xx * sample; - sum += weight_32.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 34 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 33 < NR_STATIONS) { - sample = _local.samples[33][t][pol]; - sum += weight_33.xx * sample; - sum += weight_33.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 35 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 34 < NR_STATIONS) { - sample = _local.samples[34][t][pol]; - sum += weight_34.xx * sample; - sum += weight_34.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 36 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 35 < NR_STATIONS) { - sample = _local.samples[35][t][pol]; - sum += weight_35.xx * sample; - sum += weight_35.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 37 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 36 < NR_STATIONS) { - sample = _local.samples[36][t][pol]; - sum += weight_36.xx * sample; - sum += weight_36.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 38 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 37 < NR_STATIONS) { - sample = _local.samples[37][t][pol]; - sum += weight_37.xx * sample; - sum += weight_37.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 39 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 38 < NR_STATIONS) { - sample = _local.samples[38][t][pol]; - sum += weight_38.xx * sample; - sum += weight_38.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 40 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 39 < NR_STATIONS) { - sample = _local.samples[39][t][pol]; - sum += weight_39.xx * sample; - sum += weight_39.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 41 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 40 < NR_STATIONS) { - sample = _local.samples[40][t][pol]; - sum += weight_40.xx * sample; - sum += weight_40.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 42 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 41 < NR_STATIONS) { - sample = _local.samples[41][t][pol]; - sum += weight_41.xx * sample; - sum += weight_41.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 43 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 42 < NR_STATIONS) { - sample = _local.samples[42][t][pol]; - sum += weight_42.xx * sample; - sum += weight_42.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 44 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 43 < NR_STATIONS) { - sample = _local.samples[43][t][pol]; - sum += weight_43.xx * sample; - sum += weight_43.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 45 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 44 < NR_STATIONS) { - sample = _local.samples[44][t][pol]; - sum += weight_44.xx * sample; - sum += weight_44.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 46 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 45 < NR_STATIONS) { - sample = _local.samples[45][t][pol]; - sum += weight_45.xx * sample; - sum += weight_45.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 47 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 46 < NR_STATIONS) { - sample = _local.samples[46][t][pol]; - sum += weight_46.xx * sample; - sum += weight_46.yy * (float2) (-sample.y, sample.x); - } -#endif - -#if NR_STATIONS_PER_PASS >= 48 - if (NR_STATIONS % NR_STATIONS_PER_PASS == 0 || first_station + 47 < NR_STATIONS) { - sample = _local.samples[47][t][pol]; - sum += weight_47.xx * sample; - sum += weight_47.yy * (float2) (-sample.y, sample.x); - } -#endif - - (*complexVoltages)[subband][time + t][tab][pol] = sum; - } - } - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.4groups b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.4groups deleted file mode 100644 index 7e7b84c9c3f2edb6662d89debec49d04bacdb9c7..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.4groups +++ /dev/null @@ -1,225 +0,0 @@ -#define NR_THREADS_PER_GROUP 4 -#define NR_STATIONS_PER_GROUP ((NR_STATIONS + NR_THREADS_PER_GROUP - 1) / NR_THREADS_PER_GROUP) - -#if NR_BITS_PER_SAMPLE == 8 -typedef char2 SampleType; -#else -typedef short2 SampleType; -#endif - -#if NR_STATIONS > 48 -#error unsupported number of stations (max = 48) -#endif - - -typedef __global float2 (*ComplexVoltagesType)[NR_SUBBANDS][NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1][NR_TABS][NR_POLARIZATIONS]; -typedef __global SampleType (*SamplesType)[NR_STATIONS][NR_SUBBANDS][NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1][NR_POLARIZATIONS]; -typedef __global float2 (*WeightsType)[NR_STATIONS][NR_SUBBANDS][NR_TABS]; - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *samplesPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - SamplesType samples = (SamplesType) samplesPtr; - WeightsType weights = (WeightsType) weightsPtr; - - uint pol = get_local_id(0) & 1; - uint group = get_local_id(0) >> 1; - uint tab = get_local_id(1); - uint subband = get_global_id(2); - uint first_station = group * NR_STATIONS_PER_GROUP; - - float2 sample; - __local float2 local_samples[16][NR_STATIONS + 1][NR_POLARIZATIONS]; - __local float2 local_sum[NR_TABS][NR_THREADS_PER_GROUP / 2][NR_POLARIZATIONS]; - -#if NR_STATIONS_PER_GROUP >= 1 - float2 weight_00 = (*weights)[first_station + 0][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 2 - float2 weight_01 = (*weights)[first_station + 1][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 3 - float2 weight_02 = (*weights)[first_station + 2][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 4 - float2 weight_03 = (*weights)[first_station + 3][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 5 - float2 weight_04 = (*weights)[first_station + 4][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 6 - float2 weight_05 = (*weights)[first_station + 5][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 7 - float2 weight_06 = (*weights)[first_station + 6][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 8 - float2 weight_07 = (*weights)[first_station + 7][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 9 - float2 weight_08 = (*weights)[first_station + 8][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 10 - float2 weight_09 = (*weights)[first_station + 9][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 11 - float2 weight_10 = (*weights)[first_station + 10][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 12 - float2 weight_11 = (*weights)[first_station + 11][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 13 - float2 weight_12 = (*weights)[first_station + 12][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 14 - float2 weight_13 = (*weights)[first_station + 13][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 15 - float2 weight_14 = (*weights)[first_station + 14][subband][tab]; -#endif -#if NR_STATIONS_PER_GROUP >= 16 - float2 weight_15 = (*weights)[first_station + 15][subband][tab]; -#endif - - for (uint time = 0; time < NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1; time += 16) { - for (uint i = get_local_id(0) + NR_THREADS_PER_GROUP * NR_POLARIZATIONS * get_local_id(1); i < NR_STATIONS * 16 * NR_POLARIZATIONS; i += NR_TABS * NR_THREADS_PER_GROUP * NR_POLARIZATIONS) { - uint p = i % NR_POLARIZATIONS; - uint t = (i / NR_POLARIZATIONS) % 16; - uint s = i / NR_POLARIZATIONS / 16; - - if (time + t < NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1) - local_samples[t][s][p] = convert_float2((*samples)[s][subband][time + t][p]); - } - - barrier(CLK_LOCAL_MEM_FENCE); - - for (uint t = 0; t < min(16U, (NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1 - time)); t++) { - float2 sum; - -#if NR_STATIONS_PER_GROUP >= 1 - sample = local_samples[t][first_station + 0][pol]; - sum = weight_00.xx * sample; - sum += weight_00.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 2 - sample = local_samples[t][first_station + 1][pol]; - sum += weight_01.xx * sample; - sum += weight_01.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 3 - sample = local_samples[t][first_station + 2][pol]; - sum += weight_02.xx * sample; - sum += weight_02.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 4 - sample = local_samples[t][first_station + 3][pol]; - sum += weight_03.xx * sample; - sum += weight_03.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 5 - sample = local_samples[t][first_station + 4][pol]; - sum += weight_04.xx * sample; - sum += weight_04.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 6 - sample = local_samples[t][first_station + 5][pol]; - sum += weight_05.xx * sample; - sum += weight_05.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 7 - sample = local_samples[t][first_station + 6][pol]; - sum += weight_06.xx * sample; - sum += weight_06.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 8 - sample = local_samples[t][first_station + 7][pol]; - sum += weight_07.xx * sample; - sum += weight_07.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 9 - sample = local_samples[t][first_station + 8][pol]; - sum += weight_08.xx * sample; - sum += weight_08.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 10 - sample = local_samples[t][first_station + 9][pol]; - sum += weight_09.xx * sample; - sum += weight_09.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 11 - sample = local_samples[t][first_station + 10][pol]; - sum += weight_10.xx * sample; - sum += weight_10.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 12 - sample = local_samples[t][first_station + 11][pol]; - sum += weight_11.xx * sample; - sum += weight_11.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 13 - sample = local_samples[t][first_station + 12][pol]; - sum += weight_12.xx * sample; - sum += weight_12.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 14 - sample = local_samples[t][first_station + 13][pol]; - sum += weight_13.xx * sample; - sum += weight_13.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 15 - sample = local_samples[t][first_station + 14][pol]; - sum += weight_14.xx * sample; - sum += weight_14.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS_PER_GROUP >= 16 - sample = local_samples[t][first_station + 15][pol]; - sum += weight_15.xx * sample; - sum += weight_15.yy * (float2) (-sample.y, sample.x); -#endif - -#if 1 - if ((group & 1) != 0) - local_sum[tab][group >> 1][pol] = sum; - - if ((group & 1) == 0) - sum += local_sum[tab][group >> 1][pol]; - - if (group == 2) - local_sum[tab][0][pol] = sum; - - if (group == 0) - (*complexVoltages)[subband][time + t][tab][pol] = sum + local_sum[tab][0][pol]; -#else - float2 other_sum; - asm ("shfl.down.b32 %0, %1, 1, 0x1F;" : "=r" (other_sum.x) : "r" (sum.x)); - asm ("shfl.down.b32 %0, %1, 1, 0x1F;" : "=r" (other_sum.y) : "r" (sum.y)); - sum += other_sum; - asm ("shfl.down.b32 %0, %1, 2, 0x1F;" : "=r" (other_sum.x) : "r" (sum.x)); - asm ("shfl.down.b32 %0, %1, 2, 0x1F;" : "=r" (other_sum.y) : "r" (sum.y)); - - if (first_station == 0) - (*complexVoltages)[subband][time + t][tab][pol] = sum + other_sum; -#endif - } - - barrier(CLK_LOCAL_MEM_FENCE); - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.hop b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.hop deleted file mode 100644 index 65f87cb7a2bd1e5d9ef60713c6a23057c5125731..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.hop +++ /dev/null @@ -1,180 +0,0 @@ -#undef USE_WARP_SHUFFLE_INSN // FIXME: Broken - -#if NR_BITS_PER_SAMPLE == 8 -typedef char2 SampleType; -#else -typedef short2 SampleType; -#endif - - -typedef __global float2 (*ComplexVoltagesType)[NR_SUBBANDS][NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1][NR_TABS][NR_POLARIZATIONS]; -typedef __global SampleType (*SamplesType)[NR_STATIONS][NR_SUBBANDS][NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1][NR_POLARIZATIONS]; -typedef __global float2 (*WeightsType)[NR_STATIONS][NR_SUBBANDS][NR_TABS]; - -float2 cmul(float2 a, float2 b) -{ - return (float2) { a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x }; -} - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *samplesPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - SamplesType samples = (SamplesType) samplesPtr; - WeightsType weights = (WeightsType) weightsPtr; - -#if defined USE_WARP_SHUFFLE_INSN - uint first_tab = 3 * get_local_id(1); - uint first_station = 6 * get_local_id(0); -#else - uint pol = get_local_id(0) & 1; - uint tab_group = (get_local_id(0) >> 1) % (NR_TABS / 3); - uint station_group = (get_local_id(0) >> 1) / (NR_TABS / 3); - uint first_tab = 3 * tab_group; - uint first_station = 6 * station_group; -#endif - uint subband = get_global_id(1); - - bool lastGroupOfStations = first_station + 6 == NR_STATIONS; - - float2 weight_0_0 = (*weights)[first_station + 0][subband][first_tab + 0]; - float2 weight_0_1 = (*weights)[first_station + 0][subband][first_tab + 1]; - float2 weight_0_2 = (*weights)[first_station + 0][subband][first_tab + 2]; - float2 weight_1_0 = (*weights)[first_station + 1][subband][first_tab + 0]; - float2 weight_1_1 = (*weights)[first_station + 1][subband][first_tab + 1]; - float2 weight_1_2 = (*weights)[first_station + 1][subband][first_tab + 2]; - float2 weight_2_0 = (*weights)[first_station + 2][subband][first_tab + 0]; - float2 weight_2_1 = (*weights)[first_station + 2][subband][first_tab + 1]; - float2 weight_2_2 = (*weights)[first_station + 2][subband][first_tab + 2]; - float2 weight_3_0 = (*weights)[first_station + 3][subband][first_tab + 0]; - float2 weight_3_1 = (*weights)[first_station + 3][subband][first_tab + 1]; - float2 weight_3_2 = (*weights)[first_station + 3][subband][first_tab + 2]; - float2 weight_4_0 = (*weights)[first_station + 4][subband][first_tab + 0]; - float2 weight_4_1 = (*weights)[first_station + 4][subband][first_tab + 1]; - float2 weight_4_2 = (*weights)[first_station + 4][subband][first_tab + 2]; - float2 weight_5_0 = (*weights)[first_station + 5][subband][first_tab + 0]; - float2 weight_5_1 = (*weights)[first_station + 5][subband][first_tab + 1]; - float2 weight_5_2 = (*weights)[first_station + 5][subband][first_tab + 2]; - -#if !defined USE_WARP_SHUFFLE_INSN - __local float2 local_sums[3][NR_STATIONS / 6][NR_TABS / 3][NR_POLARIZATIONS]; -#endif - - float2 sample_0, sample_1, sample_2, sample_3, sample_4, sample_5; - float2 sum_0, sum_1, sum_2; - -#if !defined USE_WARP_SHUFFLE_INSN - if (first_station == 0) { - local_sums[0][0][tab_group][pol] = 0; - local_sums[1][0][tab_group][pol] = 0; - local_sums[2][0][tab_group][pol] = 0; - } -#endif - - for (int time = 0 - station_group; time < (int) (NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1 + NR_STATIONS / 6 - 1 - station_group); time++) { - bool validTime = time >= 0 && time < NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1; - - if (validTime) { - sample_0 = convert_float2((*samples)[first_station + 0][subband][time][pol]); - sample_1 = convert_float2((*samples)[first_station + 1][subband][time][pol]); - sample_2 = convert_float2((*samples)[first_station + 2][subband][time][pol]); - sample_3 = convert_float2((*samples)[first_station + 3][subband][time][pol]); - sample_4 = convert_float2((*samples)[first_station + 4][subband][time][pol]); - sample_5 = convert_float2((*samples)[first_station + 5][subband][time][pol]); - } - - -#if !defined USE_WARP_SHUFFLE_INSN - barrier(CLK_LOCAL_MEM_FENCE); -#endif - - if (validTime) { -#if !defined USE_WARP_SHUFFLE_INSN - sum_0 = local_sums[0][station_group][tab_group][pol]; - sum_1 = local_sums[1][station_group][tab_group][pol]; - sum_2 = local_sums[2][station_group][tab_group][pol]; -#else - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_0.x) : "0" (sum_0.x)); - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_0.y) : "0" (sum_0.y)); - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_0.z) : "0" (sum_0.z)); - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_0.w) : "0" (sum_0.w)); - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_1.x) : "0" (sum_1.x)); - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_1.y) : "0" (sum_1.y)); - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_1.z) : "0" (sum_1.z)); - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_1.w) : "0" (sum_1.w)); - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_2.x) : "0" (sum_2.x)); - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_2.y) : "0" (sum_2.y)); - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_2.z) : "0" (sum_2.z)); - asm ("shfl.up.b32 %0, %0, 1, 0x00;" : "=r" (sum_2.w) : "0" (sum_2.w)); -#endif - - sum_0 += weight_0_0.xx * sample_0; - sum_1 += weight_0_1.xx * sample_0; - sum_2 += weight_0_2.xx * sample_0; - float2 sample_0_tr = (float2) (-sample_0.y, sample_0.x); - sum_0 += weight_0_0.yy * sample_0_tr; - sum_1 += weight_0_1.yy * sample_0_tr; - sum_2 += weight_0_2.yy * sample_0_tr; - - sum_0 += weight_1_0.xx * sample_1; - sum_1 += weight_1_1.xx * sample_1; - sum_2 += weight_1_2.xx * sample_1; - float2 sample_1_tr = (float2) (-sample_1.y, sample_1.x); - sum_0 += weight_1_0.yy * sample_1_tr; - sum_1 += weight_1_1.yy * sample_1_tr; - sum_2 += weight_1_2.yy * sample_1_tr; - - sum_0 += weight_2_0.xx * sample_2; - sum_1 += weight_2_1.xx * sample_2; - sum_2 += weight_2_2.xx * sample_2; - float2 sample_2_tr = (float2) (-sample_2.y, sample_2.x); - sum_0 += weight_2_0.yy * sample_2_tr; - sum_1 += weight_2_1.yy * sample_2_tr; - sum_2 += weight_2_2.yy * sample_2_tr; - - sum_0 += weight_3_0.xx * sample_3; - sum_1 += weight_3_1.xx * sample_3; - sum_2 += weight_3_2.xx * sample_3; - float2 sample_3_tr = (float2) (-sample_3.y, sample_3.x); - sum_0 += weight_3_0.yy * sample_3_tr; - sum_1 += weight_3_1.yy * sample_3_tr; - sum_2 += weight_3_2.yy * sample_3_tr; - - sum_0 += weight_4_0.xx * sample_4; - sum_1 += weight_4_1.xx * sample_4; - sum_2 += weight_4_2.xx * sample_4; - float2 sample_4_tr = (float2) (-sample_4.y, sample_4.x); - sum_0 += weight_4_0.yy * sample_4_tr; - sum_1 += weight_4_1.yy * sample_4_tr; - sum_2 += weight_4_2.yy * sample_4_tr; - - sum_0 += weight_5_0.xx * sample_5; - sum_1 += weight_5_1.xx * sample_5; - sum_2 += weight_5_2.xx * sample_5; - float2 sample_5_tr = (float2) (-sample_5.y, sample_5.x); - sum_0 += weight_5_0.yy * sample_5_tr; - sum_1 += weight_5_1.yy * sample_5_tr; - sum_2 += weight_5_2.yy * sample_5_tr; -#if !defined USE_WARP_SHUFFLE_INSN - } - - barrier(CLK_LOCAL_MEM_FENCE); - - if (validTime) { -#endif - if (lastGroupOfStations) { - (*complexVoltages)[subband][time][first_tab + 0][pol] = sum_0; - (*complexVoltages)[subband][time][first_tab + 1][pol] = sum_1; - (*complexVoltages)[subband][time][first_tab + 2][pol] = sum_2; -#if !defined USE_WARP_SHUFFLE_INSN - } else { - local_sums[0][station_group + 1][tab_group][pol] = sum_0; - local_sums[1][station_group + 1][tab_group][pol] = sum_1; - local_sums[2][station_group + 1][tab_group][pol] = sum_2; -#endif - } - } - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.not b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.not deleted file mode 100644 index 30fe130f42810ba63b0a7da8fe605d8a9f921d3d..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.not +++ /dev/null @@ -1,451 +0,0 @@ -#if NR_BITS_PER_SAMPLE == 8 -typedef char2 SampleType; -#else -typedef short2 SampleType; -#endif - -#if NR_STATIONS > 48 -#error unsupported number of stations (max = 48) -#endif - - -typedef __global float2 (*ComplexVoltagesType)[NR_SUBBANDS][NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1][NR_TABS][NR_POLARIZATIONS]; -typedef __global SampleType (*SamplesType)[NR_STATIONS][NR_SUBBANDS][NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1][NR_POLARIZATIONS]; -typedef __global float (*WeightsType)[NR_STATIONS][NR_SUBBANDS][NR_TABS][2]; - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *samplesPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - SamplesType samples = (SamplesType) samplesPtr; - WeightsType weights = (WeightsType) weightsPtr; - - uint ri = get_local_id(0) & 1; - uint pol = get_local_id(0) >> 1; - uint tab = get_local_id(1); - uint subband = get_global_id(2); - - float2 sample; - __local float2 local_samples[NR_STATIONS][8][NR_POLARIZATIONS]; -#if 0 - __local float2 local_tmp[NR_TABS][NR_POLARIZATIONS]; -#endif - -#if NR_STATIONS >= 1 - float weight_00 = (*weights)[ 0][subband][tab][ri]; -#endif -#if NR_STATIONS >= 2 - float weight_01 = (*weights)[ 1][subband][tab][ri]; -#endif -#if NR_STATIONS >= 3 - float weight_02 = (*weights)[ 2][subband][tab][ri]; -#endif -#if NR_STATIONS >= 4 - float weight_03 = (*weights)[ 3][subband][tab][ri]; -#endif -#if NR_STATIONS >= 5 - float weight_04 = (*weights)[ 4][subband][tab][ri]; -#endif -#if NR_STATIONS >= 6 - float weight_05 = (*weights)[ 5][subband][tab][ri]; -#endif -#if NR_STATIONS >= 7 - float weight_06 = (*weights)[ 6][subband][tab][ri]; -#endif -#if NR_STATIONS >= 8 - float weight_07 = (*weights)[ 7][subband][tab][ri]; -#endif -#if NR_STATIONS >= 9 - float weight_08 = (*weights)[ 8][subband][tab][ri]; -#endif -#if NR_STATIONS >= 10 - float weight_09 = (*weights)[ 9][subband][tab][ri]; -#endif -#if NR_STATIONS >= 11 - float weight_10 = (*weights)[10][subband][tab][ri]; -#endif -#if NR_STATIONS >= 12 - float weight_11 = (*weights)[11][subband][tab][ri]; -#endif -#if NR_STATIONS >= 13 - float weight_12 = (*weights)[12][subband][tab][ri]; -#endif -#if NR_STATIONS >= 14 - float weight_13 = (*weights)[13][subband][tab][ri]; -#endif -#if NR_STATIONS >= 15 - float weight_14 = (*weights)[14][subband][tab][ri]; -#endif -#if NR_STATIONS >= 16 - float weight_15 = (*weights)[15][subband][tab][ri]; -#endif -#if NR_STATIONS >= 17 - float weight_16 = (*weights)[16][subband][tab][ri]; -#endif -#if NR_STATIONS >= 18 - float weight_17 = (*weights)[17][subband][tab][ri]; -#endif -#if NR_STATIONS >= 19 - float weight_18 = (*weights)[18][subband][tab][ri]; -#endif -#if NR_STATIONS >= 20 - float weight_19 = (*weights)[19][subband][tab][ri]; -#endif -#if NR_STATIONS >= 21 - float weight_20 = (*weights)[20][subband][tab][ri]; -#endif -#if NR_STATIONS >= 22 - float weight_21 = (*weights)[21][subband][tab][ri]; -#endif -#if NR_STATIONS >= 23 - float weight_22 = (*weights)[22][subband][tab][ri]; -#endif -#if NR_STATIONS >= 24 - float weight_23 = (*weights)[23][subband][tab][ri]; -#endif -#if NR_STATIONS >= 25 - float weight_24 = (*weights)[24][subband][tab][ri]; -#endif -#if NR_STATIONS >= 26 - float weight_25 = (*weights)[25][subband][tab][ri]; -#endif -#if NR_STATIONS >= 27 - float weight_26 = (*weights)[26][subband][tab][ri]; -#endif -#if NR_STATIONS >= 28 - float weight_27 = (*weights)[27][subband][tab][ri]; -#endif -#if NR_STATIONS >= 29 - float weight_28 = (*weights)[28][subband][tab][ri]; -#endif -#if NR_STATIONS >= 30 - float weight_29 = (*weights)[29][subband][tab][ri]; -#endif -#if NR_STATIONS >= 31 - float weight_30 = (*weights)[30][subband][tab][ri]; -#endif -#if NR_STATIONS >= 32 - float weight_31 = (*weights)[31][subband][tab][ri]; -#endif -#if NR_STATIONS >= 33 - float weight_32 = (*weights)[32][subband][tab][ri]; -#endif -#if NR_STATIONS >= 34 - float weight_33 = (*weights)[33][subband][tab][ri]; -#endif -#if NR_STATIONS >= 35 - float weight_34 = (*weights)[34][subband][tab][ri]; -#endif -#if NR_STATIONS >= 36 - float weight_35 = (*weights)[35][subband][tab][ri]; -#endif -#if NR_STATIONS >= 37 - float weight_36 = (*weights)[36][subband][tab][ri]; -#endif -#if NR_STATIONS >= 38 - float weight_37 = (*weights)[37][subband][tab][ri]; -#endif -#if NR_STATIONS >= 39 - float weight_38 = (*weights)[38][subband][tab][ri]; -#endif -#if NR_STATIONS >= 40 - float weight_39 = (*weights)[39][subband][tab][ri]; -#endif -#if NR_STATIONS >= 41 - float weight_40 = (*weights)[40][subband][tab][ri]; -#endif -#if NR_STATIONS >= 42 - float weight_41 = (*weights)[41][subband][tab][ri]; -#endif -#if NR_STATIONS >= 43 - float weight_42 = (*weights)[42][subband][tab][ri]; -#endif -#if NR_STATIONS >= 44 - float weight_43 = (*weights)[43][subband][tab][ri]; -#endif -#if NR_STATIONS >= 45 - float weight_44 = (*weights)[44][subband][tab][ri]; -#endif -#if NR_STATIONS >= 46 - float weight_45 = (*weights)[45][subband][tab][ri]; -#endif -#if NR_STATIONS >= 47 - float weight_46 = (*weights)[46][subband][tab][ri]; -#endif -#if NR_STATIONS >= 48 - float weight_47 = (*weights)[47][subband][tab][ri]; -#endif - - for (uint time = 0; time < NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1; time += 8) { - for (uint i = get_local_id(0) + NR_POLARIZATIONS * 2 * get_local_id(1); i < NR_STATIONS * 8 * NR_POLARIZATIONS; i += NR_TABS * NR_POLARIZATIONS * 2) { - uint p = i % NR_POLARIZATIONS; - uint t = (i / NR_POLARIZATIONS) % 8; - uint s = i / NR_POLARIZATIONS / 8; - - if (time + t < NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1) - local_samples[0][0][i] = convert_float2((*samples)[s][subband][time + t][p]); - } - - barrier(CLK_LOCAL_MEM_FENCE); - - for (uint t = 0; t < min(8U, (NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1 - time)); t++) { - float2 sum = 0; - -#if NR_STATIONS >= 1 - sample = local_samples[ 0][t][pol]; - sum += weight_00 * sample; -#endif - -#if NR_STATIONS >= 2 - sample = local_samples[ 1][t][pol]; - sum += weight_01 * sample; -#endif - -#if NR_STATIONS >= 3 - sample = local_samples[ 2][t][pol]; - sum += weight_02 * sample; -#endif - -#if NR_STATIONS >= 4 - sample = local_samples[ 3][t][pol]; - sum += weight_03 * sample; -#endif - -#if NR_STATIONS >= 5 - sample = local_samples[ 4][t][pol]; - sum += weight_04 * sample; -#endif - -#if NR_STATIONS >= 6 - sample = local_samples[ 5][t][pol]; - sum += weight_05 * sample; -#endif - -#if NR_STATIONS >= 7 - sample = local_samples[ 6][t][pol]; - sum += weight_06 * sample; -#endif - -#if NR_STATIONS >= 8 - sample = local_samples[ 7][t][pol]; - sum += weight_07 * sample; -#endif - -#if NR_STATIONS >= 9 - sample = local_samples[ 8][t][pol]; - sum += weight_08 * sample; -#endif - -#if NR_STATIONS >= 10 - sample = local_samples[ 9][t][pol]; - sum += weight_09 * sample; -#endif - -#if NR_STATIONS >= 11 - sample = local_samples[10][t][pol]; - sum += weight_10 * sample; -#endif - -#if NR_STATIONS >= 12 - sample = local_samples[11][t][pol]; - sum += weight_11 * sample; -#endif - -#if NR_STATIONS >= 13 - sample = local_samples[12][t][pol]; - sum += weight_12 * sample; -#endif - -#if NR_STATIONS >= 14 - sample = local_samples[13][t][pol]; - sum += weight_13 * sample; -#endif - -#if NR_STATIONS >= 15 - sample = local_samples[14][t][pol]; - sum += weight_14 * sample; -#endif - -#if NR_STATIONS >= 16 - sample = local_samples[15][t][pol]; - sum += weight_15 * sample; -#endif - -#if NR_STATIONS >= 17 - sample = local_samples[16][t][pol]; - sum += weight_16 * sample; -#endif - -#if NR_STATIONS >= 18 - sample = local_samples[17][t][pol]; - sum += weight_17 * sample; -#endif - -#if NR_STATIONS >= 19 - sample = local_samples[18][t][pol]; - sum += weight_18 * sample; -#endif - -#if NR_STATIONS >= 20 - sample = local_samples[19][t][pol]; - sum += weight_19 * sample; -#endif - -#if NR_STATIONS >= 21 - sample = local_samples[20][t][pol]; - sum += weight_20 * sample; -#endif - -#if NR_STATIONS >= 22 - sample = local_samples[21][t][pol]; - sum += weight_21 * sample; -#endif - -#if NR_STATIONS >= 23 - sample = local_samples[22][t][pol]; - sum += weight_22 * sample; -#endif - -#if NR_STATIONS >= 24 - sample = local_samples[23][t][pol]; - sum += weight_23 * sample; -#endif - -#if NR_STATIONS >= 25 - sample = local_samples[24][t][pol]; - sum += weight_24 * sample; -#endif - -#if NR_STATIONS >= 26 - sample = local_samples[25][t][pol]; - sum += weight_25 * sample; -#endif - -#if NR_STATIONS >= 27 - sample = local_samples[26][t][pol]; - sum += weight_26 * sample; -#endif - -#if NR_STATIONS >= 28 - sample = local_samples[27][t][pol]; - sum += weight_27 * sample; -#endif - -#if NR_STATIONS >= 29 - sample = local_samples[28][t][pol]; - sum += weight_28 * sample; -#endif - -#if NR_STATIONS >= 30 - sample = local_samples[29][t][pol]; - sum += weight_29 * sample; -#endif - -#if NR_STATIONS >= 31 - sample = local_samples[30][t][pol]; - sum += weight_30 * sample; -#endif - -#if NR_STATIONS >= 32 - sample = local_samples[31][t][pol]; - sum += weight_31 * sample; -#endif - -#if NR_STATIONS >= 33 - sample = local_samples[32][t][pol]; - sum += weight_32 * sample; -#endif - -#if NR_STATIONS >= 34 - sample = local_samples[33][t][pol]; - sum += weight_33 * sample; -#endif - -#if NR_STATIONS >= 35 - sample = local_samples[34][t][pol]; - sum += weight_34 * sample; -#endif - -#if NR_STATIONS >= 36 - sample = local_samples[35][t][pol]; - sum += weight_35 * sample; -#endif - -#if NR_STATIONS >= 37 - sample = local_samples[36][t][pol]; - sum += weight_36 * sample; -#endif - -#if NR_STATIONS >= 38 - sample = local_samples[37][t][pol]; - sum += weight_37 * sample; -#endif - -#if NR_STATIONS >= 39 - sample = local_samples[38][t][pol]; - sum += weight_38 * sample; -#endif - -#if NR_STATIONS >= 40 - sample = local_samples[39][t][pol]; - sum += weight_39 * sample; -#endif - -#if NR_STATIONS >= 41 - sample = local_samples[40][t][pol]; - sum += weight_40 * sample; -#endif - -#if NR_STATIONS >= 42 - sample = local_samples[41][t][pol]; - sum += weight_41 * sample; -#endif - -#if NR_STATIONS >= 43 - sample = local_samples[42][t][pol]; - sum += weight_42 * sample; -#endif - -#if NR_STATIONS >= 44 - sample = local_samples[43][t][pol]; - sum += weight_43 * sample; -#endif - -#if NR_STATIONS >= 45 - sample = local_samples[44][t][pol]; - sum += weight_44 * sample; -#endif - -#if NR_STATIONS >= 46 - sample = local_samples[45][t][pol]; - sum += weight_45 * sample; -#endif - -#if NR_STATIONS >= 47 - sum += weight_46 * local_samples[46][t][pol]; -#endif - -#if NR_STATIONS >= 48 - sum += weight_47 * local_samples[47][t][pol]; -#endif - -#if 0 - if (ri != 0) - local_tmp[tab][pol] = (float2) (-sum.y, sum.x); - - if (ri == 0) - (*complexVoltages)[subband][time + t][tab][pol] = sum + local_tmp[tab][pol]; -#else - float2 other_sum; - asm ("shfl.down.b32 %0, %1, 1, 0x1F;" : "=r" (other_sum.x) : "r" (sum.x)); - asm ("shfl.down.b32 %0, %1, 1, 0x1F;" : "=r" (other_sum.y) : "r" (sum.y)); - if (ri == 0) - (*complexVoltages)[subband][time + t][tab][pol] = sum + (float2) (-other_sum.y, other_sum.x); -#endif - } - - barrier(CLK_LOCAL_MEM_FENCE); - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.ok b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.ok deleted file mode 100644 index 74e67c0abc55c053ac68fa1b574d61d8d6d6ebc6..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/BeamFormer.cl.ok +++ /dev/null @@ -1,509 +0,0 @@ -#if NR_BITS_PER_SAMPLE == 8 -typedef char2 SampleType; -#else -typedef short2 SampleType; -#endif - -#if NR_STATIONS > 48 -#error unsupported number of stations (max = 48) -#endif - - -typedef __global float2 (*ComplexVoltagesType)[NR_SUBBANDS][NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1][NR_TABS][NR_POLARIZATIONS]; -typedef __global SampleType (*SamplesType)[NR_STATIONS][NR_SUBBANDS][NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1][NR_POLARIZATIONS]; -typedef __global float2 (*WeightsType)[NR_STATIONS][NR_SUBBANDS][NR_TABS]; - - -__kernel void complexVoltages(__global void *complexVoltagesPtr, - __global const void *samplesPtr, - __global const void *weightsPtr) -{ - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - SamplesType samples = (SamplesType) samplesPtr; - WeightsType weights = (WeightsType) weightsPtr; - - uint pol = get_local_id(0); - uint tab = get_local_id(1); - uint subband = get_global_id(2); - - float2 sample; - __local float2 local_samples[NR_STATIONS >= 24 ? 24 : NR_STATIONS][16][NR_POLARIZATIONS]; - -#if NR_STATIONS >= 1 - float2 weight_00 = (*weights)[ 0][subband][tab]; -#endif -#if NR_STATIONS >= 2 - float2 weight_01 = (*weights)[ 1][subband][tab]; -#endif -#if NR_STATIONS >= 3 - float2 weight_02 = (*weights)[ 2][subband][tab]; -#endif -#if NR_STATIONS >= 4 - float2 weight_03 = (*weights)[ 3][subband][tab]; -#endif -#if NR_STATIONS >= 5 - float2 weight_04 = (*weights)[ 4][subband][tab]; -#endif -#if NR_STATIONS >= 6 - float2 weight_05 = (*weights)[ 5][subband][tab]; -#endif -#if NR_STATIONS >= 7 - float2 weight_06 = (*weights)[ 6][subband][tab]; -#endif -#if NR_STATIONS >= 8 - float2 weight_07 = (*weights)[ 7][subband][tab]; -#endif -#if NR_STATIONS >= 9 - float2 weight_08 = (*weights)[ 8][subband][tab]; -#endif -#if NR_STATIONS >= 10 - float2 weight_09 = (*weights)[ 9][subband][tab]; -#endif -#if NR_STATIONS >= 11 - float2 weight_10 = (*weights)[10][subband][tab]; -#endif -#if NR_STATIONS >= 12 - float2 weight_11 = (*weights)[11][subband][tab]; -#endif -#if NR_STATIONS >= 13 - float2 weight_12 = (*weights)[12][subband][tab]; -#endif -#if NR_STATIONS >= 14 - float2 weight_13 = (*weights)[13][subband][tab]; -#endif -#if NR_STATIONS >= 15 - float2 weight_14 = (*weights)[14][subband][tab]; -#endif -#if NR_STATIONS >= 16 - float2 weight_15 = (*weights)[15][subband][tab]; -#endif -#if NR_STATIONS >= 17 - float2 weight_16 = (*weights)[16][subband][tab]; -#endif -#if NR_STATIONS >= 18 - float2 weight_17 = (*weights)[17][subband][tab]; -#endif -#if NR_STATIONS >= 19 - float2 weight_18 = (*weights)[18][subband][tab]; -#endif -#if NR_STATIONS >= 20 - float2 weight_19 = (*weights)[19][subband][tab]; -#endif -#if NR_STATIONS >= 21 - float2 weight_20 = (*weights)[20][subband][tab]; -#endif -#if NR_STATIONS >= 22 - float2 weight_21 = (*weights)[21][subband][tab]; -#endif -#if NR_STATIONS >= 23 - float2 weight_22 = (*weights)[22][subband][tab]; -#endif -#if NR_STATIONS >= 24 - float2 weight_23 = (*weights)[23][subband][tab]; -#endif - - for (uint time = 0; time < NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1; time += 16) { - for (uint i = get_local_id(0) + NR_POLARIZATIONS * get_local_id(1); i < (NR_STATIONS >= 24 ? 24 : NR_STATIONS) * 16 * NR_POLARIZATIONS; i += NR_TABS * NR_POLARIZATIONS) { - uint p = i % NR_POLARIZATIONS; - uint t = (i / NR_POLARIZATIONS) % 16; - uint s = i / NR_POLARIZATIONS / 16; - - if (time + t < NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1) - local_samples[0][0][i] = convert_float2((*samples)[s][subband][time + t][p]); - } - - barrier(CLK_LOCAL_MEM_FENCE); - - for (uint t = 0; t < min(16U, (NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1 - time)); t++) { - float2 sum = 0; - -#if NR_STATIONS >= 1 - sample = local_samples[ 0][t][pol]; - sum += weight_00.xx * sample; - sum += weight_00.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 2 - sample = local_samples[ 1][t][pol]; - sum += weight_01.xx * sample; - sum += weight_01.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 3 - sample = local_samples[ 2][t][pol]; - sum += weight_02.xx * sample; - sum += weight_02.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 4 - sample = local_samples[ 3][t][pol]; - sum += weight_03.xx * sample; - sum += weight_03.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 5 - sample = local_samples[ 4][t][pol]; - sum += weight_04.xx * sample; - sum += weight_04.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 6 - sample = local_samples[ 5][t][pol]; - sum += weight_05.xx * sample; - sum += weight_05.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 7 - sample = local_samples[ 6][t][pol]; - sum += weight_06.xx * sample; - sum += weight_06.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 8 - sample = local_samples[ 7][t][pol]; - sum += weight_07.xx * sample; - sum += weight_07.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 9 - sample = local_samples[ 8][t][pol]; - sum += weight_08.xx * sample; - sum += weight_08.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 10 - sample = local_samples[ 9][t][pol]; - sum += weight_09.xx * sample; - sum += weight_09.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 11 - sample = local_samples[10][t][pol]; - sum += weight_10.xx * sample; - sum += weight_10.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 12 - sample = local_samples[11][t][pol]; - sum += weight_11.xx * sample; - sum += weight_11.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 13 - sample = local_samples[12][t][pol]; - sum += weight_12.xx * sample; - sum += weight_12.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 14 - sample = local_samples[13][t][pol]; - sum += weight_13.xx * sample; - sum += weight_13.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 15 - sample = local_samples[14][t][pol]; - sum += weight_14.xx * sample; - sum += weight_14.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 16 - sample = local_samples[15][t][pol]; - sum += weight_15.xx * sample; - sum += weight_15.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 17 - sample = local_samples[16][t][pol]; - sum += weight_16.xx * sample; - sum += weight_16.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 18 - sample = local_samples[17][t][pol]; - sum += weight_17.xx * sample; - sum += weight_17.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 19 - sample = local_samples[18][t][pol]; - sum += weight_18.xx * sample; - sum += weight_18.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 20 - sample = local_samples[19][t][pol]; - sum += weight_19.xx * sample; - sum += weight_19.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 21 - sample = local_samples[20][t][pol]; - sum += weight_20.xx * sample; - sum += weight_20.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 22 - sample = local_samples[21][t][pol]; - sum += weight_21.xx * sample; - sum += weight_21.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 23 - sample = local_samples[22][t][pol]; - sum += weight_22.xx * sample; - sum += weight_22.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 24 - sample = local_samples[23][t][pol]; - sum += weight_23.xx * sample; - sum += weight_23.yy * (float2) (-sample.y, sample.x); -#endif - - (*complexVoltages)[subband][time + t][tab][pol] = sum; - } - - barrier(CLK_LOCAL_MEM_FENCE); - } - -#if NR_STATIONS > 24 -#if NR_STATIONS >= 25 - float2 weight_24 = (*weights)[24][subband][tab]; -#endif -#if NR_STATIONS >= 26 - float2 weight_25 = (*weights)[25][subband][tab]; -#endif -#if NR_STATIONS >= 27 - float2 weight_26 = (*weights)[26][subband][tab]; -#endif -#if NR_STATIONS >= 28 - float2 weight_27 = (*weights)[27][subband][tab]; -#endif -#if NR_STATIONS >= 29 - float2 weight_28 = (*weights)[28][subband][tab]; -#endif -#if NR_STATIONS >= 30 - float2 weight_29 = (*weights)[29][subband][tab]; -#endif -#if NR_STATIONS >= 31 - float2 weight_30 = (*weights)[30][subband][tab]; -#endif -#if NR_STATIONS >= 32 - float2 weight_31 = (*weights)[31][subband][tab]; -#endif -#if NR_STATIONS >= 33 - float2 weight_32 = (*weights)[32][subband][tab]; -#endif -#if NR_STATIONS >= 34 - float2 weight_33 = (*weights)[33][subband][tab]; -#endif -#if NR_STATIONS >= 35 - float2 weight_34 = (*weights)[34][subband][tab]; -#endif -#if NR_STATIONS >= 36 - float2 weight_35 = (*weights)[35][subband][tab]; -#endif -#if NR_STATIONS >= 37 - float2 weight_36 = (*weights)[36][subband][tab]; -#endif -#if NR_STATIONS >= 38 - float2 weight_37 = (*weights)[37][subband][tab]; -#endif -#if NR_STATIONS >= 39 - float2 weight_38 = (*weights)[38][subband][tab]; -#endif -#if NR_STATIONS >= 40 - float2 weight_39 = (*weights)[39][subband][tab]; -#endif -#if NR_STATIONS >= 41 - float2 weight_40 = (*weights)[40][subband][tab]; -#endif -#if NR_STATIONS >= 42 - float2 weight_41 = (*weights)[41][subband][tab]; -#endif -#if NR_STATIONS >= 43 - float2 weight_42 = (*weights)[42][subband][tab]; -#endif -#if NR_STATIONS >= 44 - float2 weight_43 = (*weights)[43][subband][tab]; -#endif -#if NR_STATIONS >= 45 - float2 weight_44 = (*weights)[44][subband][tab]; -#endif -#if NR_STATIONS >= 46 - float2 weight_45 = (*weights)[45][subband][tab]; -#endif -#if NR_STATIONS >= 47 - float2 weight_46 = (*weights)[46][subband][tab]; -#endif -#if NR_STATIONS >= 48 - float2 weight_47 = (*weights)[47][subband][tab]; -#endif - - for (uint time = 0; time < NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1; time += 16) { - for (uint i = get_local_id(0) + NR_POLARIZATIONS * get_local_id(1); i < (NR_STATIONS - 24) * 16 * NR_POLARIZATIONS; i += NR_TABS * NR_POLARIZATIONS) { - uint p = i % NR_POLARIZATIONS; - uint t = (i / NR_POLARIZATIONS) % 16; - uint s = i / NR_POLARIZATIONS / 16; - - if (time + t < NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1) - local_samples[0][0][i] = convert_float2((*samples)[24 + s][subband][time + t][p]); - } - - barrier(CLK_LOCAL_MEM_FENCE); - - for (uint t = 0; t < min(16U, (NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1 - time)); t++) { - float2 sum = (*complexVoltages)[subband][time + t][tab][pol]; - -#if NR_STATIONS >= 25 - sample = local_samples[ 0][t][pol]; - sum += weight_24.xx * sample; - sum += weight_24.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 26 - sample = local_samples[ 1][t][pol]; - sum += weight_25.xx * sample; - sum += weight_25.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 27 - sample = local_samples[ 2][t][pol]; - sum += weight_26.xx * sample; - sum += weight_26.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 28 - sample = local_samples[ 3][t][pol]; - sum += weight_27.xx * sample; - sum += weight_27.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 29 - sample = local_samples[ 4][t][pol]; - sum += weight_28.xx * sample; - sum += weight_28.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 30 - sample = local_samples[ 5][t][pol]; - sum += weight_29.xx * sample; - sum += weight_29.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 31 - sample = local_samples[ 6][t][pol]; - sum += weight_30.xx * sample; - sum += weight_30.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 32 - sample = local_samples[ 7][t][pol]; - sum += weight_31.xx * sample; - sum += weight_31.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 33 - sample = local_samples[ 8][t][pol]; - sum += weight_32.xx * sample; - sum += weight_32.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 34 - sample = local_samples[ 9][t][pol]; - sum += weight_33.xx * sample; - sum += weight_33.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 35 - sample = local_samples[10][t][pol]; - sum += weight_34.xx * sample; - sum += weight_34.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 36 - sample = local_samples[11][t][pol]; - sum += weight_35.xx * sample; - sum += weight_35.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 37 - sample = local_samples[12][t][pol]; - sum += weight_36.xx * sample; - sum += weight_36.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 38 - sample = local_samples[13][t][pol]; - sum += weight_37.xx * sample; - sum += weight_37.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 39 - sample = local_samples[14][t][pol]; - sum += weight_38.xx * sample; - sum += weight_38.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 40 - sample = local_samples[15][t][pol]; - sum += weight_39.xx * sample; - sum += weight_39.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 41 - sample = local_samples[16][t][pol]; - sum += weight_40.xx * sample; - sum += weight_40.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 42 - sample = local_samples[17][t][pol]; - sum += weight_41.xx * sample; - sum += weight_41.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 43 - sample = local_samples[18][t][pol]; - sum += weight_42.xx * sample; - sum += weight_42.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 44 - sample = local_samples[19][t][pol]; - sum += weight_43.xx * sample; - sum += weight_19.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 45 - sample = local_samples[20][t][pol]; - sum += weight_44.xx * sample; - sum += weight_44.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 46 - sample = local_samples[21][t][pol]; - sum += weight_45.xx * sample; - sum += weight_45.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 47 - sample = local_samples[22][t][pol]; - sum += weight_46.xx * sample; - sum += weight_46.yy * (float2) (-sample.y, sample.x); -#endif - -#if NR_STATIONS >= 48 - sample = local_samples[23][t][pol]; - sum += weight_47.xx * sample; - sum += weight_47.yy * (float2) (-sample.y, sample.x); -#endif - - (*complexVoltages)[subband][time + t][tab][pol] = sum; - } - - barrier(CLK_LOCAL_MEM_FENCE); - } -#endif -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvFFT.cl b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvFFT.cl deleted file mode 100644 index ec9554deb1ef351acafbad9618524655ace91204..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvFFT.cl +++ /dev/null @@ -1,314 +0,0 @@ -//# InvFFT.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include "math.cl" - - -typedef __global float (*InvFFTedDataType)[NR_TABS][NR_POLARIZATIONS][NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1][1024]; -typedef __global float2 (*TransposedDataType)[NR_TABS][NR_POLARIZATIONS][NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1][512]; - - -float2 inv(float2 a) -{ - return (float2) (-a.y, a.x); -} - - -void inv4(float2 *R0, float2 *R1, float2 *R2, float2 *R3) -{ - float2 T0, T1, T2, T3; - - T1 = (*R1); - (*R1) = (*R2); - (*R2) = T1; - - T0 = (*R0), T1 = (*R1), (*R0) = T0 + T1, (*R1) = T0 - T1; - T2 = (*R2), T3 = (*R3), (*R2) = T2 + T3, (*R3) = T2 - T3; - - T0 = (*R0), T2 = (*R2), (*R0) = T0 + T2, (*R2) = T0 - T2; - T1 = (*R1), T3 = inv(*R3), (*R1) = T1 + T3, (*R3) = T1 - T3; -} - - -void inv8(float2 *R0, float2 *R1, float2 *R2, float2 *R3, float2 *R4, float2 *R5, float2 *R6, float2 *R7) -{ - const float HSQR2 = .70710678118654752440f; - float2 T0, T1, T2, T3, T4, T5, T6, T7; - - T1 = (*R1); - (*R1) = (*R4); - (*R4) = T1; - T3 = (*R3); - (*R3) = (*R6); - (*R6) = T3; - - T0 = (*R0), T1 = (*R1), (*R0) = T0 + T1, (*R1) = T0 - T1; - T2 = (*R2), T3 = (*R3), (*R2) = T2 + T3, (*R3) = T2 - T3; - T4 = (*R4), T5 = (*R5), (*R4) = T4 + T5, (*R5) = T4 - T5; - T6 = (*R6), T7 = (*R7), (*R6) = T6 + T7, (*R7) = T6 - T7; - - T0 = (*R0), T2 = (*R2), (*R0) = T0 + T2, (*R2) = T0 - T2; - T1 = (*R1), T3 = inv(*R3), (*R1) = T1 + T3, (*R3) = T1 - T3; - T4 = (*R4), T6 = (*R6), (*R4) = T4 + T6, (*R6) = T4 - T6; - T5 = (*R5), T7 = inv(*R7), (*R5) = T5 + T7, (*R7) = T5 - T7; - - T0 = (*R0), T4 = (*R4), (*R0) = T0 + T4, (*R4) = T0 - T4; - T1 = (*R1), T5 = HSQR2 * (inv(*R5) + (*R5)), (*R1) = T1 + T5, (*R5) = T1 - T5; - T2 = (*R2), T6 = inv(*R6), (*R2) = T2 + T6, (*R6) = T2 - T6; - T3 = (*R3), T7 = HSQR2 * (inv(*R7) - (*R7)), (*R3) = T3 + T7, (*R7) = T3 - T7; -} - - -__kernel __attribute__((reqd_work_group_size(128, 1, 1))) -void inv_fft(__global float2 *outputPtr, __global const float *inputPtr) -{ - InvFFTedDataType invFFTedData = (InvFFTedDataType) outputPtr; - TransposedDataType transposedData = (TransposedDataType) inputPtr; - - const float PI = 3.14159265358979323844f; - - __local union { - float f1[1024]; - float2 f2[512]; - float4 f4[256]; - float8 f8[128]; - } lds; - - uint windex; - float ang; - float2 R0, R1, R2, R3, R4, R5, R6, R7; - float2 W0, W1, W2, W3; - -#if 0 - __global float2 *bufIn = inputPtr + get_global_id(1) * 512; - __global float *bufOut = outputPtr + get_global_id(1) * 1024; - - R0 = bufIn[get_local_id(0) + 0]; - R1 = bufIn[get_local_id(0) + 128]; - R2 = bufIn[get_local_id(0) + 256]; - R3 = bufIn[get_local_id(0) + 384]; -#else - R0 = (*transposedData)[0][0][get_global_id(1)][get_local_id(0) + 0]; - R1 = (*transposedData)[0][0][get_global_id(1)][get_local_id(0) + 128]; - R2 = (*transposedData)[0][0][get_global_id(1)][get_local_id(0) + 256]; - R3 = (*transposedData)[0][0][get_global_id(1)][get_local_id(0) + 384]; -#endif - - lds.f2[get_local_id(0) + 0] = R0; - lds.f2[get_local_id(0) + 128] = R1; - lds.f2[get_local_id(0) + 256] = R2; - lds.f2[get_local_id(0) + 384] = R3; - - barrier(CLK_LOCAL_MEM_FENCE); - - if (get_local_id(0) == 0) { - R4 = (float2) (R0.y, 0); - R0 = (float2) (R0.x, 0); - //R4 = (float2) (bufIn[512].x, 0); - } else { - R4 = lds.f2[512 - get_local_id(0)]; - } - - R5 = lds.f2[384 - get_local_id(0)]; - R6 = lds.f2[256 - get_local_id(0)]; - R7 = lds.f2[128 - get_local_id(0)]; - R4.y = -R4.y; - R5.y = -R5.y; - R6.y = -R6.y; - R7.y = -R7.y; - - inv8(&R0, &R1, &R2, &R3, &R4, &R5, &R6, &R7); - - barrier(CLK_LOCAL_MEM_FENCE); - - lds.f8[get_local_id(0)] = (float8) (R0.x, R1.x, R2.x, R3.x, R4.x, R5.x, R6.x, R7.x); - - barrier(CLK_LOCAL_MEM_FENCE); - - R0.x = lds.f1[get_local_id(0) + 0]; - R1.x = lds.f1[get_local_id(0) + 128]; - R2.x = lds.f1[get_local_id(0) + 256]; - R3.x = lds.f1[get_local_id(0) + 384]; - R4.x = lds.f1[get_local_id(0) + 512]; - R5.x = lds.f1[get_local_id(0) + 640]; - R6.x = lds.f1[get_local_id(0) + 768]; - R7.x = lds.f1[get_local_id(0) + 896]; - - barrier(CLK_LOCAL_MEM_FENCE); - - lds.f8[get_local_id(0)] = (float8) (R0.y, R1.y, R2.y, R3.y, R4.y, R5.y, R6.y, R7.y); - - barrier(CLK_LOCAL_MEM_FENCE); - - R0.y = lds.f1[get_local_id(0) + 0]; - R1.y = lds.f1[get_local_id(0) + 128]; - R2.y = lds.f1[get_local_id(0) + 256]; - R3.y = lds.f1[get_local_id(0) + 384]; - R4.y = lds.f1[get_local_id(0) + 512]; - R5.y = lds.f1[get_local_id(0) + 640]; - R6.y = lds.f1[get_local_id(0) + 768]; - R7.y = lds.f1[get_local_id(0) + 896]; - - barrier(CLK_LOCAL_MEM_FENCE); - - ang = 2.0f * PI / 64.0f * (float) (get_local_id(0) % 8); - R1 = cmul(cexp( ang), R1); - R2 = cmul(cexp(2.0f * ang), R2); - R3 = cmul(cexp(3.0f * ang), R3); - R4 = cmul(cexp(4.0f * ang), R4); - R5 = cmul(cexp(5.0f * ang), R5); - R6 = cmul(cexp(6.0f * ang), R6); - R7 = cmul(cexp(7.0f * ang), R7); - - inv8(&R0, &R1, &R2, &R3, &R4, &R5, &R6, &R7); - - windex = 64 * (get_local_id(0) / 8) + get_local_id(0) % 8; - lds.f1[windex + 0] = R0.x; - lds.f1[windex + 8] = R1.x; - lds.f1[windex + 16] = R2.x; - lds.f1[windex + 24] = R3.x; - lds.f1[windex + 32] = R4.x; - lds.f1[windex + 40] = R5.x; - lds.f1[windex + 48] = R6.x; - lds.f1[windex + 56] = R7.x; - - barrier(CLK_LOCAL_MEM_FENCE); - - W0 = lds.f2[get_local_id(0) + 0]; - W1 = lds.f2[get_local_id(0) + 128]; - W2 = lds.f2[get_local_id(0) + 256]; - W3 = lds.f2[get_local_id(0) + 384]; - R0.x = W0.x; - R1.x = W1.x; - R2.x = W2.x; - R3.x = W3.x; - R4.x = W0.y; - R5.x = W1.y; - R6.x = W2.y; - R7.x = W3.y; - - barrier(CLK_LOCAL_MEM_FENCE); - - lds.f1[windex + 0] = R0.y; - lds.f1[windex + 8] = R1.y; - lds.f1[windex + 16] = R2.y; - lds.f1[windex + 24] = R3.y; - lds.f1[windex + 32] = R4.y; - lds.f1[windex + 40] = R5.y; - lds.f1[windex + 48] = R6.y; - lds.f1[windex + 56] = R7.y; - - barrier(CLK_LOCAL_MEM_FENCE); - - W0 = lds.f2[get_local_id(0) + 0]; - W1 = lds.f2[get_local_id(0) + 128]; - W2 = lds.f2[get_local_id(0) + 256]; - W3 = lds.f2[get_local_id(0) + 384]; - R0.y = W0.x; - R1.y = W1.x; - R2.y = W2.x; - R3.y = W3.x; - R4.y = W0.y; - R5.y = W1.y; - R6.y = W2.y; - R7.y = W3.y; - - barrier(CLK_LOCAL_MEM_FENCE); - - ang = 2.0f * PI / 256.0f * (2 * (get_local_id(0) % 32)); - R1 = cmul(cexp( ang), R1); - R2 = cmul(cexp(2.0f * ang), R2); - R3 = cmul(cexp(3.0f * ang), R3); - ang += 2.0f * PI / 256.0f; - R5 = cmul(cexp( ang), R5); - R6 = cmul(cexp(2.0f * ang), R6); - R7 = cmul(cexp(3.0f * ang), R7); - - inv4(&R0, &R1, &R2, &R3); - inv4(&R4, &R5, &R6, &R7); - - windex = 128 * (get_local_id(0) / 32) + get_local_id(0) % 32; - lds.f2[windex + 0] = (float2) (R0.x, R4.x); - lds.f2[windex + 32] = (float2) (R1.x, R5.x); - lds.f2[windex + 64] = (float2) (R2.x, R6.x); - lds.f2[windex + 96] = (float2) (R3.x, R7.x); - - barrier(CLK_LOCAL_MEM_FENCE); - - W0 = lds.f2[get_local_id(0) + 0]; - W1 = lds.f2[get_local_id(0) + 128]; - W2 = lds.f2[get_local_id(0) + 256]; - W3 = lds.f2[get_local_id(0) + 384]; - R0.x = W0.x; - R1.x = W1.x; - R2.x = W2.x; - R3.x = W3.x; - R4.x = W0.y; - R5.x = W1.y; - R6.x = W2.y; - R7.x = W3.y; - - lds.f2[get_local_id(0) + 0] = (float2) (R0.y, R4.y); - lds.f2[get_local_id(0) + 128] = (float2) (R1.y, R5.y); - lds.f2[get_local_id(0) + 256] = (float2) (R2.y, R6.y); - lds.f2[get_local_id(0) + 384] = (float2) (R3.y, R7.y); - - barrier(CLK_LOCAL_MEM_FENCE); - - W0 = lds.f2[windex + 0]; - W1 = lds.f2[windex + 32]; - W2 = lds.f2[windex + 64]; - W3 = lds.f2[windex + 96]; - R0.y = W0.x; - R1.y = W1.x; - R2.y = W2.x; - R3.y = W3.x; - R4.y = W0.y; - R5.y = W1.y; - R6.y = W2.y; - R7.y = W3.y; - - ang = 2.0f * PI / 1024.0f * (2 * get_local_id(0)); - R1 = cmul(cexp( ang), R1); - R2 = cmul(cexp(2.0f * ang), R2); - R3 = cmul(cexp(3.0f * ang), R3); - ang += 2.0f * PI / 1024.0f; - R5 = cmul(cexp( ang), R5); - R6 = cmul(cexp(2.0f * ang), R6); - R7 = cmul(cexp(3.0f * ang), R7); - - inv4(&R0, &R1, &R2, &R3); - inv4(&R4, &R5, &R6, &R7); - -#if 0 - __global float2 *out = (__global float2 *) bufOut; - out[get_local_id(0) + 0] = 9.765625e-04f * (float2) (R0.x, R4.x); - out[get_local_id(0) + 128] = 9.765625e-04f * (float2) (R1.x, R5.x); - out[get_local_id(0) + 256] = 9.765625e-04f * (float2) (R2.x, R6.x); - out[get_local_id(0) + 384] = 9.765625e-04f * (float2) (R3.x, R7.x); -#else - __global float2 *out = (__global float2 *) &(*invFFTedData)[0][0][get_global_id(1)][0] + get_local_id(0); - //out[ 0] = 9.765625e-04f * (float2) (R0.x, R4.x); - //out[128] = 9.765625e-04f * (float2) (R1.x, R5.x); - //out[256] = 9.765625e-04f * (float2) (R2.x, R6.x); - //out[384] = 9.765625e-04f * (float2) (R3.x, R7.x); -#endif -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvFIR.cl b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvFIR.cl deleted file mode 100644 index a1333052860d3198ba5ce9b3d1f3d11094610a5a..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvFIR.cl +++ /dev/null @@ -1,366 +0,0 @@ -//# InvFir.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -typedef __global float (*InvFIRredDataType)[NR_TABS][NR_POLARIZATIONS][NR_SAMPLES_PER_SUBBAND][1024]; -typedef __global float (*InvFFTedDataType)[NR_TABS][NR_POLARIZATIONS][NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1][1024]; -typedef __global const float16 (*WeightsType)[1024]; - - -__kernel void invFIRfilter(__global void *invFIRredDataPtr, - __global const void *invFFTedDataPtr, - __global const void *weightsPtr) -{ - InvFIRredDataType invFIRredData = (InvFIRredDataType) invFIRredDataPtr; - InvFFTedDataType invFFTedData = (InvFFTedDataType) invFFTedDataPtr; - WeightsType weightsData = (WeightsType) weightsPtr; - - uint sub_time = get_global_id(0); - uint pol = get_global_id(1); - uint tab = get_global_id(2); - - //#pragma OPENCL EXTENSION cl_amd_printf : enable - - const float16 weights = (*weightsData)[sub_time]; - float16 delayLine; - float16 sum; - - delayLine.s0 = (*invFFTedData)[tab][pol][ 0][sub_time]; - delayLine.s1 = (*invFFTedData)[tab][pol][ 1][sub_time]; - delayLine.s2 = (*invFFTedData)[tab][pol][ 2][sub_time]; - delayLine.s3 = (*invFFTedData)[tab][pol][ 3][sub_time]; - delayLine.s4 = (*invFFTedData)[tab][pol][ 4][sub_time]; - delayLine.s5 = (*invFFTedData)[tab][pol][ 5][sub_time]; - delayLine.s6 = (*invFFTedData)[tab][pol][ 6][sub_time]; - delayLine.s7 = (*invFFTedData)[tab][pol][ 7][sub_time]; - delayLine.s8 = (*invFFTedData)[tab][pol][ 8][sub_time]; - delayLine.s9 = (*invFFTedData)[tab][pol][ 9][sub_time]; - delayLine.sA = (*invFFTedData)[tab][pol][10][sub_time]; - delayLine.sB = (*invFFTedData)[tab][pol][11][sub_time]; - delayLine.sC = (*invFFTedData)[tab][pol][12][sub_time]; - delayLine.sD = (*invFFTedData)[tab][pol][13][sub_time]; - delayLine.sE = (*invFFTedData)[tab][pol][14][sub_time]; - - for (uint time = 0; time < NR_SAMPLES_PER_SUBBAND; time += NR_STATION_FILTER_TAPS) { - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 0][sub_time]; - sum.s0 = weights.sF * delayLine.s0; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 1][sub_time]; - sum.s0 += weights.sE * delayLine.s1; - sum.s0 += weights.sD * delayLine.s2; - sum.s0 += weights.sC * delayLine.s3; - sum.s0 += weights.sB * delayLine.s4; - sum.s0 += weights.sA * delayLine.s5; - sum.s0 += weights.s9 * delayLine.s6; - sum.s0 += weights.s8 * delayLine.s7; - sum.s0 += weights.s7 * delayLine.s8; - sum.s0 += weights.s6 * delayLine.s9; - sum.s0 += weights.s5 * delayLine.sA; - sum.s0 += weights.s4 * delayLine.sB; - sum.s0 += weights.s3 * delayLine.sC; - sum.s0 += weights.s2 * delayLine.sD; - sum.s0 += weights.s1 * delayLine.sE; - sum.s0 += weights.s0 * delayLine.sF; - (*invFIRredData)[tab][pol][time + 0][sub_time] = sum.s0; - - sum.s1 = weights.sF * delayLine.s1; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 2][sub_time]; - sum.s1 += weights.sE * delayLine.s2; - sum.s1 += weights.sD * delayLine.s3; - sum.s1 += weights.sC * delayLine.s4; - sum.s1 += weights.sB * delayLine.s5; - sum.s1 += weights.sA * delayLine.s6; - sum.s1 += weights.s9 * delayLine.s7; - sum.s1 += weights.s8 * delayLine.s8; - sum.s1 += weights.s7 * delayLine.s9; - sum.s1 += weights.s6 * delayLine.sA; - sum.s1 += weights.s5 * delayLine.sB; - sum.s1 += weights.s4 * delayLine.sC; - sum.s1 += weights.s3 * delayLine.sD; - sum.s1 += weights.s2 * delayLine.sE; - sum.s1 += weights.s1 * delayLine.sF; - sum.s1 += weights.s0 * delayLine.s0; - (*invFIRredData)[tab][pol][time + 1][sub_time] = sum.s1; - - sum.s2 = weights.sF * delayLine.s2; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 3][sub_time]; - sum.s2 += weights.sE * delayLine.s3; - sum.s2 += weights.sD * delayLine.s4; - sum.s2 += weights.sC * delayLine.s5; - sum.s2 += weights.sB * delayLine.s6; - sum.s2 += weights.sA * delayLine.s7; - sum.s2 += weights.s9 * delayLine.s8; - sum.s2 += weights.s8 * delayLine.s9; - sum.s2 += weights.s7 * delayLine.sA; - sum.s2 += weights.s6 * delayLine.sB; - sum.s2 += weights.s5 * delayLine.sC; - sum.s2 += weights.s4 * delayLine.sD; - sum.s2 += weights.s3 * delayLine.sE; - sum.s2 += weights.s2 * delayLine.sF; - sum.s2 += weights.s1 * delayLine.s0; - sum.s2 += weights.s0 * delayLine.s1; - (*invFIRredData)[tab][pol][time + 2][sub_time] = sum.s2; - - sum.s3 = weights.sF * delayLine.s3; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 4][sub_time]; - sum.s3 += weights.sE * delayLine.s4; - sum.s3 += weights.sD * delayLine.s5; - sum.s3 += weights.sC * delayLine.s6; - sum.s3 += weights.sB * delayLine.s7; - sum.s3 += weights.sA * delayLine.s8; - sum.s3 += weights.s9 * delayLine.s9; - sum.s3 += weights.s8 * delayLine.sA; - sum.s3 += weights.s7 * delayLine.sB; - sum.s3 += weights.s6 * delayLine.sC; - sum.s3 += weights.s5 * delayLine.sD; - sum.s3 += weights.s4 * delayLine.sE; - sum.s3 += weights.s3 * delayLine.sF; - sum.s3 += weights.s2 * delayLine.s0; - sum.s3 += weights.s1 * delayLine.s1; - sum.s3 += weights.s0 * delayLine.s2; - (*invFIRredData)[tab][pol][time + 3][sub_time] = sum.s3; - - sum.s4 = weights.sF * delayLine.s4; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 5][sub_time]; - sum.s4 += weights.sE * delayLine.s5; - sum.s4 += weights.sD * delayLine.s6; - sum.s4 += weights.sC * delayLine.s7; - sum.s4 += weights.sB * delayLine.s8; - sum.s4 += weights.sA * delayLine.s9; - sum.s4 += weights.s9 * delayLine.sA; - sum.s4 += weights.s8 * delayLine.sB; - sum.s4 += weights.s7 * delayLine.sC; - sum.s4 += weights.s6 * delayLine.sD; - sum.s4 += weights.s5 * delayLine.sE; - sum.s4 += weights.s4 * delayLine.sF; - sum.s4 += weights.s3 * delayLine.s0; - sum.s4 += weights.s2 * delayLine.s1; - sum.s4 += weights.s1 * delayLine.s2; - sum.s4 += weights.s0 * delayLine.s3; - (*invFIRredData)[tab][pol][time + 4][sub_time] = sum.s4; - - sum.s5 = weights.sF * delayLine.s5; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 6][sub_time]; - sum.s5 += weights.sE * delayLine.s6; - sum.s5 += weights.sD * delayLine.s7; - sum.s5 += weights.sC * delayLine.s8; - sum.s5 += weights.sB * delayLine.s9; - sum.s5 += weights.sA * delayLine.sA; - sum.s5 += weights.s9 * delayLine.sB; - sum.s5 += weights.s8 * delayLine.sC; - sum.s5 += weights.s7 * delayLine.sD; - sum.s5 += weights.s6 * delayLine.sE; - sum.s5 += weights.s5 * delayLine.sF; - sum.s5 += weights.s4 * delayLine.s0; - sum.s5 += weights.s3 * delayLine.s1; - sum.s5 += weights.s2 * delayLine.s2; - sum.s5 += weights.s1 * delayLine.s3; - sum.s5 += weights.s0 * delayLine.s4; - (*invFIRredData)[tab][pol][time + 5][sub_time] = sum.s5; - - sum.s6 = weights.sF * delayLine.s6; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 7][sub_time]; - sum.s6 += weights.sE * delayLine.s7; - sum.s6 += weights.sD * delayLine.s8; - sum.s6 += weights.sC * delayLine.s9; - sum.s6 += weights.sB * delayLine.sA; - sum.s6 += weights.sA * delayLine.sB; - sum.s6 += weights.s9 * delayLine.sC; - sum.s6 += weights.s8 * delayLine.sD; - sum.s6 += weights.s7 * delayLine.sE; - sum.s6 += weights.s6 * delayLine.sF; - sum.s6 += weights.s5 * delayLine.s0; - sum.s6 += weights.s4 * delayLine.s1; - sum.s6 += weights.s3 * delayLine.s2; - sum.s6 += weights.s2 * delayLine.s3; - sum.s6 += weights.s1 * delayLine.s4; - sum.s6 += weights.s0 * delayLine.s5; - (*invFIRredData)[tab][pol][time + 6][sub_time] = sum.s6; - - sum.s7 = weights.sF * delayLine.s7; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 8][sub_time]; - sum.s7 += weights.sE * delayLine.s8; - sum.s7 += weights.sD * delayLine.s9; - sum.s7 += weights.sC * delayLine.sA; - sum.s7 += weights.sB * delayLine.sB; - sum.s7 += weights.sA * delayLine.sC; - sum.s7 += weights.s9 * delayLine.sD; - sum.s7 += weights.s8 * delayLine.sE; - sum.s7 += weights.s7 * delayLine.sF; - sum.s7 += weights.s6 * delayLine.s0; - sum.s7 += weights.s5 * delayLine.s1; - sum.s7 += weights.s4 * delayLine.s2; - sum.s7 += weights.s3 * delayLine.s3; - sum.s7 += weights.s2 * delayLine.s4; - sum.s7 += weights.s1 * delayLine.s5; - sum.s7 += weights.s0 * delayLine.s6; - (*invFIRredData)[tab][pol][time + 7][sub_time] = sum.s7; - - sum.s8 = weights.sF * delayLine.s8; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 9][sub_time]; - sum.s8 += weights.sE * delayLine.s9; - sum.s8 += weights.sD * delayLine.sA; - sum.s8 += weights.sC * delayLine.sB; - sum.s8 += weights.sB * delayLine.sC; - sum.s8 += weights.sA * delayLine.sD; - sum.s8 += weights.s9 * delayLine.sE; - sum.s8 += weights.s8 * delayLine.sF; - sum.s8 += weights.s7 * delayLine.s0; - sum.s8 += weights.s6 * delayLine.s1; - sum.s8 += weights.s5 * delayLine.s2; - sum.s8 += weights.s4 * delayLine.s3; - sum.s8 += weights.s3 * delayLine.s4; - sum.s8 += weights.s2 * delayLine.s5; - sum.s8 += weights.s1 * delayLine.s6; - sum.s8 += weights.s0 * delayLine.s7; - (*invFIRredData)[tab][pol][time + 8][sub_time] = sum.s8; - - sum.s9 = weights.sF * delayLine.s9; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 10][sub_time]; - sum.s9 += weights.sE * delayLine.sA; - sum.s9 += weights.sD * delayLine.sB; - sum.s9 += weights.sC * delayLine.sC; - sum.s9 += weights.sB * delayLine.sD; - sum.s9 += weights.sA * delayLine.sE; - sum.s9 += weights.s9 * delayLine.sF; - sum.s9 += weights.s8 * delayLine.s0; - sum.s9 += weights.s7 * delayLine.s1; - sum.s9 += weights.s6 * delayLine.s2; - sum.s9 += weights.s5 * delayLine.s3; - sum.s9 += weights.s4 * delayLine.s4; - sum.s9 += weights.s3 * delayLine.s5; - sum.s9 += weights.s2 * delayLine.s6; - sum.s9 += weights.s1 * delayLine.s7; - sum.s9 += weights.s0 * delayLine.s8; - (*invFIRredData)[tab][pol][time + 9][sub_time] = sum.s9; - - sum.sA = weights.sF * delayLine.sA; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 11][sub_time]; - sum.sA += weights.sE * delayLine.sB; - sum.sA += weights.sD * delayLine.sC; - sum.sA += weights.sC * delayLine.sD; - sum.sA += weights.sB * delayLine.sE; - sum.sA += weights.sA * delayLine.sF; - sum.sA += weights.s9 * delayLine.s0; - sum.sA += weights.s8 * delayLine.s1; - sum.sA += weights.s7 * delayLine.s2; - sum.sA += weights.s6 * delayLine.s3; - sum.sA += weights.s5 * delayLine.s4; - sum.sA += weights.s4 * delayLine.s5; - sum.sA += weights.s3 * delayLine.s6; - sum.sA += weights.s2 * delayLine.s7; - sum.sA += weights.s1 * delayLine.s8; - sum.sA += weights.s0 * delayLine.s9; - (*invFIRredData)[tab][pol][time + 10][sub_time] = sum.sA; - - sum.sB = weights.sF * delayLine.sB; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 12][sub_time]; - sum.sB += weights.sE * delayLine.sC; - sum.sB += weights.sD * delayLine.sD; - sum.sB += weights.sC * delayLine.sE; - sum.sB += weights.sB * delayLine.sF; - sum.sB += weights.sA * delayLine.s0; - sum.sB += weights.s9 * delayLine.s1; - sum.sB += weights.s8 * delayLine.s2; - sum.sB += weights.s7 * delayLine.s3; - sum.sB += weights.s6 * delayLine.s4; - sum.sB += weights.s5 * delayLine.s5; - sum.sB += weights.s4 * delayLine.s6; - sum.sB += weights.s3 * delayLine.s7; - sum.sB += weights.s2 * delayLine.s8; - sum.sB += weights.s1 * delayLine.s9; - sum.sB += weights.s0 * delayLine.sA; - (*invFIRredData)[tab][pol][time + 11][sub_time] = sum.sB; - - sum.sC = weights.sF * delayLine.sC; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 13][sub_time]; - sum.sC += weights.sE * delayLine.sD; - sum.sC += weights.sD * delayLine.sE; - sum.sC += weights.sC * delayLine.sF; - sum.sC += weights.sB * delayLine.s0; - sum.sC += weights.sA * delayLine.s1; - sum.sC += weights.s9 * delayLine.s2; - sum.sC += weights.s8 * delayLine.s3; - sum.sC += weights.s7 * delayLine.s4; - sum.sC += weights.s6 * delayLine.s5; - sum.sC += weights.s5 * delayLine.s6; - sum.sC += weights.s4 * delayLine.s7; - sum.sC += weights.s3 * delayLine.s8; - sum.sC += weights.s2 * delayLine.s9; - sum.sC += weights.s1 * delayLine.sA; - sum.sC += weights.s0 * delayLine.sB; - (*invFIRredData)[tab][pol][time + 12][sub_time] = sum.sC; - - sum.sD = weights.sF * delayLine.sD; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 14][sub_time]; - sum.sD += weights.sE * delayLine.sE; - sum.sD += weights.sD * delayLine.sF; - sum.sD += weights.sC * delayLine.s0; - sum.sD += weights.sB * delayLine.s1; - sum.sD += weights.sA * delayLine.s2; - sum.sD += weights.s9 * delayLine.s3; - sum.sD += weights.s8 * delayLine.s4; - sum.sD += weights.s7 * delayLine.s5; - sum.sD += weights.s6 * delayLine.s6; - sum.sD += weights.s5 * delayLine.s7; - sum.sD += weights.s4 * delayLine.s8; - sum.sD += weights.s3 * delayLine.s9; - sum.sD += weights.s2 * delayLine.sA; - sum.sD += weights.s1 * delayLine.sB; - sum.sD += weights.s0 * delayLine.sC; - (*invFIRredData)[tab][pol][time + 13][sub_time] = sum.sD; - - sum.sE = weights.sF * delayLine.sE; - delayLine.sF = (*invFFTedData)[tab][pol][time + NR_STATION_FILTER_TAPS - 1 + 15][sub_time]; - sum.sE += weights.sE * delayLine.sF; - sum.sE += weights.sD * delayLine.s0; - sum.sE += weights.sC * delayLine.s1; - sum.sE += weights.sB * delayLine.s2; - sum.sE += weights.sA * delayLine.s3; - sum.sE += weights.s9 * delayLine.s4; - sum.sE += weights.s8 * delayLine.s5; - sum.sE += weights.s7 * delayLine.s6; - sum.sE += weights.s6 * delayLine.s7; - sum.sE += weights.s5 * delayLine.s8; - sum.sE += weights.s4 * delayLine.s9; - sum.sE += weights.s3 * delayLine.sA; - sum.sE += weights.s2 * delayLine.sB; - sum.sE += weights.s1 * delayLine.sC; - sum.sE += weights.s0 * delayLine.sD; - (*invFIRredData)[tab][pol][time + 14][sub_time] = sum.sE; - - sum.sF = weights.sF * delayLine.sF; - sum.sF += weights.sE * delayLine.s0; - sum.sF += weights.sD * delayLine.s1; - sum.sF += weights.sC * delayLine.s2; - sum.sF += weights.sB * delayLine.s3; - sum.sF += weights.sA * delayLine.s4; - sum.sF += weights.s9 * delayLine.s5; - sum.sF += weights.s8 * delayLine.s6; - sum.sF += weights.s7 * delayLine.s7; - sum.sF += weights.s6 * delayLine.s8; - sum.sF += weights.s5 * delayLine.s9; - sum.sF += weights.s4 * delayLine.sA; - sum.sF += weights.s3 * delayLine.sB; - sum.sF += weights.s2 * delayLine.sC; - sum.sF += weights.s1 * delayLine.sD; - sum.sF += weights.s0 * delayLine.sE; - (*invFIRredData)[tab][pol][time + 15][sub_time] = sum.sF; - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvertedStationPPFWeights.cc b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvertedStationPPFWeights.cc deleted file mode 100644 index 76031f41aca8db844e9409e54a8d4b3580b3f285..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvertedStationPPFWeights.cc +++ /dev/null @@ -1,4191 +0,0 @@ -//# InvertedStationPPFWeights.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "InvertedStationPPFWeights.h" - -int reverseSubbandMapping[512] = { - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 0, 1, 2, 3, - 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 235, - 236, 237, 238, 239, 240, 241, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, - 252, 253, 254, 255, 256, 257, 258, 259, - 260, 261, 262, 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, - 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320, 321, 322, 323, - 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 335, 336, 337, 338, 339, - 340, 341, 342, 343, 344, 345, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, - 356, 357, 358, 359, 360, 361, 362, 363, - 364, 365, 366, 367, 368, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 378, 379, - 380, 381, 382, 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, 393, 394, 395, - 396, 397, 398, 399, 400, 401, 402, 403, - 404, 405, 406, 407, 408, 409, 410, 411, - 412, 413, 414, 415, 416, 417, 418, 419, - 420, 421, 422, 423, 424, 425, 426, 427, - 428, 429, 430, 431, 432, 433, 434, 435, - 436, 437, 438, 439, 440, 441, 442, 443, - 444, 445, 446, 447, 448, 449, 450, 451, - 452, 453, 454, 455, 456, 457, 458, 459, - 460, 461, 462, 463, 464, 465, 466, 467, - 468, 469, 470, 471, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -}; - - -extern const float invertedStationPPFWeights[1024][16] __attribute__ ((aligned(32))) = { - { -0.000179151700, -0.003308169600, 0.003168136400, -0.001402398400, - -0.000353662500, 0.001927602200, -0.003163333400, 0.004012019600, - 0.305533321300, 0.003717851500, -0.003038205600, 0.001856478200, - -0.000314280200, -0.001413956600, 0.003176999800, -0.003309959200}, - { -0.000188174200, -0.003292642400, 0.003165263500, -0.001388720100, - -0.000384077600, 0.001988112900, -0.003285234700, 0.004303401100, - 0.305532062500, 0.003427783000, -0.002906671400, 0.001795892300, - -0.000283721000, -0.001437413900, 0.003189613400, -0.003326162500}, - { -0.000196877000, -0.003287185700, 0.003153111900, -0.001365477700, - -0.000414183100, 0.002048118400, -0.003406922200, 0.004585797400, - 0.305529242100, 0.003148416400, -0.002784621900, 0.001725095700, - -0.000252375300, -0.001452058900, 0.003202823300, -0.003332926300}, - { -0.000205837900, -0.003272003200, 0.003141260600, -0.001352471400, - -0.000443644700, 0.002116848800, -0.003537488300, 0.004878336100, - 0.305525209100, 0.002859642300, -0.002662171400, 0.001663994200, - -0.000211731900, -0.001466550800, 0.003206380900, -0.003349458000}, - { -0.000214552200, -0.003266806700, 0.003129659400, -0.001339690600, - -0.000482746700, 0.002176562700, -0.003658974500, 0.005162307100, - 0.305528831700, 0.002572382100, -0.002530584900, 0.001602837600, - -0.000180271600, -0.001491017200, 0.003220032300, -0.003356689400}, - { -0.000223661700, -0.003260822600, 0.003127233900, -0.001326570100, - -0.000512158000, 0.002235803700, -0.003780111100, 0.005456280000, - 0.305521935800, 0.002275511400, -0.002407952000, 0.001531547700, - -0.000148571000, -0.001505753800, 0.003233233200, -0.003373394500}, - { -0.000231910300, -0.003246569900, 0.003116275100, -0.001304684500, - -0.000541061900, 0.002304368000, -0.003901387700, 0.005741703600, - 0.305522735200, 0.001989240500, -0.002285243100, 0.001469413800, - -0.000116373400, -0.001521319900, 0.003247258700, -0.003380795000}, - { -0.000240501100, -0.003241453500, 0.003104789400, -0.001292085400, - -0.000569919800, 0.002362991000, -0.004022334800, 0.006027997600, - 0.305521780500, 0.001704243000, -0.002153295800, 0.001397822300, - -0.000074381800, -0.001537100900, 0.003251864100, -0.003388377600}, - { -0.000248796500, -0.003226864100, 0.003093528500, -0.001279946600, - -0.000607985400, 0.002421344900, -0.004142487600, 0.006323528600, - 0.305510887600, 0.001418764600, -0.002029953100, 0.001335330400, - -0.000042083300, -0.001561789400, 0.003265175300, -0.003404731400}, - { -0.000257636700, -0.003221504300, 0.003091948000, -0.001267872500, - -0.000636159800, 0.002489119800, -0.004263249000, 0.006610834100, - 0.305507531700, 0.001124928200, -0.001906951100, 0.001263167800, - -0.000009313800, -0.001577770500, 0.003279564200, -0.003412490900}, - { -0.000265507200, -0.003207541700, 0.003081283900, -0.001246591800, - -0.000664350300, 0.002546976200, -0.004383683600, 0.006898956800, - 0.305502674600, 0.000841583200, -0.001774239400, 0.001200242700, - 0.000033135500, -0.001593584100, 0.003293434500, -0.003429250800}, - { -0.000273917600, -0.003202910800, 0.003070451600, -0.001234554400, - -0.000692451500, 0.002604895500, -0.004503987800, 0.007187871700, - 0.305505931400, 0.000558741700, -0.001650952000, 0.001127390700, - 0.000066556300, -0.001619778200, 0.003298773100, -0.003437037600}, - { -0.000281862900, -0.003188993500, 0.003060168000, -0.001223831900, - -0.000729004800, 0.002671831100, -0.004624290900, 0.007477414500, - 0.305498083700, 0.000267125500, -0.001517720800, 0.001063982400, - 0.000099881700, -0.001636003800, 0.003313035200, -0.003454137100}, - { -0.000289997500, -0.003184579100, 0.003050026400, -0.001202902100, - -0.000756520300, 0.002728774500, -0.004744017700, 0.007767318900, - 0.305488765700, -0.000023525100, -0.001394377600, 0.000990953800, - 0.000143244500, -0.001652648300, 0.003327682700, -0.003461774600}, - { -0.000297868500, -0.003170531700, 0.003048908400, -0.001191632000, - -0.000784087900, 0.002786310700, -0.004864404400, 0.008048797600, - 0.305487970600, -0.000304469600, -0.001260861000, 0.000926754800, - 0.000177135000, -0.001679160000, 0.003343036000, -0.003469765900}, - { -0.000306075200, -0.003165955700, 0.003038511100, -0.001180375200, - -0.000811096700, 0.002842935600, -0.004983911700, 0.008340196300, - 0.305476029500, -0.000594272800, -0.001136564500, 0.000852586500, - 0.000211810600, -0.001696380900, 0.003348178400, -0.003486840300}, - { -0.000313813200, -0.003152349500, 0.003028499400, -0.001169925400, - -0.000837361100, 0.002908698000, -0.005103588900, 0.008632676200, - 0.305471690900, -0.000882964600, -0.001002806300, 0.000788301700, - 0.000255669300, -0.001713789300, 0.003363569600, -0.003495167000}, - { -0.000321551300, -0.003148759600, 0.003019394800, -0.001150412500, - -0.000873315500, 0.002965177700, -0.005223260400, 0.008916237200, - 0.305466205000, -0.001170623500, -0.000869571200, 0.000714234800, - 0.000290089600, -0.001740435500, 0.003378711000, -0.003512573100}, - { -0.000329970400, -0.003144017200, 0.003018842400, -0.001139831400, - -0.000899901500, 0.003021134300, -0.005342285700, 0.009209557400, - 0.305459744400, -0.001458744900, -0.000744677800, 0.000649268300, - 0.000334721100, -0.001758288700, 0.003394346200, -0.003520921500}, - { -0.000337260000, -0.003130746200, 0.003009011500, -0.001129494000, - -0.000925937200, 0.003077019500, -0.005461903400, 0.009494961400, - 0.305451127000, -0.001745336100, -0.000610465300, 0.000573925900, - 0.000370535700, -0.001776549100, 0.003400302700, -0.003538373300}, - { -0.000345274700, -0.003126683700, 0.002999325200, -0.001119130300, - -0.000951776200, 0.003132334500, -0.005580569300, 0.009789706100, - 0.305441562500, -0.002031776000, -0.000485477300, 0.000498512700, - 0.000406472900, -0.001794658100, 0.003416172000, -0.003546870600}, - { -0.000352248700, -0.003113898000, 0.002990283900, -0.001099777400, - -0.000977716300, 0.003187647900, -0.005699440100, 0.010075840400, - 0.305430485400, -0.002316996000, -0.000351097200, 0.000433003700, - 0.000451135800, -0.001822254600, 0.003431922800, -0.003564774200}, - { -0.000360263700, -0.003109808600, 0.002990478200, -0.001090243800, - -0.001002860000, 0.003252789700, -0.005809448800, 0.010362986600, - 0.305427509700, -0.002601772700, -0.000216601600, 0.000357013800, - 0.000487681400, -0.001841238600, 0.003448505600, -0.003573744000}, - { -0.000367260100, -0.003096989400, 0.002981370000, -0.001081004600, - -0.001037636700, 0.003307938500, -0.005928189500, 0.010650492300, - 0.305413750100, -0.002886387300, -0.000090648300, 0.000290078700, - 0.000524745900, -0.001860858600, 0.003455849400, -0.003582656500}, - { -0.000375146000, -0.003093318200, 0.002972423700, -0.001071720100, - -0.001062345400, 0.003362096800, -0.006046137200, 0.010948594500, - 0.305407159000, -0.003178921900, 0.000043993500, 0.000214496100, - 0.000570197700, -0.001888981300, 0.003472094500, -0.003601269100}, - { -0.000381874300, -0.003080805300, 0.002963790800, -0.001053001800, - -0.001087365200, 0.003416433800, -0.006164483000, 0.011237344100, - 0.305390383500, -0.003461481100, 0.000179544400, 0.000146785300, - 0.000607413700, -0.001908316200, 0.003489057800, -0.003610639600}, - { -0.000389669200, -0.003076842200, 0.002964194700, -0.001043813600, - -0.001112218000, 0.003470974700, -0.006273264800, 0.011526826700, - 0.305382025700, -0.003743576500, 0.000314498600, 0.000070163400, - 0.000654411200, -0.001927947000, 0.003505495000, -0.003629223000}, - { -0.000396332400, -0.003064410600, 0.002955492900, -0.001034693000, - -0.001136761300, 0.003525266500, -0.006392102100, 0.011808326800, - 0.305371538600, -0.004034754500, 0.000440667500, -0.000007068200, - 0.000692151600, -0.001958085100, 0.003514164000, -0.003638938800}, - { -0.000403882200, -0.003061151700, 0.002947019900, -0.001026023300, - -0.001160855500, 0.003578931400, -0.006510233800, 0.012099735200, - 0.305359759100, -0.004325205000, 0.000577290600, -0.000075620500, - 0.000729983100, -0.001977775600, 0.003531138400, -0.003658356000}, - { -0.000410416700, -0.003048768800, 0.002938122000, -0.001017024400, - -0.001185043200, 0.003632680800, -0.006618462800, 0.012391231100, - 0.305346710600, -0.004604878800, 0.000712646300, -0.000153154100, - 0.000778065700, -0.001998535200, 0.003548917800, -0.003668399300}, - { -0.000418160500, -0.003045285600, 0.002940099300, -0.000999989700, - -0.001207958100, 0.003694939000, -0.006736106600, 0.012683638900, - 0.305331925800, -0.004893293600, 0.000848238100, -0.000231056700, - 0.000815922500, -0.002028355600, 0.003567216600, -0.003678810800}, - { -0.000424402600, -0.003033543100, 0.002932209100, -0.000992319500, - -0.001241358200, 0.003749292200, -0.006845375400, 0.012968326800, - 0.305325129100, -0.005181636100, 0.000984943000, -0.000299850300, - 0.000864607400, -0.002050276300, 0.003575779100, -0.003698495600}, - { -0.000431795400, -0.003030515100, 0.002924143600, -0.000984066100, - -0.001264499500, 0.003801673700, -0.006962423800, 0.013261923500, - 0.305307792800, -0.005469551400, 0.001112105700, -0.000378641900, - 0.000903979800, -0.002071214100, 0.003594054000, -0.003708956400}, - { -0.000438154800, -0.003018644300, 0.002915881100, -0.000975892700, - -0.001287607700, 0.003854346300, -0.007080269600, 0.013547492500, - 0.305299153300, -0.005747166800, 0.001248307000, -0.000457538900, - 0.000942775500, -0.002101520100, 0.003612350900, -0.003729050600}, - { -0.000445068000, -0.003016231600, 0.002908760100, -0.000958623000, - -0.001311089600, 0.003906976500, -0.007187486600, 0.013842019100, - 0.305278786000, -0.006032900700, 0.001385321000, -0.000527217900, - 0.000991980200, -0.002123501700, 0.003631277700, -0.003740453600}, - { -0.000451769900, -0.003003554800, 0.002910117000, -0.000951286800, - -0.001333568200, 0.003959036100, -0.007305163600, 0.014129397200, - 0.305266353700, -0.006318495400, 0.001522406400, -0.000607494800, - 0.001032856600, -0.002146282400, 0.003641224700, -0.003751272400}, - { -0.000458704700, -0.003001127800, 0.002902744400, -0.000943766600, - -0.001356286200, 0.004011606300, -0.007413160700, 0.014416934300, - 0.305252141100, -0.006612456400, 0.001659411900, -0.000686657100, - 0.001082013300, -0.002177942800, 0.003660354300, -0.003772222700}, - { -0.000464860200, -0.002989337500, 0.002894831400, -0.000936224300, - -0.001378788100, 0.004063782200, -0.007520350800, 0.014714266400, - 0.305236860000, -0.006896906600, 0.001797689700, -0.000758115600, - 0.001122795500, -0.002200335400, 0.003679910900, -0.003784248300}, - { -0.000471906600, -0.002986971300, 0.002887514500, -0.000929037200, - -0.001400660100, 0.004114765900, -0.007637074700, 0.015003290600, - 0.305220409100, -0.007180134300, 0.001934852000, -0.000838292300, - 0.001173609200, -0.002223798900, 0.003689540000, -0.003804721500}, - { -0.000478005400, -0.002974973900, 0.002890024200, -0.000912804200, - -0.001423103300, 0.004166752200, -0.007744430700, 0.015292286200, - 0.305202709200, -0.007462776200, 0.002072061100, -0.000919168800, - 0.001214479000, -0.002256106400, 0.003709864100, -0.003816509300}, - { -0.000485004200, -0.002972661400, 0.002883075100, -0.000906121000, - -0.001444400500, 0.004217388300, -0.007861128300, 0.015582827100, - 0.305182829200, -0.007754203600, 0.002210354400, -0.001000782800, - 0.001256255000, -0.002278849600, 0.003729366300, -0.003838542900}, - { -0.000491739700, -0.002970642300, 0.002875940200, -0.000898797900, - -0.001467267200, 0.004259593600, -0.007967928800, 0.015873669900, - 0.305171969300, -0.008036267100, 0.002349092100, -0.001072739500, - 0.001307766700, -0.002302777900, 0.003749888800, -0.003850712800}, - { -0.000497291200, -0.002959470700, 0.002868512700, -0.000891753800, - -0.001488975800, 0.004311149200, -0.008075516000, 0.016155288200, - 0.305150388000, -0.008316860100, 0.002487086200, -0.001154788900, - 0.001350046400, -0.002336945300, 0.003761723500, -0.003862439200}, - { -0.000504731900, -0.002956450800, 0.002871262500, -0.000886061100, - -0.001509538700, 0.004360886000, -0.008191697200, 0.016448378400, - 0.305135746300, -0.008606633700, 0.002625496200, -0.001236297400, - 0.001401956000, -0.002360832800, 0.003781771800, -0.003884434400}, - { -0.000510187200, -0.002945799600, 0.002865288500, -0.000870352000, - -0.001531072000, 0.004411842900, -0.008298811000, 0.016741989300, - 0.305119193600, -0.008895401800, 0.002764325800, -0.001319345500, - 0.001445432500, -0.002385302500, 0.003803145000, -0.003898001300}, - { -0.000516831700, -0.002943863500, 0.002858545300, -0.000863995200, - -0.001552015500, 0.004462029400, -0.008404468200, 0.017034066400, - 0.305093771700, -0.009174192300, 0.002903186600, -0.001391517800, - 0.001496396500, -0.002418783000, 0.003823612700, -0.003919897700}, - { -0.000522254800, -0.002933011700, 0.002851744600, -0.000857749800, - -0.001572829300, 0.004512760300, -0.008512038500, 0.017319625600, - 0.305074913300, -0.009461842200, 0.003042687600, -0.001475450400, - 0.001541005000, -0.002444849800, 0.003836006300, -0.003932401200}, - { -0.000529601300, -0.002930099600, 0.002854820400, -0.000852704600, - -0.001592429500, 0.004561274000, -0.008627194900, 0.017615006900, - 0.305054496900, -0.009748599800, 0.003181615900, -0.001558137300, - 0.001594324200, -0.002470181000, 0.003857769000, -0.003945651400}, - { -0.000534931600, -0.002919339300, 0.002848150100, -0.000846731600, - -0.001612810100, 0.004611510300, -0.008734196000, 0.017901410200, - 0.305033298300, -0.010034991200, 0.003321126400, -0.001641796500, - 0.001637657900, -0.002504378200, 0.003879253900, -0.003968435100}, - { -0.000541059600, -0.002918541200, 0.002843043800, -0.000831250300, - -0.001634950600, 0.004652450700, -0.008840558000, 0.018188790800, - 0.305021093200, -0.010312015500, 0.003461182700, -0.001716342200, - 0.001692059700, -0.002531656000, 0.003892381100, -0.003981307700}, - { -0.000546470300, -0.002907704700, 0.002836444100, -0.000825608000, - -0.001654657700, 0.004701589700, -0.008946113900, 0.018485752400, - 0.304996474100, -0.010596860500, 0.003601134500, -0.001801009400, - 0.001736945200, -0.002556816600, 0.003913332400, -0.004004119100}, - { -0.000553421000, -0.002905324000, 0.002840026900, -0.000820954500, - -0.001674129700, 0.004751033800, -0.009052649800, 0.018774565100, - 0.304980747200, -0.010881885600, 0.003741264500, -0.001885730400, - 0.001781462400, -0.002592340800, 0.003936717300, -0.004018305800}, - { -0.000558583500, -0.002894695900, 0.002833775600, -0.000815677100, - -0.001693616200, 0.004800033700, -0.009158923400, 0.019063780300, - 0.304952581400, -0.011174339100, 0.003881652600, -0.001970197900, - 0.001836677600, -0.002619434800, 0.003959785900, -0.004032488300}, - { -0.000564955500, -0.002893561300, 0.002828266400, -0.000810671500, - -0.001712856100, 0.004849033400, -0.009265048200, 0.019354083600, - 0.304933847400, -0.011457786400, 0.004022181900, -0.002055659400, - 0.001882018300, -0.002656075600, 0.003973130000, -0.004055549600}, - { -0.000569990700, -0.002883172300, 0.002821862700, -0.000805210900, - -0.001733255400, 0.004888539700, -0.009370571700, 0.019645015200, - 0.304913195700, -0.011739650400, 0.004173020900, -0.002132234200, - 0.001937624600, -0.002683625100, 0.003996648800, -0.004070086100}, - { -0.000576816700, -0.002880712200, 0.002825556300, -0.000801110200, - -0.001751710900, 0.004936537800, -0.009475750900, 0.019935070200, - 0.304882818800, -0.012021363400, 0.004313763100, -0.002218448800, - 0.001984116400, -0.002710135300, 0.004018650800, -0.004093587400}, - { -0.000581575700, -0.002871029700, 0.002820817600, -0.000787003500, - -0.001771208200, 0.004984922000, -0.009581223300, 0.020227247700, - 0.304859324200, -0.012301966200, 0.004453794800, -0.002303557800, - 0.002039760600, -0.002748740500, 0.004034016500, -0.004107894100}, - { -0.000587752000, -0.002870343700, 0.002816043200, -0.000782738000, - -0.001789823800, 0.005033655500, -0.009688643500, 0.020512328500, - 0.304843748500, -0.012592772900, 0.004596104100, -0.002391051400, - 0.002087605700, -0.002776914700, 0.004058501200, -0.004123192100}, - { -0.000592610900, -0.002860138800, 0.002809924700, -0.000777559700, - -0.001809457700, 0.005071968700, -0.009792977800, 0.020805308800, - 0.304818061900, -0.012872591200, 0.004737013500, -0.002477149500, - 0.002144535400, -0.002805006000, 0.004081504200, -0.004147500100}, - { -0.000598855700, -0.002859183800, 0.002804989100, -0.000773711900, - -0.001827130700, 0.005119292900, -0.009897966800, 0.021099553600, - 0.304789228200, -0.013159535100, 0.004888119300, -0.002565148700, - 0.002191690700, -0.002842615100, 0.004106712900, -0.004163246800}, - { -0.000604129100, -0.002847973400, 0.002808540700, -0.000770115000, - -0.001845151700, 0.005166831300, -0.010003738700, 0.021384603000, - 0.304761759800, -0.013438827400, 0.005030699900, -0.002642744000, - 0.002248900100, -0.002872462400, 0.004120956700, -0.004186959300}, - { -0.000610304100, -0.002847187000, 0.002803718400, -0.000765887200, - -0.001863954900, 0.005204656900, -0.010108070800, 0.021680873600, - 0.304740017400, -0.013726605300, 0.005173599700, -0.002731549500, - 0.002298070200, -0.002901375100, 0.004145912600, -0.004202808100}, - { -0.000614775300, -0.002837812200, 0.002799287100, -0.000751378700, - -0.001873340800, 0.005251545400, -0.010213985000, 0.021968758500, - 0.304717226400, -0.014013384600, 0.005315723700, -0.002818772700, - 0.002355245100, -0.002940735300, 0.004172433300, -0.004219310800}, - { -0.000620567900, -0.002837320300, 0.002794490100, -0.000747532900, - -0.001891056000, 0.005299546400, -0.010309931700, 0.022254934400, - 0.304685251500, -0.014288738100, 0.005467214000, -0.002908733500, - 0.002405494900, -0.002971287100, 0.004187192800, -0.004243542100}, - { -0.000625856800, -0.002826051900, 0.002798242800, -0.000744164300, - -0.001909172200, 0.005336339900, -0.010413292700, 0.022552838800, - 0.304659243200, -0.014574287100, 0.005609909000, -0.002997005100, - 0.002464760300, -0.003001761400, 0.004213047800, -0.004260008200}, - { -0.000631862500, -0.002825655200, 0.002794055000, -0.000740960500, - -0.001926054500, 0.005382887800, -0.010518612100, 0.022842239000, - 0.304632697600, -0.014859275700, 0.005753037200, -0.003086221600, - 0.002513598800, -0.003041041300, 0.004239878600, -0.004276818000}, - { -0.000636395600, -0.002816103900, 0.002789011800, -0.000737686400, - -0.001942767200, 0.005429023200, -0.010623938900, 0.023132882500, - 0.304603952900, -0.015142040300, 0.005905217400, -0.003175720900, - 0.002573489500, -0.003072014700, 0.004265540900, -0.004304236600}, - { -0.000642092900, -0.002815797600, 0.002784613800, -0.000733852000, - -0.001961254600, 0.005467201200, -0.010718772800, 0.023422456600, - 0.304574941900, -0.015425894300, 0.006049293000, -0.003266869300, - 0.002625535200, -0.003104379700, 0.004282770700, -0.004320158000}, - { -0.000647228100, -0.002805014900, 0.002789105500, -0.000731700400, - -0.001977598200, 0.005513183700, -0.010823907600, 0.023714956500, - 0.304553789700, -0.015710304400, 0.006194068900, -0.003346361400, - 0.002683321200, -0.003144467600, 0.004309182300, -0.004346993300}, - { -0.000653083600, -0.002804663400, 0.002784856700, -0.000728568200, - -0.001994892300, 0.005549280000, -0.010927513200, 0.024006627800, - 0.304521224900, -0.015991075000, 0.006347319100, -0.003438518800, - 0.002735447600, -0.003175763900, 0.004336078200, -0.004364270700}, - { -0.000657344200, -0.002795073400, 0.002779372400, -0.000723818600, - -0.002002390300, 0.005594924600, -0.011022085400, 0.024298095100, - 0.304487711300, -0.016272419800, 0.006491186300, -0.003529018000, - 0.002797300300, -0.003209814400, 0.004354269100, -0.004380801100}, - { -0.000662778500, -0.002795722300, 0.002777270600, -0.000711766400, - -0.002020750200, 0.005631997300, -0.011127576100, 0.024583535100, - 0.304461685600, -0.016563520800, 0.006636493100, -0.003620768300, - 0.002848323700, -0.003250508600, 0.004381556100, -0.004408351500}, - { -0.000667608000, -0.002785075900, 0.002781813700, -0.000709968500, - -0.002036501400, 0.005678048700, -0.011222628000, 0.024877740200, - 0.304434316000, -0.016843034600, 0.006789868500, -0.003712463600, - 0.002910777700, -0.003284178700, 0.004410227500, -0.004427971200}, - { -0.000673385900, -0.002784864800, 0.002777897100, -0.000707171500, - -0.002053187900, 0.005713078000, -0.011324954000, 0.025171340700, - 0.304396703900, -0.017122233300, 0.006934475400, -0.003805137400, - 0.002964408100, -0.003317850200, 0.004428620600, -0.004444717000}, - { -0.000677353300, -0.002775967700, 0.002773610300, -0.000704737500, - -0.002069178100, 0.005759636500, -0.011421394400, 0.025458149700, - 0.304365892000, -0.017409498600, 0.007088896400, -0.003897094200, - 0.003025836900, -0.003360743400, 0.004457105300, -0.004473209500}, - { -0.000683225000, -0.002775689300, 0.002769352400, -0.000700635700, - -0.002076469800, 0.005793241800, -0.011523237400, 0.025753901000, - 0.304334966200, -0.017688142300, 0.007233613500, -0.003988893700, - 0.003088733700, -0.003394540900, 0.004485759300, -0.004491807700}, - { -0.000687773900, -0.002765299300, 0.002774214900, -0.000699143000, - -0.002091778900, 0.005839096700, -0.011618952200, 0.026040879100, - 0.304303942000, -0.017967050900, 0.007379100700, -0.004082281200, - 0.003142614000, -0.003427404600, 0.004512855100, -0.004519537900}, - { -0.000693472400, -0.002765610600, 0.002771073600, -0.000697223600, - -0.002107933500, 0.005874142700, -0.011723107400, 0.026331338900, - 0.304277893000, -0.018252857000, 0.007534408900, -0.004175833600, - 0.003206136100, -0.003473370900, 0.004534730300, -0.004538643100}, - { -0.000697463600, -0.002756676800, 0.002766964300, -0.000695192900, - -0.002122896500, 0.005919133800, -0.011817129000, 0.026629304300, - 0.304240989200, -0.018538518600, 0.007680828300, -0.004270140400, - 0.003260984500, -0.003507314200, 0.004563753700, -0.004557731900}, - { -0.000703804500, -0.002754968200, 0.002772071700, -0.000692658900, - -0.002129046300, 0.005951839900, -0.011919323000, 0.026918136600, - 0.304205403100, -0.018813366000, 0.007835360000, -0.004364128800, - 0.003325426100, -0.003542025400, 0.004592039500, -0.004586402700}, - { -0.000707548200, -0.002746360600, 0.002768039100, -0.000690246800, - -0.002145830400, 0.005988351400, -0.012013907400, 0.027209072700, - 0.304176499000, -0.019099860600, 0.007984496700, -0.004450296100, - 0.003379587100, -0.003587618200, 0.004614320900, -0.004606892100}, - { -0.000713093800, -0.002746934500, 0.002765358600, -0.000689188800, - -0.002160148400, 0.006033055000, -0.012109150300, 0.027501099300, - 0.304145203000, -0.019382840700, 0.008140437800, -0.004545293600, - 0.003445318600, -0.003624168800, 0.004645205500, -0.004627325000}, - { -0.000716707400, -0.002738242600, 0.002761221600, -0.000686846600, - -0.002176335900, 0.006068547500, -0.012202678300, 0.027791528800, - 0.304104283300, -0.019666250900, 0.008287779500, -0.004641076300, - 0.003501561200, -0.003658751600, 0.004673640000, -0.004656297500}, - { -0.000722876700, -0.002737400900, 0.002768917300, -0.000676615300, - -0.002181080700, 0.006110074200, -0.012305860200, 0.028085420100, - 0.304069875300, -0.019947475400, 0.008443532900, -0.004736314300, - 0.003566616300, -0.003706438500, 0.004696952300, -0.004676431900}, - { -0.000726338700, -0.002729093500, 0.002765145400, -0.000674502100, - -0.002197280000, 0.006146021300, -0.012401276400, 0.028369440400, - 0.304036328200, -0.020230886000, 0.008591834800, -0.004833255700, - 0.003624215600, -0.003742729000, 0.004728140600, -0.004696972400}, - { -0.000731741100, -0.002729709100, 0.002762428000, -0.000673225600, - -0.002212588700, 0.006180633900, -0.012494169800, 0.028662906200, - 0.304000013700, -0.020511012600, 0.008748066500, -0.004928785800, - 0.003689348800, -0.003788813700, 0.004759315900, -0.004727789800}, - { -0.000735386100, -0.002721352900, 0.002758959300, -0.000672109200, - -0.002226292500, 0.006224450200, -0.012588365800, 0.028957720600, - 0.303962072700, -0.020792099600, 0.008896179300, -0.005026132300, - 0.003747768000, -0.003827110500, 0.004781502000, -0.004747416400}, - { -0.000741467200, -0.002720193100, 0.002764997300, -0.000670457700, - -0.002231939800, 0.006257946300, -0.012682582100, 0.029244511900, - 0.303933574300, -0.021072898700, 0.009054063500, -0.005123937600, - 0.003816203000, -0.003865951000, 0.004814396600, -0.004769350200}, - { -0.000745150400, -0.002711729700, 0.002761387900, -0.000669147800, - -0.002246404800, 0.006290380500, -0.012784037700, 0.029540755700, - 0.303893044500, -0.021352478200, 0.009201932100, -0.005220680700, - 0.003872318000, -0.003911010800, 0.004845423900, -0.004800157600}, - { -0.000748453500, -0.002703558700, 0.002757747500, -0.000667691900, - -0.002261575500, 0.006324791000, -0.012877926700, 0.029827673100, - 0.303851724000, -0.021629843300, 0.009359170900, -0.005318693300, - 0.003941798300, -0.003952016200, 0.004869373400, -0.004820883700}, - { -0.000753869400, -0.002704376900, 0.002755157700, -0.000665839200, - -0.002265346200, 0.006366843000, -0.012972784600, 0.030116858700, - 0.303818672700, -0.021907914800, 0.009517056100, -0.005416881700, - 0.004010497500, -0.003990905800, 0.004901022400, -0.004852436300}, - { -0.000758084800, -0.002694258700, 0.002760975500, -0.000666054000, - -0.002279366500, 0.006400355600, -0.013065059600, 0.030415689700, - 0.303781885400, -0.022195988700, 0.009667243000, -0.005515687900, - 0.004068687500, -0.004038259800, 0.004935181400, -0.004875341600}, - { -0.000763249100, -0.002695207900, 0.002758724400, -0.000665508700, - -0.002293624700, 0.006433708500, -0.013157852400, 0.030703785700, - 0.303736794400, -0.022471040100, 0.009824735600, -0.005614528900, - 0.004139136400, -0.004080198200, 0.004959857600, -0.004896598000}, - { -0.000766591100, -0.002686928900, 0.002754921900, -0.000662665200, - -0.002299129500, 0.006466426100, -0.013251271900, 0.030994692400, - 0.303698508100, -0.022758266200, 0.009976047300, -0.005715080300, - 0.004199827500, -0.004118619000, 0.004991603200, -0.004928421800}, - { -0.000771897700, -0.002688143900, 0.002753279200, -0.000663161200, - -0.002311137900, 0.006508681700, -0.013345456800, 0.031285977700, - 0.303659766600, -0.023032853100, 0.010133649800, -0.005813434400, - 0.004268203300, -0.004168660700, 0.005027973800, -0.004954054600}, - { -0.000775874300, -0.002678215700, 0.002759243400, -0.000663934100, - -0.002324484400, 0.006541662700, -0.013438640200, 0.031578389200, - 0.303617696900, -0.023316437000, 0.010294044300, -0.005916048600, - 0.004331218000, -0.004210712400, 0.005053314100, -0.004976115300}, - { -0.000781019600, -0.002679339200, 0.002756838700, -0.000661553700, - -0.002330048900, 0.006575368200, -0.013522135600, 0.031870307600, - 0.303587200300, -0.023593760200, 0.010444472000, -0.006015436800, - 0.004402065400, -0.004251580600, 0.005086442900, -0.005008967600}, - { -0.000784186200, -0.002671460600, 0.002753849700, -0.000661193300, - -0.002343698500, 0.006608303400, -0.013614934700, 0.032163622800, - 0.303542329100, -0.023875417200, 0.010604498100, -0.006117430000, - 0.004462875900, -0.004301162100, 0.005122582000, -0.005033354700}, - { -0.000790060900, -0.002670435300, 0.002760669100, -0.000660699900, - -0.002347647400, 0.006639524200, -0.013708092900, 0.032447376800, - 0.303498774900, -0.024159306200, 0.010756094800, -0.006218141400, - 0.004535552600, -0.004345436200, 0.005149409700, -0.005056179700}, - { -0.000793256200, -0.002662733600, 0.002757935000, -0.000660639200, - -0.002360988600, 0.006672169900, -0.013801224500, 0.032743987500, - 0.303460194300, -0.024440923300, 0.010917290800, -0.006321772900, - 0.004598983100, -0.004386048500, 0.005182927100, -0.005089678500}, - { -0.000798421400, -0.002663989900, 0.002756297000, -0.000661054500, - -0.002373851700, 0.006703786000, -0.013892349300, 0.033037596300, - 0.303413510200, -0.024710885300, 0.011075401800, -0.006421881700, - 0.004669293700, -0.004437547500, 0.005220209500, -0.005114783000}, - { -0.000801279400, -0.002656330700, 0.002752971400, -0.000658573800, - -0.002379104500, 0.006737428400, -0.013977140000, 0.033324125700, - 0.303374972100, -0.024994140700, 0.011228843600, -0.006526058700, - 0.004734510300, -0.004481928500, 0.005247478500, -0.005138134800}, - { -0.000807307300, -0.002655561700, 0.002760752200, -0.000660917000, - -0.002390857100, 0.006768397200, -0.014068603800, 0.033621534300, - 0.303332931800, -0.025273538400, 0.011389660100, -0.006628580100, - 0.004808058900, -0.004525112200, 0.005283024100, -0.005174599300}, - { -0.000810410400, -0.002647879500, 0.002757788100, -0.000659822800, - -0.002392746100, 0.006808149800, -0.014163218900, 0.033911264900, - 0.303289891500, -0.025552150000, 0.011550770700, -0.006731633300, - 0.004882070200, -0.004569322900, 0.005320551900, -0.005200360700}, - { -0.000815493900, -0.002649463500, 0.002756849600, -0.000660759200, - -0.002405245800, 0.006840045300, -0.014256420100, 0.034200612800, - 0.303246711500, -0.025832407000, 0.011703557800, -0.006835218200, - 0.004945699400, -0.004623184600, 0.005349893100, -0.005224926800}, - { -0.000818255300, -0.002641882000, 0.002753575300, -0.000658712000, - -0.002409717000, 0.006872439200, -0.014340074900, 0.034489243800, - 0.303202188800, -0.026110236100, 0.011865377600, -0.006939263300, - 0.005020650000, -0.004667616900, 0.005385875600, -0.005260165300}, - { -0.000824295400, -0.002641015800, 0.002761659300, -0.000661736600, - -0.002420492700, 0.006902452300, -0.014430720500, 0.034789552300, - 0.303152032300, -0.026395378600, 0.012028731400, -0.007046166400, - 0.005088017800, -0.004713545300, 0.005414457900, -0.005284879700}, - { -0.000827077700, -0.002633626200, 0.002758707300, -0.000659803100, - -0.002424890300, 0.006934810400, -0.014514347800, 0.035080728500, - 0.303114481500, -0.026675115000, 0.012182095400, -0.007148973700, - 0.005161314600, -0.004768172600, 0.005454664900, -0.005312372600}, - { -0.000832149000, -0.002635253900, 0.002757890500, -0.000661304500, - -0.002436456100, 0.006965471700, -0.014606652200, 0.035372382500, - 0.303065098100, -0.026950110700, 0.012344296500, -0.007255591100, - 0.005228310500, -0.004812448700, 0.005492759000, -0.005338761500}, - { -0.000835595400, -0.002625576200, 0.002763550700, -0.000660398000, - -0.002441798600, 0.006987700700, -0.014687960800, 0.035664170800, - 0.303024793500, -0.027226932800, 0.012507686500, -0.007362011400, - 0.005306264800, -0.004861076400, 0.005521878400, -0.005375829600}, - { -0.000840529300, -0.002627331400, 0.002763058500, -0.000662228600, - -0.002453253700, 0.007018769500, -0.014782113000, 0.035948446100, - 0.302972042600, -0.027509888900, 0.012671612300, -0.007469387600, - 0.005372340600, -0.004915494200, 0.005562631500, -0.005403790100}, - { -0.000843220100, -0.002620023800, 0.002760230300, -0.000660605900, - -0.002456982100, 0.007050007700, -0.014864692500, 0.036241695300, - 0.302928958400, -0.027786579600, 0.012825587300, -0.007574066800, - 0.005449141300, -0.004962376800, 0.005602376800, -0.005431440200}, - { -0.000848374500, -0.002621758400, 0.002759921300, -0.000662808200, - -0.002467783200, 0.007079958900, -0.014956855300, 0.036538564300, - 0.302880652200, -0.028068772200, 0.012990451100, -0.007683264800, - 0.005518700600, -0.005009907900, 0.005630853800, -0.005466715000}, - { -0.000851700900, -0.002612329100, 0.002766079600, -0.000662984200, - -0.002470535200, 0.007110968900, -0.015040742100, 0.036823681900, - 0.302836038100, -0.028342627700, 0.013153651000, -0.007789506200, - 0.005594863000, -0.005067111000, 0.005673345500, -0.005495962500}, - { -0.000856978400, -0.002613369900, 0.002763436900, -0.000673963700, - -0.002480246400, 0.007141770500, -0.015122696500, 0.037119392900, - 0.302785848400, -0.028623546600, 0.013318487200, -0.007897426600, - 0.005674706600, -0.005118090200, 0.005705570200, -0.005523266400}, - { -0.000859635800, -0.002606209100, 0.002760875300, -0.000672918600, - -0.002482718300, 0.007170544900, -0.015215522800, 0.037407381800, - 0.302738295200, -0.028897800000, 0.013473662100, -0.008005370600, - 0.005743489200, -0.005163726600, 0.005743450200, -0.005560237100}, - { -0.000863002200, -0.002596834100, 0.002767923100, -0.000675974400, - -0.002493386100, 0.007201598200, -0.015297293000, 0.037704094600, - 0.302685277400, -0.029176984600, 0.013637747600, -0.008112433600, - 0.005820627000, -0.005221758100, 0.005786648100, -0.005590368200}, - { -0.000867828800, -0.002598670200, 0.002766900000, -0.000675186800, - -0.002497981300, 0.007223193600, -0.015379756300, 0.037993797900, - 0.302642069200, -0.029458517200, 0.013805185000, -0.008225058800, - 0.005893724000, -0.005272906200, 0.005819685000, -0.005618333200}, - { -0.000870433100, -0.002591465700, 0.002764455200, -0.000674653700, - -0.002499759200, 0.007250951700, -0.015471874400, 0.038284268000, - 0.302587106700, -0.029736435400, 0.013970133000, -0.008333790400, - 0.005973581100, -0.005321845400, 0.005859684300, -0.005657037700}, - { -0.000875301600, -0.002593729700, 0.002764759200, -0.000677160100, - -0.002510659300, 0.007282648600, -0.015556232000, 0.038575785600, - 0.302541430200, -0.030018298000, 0.014128120100, -0.008444322900, - 0.006045352000, -0.005370854200, 0.005902462900, -0.005689051600}, - { -0.000878577700, -0.002584426900, 0.002771222400, -0.000678044400, - -0.002512230800, 0.007312074800, -0.015638780000, 0.038866667200, - 0.302496054000, -0.030288050400, 0.014292583100, -0.008553225900, - 0.006124864000, -0.005432964900, 0.005938417900, -0.005718682200}, - { -0.000883371200, -0.002586549000, 0.002771330800, -0.000680774600, - -0.002522537800, 0.007342861000, -0.015721824200, 0.039157112000, - 0.302437909100, -0.030564097400, 0.014458560600, -0.008665183400, - 0.006197183700, -0.005481519600, 0.005978394700, -0.005757587300}, - { -0.000885670100, -0.002579613300, 0.002768808300, -0.000679473400, - -0.002527024400, 0.007363441100, -0.015802899000, 0.039449376300, - 0.302387399600, -0.030841085500, 0.014625338400, -0.008776679900, - 0.006280742400, -0.005535923100, 0.006013604000, -0.005787145500}, - { -0.000891447000, -0.002579042300, 0.002777178000, -0.000681709200, - -0.002527331400, 0.007391840300, -0.015884752000, 0.039742056100, - 0.302336098600, -0.031117719900, 0.014792369000, -0.008889397700, - 0.006352081900, -0.005595185800, 0.006058727200, -0.005818964100}, - { -0.000893764400, -0.002572520300, 0.002775953500, -0.000683794500, - -0.002538011700, 0.007422582300, -0.015967839100, 0.040036207000, - 0.302282936600, -0.031394934700, 0.014949546000, -0.008998513600, - 0.006433987600, -0.005646959300, 0.006102867800, -0.005850311400}, - { -0.000899005400, -0.002573622600, 0.002772999400, -0.000692720800, - -0.002539675700, 0.007441443200, -0.016048205900, 0.040332527300, - 0.302235443400, -0.031680564700, 0.015119563200, -0.009112249200, - 0.006519185100, -0.005702277700, 0.006137124600, -0.005890136500}, - { -0.000902066000, -0.002564399000, 0.002779793900, -0.000694252800, - -0.002540354300, 0.007470292100, -0.016132038300, 0.040618118300, - 0.302181358200, -0.031955488100, 0.015287200700, -0.009226118300, - 0.006591765300, -0.005762778500, 0.006183472900, -0.005922781400}, - { -0.000906938700, -0.002566684400, 0.002780297700, -0.000697575600, - -0.002549585000, 0.007499502500, -0.016213682700, 0.040913759200, - 0.302123085100, -0.032226770800, 0.015450858700, -0.009346907400, - 0.006678209600, -0.005819558300, 0.006220559900, -0.005953802600}, - { -0.000909073800, -0.002560158500, 0.002778219800, -0.000696753300, - -0.002553495700, 0.007519854200, -0.016296539100, 0.041202514700, - 0.302075447000, -0.032502060800, 0.015620155600, -0.009463128500, - 0.006754676200, -0.005871819500, 0.006264360200, -0.005997784800}, - { -0.000914005100, -0.002562081100, 0.002778180000, -0.000697783700, - -0.002553821800, 0.007547123000, -0.016377089100, 0.041498813500, - 0.302013593200, -0.032784352400, 0.015779698800, -0.009574791300, - 0.006838885700, -0.005925655500, 0.006310258300, -0.006030707600}, - { -0.000917048000, -0.002553292100, 0.002786094000, -0.000702405400, - -0.002562617900, 0.007576990700, -0.016461435000, 0.041789551900, - 0.301962237800, -0.033057262400, 0.015948108300, -0.009690267000, - 0.006913942100, -0.005990311300, 0.006349328800, -0.006062933900}, - { -0.000921807000, -0.002555562000, 0.002785897700, -0.000702731900, - -0.002565562900, 0.007595979900, -0.016542771000, 0.042079113900, - 0.301910604800, -0.033329631800, 0.016116562300, -0.009804671800, - 0.007000329800, -0.006045818500, 0.006396695800, -0.006096934600}, - { -0.000924334400, -0.002548160800, 0.002781648600, -0.000711981100, - -0.002564257200, 0.007623115300, -0.016625851600, 0.042371265900, - 0.301854227800, -0.033610088700, 0.016287909800, -0.009922951400, - 0.007079130900, -0.006101996500, 0.006432255400, -0.006137812800}, - { -0.000927029000, -0.002539353500, 0.002789348200, -0.000715860200, - -0.002576064600, 0.007646012100, -0.016699057600, 0.042661393000, - 0.301797671500, -0.033890060300, 0.016458330300, -0.010038799500, - 0.007167086900, -0.006158957400, 0.006480627500, -0.006172693900}, - { -0.000931902700, -0.002541677100, 0.002789556600, -0.000717300000, - -0.002575750000, 0.007673144100, -0.016781259600, 0.042953309700, - 0.301741305700, -0.034159645200, 0.016627163700, -0.010155742500, - 0.007243536900, -0.006224969100, 0.006520927200, -0.006205898400}, - { -0.000933911800, -0.002535183000, 0.002787827800, -0.000716968300, - -0.002578831000, 0.007691723300, -0.016861993700, 0.043245651300, - 0.301682214200, -0.034440183200, 0.016788863600, -0.010270201400, - 0.007330632700, -0.006281032900, 0.006567502700, -0.006252289300}, - { -0.000939577700, -0.002534998100, 0.002796975700, -0.000720236600, - -0.002578087200, 0.007720653400, -0.016935463200, 0.043538995400, - 0.301633352100, -0.034711193400, 0.016959520500, -0.010389329800, - 0.007410503600, -0.006337047100, 0.006615790600, -0.006287412000}, - { -0.000941518100, -0.002528823500, 0.002796070900, -0.000722919300, - -0.002589426200, 0.007740582000, -0.017016393700, 0.043833061900, - 0.301569791200, -0.034986501900, 0.017129209400, -0.010505114500, - 0.007497394200, -0.006406316800, 0.006658344700, -0.006322346100}, - { -0.000946421000, -0.002531073000, 0.002796544700, -0.000724851500, - -0.002588324800, 0.007766585900, -0.017097850700, 0.044127692000, - 0.301505220000, -0.035261474700, 0.017300143900, -0.010624650100, - 0.007577627400, -0.006462535400, 0.006707002900, -0.006357778700}, - { -0.000949359500, -0.002521316700, 0.002800927700, -0.000735266600, - -0.002588925400, 0.007786312500, -0.017171090300, 0.044413545900, - 0.301451854500, -0.035540053600, 0.017473398600, -0.010743983400, - 0.007669196200, -0.006524338300, 0.006746574400, -0.006401639200}, - { -0.000954362300, -0.002523680400, 0.002801635500, -0.000737454900, - -0.002587518900, 0.007812074200, -0.017252787500, 0.044711874800, - 0.301393202700, -0.035815202400, 0.017645387000, -0.010864711900, - 0.007750585800, -0.006581589800, 0.006796203400, -0.006438009700}, - { -0.000956035500, -0.002517691400, 0.002800277200, -0.000737232300, - -0.002591035300, 0.007833242200, -0.017326384300, 0.044998869000, - 0.301337182700, -0.036093943200, 0.017809064300, -0.010981524900, - 0.007839125400, -0.006652924700, 0.006840684600, -0.006474304300}, - { -0.000961768900, -0.002517572500, 0.002810197300, -0.000743330300, - -0.002599865500, 0.007850982300, -0.017405665400, 0.045296336600, - 0.301279455500, -0.036359405400, 0.017979361500, -0.011101909300, - 0.007921089700, -0.006710841700, 0.006891483500, -0.006513718100}, - { -0.000963551800, -0.002511606900, 0.002809097600, -0.000744270100, - -0.002600023100, 0.007880162200, -0.017480905500, 0.045585787000, - 0.301219274700, -0.036633262700, 0.018151488300, -0.011221145500, - 0.008012401600, -0.006770837100, 0.006940658100, -0.006560412300}, - { -0.000968652300, -0.002513137500, 0.002806943500, -0.000754654000, - -0.002599054600, 0.007895994400, -0.017561716500, 0.045876647100, - 0.301155082000, -0.036915500100, 0.018327200500, -0.011345476800, - 0.008097770300, -0.006833460100, 0.006983825400, -0.006596465200}, - { -0.000970271500, -0.002507180900, 0.002805563000, -0.000754783900, - -0.002601855100, 0.007916113200, -0.017634207100, 0.046165570800, - 0.301092874000, -0.037187988000, 0.018499388000, -0.011464768800, - 0.008187619300, -0.006903834600, 0.007038598500, -0.006636191300}, - { -0.000975884100, -0.002506921900, 0.002815167300, -0.000759066900, - -0.002599558300, 0.007943302900, -0.017707594600, 0.046455528400, - 0.301029284000, -0.037460064500, 0.018672889900, -0.011588469400, - 0.008272917200, -0.006966950500, 0.007082025300, -0.006672404900}, - { -0.000977775800, -0.002500954000, 0.002814043200, -0.000759764200, - -0.002601193300, 0.007960205400, -0.017789132800, 0.046750583700, - 0.300971836600, -0.037732212300, 0.018846008900, -0.011709400800, - 0.008366076000, -0.007028371700, 0.007132703000, -0.006720561000}, - { -0.000982640700, -0.002503047600, 0.002812783500, -0.000772729700, - -0.002609428000, 0.007980042300, -0.017860728900, 0.047040567000, - 0.300906624700, -0.038005599900, 0.019011206000, -0.011831617600, - 0.008451307000, -0.007091540900, 0.007176317300, -0.006756891400}, - { -0.000985371100, -0.002494154700, 0.002820679000, -0.000776398500, - -0.002607418500, 0.008007388400, -0.017934700400, 0.047335766700, - 0.300844278100, -0.038285177900, 0.019186232700, -0.011953311100, - 0.008543197100, -0.007164042200, 0.007233149500, -0.006798540800}, - { -0.000987006200, -0.002488366700, 0.002819585000, -0.000777006200, - -0.002609399200, 0.008026572200, -0.018006655200, 0.047630120500, - 0.300783801700, -0.038555831700, 0.019361129300, -0.012079179200, - 0.008630964100, -0.007229475600, 0.007279247200, -0.006839293900}, - { -0.000991790800, -0.002490903500, 0.002820404900, -0.000778976000, - -0.002609670800, 0.008041528500, -0.018085444700, 0.047923413800, - 0.300712721600, -0.038822537300, 0.019533132300, -0.012200346800, - 0.008724921800, -0.007291803100, 0.007330615400, -0.006888043700}, - { -0.000994223400, -0.002482150700, 0.002828146400, -0.000781936000, - -0.002610430800, 0.008060409500, -0.018159587600, 0.048210544400, - 0.300648793200, -0.039101469100, 0.019710850400, -0.012328366300, - 0.008814417700, -0.007358544200, 0.007377316500, -0.006926866100}, - { -0.000999231800, -0.002484009500, 0.002826100200, -0.000792419400, - -0.002609247300, 0.008077029200, -0.018229228000, 0.048504934800, - 0.300585104500, -0.039369675200, 0.019885022200, -0.012451522700, - 0.008910574100, -0.007423567800, 0.007433072000, -0.006968240600}, - { -0.001000945500, -0.002478474500, 0.002825789700, -0.000794439900, - -0.002607855100, 0.008105184800, -0.018306252700, 0.048797495500, - 0.300525821900, -0.039647806700, 0.020062891600, -0.012579180400, - 0.008997547100, -0.007499733800, 0.007482806700, -0.007009147900}, - { -0.001006580300, -0.002478145100, 0.002835512200, -0.000798497500, - -0.002607487200, 0.008121814200, -0.018375427900, 0.049092597200, - 0.300460428800, -0.039917450300, 0.020228151600, -0.012700466400, - 0.009092708900, -0.007563628700, 0.007535511600, -0.007059152000}, - { -0.001008355200, -0.002471553400, 0.002831584800, -0.000808105100, - -0.002606745200, 0.008139326600, -0.018448182600, 0.049381202700, - 0.300391149900, -0.040192877300, 0.020406004000, -0.012829151000, - 0.009182604800, -0.007628580400, 0.007591957300, -0.007101149600}, - { -0.001013982200, -0.002471464900, 0.002841559200, -0.000812553500, - -0.002606187400, 0.008156499100, -0.018520619000, 0.049672014200, - 0.300332528600, -0.040460854200, 0.020581902400, -0.012954925100, - 0.009282076700, -0.007699103200, 0.007641451600, -0.007142203300}, - { -0.001015410900, -0.002465827800, 0.002840812400, -0.000813752200, - -0.002607328400, 0.008174805900, -0.018593391800, 0.049961784800, - 0.300260370700, -0.040734108300, 0.020758957600, -0.013083002200, - 0.009369503200, -0.007773543100, 0.007701593500, -0.007189132600}, - { -0.001020138600, -0.002468794900, 0.002842431500, -0.000816356100, - -0.002607611600, 0.008192356500, -0.018666130300, 0.050254997100, - 0.300195390400, -0.041008289300, 0.020936736300, -0.013210161600, - 0.009469910200, -0.007844275500, 0.007748911800, -0.007239595400}, - { -0.001022805800, -0.002458999000, 0.002846963800, -0.000828329300, - -0.002605038900, 0.008207999600, -0.018736947600, 0.050544717400, - 0.300121126000, -0.041280619200, 0.021114682600, -0.013339966800, - 0.009561255200, -0.007910621800, 0.007806632000, -0.007282763500}, - { -0.001027526900, -0.002462055200, 0.002848515400, -0.000830876200, - -0.002605154700, 0.008224995500, -0.018808660100, 0.050837682400, - 0.300056546100, -0.041544493000, 0.021290236500, -0.013466505100, - 0.009661947700, -0.007982526900, 0.007857386900, -0.007324914900}, - { -0.001029015400, -0.002456559500, 0.002848095500, -0.000832295700, - -0.002605985800, 0.008242689200, -0.018881182900, 0.051132245200, - 0.299987943200, -0.041819414400, 0.021460165700, -0.013595099000, - 0.009753117800, -0.008049069000, 0.007915606500, -0.007368637400}, - { -0.001034829400, -0.002455432800, 0.002854963900, -0.000845516700, - -0.002603155800, 0.008260465800, -0.018942531200, 0.051423553400, - 0.299919862100, -0.042091828500, 0.021638799100, -0.013722881700, - 0.009852191300, -0.008130314500, 0.007966615900, -0.007421596100}, - { -0.001036184000, -0.002450114700, 0.002854590200, -0.000847135700, - -0.002603834000, 0.008278482500, -0.019017700500, 0.051710800600, - 0.299849767900, -0.042362922600, 0.021817938400, -0.013854742200, - 0.009945759200, -0.008198836000, 0.008026496300, -0.007466532300}, - { -0.001037730800, -0.002444743300, 0.002854305800, -0.000848986600, - -0.002604044700, 0.008295552500, -0.019090033000, 0.052010247800, - 0.299784559000, -0.042634176100, 0.021997806500, -0.013987692600, - 0.010041094600, -0.008271562400, 0.008079345200, -0.007513280300}, - { -0.001043455200, -0.002444344500, 0.002864501800, -0.000854285500, - -0.002602041500, 0.008310446500, -0.019159837900, 0.052305586800, - 0.299710502400, -0.042902559300, 0.022175330800, -0.014116237900, - 0.010143265600, -0.008342511600, 0.008140629300, -0.007559512700}, - { -0.001044875200, -0.002438248600, 0.002860802800, -0.000864181800, - -0.002600981100, 0.008329727400, -0.019224621200, 0.052591247500, - 0.299637947900, -0.043172229900, 0.022355720200, -0.014249993700, - 0.010239585900, -0.008416132400, 0.008193382200, -0.007603296800}, - { -0.001049660900, -0.002441463500, 0.002862933200, -0.000867444000, - -0.002600374000, 0.008346423900, -0.019298671600, 0.052882824900, - 0.299571471100, -0.043441724600, 0.022534686200, -0.014379049200, - 0.010339539800, -0.008496004600, 0.008255099600, -0.007660450500}, - { -0.001051839000, -0.002432661800, 0.002871064200, -0.000871418100, - -0.002599735200, 0.008364846400, -0.019359975400, 0.053178429700, - 0.299491463500, -0.043720040800, 0.022707641400, -0.014511589100, - 0.010435528000, -0.008569545100, 0.008307898100, -0.007704528800}, - { -0.001056944400, -0.002434904100, 0.002869839900, -0.000883216200, - -0.002596486400, 0.008379552700, -0.019432499100, 0.053470206400, - 0.299422575400, -0.043988296500, 0.022887494700, -0.014642563600, - 0.010540183700, -0.008642947600, 0.008371567300, -0.007752716200}, - { -0.001059278600, -0.002426308700, 0.002878112600, -0.000887696700, - -0.002594827000, 0.008395133400, -0.019505511500, 0.053763206500, - 0.299351847700, -0.044255915700, 0.023068158700, -0.014777689900, - 0.010638181300, -0.008718424600, 0.008427026200, -0.007801564500}, - { -0.001063908000, -0.002429340400, 0.002879382200, -0.000887586200, - -0.002586331800, 0.008411993400, -0.019568733800, 0.054053355000, - 0.299282071600, -0.044524238300, 0.023251997700, -0.014901532300, - 0.010741407000, -0.008790859100, 0.008487210700, -0.007858185900}, - { -0.001065244000, -0.002423263600, 0.002875630100, -0.000897083200, - -0.002587760600, 0.008421815400, -0.019630506300, 0.054344370000, - 0.299207159000, -0.044799707800, 0.023436300800, -0.015039485700, - 0.010841905100, -0.008868051200, 0.008543139300, -0.007904789100}, - { -0.001071045600, -0.002422944100, 0.002886222600, -0.000903092500, - -0.002584785900, 0.008436057700, -0.019701857900, 0.054637916200, - 0.299132742800, -0.045064497900, 0.023616380100, -0.015174084700, - 0.010937108800, -0.008952392000, 0.008600802500, -0.007952339000}, - { -0.001072495600, -0.002416975800, 0.002882721100, -0.000913301400, - -0.002582942100, 0.008453838100, -0.019764945900, 0.054929607400, - 0.299058734900, -0.045332341000, 0.023788158500, -0.015304227600, - 0.011042483200, -0.009027145700, 0.008665715200, -0.008001667100}, - { -0.001077376400, -0.002420012800, 0.002885109500, -0.000917271300, - -0.002580907300, 0.008468413700, -0.019836708300, 0.055225670900, - 0.298977325900, -0.045602981800, 0.023970548200, -0.015441580200, - 0.011142744200, -0.009104537200, 0.008722251100, -0.008048876900}, - { -0.001079321400, -0.002411773500, 0.002893394800, -0.000920943200, - -0.002583378800, 0.008478936300, -0.019901475900, 0.055512440700, - 0.298911585300, -0.045870162900, 0.024153171400, -0.015576602500, - 0.011251768000, -0.009181661000, 0.008787159000, -0.008112103700}, - { -0.001084311600, -0.002413690800, 0.002891307200, -0.000929480500, - -0.002571357000, 0.008492748700, -0.019961847400, 0.055805182500, - 0.298830136900, -0.046141044500, 0.024337335900, -0.015715846500, - 0.011353693700, -0.009260656400, 0.008844778800, -0.008160197200}, - { -0.001085440200, -0.002408972300, 0.002891576300, -0.000931811500, - -0.002571374100, 0.008512218400, -0.020029308800, 0.056094866900, - 0.298759763600, -0.046405144200, 0.024519846800, -0.015854163900, - 0.011454721200, -0.009336453400, 0.008911303700, -0.008211115400}, - { -0.001087840400, -0.002400214400, 0.002900157200, -0.000936969600, - -0.002568721700, 0.008526039100, -0.020100315900, 0.056395501800, - 0.298682066000, -0.046677919500, 0.024693755800, -0.015986171300, - 0.011560009200, -0.009425383800, 0.008972850800, -0.008261904500}, - { -0.001092599200, -0.002402600100, 0.002898882600, -0.000948207200, - -0.002568479900, 0.008534249200, -0.020162388700, 0.056680564700, - 0.298599300000, -0.046947568800, 0.024878475500, -0.016126306100, - 0.011662794000, -0.009502392800, 0.009040315200, -0.008313510700}, - { -0.001094674000, -0.002394239600, 0.002907384900, -0.000953100600, - -0.002566762900, 0.008551918400, -0.020227896300, 0.056970953100, - 0.298525257700, -0.047209041900, 0.025060099400, -0.016261962900, - 0.011773596800, -0.009584221800, 0.009097353100, -0.008372136900}, - { -0.001099661700, -0.002396213700, 0.002905172800, -0.000960917900, - -0.002557753000, 0.008556551400, -0.020285138500, 0.057267599400, - 0.298446320200, -0.047478375000, 0.025245702300, -0.016403414400, - 0.011877441200, -0.009662092200, 0.009165535000, -0.008424799700}, - { -0.001100755900, -0.002391414300, 0.002905602300, -0.000963826400, - -0.002557026600, 0.008574970900, -0.020351243300, 0.057560244000, - 0.298365825000, -0.047747110700, 0.025434302500, -0.016536709400, - 0.011980096900, -0.009743311000, 0.009226377800, -0.008478483800}, - { -0.001106899300, -0.002390253900, 0.002913287000, -0.000978876700, - -0.002551352000, 0.008590004000, -0.020415253900, 0.057854601300, - 0.298294423300, -0.048021033600, 0.025612282700, -0.016673561700, - 0.012092889000, -0.009827928200, 0.009288917500, -0.008530542400}, - { -0.001107825500, -0.002385153400, 0.002912420300, -0.000977036900, - -0.002545865100, 0.008597199400, -0.020476810000, 0.058145551600, - 0.298212478700, -0.048288066300, 0.025797833300, -0.016816027500, - 0.012198085900, -0.009907251900, 0.009358594600, -0.008584316600}, - { -0.001113605200, -0.002384780000, 0.002923485400, -0.000983932400, - -0.002542224400, 0.008612798400, -0.020540206700, 0.058438067100, - 0.298128451900, -0.048553232900, 0.025981636800, -0.016954362300, - 0.012312002500, -0.009992841500, 0.009421764400, -0.008636872000}, - { -0.001114931100, -0.002379174400, 0.002919927800, -0.000993979200, - -0.002542420300, 0.008620998100, -0.020602200500, 0.058732787100, - 0.298055673800, -0.048812541600, 0.026165585800, -0.017095016200, - 0.012413140100, -0.010079579700, 0.009490588100, -0.008700892600}, - { -0.001119665800, -0.002382694100, 0.002922998700, -0.000998529900, - -0.002540198000, 0.008638257800, -0.020669669800, 0.059018701600, - 0.297970747600, -0.049076921100, 0.026350960600, -0.017238147400, - 0.012520217600, -0.010164038100, 0.009553595700, -0.008753278600}, - { -0.001121930300, -0.002372946000, 0.002926808400, -0.001007501500, - -0.002530568000, 0.008642272200, -0.020728754500, 0.059312998000, - 0.297893741900, -0.049347375400, 0.026529402400, -0.017376589500, - 0.012634266200, -0.010246944100, 0.009626161500, -0.008809499600}, - { -0.001126794900, -0.002376553600, 0.002930143500, -0.001012468200, - -0.002528098100, 0.008659451000, -0.020796619900, 0.059603377300, - 0.297814833400, -0.049613614700, 0.026720176000, -0.017513336800, - 0.012740654600, -0.010331978800, 0.009690722000, -0.008866407500}, - { -0.001128974000, -0.002366817000, 0.002934650000, -0.001025446300, - -0.002525885700, 0.008665084700, -0.020855847900, 0.059897161500, - 0.297721129900, -0.049883464500, 0.026908098600, -0.017658755900, - 0.012849997300, -0.010418098600, 0.009755024700, -0.008920174300}, - { -0.001129829700, -0.002362132000, 0.002934410200, -0.001024611700, - -0.002517293800, 0.008683823800, -0.020914048900, 0.060185287000, - 0.297640606500, -0.050147624100, 0.027094554000, -0.017800540400, - 0.012966752800, -0.010503877000, 0.009829858100, -0.008978175500}, - { -0.001134965700, -0.002364533600, 0.002933528900, -0.001036539700, - -0.002515641700, 0.008689737800, -0.020973444000, 0.060482529200, - 0.297557115100, -0.050413365200, 0.027273058500, -0.017943142100, - 0.013074472100, -0.010588375400, 0.009890164700, -0.009040073800}, - { -0.001136940000, -0.002355925500, 0.002941289900, -0.001037794300, - -0.002507997500, 0.008695284800, -0.021036808600, 0.060775711600, - 0.297482132700, -0.050678910500, 0.027462057700, -0.018090535100, - 0.013184994200, -0.010672807300, 0.009964812300, -0.009098345900}, - { -0.001142165600, -0.002358437400, 0.002940699400, -0.001050877900, - -0.002502402100, 0.008709501200, -0.021101691400, 0.061067211800, - 0.297396279600, -0.050939241800, 0.027647756700, -0.018232338700, - 0.013303147900, -0.010762989400, 0.010032437200, -0.009154686400}, - { -0.001143817000, -0.002350196200, 0.002949420200, -0.001055769400, - -0.002503786900, 0.008721014300, -0.021156852500, 0.061355453400, - 0.297312718800, -0.051205897900, 0.027831555500, -0.018369198800, - 0.013411298100, -0.010850127500, 0.010098901500, -0.009213325600}, - { -0.001149066000, -0.002352278400, 0.002947918700, -0.001065202900, - -0.002489611700, 0.008732236600, -0.021220051600, 0.061647632000, - 0.297221172300, -0.051473353600, 0.028021068000, -0.018517173300, - 0.013522491900, -0.010935538100, 0.010174446400, -0.009272360200}, - { -0.001149887200, -0.002347967100, 0.002948573300, -0.001067597300, - -0.002492352100, 0.008744611200, -0.021276152500, 0.061941420000, - 0.297140614200, -0.051734216700, 0.028208189500, -0.018660250400, - 0.013639306600, -0.011036161100, 0.010246624400, -0.009332105500}, - { -0.001156099600, -0.002346166500, 0.002954987600, -0.001078834400, - -0.002480260300, 0.008746430300, -0.021336172300, 0.062236110400, - 0.297056151300, -0.052003778300, 0.028400005500, -0.018810443800, - 0.013752383900, -0.011122203700, 0.010319669900, -0.009400556800}, - { -0.001156792500, -0.002341776700, 0.002955577100, -0.001081090900, - -0.002482874600, 0.008758231200, -0.021390879000, 0.062526684700, - 0.296965665500, -0.052264429900, 0.028578727400, -0.018955461900, - 0.013863735500, -0.011211408300, 0.010387174600, -0.009457035400}, - { -0.001163170100, -0.002339996800, 0.002962141700, -0.001093302800, - -0.002466860000, 0.008767593500, -0.021452275300, 0.062822494300, - 0.296881395600, -0.052523860000, 0.028770277400, -0.019092348700, - 0.013982426200, -0.011303346500, 0.010456770600, -0.009515365500}, - { -0.001163895700, -0.002335754800, 0.002963079500, -0.001096137300, - -0.002469118700, 0.008780017100, -0.021511634200, 0.063110931400, - 0.296794244500, -0.052791038800, 0.028962045800, -0.019243677500, - 0.014097865300, -0.011393027300, 0.010536858700, -0.009581441000}, - { -0.001170125300, -0.002333956200, 0.002969450300, -0.001107234800, - -0.002456863700, 0.008780917600, -0.021569686100, 0.063405648500, - 0.296709109200, -0.053052763700, 0.029143138800, -0.019391070400, - 0.014211122400, -0.011483842100, 0.010606181300, -0.009639674100}, - { -0.001170874500, -0.002329660800, 0.002970330900, -0.001110081400, - -0.002459004700, 0.008793030100, -0.021628522100, 0.063695013000, - 0.296618745800, -0.053317589600, 0.029334344500, -0.019542481200, - 0.014326849900, -0.011573598100, 0.010685674300, -0.009702145300}, - { -0.001171914500, -0.002323961500, 0.002966009600, -0.001116909400, - -0.002450355900, 0.008799692100, -0.021679886200, 0.063990447900, - 0.296526171200, -0.053581877800, 0.029529044900, -0.019682702400, - 0.014449006700, -0.011668677900, 0.010757748000, -0.009762586000}, - { -0.001178072500, -0.002323403700, 0.002977740500, -0.001125189300, - -0.002444614700, 0.008813206900, -0.021746613300, 0.064282383100, - 0.296436562600, -0.053839700800, 0.029708485400, -0.019829369800, - 0.014562038800, -0.011759300000, 0.010824029000, -0.009829464000}, - { -0.001179124900, -0.002317979100, 0.002973757000, -0.001132168000, - -0.002435747100, 0.008820504400, -0.021802440100, 0.064574678500, - 0.296352017200, -0.054105959400, 0.029902690900, -0.019983871100, - 0.014680546000, -0.011851836600, 0.010906814900, -0.009898260300}, - { -0.001185031900, -0.002317376800, 0.002984984200, -0.001139351300, - -0.002434510900, 0.008828516100, -0.021853498100, 0.064870816200, - 0.296258886800, -0.054357841800, 0.030089125800, -0.020129945500, - 0.014804636400, -0.011948361700, 0.010980172100, -0.009959891000}, - { -0.001186088400, -0.002311933800, 0.002981060500, -0.001146354300, - -0.002425750100, 0.008835761000, -0.021908764800, 0.065163770900, - 0.296172290700, -0.054626925700, 0.030279417600, -0.020274570600, - 0.014920355400, -0.012042691300, 0.011052809300, -0.010020900500}, - { -0.001192214700, -0.002310334400, 0.002988338000, -0.001161750800, - -0.002421544800, 0.008842662600, -0.021962597300, 0.065452832100, - 0.296075847400, -0.054887446700, 0.030471019600, -0.020427698700, - 0.015038441400, -0.012134860100, 0.011134601100, -0.010085579200}, - { -0.001193029800, -0.002305832600, 0.002988510300, -0.001160745800, - -0.002415287100, 0.008851064800, -0.022018328800, 0.065747514100, - 0.295985303100, -0.055152663300, 0.030655950200, -0.020580030600, - 0.015157088900, -0.012231165800, 0.011208895700, -0.010148001100}, - { -0.001199255200, -0.002303988400, 0.002994947800, -0.001172180300, - -0.002403060700, 0.008854931500, -0.022070359700, 0.066040074000, - 0.295894792100, -0.055414282300, 0.030848876200, -0.020731638800, - 0.015285837100, -0.012331974000, 0.011286215600, -0.010212808300}, - { -0.001200034300, -0.002300011200, 0.002996071300, -0.001175466100, - -0.002404798200, 0.008866742900, -0.022131427200, 0.066328312100, - 0.295807177000, -0.055667568800, 0.031043216800, -0.020877200500, - 0.015401999100, -0.012423245400, 0.011365248300, -0.010290103500}, - { -0.001205321400, -0.002302348400, 0.002994763100, -0.001184119100, - -0.002394208300, 0.008871703300, -0.022183982500, 0.066622310400, - 0.295714067400, -0.055930893500, 0.031228731500, -0.021030519400, - 0.015521915600, -0.012520884000, 0.011440787900, -0.010353664500}, - { -0.001207424300, -0.002292788000, 0.002999278000, -0.001198036500, - -0.002390705100, 0.008878791700, -0.022237804200, 0.066918218000, - 0.295617466000, -0.056188447800, 0.031421091300, -0.021185866100, - 0.015643456400, -0.012619826700, 0.011517277400, -0.010418126800}, - { -0.001212436700, -0.002296230600, 0.003002379300, -0.001199058000, - -0.002383054500, 0.008886317900, -0.022295584100, 0.067206178800, - 0.295523834300, -0.056451724100, 0.031610777900, -0.021331865900, - 0.015760653300, -0.012712731400, 0.011600637200, -0.010484290500}, - { -0.001214616000, -0.002286436600, 0.003006011700, -0.001208867400, - -0.002371663200, 0.008890402300, -0.022347745200, 0.067505660900, - 0.295433201300, -0.056710441700, 0.031804218000, -0.021485136600, - 0.015891596000, -0.012815991100, 0.011680400300, -0.010551509800}, - { -0.001219729000, -0.002290053700, 0.003010061800, -0.001214114500, - -0.002371512600, 0.008900068000, -0.022406367600, 0.067795719500, - 0.295335292700, -0.056969680800, 0.031988588100, -0.021638667600, - 0.016012759800, -0.012915294700, 0.011757803200, -0.010616490000}, - { -0.001221768100, -0.002280163100, 0.003013484800, -0.001223949400, - -0.002359880400, 0.008903658200, -0.022457194700, 0.068091568200, - 0.295234898600, -0.057225248100, 0.032185366300, -0.021787511700, - 0.016132334200, -0.013010433300, 0.011843615700, -0.010688812000}, - { -0.001222885000, -0.002274839200, 0.003009550000, -0.001230956100, - -0.002350338500, 0.008909637200, -0.022513896200, 0.068385169700, - 0.295142943400, -0.057486437700, 0.032372518000, -0.021943625600, - 0.016255565900, -0.013111568500, 0.011922721200, -0.010755431700}, - { -0.001228791200, -0.002274200700, 0.003021279300, -0.001238353400, - -0.002352971000, 0.008913972000, -0.022561101300, 0.068676416600, - 0.295047141500, -0.057751817000, 0.032570797200, -0.022105269700, - 0.016383459600, -0.013216314100, 0.012004282000, -0.010824042300}, - { -0.001229834600, -0.002268726500, 0.003017029900, -0.001245178500, - -0.002343674400, 0.008919626500, -0.022616489300, 0.068966542100, - 0.294944915100, -0.058008634000, 0.032758671600, -0.022247384700, - 0.016509174100, -0.013312472500, 0.012086623000, -0.010900887700}, - { -0.001236321600, -0.002266647300, 0.003023412200, -0.001256945700, - -0.002330427000, 0.008922281200, -0.022670102300, 0.069259760100, - 0.294849437700, -0.058263509000, 0.032953544400, -0.022407065400, - 0.016635331800, -0.013416137200, 0.012167754700, -0.010969358900}, - { -0.001237037300, -0.002262428500, 0.003023848100, -0.001256128400, - -0.002324464800, 0.008933910800, -0.022719357000, 0.069553175900, - 0.294752983200, -0.058521997300, 0.033144550900, -0.022556496100, - 0.016757477900, -0.013517704400, 0.012247285200, -0.011036494600}, - { -0.001243631400, -0.002260491700, 0.003031143500, -0.001272367300, - -0.002318660300, 0.008938942400, -0.022774221100, 0.069848353600, - 0.294654140800, -0.058774188400, 0.033338099000, -0.022715294600, - 0.016882921900, -0.013617730300, 0.012337731100, -0.011112979600}, - { -0.001244616700, -0.002255007200, 0.003026834400, -0.001278495600, - -0.002312971700, 0.008936004500, -0.022826323700, 0.070143346800, - 0.294550501800, -0.059037642400, 0.033527611400, -0.022874644300, - 0.017009920100, -0.013722251500, 0.012419958100, -0.011182377900}, - { -0.001249868500, -0.002258640400, 0.003030359000, -0.001279931900, - -0.002305315700, 0.008946945700, -0.022879051900, 0.070434097200, - 0.294460157000, -0.059293518700, 0.033729073000, -0.023029828700, - 0.017136721300, -0.013827892600, 0.012503092200, -0.011252540100}, - { -0.001252011800, -0.002248666800, 0.003033725600, -0.001289637300, - -0.002293460500, 0.008949854300, -0.022931857800, 0.070729691900, - 0.294357625700, -0.059546703200, 0.033913734300, -0.023182283200, - 0.017269467600, -0.013934406600, 0.012586727200, -0.011323121700}, - { -0.001257327400, -0.002251340000, 0.003033306900, -0.001302187900, - -0.002294842900, 0.008953591700, -0.022981051800, 0.071016115000, - 0.294253594500, -0.059806163900, 0.034116321500, -0.023338009400, - 0.017396575200, -0.014036439400, 0.012678155200, -0.011396549400}, - { -0.001259366100, -0.002242376300, 0.003041364800, -0.001304581400, - -0.002285404200, 0.008958134900, -0.023035573000, 0.071318036600, - 0.294155332000, -0.060059835200, 0.034302863600, -0.023496551600, - 0.017523724800, -0.014142299300, 0.012762833200, -0.011472239700}, - { -0.001264793200, -0.002244873300, 0.003040255700, -0.001313420800, - -0.002274742400, 0.008966178100, -0.023084721700, 0.071604519400, - 0.294053570900, -0.060314068800, 0.034495386400, -0.023649793700, - 0.017653808300, -0.014239964400, 0.012843156400, -0.011540516700}, - { -0.001266776300, -0.002234895800, 0.003043324900, -0.001322245300, - -0.002267675400, 0.008965455900, -0.023127290700, 0.071902922400, - 0.293950616300, -0.060571265600, 0.034693878200, -0.023814273900, - 0.017784544000, -0.014343601700, 0.012932068300, -0.011623815900}, - { -0.001272408000, -0.002238111400, 0.003046799700, -0.001323837000, - -0.002258841200, 0.008970913900, -0.023185828700, 0.072198731500, - 0.293850684700, -0.060823698800, 0.034885265900, -0.023966290300, - 0.017910112100, -0.014448925000, 0.013015910500, -0.011694882200}, - { -0.001274483600, -0.002228201400, 0.003050212200, -0.001333772300, - -0.002247134700, 0.008978152700, -0.023234912400, 0.072492005600, - 0.293746271400, -0.061079622500, 0.035084175400, -0.024131925000, - 0.018043115400, -0.014559744600, 0.013103666900, -0.011769115200}, - { -0.001275293500, -0.002223339400, 0.003046802300, -0.001344236100, - -0.002249832100, 0.008982191000, -0.023282772800, 0.072780111500, - 0.293638750200, -0.061329463600, 0.035275317400, -0.024284154200, - 0.018169987600, -0.014666643200, 0.013189357000, -0.011845461600}, - { -0.001282008300, -0.002220878800, 0.003053154500, -0.001356054900, - -0.002236664600, 0.008988073400, -0.023330451200, 0.073072951600, - 0.293533527800, -0.061588331200, 0.035466290700, -0.024446846900, - 0.018300582900, -0.014771995300, 0.013284279500, -0.011922344800}, - { -0.001282913700, -0.002216603000, 0.003053533900, -0.001354819600, - -0.002234495000, 0.008991178300, -0.023379395200, 0.073372194300, - 0.293431988400, -0.061843667600, 0.035669418700, -0.024601980400, - 0.018440114900, -0.014885760000, 0.013374412100, -0.011998777300}, - { -0.001289852900, -0.002213970900, 0.003059661400, -0.001366666100, - -0.002220358400, 0.008991998000, -0.023433472500, 0.073667719600, - 0.293326498300, -0.062091368600, 0.035856112000, -0.024762400200, - 0.018570057000, -0.014994590500, 0.013461432300, -0.012072689000}, - { -0.001290828100, -0.002208668300, 0.003055268400, -0.001372665000, - -0.002215250000, 0.008992759700, -0.023479470700, 0.073961694600, - 0.293216599600, -0.062347556700, 0.036051519300, -0.024918766800, - 0.018700312600, -0.015104288800, 0.013548919900, -0.012146903000}, - { -0.001297565000, -0.002206188900, 0.003061515200, -0.001384640400, - -0.002201711800, 0.008998523600, -0.023530332000, 0.074248575600, - 0.293108050300, -0.062599496300, 0.036250520900, -0.025085987100, - 0.018835062100, -0.015213765300, 0.013648384700, -0.012231594800}, - { -0.001298486200, -0.002201990500, 0.003061911500, -0.001383193600, - -0.002199540200, 0.009001070400, -0.023577987000, 0.074548400000, - 0.293006277700, -0.062848029800, 0.036443834300, -0.025242884300, - 0.018970177400, -0.015316494200, 0.013733603800, -0.012304800000}, - { -0.001305173000, -0.002199287800, 0.003067771800, -0.001393998700, - -0.002190657800, 0.008998337100, -0.023620522900, 0.074841359700, - 0.292893802300, -0.063101285300, 0.036634397500, -0.025407276700, - 0.019104315500, -0.015429059800, 0.013823584100, -0.012381206600}, - { -0.001306486000, -0.002193998000, 0.003063717500, -0.001401081300, - -0.002180765400, 0.009007040500, -0.023673990600, 0.075136252200, - 0.292786821600, -0.063356530800, 0.036831074500, -0.025565504100, - 0.019236546600, -0.015541317500, 0.013913853300, -0.012457823800}, - { -0.001313321900, -0.002191380800, 0.003069674600, -0.001412157700, - -0.002171714300, 0.009004937300, -0.023721555300, 0.075427591700, - 0.292680753800, -0.063607547900, 0.037031767000, -0.025735481500, - 0.019375159900, -0.015657767200, 0.014007257400, -0.012537078000}, - { -0.001314354900, -0.002186268300, 0.003065150800, -0.001417698000, - -0.002167557500, 0.009010001600, -0.023759323400, 0.075724712100, - 0.292576319400, -0.063853917500, 0.037225319700, -0.025892093800, - 0.019506037600, -0.015764904400, 0.014104155900, -0.012616476800}, - { -0.001321218400, -0.002184458600, 0.003076233500, -0.001422547300, - -0.002156670200, 0.009017151300, -0.023810871100, 0.076019700600, - 0.292466530500, -0.064106762900, 0.037421391100, -0.026050975100, - 0.019639469300, -0.015878862800, 0.014196955700, -0.012699499300}, - { -0.001322405100, -0.002179145600, 0.003071783900, -0.001428408900, - -0.002151344500, 0.009017528200, -0.023860018100, 0.076314227000, - 0.292354833000, -0.064357589600, 0.037613307800, -0.026218842900, - 0.019781456700, -0.015987370400, 0.014287400700, -0.012776898100}, - { -0.001329411400, -0.002176246500, 0.003077588100, -0.001439416300, - -0.002142422000, 0.009015226300, -0.023906702500, 0.076607212500, - 0.292243989500, -0.064609585900, 0.037810235300, -0.026378597000, - 0.019915634000, -0.016100609100, 0.014374613700, -0.012862479300}, - { -0.001331821400, -0.002165817700, 0.003080409800, -0.001449188900, - -0.002130265600, 0.009021448800, -0.023957398700, 0.076903557900, - 0.292129090700, -0.064858733100, 0.038005130000, -0.026536730800, - 0.020047933100, -0.016209483700, 0.014473806100, -0.012943770500}, - { -0.001332912300, -0.002160549700, 0.003075666900, -0.001454699900, - -0.002125747900, 0.009026360900, -0.023998381000, 0.077196425000, - 0.292014040700, -0.065102449400, 0.038203933500, -0.026707041800, - 0.020188140300, -0.016328233200, 0.014569262800, -0.013025077600}, - { -0.001339767200, -0.002158494200, 0.003086316400, -0.001458535300, - -0.002119522600, 0.009025408000, -0.024045414700, 0.077491289100, - 0.291898436700, -0.065350608700, 0.038399388600, -0.026866946500, - 0.020323488600, -0.016444050200, 0.014663919000, -0.013110011800}, - { -0.001341225900, -0.002153019500, 0.003081710900, -0.001464447200, - -0.002114130700, 0.009025651700, -0.024094239400, 0.077792721000, - 0.291786795400, -0.065599338300, 0.038596149400, -0.027027766200, - 0.020459538900, -0.016560228700, 0.014758176300, -0.013190641200}, - { -0.001348116400, -0.002150215500, 0.003087524600, -0.001475208500, - -0.002105937200, 0.009027973200, -0.024136747400, 0.078077054200, - 0.291673553600, -0.065848400700, 0.038789809200, -0.027198631300, - 0.020605326600, -0.016672927800, 0.014852276800, -0.013270943900}, - { -0.001349842500, -0.002144524900, 0.003082911700, -0.001481921800, - -0.002095570400, 0.009035188200, -0.024188073400, 0.078381474100, - 0.291557196100, -0.066093324400, 0.038984672800, -0.027358305900, - 0.020740566100, -0.016789045200, 0.014946715800, -0.013351892900}, - { -0.001357082800, -0.002141367000, 0.003088470800, -0.001492702300, - -0.002087255200, 0.009036993800, -0.024226476800, 0.078678890800, - 0.291445410400, -0.066341740000, 0.039182293600, -0.027520351800, - 0.020877384400, -0.016902143900, 0.015049535100, -0.013436720300}, - { -0.001358430400, -0.002135814900, 0.003082938500, -0.001493462900, - -0.002074639200, 0.009034254800, -0.024276630700, 0.078972791400, - 0.291332516600, -0.066588317200, 0.039375542700, -0.027690881700, - 0.021019023100, -0.017023199600, 0.015149195700, -0.013526024300}, - { -0.001365518600, -0.002132688700, 0.003088416900, -0.001504139700, - -0.002066451500, 0.009036431600, -0.024318259900, 0.079258669800, - 0.291213669600, -0.066833494600, 0.039572395400, -0.027853162500, - 0.021157264500, -0.017142104300, 0.015245837400, -0.013608286800}, - { -0.001366787300, -0.002128108700, 0.003088564100, -0.001502425900, - -0.002064956100, 0.009042893100, -0.024359858000, 0.079560972200, - 0.291093788100, -0.067075438600, 0.039767446600, -0.028015676300, - 0.021300179900, -0.017253688600, 0.015339335300, -0.013689059900}, - { -0.001374342300, -0.002124476100, 0.003093955600, -0.001513509600, - -0.002055553100, 0.009039889200, -0.024409237700, 0.079856769100, - 0.290971758300, -0.067326482200, 0.039967168700, -0.028180320800, - 0.021440417100, -0.017374226900, 0.015437926100, -0.013773229200}, - { -0.001376849300, -0.002113994500, 0.003096377800, -0.001522077700, - -0.002048697200, 0.009043386000, -0.024453193600, 0.080155270500, - 0.290861113600, -0.067572563200, 0.040162405000, -0.028357551400, - 0.021577567700, -0.017494757400, 0.015536744300, -0.013857978600}, - { -0.001383359700, -0.002115681000, 0.003094623000, -0.001529706600, - -0.002042499600, 0.009046978300, -0.024496193000, 0.080448884900, - 0.290742857900, -0.067815030400, 0.040359106100, -0.028520619600, - 0.021716480000, -0.017610720400, 0.015643569600, -0.013950756900}, - { -0.001385829000, -0.002104702000, 0.003095698800, -0.001533174400, - -0.002027861900, 0.009041815800, -0.024543547500, 0.080744453800, - 0.290621547300, -0.068055928700, 0.040555731500, -0.028685336800, - 0.021861411400, -0.017724211200, 0.015739387800, -0.014033359700}, - { -0.001392505100, -0.002106039500, 0.003093740800, -0.001540744900, - -0.002021575300, 0.009045183800, -0.024586190700, 0.081040072300, - 0.290494347700, -0.068302308800, 0.040754474000, -0.028850387900, - 0.022002842700, -0.017846481100, 0.015839406100, -0.014118938600}, - { -0.001395190900, -0.002095226400, 0.003095699600, -0.001548946600, - -0.002014963700, 0.009048347000, -0.024629081800, 0.081340267800, - 0.290377478100, -0.068542945900, 0.040946718000, -0.029021815100, - 0.022146976500, -0.017970542200, 0.015941116300, -0.014206281900}, - { -0.001401882300, -0.002096680100, 0.003093691000, -0.001556387000, - -0.002008669700, 0.009051397000, -0.024670766100, 0.081635398000, - 0.290253164200, -0.068780397800, 0.041142095700, -0.029185104300, - 0.022287585300, -0.018092816300, 0.016042263500, -0.014297586900}, - { -0.001404564500, -0.002085806300, 0.003095765300, -0.001564993600, - -0.002001893100, 0.009055027000, -0.024718526100, 0.081930443400, - 0.290131292800, -0.069028755000, 0.041343948500, -0.029354488900, - 0.022437490000, -0.018211358000, 0.016142525900, -0.014383790400}, - { -0.001411478900, -0.002086898100, 0.003092724100, -0.001567128600, - -0.001988704700, 0.009055155500, -0.024758694700, 0.082230235800, - 0.290011569200, -0.069267292000, 0.041541189800, -0.029519935000, - 0.022579662500, -0.018334760000, 0.016243913500, -0.014471061400}, - { -0.001414337900, -0.002075770200, 0.003094262100, -0.001575159300, - -0.001982046700, 0.009058174200, -0.024801087800, 0.082532448100, - 0.289888685100, -0.069503998900, 0.041737590700, -0.029689051900, - 0.022713561300, -0.018449559000, 0.016349891900, -0.014559627800}, - { -0.001416907600, -0.002064831500, 0.003096053600, -0.001582625700, - -0.001980678900, 0.009054717400, -0.024845070000, 0.082826383600, - 0.289764874500, -0.069755255200, 0.041932542200, -0.029856412200, - 0.022863023200, -0.018567891400, 0.016450370300, -0.014646034300}, - { -0.001423747700, -0.002066861800, 0.003098336700, -0.001577810900, - -0.001970699600, 0.009057517500, -0.024891262300, 0.083121682100, - 0.289643060400, -0.069991474400, 0.042129344000, -0.030022736600, - 0.023006696000, -0.018693430700, 0.016554974400, -0.014740487700}, - { -0.001426747600, -0.002055331700, 0.003099557300, -0.001585752700, - -0.001964069200, 0.009060147700, -0.024932767200, 0.083425985400, - 0.289510095600, -0.070230755300, 0.042326526200, -0.030188546200, - 0.023150063400, -0.018818329000, 0.016657963500, -0.014829329300}, - { -0.001434061400, -0.002056302800, 0.003097143300, -0.001592655700, - -0.001958070000, 0.009063562600, -0.024979066000, 0.083722905800, - 0.289383840200, -0.070462608200, 0.042516727200, -0.030361552500, - 0.023301552900, -0.018938392400, 0.016759937100, -0.014917519700}, - { -0.001436913900, -0.002044866400, 0.003097508000, -0.001595199500, - -0.001944654100, 0.009063774800, -0.025022964500, 0.084018453400, - 0.289257793800, -0.070696301300, 0.042714039500, -0.030533338900, - 0.023439043400, -0.019061283500, 0.016861988700, -0.015005498900}, - { -0.001445044100, -0.002040355800, 0.003101858000, -0.001604479400, - -0.001941756600, 0.009058701400, -0.025064553400, 0.084313384800, - 0.289127389400, -0.070941485100, 0.042906585900, -0.030698827600, - 0.023583328300, -0.019187203800, 0.016966497900, -0.015095192700}, - { -0.001447330000, -0.002034312100, 0.003096284800, -0.001609315800, - -0.001937412700, 0.009063501400, -0.025112304400, 0.084617972200, - 0.289002944200, -0.071173336500, 0.043102902900, -0.030866540700, - 0.023733865500, -0.019307909900, 0.017070271400, -0.015190068200}, - { -0.001455518600, -0.002029502500, 0.003099574200, -0.001613820700, - -0.001923185400, 0.009067220900, -0.025147413900, 0.084911325500, - 0.288870320800, -0.071411887600, 0.043302468300, -0.031035919800, - 0.023880818700, -0.019436707600, 0.017176704600, -0.015281581500}, - { -0.001457861300, -0.002023130000, 0.003093622800, -0.001617413500, - -0.001924642300, 0.009065729600, -0.025192315000, 0.085215783300, - 0.288739140200, -0.071653858800, 0.043494252000, -0.031201529400, - 0.024025743900, -0.019563622700, 0.017282467800, -0.015372811900}, - { -0.001466497000, -0.002018075200, 0.003096710200, -0.001621883700, - -0.001909503200, 0.009063993200, -0.025234780000, 0.085517904200, - 0.288613216300, -0.071884560100, 0.043691563100, -0.031375546100, - 0.024169673500, -0.019676404700, 0.017390367400, -0.015464035900}, - { -0.001469685300, -0.002006309300, 0.003097408700, -0.001629128000, - -0.001904355000, 0.009073340000, -0.025278532500, 0.085809125600, - 0.288475887700, -0.072118967800, 0.043889313200, -0.031543979900, - 0.024316777100, -0.019805930700, 0.017497985500, -0.015556426100}, - { -0.001477449400, -0.002006818100, 0.003094518400, -0.001634855100, - -0.001903992100, 0.009069894600, -0.025320844800, 0.086112304400, - 0.288347603800, -0.072351635400, 0.044077625700, -0.031707875300, - 0.024461035300, -0.019933041100, 0.017605115800, -0.015654004700}, - { -0.001480767400, -0.001994653500, 0.003094108300, -0.001636592700, - -0.001891836000, 0.009074959300, -0.025357212300, 0.086414765800, - 0.288212217900, -0.072585572700, 0.044276425800, -0.031879037500, - 0.024614982500, -0.020057087700, 0.017710651600, -0.015745786000}, - { -0.001488858500, -0.001993991000, 0.003085609100, -0.001648979900, - -0.001888369000, 0.009070080400, -0.025403194900, 0.086711998100, - 0.288078851000, -0.072825294900, 0.044470365700, -0.032052144100, - 0.024755980300, -0.020183755000, 0.017817156300, -0.015837646000}, - { -0.001492305300, -0.001981877500, 0.003085015800, -0.001650306000, - -0.001876815400, 0.009076396600, -0.025444714700, 0.087007865500, - 0.287948850700, -0.073051883700, 0.044666232000, -0.032220613500, - 0.024903471000, -0.020314095600, 0.017925901000, -0.015931594800}, - { -0.001501262300, -0.001976310900, 0.003088203600, -0.001658952100, - -0.001873996900, 0.009070381000, -0.025484515600, 0.087312662900, - 0.287808844900, -0.073281372400, 0.044862930000, -0.032390709200, - 0.025057752300, -0.020438589400, 0.018033299200, -0.016030164800}, - { -0.001503969900, -0.001969379300, 0.003080858100, -0.001657013000, - -0.001864713500, 0.009078560600, -0.025527589100, 0.087611730400, - 0.287669639200, -0.073516228400, 0.045054475300, -0.032563221800, - 0.025198358100, -0.020565897500, 0.018140302000, -0.016122658700}, - { -0.001513327100, -0.001963597200, 0.003083968700, -0.001665725900, - -0.001862252200, 0.009073875600, -0.025573878100, 0.087916911500, - 0.287535419700, -0.073748515200, 0.045259152900, -0.032729171400, - 0.025351871200, -0.020690412400, 0.018247246600, -0.016215838300}, - { -0.001516114100, -0.001956698100, 0.003076434500, -0.001663416900, - -0.001853404200, 0.009082036700, -0.025616230100, 0.088215611900, - 0.287398826600, -0.073974168600, 0.045445650100, -0.032893481400, - 0.025497283800, -0.020820608400, 0.018361514000, -0.016303461100}, - { -0.001525545100, -0.001950784000, 0.003079287600, -0.001671519700, - -0.001851968500, 0.009083077500, -0.025655699800, 0.088518791800, - 0.287263294400, -0.074204448300, 0.045645401700, -0.033070898400, - 0.025642665600, -0.020951717000, 0.018471685500, -0.016399128000}, - { -0.001529263800, -0.001938044200, 0.003078214900, -0.001672419000, - -0.001840528300, 0.009088750200, -0.025695953100, 0.088817903900, - 0.287119707900, -0.074435467900, 0.045835202700, -0.033239161900, - 0.025796245500, -0.021077164200, 0.018580469200, -0.016498716200}, - { -0.001538275800, -0.001937151500, 0.003074065100, -0.001676983800, - -0.001841296500, 0.009086549100, -0.025743532000, 0.089126683900, - 0.286977836300, -0.074664683000, 0.046023517900, -0.033404937000, - 0.025943420100, -0.021207672000, 0.018690756000, -0.016594569100}, - { -0.001542197500, -0.001924344300, 0.003072425300, -0.001676580800, - -0.001835675000, 0.009085971800, -0.025781349400, 0.089429913200, - 0.286843179800, -0.074884840400, 0.046219477100, -0.033581867500, - 0.026093533900, -0.021331826000, 0.018797704300, -0.016688282800}, - { -0.001546377000, -0.001910937800, 0.003070488600, -0.001676528000, - -0.001825134600, 0.009092452800, -0.025821879500, 0.089731283500, - 0.286693376000, -0.075110245000, 0.046405855900, -0.033746731200, - 0.026239733700, -0.021462324800, 0.018907663300, -0.016783704800}, - { -0.001555232200, -0.001910366600, 0.003066530900, -0.001681411600, - -0.001826242300, 0.009095852900, -0.025867448300, 0.090031502000, - 0.286552421600, -0.075335881700, 0.046610354100, -0.033919719800, - 0.026389844800, -0.021587898200, 0.019017118400, -0.016884247400}, - { -0.001559561500, -0.001896839700, 0.003064309200, -0.001680332600, - -0.001821529400, 0.009096027200, -0.025905423200, 0.090337279400, - 0.286407594900, -0.075562967900, 0.046799004200, -0.034087052200, - 0.026538690300, -0.021720457700, 0.019128983200, -0.016981596000}, - { -0.001569153000, -0.001894703800, 0.003054176700, -0.001691600600, - -0.001814795900, 0.009104248700, -0.025952532400, 0.090639789400, - 0.286262228400, -0.075788745300, 0.046987841400, -0.034255105000, - 0.026693327400, -0.021847402400, 0.019238909500, -0.017077386900}, - { -0.001573670100, -0.001880890400, 0.003051424200, -0.001690153500, - -0.001810064900, 0.009104300700, -0.025990224500, 0.090946916500, - 0.286112971700, -0.076007137400, 0.047182370700, -0.034430712700, - 0.026838198900, -0.021978862300, 0.019350009900, -0.017174506000}, - { -0.001583828300, -0.001873935800, 0.003052700600, -0.001692015100, - -0.001803039800, 0.009103004000, -0.026032138000, 0.091251439600, - 0.285975563800, -0.076238222500, 0.047381154500, -0.034597273100, - 0.026994361100, -0.022107866200, 0.019462639700, -0.017278016500}, - { -0.001587867000, -0.001865780400, 0.003044301800, -0.001692821000, - -0.001807759500, 0.009109488100, -0.026079677000, 0.091556728800, - 0.285823700200, -0.076458633000, 0.047567511000, -0.034768617100, - 0.027136848800, -0.022237957200, 0.019573449500, -0.017374543300}, - { -0.001598323500, -0.001858063000, 0.003044500800, -0.001693384100, - -0.001801618700, 0.009107820400, -0.026115241800, 0.091863686900, - 0.285671811500, -0.076679031600, 0.047753629900, -0.034936118500, - 0.027291613500, -0.022364869500, 0.019683203200, -0.017470863500}, - { -0.001603558400, -0.001843678200, 0.003041601400, -0.001692544800, - -0.001791780100, 0.009115656500, -0.026162495500, 0.092174773000, - 0.285524247500, -0.076901860200, 0.047947719600, -0.035103343800, - 0.027432475300, -0.022494731800, 0.019794038100, -0.017567749800}, - { -0.001613422400, -0.001841112200, 0.003030366000, -0.001701864700, - -0.001792125700, 0.009123179000, -0.026199049700, 0.092474868600, - 0.285372738700, -0.077116537300, 0.048141797500, -0.035275280700, - 0.027591688900, -0.022626375700, 0.019908421800, -0.017673081200}, - { -0.001618684700, -0.001826555800, 0.003026957800, -0.001699564500, - -0.001788644700, 0.009124739900, -0.026242686200, 0.092784329800, - 0.285223614300, -0.077336969100, 0.048328815000, -0.035443127000, - 0.027742539400, -0.022762632500, 0.020029767800, -0.017767797800}, - { -0.001629703000, -0.001818503700, 0.003027010500, -0.001700124000, - -0.001782837800, 0.009124974400, -0.026290376100, 0.093086772800, - 0.285077698000, -0.077560338000, 0.048525355700, -0.035614488000, - 0.027892719100, -0.022889140600, 0.020140353900, -0.017864500900}, - { -0.001634392700, -0.001809252200, 0.003016455700, -0.001693615300, - -0.001782780900, 0.009129169500, -0.026335334700, 0.093393907400, - 0.284916529600, -0.077771874700, 0.048706755700, -0.035778114400, - 0.028040064200, -0.023021819100, 0.020253539400, -0.017963440300}, - { -0.001645793200, -0.001800824700, 0.003016678700, -0.001699031600, - -0.001784607900, 0.009137987500, -0.026373328800, 0.093702911100, - 0.284764041400, -0.077988760200, 0.048893523500, -0.035952564600, - 0.028191490700, -0.023149218600, 0.020364436200, -0.018061008600}, - { -0.001651378600, -0.001785770200, 0.003012636900, -0.001696266500, - -0.001781460200, 0.009139701600, -0.026416553200, 0.094014760000, - 0.284608657200, -0.078204266000, 0.049084885500, -0.036119295000, - 0.028333282800, -0.023280404100, 0.020477739000, -0.018165847100}, - { -0.001662265200, -0.001781999900, 0.002999487700, -0.001698314300, - -0.001777143500, 0.009146283300, -0.026457830700, 0.094316696700, - 0.284457324700, -0.078421164800, 0.049272679100, -0.036289687800, - 0.028492007500, -0.023412213700, 0.020592415900, -0.018266186600}, - { -0.001668313800, -0.001766316400, 0.002994642500, -0.001694643800, - -0.001774906500, 0.009148770700, -0.026501577500, 0.094630560000, - 0.284297024000, -0.078632258000, 0.049461377000, -0.036454574300, - 0.028632330500, -0.023541974700, 0.020703740000, -0.018364139000}, - { -0.001680418200, -0.001756770400, 0.002992954400, -0.001693172900, - -0.001771057900, 0.009150120900, -0.026549370400, 0.094937302500, - 0.284139414500, -0.078843755900, 0.049644890900, -0.036622085000, - 0.028788840800, -0.023671874000, 0.020817422100, -0.018463951300}, - { -0.001686115500, -0.001746931600, 0.002982552200, -0.001691727400, - -0.001778570200, 0.009164052800, -0.026591723800, 0.095258665900, - 0.283981176300, -0.079052887900, 0.049827569900, -0.036793287300, - 0.028933443100, -0.023805663500, 0.020933121700, -0.018571534300}, - { -0.001698209200, -0.001736659300, 0.002974894800, -0.001696435000, - -0.001772231300, 0.009168743300, -0.026630607200, 0.095561100700, - 0.283824708400, -0.079266196800, 0.050019918900, -0.036957408700, - 0.029090435800, -0.023942524200, 0.021041132500, -0.018668595300}, - { -0.001704658800, -0.001720493300, 0.002969448100, -0.001691965100, - -0.001770702400, 0.009171925300, -0.026679621900, 0.095870802000, - 0.283660491100, -0.079472717100, 0.050201664600, -0.037129754000, - 0.029241121700, -0.024070689600, 0.021159356200, -0.018761561600}, - { -0.001717442700, -0.001710235900, 0.002967018600, -0.001689724600, - -0.001768308200, 0.009180232100, -0.026722407800, 0.096183264500, - 0.283504106100, -0.079683587600, 0.050392415300, -0.037297550600, - 0.029384739600, -0.024204158900, 0.021274150600, -0.018862478100}, - { -0.001723295500, -0.001699869700, 0.002955079600, -0.001681516300, - -0.001770832400, 0.009192163800, -0.026767354800, 0.096492955100, - 0.283337590700, -0.079887593500, 0.050578218900, -0.037457346700, - 0.029538083300, -0.024333413500, 0.021388132400, -0.018968488000}, - { -0.001736577200, -0.001687977400, 0.002945624400, -0.001683731000, - -0.001771162500, 0.009186304800, -0.026811221400, 0.096806832700, - 0.283171957600, -0.080100778400, 0.050764840500, -0.037632549500, - 0.029686120900, -0.024469290200, 0.021505473200, -0.019071619200}, - { -0.001743866400, -0.001670904800, 0.002939243500, -0.001678044700, - -0.001772074700, 0.009197158400, -0.026855831200, 0.097122904600, - 0.283008922400, -0.080311308100, 0.050945404700, -0.037790101700, - 0.029837934200, -0.024597228000, 0.021617945900, -0.019170951200}, - { -0.001756624600, -0.001665754600, 0.002930209300, -0.001677015500, - -0.001779605600, 0.009211401200, -0.026902305100, 0.097436064800, - 0.282834989500, -0.080507440900, 0.051121120600, -0.037958156200, - 0.029986133000, -0.024723351000, 0.021728932000, -0.019269257400}, - { -0.001764156100, -0.001648349000, 0.002923256000, -0.001670895300, - -0.001780604500, 0.009222427700, -0.026946759500, 0.097753369800, - 0.282668132600, -0.080708954700, 0.051306676900, -0.038122909500, - 0.030128070300, -0.024856282600, 0.021844654800, -0.019377155600}, - { -0.001778008400, -0.001635839700, 0.002912741900, -0.001671632200, - -0.001783286000, 0.009223573800, -0.026984567000, 0.098066057000, - 0.282503350600, -0.080910856000, 0.051487224000, -0.038289759200, - 0.030286004000, -0.024988398200, 0.021960407900, -0.019479635100}, - { -0.001785075000, -0.001624082400, 0.002899683900, -0.001662356200, - -0.001786186700, 0.009231168400, -0.027042545900, 0.098383808800, - 0.282326299200, -0.081120147400, 0.051668545300, -0.038454440300, - 0.030434707800, -0.025122240000, 0.022073795700, -0.019570606700}, - { -0.001799471600, -0.001611646700, 0.002894723100, -0.001657398400, - -0.001786417100, 0.009241521900, -0.027086143300, 0.098702548800, - 0.282153907600, -0.081315971000, 0.051850662000, -0.038616812900, - 0.030574773900, -0.025253455800, 0.022187350300, -0.019671249500}, - { -0.001808127200, -0.001592362400, 0.002880377400, -0.001655707600, - -0.001785903000, 0.009251959300, -0.027135898100, 0.099021663300, - 0.281989192800, -0.081515568600, 0.052030462600, -0.038783583100, - 0.030733042100, -0.025387269800, 0.022306311600, -0.019782364100}, - { -0.001822507700, -0.001579820600, 0.002875237500, -0.001649711300, - -0.001792635900, 0.009256393500, -0.027175974500, 0.099338786400, - 0.281816351400, -0.081716496200, 0.052207335300, -0.038945254600, - 0.030878936400, -0.025512202200, 0.022416781800, -0.019880568400}, - { -0.001830818000, -0.001566710200, 0.002860056400, -0.001637727000, - -0.001799068700, 0.009272886300, -0.027230252500, 0.099657892600, - 0.281637176300, -0.081905722200, 0.052385802800, -0.039105374000, - 0.031017613200, -0.025642740200, 0.022530400400, -0.019981165400}, - { -0.001845760100, -0.001552740800, 0.002847881000, -0.001636760100, - -0.001804192200, 0.009282507800, -0.027269207300, 0.099967050900, - 0.281460005200, -0.082107814900, 0.052574179500, -0.039274706000, - 0.031169977600, -0.025773553200, 0.022645343300, -0.020082641400}, - { -0.001855192900, -0.001533110500, 0.002838490600, -0.001627660100, - -0.001808517000, 0.009296869200, -0.027321921500, 0.100291413500, - 0.281286138200, -0.082304345000, 0.052741885600, -0.039434316600, - 0.031323202100, -0.025903756400, 0.022761936700, -0.020192073400}, - { -0.001869926500, -0.001525588000, 0.002826213600, -0.001617884900, - -0.001812957700, 0.009311303900, -0.027373640000, 0.100609916000, - 0.281103932300, -0.082490397700, 0.052919415400, -0.039594468800, - 0.031463335700, -0.026042393200, 0.022877455000, -0.020285435000}, - { -0.001879711300, -0.001504548000, 0.002809677500, -0.001613216100, - -0.001820868000, 0.009318026600, -0.027421788700, 0.100932867600, - 0.280922614500, -0.082692676700, 0.053098254300, -0.039758154000, - 0.031611536400, -0.026169842500, 0.022990763600, -0.020386038100}, - { -0.001896148500, -0.001489715900, 0.002802122100, -0.001605491000, - -0.001823983800, 0.009331442300, -0.027473598000, 0.101258880600, - 0.280742505700, -0.082878251100, 0.053275619900, -0.039919465700, - 0.031757335000, -0.026295748600, 0.023102669400, -0.020486105200}, - { -0.001906217800, -0.001469185600, 0.002791306400, -0.001593896400, - -0.001837111200, 0.009347882600, -0.027518324200, 0.101581276800, - 0.280564653200, -0.083070602600, 0.053441716200, -0.040078628800, - 0.031911263600, -0.026426870800, 0.023219719400, -0.020596163500}, - { -0.001922140900, -0.001459273400, 0.002770198900, -0.001581275300, - -0.001835136600, 0.009358983900, -0.027567373500, 0.101900357800, - 0.280377353300, -0.083256870000, 0.053610471900, -0.040233651400, - 0.032046118400, -0.026554662000, 0.023331738800, -0.020695687800}, - { -0.001933077600, -0.001437420100, 0.002757857900, -0.001568643300, - -0.001848435300, 0.009370146400, -0.027619025000, 0.102229591200, - 0.280184129200, -0.083442004400, 0.053787235200, -0.040395032300, - 0.032192706400, -0.026681026200, 0.023444081100, -0.020796180800}, - { -0.001950196300, -0.001421126700, 0.002743236000, -0.001565501700, - -0.001850389700, 0.009389127400, -0.027669483100, 0.102547554800, - 0.280004451900, -0.083632987700, 0.053961014100, -0.040555637300, - 0.032339646100, -0.026814717500, 0.023552023700, -0.020894037400}, - { -0.001960990100, -0.001399562800, 0.002731039900, -0.001552949300, - -0.001863555500, 0.009399847000, -0.027719967200, 0.102875847200, - 0.279815921900, -0.083810986900, 0.054134314800, -0.040714985700, - 0.032485359700, -0.026941818000, 0.023672059200, -0.020996580900}, - { -0.001978335000, -0.001388824500, 0.002715202100, -0.001538161700, - -0.001879709700, 0.009419594300, -0.027767473800, 0.103205041100, - 0.279619234800, -0.083997214900, 0.054302452500, -0.040870290800, - 0.032621932300, -0.027071437200, 0.023785545000, -0.021097697500}, - { -0.001990835900, -0.001364801200, 0.002695060500, -0.001530065500, - -0.001885898300, 0.009436950100, -0.027828661600, 0.103538923200, - 0.279432441200, -0.084179631800, 0.054468678800, -0.041018806300, - 0.032768596100, -0.027197497600, 0.023898644100, -0.021198957800}, - { -0.002009220500, -0.001347505300, 0.002684579000, -0.001518047500, - -0.001900093500, 0.009455425900, -0.027880462700, 0.103861290100, - 0.279243346600, -0.084361255500, 0.054635449300, -0.041174711300, - 0.032911712700, -0.027321991400, 0.024009912800, -0.021298248700}, - { -0.002021097800, -0.001323447400, 0.002663196100, -0.001502518600, - -0.001906698600, 0.009462422300, -0.027927521300, 0.104190543900, - 0.279042526200, -0.084538637100, 0.054809534600, -0.041335183200, - 0.033058704200, -0.027455391500, 0.024118477100, -0.021403770100}, - { -0.002040050600, -0.001311257700, 0.002645934000, -0.001486507400, - -0.001918547800, 0.009490451500, -0.027986541700, 0.104526215400, - 0.278849784900, -0.084713840400, 0.054965250700, -0.041491644800, - 0.033194974400, -0.027586029200, 0.024240038400, -0.021501456000}, - { -0.002053034800, -0.001286367400, 0.002624167700, -0.001475643600, - -0.001933711100, 0.009510206500, -0.028039339300, 0.104851735700, - 0.278653475900, -0.084889121800, 0.055128391400, -0.041644581200, - 0.033335865400, -0.027708847400, 0.024350066900, -0.021599986800}, - { -0.002073264900, -0.001266673600, 0.002611261800, -0.001461338600, - -0.001949621100, 0.009524686500, -0.028099508700, 0.105189430300, - 0.278450786400, -0.085067297700, 0.055292010700, -0.041798158600, - 0.033477267300, -0.027831832100, 0.024460899000, -0.021699539700}, - { -0.002086264900, -0.001241753500, 0.002589582900, -0.001451556400, - -0.001957811700, 0.009549327200, -0.028154247100, 0.105517476900, - 0.278250526200, -0.085239563600, 0.055460095600, -0.041944857600, - 0.033615404000, -0.027960051300, 0.024565652100, -0.021801611400}, - { -0.002106926400, -0.001221321700, 0.002575063400, -0.001429511100, - -0.001970246700, 0.009568367500, -0.028207292800, 0.105852072900, - 0.278047516100, -0.085416983300, 0.055624216900, -0.042099685900, - 0.033757782300, -0.028084273300, 0.024677037500, -0.021901583000}, - { -0.002120617500, -0.001202056000, 0.002552535400, -0.001408007500, - -0.001993279700, 0.009595095600, -0.028266589600, 0.106192034600, - 0.277843916500, -0.085583072500, 0.055780937400, -0.042248483600, - 0.033896113600, -0.028206269200, 0.024793027300, -0.021995201800}, - { -0.002142396800, -0.001179865400, 0.002530754500, -0.001396393300, - -0.002009028700, 0.009610046500, -0.028326674100, 0.106531925400, - 0.277639650500, -0.085747792700, 0.055936365900, -0.042394273800, - 0.034025320000, -0.028330041100, 0.024903208900, -0.022094548100}, - { -0.002157159200, -0.001153285000, 0.002512274500, -0.001370844300, - -0.002024860800, 0.009632664400, -0.028388245500, 0.106864987700, - 0.277432448700, -0.085921130000, 0.056098971500, -0.042548622300, - 0.034168711000, -0.028462099000, 0.025011964800, -0.022199944300}, - { -0.002179375900, -0.001130552500, 0.002489758900, -0.001358263800, - -0.002042234800, 0.009654833100, -0.028443348800, 0.107203619900, - 0.277226300200, -0.086083834300, 0.056253954500, -0.042695656200, - 0.034305305000, -0.028581781400, 0.025119808500, -0.022297564100}, - { -0.002195061100, -0.001108669600, 0.002464213000, -0.001333423100, - -0.002068874300, 0.009685232500, -0.028506052900, 0.107550806200, - 0.277004327300, -0.086243310500, 0.056405162700, -0.042840028100, - 0.034439922500, -0.028700012900, 0.025226614100, -0.022394383100}, - { -0.002217436800, -0.001085689500, 0.002440979000, -0.001314845000, - -0.002074387600, 0.009710099800, -0.028567755500, 0.107884769000, - 0.276798805200, -0.086406171500, 0.056561115200, -0.042988680400, - 0.034577788700, -0.028822677500, 0.025344724600, -0.022496001600}, - { -0.002234052300, -0.001056977600, 0.002420334600, -0.001292564500, - -0.002099057700, 0.009738656200, -0.028628118700, 0.108230473600, - 0.276581678800, -0.086558899300, 0.056708946400, -0.043130672100, - 0.034711343700, -0.028946376900, 0.025445511400, -0.022589602700}, - { -0.002257986500, -0.001032008700, 0.002395334200, -0.001277542100, - -0.002119185700, 0.009764314400, -0.028692402200, 0.108569779600, - 0.276361694700, -0.086719885800, 0.056868813300, -0.043271529100, - 0.034844676000, -0.029064307100, 0.025552190100, -0.022685765900}, - { -0.002275798800, -0.001001252000, 0.002366059500, -0.001252260400, - -0.002137523800, 0.009790138000, -0.028757551100, 0.108916066600, - 0.276151572300, -0.086882727400, 0.057015156000, -0.043413931200, - 0.034977723200, -0.029181547900, 0.025659050200, -0.022782491400}, - { -0.002299519300, -0.000983084300, 0.002341848700, -0.001227918200, - -0.002164204600, 0.009821204200, -0.028826112600, 0.109260641300, - 0.275924294400, -0.087035380900, 0.057163011400, -0.043556341700, - 0.035112146900, -0.029306783100, 0.025762575100, -0.022884324300}, - { -0.002318342500, -0.000951184900, 0.002311491600, -0.001207356700, - -0.002190231800, 0.009858208200, -0.028883563000, 0.109614224000, - 0.275705340200, -0.087183966300, 0.057307956100, -0.043694747100, - 0.035236477300, -0.029428661900, 0.025877315200, -0.022977857000}, - { -0.002343785600, -0.000924936400, 0.002290080300, -0.001177431500, - -0.002211532800, 0.009886431100, -0.028949989000, 0.109957830700, - 0.275481985700, -0.087329639600, 0.057457528900, -0.043828523400, - 0.035363736500, -0.029541639900, 0.025980032600, -0.023071295000}, - { -0.002363396600, -0.000891896000, 0.002258762900, -0.001155997700, - -0.002237980900, 0.009918196800, -0.029019980500, 0.110312292600, - 0.275252475700, -0.087485388500, 0.057598214300, -0.043965976300, - 0.035494092700, -0.029663348400, 0.026080272800, -0.023164098500}, - { -0.002389152800, -0.000865190200, 0.002236651900, -0.001124397300, - -0.002266843400, 0.009941856300, -0.029083534200, 0.110654857700, - 0.275027780000, -0.087628679600, 0.057741079400, -0.044111852100, - 0.035620616000, -0.029776226200, 0.026184102500, -0.023265168600}, - { -0.002409751900, -0.000831096900, 0.002203852900, -0.001101449700, - -0.002295711000, 0.009982935500, -0.029157146400, 0.111004330000, - 0.274797647300, -0.087777694100, 0.057893310100, -0.044247467300, - 0.035750612400, -0.029893238400, 0.026296883500, -0.023356224600}, - { -0.002436583600, -0.000809275400, 0.002174932100, -0.001065376500, - -0.002322951600, 0.010016783300, -0.029228839400, 0.111361951300, - 0.274567466000, -0.087919930200, 0.058025057300, -0.044378805200, - 0.035875683000, -0.030010656200, 0.026393710400, -0.023446642300}, - { -0.002458072800, -0.000774072300, 0.002140548500, -0.001040420000, - -0.002353097400, 0.010052135800, -0.029301943900, 0.111721745400, - 0.274333594900, -0.088052895500, 0.058159209800, -0.044509951300, - 0.036000215000, -0.030121514300, 0.026496227300, -0.023547531800}, - { -0.002486798400, -0.000743082100, 0.002107901300, -0.001010435600, - -0.002377569500, 0.010090405600, -0.029366888100, 0.112076957700, - 0.274096422800, -0.088200445900, 0.058300810100, -0.044638462800, - 0.036123651800, -0.030232021100, 0.026596958900, -0.023639414500}, - { -0.002509178900, -0.000707489700, 0.002079209800, -0.000979178500, - -0.002412292800, 0.010130406600, -0.029450197300, 0.112436237300, - 0.273857995500, -0.088329074400, 0.058431854000, -0.044767731000, - 0.036247749400, -0.030349857900, 0.026701008800, -0.023725485500}, - { -0.002538546200, -0.000675641700, 0.002045354700, -0.000947146600, - -0.002444944300, 0.010165016900, -0.029513195500, 0.112791388300, - 0.273618006800, -0.088473828000, 0.058572790800, -0.044902786100, - 0.036367072300, -0.030457501700, 0.026799344000, -0.023815374100}, - { -0.002562081700, -0.000638597900, 0.002015094700, -0.000913965300, - -0.002481943700, 0.010207398600, -0.029598886400, 0.113154412600, - 0.273374591600, -0.088603102200, 0.058693934100, -0.045025119300, - 0.036484791400, -0.030563119800, 0.026898455900, -0.023913083300}, - { -0.002592531600, -0.000611735800, 0.001974049600, -0.000877067200, - -0.002513122700, 0.010252711500, -0.029676327000, 0.113513193200, - 0.273125908800, -0.088732072900, 0.058832779800, -0.045150554000, - 0.036606443900, -0.030679000400, 0.026993402700, -0.024001590900}, - { -0.002617432700, -0.000572476600, 0.001934940900, -0.000846562800, - -0.002549947700, 0.010301351000, -0.029750846500, 0.113886584200, - 0.272881898500, -0.088859686000, 0.058953274300, -0.045271977200, - 0.036723589400, -0.030784892400, 0.027097712600, -0.024087333600}, - { -0.002648556200, -0.000539287700, 0.001905685000, -0.000806920200, - -0.002588198100, 0.010335223100, -0.029830210100, 0.114246195000, - 0.272637989000, -0.088988209700, 0.059082508900, -0.045398291800, - 0.036835959600, -0.030886948300, 0.027193422300, -0.024182088200}, - { -0.002675426700, -0.000497529300, 0.001863568800, -0.000773306300, - -0.002628339500, 0.010387943600, -0.029915068400, 0.114620841300, - 0.272380972500, -0.089107334300, 0.059206370700, -0.045521223000, - 0.036954725600, -0.031000132500, 0.027286742200, -0.024270058800}, - { -0.002708812100, -0.000461001300, 0.001824188800, -0.000735439500, - -0.002661448300, 0.010435538400, -0.029994677500, 0.114983831800, - 0.272129953900, -0.089228688900, 0.059329528700, -0.045634938700, - 0.037065976700, -0.031100796100, 0.027379891900, -0.024355993600}, - { -0.002735490700, -0.000419849000, 0.001788462900, -0.000689215900, - -0.002707124200, 0.010482924400, -0.030075860600, 0.115356267200, - 0.271872904900, -0.089354351300, 0.059449185200, -0.045758252600, - 0.037192230500, -0.031210219100, 0.027478273400, -0.024437594700}, - { -0.002768719300, -0.000389873200, 0.001744376300, -0.000654868000, - -0.002747163000, 0.010528906800, -0.030164681700, 0.115727569700, - 0.271612337400, -0.089466219000, 0.059565965700, -0.045873231900, - 0.037295135500, -0.031304965400, 0.027568162200, -0.024528121700}, - { -0.002798079400, -0.000344868200, 0.001697477500, -0.000608943300, - -0.002794808000, 0.010579370800, -0.030249393200, 0.116105596800, - 0.271346326500, -0.089576437400, 0.059689822100, -0.045986571500, - 0.037406419500, -0.031405176100, 0.027660621000, -0.024614179100}, - { -0.002834574300, -0.000305400500, 0.001661742100, -0.000568717900, - -0.002840569000, 0.010637555700, -0.030338939200, 0.116487577100, - 0.271082832700, -0.089682984500, 0.059794346400, -0.046095149100, - 0.037513479000, -0.031508865800, 0.027746587900, -0.024696294000}, - { -0.002863090600, -0.000261546500, 0.001616196800, -0.000524060200, - -0.002886726400, 0.010686302700, -0.030421218200, 0.116863187300, - 0.270824597700, -0.089796024200, 0.059912731300, -0.046212603400, - 0.037619046000, -0.031606514800, 0.027845171900, -0.024784044100}, - { -0.002900989400, -0.000219487800, 0.001570599400, -0.000479303700, - -0.002927315300, 0.010742257600, -0.030515733500, 0.117240864200, - 0.270554278500, -0.089907403100, 0.060028342200, -0.046320155000, - 0.037725963100, -0.031710668200, 0.027931517600, -0.024865514300}, - { -0.002939110000, -0.000177806100, 0.001531519200, -0.000428383200, - -0.002978759900, 0.010796286200, -0.030603272900, 0.117623618000, - 0.270285855600, -0.090009416000, 0.060137232300, -0.046429802200, - 0.037824453100, -0.031801130600, 0.028016349500, -0.024945375600}, - { -0.002971404300, -0.000129367200, 0.001481455800, -0.000385645100, - -0.003028924400, 0.010859951400, -0.030704739700, 0.118009163200, - 0.270004747300, -0.090110535200, 0.060237393200, -0.046534338000, - 0.037928400600, -0.031903279600, 0.028108476700, -0.025021832500}, - { -0.003010799000, -0.000085506800, 0.001433304900, -0.000337127500, - -0.003080051000, 0.010914101700, -0.030792208700, 0.118393292300, - 0.269732724800, -0.090208244500, 0.060342765300, -0.046633690800, - 0.038028249000, -0.031994340000, 0.028194618000, -0.025109965600}, - { -0.003043352800, -0.000043286100, 0.001376710400, -0.000282666000, - -0.003129872000, 0.010978749000, -0.030894968100, 0.118781343500, - 0.269453183200, -0.090299385000, 0.060444527700, -0.046738202500, - 0.038128681100, -0.032076686500, 0.028274348700, -0.025185554200}, - { -0.003084097600, 0.000001652200, 0.001334856800, -0.000235221900, - -0.003190341200, 0.011040895200, -0.030996156800, 0.119168850700, - 0.269167050700, -0.090401757000, 0.060542535700, -0.046832398400, - 0.038225851900, -0.032173379200, 0.028361984300, -0.025257897700}, - { -0.003118681600, 0.000052969800, 0.001280388200, -0.000180668100, - -0.003240720400, 0.011105920600, -0.031092550300, 0.119563660200, - 0.268880111900, -0.090484913100, 0.060629970500, -0.046933803100, - 0.038315834400, -0.032256880200, 0.028442350400, -0.025341820300}, - { -0.003162561900, 0.000102202900, 0.001226211900, -0.000125395300, - -0.003299906800, 0.011175918200, -0.031191167100, 0.119959312000, - 0.268593285800, -0.090577351800, 0.060731151800, -0.047029530200, - 0.038413339800, -0.032353226800, 0.028521763200, -0.025418085200}, - { -0.003199268400, 0.000156014300, 0.001168676900, -0.000066919400, - -0.003361438800, 0.011241308700, -0.031296168100, 0.120353034900, - 0.268302409700, -0.090656855500, 0.060822958600, -0.047124517500, - 0.038499397300, -0.032433214400, 0.028598264500, -0.025491004800}, - { -0.003242762700, 0.000204180800, 0.001122626500, -0.000008679700, - -0.003414828400, 0.011309574900, -0.031402432600, 0.120754514200, - 0.268015321100, -0.090745034900, 0.060911299100, -0.047212175500, - 0.038596766500, -0.032520166800, 0.028679119400, -0.025558748500}, - { -0.003280931700, 0.000259812600, 0.001063521800, 0.000044884500, - -0.003483800400, 0.011387738000, -0.031508074100, 0.121152150800, - 0.267711413800, -0.090822485700, 0.061000604600, -0.047304659400, - 0.038681603800, -0.032600073600, 0.028755960800, -0.025638962100}, - { -0.003327797000, 0.000312623600, 0.001004973300, 0.000105206400, - -0.003548028100, 0.011456238300, -0.031616336600, 0.121558234900, - 0.267415888400, -0.090894622700, 0.061086213100, -0.047387160100, - 0.038767569400, -0.032686245400, 0.028827467700, -0.025709333200}, - { -0.003367277200, 0.000369742900, 0.000943784400, 0.000167921300, - -0.003614337200, 0.011526657700, -0.031726469200, 0.121966313400, - 0.267117532200, -0.090972059800, 0.061166435400, -0.047473566900, - 0.038846825400, -0.032761339500, 0.028907556300, -0.025775412400}, - { -0.003415490600, 0.000424433200, 0.000883119400, 0.000230091300, - -0.003674451700, 0.011609993400, -0.031842624600, 0.122364892800, - 0.266807297400, -0.091041565400, 0.061249320900, -0.047553631700, - 0.038930581400, -0.032847149600, 0.028979555600, -0.025852313500}, - { -0.003456266600, 0.000475867100, 0.000822340300, 0.000303040600, - -0.003749535300, 0.011688497100, -0.031960441800, 0.122782327100, - 0.266496871700, -0.091106317700, 0.061319593900, -0.047633284300, - 0.039010819600, -0.032912027100, 0.029044984700, -0.025916736900}, - { -0.003505638300, 0.000531731300, 0.000760093900, 0.000367747300, - -0.003818881300, 0.011769073200, -0.032068754900, 0.123192522800, - 0.266191486300, -0.091168632300, 0.061398326100, -0.047717396700, - 0.039088687600, -0.032993298700, 0.029119110500, -0.025979190500}, - { -0.003550040600, 0.000594828700, 0.000692495800, 0.000430866400, - -0.003898279700, 0.011852192100, -0.032198029300, 0.123611901100, - 0.265868569100, -0.091231578000, 0.061464903000, -0.047784155800, - 0.039161387400, -0.033061913700, 0.029187959100, -0.026053040700}, - { -0.003602065500, 0.000653931700, 0.000626385600, 0.000499981800, - -0.003972488800, 0.011937971200, -0.032311531400, 0.124029148500, - 0.265553269700, -0.091283444100, 0.061535070700, -0.047860778200, - 0.039232475500, -0.033136595000, 0.029249328200, -0.026115105800}, - { -0.003647327300, 0.000718027400, 0.000556866100, 0.000572266200, - -0.004049722900, 0.012020034000, -0.032439785200, 0.124448392000, - 0.265233959000, -0.091339033000, 0.061597170100, -0.047925510600, - 0.039309873100, -0.033199111900, 0.029320278800, -0.026173704500}, - { -0.003702105200, 0.000780101600, 0.000494443100, 0.000649052900, - -0.004123793300, 0.012117690200, -0.032570746200, 0.124873224300, - 0.264900163300, -0.091383468500, 0.061659588400, -0.047995635500, - 0.039375017600, -0.033269511800, 0.029378736300, -0.026232862100}, - { -0.003755895200, 0.000841447500, 0.000425856500, 0.000720904000, - -0.004201204700, 0.012206896600, -0.032687548300, 0.125295550200, - 0.264577145700, -0.091434512400, 0.061726016900, -0.048060026200, - 0.039436382500, -0.033329672000, 0.029438925700, -0.026300063600}, - { -0.003803350600, 0.000908270600, 0.000353021900, 0.000796996500, - -0.004282623500, 0.012293251100, -0.032819571200, 0.125720795200, - 0.264247652100, -0.091479732400, 0.061780340600, -0.048117964600, - 0.039508550400, -0.033394973500, 0.029502101900, -0.026353317400}, - { -0.003861457500, 0.000974841200, 0.000278697700, 0.000875358500, - -0.004367158600, 0.012390643600, -0.032952152900, 0.126156834400, - 0.263910245800, -0.091525806900, 0.061834912800, -0.048182001300, - 0.039568933000, -0.033460776600, 0.029556965600, -0.026409434000}, - { -0.003912507000, 0.001045891900, 0.000200514600, 0.000957623400, - -0.004455578400, 0.012491700600, -0.033087770300, 0.126588986000, - 0.263570751000, -0.091552786700, 0.061883959100, -0.048240646500, - 0.039624070900, -0.033515051500, 0.029612627700, -0.026473220500}, - { -0.003970051000, 0.001111797200, 0.000126628900, 0.001035742900, - -0.004539881200, 0.012588312500, -0.033218503400, 0.127016546500, - 0.263234790300, -0.091590421200, 0.061932964300, -0.048301375000, - 0.039688914300, -0.033575106100, 0.029670790800, -0.026522150600}, - { -0.004024302800, 0.001186615500, 0.000044341700, 0.001122432500, - -0.004633631600, 0.012695304100, -0.033360614900, 0.127463754300, - 0.262888924200, -0.091617477500, 0.061978479200, -0.048340055700, - 0.039737596900, -0.033623583100, 0.029720893300, -0.026573902300}, - { -0.004085082700, 0.001256538900, -0.000034034800, 0.001205478700, - -0.004723290400, 0.012797985100, -0.033498033100, 0.127907136500, - 0.262539269000, -0.091650848600, 0.062022592400, -0.048395229300, - 0.039790688300, -0.033684178100, 0.029779644500, -0.026631089400}, - { -0.004139947900, 0.001331802200, -0.000110045000, 0.001297966400, - -0.004821497300, 0.012908660300, -0.033643014900, 0.128351507600, - 0.262181947100, -0.091667171300, 0.062052525700, -0.048439828000, - 0.039840829600, -0.033723634100, 0.029823200100, -0.026677369100}, - { -0.004204208100, 0.001405618600, -0.000193120700, 0.001386785000, - -0.004924853700, 0.013014623800, -0.033792097000, 0.128796851700, - 0.261832669700, -0.091689502800, 0.062095944700, -0.048484357900, - 0.039885777900, -0.033776306400, 0.029866954600, -0.026723942900}, - { -0.004260417800, 0.001483063100, -0.000278806000, 0.001477736900, - -0.005023257700, 0.013125955200, -0.033937289100, 0.129242600400, - 0.261471099700, -0.091701578900, 0.062122650400, -0.048518010200, - 0.039936894900, -0.033824115200, 0.029914914700, -0.026764892400}, - { -0.004327008900, 0.001552956500, -0.000370001900, 0.001573784600, - -0.005126787000, 0.013243154600, -0.034089428900, 0.129704208100, - 0.261097309800, -0.091709577400, 0.062145158100, -0.048554302300, - 0.039972655000, -0.033861618500, 0.029956756400, -0.026817551300}, - { -0.004387061400, 0.001634796200, -0.000460660800, 0.001670082700, - -0.005230956800, 0.013361670100, -0.034249709200, 0.130162737200, - 0.260730415900, -0.091714875900, 0.062174189600, -0.048586130300, - 0.040006010900, -0.033904910800, 0.029992822400, -0.026858101400}, - { -0.004454372600, 0.001712493000, -0.000548375700, 0.001763978200, - -0.005332669200, 0.013476831400, -0.034399268600, 0.130622438100, - 0.260362390800, -0.091718251200, 0.062194230500, -0.048621392100, - 0.040048640600, -0.033945864700, 0.030035043200, -0.026894698800}, - { -0.004523786800, 0.001792774700, -0.000639267000, 0.001868519600, - -0.005434268500, 0.013594098000, -0.034558763500, 0.131081652600, - 0.259993523100, -0.091727265200, 0.062216113000, -0.048648464400, - 0.040076906100, -0.033977399000, 0.030072123900, -0.026942508300}, - { -0.004586585500, 0.001877974400, -0.000734060100, 0.001970438800, - -0.005551787400, 0.013714416500, -0.034721796900, 0.131545261000, - 0.259617106900, -0.091722403400, 0.062229403200, -0.048678076000, - 0.040115213700, -0.034014280800, 0.030111284500, -0.026976072400}, - { -0.004659557800, 0.001962511100, -0.000829862900, 0.002073337300, - -0.005663538600, 0.013840666600, -0.034882878100, 0.132019240400, - 0.259230513500, -0.091706871400, 0.062239873700, -0.048693489400, - 0.040133308800, -0.034036485500, 0.030138847000, -0.027009514400}, - { -0.004725695500, 0.002051981700, -0.000929347100, 0.002180035700, - -0.005779960100, 0.013979073500, -0.035051605900, 0.132491612100, - 0.258836019600, -0.091701376100, 0.062241192800, -0.048705371900, - 0.040165553900, -0.034068442600, 0.030166932700, -0.027050861400}, - { -0.004799901300, 0.002138024300, -0.001026848500, 0.002284840400, - -0.005893861400, 0.014108040800, -0.035222237300, 0.132964854500, - 0.258446283900, -0.091682539100, 0.062249560500, -0.048718972600, - 0.040182871900, -0.034098388500, 0.030199249900, -0.027078741500}, - { -0.004870595400, 0.002232582100, -0.001132590800, 0.002399200400, - -0.006025214200, 0.014243272400, -0.035401209000, 0.133455517400, - 0.258048229900, -0.091653939600, 0.062241715900, -0.048729769800, - 0.040203792100, -0.034111888100, 0.030220920600, -0.027107457100}, - { -0.004947156000, 0.002321555700, -0.001233847400, 0.002515774700, - -0.006140611400, 0.014382400400, -0.035570772900, 0.133930500000, - 0.257654713000, -0.091637493400, 0.062242822500, -0.048738434100, - 0.040216442600, -0.034137799500, 0.030242570200, -0.027143371600}, - { -0.005016493400, 0.002414767800, -0.001338252600, 0.002627935400, - -0.006262314300, 0.014519076200, -0.035748887100, 0.134413490000, - 0.257250575700, -0.091604648700, 0.062239840100, -0.048743282000, - 0.040233396200, -0.034157300200, 0.030266800800, -0.027164826500}, - { -0.005099278600, 0.002511020600, -0.001447380500, 0.002746842300, - -0.006399204100, 0.014660767100, -0.035934332400, 0.134912928100, - 0.256840267600, -0.091570002800, 0.062216233800, -0.048739644700, - 0.040234336300, -0.034163561400, 0.030281865200, -0.027187650100}, - { -0.005170558100, 0.002606541400, -0.001554671000, 0.002862380100, - -0.006525103100, 0.014809292700, -0.036112846200, 0.135398740700, - 0.256430891500, -0.091531009000, 0.062208163600, -0.048740138000, - 0.040247773900, -0.034180802400, 0.030304366300, -0.027215455700}, - { -0.005254922300, 0.002704732600, -0.001666038900, 0.002983502200, - -0.006664576800, 0.014954266000, -0.036308554600, 0.135898611300, - 0.256016406700, -0.091492283600, 0.062189717900, -0.048730903800, - 0.040245240000, -0.034192418000, 0.030314184400, -0.027233909600}, - { -0.005330421900, 0.002805447300, -0.001779622200, 0.003113745000, - -0.006794821100, 0.015108636900, -0.036493663300, 0.136392728600, - 0.255595532100, -0.091449297700, 0.062167723200, -0.048720314000, - 0.040247715100, -0.034191966500, 0.030331001200, -0.027248039400}, - { -0.005418047900, 0.002907510500, -0.001896019300, 0.003240948000, - -0.006941296500, 0.015268001700, -0.036685011500, 0.136902218400, - 0.255169264700, -0.091390047400, 0.062133585500, -0.048706450000, - 0.040240217600, -0.034199174200, 0.030336692900, -0.027272064200}, - { -0.005505373600, 0.003009395700, -0.002011695700, 0.003366480500, - -0.007078261400, 0.015421720100, -0.036888380700, 0.137411927200, - 0.254740700000, -0.091336957100, 0.062103176600, -0.048687487200, - 0.040235929700, -0.034199682900, 0.030337810300, -0.027283556600}, - { -0.005585382500, 0.003115541600, -0.002131832000, 0.003504827500, - -0.007224968800, 0.015582215100, -0.037080250800, 0.137915259700, - 0.254306086800, -0.091279630400, 0.062069083500, -0.048665013800, - 0.040221399100, -0.034201654500, 0.030346034000, -0.027291156400}, - { -0.005674994900, 0.003220173800, -0.002250865900, 0.003634318300, - -0.007366427500, 0.015748179900, -0.037284933600, 0.138428727000, - 0.253871405000, -0.091219627900, 0.062033003000, -0.048649242600, - 0.040210075200, -0.034189299100, 0.030346059500, -0.027308900300}, - { -0.005758700400, 0.003330548600, -0.002375530200, 0.003770118000, - -0.007521879300, 0.015909567200, -0.037496867100, 0.138949385400, - 0.253426570300, -0.091143115000, 0.061992180000, -0.048620522900, - 0.040197728000, -0.034182788700, 0.030348556000, -0.027312476200}, - { -0.005852674900, 0.003440460400, -0.002500886900, 0.003906772800, - -0.007671474500, 0.016084224600, -0.037702515700, 0.139476737000, - 0.252975093200, -0.091066456400, 0.061940861800, -0.048581744400, - 0.040168382200, -0.034171796400, 0.030338133100, -0.027314851900}, - { -0.005940171600, 0.003555441000, -0.002631162900, 0.004057015800, - -0.007831507500, 0.016259063300, -0.037917269600, 0.140002708200, - 0.252522799200, -0.090988640700, 0.061880613500, -0.048547165800, - 0.040149371300, -0.034151729900, 0.030339624000, -0.027324602000}, - { -0.006038006300, 0.003669989500, -0.002761828800, 0.004199685000, - -0.007987803500, 0.016441338600, -0.038138344000, 0.140535980000, - 0.252061541300, -0.090901636600, 0.061820252000, -0.048500250500, - 0.040112744100, -0.034134470700, 0.030324310800, -0.027322408700}, - { -0.006128817400, 0.003788978800, -0.002896910300, 0.004355118400, - -0.008153648900, 0.016622514100, -0.038359180300, 0.141069989900, - 0.251597538600, -0.090812420800, 0.061758888600, -0.048454321900, - 0.040084569400, -0.034113893000, 0.030306458400, -0.027317970100}, - { -0.006227186400, 0.003904318200, -0.003028595200, 0.004499540800, - -0.008319159800, 0.016794826900, -0.038581990000, 0.141605434000, - 0.251131429100, -0.090720594500, 0.061694722300, -0.048405249700, - 0.040054114300, -0.034091543000, 0.030295722900, -0.027310222200}, - { -0.006328397300, 0.004031158500, -0.003168595500, 0.004641928300, - -0.008476386900, 0.016978639900, -0.038804959500, 0.142142757000, - 0.250662990700, -0.090633704900, 0.061624954700, -0.048358207200, - 0.040007213300, -0.034057656100, 0.030276666600, -0.027311829700}, - { -0.006423738600, 0.004155528900, -0.003309959300, 0.004804548400, - -0.008650250700, 0.017168425100, -0.039034846100, 0.142695621300, - 0.250186846500, -0.090531292600, 0.061551769900, -0.048301646800, - 0.039969736100, -0.034029532000, 0.030260492100, -0.027299867000}, - { -0.006528665100, 0.004278722600, -0.003450970500, 0.004959568700, - -0.008827892900, 0.017361477800, -0.039267480800, 0.143244619700, - 0.249702348700, -0.090420060400, 0.061470769900, -0.048237360200, - 0.039925613200, -0.033995062800, 0.030230693900, -0.027285607600}, - { -0.006624732800, 0.004404173000, -0.003593946300, 0.005123920600, - -0.009003806900, 0.017553760300, -0.039499198000, 0.143792799000, - 0.249217705300, -0.090309454700, 0.061398382500, -0.048170611400, - 0.039872247300, -0.033963765200, 0.030211452200, -0.027278748100}, - { -0.006733019100, 0.004530986400, -0.003739016800, 0.005283093400, - -0.009178450500, 0.017763535800, -0.039744969800, 0.144353453000, - 0.248736735600, -0.090189496400, 0.061311021700, -0.048108842000, - 0.039820545400, -0.033924139600, 0.030177475500, -0.027261029400}, - { -0.006833632200, 0.004661933300, -0.003888052900, 0.005454760700, - -0.009362610000, 0.017964244700, -0.039985659800, 0.144912324100, - 0.248238004700, -0.090072272700, 0.061214521700, -0.048032095800, - 0.039764687300, -0.033871892800, 0.030150552400, -0.027238906300}, - { -0.006944808900, 0.004792587900, -0.004037760400, 0.005619673100, - -0.009551266900, 0.018169204500, -0.040230608100, 0.145484672100, - 0.247735896000, -0.089941342900, 0.061116139800, -0.047952151500, - 0.039706664600, -0.033825489900, 0.030111200300, -0.027225498800}, - { -0.007048709900, 0.004927883500, -0.004199654100, 0.005793881200, - -0.009738964200, 0.018374848700, -0.040483849800, 0.146046598800, - 0.247230365400, -0.089816950200, 0.061014854400, -0.047877574700, - 0.039635751800, -0.033778171100, 0.030078686000, -0.027198514200}, - { -0.007165536600, 0.005065305500, -0.004357110300, 0.005967529800, - -0.009937335800, 0.018590642800, -0.040747877600, 0.146628884600, - 0.246713790300, -0.089671417900, 0.060903432100, -0.047785728000, - 0.039566909200, -0.033722116600, 0.030030861700, -0.027169252500}, - { -0.007276776700, 0.005196186900, -0.004507476500, 0.006140611400, - -0.010115702100, 0.018796926000, -0.040992574000, 0.147194377100, - 0.246211745800, -0.089538068000, 0.060802547900, -0.047694806200, - 0.039498877900, -0.033667952600, 0.029984769900, -0.027149571000}, - { -0.007387874000, 0.005339424900, -0.004670815200, 0.006320666200, - -0.010320954700, 0.019027766500, -0.041261046500, 0.147782948500, - 0.245685443800, -0.089383414100, 0.060683139900, -0.047604443400, - 0.039421896500, -0.033597878400, 0.029942169700, -0.027114750800}, - { -0.007510337800, 0.005483782700, -0.004836420600, 0.006511584900, - -0.010526788500, 0.019252707100, -0.041534516600, 0.148377088500, - 0.245152841500, -0.089229128400, 0.060553978800, -0.047496635400, - 0.039330446700, -0.033531679300, 0.029885352000, -0.027077485500}, - { -0.007617681800, 0.005622426600, -0.004994838300, 0.006686063700, - -0.010725673400, 0.019468467400, -0.041789645200, 0.148963171000, - 0.244635866200, -0.089072585900, 0.060442764900, -0.047403936100, - 0.039252529900, -0.033469077500, 0.029839930100, -0.027050084400}, - { -0.007743458100, 0.005771106400, -0.005173633200, 0.006879940500, - -0.010936112200, 0.019706338200, -0.042065049900, 0.149561525700, - 0.244095869900, -0.088910561500, 0.060307776300, -0.047291253700, - 0.039164455700, -0.033396349900, 0.029777209800, -0.027007624400}, - { -0.007858967200, 0.005919845900, -0.005343167000, 0.007067136200, - -0.011149489200, 0.019938097200, -0.042344891600, 0.150163766200, - 0.243550330900, -0.088743758000, 0.060167864400, -0.047174313100, - 0.039073486100, -0.033321568100, 0.029721987600, -0.026962754000}, - { -0.007983157300, 0.006074179500, -0.005508592100, 0.007258796500, - -0.011356666000, 0.020172218500, -0.042616124600, 0.150758631000, - 0.243020071900, -0.088580561000, 0.060040729000, -0.047067967200, - 0.038982593900, -0.033247283000, 0.029658101500, -0.026927788900}, - { -0.008105130300, 0.006230560200, -0.005687757500, 0.007464989300, - -0.011579317500, 0.020414981800, -0.042907551700, 0.151374476700, - 0.242457316000, -0.088387814400, 0.059887026200, -0.046937384600, - 0.038870631000, -0.033163420100, 0.029594120700, -0.026875984700}, - { -0.008233810500, 0.006382559600, -0.005862421100, 0.007658087800, - -0.011799401200, 0.020662084900, -0.043192258600, 0.151985072700, - 0.241899935800, -0.088207332900, 0.059743644400, -0.046816052000, - 0.038766487900, -0.033069335600, 0.029522772700, -0.026834459500}, - { -0.008365745600, 0.006538532000, -0.006049746700, 0.007862043900, - -0.012020887000, 0.020904026300, -0.043490655700, 0.152598080900, - 0.241345587100, -0.088019183800, 0.059585807800, -0.046682659300, - 0.038659818300, -0.032980362900, 0.029455506100, -0.026779041200}, - { -0.008488941000, 0.006696553400, -0.006230594800, 0.008061850300, - -0.012248204100, 0.021158865900, -0.043782741400, 0.153217488200, - 0.240775110200, -0.087826286000, 0.059432200300, -0.046551952900, - 0.038547619600, -0.032887333800, 0.029375054800, -0.026721976200}, - { -0.008621850700, 0.006853393800, -0.006411265100, 0.008270409100, - -0.012474342700, 0.021413239200, -0.044074457000, 0.153836655200, - 0.240212813600, -0.087629196300, 0.059265982800, -0.046411553600, - 0.038435074500, -0.032793916400, 0.029303599100, -0.026672135800}, - { -0.008749942500, 0.007017378200, -0.006599218000, 0.008486986700, - -0.012716522600, 0.021665336500, -0.044383621100, 0.154463623000, - 0.239631193600, -0.087424514000, 0.059102015300, -0.046272077200, - 0.038314783100, -0.032692580400, 0.029216641900, -0.026609057300}, - { -0.008886221300, 0.007178451900, -0.006792714500, 0.008689620600, - -0.012948009400, 0.021925282500, -0.044681119300, 0.155098325200, - 0.239060508500, -0.087219020100, 0.058937803200, -0.046131179100, - 0.038193255500, -0.032591551900, 0.029137687900, -0.026544650500}, - { -0.009017719800, 0.007346605300, -0.006985204400, 0.008911224900, - -0.013188518400, 0.022195302800, -0.044997006400, 0.155734052300, - 0.238467918900, -0.087010194700, 0.058751361600, -0.045972814900, - 0.038064564500, -0.032483676700, 0.029046121000, -0.026486139900}, - { -0.009157733600, 0.007511909600, -0.007175647500, 0.009130702800, - -0.013426053000, 0.022454091700, -0.045304400400, 0.156379869500, - 0.237883048800, -0.086789838900, 0.058573065700, -0.045819242800, - 0.037922966700, -0.032373937700, 0.028959823600, -0.026415860100}, - { -0.009301621700, 0.007690545500, -0.007377781200, 0.009352140300, - -0.013667509600, 0.022725762800, -0.045622167700, 0.157018351900, - 0.237292774000, -0.086564748300, 0.058390364400, -0.045653170900, - 0.037787266600, -0.032260085200, 0.028870030600, -0.026341359100}, - { -0.009438250700, 0.007864516400, -0.007577424400, 0.009574249500, - -0.013927827700, 0.023004845600, -0.045939676500, 0.157677386600, - 0.236683031800, -0.086329249600, 0.058190028400, -0.045489825900, - 0.037645625200, -0.032140124600, 0.028767035600, -0.026274692700}, - { -0.009580872000, 0.008033410300, -0.007771917200, 0.009798419700, - -0.014171124700, 0.023277932300, -0.046258378200, 0.158318052700, - 0.236087895800, -0.086106607600, 0.058000802500, -0.045327782600, - 0.037504763700, -0.032022055600, 0.028674126500, -0.026197380900}, - { -0.009721894700, 0.008212777900, -0.007978032900, 0.010035312500, - -0.014428158400, 0.023565684300, -0.046592644400, 0.158984686900, - 0.235466308600, -0.085859387000, 0.057798739800, -0.045153519300, - 0.037352645400, -0.031893498200, 0.028563276700, -0.026114821800}, - { -0.009871323400, 0.008389875100, -0.008190788700, 0.010268343100, - -0.014682289800, 0.023850713300, -0.046924112000, 0.159640235100, - 0.234853461000, -0.085609536100, 0.057593857200, -0.044967652300, - 0.037198907100, -0.031755365000, 0.028462385300, -0.026039689900}, - { -0.010014352200, 0.008571352800, -0.008398761300, 0.010499975700, - -0.014953382600, 0.024141775800, -0.047261891500, 0.160311566300, - 0.234232816700, -0.085360140300, 0.057372021900, -0.044785182900, - 0.037040075600, -0.031620187000, 0.028346554700, -0.025952967800}, - { -0.010166260400, 0.008751093900, -0.008606212500, 0.010738923200, - -0.015213032100, 0.024432461700, -0.047598975500, 0.160982608100, - 0.233611368900, -0.085101130000, 0.057159516400, -0.044601390800, - 0.036879378400, -0.031484316000, 0.028237949300, -0.025863505900}, - { -0.010321897600, 0.008936015200, -0.008827674600, 0.010981773200, - -0.015478042100, 0.024729320900, -0.047942312100, 0.161661569100, - 0.232972740300, -0.084843025700, 0.056938084300, -0.044400455400, - 0.036712214700, -0.031342439100, 0.028116156900, -0.025780065800}, - { -0.010466289100, 0.009127889900, -0.009036452200, 0.011223231400, - -0.015749030400, 0.025020862500, -0.048280259200, 0.162326124500, - 0.232344053400, -0.084586151300, 0.056717963000, -0.044210265700, - 0.036546321900, -0.031201495400, 0.028003222400, -0.025686033500}, - { -0.010624282400, 0.009314904500, -0.009252420500, 0.011471920900, - -0.016019505400, 0.025323118600, -0.048628982800, 0.163011748400, - 0.231703178600, -0.084306442100, 0.056487091900, -0.044009688500, - 0.036370261500, -0.031051508400, 0.027873625100, -0.025587973900}, - { -0.010770500300, 0.009500718600, -0.009474642200, 0.011715943000, - -0.016285463700, 0.025620788400, -0.048972602300, 0.163692118500, - 0.231066748100, -0.084039975100, 0.056259353500, -0.043812102400, - 0.036197201000, -0.030904859500, 0.027756477200, -0.025499892900}, - { -0.010931246800, 0.009691737700, -0.009694581800, 0.011960978000, - -0.016571687400, 0.025928666900, -0.049336013900, 0.164383311000, - 0.230408652300, -0.083761749100, 0.056019673100, -0.043603445300, - 0.036015066800, -0.030749714100, 0.027631903700, -0.025396035700}, - { -0.011083143100, 0.009884244000, -0.009924855700, 0.012214065900, - -0.016847826800, 0.026245793300, -0.049688721100, 0.165075323300, - 0.229757192500, -0.083479360500, 0.055777843800, -0.043392967400, - 0.035830313000, -0.030592744600, 0.027496482800, -0.025301408600}, - { -0.011247937000, 0.010079726100, -0.010150237400, 0.012473832200, - -0.017139617800, 0.026560090900, -0.050058620700, 0.165774369800, - 0.229096722700, -0.083187562800, 0.055525970000, -0.043164809800, - 0.035639110100, -0.030429438500, 0.027364856000, -0.025191900900}, - { -0.011414156900, 0.010285088600, -0.010375664800, 0.012733949200, - -0.017423150000, 0.026876050100, -0.050421461700, 0.166486654000, - 0.228431981400, -0.082882457600, 0.055272032600, -0.042943711600, - 0.035452683100, -0.030260595300, 0.027218999400, -0.025080573500}, - { -0.011569876800, 0.010482366800, -0.010611428200, 0.012993995900, - -0.017715404200, 0.027190997300, -0.050791534100, 0.167187177600, - 0.227767190600, -0.082585986900, 0.055017316200, -0.042721547900, - 0.035257818300, -0.030094081500, 0.027084885600, -0.024977875100}, - { -0.011735641200, 0.010679052100, -0.010838874100, 0.013255461800, - -0.018000408400, 0.027517442600, -0.051153628100, 0.167891670700, - 0.227096876100, -0.082283304900, 0.054765605000, -0.042492896400, - 0.035056918500, -0.029922928500, 0.026936217500, -0.024863147800}, - { -0.011895524600, 0.010881222400, -0.011080393900, 0.013522101400, - -0.018299976100, 0.027840232000, -0.051531646700, 0.168601698400, - 0.226418695900, -0.081973147300, 0.054498561600, -0.042259399400, - 0.034851636500, -0.029746913300, 0.026793421400, -0.024744283000}, - { -0.012061741600, 0.011078958400, -0.011308563500, 0.013785401700, - -0.018595879900, 0.028167737000, -0.051903321700, 0.169306244900, - 0.225746079600, -0.081675879800, 0.054233890700, -0.042028641800, - 0.034649470800, -0.029583320700, 0.026652632600, -0.024635779800}, - { -0.012233380000, 0.011282444600, -0.011543470000, 0.014055945900, - -0.018890880000, 0.028496294000, -0.052278354600, 0.170034645100, - 0.225057382600, -0.081353165500, 0.053955054200, -0.041784523800, - 0.034433929800, -0.029398158700, 0.026492726700, -0.024512416500}, - { -0.012397906100, 0.011498850800, -0.011789873100, 0.014328734600, - -0.019197522300, 0.028826801200, -0.052664294200, 0.170754821100, - 0.224364465600, -0.081027646800, 0.053673705700, -0.041537691400, - 0.034216344400, -0.029211010100, 0.026340154100, -0.024385306400}, - { -0.012569967700, 0.011703276500, -0.012026289200, 0.014600559700, - -0.019494308900, 0.029165749700, -0.053047725600, 0.171482978400, - 0.223673445000, -0.080701758400, 0.053401535600, -0.041291105000, - 0.034007728400, -0.029023858700, 0.026178649300, -0.024268830700}, - { -0.012733999200, 0.011910640700, -0.012273784000, 0.014874303900, - -0.019802025600, 0.029497290200, -0.053434105100, 0.172204980000, - 0.222975700000, -0.080378906900, 0.053114037000, -0.041039151900, - 0.033785715200, -0.028832942600, 0.026023212900, -0.024139101200}, - { -0.012909827000, 0.012119093100, -0.012514786800, 0.015152338700, - -0.020114351000, 0.029842400300, -0.053824260500, 0.172940887300, - 0.222282695500, -0.080040051200, 0.052820808400, -0.040782083200, - 0.033559250100, -0.028638659800, 0.025864605000, -0.024016696400}, - { -0.013077694700, 0.012330804800, -0.012768208900, 0.015431882400, - -0.020419854900, 0.030191368700, -0.054217452300, 0.173672040800, - 0.221572261900, -0.079694814600, 0.052531679400, -0.040518864300, - 0.033326721800, -0.028439265300, 0.025691724900, -0.023881218600}, - { -0.013256584600, 0.012552301800, -0.013011940600, 0.015713408100, - -0.020736060900, 0.030531916300, -0.054613554100, 0.174415121200, - 0.220859647000, -0.079355588500, 0.052228216400, -0.040252363400, - 0.033091335800, -0.028236227500, 0.025525720700, -0.023743015900}, - { -0.013434190200, 0.012763748700, -0.013265795800, 0.015994241000, - -0.021052047100, 0.030880792200, -0.055006606000, 0.175147783700, - 0.220145965700, -0.079005398700, 0.051934897400, -0.039986031200, - 0.032865074900, -0.028032712000, 0.025349395400, -0.023613527100}, - { -0.013607326700, 0.012981847200, -0.013517060900, 0.016283677300, - -0.021377016200, 0.031239628300, -0.055419411200, 0.175899125500, - 0.219420925700, -0.078653073000, 0.051620280600, -0.039709589400, - 0.032621025300, -0.027822778600, 0.025177627600, -0.023470126900}, - { -0.013782589000, 0.013190197300, -0.013766570600, 0.016559610500, - -0.021678237600, 0.031575100900, -0.055808854800, 0.176637181300, - 0.218717601900, -0.078311440600, 0.051325946300, -0.039451087500, - 0.032383743600, -0.027618613700, 0.025010333400, -0.023331058700}, - { -0.013957302500, 0.013409708800, -0.014020295800, 0.016852102000, - -0.022006668200, 0.031937517200, -0.056216071400, 0.177395411400, - 0.217982956500, -0.077938975900, 0.051002551300, -0.039166330500, - 0.032131961500, -0.027401344200, 0.024822499400, -0.023192767000}, - { -0.014137826400, 0.013634160600, -0.014277189300, 0.017136805900, - -0.022327273100, 0.032291873400, -0.056623155700, 0.178133731400, - 0.217257004100, -0.077584995300, 0.050696728900, -0.038888338700, - 0.031895218300, -0.027197775400, 0.024646690200, -0.023045282800}, - { -0.014322369000, 0.013853217500, -0.014530205800, 0.017428585500, - -0.022655062900, 0.032653627200, -0.057029286500, 0.178891911700, - 0.216528434500, -0.077216471400, 0.050368084700, -0.038598885400, - 0.031639043700, -0.026976449100, 0.024455251600, -0.022894485700}, - { -0.014497130900, 0.014073600400, -0.014793724500, 0.017720424400, - -0.022983229400, 0.033016325000, -0.057445269000, 0.179650074100, - 0.215789443000, -0.076847958800, 0.050048943000, -0.038308589100, - 0.031382426000, -0.026755494400, 0.024273618900, -0.022751911400}, - { -0.014682624600, 0.014293733300, -0.015048990300, 0.018023602800, - -0.023312864800, 0.033380176500, -0.057853443800, 0.180411228100, - 0.215054814200, -0.076463911600, 0.049724541400, -0.038014094400, - 0.031121419200, -0.026530109300, 0.024086993000, -0.022596809400}, - { -0.014859695200, 0.014525847700, -0.015314517000, 0.018318827500, - -0.023644693500, 0.033746221600, -0.058272616300, 0.181174383300, - 0.214307631900, -0.076086492000, 0.049388587800, -0.037727262100, - 0.030867454500, -0.026301452600, 0.023889634600, -0.022449489700}, - { -0.015043628800, 0.014744644300, -0.015567389200, 0.018609777000, - -0.023962891000, 0.034108731100, -0.058687999000, 0.181933910400, - 0.213571477500, -0.075708968100, 0.049061183200, -0.037429622300, - 0.030603552000, -0.026074188000, 0.023702400300, -0.022293365600}, - { -0.015230621700, 0.014967722500, -0.015834525700, 0.018906008200, - -0.024296112800, 0.034477126200, -0.059108931600, 0.182699826000, - 0.212818269000, -0.075324331700, 0.048728034800, -0.037126070200, - 0.030334649300, -0.025851070600, 0.023509696000, -0.022132339300}, - { -0.015403239200, 0.015184755300, -0.016085532200, 0.019196261600, - -0.024622369200, 0.034836693200, -0.059511496600, 0.183458281900, - 0.212080113800, -0.074943583300, 0.048389608700, -0.036837633800, - 0.030079543400, -0.025621473000, 0.023311149400, -0.021984907000}, - { -0.015590979000, 0.015408947400, -0.016353520500, 0.019493453600, - -0.024956657000, 0.035205975300, -0.059933451000, 0.184226621300, - 0.211321394300, -0.074561582900, 0.048049643100, -0.036528248900, - 0.029805219600, -0.025384306000, 0.023115206300, -0.021820726800}, - { -0.015774153200, 0.015647568900, -0.016617815600, 0.019807043400, - -0.025298080600, 0.035582464000, -0.060363020600, 0.185012756300, - 0.210561671700, -0.074159545200, 0.047700175200, -0.036210874300, - 0.029523208500, -0.025139945600, 0.022903521200, -0.021652637100}, - { -0.015957718800, 0.015866363900, -0.016880438900, 0.020098938000, - -0.025626490200, 0.035944852300, -0.060777269100, 0.185774583200, - 0.209816210000, -0.073770259000, 0.047363636300, -0.035914525800, - 0.029260937100, -0.024904284200, 0.022708784900, -0.021499355400}, - { -0.016146341100, 0.016091423300, -0.017150197200, 0.020398479100, - -0.025963577000, 0.036317429100, -0.061201713700, 0.186547463400, - 0.209047984700, -0.073368078300, 0.047014992300, -0.035596734200, - 0.028978835200, -0.024669258800, 0.022505698100, -0.021329645000}, - { -0.016320272300, 0.016310576200, -0.017403342300, 0.020690491600, - -0.026292446400, 0.036679979100, -0.061615606400, 0.187310565800, - 0.208297289900, -0.072981740600, 0.046672091800, -0.035285782400, - 0.028712202900, -0.024430026800, 0.022298988100, -0.021174596000}, - { -0.016517713700, 0.016555097200, -0.017684359000, 0.021012495700, - -0.026652137000, 0.037074921500, -0.062062849200, 0.188107078200, - 0.207521739000, -0.072562306900, 0.046307362400, -0.034963432800, - 0.028417277400, -0.024173926100, 0.022085993400, -0.020996166200}, - { -0.016693369200, 0.016775967300, -0.017940069300, 0.021307570300, - -0.026984503800, 0.037441286100, -0.062480664600, 0.188874906800, - 0.206762441600, -0.072157646700, 0.045956576300, -0.034644987500, - 0.028143706400, -0.023928413000, 0.021882650000, -0.020826571400}, - { -0.016880502600, 0.016999617900, -0.018208006800, 0.021605481800, - -0.027319373500, 0.037811009900, -0.062901579400, 0.189647520400, - 0.205988741400, -0.071756528600, 0.045600627200, -0.034330459400, - 0.027855743300, -0.023678399200, 0.021665948800, -0.020662712500}, - { -0.017068318000, 0.017223435000, -0.018475976000, 0.021903230800, - -0.027654693700, 0.038181666300, -0.063323023000, 0.190429725400, - 0.205222534800, -0.071353119600, 0.045242727900, -0.034004343600, - 0.027565877300, -0.023436396900, 0.021457189000, -0.020488542500}, - { -0.017246917900, 0.017457669100, -0.018736272400, 0.022213168000, - -0.027992598200, 0.038563100600, -0.063755422100, 0.191204356500, - 0.204452658100, -0.070936826400, 0.044881428000, -0.033686094400, - 0.027283488000, -0.023183090400, 0.021246949000, -0.020321895500}, - { -0.017437502400, 0.017684574800, -0.019007749200, 0.022514818900, - -0.028332071700, 0.038937772100, -0.064180906300, 0.191992723900, - 0.203676829800, -0.070522535200, 0.044513642200, -0.033351129700, - 0.026985379900, -0.022924089100, 0.021022365800, -0.020142555600}, - { -0.017612607500, 0.017905551400, -0.019263469700, 0.022810027000, - -0.028664228600, 0.039313071700, -0.064606182200, 0.192761249200, - 0.202909086600, -0.070116301600, 0.044153394600, -0.033033628600, - 0.026704131700, -0.022671934000, 0.020813349900, -0.019967342300}, - { -0.017804156200, 0.018142992400, -0.019536907100, 0.023124244000, - -0.029016668700, 0.039691471800, -0.065035304900, 0.193554029900, - 0.202126709100, -0.069685647800, 0.043779368600, -0.032692955500, - 0.026400789300, -0.022417171100, 0.020592971000, -0.019792949400}, - { -0.017992718700, 0.018368200800, -0.019806941800, 0.023424641100, - -0.029354657000, 0.040073376700, -0.065467078100, 0.194340183400, - 0.201348610200, -0.069267933600, 0.043409003500, -0.032365611400, - 0.026110304900, -0.022156493800, 0.020376369200, -0.019611597000}, - { -0.018169389900, 0.018590771100, -0.020064391100, 0.023730685800, - -0.029688570400, 0.040441389700, -0.065894130000, 0.195112977600, - 0.200571593400, -0.068850504200, 0.043048431400, -0.032029425400, - 0.025810897300, -0.021896568900, 0.020150932200, -0.019430720600}, - { -0.018352128100, 0.018808952700, -0.020326930300, 0.024023078900, - -0.030018101100, 0.040814643600, -0.066306546900, 0.195890653300, - 0.199799462500, -0.068437128700, 0.042682739700, -0.031706143000, - 0.025524084500, -0.021648572900, 0.019936501000, -0.019261187000}, - { -0.018529692600, 0.019042047700, -0.020594876900, 0.024321965700, - -0.030363853100, 0.041184957000, -0.066735945800, 0.196675804800, - 0.199017015900, -0.068014184700, 0.042307739300, -0.031374606800, - 0.025230096300, -0.021383827800, 0.019716451300, -0.019076980100}, - { -0.018717857800, 0.019266724700, -0.020855153600, 0.024631079300, - -0.030701275000, 0.041566227500, -0.067166371900, 0.197464077100, - 0.198230805200, -0.067585453700, 0.041936966700, -0.031028914900, - 0.024921902400, -0.021116319300, 0.019483967100, -0.018899947900}, - { -0.018899947900, 0.019483967100, -0.021116319300, 0.024921902400, - -0.031028914900, 0.041936966700, -0.067585453700, 0.198230805200, - 0.197464077100, -0.067166371900, 0.041566227500, -0.030701275000, - 0.024631079300, -0.020855153600, 0.019266724700, -0.018717857800}, - { -0.019076980100, 0.019716451300, -0.021383827800, 0.025230096300, - -0.031374606800, 0.042307739300, -0.068014184700, 0.199017015900, - 0.196675804800, -0.066735945800, 0.041184957000, -0.030363853100, - 0.024321965700, -0.020594876900, 0.019042047700, -0.018529692600}, - { -0.019261187000, 0.019936501000, -0.021648572900, 0.025524084500, - -0.031706143000, 0.042682739700, -0.068437128700, 0.199799462500, - 0.195890653300, -0.066306546900, 0.040814643600, -0.030018101100, - 0.024023078900, -0.020326930300, 0.018808952700, -0.018352128100}, - { -0.019430720600, 0.020150932200, -0.021896568900, 0.025810897300, - -0.032029425400, 0.043048431400, -0.068850504200, 0.200571593400, - 0.195112977600, -0.065894130000, 0.040441389700, -0.029688570400, - 0.023730685800, -0.020064391100, 0.018590771100, -0.018169389900}, - { -0.019611597000, 0.020376369200, -0.022156493800, 0.026110304900, - -0.032365611400, 0.043409003500, -0.069267933600, 0.201348610200, - 0.194340183400, -0.065467078100, 0.040073376700, -0.029354657000, - 0.023424641100, -0.019806941800, 0.018368200800, -0.017992718700}, - { -0.019792949400, 0.020592971000, -0.022417171100, 0.026400789300, - -0.032692955500, 0.043779368600, -0.069685647800, 0.202126709100, - 0.193554029900, -0.065035304900, 0.039691471800, -0.029016668700, - 0.023124244000, -0.019536907100, 0.018142992400, -0.017804156200}, - { -0.019967342300, 0.020813349900, -0.022671934000, 0.026704131700, - -0.033033628600, 0.044153394600, -0.070116301600, 0.202909086600, - 0.192761249200, -0.064606182200, 0.039313071700, -0.028664228600, - 0.022810027000, -0.019263469700, 0.017905551400, -0.017612607500}, - { -0.020142555600, 0.021022365800, -0.022924089100, 0.026985379900, - -0.033351129700, 0.044513642200, -0.070522535200, 0.203676829800, - 0.191992723900, -0.064180906300, 0.038937772100, -0.028332071700, - 0.022514818900, -0.019007749200, 0.017684574800, -0.017437502400}, - { -0.020321895500, 0.021246949000, -0.023183090400, 0.027283488000, - -0.033686094400, 0.044881428000, -0.070936826400, 0.204452658100, - 0.191204356500, -0.063755422100, 0.038563100600, -0.027992598200, - 0.022213168000, -0.018736272400, 0.017457669100, -0.017246917900}, - { -0.020488542500, 0.021457189000, -0.023436396900, 0.027565877300, - -0.034004343600, 0.045242727900, -0.071353119600, 0.205222534800, - 0.190429725400, -0.063323023000, 0.038181666300, -0.027654693700, - 0.021903230800, -0.018475976000, 0.017223435000, -0.017068318000}, - { -0.020662712500, 0.021665948800, -0.023678399200, 0.027855743300, - -0.034330459400, 0.045600627200, -0.071756528600, 0.205988741400, - 0.189647520400, -0.062901579400, 0.037811009900, -0.027319373500, - 0.021605481800, -0.018208006800, 0.016999617900, -0.016880502600}, - { -0.020826571400, 0.021882650000, -0.023928413000, 0.028143706400, - -0.034644987500, 0.045956576300, -0.072157646700, 0.206762441600, - 0.188874906800, -0.062480664600, 0.037441286100, -0.026984503800, - 0.021307570300, -0.017940069300, 0.016775967300, -0.016693369200}, - { -0.020996166200, 0.022085993400, -0.024173926100, 0.028417277400, - -0.034963432800, 0.046307362400, -0.072562306900, 0.207521739000, - 0.188107078200, -0.062062849200, 0.037074921500, -0.026652137000, - 0.021012495700, -0.017684359000, 0.016555097200, -0.016517713700}, - { -0.021174596000, 0.022298988100, -0.024430026800, 0.028712202900, - -0.035285782400, 0.046672091800, -0.072981740600, 0.208297289900, - 0.187310565800, -0.061615606400, 0.036679979100, -0.026292446400, - 0.020690491600, -0.017403342300, 0.016310576200, -0.016320272300}, - { -0.021329645000, 0.022505698100, -0.024669258800, 0.028978835200, - -0.035596734200, 0.047014992300, -0.073368078300, 0.209047984700, - 0.186547463400, -0.061201713700, 0.036317429100, -0.025963577000, - 0.020398479100, -0.017150197200, 0.016091423300, -0.016146341100}, - { -0.021499355400, 0.022708784900, -0.024904284200, 0.029260937100, - -0.035914525800, 0.047363636300, -0.073770259000, 0.209816210000, - 0.185774583200, -0.060777269100, 0.035944852300, -0.025626490200, - 0.020098938000, -0.016880438900, 0.015866363900, -0.015957718800}, - { -0.021652637100, 0.022903521200, -0.025139945600, 0.029523208500, - -0.036210874300, 0.047700175200, -0.074159545200, 0.210561671700, - 0.185012756300, -0.060363020600, 0.035582464000, -0.025298080600, - 0.019807043400, -0.016617815600, 0.015647568900, -0.015774153200}, - { -0.021820726800, 0.023115206300, -0.025384306000, 0.029805219600, - -0.036528248900, 0.048049643100, -0.074561582900, 0.211321394300, - 0.184226621300, -0.059933451000, 0.035205975300, -0.024956657000, - 0.019493453600, -0.016353520500, 0.015408947400, -0.015590979000}, - { -0.021984907000, 0.023311149400, -0.025621473000, 0.030079543400, - -0.036837633800, 0.048389608700, -0.074943583300, 0.212080113800, - 0.183458281900, -0.059511496600, 0.034836693200, -0.024622369200, - 0.019196261600, -0.016085532200, 0.015184755300, -0.015403239200}, - { -0.022132339300, 0.023509696000, -0.025851070600, 0.030334649300, - -0.037126070200, 0.048728034800, -0.075324331700, 0.212818269000, - 0.182699826000, -0.059108931600, 0.034477126200, -0.024296112800, - 0.018906008200, -0.015834525700, 0.014967722500, -0.015230621700}, - { -0.022293365600, 0.023702400300, -0.026074188000, 0.030603552000, - -0.037429622300, 0.049061183200, -0.075708968100, 0.213571477500, - 0.181933910400, -0.058687999000, 0.034108731100, -0.023962891000, - 0.018609777000, -0.015567389200, 0.014744644300, -0.015043628800}, - { -0.022449489700, 0.023889634600, -0.026301452600, 0.030867454500, - -0.037727262100, 0.049388587800, -0.076086492000, 0.214307631900, - 0.181174383300, -0.058272616300, 0.033746221600, -0.023644693500, - 0.018318827500, -0.015314517000, 0.014525847700, -0.014859695200}, - { -0.022596809400, 0.024086993000, -0.026530109300, 0.031121419200, - -0.038014094400, 0.049724541400, -0.076463911600, 0.215054814200, - 0.180411228100, -0.057853443800, 0.033380176500, -0.023312864800, - 0.018023602800, -0.015048990300, 0.014293733300, -0.014682624600}, - { -0.022751911400, 0.024273618900, -0.026755494400, 0.031382426000, - -0.038308589100, 0.050048943000, -0.076847958800, 0.215789443000, - 0.179650074100, -0.057445269000, 0.033016325000, -0.022983229400, - 0.017720424400, -0.014793724500, 0.014073600400, -0.014497130900}, - { -0.022894485700, 0.024455251600, -0.026976449100, 0.031639043700, - -0.038598885400, 0.050368084700, -0.077216471400, 0.216528434500, - 0.178891911700, -0.057029286500, 0.032653627200, -0.022655062900, - 0.017428585500, -0.014530205800, 0.013853217500, -0.014322369000}, - { -0.023045282800, 0.024646690200, -0.027197775400, 0.031895218300, - -0.038888338700, 0.050696728900, -0.077584995300, 0.217257004100, - 0.178133731400, -0.056623155700, 0.032291873400, -0.022327273100, - 0.017136805900, -0.014277189300, 0.013634160600, -0.014137826400}, - { -0.023192767000, 0.024822499400, -0.027401344200, 0.032131961500, - -0.039166330500, 0.051002551300, -0.077938975900, 0.217982956500, - 0.177395411400, -0.056216071400, 0.031937517200, -0.022006668200, - 0.016852102000, -0.014020295800, 0.013409708800, -0.013957302500}, - { -0.023331058700, 0.025010333400, -0.027618613700, 0.032383743600, - -0.039451087500, 0.051325946300, -0.078311440600, 0.218717601900, - 0.176637181300, -0.055808854800, 0.031575100900, -0.021678237600, - 0.016559610500, -0.013766570600, 0.013190197300, -0.013782589000}, - { -0.023470126900, 0.025177627600, -0.027822778600, 0.032621025300, - -0.039709589400, 0.051620280600, -0.078653073000, 0.219420925700, - 0.175899125500, -0.055419411200, 0.031239628300, -0.021377016200, - 0.016283677300, -0.013517060900, 0.012981847200, -0.013607326700}, - { -0.023613527100, 0.025349395400, -0.028032712000, 0.032865074900, - -0.039986031200, 0.051934897400, -0.079005398700, 0.220145965700, - 0.175147783700, -0.055006606000, 0.030880792200, -0.021052047100, - 0.015994241000, -0.013265795800, 0.012763748700, -0.013434190200}, - { -0.023743015900, 0.025525720700, -0.028236227500, 0.033091335800, - -0.040252363400, 0.052228216400, -0.079355588500, 0.220859647000, - 0.174415121200, -0.054613554100, 0.030531916300, -0.020736060900, - 0.015713408100, -0.013011940600, 0.012552301800, -0.013256584600}, - { -0.023881218600, 0.025691724900, -0.028439265300, 0.033326721800, - -0.040518864300, 0.052531679400, -0.079694814600, 0.221572261900, - 0.173672040800, -0.054217452300, 0.030191368700, -0.020419854900, - 0.015431882400, -0.012768208900, 0.012330804800, -0.013077694700}, - { -0.024016696400, 0.025864605000, -0.028638659800, 0.033559250100, - -0.040782083200, 0.052820808400, -0.080040051200, 0.222282695500, - 0.172940887300, -0.053824260500, 0.029842400300, -0.020114351000, - 0.015152338700, -0.012514786800, 0.012119093100, -0.012909827000}, - { -0.024139101200, 0.026023212900, -0.028832942600, 0.033785715200, - -0.041039151900, 0.053114037000, -0.080378906900, 0.222975700000, - 0.172204980000, -0.053434105100, 0.029497290200, -0.019802025600, - 0.014874303900, -0.012273784000, 0.011910640700, -0.012733999200}, - { -0.024268830700, 0.026178649300, -0.029023858700, 0.034007728400, - -0.041291105000, 0.053401535600, -0.080701758400, 0.223673445000, - 0.171482978400, -0.053047725600, 0.029165749700, -0.019494308900, - 0.014600559700, -0.012026289200, 0.011703276500, -0.012569967700}, - { -0.024385306400, 0.026340154100, -0.029211010100, 0.034216344400, - -0.041537691400, 0.053673705700, -0.081027646800, 0.224364465600, - 0.170754821100, -0.052664294200, 0.028826801200, -0.019197522300, - 0.014328734600, -0.011789873100, 0.011498850800, -0.012397906100}, - { -0.024512416500, 0.026492726700, -0.029398158700, 0.034433929800, - -0.041784523800, 0.053955054200, -0.081353165500, 0.225057382600, - 0.170034645100, -0.052278354600, 0.028496294000, -0.018890880000, - 0.014055945900, -0.011543470000, 0.011282444600, -0.012233380000}, - { -0.024635779800, 0.026652632600, -0.029583320700, 0.034649470800, - -0.042028641800, 0.054233890700, -0.081675879800, 0.225746079600, - 0.169306244900, -0.051903321700, 0.028167737000, -0.018595879900, - 0.013785401700, -0.011308563500, 0.011078958400, -0.012061741600}, - { -0.024744283000, 0.026793421400, -0.029746913300, 0.034851636500, - -0.042259399400, 0.054498561600, -0.081973147300, 0.226418695900, - 0.168601698400, -0.051531646700, 0.027840232000, -0.018299976100, - 0.013522101400, -0.011080393900, 0.010881222400, -0.011895524600}, - { -0.024863147800, 0.026936217500, -0.029922928500, 0.035056918500, - -0.042492896400, 0.054765605000, -0.082283304900, 0.227096876100, - 0.167891670700, -0.051153628100, 0.027517442600, -0.018000408400, - 0.013255461800, -0.010838874100, 0.010679052100, -0.011735641200}, - { -0.024977875100, 0.027084885600, -0.030094081500, 0.035257818300, - -0.042721547900, 0.055017316200, -0.082585986900, 0.227767190600, - 0.167187177600, -0.050791534100, 0.027190997300, -0.017715404200, - 0.012993995900, -0.010611428200, 0.010482366800, -0.011569876800}, - { -0.025080573500, 0.027218999400, -0.030260595300, 0.035452683100, - -0.042943711600, 0.055272032600, -0.082882457600, 0.228431981400, - 0.166486654000, -0.050421461700, 0.026876050100, -0.017423150000, - 0.012733949200, -0.010375664800, 0.010285088600, -0.011414156900}, - { -0.025191900900, 0.027364856000, -0.030429438500, 0.035639110100, - -0.043164809800, 0.055525970000, -0.083187562800, 0.229096722700, - 0.165774369800, -0.050058620700, 0.026560090900, -0.017139617800, - 0.012473832200, -0.010150237400, 0.010079726100, -0.011247937000}, - { -0.025301408600, 0.027496482800, -0.030592744600, 0.035830313000, - -0.043392967400, 0.055777843800, -0.083479360500, 0.229757192500, - 0.165075323300, -0.049688721100, 0.026245793300, -0.016847826800, - 0.012214065900, -0.009924855700, 0.009884244000, -0.011083143100}, - { -0.025396035700, 0.027631903700, -0.030749714100, 0.036015066800, - -0.043603445300, 0.056019673100, -0.083761749100, 0.230408652300, - 0.164383311000, -0.049336013900, 0.025928666900, -0.016571687400, - 0.011960978000, -0.009694581800, 0.009691737700, -0.010931246800}, - { -0.025499892900, 0.027756477200, -0.030904859500, 0.036197201000, - -0.043812102400, 0.056259353500, -0.084039975100, 0.231066748100, - 0.163692118500, -0.048972602300, 0.025620788400, -0.016285463700, - 0.011715943000, -0.009474642200, 0.009500718600, -0.010770500300}, - { -0.025587973900, 0.027873625100, -0.031051508400, 0.036370261500, - -0.044009688500, 0.056487091900, -0.084306442100, 0.231703178600, - 0.163011748400, -0.048628982800, 0.025323118600, -0.016019505400, - 0.011471920900, -0.009252420500, 0.009314904500, -0.010624282400}, - { -0.025686033500, 0.028003222400, -0.031201495400, 0.036546321900, - -0.044210265700, 0.056717963000, -0.084586151300, 0.232344053400, - 0.162326124500, -0.048280259200, 0.025020862500, -0.015749030400, - 0.011223231400, -0.009036452200, 0.009127889900, -0.010466289100}, - { -0.025780065800, 0.028116156900, -0.031342439100, 0.036712214700, - -0.044400455400, 0.056938084300, -0.084843025700, 0.232972740300, - 0.161661569100, -0.047942312100, 0.024729320900, -0.015478042100, - 0.010981773200, -0.008827674600, 0.008936015200, -0.010321897600}, - { -0.025863505900, 0.028237949300, -0.031484316000, 0.036879378400, - -0.044601390800, 0.057159516400, -0.085101130000, 0.233611368900, - 0.160982608100, -0.047598975500, 0.024432461700, -0.015213032100, - 0.010738923200, -0.008606212500, 0.008751093900, -0.010166260400}, - { -0.025952967800, 0.028346554700, -0.031620187000, 0.037040075600, - -0.044785182900, 0.057372021900, -0.085360140300, 0.234232816700, - 0.160311566300, -0.047261891500, 0.024141775800, -0.014953382600, - 0.010499975700, -0.008398761300, 0.008571352800, -0.010014352200}, - { -0.026039689900, 0.028462385300, -0.031755365000, 0.037198907100, - -0.044967652300, 0.057593857200, -0.085609536100, 0.234853461000, - 0.159640235100, -0.046924112000, 0.023850713300, -0.014682289800, - 0.010268343100, -0.008190788700, 0.008389875100, -0.009871323400}, - { -0.026114821800, 0.028563276700, -0.031893498200, 0.037352645400, - -0.045153519300, 0.057798739800, -0.085859387000, 0.235466308600, - 0.158984686900, -0.046592644400, 0.023565684300, -0.014428158400, - 0.010035312500, -0.007978032900, 0.008212777900, -0.009721894700}, - { -0.026197380900, 0.028674126500, -0.032022055600, 0.037504763700, - -0.045327782600, 0.058000802500, -0.086106607600, 0.236087895800, - 0.158318052700, -0.046258378200, 0.023277932300, -0.014171124700, - 0.009798419700, -0.007771917200, 0.008033410300, -0.009580872000}, - { -0.026274692700, 0.028767035600, -0.032140124600, 0.037645625200, - -0.045489825900, 0.058190028400, -0.086329249600, 0.236683031800, - 0.157677386600, -0.045939676500, 0.023004845600, -0.013927827700, - 0.009574249500, -0.007577424400, 0.007864516400, -0.009438250700}, - { -0.026341359100, 0.028870030600, -0.032260085200, 0.037787266600, - -0.045653170900, 0.058390364400, -0.086564748300, 0.237292774000, - 0.157018351900, -0.045622167700, 0.022725762800, -0.013667509600, - 0.009352140300, -0.007377781200, 0.007690545500, -0.009301621700}, - { -0.026415860100, 0.028959823600, -0.032373937700, 0.037922966700, - -0.045819242800, 0.058573065700, -0.086789838900, 0.237883048800, - 0.156379869500, -0.045304400400, 0.022454091700, -0.013426053000, - 0.009130702800, -0.007175647500, 0.007511909600, -0.009157733600}, - { -0.026486139900, 0.029046121000, -0.032483676700, 0.038064564500, - -0.045972814900, 0.058751361600, -0.087010194700, 0.238467918900, - 0.155734052300, -0.044997006400, 0.022195302800, -0.013188518400, - 0.008911224900, -0.006985204400, 0.007346605300, -0.009017719800}, - { -0.026544650500, 0.029137687900, -0.032591551900, 0.038193255500, - -0.046131179100, 0.058937803200, -0.087219020100, 0.239060508500, - 0.155098325200, -0.044681119300, 0.021925282500, -0.012948009400, - 0.008689620600, -0.006792714500, 0.007178451900, -0.008886221300}, - { -0.026609057300, 0.029216641900, -0.032692580400, 0.038314783100, - -0.046272077200, 0.059102015300, -0.087424514000, 0.239631193600, - 0.154463623000, -0.044383621100, 0.021665336500, -0.012716522600, - 0.008486986700, -0.006599218000, 0.007017378200, -0.008749942500}, - { -0.026672135800, 0.029303599100, -0.032793916400, 0.038435074500, - -0.046411553600, 0.059265982800, -0.087629196300, 0.240212813600, - 0.153836655200, -0.044074457000, 0.021413239200, -0.012474342700, - 0.008270409100, -0.006411265100, 0.006853393800, -0.008621850700}, - { -0.026721976200, 0.029375054800, -0.032887333800, 0.038547619600, - -0.046551952900, 0.059432200300, -0.087826286000, 0.240775110200, - 0.153217488200, -0.043782741400, 0.021158865900, -0.012248204100, - 0.008061850300, -0.006230594800, 0.006696553400, -0.008488941000}, - { -0.026779041200, 0.029455506100, -0.032980362900, 0.038659818300, - -0.046682659300, 0.059585807800, -0.088019183800, 0.241345587100, - 0.152598080900, -0.043490655700, 0.020904026300, -0.012020887000, - 0.007862043900, -0.006049746700, 0.006538532000, -0.008365745600}, - { -0.026834459500, 0.029522772700, -0.033069335600, 0.038766487900, - -0.046816052000, 0.059743644400, -0.088207332900, 0.241899935800, - 0.151985072700, -0.043192258600, 0.020662084900, -0.011799401200, - 0.007658087800, -0.005862421100, 0.006382559600, -0.008233810500}, - { -0.026875984700, 0.029594120700, -0.033163420100, 0.038870631000, - -0.046937384600, 0.059887026200, -0.088387814400, 0.242457316000, - 0.151374476700, -0.042907551700, 0.020414981800, -0.011579317500, - 0.007464989300, -0.005687757500, 0.006230560200, -0.008105130300}, - { -0.026927788900, 0.029658101500, -0.033247283000, 0.038982593900, - -0.047067967200, 0.060040729000, -0.088580561000, 0.243020071900, - 0.150758631000, -0.042616124600, 0.020172218500, -0.011356666000, - 0.007258796500, -0.005508592100, 0.006074179500, -0.007983157300}, - { -0.026962754000, 0.029721987600, -0.033321568100, 0.039073486100, - -0.047174313100, 0.060167864400, -0.088743758000, 0.243550330900, - 0.150163766200, -0.042344891600, 0.019938097200, -0.011149489200, - 0.007067136200, -0.005343167000, 0.005919845900, -0.007858967200}, - { -0.027007624400, 0.029777209800, -0.033396349900, 0.039164455700, - -0.047291253700, 0.060307776300, -0.088910561500, 0.244095869900, - 0.149561525700, -0.042065049900, 0.019706338200, -0.010936112200, - 0.006879940500, -0.005173633200, 0.005771106400, -0.007743458100}, - { -0.027050084400, 0.029839930100, -0.033469077500, 0.039252529900, - -0.047403936100, 0.060442764900, -0.089072585900, 0.244635866200, - 0.148963171000, -0.041789645200, 0.019468467400, -0.010725673400, - 0.006686063700, -0.004994838300, 0.005622426600, -0.007617681800}, - { -0.027077485500, 0.029885352000, -0.033531679300, 0.039330446700, - -0.047496635400, 0.060553978800, -0.089229128400, 0.245152841500, - 0.148377088500, -0.041534516600, 0.019252707100, -0.010526788500, - 0.006511584900, -0.004836420600, 0.005483782700, -0.007510337800}, - { -0.027114750800, 0.029942169700, -0.033597878400, 0.039421896500, - -0.047604443400, 0.060683139900, -0.089383414100, 0.245685443800, - 0.147782948500, -0.041261046500, 0.019027766500, -0.010320954700, - 0.006320666200, -0.004670815200, 0.005339424900, -0.007387874000}, - { -0.027149571000, 0.029984769900, -0.033667952600, 0.039498877900, - -0.047694806200, 0.060802547900, -0.089538068000, 0.246211745800, - 0.147194377100, -0.040992574000, 0.018796926000, -0.010115702100, - 0.006140611400, -0.004507476500, 0.005196186900, -0.007276776700}, - { -0.027169252500, 0.030030861700, -0.033722116600, 0.039566909200, - -0.047785728000, 0.060903432100, -0.089671417900, 0.246713790300, - 0.146628884600, -0.040747877600, 0.018590642800, -0.009937335800, - 0.005967529800, -0.004357110300, 0.005065305500, -0.007165536600}, - { -0.027198514200, 0.030078686000, -0.033778171100, 0.039635751800, - -0.047877574700, 0.061014854400, -0.089816950200, 0.247230365400, - 0.146046598800, -0.040483849800, 0.018374848700, -0.009738964200, - 0.005793881200, -0.004199654100, 0.004927883500, -0.007048709900}, - { -0.027225498800, 0.030111200300, -0.033825489900, 0.039706664600, - -0.047952151500, 0.061116139800, -0.089941342900, 0.247735896000, - 0.145484672100, -0.040230608100, 0.018169204500, -0.009551266900, - 0.005619673100, -0.004037760400, 0.004792587900, -0.006944808900}, - { -0.027238906300, 0.030150552400, -0.033871892800, 0.039764687300, - -0.048032095800, 0.061214521700, -0.090072272700, 0.248238004700, - 0.144912324100, -0.039985659800, 0.017964244700, -0.009362610000, - 0.005454760700, -0.003888052900, 0.004661933300, -0.006833632200}, - { -0.027261029400, 0.030177475500, -0.033924139600, 0.039820545400, - -0.048108842000, 0.061311021700, -0.090189496400, 0.248736735600, - 0.144353453000, -0.039744969800, 0.017763535800, -0.009178450500, - 0.005283093400, -0.003739016800, 0.004530986400, -0.006733019100}, - { -0.027278748100, 0.030211452200, -0.033963765200, 0.039872247300, - -0.048170611400, 0.061398382500, -0.090309454700, 0.249217705300, - 0.143792799000, -0.039499198000, 0.017553760300, -0.009003806900, - 0.005123920600, -0.003593946300, 0.004404173000, -0.006624732800}, - { -0.027285607600, 0.030230693900, -0.033995062800, 0.039925613200, - -0.048237360200, 0.061470769900, -0.090420060400, 0.249702348700, - 0.143244619700, -0.039267480800, 0.017361477800, -0.008827892900, - 0.004959568700, -0.003450970500, 0.004278722600, -0.006528665100}, - { -0.027299867000, 0.030260492100, -0.034029532000, 0.039969736100, - -0.048301646800, 0.061551769900, -0.090531292600, 0.250186846500, - 0.142695621300, -0.039034846100, 0.017168425100, -0.008650250700, - 0.004804548400, -0.003309959300, 0.004155528900, -0.006423738600}, - { -0.027311829700, 0.030276666600, -0.034057656100, 0.040007213300, - -0.048358207200, 0.061624954700, -0.090633704900, 0.250662990700, - 0.142142757000, -0.038804959500, 0.016978639900, -0.008476386900, - 0.004641928300, -0.003168595500, 0.004031158500, -0.006328397300}, - { -0.027310222200, 0.030295722900, -0.034091543000, 0.040054114300, - -0.048405249700, 0.061694722300, -0.090720594500, 0.251131429100, - 0.141605434000, -0.038581990000, 0.016794826900, -0.008319159800, - 0.004499540800, -0.003028595200, 0.003904318200, -0.006227186400}, - { -0.027317970100, 0.030306458400, -0.034113893000, 0.040084569400, - -0.048454321900, 0.061758888600, -0.090812420800, 0.251597538600, - 0.141069989900, -0.038359180300, 0.016622514100, -0.008153648900, - 0.004355118400, -0.002896910300, 0.003788978800, -0.006128817400}, - { -0.027322408700, 0.030324310800, -0.034134470700, 0.040112744100, - -0.048500250500, 0.061820252000, -0.090901636600, 0.252061541300, - 0.140535980000, -0.038138344000, 0.016441338600, -0.007987803500, - 0.004199685000, -0.002761828800, 0.003669989500, -0.006038006300}, - { -0.027324602000, 0.030339624000, -0.034151729900, 0.040149371300, - -0.048547165800, 0.061880613500, -0.090988640700, 0.252522799200, - 0.140002708200, -0.037917269600, 0.016259063300, -0.007831507500, - 0.004057015800, -0.002631162900, 0.003555441000, -0.005940171600}, - { -0.027314851900, 0.030338133100, -0.034171796400, 0.040168382200, - -0.048581744400, 0.061940861800, -0.091066456400, 0.252975093200, - 0.139476737000, -0.037702515700, 0.016084224600, -0.007671474500, - 0.003906772800, -0.002500886900, 0.003440460400, -0.005852674900}, - { -0.027312476200, 0.030348556000, -0.034182788700, 0.040197728000, - -0.048620522900, 0.061992180000, -0.091143115000, 0.253426570300, - 0.138949385400, -0.037496867100, 0.015909567200, -0.007521879300, - 0.003770118000, -0.002375530200, 0.003330548600, -0.005758700400}, - { -0.027308900300, 0.030346059500, -0.034189299100, 0.040210075200, - -0.048649242600, 0.062033003000, -0.091219627900, 0.253871405000, - 0.138428727000, -0.037284933600, 0.015748179900, -0.007366427500, - 0.003634318300, -0.002250865900, 0.003220173800, -0.005674994900}, - { -0.027291156400, 0.030346034000, -0.034201654500, 0.040221399100, - -0.048665013800, 0.062069083500, -0.091279630400, 0.254306086800, - 0.137915259700, -0.037080250800, 0.015582215100, -0.007224968800, - 0.003504827500, -0.002131832000, 0.003115541600, -0.005585382500}, - { -0.027283556600, 0.030337810300, -0.034199682900, 0.040235929700, - -0.048687487200, 0.062103176600, -0.091336957100, 0.254740700000, - 0.137411927200, -0.036888380700, 0.015421720100, -0.007078261400, - 0.003366480500, -0.002011695700, 0.003009395700, -0.005505373600}, - { -0.027272064200, 0.030336692900, -0.034199174200, 0.040240217600, - -0.048706450000, 0.062133585500, -0.091390047400, 0.255169264700, - 0.136902218400, -0.036685011500, 0.015268001700, -0.006941296500, - 0.003240948000, -0.001896019300, 0.002907510500, -0.005418047900}, - { -0.027248039400, 0.030331001200, -0.034191966500, 0.040247715100, - -0.048720314000, 0.062167723200, -0.091449297700, 0.255595532100, - 0.136392728600, -0.036493663300, 0.015108636900, -0.006794821100, - 0.003113745000, -0.001779622200, 0.002805447300, -0.005330421900}, - { -0.027233909600, 0.030314184400, -0.034192418000, 0.040245240000, - -0.048730903800, 0.062189717900, -0.091492283600, 0.256016406700, - 0.135898611300, -0.036308554600, 0.014954266000, -0.006664576800, - 0.002983502200, -0.001666038900, 0.002704732600, -0.005254922300}, - { -0.027215455700, 0.030304366300, -0.034180802400, 0.040247773900, - -0.048740138000, 0.062208163600, -0.091531009000, 0.256430891500, - 0.135398740700, -0.036112846200, 0.014809292700, -0.006525103100, - 0.002862380100, -0.001554671000, 0.002606541400, -0.005170558100}, - { -0.027187650100, 0.030281865200, -0.034163561400, 0.040234336300, - -0.048739644700, 0.062216233800, -0.091570002800, 0.256840267600, - 0.134912928100, -0.035934332400, 0.014660767100, -0.006399204100, - 0.002746842300, -0.001447380500, 0.002511020600, -0.005099278600}, - { -0.027164826500, 0.030266800800, -0.034157300200, 0.040233396200, - -0.048743282000, 0.062239840100, -0.091604648700, 0.257250575700, - 0.134413490000, -0.035748887100, 0.014519076200, -0.006262314300, - 0.002627935400, -0.001338252600, 0.002414767800, -0.005016493400}, - { -0.027143371600, 0.030242570200, -0.034137799500, 0.040216442600, - -0.048738434100, 0.062242822500, -0.091637493400, 0.257654713000, - 0.133930500000, -0.035570772900, 0.014382400400, -0.006140611400, - 0.002515774700, -0.001233847400, 0.002321555700, -0.004947156000}, - { -0.027107457100, 0.030220920600, -0.034111888100, 0.040203792100, - -0.048729769800, 0.062241715900, -0.091653939600, 0.258048229900, - 0.133455517400, -0.035401209000, 0.014243272400, -0.006025214200, - 0.002399200400, -0.001132590800, 0.002232582100, -0.004870595400}, - { -0.027078741500, 0.030199249900, -0.034098388500, 0.040182871900, - -0.048718972600, 0.062249560500, -0.091682539100, 0.258446283900, - 0.132964854500, -0.035222237300, 0.014108040800, -0.005893861400, - 0.002284840400, -0.001026848500, 0.002138024300, -0.004799901300}, - { -0.027050861400, 0.030166932700, -0.034068442600, 0.040165553900, - -0.048705371900, 0.062241192800, -0.091701376100, 0.258836019600, - 0.132491612100, -0.035051605900, 0.013979073500, -0.005779960100, - 0.002180035700, -0.000929347100, 0.002051981700, -0.004725695500}, - { -0.027009514400, 0.030138847000, -0.034036485500, 0.040133308800, - -0.048693489400, 0.062239873700, -0.091706871400, 0.259230513500, - 0.132019240400, -0.034882878100, 0.013840666600, -0.005663538600, - 0.002073337300, -0.000829862900, 0.001962511100, -0.004659557800}, - { -0.026976072400, 0.030111284500, -0.034014280800, 0.040115213700, - -0.048678076000, 0.062229403200, -0.091722403400, 0.259617106900, - 0.131545261000, -0.034721796900, 0.013714416500, -0.005551787400, - 0.001970438800, -0.000734060100, 0.001877974400, -0.004586585500}, - { -0.026942508300, 0.030072123900, -0.033977399000, 0.040076906100, - -0.048648464400, 0.062216113000, -0.091727265200, 0.259993523100, - 0.131081652600, -0.034558763500, 0.013594098000, -0.005434268500, - 0.001868519600, -0.000639267000, 0.001792774700, -0.004523786800}, - { -0.026894698800, 0.030035043200, -0.033945864700, 0.040048640600, - -0.048621392100, 0.062194230500, -0.091718251200, 0.260362390800, - 0.130622438100, -0.034399268600, 0.013476831400, -0.005332669200, - 0.001763978200, -0.000548375700, 0.001712493000, -0.004454372600}, - { -0.026858101400, 0.029992822400, -0.033904910800, 0.040006010900, - -0.048586130300, 0.062174189600, -0.091714875900, 0.260730415900, - 0.130162737200, -0.034249709200, 0.013361670100, -0.005230956800, - 0.001670082700, -0.000460660800, 0.001634796200, -0.004387061400}, - { -0.026817551300, 0.029956756400, -0.033861618500, 0.039972655000, - -0.048554302300, 0.062145158100, -0.091709577400, 0.261097309800, - 0.129704208100, -0.034089428900, 0.013243154600, -0.005126787000, - 0.001573784600, -0.000370001900, 0.001552956500, -0.004327008900}, - { -0.026764892400, 0.029914914700, -0.033824115200, 0.039936894900, - -0.048518010200, 0.062122650400, -0.091701578900, 0.261471099700, - 0.129242600400, -0.033937289100, 0.013125955200, -0.005023257700, - 0.001477736900, -0.000278806000, 0.001483063100, -0.004260417800}, - { -0.026723942900, 0.029866954600, -0.033776306400, 0.039885777900, - -0.048484357900, 0.062095944700, -0.091689502800, 0.261832669700, - 0.128796851700, -0.033792097000, 0.013014623800, -0.004924853700, - 0.001386785000, -0.000193120700, 0.001405618600, -0.004204208100}, - { -0.026677369100, 0.029823200100, -0.033723634100, 0.039840829600, - -0.048439828000, 0.062052525700, -0.091667171300, 0.262181947100, - 0.128351507600, -0.033643014900, 0.012908660300, -0.004821497300, - 0.001297966400, -0.000110045000, 0.001331802200, -0.004139947900}, - { -0.026631089400, 0.029779644500, -0.033684178100, 0.039790688300, - -0.048395229300, 0.062022592400, -0.091650848600, 0.262539269000, - 0.127907136500, -0.033498033100, 0.012797985100, -0.004723290400, - 0.001205478700, -0.000034034800, 0.001256538900, -0.004085082700}, - { -0.026573902300, 0.029720893300, -0.033623583100, 0.039737596900, - -0.048340055700, 0.061978479200, -0.091617477500, 0.262888924200, - 0.127463754300, -0.033360614900, 0.012695304100, -0.004633631600, - 0.001122432500, 0.000044341700, 0.001186615500, -0.004024302800}, - { -0.026522150600, 0.029670790800, -0.033575106100, 0.039688914300, - -0.048301375000, 0.061932964300, -0.091590421200, 0.263234790300, - 0.127016546500, -0.033218503400, 0.012588312500, -0.004539881200, - 0.001035742900, 0.000126628900, 0.001111797200, -0.003970051000}, - { -0.026473220500, 0.029612627700, -0.033515051500, 0.039624070900, - -0.048240646500, 0.061883959100, -0.091552786700, 0.263570751000, - 0.126588986000, -0.033087770300, 0.012491700600, -0.004455578400, - 0.000957623400, 0.000200514600, 0.001045891900, -0.003912507000}, - { -0.026409434000, 0.029556965600, -0.033460776600, 0.039568933000, - -0.048182001300, 0.061834912800, -0.091525806900, 0.263910245800, - 0.126156834400, -0.032952152900, 0.012390643600, -0.004367158600, - 0.000875358500, 0.000278697700, 0.000974841200, -0.003861457500}, - { -0.026353317400, 0.029502101900, -0.033394973500, 0.039508550400, - -0.048117964600, 0.061780340600, -0.091479732400, 0.264247652100, - 0.125720795200, -0.032819571200, 0.012293251100, -0.004282623500, - 0.000796996500, 0.000353021900, 0.000908270600, -0.003803350600}, - { -0.026300063600, 0.029438925700, -0.033329672000, 0.039436382500, - -0.048060026200, 0.061726016900, -0.091434512400, 0.264577145700, - 0.125295550200, -0.032687548300, 0.012206896600, -0.004201204700, - 0.000720904000, 0.000425856500, 0.000841447500, -0.003755895200}, - { -0.026232862100, 0.029378736300, -0.033269511800, 0.039375017600, - -0.047995635500, 0.061659588400, -0.091383468500, 0.264900163300, - 0.124873224300, -0.032570746200, 0.012117690200, -0.004123793300, - 0.000649052900, 0.000494443100, 0.000780101600, -0.003702105200}, - { -0.026173704500, 0.029320278800, -0.033199111900, 0.039309873100, - -0.047925510600, 0.061597170100, -0.091339033000, 0.265233959000, - 0.124448392000, -0.032439785200, 0.012020034000, -0.004049722900, - 0.000572266200, 0.000556866100, 0.000718027400, -0.003647327300}, - { -0.026115105800, 0.029249328200, -0.033136595000, 0.039232475500, - -0.047860778200, 0.061535070700, -0.091283444100, 0.265553269700, - 0.124029148500, -0.032311531400, 0.011937971200, -0.003972488800, - 0.000499981800, 0.000626385600, 0.000653931700, -0.003602065500}, - { -0.026053040700, 0.029187959100, -0.033061913700, 0.039161387400, - -0.047784155800, 0.061464903000, -0.091231578000, 0.265868569100, - 0.123611901100, -0.032198029300, 0.011852192100, -0.003898279700, - 0.000430866400, 0.000692495800, 0.000594828700, -0.003550040600}, - { -0.025979190500, 0.029119110500, -0.032993298700, 0.039088687600, - -0.047717396700, 0.061398326100, -0.091168632300, 0.266191486300, - 0.123192522800, -0.032068754900, 0.011769073200, -0.003818881300, - 0.000367747300, 0.000760093900, 0.000531731300, -0.003505638300}, - { -0.025916736900, 0.029044984700, -0.032912027100, 0.039010819600, - -0.047633284300, 0.061319593900, -0.091106317700, 0.266496871700, - 0.122782327100, -0.031960441800, 0.011688497100, -0.003749535300, - 0.000303040600, 0.000822340300, 0.000475867100, -0.003456266600}, - { -0.025852313500, 0.028979555600, -0.032847149600, 0.038930581400, - -0.047553631700, 0.061249320900, -0.091041565400, 0.266807297400, - 0.122364892800, -0.031842624600, 0.011609993400, -0.003674451700, - 0.000230091300, 0.000883119400, 0.000424433200, -0.003415490600}, - { -0.025775412400, 0.028907556300, -0.032761339500, 0.038846825400, - -0.047473566900, 0.061166435400, -0.090972059800, 0.267117532200, - 0.121966313400, -0.031726469200, 0.011526657700, -0.003614337200, - 0.000167921300, 0.000943784400, 0.000369742900, -0.003367277200}, - { -0.025709333200, 0.028827467700, -0.032686245400, 0.038767569400, - -0.047387160100, 0.061086213100, -0.090894622700, 0.267415888400, - 0.121558234900, -0.031616336600, 0.011456238300, -0.003548028100, - 0.000105206400, 0.001004973300, 0.000312623600, -0.003327797000}, - { -0.025638962100, 0.028755960800, -0.032600073600, 0.038681603800, - -0.047304659400, 0.061000604600, -0.090822485700, 0.267711413800, - 0.121152150800, -0.031508074100, 0.011387738000, -0.003483800400, - 0.000044884500, 0.001063521800, 0.000259812600, -0.003280931700}, - { -0.025558748500, 0.028679119400, -0.032520166800, 0.038596766500, - -0.047212175500, 0.060911299100, -0.090745034900, 0.268015321100, - 0.120754514200, -0.031402432600, 0.011309574900, -0.003414828400, - -0.000008679700, 0.001122626500, 0.000204180800, -0.003242762700}, - { -0.025491004800, 0.028598264500, -0.032433214400, 0.038499397300, - -0.047124517500, 0.060822958600, -0.090656855500, 0.268302409700, - 0.120353034900, -0.031296168100, 0.011241308700, -0.003361438800, - -0.000066919400, 0.001168676900, 0.000156014300, -0.003199268400}, - { -0.025418085200, 0.028521763200, -0.032353226800, 0.038413339800, - -0.047029530200, 0.060731151800, -0.090577351800, 0.268593285800, - 0.119959312000, -0.031191167100, 0.011175918200, -0.003299906800, - -0.000125395300, 0.001226211900, 0.000102202900, -0.003162561900}, - { -0.025341820300, 0.028442350400, -0.032256880200, 0.038315834400, - -0.046933803100, 0.060629970500, -0.090484913100, 0.268880111900, - 0.119563660200, -0.031092550300, 0.011105920600, -0.003240720400, - -0.000180668100, 0.001280388200, 0.000052969800, -0.003118681600}, - { -0.025257897700, 0.028361984300, -0.032173379200, 0.038225851900, - -0.046832398400, 0.060542535700, -0.090401757000, 0.269167050700, - 0.119168850700, -0.030996156800, 0.011040895200, -0.003190341200, - -0.000235221900, 0.001334856800, 0.000001652200, -0.003084097600}, - { -0.025185554200, 0.028274348700, -0.032076686500, 0.038128681100, - -0.046738202500, 0.060444527700, -0.090299385000, 0.269453183200, - 0.118781343500, -0.030894968100, 0.010978749000, -0.003129872000, - -0.000282666000, 0.001376710400, -0.000043286100, -0.003043352800}, - { -0.025109965600, 0.028194618000, -0.031994340000, 0.038028249000, - -0.046633690800, 0.060342765300, -0.090208244500, 0.269732724800, - 0.118393292300, -0.030792208700, 0.010914101700, -0.003080051000, - -0.000337127500, 0.001433304900, -0.000085506800, -0.003010799000}, - { -0.025021832500, 0.028108476700, -0.031903279600, 0.037928400600, - -0.046534338000, 0.060237393200, -0.090110535200, 0.270004747300, - 0.118009163200, -0.030704739700, 0.010859951400, -0.003028924400, - -0.000385645100, 0.001481455800, -0.000129367200, -0.002971404300}, - { -0.024945375600, 0.028016349500, -0.031801130600, 0.037824453100, - -0.046429802200, 0.060137232300, -0.090009416000, 0.270285855600, - 0.117623618000, -0.030603272900, 0.010796286200, -0.002978759900, - -0.000428383200, 0.001531519200, -0.000177806100, -0.002939110000}, - { -0.024865514300, 0.027931517600, -0.031710668200, 0.037725963100, - -0.046320155000, 0.060028342200, -0.089907403100, 0.270554278500, - 0.117240864200, -0.030515733500, 0.010742257600, -0.002927315300, - -0.000479303700, 0.001570599400, -0.000219487800, -0.002900989400}, - { -0.024784044100, 0.027845171900, -0.031606514800, 0.037619046000, - -0.046212603400, 0.059912731300, -0.089796024200, 0.270824597700, - 0.116863187300, -0.030421218200, 0.010686302700, -0.002886726400, - -0.000524060200, 0.001616196800, -0.000261546500, -0.002863090600}, - { -0.024696294000, 0.027746587900, -0.031508865800, 0.037513479000, - -0.046095149100, 0.059794346400, -0.089682984500, 0.271082832700, - 0.116487577100, -0.030338939200, 0.010637555700, -0.002840569000, - -0.000568717900, 0.001661742100, -0.000305400500, -0.002834574300}, - { -0.024614179100, 0.027660621000, -0.031405176100, 0.037406419500, - -0.045986571500, 0.059689822100, -0.089576437400, 0.271346326500, - 0.116105596800, -0.030249393200, 0.010579370800, -0.002794808000, - -0.000608943300, 0.001697477500, -0.000344868200, -0.002798079400}, - { -0.024528121700, 0.027568162200, -0.031304965400, 0.037295135500, - -0.045873231900, 0.059565965700, -0.089466219000, 0.271612337400, - 0.115727569700, -0.030164681700, 0.010528906800, -0.002747163000, - -0.000654868000, 0.001744376300, -0.000389873200, -0.002768719300}, - { -0.024437594700, 0.027478273400, -0.031210219100, 0.037192230500, - -0.045758252600, 0.059449185200, -0.089354351300, 0.271872904900, - 0.115356267200, -0.030075860600, 0.010482924400, -0.002707124200, - -0.000689215900, 0.001788462900, -0.000419849000, -0.002735490700}, - { -0.024355993600, 0.027379891900, -0.031100796100, 0.037065976700, - -0.045634938700, 0.059329528700, -0.089228688900, 0.272129953900, - 0.114983831800, -0.029994677500, 0.010435538400, -0.002661448300, - -0.000735439500, 0.001824188800, -0.000461001300, -0.002708812100}, - { -0.024270058800, 0.027286742200, -0.031000132500, 0.036954725600, - -0.045521223000, 0.059206370700, -0.089107334300, 0.272380972500, - 0.114620841300, -0.029915068400, 0.010387943600, -0.002628339500, - -0.000773306300, 0.001863568800, -0.000497529300, -0.002675426700}, - { -0.024182088200, 0.027193422300, -0.030886948300, 0.036835959600, - -0.045398291800, 0.059082508900, -0.088988209700, 0.272637989000, - 0.114246195000, -0.029830210100, 0.010335223100, -0.002588198100, - -0.000806920200, 0.001905685000, -0.000539287700, -0.002648556200}, - { -0.024087333600, 0.027097712600, -0.030784892400, 0.036723589400, - -0.045271977200, 0.058953274300, -0.088859686000, 0.272881898500, - 0.113886584200, -0.029750846500, 0.010301351000, -0.002549947700, - -0.000846562800, 0.001934940900, -0.000572476600, -0.002617432700}, - { -0.024001590900, 0.026993402700, -0.030679000400, 0.036606443900, - -0.045150554000, 0.058832779800, -0.088732072900, 0.273125908800, - 0.113513193200, -0.029676327000, 0.010252711500, -0.002513122700, - -0.000877067200, 0.001974049600, -0.000611735800, -0.002592531600}, - { -0.023913083300, 0.026898455900, -0.030563119800, 0.036484791400, - -0.045025119300, 0.058693934100, -0.088603102200, 0.273374591600, - 0.113154412600, -0.029598886400, 0.010207398600, -0.002481943700, - -0.000913965300, 0.002015094700, -0.000638597900, -0.002562081700}, - { -0.023815374100, 0.026799344000, -0.030457501700, 0.036367072300, - -0.044902786100, 0.058572790800, -0.088473828000, 0.273618006800, - 0.112791388300, -0.029513195500, 0.010165016900, -0.002444944300, - -0.000947146600, 0.002045354700, -0.000675641700, -0.002538546200}, - { -0.023725485500, 0.026701008800, -0.030349857900, 0.036247749400, - -0.044767731000, 0.058431854000, -0.088329074400, 0.273857995500, - 0.112436237300, -0.029450197300, 0.010130406600, -0.002412292800, - -0.000979178500, 0.002079209800, -0.000707489700, -0.002509178900}, - { -0.023639414500, 0.026596958900, -0.030232021100, 0.036123651800, - -0.044638462800, 0.058300810100, -0.088200445900, 0.274096422800, - 0.112076957700, -0.029366888100, 0.010090405600, -0.002377569500, - -0.001010435600, 0.002107901300, -0.000743082100, -0.002486798400}, - { -0.023547531800, 0.026496227300, -0.030121514300, 0.036000215000, - -0.044509951300, 0.058159209800, -0.088052895500, 0.274333594900, - 0.111721745400, -0.029301943900, 0.010052135800, -0.002353097400, - -0.001040420000, 0.002140548500, -0.000774072300, -0.002458072800}, - { -0.023446642300, 0.026393710400, -0.030010656200, 0.035875683000, - -0.044378805200, 0.058025057300, -0.087919930200, 0.274567466000, - 0.111361951300, -0.029228839400, 0.010016783300, -0.002322951600, - -0.001065376500, 0.002174932100, -0.000809275400, -0.002436583600}, - { -0.023356224600, 0.026296883500, -0.029893238400, 0.035750612400, - -0.044247467300, 0.057893310100, -0.087777694100, 0.274797647300, - 0.111004330000, -0.029157146400, 0.009982935500, -0.002295711000, - -0.001101449700, 0.002203852900, -0.000831096900, -0.002409751900}, - { -0.023265168600, 0.026184102500, -0.029776226200, 0.035620616000, - -0.044111852100, 0.057741079400, -0.087628679600, 0.275027780000, - 0.110654857700, -0.029083534200, 0.009941856300, -0.002266843400, - -0.001124397300, 0.002236651900, -0.000865190200, -0.002389152800}, - { -0.023164098500, 0.026080272800, -0.029663348400, 0.035494092700, - -0.043965976300, 0.057598214300, -0.087485388500, 0.275252475700, - 0.110312292600, -0.029019980500, 0.009918196800, -0.002237980900, - -0.001155997700, 0.002258762900, -0.000891896000, -0.002363396600}, - { -0.023071295000, 0.025980032600, -0.029541639900, 0.035363736500, - -0.043828523400, 0.057457528900, -0.087329639600, 0.275481985700, - 0.109957830700, -0.028949989000, 0.009886431100, -0.002211532800, - -0.001177431500, 0.002290080300, -0.000924936400, -0.002343785600}, - { -0.022977857000, 0.025877315200, -0.029428661900, 0.035236477300, - -0.043694747100, 0.057307956100, -0.087183966300, 0.275705340200, - 0.109614224000, -0.028883563000, 0.009858208200, -0.002190231800, - -0.001207356700, 0.002311491600, -0.000951184900, -0.002318342500}, - { -0.022884324300, 0.025762575100, -0.029306783100, 0.035112146900, - -0.043556341700, 0.057163011400, -0.087035380900, 0.275924294400, - 0.109260641300, -0.028826112600, 0.009821204200, -0.002164204600, - -0.001227918200, 0.002341848700, -0.000983084300, -0.002299519300}, - { -0.022782491400, 0.025659050200, -0.029181547900, 0.034977723200, - -0.043413931200, 0.057015156000, -0.086882727400, 0.276151572300, - 0.108916066600, -0.028757551100, 0.009790138000, -0.002137523800, - -0.001252260400, 0.002366059500, -0.001001252000, -0.002275798800}, - { -0.022685765900, 0.025552190100, -0.029064307100, 0.034844676000, - -0.043271529100, 0.056868813300, -0.086719885800, 0.276361694700, - 0.108569779600, -0.028692402200, 0.009764314400, -0.002119185700, - -0.001277542100, 0.002395334200, -0.001032008700, -0.002257986500}, - { -0.022589602700, 0.025445511400, -0.028946376900, 0.034711343700, - -0.043130672100, 0.056708946400, -0.086558899300, 0.276581678800, - 0.108230473600, -0.028628118700, 0.009738656200, -0.002099057700, - -0.001292564500, 0.002420334600, -0.001056977600, -0.002234052300}, - { -0.022496001600, 0.025344724600, -0.028822677500, 0.034577788700, - -0.042988680400, 0.056561115200, -0.086406171500, 0.276798805200, - 0.107884769000, -0.028567755500, 0.009710099800, -0.002074387600, - -0.001314845000, 0.002440979000, -0.001085689500, -0.002217436800}, - { -0.022394383100, 0.025226614100, -0.028700012900, 0.034439922500, - -0.042840028100, 0.056405162700, -0.086243310500, 0.277004327300, - 0.107550806200, -0.028506052900, 0.009685232500, -0.002068874300, - -0.001333423100, 0.002464213000, -0.001108669600, -0.002195061100}, - { -0.022297564100, 0.025119808500, -0.028581781400, 0.034305305000, - -0.042695656200, 0.056253954500, -0.086083834300, 0.277226300200, - 0.107203619900, -0.028443348800, 0.009654833100, -0.002042234800, - -0.001358263800, 0.002489758900, -0.001130552500, -0.002179375900}, - { -0.022199944300, 0.025011964800, -0.028462099000, 0.034168711000, - -0.042548622300, 0.056098971500, -0.085921130000, 0.277432448700, - 0.106864987700, -0.028388245500, 0.009632664400, -0.002024860800, - -0.001370844300, 0.002512274500, -0.001153285000, -0.002157159200}, - { -0.022094548100, 0.024903208900, -0.028330041100, 0.034025320000, - -0.042394273800, 0.055936365900, -0.085747792700, 0.277639650500, - 0.106531925400, -0.028326674100, 0.009610046500, -0.002009028700, - -0.001396393300, 0.002530754500, -0.001179865400, -0.002142396800}, - { -0.021995201800, 0.024793027300, -0.028206269200, 0.033896113600, - -0.042248483600, 0.055780937400, -0.085583072500, 0.277843916500, - 0.106192034600, -0.028266589600, 0.009595095600, -0.001993279700, - -0.001408007500, 0.002552535400, -0.001202056000, -0.002120617500}, - { -0.021901583000, 0.024677037500, -0.028084273300, 0.033757782300, - -0.042099685900, 0.055624216900, -0.085416983300, 0.278047516100, - 0.105852072900, -0.028207292800, 0.009568367500, -0.001970246700, - -0.001429511100, 0.002575063400, -0.001221321700, -0.002106926400}, - { -0.021801611400, 0.024565652100, -0.027960051300, 0.033615404000, - -0.041944857600, 0.055460095600, -0.085239563600, 0.278250526200, - 0.105517476900, -0.028154247100, 0.009549327200, -0.001957811700, - -0.001451556400, 0.002589582900, -0.001241753500, -0.002086264900}, - { -0.021699539700, 0.024460899000, -0.027831832100, 0.033477267300, - -0.041798158600, 0.055292010700, -0.085067297700, 0.278450786400, - 0.105189430300, -0.028099508700, 0.009524686500, -0.001949621100, - -0.001461338600, 0.002611261800, -0.001266673600, -0.002073264900}, - { -0.021599986800, 0.024350066900, -0.027708847400, 0.033335865400, - -0.041644581200, 0.055128391400, -0.084889121800, 0.278653475900, - 0.104851735700, -0.028039339300, 0.009510206500, -0.001933711100, - -0.001475643600, 0.002624167700, -0.001286367400, -0.002053034800}, - { -0.021501456000, 0.024240038400, -0.027586029200, 0.033194974400, - -0.041491644800, 0.054965250700, -0.084713840400, 0.278849784900, - 0.104526215400, -0.027986541700, 0.009490451500, -0.001918547800, - -0.001486507400, 0.002645934000, -0.001311257700, -0.002040050600}, - { -0.021403770100, 0.024118477100, -0.027455391500, 0.033058704200, - -0.041335183200, 0.054809534600, -0.084538637100, 0.279042526200, - 0.104190543900, -0.027927521300, 0.009462422300, -0.001906698600, - -0.001502518600, 0.002663196100, -0.001323447400, -0.002021097800}, - { -0.021298248700, 0.024009912800, -0.027321991400, 0.032911712700, - -0.041174711300, 0.054635449300, -0.084361255500, 0.279243346600, - 0.103861290100, -0.027880462700, 0.009455425900, -0.001900093500, - -0.001518047500, 0.002684579000, -0.001347505300, -0.002009220500}, - { -0.021198957800, 0.023898644100, -0.027197497600, 0.032768596100, - -0.041018806300, 0.054468678800, -0.084179631800, 0.279432441200, - 0.103538923200, -0.027828661600, 0.009436950100, -0.001885898300, - -0.001530065500, 0.002695060500, -0.001364801200, -0.001990835900}, - { -0.021097697500, 0.023785545000, -0.027071437200, 0.032621932300, - -0.040870290800, 0.054302452500, -0.083997214900, 0.279619234800, - 0.103205041100, -0.027767473800, 0.009419594300, -0.001879709700, - -0.001538161700, 0.002715202100, -0.001388824500, -0.001978335000}, - { -0.020996580900, 0.023672059200, -0.026941818000, 0.032485359700, - -0.040714985700, 0.054134314800, -0.083810986900, 0.279815921900, - 0.102875847200, -0.027719967200, 0.009399847000, -0.001863555500, - -0.001552949300, 0.002731039900, -0.001399562800, -0.001960990100}, - { -0.020894037400, 0.023552023700, -0.026814717500, 0.032339646100, - -0.040555637300, 0.053961014100, -0.083632987700, 0.280004451900, - 0.102547554800, -0.027669483100, 0.009389127400, -0.001850389700, - -0.001565501700, 0.002743236000, -0.001421126700, -0.001950196300}, - { -0.020796180800, 0.023444081100, -0.026681026200, 0.032192706400, - -0.040395032300, 0.053787235200, -0.083442004400, 0.280184129200, - 0.102229591200, -0.027619025000, 0.009370146400, -0.001848435300, - -0.001568643300, 0.002757857900, -0.001437420100, -0.001933077600}, - { -0.020695687800, 0.023331738800, -0.026554662000, 0.032046118400, - -0.040233651400, 0.053610471900, -0.083256870000, 0.280377353300, - 0.101900357800, -0.027567373500, 0.009358983900, -0.001835136600, - -0.001581275300, 0.002770198900, -0.001459273400, -0.001922140900}, - { -0.020596163500, 0.023219719400, -0.026426870800, 0.031911263600, - -0.040078628800, 0.053441716200, -0.083070602600, 0.280564653200, - 0.101581276800, -0.027518324200, 0.009347882600, -0.001837111200, - -0.001593896400, 0.002791306400, -0.001469185600, -0.001906217800}, - { -0.020486105200, 0.023102669400, -0.026295748600, 0.031757335000, - -0.039919465700, 0.053275619900, -0.082878251100, 0.280742505700, - 0.101258880600, -0.027473598000, 0.009331442300, -0.001823983800, - -0.001605491000, 0.002802122100, -0.001489715900, -0.001896148500}, - { -0.020386038100, 0.022990763600, -0.026169842500, 0.031611536400, - -0.039758154000, 0.053098254300, -0.082692676700, 0.280922614500, - 0.100932867600, -0.027421788700, 0.009318026600, -0.001820868000, - -0.001613216100, 0.002809677500, -0.001504548000, -0.001879711300}, - { -0.020285435000, 0.022877455000, -0.026042393200, 0.031463335700, - -0.039594468800, 0.052919415400, -0.082490397700, 0.281103932300, - 0.100609916000, -0.027373640000, 0.009311303900, -0.001812957700, - -0.001617884900, 0.002826213600, -0.001525588000, -0.001869926500}, - { -0.020192073400, 0.022761936700, -0.025903756400, 0.031323202100, - -0.039434316600, 0.052741885600, -0.082304345000, 0.281286138200, - 0.100291413500, -0.027321921500, 0.009296869200, -0.001808517000, - -0.001627660100, 0.002838490600, -0.001533110500, -0.001855192900}, - { -0.020082641400, 0.022645343300, -0.025773553200, 0.031169977600, - -0.039274706000, 0.052574179500, -0.082107814900, 0.281460005200, - 0.099967050900, -0.027269207300, 0.009282507800, -0.001804192200, - -0.001636760100, 0.002847881000, -0.001552740800, -0.001845760100}, - { -0.019981165400, 0.022530400400, -0.025642740200, 0.031017613200, - -0.039105374000, 0.052385802800, -0.081905722200, 0.281637176300, - 0.099657892600, -0.027230252500, 0.009272886300, -0.001799068700, - -0.001637727000, 0.002860056400, -0.001566710200, -0.001830818000}, - { -0.019880568400, 0.022416781800, -0.025512202200, 0.030878936400, - -0.038945254600, 0.052207335300, -0.081716496200, 0.281816351400, - 0.099338786400, -0.027175974500, 0.009256393500, -0.001792635900, - -0.001649711300, 0.002875237500, -0.001579820600, -0.001822507700}, - { -0.019782364100, 0.022306311600, -0.025387269800, 0.030733042100, - -0.038783583100, 0.052030462600, -0.081515568600, 0.281989192800, - 0.099021663300, -0.027135898100, 0.009251959300, -0.001785903000, - -0.001655707600, 0.002880377400, -0.001592362400, -0.001808127200}, - { -0.019671249500, 0.022187350300, -0.025253455800, 0.030574773900, - -0.038616812900, 0.051850662000, -0.081315971000, 0.282153907600, - 0.098702548800, -0.027086143300, 0.009241521900, -0.001786417100, - -0.001657398400, 0.002894723100, -0.001611646700, -0.001799471600}, - { -0.019570606700, 0.022073795700, -0.025122240000, 0.030434707800, - -0.038454440300, 0.051668545300, -0.081120147400, 0.282326299200, - 0.098383808800, -0.027042545900, 0.009231168400, -0.001786186700, - -0.001662356200, 0.002899683900, -0.001624082400, -0.001785075000}, - { -0.019479635100, 0.021960407900, -0.024988398200, 0.030286004000, - -0.038289759200, 0.051487224000, -0.080910856000, 0.282503350600, - 0.098066057000, -0.026984567000, 0.009223573800, -0.001783286000, - -0.001671632200, 0.002912741900, -0.001635839700, -0.001778008400}, - { -0.019377155600, 0.021844654800, -0.024856282600, 0.030128070300, - -0.038122909500, 0.051306676900, -0.080708954700, 0.282668132600, - 0.097753369800, -0.026946759500, 0.009222427700, -0.001780604500, - -0.001670895300, 0.002923256000, -0.001648349000, -0.001764156100}, - { -0.019269257400, 0.021728932000, -0.024723351000, 0.029986133000, - -0.037958156200, 0.051121120600, -0.080507440900, 0.282834989500, - 0.097436064800, -0.026902305100, 0.009211401200, -0.001779605600, - -0.001677015500, 0.002930209300, -0.001665754600, -0.001756624600}, - { -0.019170951200, 0.021617945900, -0.024597228000, 0.029837934200, - -0.037790101700, 0.050945404700, -0.080311308100, 0.283008922400, - 0.097122904600, -0.026855831200, 0.009197158400, -0.001772074700, - -0.001678044700, 0.002939243500, -0.001670904800, -0.001743866400}, - { -0.019071619200, 0.021505473200, -0.024469290200, 0.029686120900, - -0.037632549500, 0.050764840500, -0.080100778400, 0.283171957600, - 0.096806832700, -0.026811221400, 0.009186304800, -0.001771162500, - -0.001683731000, 0.002945624400, -0.001687977400, -0.001736577200}, - { -0.018968488000, 0.021388132400, -0.024333413500, 0.029538083300, - -0.037457346700, 0.050578218900, -0.079887593500, 0.283337590700, - 0.096492955100, -0.026767354800, 0.009192163800, -0.001770832400, - -0.001681516300, 0.002955079600, -0.001699869700, -0.001723295500}, - { -0.018862478100, 0.021274150600, -0.024204158900, 0.029384739600, - -0.037297550600, 0.050392415300, -0.079683587600, 0.283504106100, - 0.096183264500, -0.026722407800, 0.009180232100, -0.001768308200, - -0.001689724600, 0.002967018600, -0.001710235900, -0.001717442700}, - { -0.018761561600, 0.021159356200, -0.024070689600, 0.029241121700, - -0.037129754000, 0.050201664600, -0.079472717100, 0.283660491100, - 0.095870802000, -0.026679621900, 0.009171925300, -0.001770702400, - -0.001691965100, 0.002969448100, -0.001720493300, -0.001704658800}, - { -0.018668595300, 0.021041132500, -0.023942524200, 0.029090435800, - -0.036957408700, 0.050019918900, -0.079266196800, 0.283824708400, - 0.095561100700, -0.026630607200, 0.009168743300, -0.001772231300, - -0.001696435000, 0.002974894800, -0.001736659300, -0.001698209200}, - { -0.018571534300, 0.020933121700, -0.023805663500, 0.028933443100, - -0.036793287300, 0.049827569900, -0.079052887900, 0.283981176300, - 0.095258665900, -0.026591723800, 0.009164052800, -0.001778570200, - -0.001691727400, 0.002982552200, -0.001746931600, -0.001686115500}, - { -0.018463951300, 0.020817422100, -0.023671874000, 0.028788840800, - -0.036622085000, 0.049644890900, -0.078843755900, 0.284139414500, - 0.094937302500, -0.026549370400, 0.009150120900, -0.001771057900, - -0.001693172900, 0.002992954400, -0.001756770400, -0.001680418200}, - { -0.018364139000, 0.020703740000, -0.023541974700, 0.028632330500, - -0.036454574300, 0.049461377000, -0.078632258000, 0.284297024000, - 0.094630560000, -0.026501577500, 0.009148770700, -0.001774906500, - -0.001694643800, 0.002994642500, -0.001766316400, -0.001668313800}, - { -0.018266186600, 0.020592415900, -0.023412213700, 0.028492007500, - -0.036289687800, 0.049272679100, -0.078421164800, 0.284457324700, - 0.094316696700, -0.026457830700, 0.009146283300, -0.001777143500, - -0.001698314300, 0.002999487700, -0.001781999900, -0.001662265200}, - { -0.018165847100, 0.020477739000, -0.023280404100, 0.028333282800, - -0.036119295000, 0.049084885500, -0.078204266000, 0.284608657200, - 0.094014760000, -0.026416553200, 0.009139701600, -0.001781460200, - -0.001696266500, 0.003012636900, -0.001785770200, -0.001651378600}, - { -0.018061008600, 0.020364436200, -0.023149218600, 0.028191490700, - -0.035952564600, 0.048893523500, -0.077988760200, 0.284764041400, - 0.093702911100, -0.026373328800, 0.009137987500, -0.001784607900, - -0.001699031600, 0.003016678700, -0.001800824700, -0.001645793200}, - { -0.017963440300, 0.020253539400, -0.023021819100, 0.028040064200, - -0.035778114400, 0.048706755700, -0.077771874700, 0.284916529600, - 0.093393907400, -0.026335334700, 0.009129169500, -0.001782780900, - -0.001693615300, 0.003016455700, -0.001809252200, -0.001634392700}, - { -0.017864500900, 0.020140353900, -0.022889140600, 0.027892719100, - -0.035614488000, 0.048525355700, -0.077560338000, 0.285077698000, - 0.093086772800, -0.026290376100, 0.009124974400, -0.001782837800, - -0.001700124000, 0.003027010500, -0.001818503700, -0.001629703000}, - { -0.017767797800, 0.020029767800, -0.022762632500, 0.027742539400, - -0.035443127000, 0.048328815000, -0.077336969100, 0.285223614300, - 0.092784329800, -0.026242686200, 0.009124739900, -0.001788644700, - -0.001699564500, 0.003026957800, -0.001826555800, -0.001618684700}, - { -0.017673081200, 0.019908421800, -0.022626375700, 0.027591688900, - -0.035275280700, 0.048141797500, -0.077116537300, 0.285372738700, - 0.092474868600, -0.026199049700, 0.009123179000, -0.001792125700, - -0.001701864700, 0.003030366000, -0.001841112200, -0.001613422400}, - { -0.017567749800, 0.019794038100, -0.022494731800, 0.027432475300, - -0.035103343800, 0.047947719600, -0.076901860200, 0.285524247500, - 0.092174773000, -0.026162495500, 0.009115656500, -0.001791780100, - -0.001692544800, 0.003041601400, -0.001843678200, -0.001603558400}, - { -0.017470863500, 0.019683203200, -0.022364869500, 0.027291613500, - -0.034936118500, 0.047753629900, -0.076679031600, 0.285671811500, - 0.091863686900, -0.026115241800, 0.009107820400, -0.001801618700, - -0.001693384100, 0.003044500800, -0.001858063000, -0.001598323500}, - { -0.017374543300, 0.019573449500, -0.022237957200, 0.027136848800, - -0.034768617100, 0.047567511000, -0.076458633000, 0.285823700200, - 0.091556728800, -0.026079677000, 0.009109488100, -0.001807759500, - -0.001692821000, 0.003044301800, -0.001865780400, -0.001587867000}, - { -0.017278016500, 0.019462639700, -0.022107866200, 0.026994361100, - -0.034597273100, 0.047381154500, -0.076238222500, 0.285975563800, - 0.091251439600, -0.026032138000, 0.009103004000, -0.001803039800, - -0.001692015100, 0.003052700600, -0.001873935800, -0.001583828300}, - { -0.017174506000, 0.019350009900, -0.021978862300, 0.026838198900, - -0.034430712700, 0.047182370700, -0.076007137400, 0.286112971700, - 0.090946916500, -0.025990224500, 0.009104300700, -0.001810064900, - -0.001690153500, 0.003051424200, -0.001880890400, -0.001573670100}, - { -0.017077386900, 0.019238909500, -0.021847402400, 0.026693327400, - -0.034255105000, 0.046987841400, -0.075788745300, 0.286262228400, - 0.090639789400, -0.025952532400, 0.009104248700, -0.001814795900, - -0.001691600600, 0.003054176700, -0.001894703800, -0.001569153000}, - { -0.016981596000, 0.019128983200, -0.021720457700, 0.026538690300, - -0.034087052200, 0.046799004200, -0.075562967900, 0.286407594900, - 0.090337279400, -0.025905423200, 0.009096027200, -0.001821529400, - -0.001680332600, 0.003064309200, -0.001896839700, -0.001559561500}, - { -0.016884247400, 0.019017118400, -0.021587898200, 0.026389844800, - -0.033919719800, 0.046610354100, -0.075335881700, 0.286552421600, - 0.090031502000, -0.025867448300, 0.009095852900, -0.001826242300, - -0.001681411600, 0.003066530900, -0.001910366600, -0.001555232200}, - { -0.016783704800, 0.018907663300, -0.021462324800, 0.026239733700, - -0.033746731200, 0.046405855900, -0.075110245000, 0.286693376000, - 0.089731283500, -0.025821879500, 0.009092452800, -0.001825134600, - -0.001676528000, 0.003070488600, -0.001910937800, -0.001546377000}, - { -0.016688282800, 0.018797704300, -0.021331826000, 0.026093533900, - -0.033581867500, 0.046219477100, -0.074884840400, 0.286843179800, - 0.089429913200, -0.025781349400, 0.009085971800, -0.001835675000, - -0.001676580800, 0.003072425300, -0.001924344300, -0.001542197500}, - { -0.016594569100, 0.018690756000, -0.021207672000, 0.025943420100, - -0.033404937000, 0.046023517900, -0.074664683000, 0.286977836300, - 0.089126683900, -0.025743532000, 0.009086549100, -0.001841296500, - -0.001676983800, 0.003074065100, -0.001937151500, -0.001538275800}, - { -0.016498716200, 0.018580469200, -0.021077164200, 0.025796245500, - -0.033239161900, 0.045835202700, -0.074435467900, 0.287119707900, - 0.088817903900, -0.025695953100, 0.009088750200, -0.001840528300, - -0.001672419000, 0.003078214900, -0.001938044200, -0.001529263800}, - { -0.016399128000, 0.018471685500, -0.020951717000, 0.025642665600, - -0.033070898400, 0.045645401700, -0.074204448300, 0.287263294400, - 0.088518791800, -0.025655699800, 0.009083077500, -0.001851968500, - -0.001671519700, 0.003079287600, -0.001950784000, -0.001525545100}, - { -0.016303461100, 0.018361514000, -0.020820608400, 0.025497283800, - -0.032893481400, 0.045445650100, -0.073974168600, 0.287398826600, - 0.088215611900, -0.025616230100, 0.009082036700, -0.001853404200, - -0.001663416900, 0.003076434500, -0.001956698100, -0.001516114100}, - { -0.016215838300, 0.018247246600, -0.020690412400, 0.025351871200, - -0.032729171400, 0.045259152900, -0.073748515200, 0.287535419700, - 0.087916911500, -0.025573878100, 0.009073875600, -0.001862252200, - -0.001665725900, 0.003083968700, -0.001963597200, -0.001513327100}, - { -0.016122658700, 0.018140302000, -0.020565897500, 0.025198358100, - -0.032563221800, 0.045054475300, -0.073516228400, 0.287669639200, - 0.087611730400, -0.025527589100, 0.009078560600, -0.001864713500, - -0.001657013000, 0.003080858100, -0.001969379300, -0.001503969900}, - { -0.016030164800, 0.018033299200, -0.020438589400, 0.025057752300, - -0.032390709200, 0.044862930000, -0.073281372400, 0.287808844900, - 0.087312662900, -0.025484515600, 0.009070381000, -0.001873996900, - -0.001658952100, 0.003088203600, -0.001976310900, -0.001501262300}, - { -0.015931594800, 0.017925901000, -0.020314095600, 0.024903471000, - -0.032220613500, 0.044666232000, -0.073051883700, 0.287948850700, - 0.087007865500, -0.025444714700, 0.009076396600, -0.001876815400, - -0.001650306000, 0.003085015800, -0.001981877500, -0.001492305300}, - { -0.015837646000, 0.017817156300, -0.020183755000, 0.024755980300, - -0.032052144100, 0.044470365700, -0.072825294900, 0.288078851000, - 0.086711998100, -0.025403194900, 0.009070080400, -0.001888369000, - -0.001648979900, 0.003085609100, -0.001993991000, -0.001488858500}, - { -0.015745786000, 0.017710651600, -0.020057087700, 0.024614982500, - -0.031879037500, 0.044276425800, -0.072585572700, 0.288212217900, - 0.086414765800, -0.025357212300, 0.009074959300, -0.001891836000, - -0.001636592700, 0.003094108300, -0.001994653500, -0.001480767400}, - { -0.015654004700, 0.017605115800, -0.019933041100, 0.024461035300, - -0.031707875300, 0.044077625700, -0.072351635400, 0.288347603800, - 0.086112304400, -0.025320844800, 0.009069894600, -0.001903992100, - -0.001634855100, 0.003094518400, -0.002006818100, -0.001477449400}, - { -0.015556426100, 0.017497985500, -0.019805930700, 0.024316777100, - -0.031543979900, 0.043889313200, -0.072118967800, 0.288475887700, - 0.085809125600, -0.025278532500, 0.009073340000, -0.001904355000, - -0.001629128000, 0.003097408700, -0.002006309300, -0.001469685300}, - { -0.015464035900, 0.017390367400, -0.019676404700, 0.024169673500, - -0.031375546100, 0.043691563100, -0.071884560100, 0.288613216300, - 0.085517904200, -0.025234780000, 0.009063993200, -0.001909503200, - -0.001621883700, 0.003096710200, -0.002018075200, -0.001466497000}, - { -0.015372811900, 0.017282467800, -0.019563622700, 0.024025743900, - -0.031201529400, 0.043494252000, -0.071653858800, 0.288739140200, - 0.085215783300, -0.025192315000, 0.009065729600, -0.001924642300, - -0.001617413500, 0.003093622800, -0.002023130000, -0.001457861300}, - { -0.015281581500, 0.017176704600, -0.019436707600, 0.023880818700, - -0.031035919800, 0.043302468300, -0.071411887600, 0.288870320800, - 0.084911325500, -0.025147413900, 0.009067220900, -0.001923185400, - -0.001613820700, 0.003099574200, -0.002029502500, -0.001455518600}, - { -0.015190068200, 0.017070271400, -0.019307909900, 0.023733865500, - -0.030866540700, 0.043102902900, -0.071173336500, 0.289002944200, - 0.084617972200, -0.025112304400, 0.009063501400, -0.001937412700, - -0.001609315800, 0.003096284800, -0.002034312100, -0.001447330000}, - { -0.015095192700, 0.016966497900, -0.019187203800, 0.023583328300, - -0.030698827600, 0.042906585900, -0.070941485100, 0.289127389400, - 0.084313384800, -0.025064553400, 0.009058701400, -0.001941756600, - -0.001604479400, 0.003101858000, -0.002040355800, -0.001445044100}, - { -0.015005498900, 0.016861988700, -0.019061283500, 0.023439043400, - -0.030533338900, 0.042714039500, -0.070696301300, 0.289257793800, - 0.084018453400, -0.025022964500, 0.009063774800, -0.001944654100, - -0.001595199500, 0.003097508000, -0.002044866400, -0.001436913900}, - { -0.014917519700, 0.016759937100, -0.018938392400, 0.023301552900, - -0.030361552500, 0.042516727200, -0.070462608200, 0.289383840200, - 0.083722905800, -0.024979066000, 0.009063562600, -0.001958070000, - -0.001592655700, 0.003097143300, -0.002056302800, -0.001434061400}, - { -0.014829329300, 0.016657963500, -0.018818329000, 0.023150063400, - -0.030188546200, 0.042326526200, -0.070230755300, 0.289510095600, - 0.083425985400, -0.024932767200, 0.009060147700, -0.001964069200, - -0.001585752700, 0.003099557300, -0.002055331700, -0.001426747600}, - { -0.014740487700, 0.016554974400, -0.018693430700, 0.023006696000, - -0.030022736600, 0.042129344000, -0.069991474400, 0.289643060400, - 0.083121682100, -0.024891262300, 0.009057517500, -0.001970699600, - -0.001577810900, 0.003098336700, -0.002066861800, -0.001423747700}, - { -0.014646034300, 0.016450370300, -0.018567891400, 0.022863023200, - -0.029856412200, 0.041932542200, -0.069755255200, 0.289764874500, - 0.082826383600, -0.024845070000, 0.009054717400, -0.001980678900, - -0.001582625700, 0.003096053600, -0.002064831500, -0.001416907600}, - { -0.014559627800, 0.016349891900, -0.018449559000, 0.022713561300, - -0.029689051900, 0.041737590700, -0.069503998900, 0.289888685100, - 0.082532448100, -0.024801087800, 0.009058174200, -0.001982046700, - -0.001575159300, 0.003094262100, -0.002075770200, -0.001414337900}, - { -0.014471061400, 0.016243913500, -0.018334760000, 0.022579662500, - -0.029519935000, 0.041541189800, -0.069267292000, 0.290011569200, - 0.082230235800, -0.024758694700, 0.009055155500, -0.001988704700, - -0.001567128600, 0.003092724100, -0.002086898100, -0.001411478900}, - { -0.014383790400, 0.016142525900, -0.018211358000, 0.022437490000, - -0.029354488900, 0.041343948500, -0.069028755000, 0.290131292800, - 0.081930443400, -0.024718526100, 0.009055027000, -0.002001893100, - -0.001564993600, 0.003095765300, -0.002085806300, -0.001404564500}, - { -0.014297586900, 0.016042263500, -0.018092816300, 0.022287585300, - -0.029185104300, 0.041142095700, -0.068780397800, 0.290253164200, - 0.081635398000, -0.024670766100, 0.009051397000, -0.002008669700, - -0.001556387000, 0.003093691000, -0.002096680100, -0.001401882300}, - { -0.014206281900, 0.015941116300, -0.017970542200, 0.022146976500, - -0.029021815100, 0.040946718000, -0.068542945900, 0.290377478100, - 0.081340267800, -0.024629081800, 0.009048347000, -0.002014963700, - -0.001548946600, 0.003095699600, -0.002095226400, -0.001395190900}, - { -0.014118938600, 0.015839406100, -0.017846481100, 0.022002842700, - -0.028850387900, 0.040754474000, -0.068302308800, 0.290494347700, - 0.081040072300, -0.024586190700, 0.009045183800, -0.002021575300, - -0.001540744900, 0.003093740800, -0.002106039500, -0.001392505100}, - { -0.014033359700, 0.015739387800, -0.017724211200, 0.021861411400, - -0.028685336800, 0.040555731500, -0.068055928700, 0.290621547300, - 0.080744453800, -0.024543547500, 0.009041815800, -0.002027861900, - -0.001533174400, 0.003095698800, -0.002104702000, -0.001385829000}, - { -0.013950756900, 0.015643569600, -0.017610720400, 0.021716480000, - -0.028520619600, 0.040359106100, -0.067815030400, 0.290742857900, - 0.080448884900, -0.024496193000, 0.009046978300, -0.002042499600, - -0.001529706600, 0.003094623000, -0.002115681000, -0.001383359700}, - { -0.013857978600, 0.015536744300, -0.017494757400, 0.021577567700, - -0.028357551400, 0.040162405000, -0.067572563200, 0.290861113600, - 0.080155270500, -0.024453193600, 0.009043386000, -0.002048697200, - -0.001522077700, 0.003096377800, -0.002113994500, -0.001376849300}, - { -0.013773229200, 0.015437926100, -0.017374226900, 0.021440417100, - -0.028180320800, 0.039967168700, -0.067326482200, 0.290971758300, - 0.079856769100, -0.024409237700, 0.009039889200, -0.002055553100, - -0.001513509600, 0.003093955600, -0.002124476100, -0.001374342300}, - { -0.013689059900, 0.015339335300, -0.017253688600, 0.021300179900, - -0.028015676300, 0.039767446600, -0.067075438600, 0.291093788100, - 0.079560972200, -0.024359858000, 0.009042893100, -0.002064956100, - -0.001502425900, 0.003088564100, -0.002128108700, -0.001366787300}, - { -0.013608286800, 0.015245837400, -0.017142104300, 0.021157264500, - -0.027853162500, 0.039572395400, -0.066833494600, 0.291213669600, - 0.079258669800, -0.024318259900, 0.009036431600, -0.002066451500, - -0.001504139700, 0.003088416900, -0.002132688700, -0.001365518600}, - { -0.013526024300, 0.015149195700, -0.017023199600, 0.021019023100, - -0.027690881700, 0.039375542700, -0.066588317200, 0.291332516600, - 0.078972791400, -0.024276630700, 0.009034254800, -0.002074639200, - -0.001493462900, 0.003082938500, -0.002135814900, -0.001358430400}, - { -0.013436720300, 0.015049535100, -0.016902143900, 0.020877384400, - -0.027520351800, 0.039182293600, -0.066341740000, 0.291445410400, - 0.078678890800, -0.024226476800, 0.009036993800, -0.002087255200, - -0.001492702300, 0.003088470800, -0.002141367000, -0.001357082800}, - { -0.013351892900, 0.014946715800, -0.016789045200, 0.020740566100, - -0.027358305900, 0.038984672800, -0.066093324400, 0.291557196100, - 0.078381474100, -0.024188073400, 0.009035188200, -0.002095570400, - -0.001481921800, 0.003082911700, -0.002144524900, -0.001349842500}, - { -0.013270943900, 0.014852276800, -0.016672927800, 0.020605326600, - -0.027198631300, 0.038789809200, -0.065848400700, 0.291673553600, - 0.078077054200, -0.024136747400, 0.009027973200, -0.002105937200, - -0.001475208500, 0.003087524600, -0.002150215500, -0.001348116400}, - { -0.013190641200, 0.014758176300, -0.016560228700, 0.020459538900, - -0.027027766200, 0.038596149400, -0.065599338300, 0.291786795400, - 0.077792721000, -0.024094239400, 0.009025651700, -0.002114130700, - -0.001464447200, 0.003081710900, -0.002153019500, -0.001341225900}, - { -0.013110011800, 0.014663919000, -0.016444050200, 0.020323488600, - -0.026866946500, 0.038399388600, -0.065350608700, 0.291898436700, - 0.077491289100, -0.024045414700, 0.009025408000, -0.002119522600, - -0.001458535300, 0.003086316400, -0.002158494200, -0.001339767200}, - { -0.013025077600, 0.014569262800, -0.016328233200, 0.020188140300, - -0.026707041800, 0.038203933500, -0.065102449400, 0.292014040700, - 0.077196425000, -0.023998381000, 0.009026360900, -0.002125747900, - -0.001454699900, 0.003075666900, -0.002160549700, -0.001332912300}, - { -0.012943770500, 0.014473806100, -0.016209483700, 0.020047933100, - -0.026536730800, 0.038005130000, -0.064858733100, 0.292129090700, - 0.076903557900, -0.023957398700, 0.009021448800, -0.002130265600, - -0.001449188900, 0.003080409800, -0.002165817700, -0.001331821400}, - { -0.012862479300, 0.014374613700, -0.016100609100, 0.019915634000, - -0.026378597000, 0.037810235300, -0.064609585900, 0.292243989500, - 0.076607212500, -0.023906702500, 0.009015226300, -0.002142422000, - -0.001439416300, 0.003077588100, -0.002176246500, -0.001329411400}, - { -0.012776898100, 0.014287400700, -0.015987370400, 0.019781456700, - -0.026218842900, 0.037613307800, -0.064357589600, 0.292354833000, - 0.076314227000, -0.023860018100, 0.009017528200, -0.002151344500, - -0.001428408900, 0.003071783900, -0.002179145600, -0.001322405100}, - { -0.012699499300, 0.014196955700, -0.015878862800, 0.019639469300, - -0.026050975100, 0.037421391100, -0.064106762900, 0.292466530500, - 0.076019700600, -0.023810871100, 0.009017151300, -0.002156670200, - -0.001422547300, 0.003076233500, -0.002184458600, -0.001321218400}, - { -0.012616476800, 0.014104155900, -0.015764904400, 0.019506037600, - -0.025892093800, 0.037225319700, -0.063853917500, 0.292576319400, - 0.075724712100, -0.023759323400, 0.009010001600, -0.002167557500, - -0.001417698000, 0.003065150800, -0.002186268300, -0.001314354900}, - { -0.012537078000, 0.014007257400, -0.015657767200, 0.019375159900, - -0.025735481500, 0.037031767000, -0.063607547900, 0.292680753800, - 0.075427591700, -0.023721555300, 0.009004937300, -0.002171714300, - -0.001412157700, 0.003069674600, -0.002191380800, -0.001313321900}, - { -0.012457823800, 0.013913853300, -0.015541317500, 0.019236546600, - -0.025565504100, 0.036831074500, -0.063356530800, 0.292786821600, - 0.075136252200, -0.023673990600, 0.009007040500, -0.002180765400, - -0.001401081300, 0.003063717500, -0.002193998000, -0.001306486000}, - { -0.012381206600, 0.013823584100, -0.015429059800, 0.019104315500, - -0.025407276700, 0.036634397500, -0.063101285300, 0.292893802300, - 0.074841359700, -0.023620522900, 0.008998337100, -0.002190657800, - -0.001393998700, 0.003067771800, -0.002199287800, -0.001305173000}, - { -0.012304800000, 0.013733603800, -0.015316494200, 0.018970177400, - -0.025242884300, 0.036443834300, -0.062848029800, 0.293006277700, - 0.074548400000, -0.023577987000, 0.009001070400, -0.002199540200, - -0.001383193600, 0.003061911500, -0.002201990500, -0.001298486200}, - { -0.012231594800, 0.013648384700, -0.015213765300, 0.018835062100, - -0.025085987100, 0.036250520900, -0.062599496300, 0.293108050300, - 0.074248575600, -0.023530332000, 0.008998523600, -0.002201711800, - -0.001384640400, 0.003061515200, -0.002206188900, -0.001297565000}, - { -0.012146903000, 0.013548919900, -0.015104288800, 0.018700312600, - -0.024918766800, 0.036051519300, -0.062347556700, 0.293216599600, - 0.073961694600, -0.023479470700, 0.008992759700, -0.002215250000, - -0.001372665000, 0.003055268400, -0.002208668300, -0.001290828100}, - { -0.012072689000, 0.013461432300, -0.014994590500, 0.018570057000, - -0.024762400200, 0.035856112000, -0.062091368600, 0.293326498300, - 0.073667719600, -0.023433472500, 0.008991998000, -0.002220358400, - -0.001366666100, 0.003059661400, -0.002213970900, -0.001289852900}, - { -0.011998777300, 0.013374412100, -0.014885760000, 0.018440114900, - -0.024601980400, 0.035669418700, -0.061843667600, 0.293431988400, - 0.073372194300, -0.023379395200, 0.008991178300, -0.002234495000, - -0.001354819600, 0.003053533900, -0.002216603000, -0.001282913700}, - { -0.011922344800, 0.013284279500, -0.014771995300, 0.018300582900, - -0.024446846900, 0.035466290700, -0.061588331200, 0.293533527800, - 0.073072951600, -0.023330451200, 0.008988073400, -0.002236664600, - -0.001356054900, 0.003053154500, -0.002220878800, -0.001282008300}, - { -0.011845461600, 0.013189357000, -0.014666643200, 0.018169987600, - -0.024284154200, 0.035275317400, -0.061329463600, 0.293638750200, - 0.072780111500, -0.023282772800, 0.008982191000, -0.002249832100, - -0.001344236100, 0.003046802300, -0.002223339400, -0.001275293500}, - { -0.011769115200, 0.013103666900, -0.014559744600, 0.018043115400, - -0.024131925000, 0.035084175400, -0.061079622500, 0.293746271400, - 0.072492005600, -0.023234912400, 0.008978152700, -0.002247134700, - -0.001333772300, 0.003050212200, -0.002228201400, -0.001274483600}, - { -0.011694882200, 0.013015910500, -0.014448925000, 0.017910112100, - -0.023966290300, 0.034885265900, -0.060823698800, 0.293850684700, - 0.072198731500, -0.023185828700, 0.008970913900, -0.002258841200, - -0.001323837000, 0.003046799700, -0.002238111400, -0.001272408000}, - { -0.011623815900, 0.012932068300, -0.014343601700, 0.017784544000, - -0.023814273900, 0.034693878200, -0.060571265600, 0.293950616300, - 0.071902922400, -0.023127290700, 0.008965455900, -0.002267675400, - -0.001322245300, 0.003043324900, -0.002234895800, -0.001266776300}, - { -0.011540516700, 0.012843156400, -0.014239964400, 0.017653808300, - -0.023649793700, 0.034495386400, -0.060314068800, 0.294053570900, - 0.071604519400, -0.023084721700, 0.008966178100, -0.002274742400, - -0.001313420800, 0.003040255700, -0.002244873300, -0.001264793200}, - { -0.011472239700, 0.012762833200, -0.014142299300, 0.017523724800, - -0.023496551600, 0.034302863600, -0.060059835200, 0.294155332000, - 0.071318036600, -0.023035573000, 0.008958134900, -0.002285404200, - -0.001304581400, 0.003041364800, -0.002242376300, -0.001259366100}, - { -0.011396549400, 0.012678155200, -0.014036439400, 0.017396575200, - -0.023338009400, 0.034116321500, -0.059806163900, 0.294253594500, - 0.071016115000, -0.022981051800, 0.008953591700, -0.002294842900, - -0.001302187900, 0.003033306900, -0.002251340000, -0.001257327400}, - { -0.011323121700, 0.012586727200, -0.013934406600, 0.017269467600, - -0.023182283200, 0.033913734300, -0.059546703200, 0.294357625700, - 0.070729691900, -0.022931857800, 0.008949854300, -0.002293460500, - -0.001289637300, 0.003033725600, -0.002248666800, -0.001252011800}, - { -0.011252540100, 0.012503092200, -0.013827892600, 0.017136721300, - -0.023029828700, 0.033729073000, -0.059293518700, 0.294460157000, - 0.070434097200, -0.022879051900, 0.008946945700, -0.002305315700, - -0.001279931900, 0.003030359000, -0.002258640400, -0.001249868500}, - { -0.011182377900, 0.012419958100, -0.013722251500, 0.017009920100, - -0.022874644300, 0.033527611400, -0.059037642400, 0.294550501800, - 0.070143346800, -0.022826323700, 0.008936004500, -0.002312971700, - -0.001278495600, 0.003026834400, -0.002255007200, -0.001244616700}, - { -0.011112979600, 0.012337731100, -0.013617730300, 0.016882921900, - -0.022715294600, 0.033338099000, -0.058774188400, 0.294654140800, - 0.069848353600, -0.022774221100, 0.008938942400, -0.002318660300, - -0.001272367300, 0.003031143500, -0.002260491700, -0.001243631400}, - { -0.011036494600, 0.012247285200, -0.013517704400, 0.016757477900, - -0.022556496100, 0.033144550900, -0.058521997300, 0.294752983200, - 0.069553175900, -0.022719357000, 0.008933910800, -0.002324464800, - -0.001256128400, 0.003023848100, -0.002262428500, -0.001237037300}, - { -0.010969358900, 0.012167754700, -0.013416137200, 0.016635331800, - -0.022407065400, 0.032953544400, -0.058263509000, 0.294849437700, - 0.069259760100, -0.022670102300, 0.008922281200, -0.002330427000, - -0.001256945700, 0.003023412200, -0.002266647300, -0.001236321600}, - { -0.010900887700, 0.012086623000, -0.013312472500, 0.016509174100, - -0.022247384700, 0.032758671600, -0.058008634000, 0.294944915100, - 0.068966542100, -0.022616489300, 0.008919626500, -0.002343674400, - -0.001245178500, 0.003017029900, -0.002268726500, -0.001229834600}, - { -0.010824042300, 0.012004282000, -0.013216314100, 0.016383459600, - -0.022105269700, 0.032570797200, -0.057751817000, 0.295047141500, - 0.068676416600, -0.022561101300, 0.008913972000, -0.002352971000, - -0.001238353400, 0.003021279300, -0.002274200700, -0.001228791200}, - { -0.010755431700, 0.011922721200, -0.013111568500, 0.016255565900, - -0.021943625600, 0.032372518000, -0.057486437700, 0.295142943400, - 0.068385169700, -0.022513896200, 0.008909637200, -0.002350338500, - -0.001230956100, 0.003009550000, -0.002274839200, -0.001222885000}, - { -0.010688812000, 0.011843615700, -0.013010433300, 0.016132334200, - -0.021787511700, 0.032185366300, -0.057225248100, 0.295234898600, - 0.068091568200, -0.022457194700, 0.008903658200, -0.002359880400, - -0.001223949400, 0.003013484800, -0.002280163100, -0.001221768100}, - { -0.010616490000, 0.011757803200, -0.012915294700, 0.016012759800, - -0.021638667600, 0.031988588100, -0.056969680800, 0.295335292700, - 0.067795719500, -0.022406367600, 0.008900068000, -0.002371512600, - -0.001214114500, 0.003010061800, -0.002290053700, -0.001219729000}, - { -0.010551509800, 0.011680400300, -0.012815991100, 0.015891596000, - -0.021485136600, 0.031804218000, -0.056710441700, 0.295433201300, - 0.067505660900, -0.022347745200, 0.008890402300, -0.002371663200, - -0.001208867400, 0.003006011700, -0.002286436600, -0.001214616000}, - { -0.010484290500, 0.011600637200, -0.012712731400, 0.015760653300, - -0.021331865900, 0.031610777900, -0.056451724100, 0.295523834300, - 0.067206178800, -0.022295584100, 0.008886317900, -0.002383054500, - -0.001199058000, 0.003002379300, -0.002296230600, -0.001212436700}, - { -0.010418126800, 0.011517277400, -0.012619826700, 0.015643456400, - -0.021185866100, 0.031421091300, -0.056188447800, 0.295617466000, - 0.066918218000, -0.022237804200, 0.008878791700, -0.002390705100, - -0.001198036500, 0.002999278000, -0.002292788000, -0.001207424300}, - { -0.010353664500, 0.011440787900, -0.012520884000, 0.015521915600, - -0.021030519400, 0.031228731500, -0.055930893500, 0.295714067400, - 0.066622310400, -0.022183982500, 0.008871703300, -0.002394208300, - -0.001184119100, 0.002994763100, -0.002302348400, -0.001205321400}, - { -0.010290103500, 0.011365248300, -0.012423245400, 0.015401999100, - -0.020877200500, 0.031043216800, -0.055667568800, 0.295807177000, - 0.066328312100, -0.022131427200, 0.008866742900, -0.002404798200, - -0.001175466100, 0.002996071300, -0.002300011200, -0.001200034300}, - { -0.010212808300, 0.011286215600, -0.012331974000, 0.015285837100, - -0.020731638800, 0.030848876200, -0.055414282300, 0.295894792100, - 0.066040074000, -0.022070359700, 0.008854931500, -0.002403060700, - -0.001172180300, 0.002994947800, -0.002303988400, -0.001199255200}, - { -0.010148001100, 0.011208895700, -0.012231165800, 0.015157088900, - -0.020580030600, 0.030655950200, -0.055152663300, 0.295985303100, - 0.065747514100, -0.022018328800, 0.008851064800, -0.002415287100, - -0.001160745800, 0.002988510300, -0.002305832600, -0.001193029800}, - { -0.010085579200, 0.011134601100, -0.012134860100, 0.015038441400, - -0.020427698700, 0.030471019600, -0.054887446700, 0.296075847400, - 0.065452832100, -0.021962597300, 0.008842662600, -0.002421544800, - -0.001161750800, 0.002988338000, -0.002310334400, -0.001192214700}, - { -0.010020900500, 0.011052809300, -0.012042691300, 0.014920355400, - -0.020274570600, 0.030279417600, -0.054626925700, 0.296172290700, - 0.065163770900, -0.021908764800, 0.008835761000, -0.002425750100, - -0.001146354300, 0.002981060500, -0.002311933800, -0.001186088400}, - { -0.009959891000, 0.010980172100, -0.011948361700, 0.014804636400, - -0.020129945500, 0.030089125800, -0.054357841800, 0.296258886800, - 0.064870816200, -0.021853498100, 0.008828516100, -0.002434510900, - -0.001139351300, 0.002984984200, -0.002317376800, -0.001185031900}, - { -0.009898260300, 0.010906814900, -0.011851836600, 0.014680546000, - -0.019983871100, 0.029902690900, -0.054105959400, 0.296352017200, - 0.064574678500, -0.021802440100, 0.008820504400, -0.002435747100, - -0.001132168000, 0.002973757000, -0.002317979100, -0.001179124900}, - { -0.009829464000, 0.010824029000, -0.011759300000, 0.014562038800, - -0.019829369800, 0.029708485400, -0.053839700800, 0.296436562600, - 0.064282383100, -0.021746613300, 0.008813206900, -0.002444614700, - -0.001125189300, 0.002977740500, -0.002323403700, -0.001178072500}, - { -0.009762586000, 0.010757748000, -0.011668677900, 0.014449006700, - -0.019682702400, 0.029529044900, -0.053581877800, 0.296526171200, - 0.063990447900, -0.021679886200, 0.008799692100, -0.002450355900, - -0.001116909400, 0.002966009600, -0.002323961500, -0.001171914500}, - { -0.009702145300, 0.010685674300, -0.011573598100, 0.014326849900, - -0.019542481200, 0.029334344500, -0.053317589600, 0.296618745800, - 0.063695013000, -0.021628522100, 0.008793030100, -0.002459004700, - -0.001110081400, 0.002970330900, -0.002329660800, -0.001170874500}, - { -0.009639674100, 0.010606181300, -0.011483842100, 0.014211122400, - -0.019391070400, 0.029143138800, -0.053052763700, 0.296709109200, - 0.063405648500, -0.021569686100, 0.008780917600, -0.002456863700, - -0.001107234800, 0.002969450300, -0.002333956200, -0.001170125300}, - { -0.009581441000, 0.010536858700, -0.011393027300, 0.014097865300, - -0.019243677500, 0.028962045800, -0.052791038800, 0.296794244500, - 0.063110931400, -0.021511634200, 0.008780017100, -0.002469118700, - -0.001096137300, 0.002963079500, -0.002335754800, -0.001163895700}, - { -0.009515365500, 0.010456770600, -0.011303346500, 0.013982426200, - -0.019092348700, 0.028770277400, -0.052523860000, 0.296881395600, - 0.062822494300, -0.021452275300, 0.008767593500, -0.002466860000, - -0.001093302800, 0.002962141700, -0.002339996800, -0.001163170100}, - { -0.009457035400, 0.010387174600, -0.011211408300, 0.013863735500, - -0.018955461900, 0.028578727400, -0.052264429900, 0.296965665500, - 0.062526684700, -0.021390879000, 0.008758231200, -0.002482874600, - -0.001081090900, 0.002955577100, -0.002341776700, -0.001156792500}, - { -0.009400556800, 0.010319669900, -0.011122203700, 0.013752383900, - -0.018810443800, 0.028400005500, -0.052003778300, 0.297056151300, - 0.062236110400, -0.021336172300, 0.008746430300, -0.002480260300, - -0.001078834400, 0.002954987600, -0.002346166500, -0.001156099600}, - { -0.009332105500, 0.010246624400, -0.011036161100, 0.013639306600, - -0.018660250400, 0.028208189500, -0.051734216700, 0.297140614200, - 0.061941420000, -0.021276152500, 0.008744611200, -0.002492352100, - -0.001067597300, 0.002948573300, -0.002347967100, -0.001149887200}, - { -0.009272360200, 0.010174446400, -0.010935538100, 0.013522491900, - -0.018517173300, 0.028021068000, -0.051473353600, 0.297221172300, - 0.061647632000, -0.021220051600, 0.008732236600, -0.002489611700, - -0.001065202900, 0.002947918700, -0.002352278400, -0.001149066000}, - { -0.009213325600, 0.010098901500, -0.010850127500, 0.013411298100, - -0.018369198800, 0.027831555500, -0.051205897900, 0.297312718800, - 0.061355453400, -0.021156852500, 0.008721014300, -0.002503786900, - -0.001055769400, 0.002949420200, -0.002350196200, -0.001143817000}, - { -0.009154686400, 0.010032437200, -0.010762989400, 0.013303147900, - -0.018232338700, 0.027647756700, -0.050939241800, 0.297396279600, - 0.061067211800, -0.021101691400, 0.008709501200, -0.002502402100, - -0.001050877900, 0.002940699400, -0.002358437400, -0.001142165600}, - { -0.009098345900, 0.009964812300, -0.010672807300, 0.013184994200, - -0.018090535100, 0.027462057700, -0.050678910500, 0.297482132700, - 0.060775711600, -0.021036808600, 0.008695284800, -0.002507997500, - -0.001037794300, 0.002941289900, -0.002355925500, -0.001136940000}, - { -0.009040073800, 0.009890164700, -0.010588375400, 0.013074472100, - -0.017943142100, 0.027273058500, -0.050413365200, 0.297557115100, - 0.060482529200, -0.020973444000, 0.008689737800, -0.002515641700, - -0.001036539700, 0.002933528900, -0.002364533600, -0.001134965700}, - { -0.008978175500, 0.009829858100, -0.010503877000, 0.012966752800, - -0.017800540400, 0.027094554000, -0.050147624100, 0.297640606500, - 0.060185287000, -0.020914048900, 0.008683823800, -0.002517293800, - -0.001024611700, 0.002934410200, -0.002362132000, -0.001129829700}, - { -0.008920174300, 0.009755024700, -0.010418098600, 0.012849997300, - -0.017658755900, 0.026908098600, -0.049883464500, 0.297721129900, - 0.059897161500, -0.020855847900, 0.008665084700, -0.002525885700, - -0.001025446300, 0.002934650000, -0.002366817000, -0.001128974000}, - { -0.008866407500, 0.009690722000, -0.010331978800, 0.012740654600, - -0.017513336800, 0.026720176000, -0.049613614700, 0.297814833400, - 0.059603377300, -0.020796619900, 0.008659451000, -0.002528098100, - -0.001012468200, 0.002930143500, -0.002376553600, -0.001126794900}, - { -0.008809499600, 0.009626161500, -0.010246944100, 0.012634266200, - -0.017376589500, 0.026529402400, -0.049347375400, 0.297893741900, - 0.059312998000, -0.020728754500, 0.008642272200, -0.002530568000, - -0.001007501500, 0.002926808400, -0.002372946000, -0.001121930300}, - { -0.008753278600, 0.009553595700, -0.010164038100, 0.012520217600, - -0.017238147400, 0.026350960600, -0.049076921100, 0.297970747600, - 0.059018701600, -0.020669669800, 0.008638257800, -0.002540198000, - -0.000998529900, 0.002922998700, -0.002382694100, -0.001119665800}, - { -0.008700892600, 0.009490588100, -0.010079579700, 0.012413140100, - -0.017095016200, 0.026165585800, -0.048812541600, 0.298055673800, - 0.058732787100, -0.020602200500, 0.008620998100, -0.002542420300, - -0.000993979200, 0.002919927800, -0.002379174400, -0.001114931100}, - { -0.008636872000, 0.009421764400, -0.009992841500, 0.012312002500, - -0.016954362300, 0.025981636800, -0.048553232900, 0.298128451900, - 0.058438067100, -0.020540206700, 0.008612798400, -0.002542224400, - -0.000983932400, 0.002923485400, -0.002384780000, -0.001113605200}, - { -0.008584316600, 0.009358594600, -0.009907251900, 0.012198085900, - -0.016816027500, 0.025797833300, -0.048288066300, 0.298212478700, - 0.058145551600, -0.020476810000, 0.008597199400, -0.002545865100, - -0.000977036900, 0.002912420300, -0.002385153400, -0.001107825500}, - { -0.008530542400, 0.009288917500, -0.009827928200, 0.012092889000, - -0.016673561700, 0.025612282700, -0.048021033600, 0.298294423300, - 0.057854601300, -0.020415253900, 0.008590004000, -0.002551352000, - -0.000978876700, 0.002913287000, -0.002390253900, -0.001106899300}, - { -0.008478483800, 0.009226377800, -0.009743311000, 0.011980096900, - -0.016536709400, 0.025434302500, -0.047747110700, 0.298365825000, - 0.057560244000, -0.020351243300, 0.008574970900, -0.002557026600, - -0.000963826400, 0.002905602300, -0.002391414300, -0.001100755900}, - { -0.008424799700, 0.009165535000, -0.009662092200, 0.011877441200, - -0.016403414400, 0.025245702300, -0.047478375000, 0.298446320200, - 0.057267599400, -0.020285138500, 0.008556551400, -0.002557753000, - -0.000960917900, 0.002905172800, -0.002396213700, -0.001099661700}, - { -0.008372136900, 0.009097353100, -0.009584221800, 0.011773596800, - -0.016261962900, 0.025060099400, -0.047209041900, 0.298525257700, - 0.056970953100, -0.020227896300, 0.008551918400, -0.002566762900, - -0.000953100600, 0.002907384900, -0.002394239600, -0.001094674000}, - { -0.008313510700, 0.009040315200, -0.009502392800, 0.011662794000, - -0.016126306100, 0.024878475500, -0.046947568800, 0.298599300000, - 0.056680564700, -0.020162388700, 0.008534249200, -0.002568479900, - -0.000948207200, 0.002898882600, -0.002402600100, -0.001092599200}, - { -0.008261904500, 0.008972850800, -0.009425383800, 0.011560009200, - -0.015986171300, 0.024693755800, -0.046677919500, 0.298682066000, - 0.056395501800, -0.020100315900, 0.008526039100, -0.002568721700, - -0.000936969600, 0.002900157200, -0.002400214400, -0.001087840400}, - { -0.008211115400, 0.008911303700, -0.009336453400, 0.011454721200, - -0.015854163900, 0.024519846800, -0.046405144200, 0.298759763600, - 0.056094866900, -0.020029308800, 0.008512218400, -0.002571374100, - -0.000931811500, 0.002891576300, -0.002408972300, -0.001085440200}, - { -0.008160197200, 0.008844778800, -0.009260656400, 0.011353693700, - -0.015715846500, 0.024337335900, -0.046141044500, 0.298830136900, - 0.055805182500, -0.019961847400, 0.008492748700, -0.002571357000, - -0.000929480500, 0.002891307200, -0.002413690800, -0.001084311600}, - { -0.008112103700, 0.008787159000, -0.009181661000, 0.011251768000, - -0.015576602500, 0.024153171400, -0.045870162900, 0.298911585300, - 0.055512440700, -0.019901475900, 0.008478936300, -0.002583378800, - -0.000920943200, 0.002893394800, -0.002411773500, -0.001079321400}, - { -0.008048876900, 0.008722251100, -0.009104537200, 0.011142744200, - -0.015441580200, 0.023970548200, -0.045602981800, 0.298977325900, - 0.055225670900, -0.019836708300, 0.008468413700, -0.002580907300, - -0.000917271300, 0.002885109500, -0.002420012800, -0.001077376400}, - { -0.008001667100, 0.008665715200, -0.009027145700, 0.011042483200, - -0.015304227600, 0.023788158500, -0.045332341000, 0.299058734900, - 0.054929607400, -0.019764945900, 0.008453838100, -0.002582942100, - -0.000913301400, 0.002882721100, -0.002416975800, -0.001072495600}, - { -0.007952339000, 0.008600802500, -0.008952392000, 0.010937108800, - -0.015174084700, 0.023616380100, -0.045064497900, 0.299132742800, - 0.054637916200, -0.019701857900, 0.008436057700, -0.002584785900, - -0.000903092500, 0.002886222600, -0.002422944100, -0.001071045600}, - { -0.007904789100, 0.008543139300, -0.008868051200, 0.010841905100, - -0.015039485700, 0.023436300800, -0.044799707800, 0.299207159000, - 0.054344370000, -0.019630506300, 0.008421815400, -0.002587760600, - -0.000897083200, 0.002875630100, -0.002423263600, -0.001065244000}, - { -0.007858185900, 0.008487210700, -0.008790859100, 0.010741407000, - -0.014901532300, 0.023251997700, -0.044524238300, 0.299282071600, - 0.054053355000, -0.019568733800, 0.008411993400, -0.002586331800, - -0.000887586200, 0.002879382200, -0.002429340400, -0.001063908000}, - { -0.007801564500, 0.008427026200, -0.008718424600, 0.010638181300, - -0.014777689900, 0.023068158700, -0.044255915700, 0.299351847700, - 0.053763206500, -0.019505511500, 0.008395133400, -0.002594827000, - -0.000887696700, 0.002878112600, -0.002426308700, -0.001059278600}, - { -0.007752716200, 0.008371567300, -0.008642947600, 0.010540183700, - -0.014642563600, 0.022887494700, -0.043988296500, 0.299422575400, - 0.053470206400, -0.019432499100, 0.008379552700, -0.002596486400, - -0.000883216200, 0.002869839900, -0.002434904100, -0.001056944400}, - { -0.007704528800, 0.008307898100, -0.008569545100, 0.010435528000, - -0.014511589100, 0.022707641400, -0.043720040800, 0.299491463500, - 0.053178429700, -0.019359975400, 0.008364846400, -0.002599735200, - -0.000871418100, 0.002871064200, -0.002432661800, -0.001051839000}, - { -0.007660450500, 0.008255099600, -0.008496004600, 0.010339539800, - -0.014379049200, 0.022534686200, -0.043441724600, 0.299571471100, - 0.052882824900, -0.019298671600, 0.008346423900, -0.002600374000, - -0.000867444000, 0.002862933200, -0.002441463500, -0.001049660900}, - { -0.007603296800, 0.008193382200, -0.008416132400, 0.010239585900, - -0.014249993700, 0.022355720200, -0.043172229900, 0.299637947900, - 0.052591247500, -0.019224621200, 0.008329727400, -0.002600981100, - -0.000864181800, 0.002860802800, -0.002438248600, -0.001044875200}, - { -0.007559512700, 0.008140629300, -0.008342511600, 0.010143265600, - -0.014116237900, 0.022175330800, -0.042902559300, 0.299710502400, - 0.052305586800, -0.019159837900, 0.008310446500, -0.002602041500, - -0.000854285500, 0.002864501800, -0.002444344500, -0.001043455200}, - { -0.007513280300, 0.008079345200, -0.008271562400, 0.010041094600, - -0.013987692600, 0.021997806500, -0.042634176100, 0.299784559000, - 0.052010247800, -0.019090033000, 0.008295552500, -0.002604044700, - -0.000848986600, 0.002854305800, -0.002444743300, -0.001037730800}, - { -0.007466532300, 0.008026496300, -0.008198836000, 0.009945759200, - -0.013854742200, 0.021817938400, -0.042362922600, 0.299849767900, - 0.051710800600, -0.019017700500, 0.008278482500, -0.002603834000, - -0.000847135700, 0.002854590200, -0.002450114700, -0.001036184000}, - { -0.007421596100, 0.007966615900, -0.008130314500, 0.009852191300, - -0.013722881700, 0.021638799100, -0.042091828500, 0.299919862100, - 0.051423553400, -0.018942531200, 0.008260465800, -0.002603155800, - -0.000845516700, 0.002854963900, -0.002455432800, -0.001034829400}, - { -0.007368637400, 0.007915606500, -0.008049069000, 0.009753117800, - -0.013595099000, 0.021460165700, -0.041819414400, 0.299987943200, - 0.051132245200, -0.018881182900, 0.008242689200, -0.002605985800, - -0.000832295700, 0.002848095500, -0.002456559500, -0.001029015400}, - { -0.007324914900, 0.007857386900, -0.007982526900, 0.009661947700, - -0.013466505100, 0.021290236500, -0.041544493000, 0.300056546100, - 0.050837682400, -0.018808660100, 0.008224995500, -0.002605154700, - -0.000830876200, 0.002848515400, -0.002462055200, -0.001027526900}, - { -0.007282763500, 0.007806632000, -0.007910621800, 0.009561255200, - -0.013339966800, 0.021114682600, -0.041280619200, 0.300121126000, - 0.050544717400, -0.018736947600, 0.008207999600, -0.002605038900, - -0.000828329300, 0.002846963800, -0.002458999000, -0.001022805800}, - { -0.007239595400, 0.007748911800, -0.007844275500, 0.009469910200, - -0.013210161600, 0.020936736300, -0.041008289300, 0.300195390400, - 0.050254997100, -0.018666130300, 0.008192356500, -0.002607611600, - -0.000816356100, 0.002842431500, -0.002468794900, -0.001020138600}, - { -0.007189132600, 0.007701593500, -0.007773543100, 0.009369503200, - -0.013083002200, 0.020758957600, -0.040734108300, 0.300260370700, - 0.049961784800, -0.018593391800, 0.008174805900, -0.002607328400, - -0.000813752200, 0.002840812400, -0.002465827800, -0.001015410900}, - { -0.007142203300, 0.007641451600, -0.007699103200, 0.009282076700, - -0.012954925100, 0.020581902400, -0.040460854200, 0.300332528600, - 0.049672014200, -0.018520619000, 0.008156499100, -0.002606187400, - -0.000812553500, 0.002841559200, -0.002471464900, -0.001013982200}, - { -0.007101149600, 0.007591957300, -0.007628580400, 0.009182604800, - -0.012829151000, 0.020406004000, -0.040192877300, 0.300391149900, - 0.049381202700, -0.018448182600, 0.008139326600, -0.002606745200, - -0.000808105100, 0.002831584800, -0.002471553400, -0.001008355200}, - { -0.007059152000, 0.007535511600, -0.007563628700, 0.009092708900, - -0.012700466400, 0.020228151600, -0.039917450300, 0.300460428800, - 0.049092597200, -0.018375427900, 0.008121814200, -0.002607487200, - -0.000798497500, 0.002835512200, -0.002478145100, -0.001006580300}, - { -0.007009147900, 0.007482806700, -0.007499733800, 0.008997547100, - -0.012579180400, 0.020062891600, -0.039647806700, 0.300525821900, - 0.048797495500, -0.018306252700, 0.008105184800, -0.002607855100, - -0.000794439900, 0.002825789700, -0.002478474500, -0.001000945500}, - { -0.006968240600, 0.007433072000, -0.007423567800, 0.008910574100, - -0.012451522700, 0.019885022200, -0.039369675200, 0.300585104500, - 0.048504934800, -0.018229228000, 0.008077029200, -0.002609247300, - -0.000792419400, 0.002826100200, -0.002484009500, -0.000999231800}, - { -0.006926866100, 0.007377316500, -0.007358544200, 0.008814417700, - -0.012328366300, 0.019710850400, -0.039101469100, 0.300648793200, - 0.048210544400, -0.018159587600, 0.008060409500, -0.002610430800, - -0.000781936000, 0.002828146400, -0.002482150700, -0.000994223400}, - { -0.006888043700, 0.007330615400, -0.007291803100, 0.008724921800, - -0.012200346800, 0.019533132300, -0.038822537300, 0.300712721600, - 0.047923413800, -0.018085444700, 0.008041528500, -0.002609670800, - -0.000778976000, 0.002820404900, -0.002490903500, -0.000991790800}, - { -0.006839293900, 0.007279247200, -0.007229475600, 0.008630964100, - -0.012079179200, 0.019361129300, -0.038555831700, 0.300783801700, - 0.047630120500, -0.018006655200, 0.008026572200, -0.002609399200, - -0.000777006200, 0.002819585000, -0.002488366700, -0.000987006200}, - { -0.006798540800, 0.007233149500, -0.007164042200, 0.008543197100, - -0.011953311100, 0.019186232700, -0.038285177900, 0.300844278100, - 0.047335766700, -0.017934700400, 0.008007388400, -0.002607418500, - -0.000776398500, 0.002820679000, -0.002494154700, -0.000985371100}, - { -0.006756891400, 0.007176317300, -0.007091540900, 0.008451307000, - -0.011831617600, 0.019011206000, -0.038005599900, 0.300906624700, - 0.047040567000, -0.017860728900, 0.007980042300, -0.002609428000, - -0.000772729700, 0.002812783500, -0.002503047600, -0.000982640700}, - { -0.006720561000, 0.007132703000, -0.007028371700, 0.008366076000, - -0.011709400800, 0.018846008900, -0.037732212300, 0.300971836600, - 0.046750583700, -0.017789132800, 0.007960205400, -0.002601193300, - -0.000759764200, 0.002814043200, -0.002500954000, -0.000977775800}, - { -0.006672404900, 0.007082025300, -0.006966950500, 0.008272917200, - -0.011588469400, 0.018672889900, -0.037460064500, 0.301029284000, - 0.046455528400, -0.017707594600, 0.007943302900, -0.002599558300, - -0.000759066900, 0.002815167300, -0.002506921900, -0.000975884100}, - { -0.006636191300, 0.007038598500, -0.006903834600, 0.008187619300, - -0.011464768800, 0.018499388000, -0.037187988000, 0.301092874000, - 0.046165570800, -0.017634207100, 0.007916113200, -0.002601855100, - -0.000754783900, 0.002805563000, -0.002507180900, -0.000970271500}, - { -0.006596465200, 0.006983825400, -0.006833460100, 0.008097770300, - -0.011345476800, 0.018327200500, -0.036915500100, 0.301155082000, - 0.045876647100, -0.017561716500, 0.007895994400, -0.002599054600, - -0.000754654000, 0.002806943500, -0.002513137500, -0.000968652300}, - { -0.006560412300, 0.006940658100, -0.006770837100, 0.008012401600, - -0.011221145500, 0.018151488300, -0.036633262700, 0.301219274700, - 0.045585787000, -0.017480905500, 0.007880162200, -0.002600023100, - -0.000744270100, 0.002809097600, -0.002511606900, -0.000963551800}, - { -0.006513718100, 0.006891483500, -0.006710841700, 0.007921089700, - -0.011101909300, 0.017979361500, -0.036359405400, 0.301279455500, - 0.045296336600, -0.017405665400, 0.007850982300, -0.002599865500, - -0.000743330300, 0.002810197300, -0.002517572500, -0.000961768900}, - { -0.006474304300, 0.006840684600, -0.006652924700, 0.007839125400, - -0.010981524900, 0.017809064300, -0.036093943200, 0.301337182700, - 0.044998869000, -0.017326384300, 0.007833242200, -0.002591035300, - -0.000737232300, 0.002800277200, -0.002517691400, -0.000956035500}, - { -0.006438009700, 0.006796203400, -0.006581589800, 0.007750585800, - -0.010864711900, 0.017645387000, -0.035815202400, 0.301393202700, - 0.044711874800, -0.017252787500, 0.007812074200, -0.002587518900, - -0.000737454900, 0.002801635500, -0.002523680400, -0.000954362300}, - { -0.006401639200, 0.006746574400, -0.006524338300, 0.007669196200, - -0.010743983400, 0.017473398600, -0.035540053600, 0.301451854500, - 0.044413545900, -0.017171090300, 0.007786312500, -0.002588925400, - -0.000735266600, 0.002800927700, -0.002521316700, -0.000949359500}, - { -0.006357778700, 0.006707002900, -0.006462535400, 0.007577627400, - -0.010624650100, 0.017300143900, -0.035261474700, 0.301505220000, - 0.044127692000, -0.017097850700, 0.007766585900, -0.002588324800, - -0.000724851500, 0.002796544700, -0.002531073000, -0.000946421000}, - { -0.006322346100, 0.006658344700, -0.006406316800, 0.007497394200, - -0.010505114500, 0.017129209400, -0.034986501900, 0.301569791200, - 0.043833061900, -0.017016393700, 0.007740582000, -0.002589426200, - -0.000722919300, 0.002796070900, -0.002528823500, -0.000941518100}, - { -0.006287412000, 0.006615790600, -0.006337047100, 0.007410503600, - -0.010389329800, 0.016959520500, -0.034711193400, 0.301633352100, - 0.043538995400, -0.016935463200, 0.007720653400, -0.002578087200, - -0.000720236600, 0.002796975700, -0.002534998100, -0.000939577700}, - { -0.006252289300, 0.006567502700, -0.006281032900, 0.007330632700, - -0.010270201400, 0.016788863600, -0.034440183200, 0.301682214200, - 0.043245651300, -0.016861993700, 0.007691723300, -0.002578831000, - -0.000716968300, 0.002787827800, -0.002535183000, -0.000933911800}, - { -0.006205898400, 0.006520927200, -0.006224969100, 0.007243536900, - -0.010155742500, 0.016627163700, -0.034159645200, 0.301741305700, - 0.042953309700, -0.016781259600, 0.007673144100, -0.002575750000, - -0.000717300000, 0.002789556600, -0.002541677100, -0.000931902700}, - { -0.006172693900, 0.006480627500, -0.006158957400, 0.007167086900, - -0.010038799500, 0.016458330300, -0.033890060300, 0.301797671500, - 0.042661393000, -0.016699057600, 0.007646012100, -0.002576064600, - -0.000715860200, 0.002789348200, -0.002539353500, -0.000927029000}, - { -0.006137812800, 0.006432255400, -0.006101996500, 0.007079130900, - -0.009922951400, 0.016287909800, -0.033610088700, 0.301854227800, - 0.042371265900, -0.016625851600, 0.007623115300, -0.002564257200, - -0.000711981100, 0.002781648600, -0.002548160800, -0.000924334400}, - { -0.006096934600, 0.006396695800, -0.006045818500, 0.007000329800, - -0.009804671800, 0.016116562300, -0.033329631800, 0.301910604800, - 0.042079113900, -0.016542771000, 0.007595979900, -0.002565562900, - -0.000702731900, 0.002785897700, -0.002555562000, -0.000921807000}, - { -0.006062933900, 0.006349328800, -0.005990311300, 0.006913942100, - -0.009690267000, 0.015948108300, -0.033057262400, 0.301962237800, - 0.041789551900, -0.016461435000, 0.007576990700, -0.002562617900, - -0.000702405400, 0.002786094000, -0.002553292100, -0.000917048000}, - { -0.006030707600, 0.006310258300, -0.005925655500, 0.006838885700, - -0.009574791300, 0.015779698800, -0.032784352400, 0.302013593200, - 0.041498813500, -0.016377089100, 0.007547123000, -0.002553821800, - -0.000697783700, 0.002778180000, -0.002562081100, -0.000914005100}, - { -0.005997784800, 0.006264360200, -0.005871819500, 0.006754676200, - -0.009463128500, 0.015620155600, -0.032502060800, 0.302075447000, - 0.041202514700, -0.016296539100, 0.007519854200, -0.002553495700, - -0.000696753300, 0.002778219800, -0.002560158500, -0.000909073800}, - { -0.005953802600, 0.006220559900, -0.005819558300, 0.006678209600, - -0.009346907400, 0.015450858700, -0.032226770800, 0.302123085100, - 0.040913759200, -0.016213682700, 0.007499502500, -0.002549585000, - -0.000697575600, 0.002780297700, -0.002566684400, -0.000906938700}, - { -0.005922781400, 0.006183472900, -0.005762778500, 0.006591765300, - -0.009226118300, 0.015287200700, -0.031955488100, 0.302181358200, - 0.040618118300, -0.016132038300, 0.007470292100, -0.002540354300, - -0.000694252800, 0.002779793900, -0.002564399000, -0.000902066000}, - { -0.005890136500, 0.006137124600, -0.005702277700, 0.006519185100, - -0.009112249200, 0.015119563200, -0.031680564700, 0.302235443400, - 0.040332527300, -0.016048205900, 0.007441443200, -0.002539675700, - -0.000692720800, 0.002772999400, -0.002573622600, -0.000899005400}, - { -0.005850311400, 0.006102867800, -0.005646959300, 0.006433987600, - -0.008998513600, 0.014949546000, -0.031394934700, 0.302282936600, - 0.040036207000, -0.015967839100, 0.007422582300, -0.002538011700, - -0.000683794500, 0.002775953500, -0.002572520300, -0.000893764400}, - { -0.005818964100, 0.006058727200, -0.005595185800, 0.006352081900, - -0.008889397700, 0.014792369000, -0.031117719900, 0.302336098600, - 0.039742056100, -0.015884752000, 0.007391840300, -0.002527331400, - -0.000681709200, 0.002777178000, -0.002579042300, -0.000891447000}, - { -0.005787145500, 0.006013604000, -0.005535923100, 0.006280742400, - -0.008776679900, 0.014625338400, -0.030841085500, 0.302387399600, - 0.039449376300, -0.015802899000, 0.007363441100, -0.002527024400, - -0.000679473400, 0.002768808300, -0.002579613300, -0.000885670100}, - { -0.005757587300, 0.005978394700, -0.005481519600, 0.006197183700, - -0.008665183400, 0.014458560600, -0.030564097400, 0.302437909100, - 0.039157112000, -0.015721824200, 0.007342861000, -0.002522537800, - -0.000680774600, 0.002771330800, -0.002586549000, -0.000883371200}, - { -0.005718682200, 0.005938417900, -0.005432964900, 0.006124864000, - -0.008553225900, 0.014292583100, -0.030288050400, 0.302496054000, - 0.038866667200, -0.015638780000, 0.007312074800, -0.002512230800, - -0.000678044400, 0.002771222400, -0.002584426900, -0.000878577700}, - { -0.005689051600, 0.005902462900, -0.005370854200, 0.006045352000, - -0.008444322900, 0.014128120100, -0.030018298000, 0.302541430200, - 0.038575785600, -0.015556232000, 0.007282648600, -0.002510659300, - -0.000677160100, 0.002764759200, -0.002593729700, -0.000875301600}, - { -0.005657037700, 0.005859684300, -0.005321845400, 0.005973581100, - -0.008333790400, 0.013970133000, -0.029736435400, 0.302587106700, - 0.038284268000, -0.015471874400, 0.007250951700, -0.002499759200, - -0.000674653700, 0.002764455200, -0.002591465700, -0.000870433100}, - { -0.005618333200, 0.005819685000, -0.005272906200, 0.005893724000, - -0.008225058800, 0.013805185000, -0.029458517200, 0.302642069200, - 0.037993797900, -0.015379756300, 0.007223193600, -0.002497981300, - -0.000675186800, 0.002766900000, -0.002598670200, -0.000867828800}, - { -0.005590368200, 0.005786648100, -0.005221758100, 0.005820627000, - -0.008112433600, 0.013637747600, -0.029176984600, 0.302685277400, - 0.037704094600, -0.015297293000, 0.007201598200, -0.002493386100, - -0.000675974400, 0.002767923100, -0.002596834100, -0.000863002200}, - { -0.005560237100, 0.005743450200, -0.005163726600, 0.005743489200, - -0.008005370600, 0.013473662100, -0.028897800000, 0.302738295200, - 0.037407381800, -0.015215522800, 0.007170544900, -0.002482718300, - -0.000672918600, 0.002760875300, -0.002606209100, -0.000859635800}, - { -0.005523266400, 0.005705570200, -0.005118090200, 0.005674706600, - -0.007897426600, 0.013318487200, -0.028623546600, 0.302785848400, - 0.037119392900, -0.015122696500, 0.007141770500, -0.002480246400, - -0.000673963700, 0.002763436900, -0.002613369900, -0.000856978400}, - { -0.005495962500, 0.005673345500, -0.005067111000, 0.005594863000, - -0.007789506200, 0.013153651000, -0.028342627700, 0.302836038100, - 0.036823681900, -0.015040742100, 0.007110968900, -0.002470535200, - -0.000662984200, 0.002766079600, -0.002612329100, -0.000851700900}, - { -0.005466715000, 0.005630853800, -0.005009907900, 0.005518700600, - -0.007683264800, 0.012990451100, -0.028068772200, 0.302880652200, - 0.036538564300, -0.014956855300, 0.007079958900, -0.002467783200, - -0.000662808200, 0.002759921300, -0.002621758400, -0.000848374500}, - { -0.005431440200, 0.005602376800, -0.004962376800, 0.005449141300, - -0.007574066800, 0.012825587300, -0.027786579600, 0.302928958400, - 0.036241695300, -0.014864692500, 0.007050007700, -0.002456982100, - -0.000660605900, 0.002760230300, -0.002620023800, -0.000843220100}, - { -0.005403790100, 0.005562631500, -0.004915494200, 0.005372340600, - -0.007469387600, 0.012671612300, -0.027509888900, 0.302972042600, - 0.035948446100, -0.014782113000, 0.007018769500, -0.002453253700, - -0.000662228600, 0.002763058500, -0.002627331400, -0.000840529300}, - { -0.005375829600, 0.005521878400, -0.004861076400, 0.005306264800, - -0.007362011400, 0.012507686500, -0.027226932800, 0.303024793500, - 0.035664170800, -0.014687960800, 0.006987700700, -0.002441798600, - -0.000660398000, 0.002763550700, -0.002625576200, -0.000835595400}, - { -0.005338761500, 0.005492759000, -0.004812448700, 0.005228310500, - -0.007255591100, 0.012344296500, -0.026950110700, 0.303065098100, - 0.035372382500, -0.014606652200, 0.006965471700, -0.002436456100, - -0.000661304500, 0.002757890500, -0.002635253900, -0.000832149000}, - { -0.005312372600, 0.005454664900, -0.004768172600, 0.005161314600, - -0.007148973700, 0.012182095400, -0.026675115000, 0.303114481500, - 0.035080728500, -0.014514347800, 0.006934810400, -0.002424890300, - -0.000659803100, 0.002758707300, -0.002633626200, -0.000827077700}, - { -0.005284879700, 0.005414457900, -0.004713545300, 0.005088017800, - -0.007046166400, 0.012028731400, -0.026395378600, 0.303152032300, - 0.034789552300, -0.014430720500, 0.006902452300, -0.002420492700, - -0.000661736600, 0.002761659300, -0.002641015800, -0.000824295400}, - { -0.005260165300, 0.005385875600, -0.004667616900, 0.005020650000, - -0.006939263300, 0.011865377600, -0.026110236100, 0.303202188800, - 0.034489243800, -0.014340074900, 0.006872439200, -0.002409717000, - -0.000658712000, 0.002753575300, -0.002641882000, -0.000818255300}, - { -0.005224926800, 0.005349893100, -0.004623184600, 0.004945699400, - -0.006835218200, 0.011703557800, -0.025832407000, 0.303246711500, - 0.034200612800, -0.014256420100, 0.006840045300, -0.002405245800, - -0.000660759200, 0.002756849600, -0.002649463500, -0.000815493900}, - { -0.005200360700, 0.005320551900, -0.004569322900, 0.004882070200, - -0.006731633300, 0.011550770700, -0.025552150000, 0.303289891500, - 0.033911264900, -0.014163218900, 0.006808149800, -0.002392746100, - -0.000659822800, 0.002757788100, -0.002647879500, -0.000810410400}, - { -0.005174599300, 0.005283024100, -0.004525112200, 0.004808058900, - -0.006628580100, 0.011389660100, -0.025273538400, 0.303332931800, - 0.033621534300, -0.014068603800, 0.006768397200, -0.002390857100, - -0.000660917000, 0.002760752200, -0.002655561700, -0.000807307300}, - { -0.005138134800, 0.005247478500, -0.004481928500, 0.004734510300, - -0.006526058700, 0.011228843600, -0.024994140700, 0.303374972100, - 0.033324125700, -0.013977140000, 0.006737428400, -0.002379104500, - -0.000658573800, 0.002752971400, -0.002656330700, -0.000801279400}, - { -0.005114783000, 0.005220209500, -0.004437547500, 0.004669293700, - -0.006421881700, 0.011075401800, -0.024710885300, 0.303413510200, - 0.033037596300, -0.013892349300, 0.006703786000, -0.002373851700, - -0.000661054500, 0.002756297000, -0.002663989900, -0.000798421400}, - { -0.005089678500, 0.005182927100, -0.004386048500, 0.004598983100, - -0.006321772900, 0.010917290800, -0.024440923300, 0.303460194300, - 0.032743987500, -0.013801224500, 0.006672169900, -0.002360988600, - -0.000660639200, 0.002757935000, -0.002662733600, -0.000793256200}, - { -0.005056179700, 0.005149409700, -0.004345436200, 0.004535552600, - -0.006218141400, 0.010756094800, -0.024159306200, 0.303498774900, - 0.032447376800, -0.013708092900, 0.006639524200, -0.002347647400, - -0.000660699900, 0.002760669100, -0.002670435300, -0.000790060900}, - { -0.005033354700, 0.005122582000, -0.004301162100, 0.004462875900, - -0.006117430000, 0.010604498100, -0.023875417200, 0.303542329100, - 0.032163622800, -0.013614934700, 0.006608303400, -0.002343698500, - -0.000661193300, 0.002753849700, -0.002671460600, -0.000784186200}, - { -0.005008967600, 0.005086442900, -0.004251580600, 0.004402065400, - -0.006015436800, 0.010444472000, -0.023593760200, 0.303587200300, - 0.031870307600, -0.013522135600, 0.006575368200, -0.002330048900, - -0.000661553700, 0.002756838700, -0.002679339200, -0.000781019600}, - { -0.004976115300, 0.005053314100, -0.004210712400, 0.004331218000, - -0.005916048600, 0.010294044300, -0.023316437000, 0.303617696900, - 0.031578389200, -0.013438640200, 0.006541662700, -0.002324484400, - -0.000663934100, 0.002759243400, -0.002678215700, -0.000775874300}, - { -0.004954054600, 0.005027973800, -0.004168660700, 0.004268203300, - -0.005813434400, 0.010133649800, -0.023032853100, 0.303659766600, - 0.031285977700, -0.013345456800, 0.006508681700, -0.002311137900, - -0.000663161200, 0.002753279200, -0.002688143900, -0.000771897700}, - { -0.004928421800, 0.004991603200, -0.004118619000, 0.004199827500, - -0.005715080300, 0.009976047300, -0.022758266200, 0.303698508100, - 0.030994692400, -0.013251271900, 0.006466426100, -0.002299129500, - -0.000662665200, 0.002754921900, -0.002686928900, -0.000766591100}, - { -0.004896598000, 0.004959857600, -0.004080198200, 0.004139136400, - -0.005614528900, 0.009824735600, -0.022471040100, 0.303736794400, - 0.030703785700, -0.013157852400, 0.006433708500, -0.002293624700, - -0.000665508700, 0.002758724400, -0.002695207900, -0.000763249100}, - { -0.004875341600, 0.004935181400, -0.004038259800, 0.004068687500, - -0.005515687900, 0.009667243000, -0.022195988700, 0.303781885400, - 0.030415689700, -0.013065059600, 0.006400355600, -0.002279366500, - -0.000666054000, 0.002760975500, -0.002694258700, -0.000758084800}, - { -0.004852436300, 0.004901022400, -0.003990905800, 0.004010497500, - -0.005416881700, 0.009517056100, -0.021907914800, 0.303818672700, - 0.030116858700, -0.012972784600, 0.006366843000, -0.002265346200, - -0.000665839200, 0.002755157700, -0.002704376900, -0.000753869400}, - { -0.004820883700, 0.004869373400, -0.003952016200, 0.003941798300, - -0.005318693300, 0.009359170900, -0.021629843300, 0.303851724000, - 0.029827673100, -0.012877926700, 0.006324791000, -0.002261575500, - -0.000667691900, 0.002757747500, -0.002703558700, -0.000748453500}, - { -0.004800157600, 0.004845423900, -0.003911010800, 0.003872318000, - -0.005220680700, 0.009201932100, -0.021352478200, 0.303893044500, - 0.029540755700, -0.012784037700, 0.006290380500, -0.002246404800, - -0.000669147800, 0.002761387900, -0.002711729700, -0.000745150400}, - { -0.004769350200, 0.004814396600, -0.003865951000, 0.003816203000, - -0.005123937600, 0.009054063500, -0.021072898700, 0.303933574300, - 0.029244511900, -0.012682582100, 0.006257946300, -0.002231939800, - -0.000670457700, 0.002764997300, -0.002720193100, -0.000741467200}, - { -0.004747416400, 0.004781502000, -0.003827110500, 0.003747768000, - -0.005026132300, 0.008896179300, -0.020792099600, 0.303962072700, - 0.028957720600, -0.012588365800, 0.006224450200, -0.002226292500, - -0.000672109200, 0.002758959300, -0.002721352900, -0.000735386100}, - { -0.004727789800, 0.004759315900, -0.003788813700, 0.003689348800, - -0.004928785800, 0.008748066500, -0.020511012600, 0.304000013700, - 0.028662906200, -0.012494169800, 0.006180633900, -0.002212588700, - -0.000673225600, 0.002762428000, -0.002729709100, -0.000731741100}, - { -0.004696972400, 0.004728140600, -0.003742729000, 0.003624215600, - -0.004833255700, 0.008591834800, -0.020230886000, 0.304036328200, - 0.028369440400, -0.012401276400, 0.006146021300, -0.002197280000, - -0.000674502100, 0.002765145400, -0.002729093500, -0.000726338700}, - { -0.004676431900, 0.004696952300, -0.003706438500, 0.003566616300, - -0.004736314300, 0.008443532900, -0.019947475400, 0.304069875300, - 0.028085420100, -0.012305860200, 0.006110074200, -0.002181080700, - -0.000676615300, 0.002768917300, -0.002737400900, -0.000722876700}, - { -0.004656297500, 0.004673640000, -0.003658751600, 0.003501561200, - -0.004641076300, 0.008287779500, -0.019666250900, 0.304104283300, - 0.027791528800, -0.012202678300, 0.006068547500, -0.002176335900, - -0.000686846600, 0.002761221600, -0.002738242600, -0.000716707400}, - { -0.004627325000, 0.004645205500, -0.003624168800, 0.003445318600, - -0.004545293600, 0.008140437800, -0.019382840700, 0.304145203000, - 0.027501099300, -0.012109150300, 0.006033055000, -0.002160148400, - -0.000689188800, 0.002765358600, -0.002746934500, -0.000713093800}, - { -0.004606892100, 0.004614320900, -0.003587618200, 0.003379587100, - -0.004450296100, 0.007984496700, -0.019099860600, 0.304176499000, - 0.027209072700, -0.012013907400, 0.005988351400, -0.002145830400, - -0.000690246800, 0.002768039100, -0.002746360600, -0.000707548200}, - { -0.004586402700, 0.004592039500, -0.003542025400, 0.003325426100, - -0.004364128800, 0.007835360000, -0.018813366000, 0.304205403100, - 0.026918136600, -0.011919323000, 0.005951839900, -0.002129046300, - -0.000692658900, 0.002772071700, -0.002754968200, -0.000703804500}, - { -0.004557731900, 0.004563753700, -0.003507314200, 0.003260984500, - -0.004270140400, 0.007680828300, -0.018538518600, 0.304240989200, - 0.026629304300, -0.011817129000, 0.005919133800, -0.002122896500, - -0.000695192900, 0.002766964300, -0.002756676800, -0.000697463600}, - { -0.004538643100, 0.004534730300, -0.003473370900, 0.003206136100, - -0.004175833600, 0.007534408900, -0.018252857000, 0.304277893000, - 0.026331338900, -0.011723107400, 0.005874142700, -0.002107933500, - -0.000697223600, 0.002771073600, -0.002765610600, -0.000693472400}, - { -0.004519537900, 0.004512855100, -0.003427404600, 0.003142614000, - -0.004082281200, 0.007379100700, -0.017967050900, 0.304303942000, - 0.026040879100, -0.011618952200, 0.005839096700, -0.002091778900, - -0.000699143000, 0.002774214900, -0.002765299300, -0.000687773900}, - { -0.004491807700, 0.004485759300, -0.003394540900, 0.003088733700, - -0.003988893700, 0.007233613500, -0.017688142300, 0.304334966200, - 0.025753901000, -0.011523237400, 0.005793241800, -0.002076469800, - -0.000700635700, 0.002769352400, -0.002775689300, -0.000683225000}, - { -0.004473209500, 0.004457105300, -0.003360743400, 0.003025836900, - -0.003897094200, 0.007088896400, -0.017409498600, 0.304365892000, - 0.025458149700, -0.011421394400, 0.005759636500, -0.002069178100, - -0.000704737500, 0.002773610300, -0.002775967700, -0.000677353300}, - { -0.004444717000, 0.004428620600, -0.003317850200, 0.002964408100, - -0.003805137400, 0.006934475400, -0.017122233300, 0.304396703900, - 0.025171340700, -0.011324954000, 0.005713078000, -0.002053187900, - -0.000707171500, 0.002777897100, -0.002784864800, -0.000673385900}, - { -0.004427971200, 0.004410227500, -0.003284178700, 0.002910777700, - -0.003712463600, 0.006789868500, -0.016843034600, 0.304434316000, - 0.024877740200, -0.011222628000, 0.005678048700, -0.002036501400, - -0.000709968500, 0.002781813700, -0.002785075900, -0.000667608000}, - { -0.004408351500, 0.004381556100, -0.003250508600, 0.002848323700, - -0.003620768300, 0.006636493100, -0.016563520800, 0.304461685600, - 0.024583535100, -0.011127576100, 0.005631997300, -0.002020750200, - -0.000711766400, 0.002777270600, -0.002795722300, -0.000662778500}, - { -0.004380801100, 0.004354269100, -0.003209814400, 0.002797300300, - -0.003529018000, 0.006491186300, -0.016272419800, 0.304487711300, - 0.024298095100, -0.011022085400, 0.005594924600, -0.002002390300, - -0.000723818600, 0.002779372400, -0.002795073400, -0.000657344200}, - { -0.004364270700, 0.004336078200, -0.003175763900, 0.002735447600, - -0.003438518800, 0.006347319100, -0.015991075000, 0.304521224900, - 0.024006627800, -0.010927513200, 0.005549280000, -0.001994892300, - -0.000728568200, 0.002784856700, -0.002804663400, -0.000653083600}, - { -0.004346993300, 0.004309182300, -0.003144467600, 0.002683321200, - -0.003346361400, 0.006194068900, -0.015710304400, 0.304553789700, - 0.023714956500, -0.010823907600, 0.005513183700, -0.001977598200, - -0.000731700400, 0.002789105500, -0.002805014900, -0.000647228100}, - { -0.004320158000, 0.004282770700, -0.003104379700, 0.002625535200, - -0.003266869300, 0.006049293000, -0.015425894300, 0.304574941900, - 0.023422456600, -0.010718772800, 0.005467201200, -0.001961254600, - -0.000733852000, 0.002784613800, -0.002815797600, -0.000642092900}, - { -0.004304236600, 0.004265540900, -0.003072014700, 0.002573489500, - -0.003175720900, 0.005905217400, -0.015142040300, 0.304603952900, - 0.023132882500, -0.010623938900, 0.005429023200, -0.001942767200, - -0.000737686400, 0.002789011800, -0.002816103900, -0.000636395600}, - { -0.004276818000, 0.004239878600, -0.003041041300, 0.002513598800, - -0.003086221600, 0.005753037200, -0.014859275700, 0.304632697600, - 0.022842239000, -0.010518612100, 0.005382887800, -0.001926054500, - -0.000740960500, 0.002794055000, -0.002825655200, -0.000631862500}, - { -0.004260008200, 0.004213047800, -0.003001761400, 0.002464760300, - -0.002997005100, 0.005609909000, -0.014574287100, 0.304659243200, - 0.022552838800, -0.010413292700, 0.005336339900, -0.001909172200, - -0.000744164300, 0.002798242800, -0.002826051900, -0.000625856800}, - { -0.004243542100, 0.004187192800, -0.002971287100, 0.002405494900, - -0.002908733500, 0.005467214000, -0.014288738100, 0.304685251500, - 0.022254934400, -0.010309931700, 0.005299546400, -0.001891056000, - -0.000747532900, 0.002794490100, -0.002837320300, -0.000620567900}, - { -0.004219310800, 0.004172433300, -0.002940735300, 0.002355245100, - -0.002818772700, 0.005315723700, -0.014013384600, 0.304717226400, - 0.021968758500, -0.010213985000, 0.005251545400, -0.001873340800, - -0.000751378700, 0.002799287100, -0.002837812200, -0.000614775300}, - { -0.004202808100, 0.004145912600, -0.002901375100, 0.002298070200, - -0.002731549500, 0.005173599700, -0.013726605300, 0.304740017400, - 0.021680873600, -0.010108070800, 0.005204656900, -0.001863954900, - -0.000765887200, 0.002803718400, -0.002847187000, -0.000610304100}, - { -0.004186959300, 0.004120956700, -0.002872462400, 0.002248900100, - -0.002642744000, 0.005030699900, -0.013438827400, 0.304761759800, - 0.021384603000, -0.010003738700, 0.005166831300, -0.001845151700, - -0.000770115000, 0.002808540700, -0.002847973400, -0.000604129100}, - { -0.004163246800, 0.004106712900, -0.002842615100, 0.002191690700, - -0.002565148700, 0.004888119300, -0.013159535100, 0.304789228200, - 0.021099553600, -0.009897966800, 0.005119292900, -0.001827130700, - -0.000773711900, 0.002804989100, -0.002859183800, -0.000598855700}, - { -0.004147500100, 0.004081504200, -0.002805006000, 0.002144535400, - -0.002477149500, 0.004737013500, -0.012872591200, 0.304818061900, - 0.020805308800, -0.009792977800, 0.005071968700, -0.001809457700, - -0.000777559700, 0.002809924700, -0.002860138800, -0.000592610900}, - { -0.004123192100, 0.004058501200, -0.002776914700, 0.002087605700, - -0.002391051400, 0.004596104100, -0.012592772900, 0.304843748500, - 0.020512328500, -0.009688643500, 0.005033655500, -0.001789823800, - -0.000782738000, 0.002816043200, -0.002870343700, -0.000587752000}, - { -0.004107894100, 0.004034016500, -0.002748740500, 0.002039760600, - -0.002303557800, 0.004453794800, -0.012301966200, 0.304859324200, - 0.020227247700, -0.009581223300, 0.004984922000, -0.001771208200, - -0.000787003500, 0.002820817600, -0.002871029700, -0.000581575700}, - { -0.004093587400, 0.004018650800, -0.002710135300, 0.001984116400, - -0.002218448800, 0.004313763100, -0.012021363400, 0.304882818800, - 0.019935070200, -0.009475750900, 0.004936537800, -0.001751710900, - -0.000801110200, 0.002825556300, -0.002880712200, -0.000576816700}, - { -0.004070086100, 0.003996648800, -0.002683625100, 0.001937624600, - -0.002132234200, 0.004173020900, -0.011739650400, 0.304913195700, - 0.019645015200, -0.009370571700, 0.004888539700, -0.001733255400, - -0.000805210900, 0.002821862700, -0.002883172300, -0.000569990700}, - { -0.004055549600, 0.003973130000, -0.002656075600, 0.001882018300, - -0.002055659400, 0.004022181900, -0.011457786400, 0.304933847400, - 0.019354083600, -0.009265048200, 0.004849033400, -0.001712856100, - -0.000810671500, 0.002828266400, -0.002893561300, -0.000564955500}, - { -0.004032488300, 0.003959785900, -0.002619434800, 0.001836677600, - -0.001970197900, 0.003881652600, -0.011174339100, 0.304952581400, - 0.019063780300, -0.009158923400, 0.004800033700, -0.001693616200, - -0.000815677100, 0.002833775600, -0.002894695900, -0.000558583500}, - { -0.004018305800, 0.003936717300, -0.002592340800, 0.001781462400, - -0.001885730400, 0.003741264500, -0.010881885600, 0.304980747200, - 0.018774565100, -0.009052649800, 0.004751033800, -0.001674129700, - -0.000820954500, 0.002840026900, -0.002905324000, -0.000553421000}, - { -0.004004119100, 0.003913332400, -0.002556816600, 0.001736945200, - -0.001801009400, 0.003601134500, -0.010596860500, 0.304996474100, - 0.018485752400, -0.008946113900, 0.004701589700, -0.001654657700, - -0.000825608000, 0.002836444100, -0.002907704700, -0.000546470300}, - { -0.003981307700, 0.003892381100, -0.002531656000, 0.001692059700, - -0.001716342200, 0.003461182700, -0.010312015500, 0.305021093200, - 0.018188790800, -0.008840558000, 0.004652450700, -0.001634950600, - -0.000831250300, 0.002843043800, -0.002918541200, -0.000541059600}, - { -0.003968435100, 0.003879253900, -0.002504378200, 0.001637657900, - -0.001641796500, 0.003321126400, -0.010034991200, 0.305033298300, - 0.017901410200, -0.008734196000, 0.004611510300, -0.001612810100, - -0.000846731600, 0.002848150100, -0.002919339300, -0.000534931600}, - { -0.003945651400, 0.003857769000, -0.002470181000, 0.001594324200, - -0.001558137300, 0.003181615900, -0.009748599800, 0.305054496900, - 0.017615006900, -0.008627194900, 0.004561274000, -0.001592429500, - -0.000852704600, 0.002854820400, -0.002930099600, -0.000529601300}, - { -0.003932401200, 0.003836006300, -0.002444849800, 0.001541005000, - -0.001475450400, 0.003042687600, -0.009461842200, 0.305074913300, - 0.017319625600, -0.008512038500, 0.004512760300, -0.001572829300, - -0.000857749800, 0.002851744600, -0.002933011700, -0.000522254800}, - { -0.003919897700, 0.003823612700, -0.002418783000, 0.001496396500, - -0.001391517800, 0.002903186600, -0.009174192300, 0.305093771700, - 0.017034066400, -0.008404468200, 0.004462029400, -0.001552015500, - -0.000863995200, 0.002858545300, -0.002943863500, -0.000516831700}, - { -0.003898001300, 0.003803145000, -0.002385302500, 0.001445432500, - -0.001319345500, 0.002764325800, -0.008895401800, 0.305119193600, - 0.016741989300, -0.008298811000, 0.004411842900, -0.001531072000, - -0.000870352000, 0.002865288500, -0.002945799600, -0.000510187200}, - { -0.003884434400, 0.003781771800, -0.002360832800, 0.001401956000, - -0.001236297400, 0.002625496200, -0.008606633700, 0.305135746300, - 0.016448378400, -0.008191697200, 0.004360886000, -0.001509538700, - -0.000886061100, 0.002871262500, -0.002956450800, -0.000504731900}, - { -0.003862439200, 0.003761723500, -0.002336945300, 0.001350046400, - -0.001154788900, 0.002487086200, -0.008316860100, 0.305150388000, - 0.016155288200, -0.008075516000, 0.004311149200, -0.001488975800, - -0.000891753800, 0.002868512700, -0.002959470700, -0.000497291200}, - { -0.003850712800, 0.003749888800, -0.002302777900, 0.001307766700, - -0.001072739500, 0.002349092100, -0.008036267100, 0.305171969300, - 0.015873669900, -0.007967928800, 0.004259593600, -0.001467267200, - -0.000898797900, 0.002875940200, -0.002970642300, -0.000491739700}, - { -0.003838542900, 0.003729366300, -0.002278849600, 0.001256255000, - -0.001000782800, 0.002210354400, -0.007754203600, 0.305182829200, - 0.015582827100, -0.007861128300, 0.004217388300, -0.001444400500, - -0.000906121000, 0.002883075100, -0.002972661400, -0.000485004200}, - { -0.003816509300, 0.003709864100, -0.002256106400, 0.001214479000, - -0.000919168800, 0.002072061100, -0.007462776200, 0.305202709200, - 0.015292286200, -0.007744430700, 0.004166752200, -0.001423103300, - -0.000912804200, 0.002890024200, -0.002974973900, -0.000478005400}, - { -0.003804721500, 0.003689540000, -0.002223798900, 0.001173609200, - -0.000838292300, 0.001934852000, -0.007180134300, 0.305220409100, - 0.015003290600, -0.007637074700, 0.004114765900, -0.001400660100, - -0.000929037200, 0.002887514500, -0.002986971300, -0.000471906600}, - { -0.003784248300, 0.003679910900, -0.002200335400, 0.001122795500, - -0.000758115600, 0.001797689700, -0.006896906600, 0.305236860000, - 0.014714266400, -0.007520350800, 0.004063782200, -0.001378788100, - -0.000936224300, 0.002894831400, -0.002989337500, -0.000464860200}, - { -0.003772222700, 0.003660354300, -0.002177942800, 0.001082013300, - -0.000686657100, 0.001659411900, -0.006612456400, 0.305252141100, - 0.014416934300, -0.007413160700, 0.004011606300, -0.001356286200, - -0.000943766600, 0.002902744400, -0.003001127800, -0.000458704700}, - { -0.003751272400, 0.003641224700, -0.002146282400, 0.001032856600, - -0.000607494800, 0.001522406400, -0.006318495400, 0.305266353700, - 0.014129397200, -0.007305163600, 0.003959036100, -0.001333568200, - -0.000951286800, 0.002910117000, -0.003003554800, -0.000451769900}, - { -0.003740453600, 0.003631277700, -0.002123501700, 0.000991980200, - -0.000527217900, 0.001385321000, -0.006032900700, 0.305278786000, - 0.013842019100, -0.007187486600, 0.003906976500, -0.001311089600, - -0.000958623000, 0.002908760100, -0.003016231600, -0.000445068000}, - { -0.003729050600, 0.003612350900, -0.002101520100, 0.000942775500, - -0.000457538900, 0.001248307000, -0.005747166800, 0.305299153300, - 0.013547492500, -0.007080269600, 0.003854346300, -0.001287607700, - -0.000975892700, 0.002915881100, -0.003018644300, -0.000438154800}, - { -0.003708956400, 0.003594054000, -0.002071214100, 0.000903979800, - -0.000378641900, 0.001112105700, -0.005469551400, 0.305307792800, - 0.013261923500, -0.006962423800, 0.003801673700, -0.001264499500, - -0.000984066100, 0.002924143600, -0.003030515100, -0.000431795400}, - { -0.003698495600, 0.003575779100, -0.002050276300, 0.000864607400, - -0.000299850300, 0.000984943000, -0.005181636100, 0.305325129100, - 0.012968326800, -0.006845375400, 0.003749292200, -0.001241358200, - -0.000992319500, 0.002932209100, -0.003033543100, -0.000424402600}, - { -0.003678810800, 0.003567216600, -0.002028355600, 0.000815922500, - -0.000231056700, 0.000848238100, -0.004893293600, 0.305331925800, - 0.012683638900, -0.006736106600, 0.003694939000, -0.001207958100, - -0.000999989700, 0.002940099300, -0.003045285600, -0.000418160500}, - { -0.003668399300, 0.003548917800, -0.001998535200, 0.000778065700, - -0.000153154100, 0.000712646300, -0.004604878800, 0.305346710600, - 0.012391231100, -0.006618462800, 0.003632680800, -0.001185043200, - -0.001017024400, 0.002938122000, -0.003048768800, -0.000410416700}, - { -0.003658356000, 0.003531138400, -0.001977775600, 0.000729983100, - -0.000075620500, 0.000577290600, -0.004325205000, 0.305359759100, - 0.012099735200, -0.006510233800, 0.003578931400, -0.001160855500, - -0.001026023300, 0.002947019900, -0.003061151700, -0.000403882200}, - { -0.003638938800, 0.003514164000, -0.001958085100, 0.000692151600, - -0.000007068200, 0.000440667500, -0.004034754500, 0.305371538600, - 0.011808326800, -0.006392102100, 0.003525266500, -0.001136761300, - -0.001034693000, 0.002955492900, -0.003064410600, -0.000396332400}, - { -0.003629223000, 0.003505495000, -0.001927947000, 0.000654411200, - 0.000070163400, 0.000314498600, -0.003743576500, 0.305382025700, - 0.011526826700, -0.006273264800, 0.003470974700, -0.001112218000, - -0.001043813600, 0.002964194700, -0.003076842200, -0.000389669200}, - { -0.003610639600, 0.003489057800, -0.001908316200, 0.000607413700, - 0.000146785300, 0.000179544400, -0.003461481100, 0.305390383500, - 0.011237344100, -0.006164483000, 0.003416433800, -0.001087365200, - -0.001053001800, 0.002963790800, -0.003080805300, -0.000381874300}, - { -0.003601269100, 0.003472094500, -0.001888981300, 0.000570197700, - 0.000214496100, 0.000043993500, -0.003178921900, 0.305407159000, - 0.010948594500, -0.006046137200, 0.003362096800, -0.001062345400, - -0.001071720100, 0.002972423700, -0.003093318200, -0.000375146000}, - { -0.003582656500, 0.003455849400, -0.001860858600, 0.000524745900, - 0.000290078700, -0.000090648300, -0.002886387300, 0.305413750100, - 0.010650492300, -0.005928189500, 0.003307938500, -0.001037636700, - -0.001081004600, 0.002981370000, -0.003096989400, -0.000367260100}, - { -0.003573744000, 0.003448505600, -0.001841238600, 0.000487681400, - 0.000357013800, -0.000216601600, -0.002601772700, 0.305427509700, - 0.010362986600, -0.005809448800, 0.003252789700, -0.001002860000, - -0.001090243800, 0.002990478200, -0.003109808600, -0.000360263700}, - { -0.003564774200, 0.003431922800, -0.001822254600, 0.000451135800, - 0.000433003700, -0.000351097200, -0.002316996000, 0.305430485400, - 0.010075840400, -0.005699440100, 0.003187647900, -0.000977716300, - -0.001099777400, 0.002990283900, -0.003113898000, -0.000352248700}, - { -0.003546870600, 0.003416172000, -0.001794658100, 0.000406472900, - 0.000498512700, -0.000485477300, -0.002031776000, 0.305441562500, - 0.009789706100, -0.005580569300, 0.003132334500, -0.000951776200, - -0.001119130300, 0.002999325200, -0.003126683700, -0.000345274700}, - { -0.003538373300, 0.003400302700, -0.001776549100, 0.000370535700, - 0.000573925900, -0.000610465300, -0.001745336100, 0.305451127000, - 0.009494961400, -0.005461903400, 0.003077019500, -0.000925937200, - -0.001129494000, 0.003009011500, -0.003130746200, -0.000337260000}, - { -0.003520921500, 0.003394346200, -0.001758288700, 0.000334721100, - 0.000649268300, -0.000744677800, -0.001458744900, 0.305459744400, - 0.009209557400, -0.005342285700, 0.003021134300, -0.000899901500, - -0.001139831400, 0.003018842400, -0.003144017200, -0.000329970400}, - { -0.003512573100, 0.003378711000, -0.001740435500, 0.000290089600, - 0.000714234800, -0.000869571200, -0.001170623500, 0.305466205000, - 0.008916237200, -0.005223260400, 0.002965177700, -0.000873315500, - -0.001150412500, 0.003019394800, -0.003148759600, -0.000321551300}, - { -0.003495167000, 0.003363569600, -0.001713789300, 0.000255669300, - 0.000788301700, -0.001002806300, -0.000882964600, 0.305471690900, - 0.008632676200, -0.005103588900, 0.002908698000, -0.000837361100, - -0.001169925400, 0.003028499400, -0.003152349500, -0.000313813200}, - { -0.003486840300, 0.003348178400, -0.001696380900, 0.000211810600, - 0.000852586500, -0.001136564500, -0.000594272800, 0.305476029500, - 0.008340196300, -0.004983911700, 0.002842935600, -0.000811096700, - -0.001180375200, 0.003038511100, -0.003165955700, -0.000306075200}, - { -0.003469765900, 0.003343036000, -0.001679160000, 0.000177135000, - 0.000926754800, -0.001260861000, -0.000304469600, 0.305487970600, - 0.008048797600, -0.004864404400, 0.002786310700, -0.000784087900, - -0.001191632000, 0.003048908400, -0.003170531700, -0.000297868500}, - { -0.003461774600, 0.003327682700, -0.001652648300, 0.000143244500, - 0.000990953800, -0.001394377600, -0.000023525100, 0.305488765700, - 0.007767318900, -0.004744017700, 0.002728774500, -0.000756520300, - -0.001202902100, 0.003050026400, -0.003184579100, -0.000289997500}, - { -0.003454137100, 0.003313035200, -0.001636003800, 0.000099881700, - 0.001063982400, -0.001517720800, 0.000267125500, 0.305498083700, - 0.007477414500, -0.004624290900, 0.002671831100, -0.000729004800, - -0.001223831900, 0.003060168000, -0.003188993500, -0.000281862900}, - { -0.003437037600, 0.003298773100, -0.001619778200, 0.000066556300, - 0.001127390700, -0.001650952000, 0.000558741700, 0.305505931400, - 0.007187871700, -0.004503987800, 0.002604895500, -0.000692451500, - -0.001234554400, 0.003070451600, -0.003202910800, -0.000273917600}, - { -0.003429250800, 0.003293434500, -0.001593584100, 0.000033135500, - 0.001200242700, -0.001774239400, 0.000841583200, 0.305502674600, - 0.006898956800, -0.004383683600, 0.002546976200, -0.000664350300, - -0.001246591800, 0.003081283900, -0.003207541700, -0.000265507200}, - { -0.003412490900, 0.003279564200, -0.001577770500, -0.000009313800, - 0.001263167800, -0.001906951100, 0.001124928200, 0.305507531700, - 0.006610834100, -0.004263249000, 0.002489119800, -0.000636159800, - -0.001267872500, 0.003091948000, -0.003221504300, -0.000257636700}, - { -0.003404731400, 0.003265175300, -0.001561789400, -0.000042083300, - 0.001335330400, -0.002029953100, 0.001418764600, 0.305510887600, - 0.006323528600, -0.004142487600, 0.002421344900, -0.000607985400, - -0.001279946600, 0.003093528500, -0.003226864100, -0.000248796500}, - { -0.003388377600, 0.003251864100, -0.001537100900, -0.000074381800, - 0.001397822300, -0.002153295800, 0.001704243000, 0.305521780500, - 0.006027997600, -0.004022334800, 0.002362991000, -0.000569919800, - -0.001292085400, 0.003104789400, -0.003241453500, -0.000240501100}, - { -0.003380795000, 0.003247258700, -0.001521319900, -0.000116373400, - 0.001469413800, -0.002285243100, 0.001989240500, 0.305522735200, - 0.005741703600, -0.003901387700, 0.002304368000, -0.000541061900, - -0.001304684500, 0.003116275100, -0.003246569900, -0.000231910300}, - { -0.003373394500, 0.003233233200, -0.001505753800, -0.000148571000, - 0.001531547700, -0.002407952000, 0.002275511400, 0.305521935800, - 0.005456280000, -0.003780111100, 0.002235803700, -0.000512158000, - -0.001326570100, 0.003127233900, -0.003260822600, -0.000223661700}, - { -0.003356689400, 0.003220032300, -0.001491017200, -0.000180271600, - 0.001602837600, -0.002530584900, 0.002572382100, 0.305528831700, - 0.005162307100, -0.003658974500, 0.002176562700, -0.000482746700, - -0.001339690600, 0.003129659400, -0.003266806700, -0.000214552200}, - { -0.003349458000, 0.003206380900, -0.001466550800, -0.000211731900, - 0.001663994200, -0.002662171400, 0.002859642300, 0.305525209100, - 0.004878336100, -0.003537488300, 0.002116848800, -0.000443644700, - -0.001352471400, 0.003141260600, -0.003272003200, -0.000205837900}, - { -0.003332926300, 0.003202823300, -0.001452058900, -0.000252375300, - 0.001725095700, -0.002784621900, 0.003148416400, 0.305529242100, - 0.004585797400, -0.003406922200, 0.002048118400, -0.000414183100, - -0.001365477700, 0.003153111900, -0.003287185700, -0.000196877000}, - { -0.003326162500, 0.003189613400, -0.001437413900, -0.000283721000, - 0.001795892300, -0.002906671400, 0.003427783000, 0.305532062500, - 0.004303401100, -0.003285234700, 0.001988112900, -0.000384077600, - -0.001388720100, 0.003165263500, -0.003292642400, -0.000188174200}, - { -0.003309959200, 0.003176999800, -0.001413956600, -0.000314280200, - 0.001856478200, -0.003038205600, 0.003717851500, 0.305533321300, - 0.004012019600, -0.003163333400, 0.001927602200, -0.000353662500, - -0.001402398400, 0.003168136400, -0.003308169600, -0.000179151700} -}; - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvertedStationPPFWeights.h b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvertedStationPPFWeights.h deleted file mode 100644 index 8417f7205c5e477b9a1705f7f29eb2850944c97f..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/InvertedStationPPFWeights.h +++ /dev/null @@ -1,28 +0,0 @@ -//# InvertedStationPPFWeights.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_INVERTED_STATION_PPF_WEIGHTS_H -#define LOFAR_GPUPROC_INVERTED_STATION_PPF_WEIGHTS_H - -extern int reverseSubbandMapping[512]; -extern const float invertedStationPPFWeights[1024][16] __attribute__ ((aligned(32))); - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Transpose.cl b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Transpose.cl deleted file mode 100644 index 11ab07ec679d8a5fbbc8f9b46c245949a07e0575..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Transpose.cl +++ /dev/null @@ -1,64 +0,0 @@ -//# Transpose.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -typedef __global float2 (*TransposedDataType)[NR_TABS][NR_POLARIZATIONS][NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1][512]; -typedef __global float4 (*ComplexVoltagesType)[NR_SUBBANDS][NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1][NR_TABS]; - - -__kernel void UHEP_Transpose(__global void *restrict transposedDataPtr, - __global const void *restrict complexVoltagesPtr, - __global int reverseSubbandMapping[512]) -{ - TransposedDataType transposedData = (TransposedDataType) transposedDataPtr; - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - - __local float4 tmp[16][17]; - - uint tabBase = 16 * get_global_id(1); - uint sbBase = 16 * get_global_id(2); - - uint tabOffsetR = get_local_id(0) & 15; - uint tabR = tabBase + tabOffsetR; - uint sbOffsetR = get_local_id(0) >> 4; - int sbSourceR = reverseSubbandMapping[sbBase + sbOffsetR]; - bool doR = (NR_TABS % 16 == 0 || tabR < NR_TABS) && sbSourceR >= 0; - - uint tabOffsetW = get_local_id(0) >> 4; - uint tabW = tabBase + tabOffsetW; - uint sbOffsetW = get_local_id(0) & 15; - int sbSourceW = reverseSubbandMapping[sbBase + sbOffsetW]; - bool doW = NR_TABS % 16 == 0 || tabW < NR_TABS; - - for (int time = 0; time < NR_SAMPLES_PER_SUBBAND + NR_STATION_FILTER_TAPS - 1; time++) { - if (doR) - tmp[tabOffsetR][sbOffsetR] = (*complexVoltages)[sbSourceR][time][tabR]; - - barrier(CLK_LOCAL_MEM_FENCE); - - if (doW) { - float4 sample = sbSourceW >= 0 ? tmp[tabOffsetW][sbOffsetW] : 0; - (*transposedData)[tabW][0][time][sbBase + sbOffsetW] = sample.xy; - (*transposedData)[tabW][1][time][sbBase + sbOffsetW] = sample.zw; - } - - barrier(CLK_LOCAL_MEM_FENCE); - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Transpose.cl.ok b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Transpose.cl.ok deleted file mode 100644 index ee69f40aa438d01e9a8007cb22c4aff8768d93c5..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Transpose.cl.ok +++ /dev/null @@ -1,36 +0,0 @@ -typedef __global float2 (*TransposedDataType)[NR_TABS][NR_POLARIZATIONS][NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1][512]; -typedef __global float2 (*ComplexVoltagesType)[NR_SUBBANDS][NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1][NR_TABS][NR_POLARIZATIONS]; - - -__kernel void UHEP_Transpose(__global void *restrict transposedDataPtr, - __global const void *restrict complexVoltagesPtr, - __global int reverseSubbandMapping[512]) -{ - TransposedDataType transposedData = (TransposedDataType) transposedDataPtr; - ComplexVoltagesType complexVoltages = (ComplexVoltagesType) complexVoltagesPtr; - - __local float2 tmp[16][17][2]; - - uint base_tab = 16 * get_group_id(1); - uint base_sb = 16 * get_group_id(2); - uint pol = get_global_id(0); - uint id_1 = get_local_id(1); - uint id_2 = get_local_id(2); - int source_sb_1 = reverseSubbandMapping[base_sb + id_1]; - int source_sb_2 = reverseSubbandMapping[base_sb + id_2]; - - for (int time = 0; time < NR_TIMES_PER_BLOCK + NR_STATION_FILTER_TAPS - 1; time++) { - if (NR_TABS % 16 == 0 || base_tab + id_1 < NR_TABS) - if (source_sb_2 >= 0) - tmp[id_2][id_1][pol] = (*complexVoltages)[source_sb_2][time][base_tab + id_1][pol]; - - barrier(CLK_LOCAL_MEM_FENCE); - - if (NR_TABS % 16 == 0 || base_tab + id_2 < NR_TABS) { - float2 sample = source_sb_1 >= 0 ? tmp[id_1][id_2][pol] : 0; - (*transposedData)[base_tab + id_2][pol][time][base_sb + id_1] = sample; - } - - barrier(CLK_LOCAL_MEM_FENCE); - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Trigger.cl b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Trigger.cl deleted file mode 100644 index 602a0b0ce2752503fac37f19d1640860444aefa7..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Trigger.cl +++ /dev/null @@ -1,174 +0,0 @@ -//# Trigger.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -typedef __global struct { - float mean, variance, bestValue; - uint bestApproxIndex; -} (*TriggerInfoType)[NR_TABS]; - -typedef __global float (*InvFIRfilteredDataType)[NR_TABS][NR_POLARIZATIONS][16][16][NR_SAMPLES_PER_SUBBAND / 4][16]; - - -#if 0 -float2 computeThreshold(__global const float *invFIRfilteredDataPtr) -{ - float M = 0, S = 0; - uint count = 0; - - for (uint i = get_local_id(0); i < sizeof(InvFIRfilteredDataType) / sizeof(float); i += get_local_size(0)) { - ++count; - float sample = invFIRfilteredDataPtr[i]; - float t = sample - M; - M += t / count; - S += t * (sample - M); - } - - barrier(CLK_GLOBAL_MEM_FENCE); - - __local float2 local_MS[256]; - - local_MS[get_local_id(0)] = (float2) (M, S); - - for (uint i = get_local_size(0); (i >>= 1) != 0; ) { - barrier(CLK_LOCAL_MEM_FENCE); - - if (get_local_id(0) < i) - local_MS[get_local_id(0)] += local_MS[get_local_id(0) + i]; - } - - if (get_local_id(0) == 0) - local_MS[0].y = native_sqrt(local_MS[0].y); - - barrier(CLK_LOCAL_MEM_FENCE); - return local_MS[0]; -} -#endif - - -__kernel void trigger(__global const void *triggerInfoPtr, - __global const float *invFIRfilteredDataPtr) -{ - TriggerInfoType triggerInfo = (TriggerInfoType) triggerInfoPtr; - InvFIRfilteredDataType invFIRfilteredData = (InvFIRfilteredDataType) invFIRfilteredDataPtr; - - uint minor = get_local_id(0); - uint major = get_local_id(1); - uint me = 16 * major + minor; - uint tab = get_global_id(2); - - float mean = 0, sumsqdiff = 0; - float count = 0; - - __local union { - float f[16][16][16]; - float16 f16[16][16]; - struct { - float means[256], sumsqdiffs[256], values[256]; - uint approxIndices[256]; - } best; - } tmp; - - float16 h0, h1; - h1 /*.s789ABCDEF*/ = 0; - float16 sum_0; - float bestValue = 0; - uint bestApproxIndex = 0; - - for (uint time = 0; time < 1024 * NR_SAMPLES_PER_SUBBAND / 4096; time++) { - for (uint i = 0; i < 16; i++) { - float sampleX = (*invFIRfilteredData)[tab][0][i][major][time][minor]; - float sampleY = (*invFIRfilteredData)[tab][1][i][major][time][minor]; - float power = sampleX * sampleX + sampleY * sampleY; - tmp.f[i][major][minor] = power; - - count += 1.0f; - float delta = power - mean; - mean += delta / count; - sumsqdiff += delta * (power - mean); - } - - barrier(CLK_LOCAL_MEM_FENCE); - - h0 = tmp.f16[major][minor]; - - sum_0.s0 = sum_0.sF + h0.s0 - h1.s5; - sum_0.s1 = sum_0.s0 + h0.s1 - h1.s6; - sum_0.s2 = sum_0.s1 + h0.s2 - h1.s7; - sum_0.s3 = sum_0.s2 + h0.s3 - h1.s8; - sum_0.s4 = sum_0.s3 + h0.s4 - h1.s9; - sum_0.s5 = sum_0.s4 + h0.s5 - h1.sA; - sum_0.s6 = sum_0.s5 + h0.s6 - h1.sB; - sum_0.s7 = sum_0.s6 + h0.s7 - h1.sC; - sum_0.s8 = sum_0.s7 + h0.s8 - h1.sD; - sum_0.s9 = sum_0.s8 + h0.s9 - h1.sE; - sum_0.sA = sum_0.s9 + h0.sA - h1.sF; - sum_0.sB = sum_0.sA + h0.sB - h0.s0; - sum_0.sC = sum_0.sB + h0.sC - h0.s1; - sum_0.sD = sum_0.sC + h0.sD - h0.s2; - sum_0.sE = sum_0.sD + h0.sE - h0.s3; - sum_0.sF = sum_0.sE + h0.sF - h0.s4; - - float m0 = max(max(sum_0.s0, sum_0.s1), max(sum_0.s2, sum_0.s3)); - float m1 = max(max(sum_0.s4, sum_0.s5), max(sum_0.s6, sum_0.s7)); - float m2 = max(max(sum_0.s8, sum_0.s9), max(sum_0.sA, sum_0.sB)); - float m3 = max(max(sum_0.sC, sum_0.sD), max(sum_0.sE, sum_0.sF)); - float m = max(max(m0, m1), max(m2, m3)); - - if (m >= bestValue) { - bestValue = m; - bestApproxIndex = me * 1024 * NR_SAMPLES_PER_SUBBAND / 256 + time * 16; - } - - h1 /*.s56789ABCDEF*/ = h0 /*.s56789ABCDEF*/; - - barrier(CLK_LOCAL_MEM_FENCE); - } - - tmp.best.means[me] = mean; - tmp.best.sumsqdiffs[me] = sumsqdiff; - tmp.best.values[me] = bestValue; - tmp.best.approxIndices[me] = bestApproxIndex; - - for (uint i = 256; (i >>= 1) != 0; ) { - if (me < i) { - float meanA = tmp.best.means[me], meanB = tmp.best.means[me + i]; - float sumsqdiffA = tmp.best.sumsqdiffs[me], sumsqdiffB = tmp.best.sumsqdiffs[me + i]; - float delta = meanB - meanA; - tmp.best.means[me] = (meanA + meanB) / 2; - tmp.best.sumsqdiffs[me] = sumsqdiffA + sumsqdiffB + delta * delta * count / 2; - count *= 2; - - if (tmp.best.values[me] < tmp.best.values[me + i]) { - tmp.best.values[me] = tmp.best.values[me + i]; - tmp.best.approxIndices[me] = tmp.best.approxIndices[me + i]; - } - } - - barrier(CLK_LOCAL_MEM_FENCE); - } - - if (me == 0) { - (*triggerInfo)[tab].mean = tmp.best.means[0]; - (*triggerInfo)[tab].variance = tmp.best.sumsqdiffs[0] / (count - 1); - (*triggerInfo)[tab].bestValue = tmp.best.values[0]; - (*triggerInfo)[tab].bestApproxIndex = tmp.best.approxIndices[0]; - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Trigger.cl.8 b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Trigger.cl.8 deleted file mode 100644 index c0503a6eda5481cf12f4db098f1ac124f7d180a8..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Trigger.cl.8 +++ /dev/null @@ -1,125 +0,0 @@ -typedef __global struct { - float bestValue; - uint bestApproxIndex; -} (*TriggerInfoType)[NR_TABS]; - -typedef __global float (*InvFIRfilteredDataType)[NR_TABS][NR_POLARIZATIONS][8][32][NR_TIMES_PER_BLOCK / 2][8]; - - -float2 computeThreshold(__global const float *invFIRfilteredDataPtr) -{ - float M = 0, S = 0; - uint count = 0; - - for (uint i = get_local_id(0); i < sizeof(InvFIRfilteredDataType) / sizeof(float); i += get_local_size(0)) { - ++count; - float sample = invFIRfilteredDataPtr[i]; - float t = sample - M; - M += t / count; - S += t * (sample - M); - } - - barrier(CLK_GLOBAL_MEM_FENCE); - - __local float2 local_MS[256]; - - local_MS[get_local_id(0)] = (float2) (M, S); - - for (uint i = get_local_size(0); (i >>= 1) != 0; ) { - barrier(CLK_LOCAL_MEM_FENCE); - - if (get_local_id(0) < i) - local_MS[get_local_id(0)] += local_MS[get_local_id(0) + i]; - } - - if (get_local_id(0) == 0) - local_MS[0].y = native_sqrt(local_MS[0].y); - - barrier(CLK_LOCAL_MEM_FENCE); - return local_MS[0]; -} - - -__kernel void trigger(__global const void *triggerInfoPtr, - __global const float *invFIRfilteredDataPtr) -{ - TriggerInfoType triggerInfo = (TriggerInfoType) triggerInfoPtr; - InvFIRfilteredDataType invFIRfilteredData = (InvFIRfilteredDataType) invFIRfilteredDataPtr; - - uint minor = get_local_id(0); - uint major = get_local_id(1); - uint me = 8 * major + minor; - uint tab = get_global_id(2); - - __local union { - float f[8][32][8]; - float8 f8[32][8]; - struct { - float values[256]; - uint approxIndices[256]; - } best; - } tmp; - - float8 h0, h1, h2; - h1 = 0; - h2.s567 = 0; - float8 sum_0; - float bestValue = 0; - uint bestApproxIndex = 0; - - for (uint time = 0; time < 1024 * NR_TIMES_PER_BLOCK / 2048; time++) { - for (uint i = 0; i < 8; i++) { - float sampleX = (*invFIRfilteredData)[tab][0][i][major][time][minor]; - float sampleY = (*invFIRfilteredData)[tab][1][i][major][time][minor]; - float power = sampleX * sampleX + sampleY * sampleY; - tmp.f[i][major][minor] = power; - } - - barrier(CLK_LOCAL_MEM_FENCE); - - h0 = tmp.f8[major][minor]; - - sum_0.s0 = sum_0.s7 + h0.s0 - h2.s5; - sum_0.s1 = sum_0.s0 + h0.s1 - h2.s6; - sum_0.s2 = sum_0.s1 + h0.s2 - h2.s7; - sum_0.s3 = sum_0.s2 + h0.s3 - h1.s0; - sum_0.s4 = sum_0.s3 + h0.s4 - h1.s1; - sum_0.s5 = sum_0.s4 + h0.s5 - h1.s2; - sum_0.s6 = sum_0.s5 + h0.s6 - h1.s3; - sum_0.s7 = sum_0.s6 + h0.s7 - h1.s4; - - float m0 = max(max(sum_0.s0, sum_0.s1), max(sum_0.s2, sum_0.s3)); - float m1 = max(max(sum_0.s4, sum_0.s5), max(sum_0.s6, sum_0.s7)); - float m = max(m0, m1); - - if (m >= bestValue) { - bestValue = m; - bestApproxIndex = me * 1024 * NR_TIMES_PER_BLOCK / 256 + time * 8; - } - - h2.s567 = h1.s567; - h1 = h0; - - barrier(CLK_LOCAL_MEM_FENCE); - } - - - tmp.best.values[me] = bestValue; - tmp.best.approxIndices[me] = bestApproxIndex; - - for (uint i = 256; (i >>= 1) != 0; ) { - if (me < i) { - if (tmp.best.values[me] < tmp.best.values[me + i]) { - tmp.best.values[me] = tmp.best.values[me + i]; - tmp.best.approxIndices[me] = tmp.best.approxIndices[me + i]; - } - } - - barrier(CLK_LOCAL_MEM_FENCE); - } - - if (me == 0) { - (*triggerInfo)[tab].bestValue = tmp.best.values[0]; - (*triggerInfo)[tab].bestApproxIndex = tmp.best.approxIndices[0]; - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Trigger.cl.ok b/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Trigger.cl.ok deleted file mode 100644 index 9d15d28152f6d9cb448b5cc7005c1d7defa91e03..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/UHEP/Trigger.cl.ok +++ /dev/null @@ -1,133 +0,0 @@ -typedef __global struct { - float bestValue; - uint bestApproxIndex; -} (*TriggerInfoType)[NR_TABS]; - -typedef __global float (*InvFIRfilteredDataType)[NR_TABS][NR_POLARIZATIONS][16][16][NR_TIMES_PER_BLOCK / 4][16]; - - -float2 computeThreshold(__global const float *invFIRfilteredDataPtr) -{ - float M = 0, S = 0; - uint count = 0; - - for (uint i = get_local_id(0); i < sizeof(InvFIRfilteredDataType) / sizeof(float); i += get_local_size(0)) { - ++count; - float sample = invFIRfilteredDataPtr[i]; - float t = sample - M; - M += t / count; - S += t * (sample - M); - } - - barrier(CLK_GLOBAL_MEM_FENCE); - - __local float2 local_MS[256]; - - local_MS[get_local_id(0)] = (float2) (M, S); - - for (uint i = get_local_size(0); (i >>= 1) != 0; ) { - barrier(CLK_LOCAL_MEM_FENCE); - - if (get_local_id(0) < i) - local_MS[get_local_id(0)] += local_MS[get_local_id(0) + i]; - } - - if (get_local_id(0) == 0) - local_MS[0].y = native_sqrt(local_MS[0].y); - - barrier(CLK_LOCAL_MEM_FENCE); - return local_MS[0]; -} - - -__kernel void trigger(__global const void *triggerInfoPtr, - __global const float *invFIRfilteredDataPtr) -{ - TriggerInfoType triggerInfo = (TriggerInfoType) triggerInfoPtr; - InvFIRfilteredDataType invFIRfilteredData = (InvFIRfilteredDataType) invFIRfilteredDataPtr; - - uint minor = get_local_id(0); - uint major = get_local_id(1); - uint me = 16 * major + minor; - uint tab = get_global_id(2); - - __local union { - float f[16][16][16]; - float16 f16[16][16]; - struct { - float values[256]; - uint approxIndices[256]; - } best; - } tmp; - - float16 h0, h1; - h1.s789ABCDEF = 0; - float16 sum_0, sum_1; - float bestValue = 0; - uint bestApproxIndex = 0; - - for (uint time = 0; time < 1024 * NR_TIMES_PER_BLOCK / 4096; time++) { - for (uint i = 0; i < 16; i++) { - float sampleX = (*invFIRfilteredData)[tab][0][i][major][time][minor]; - float sampleY = (*invFIRfilteredData)[tab][1][i][major][time][minor]; - float power = sampleX * sampleX + sampleY * sampleY; - tmp.f[i][major][minor] = power; - } - - barrier(CLK_LOCAL_MEM_FENCE); - - h0 = tmp.f16[major][minor]; - - sum_0.s0 = sum_0.sF + h0.s0 - h1.s5; - sum_0.s1 = sum_0.s0 + h0.s1 - h1.s6; - sum_0.s2 = sum_0.s1 + h0.s2 - h1.s7; - sum_0.s3 = sum_0.s2 + h0.s3 - h1.s8; - sum_0.s4 = sum_0.s3 + h0.s4 - h1.s9; - sum_0.s5 = sum_0.s4 + h0.s5 - h1.sA; - sum_0.s6 = sum_0.s5 + h0.s6 - h1.sB; - sum_0.s7 = sum_0.s6 + h0.s7 - h1.sC; - sum_0.s8 = sum_0.s7 + h0.s8 - h1.sD; - sum_0.s9 = sum_0.s8 + h0.s9 - h1.sE; - sum_0.sA = sum_0.s9 + h0.sA - h1.sF; - sum_0.sB = sum_0.sA + h0.sB - h0.s0; - sum_0.sC = sum_0.sB + h0.sC - h0.s1; - sum_0.sD = sum_0.sC + h0.sD - h0.s2; - sum_0.sE = sum_0.sD + h0.sE - h0.s3; - sum_0.sF = sum_0.sE + h0.sF - h0.s4; - - float m0 = max(max(sum_0.s0, sum_0.s1), max(sum_0.s2, sum_0.s3)); - float m1 = max(max(sum_0.s4, sum_0.s5), max(sum_0.s6, sum_0.s7)); - float m2 = max(max(sum_0.s8, sum_0.s9), max(sum_0.sA, sum_0.sB)); - float m3 = max(max(sum_0.sC, sum_0.sD), max(sum_0.sE, sum_0.sF)); - float m = max(max(m0, m1), max(m2, m3)); - - if (m >= bestValue) { - bestValue = m; - bestApproxIndex = me * 1024 * NR_TIMES_PER_BLOCK / 256 + time * 16; - } - - h1.s56789ABCDEF = h0.s56789ABCDEF; - - barrier(CLK_LOCAL_MEM_FENCE); - } - - - tmp.best.values[me] = bestValue; - tmp.best.approxIndices[me] = bestApproxIndex; - - for (uint i = 256; (i >>= 1) != 0; ) { - if (me < i) { - if (tmp.best.values[me] < tmp.best.values[me + i]) { - tmp.best.values[me] = tmp.best.values[me + i]; - tmp.best.approxIndices[me] = tmp.best.approxIndices[me + i]; - } - } - - barrier(CLK_LOCAL_MEM_FENCE); - } - - if (me == 0) { - (*triggerInfo)[tab].bestValue = tmp.best.values[0]; - (*triggerInfo)[tab].bestApproxIndex = tmp.best.approxIndices[0]; - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/BeamFormerWorkQueue.cc b/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/BeamFormerWorkQueue.cc deleted file mode 100644 index ff75c20445fb35ef0439520c077bc47fc4b3f754..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/BeamFormerWorkQueue.cc +++ /dev/null @@ -1,142 +0,0 @@ -//# BeamFormerSubbandProc.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "BeamFormerSubbandProc.h" - -#include <Common/LofarLogger.h> -#include <ApplCommon/PosixTime.h> -#include <CoInterface/Parset.h> - -#include <GPUProc/global_defines.h> -#include <GPUProc/OpenMP_Lock.h> - -namespace LOFAR -{ - namespace Cobalt - { - - BeamFormerSubbandProc::BeamFormerSubbandProc(BeamFormerPipeline &pipeline, unsigned gpuNumber) - : - SubbandProc( pipeline.context,pipeline.devices[gpuNumber], gpuNumber, pipeline.ps), - pipeline(pipeline), - inputSamples(boost::extents[ps.settings.antennaFields.size()][ps.nrSamplesPerChannel() * ps.nrChannelsPerSubband()][NR_POLARIZATIONS][ps.nrBytesPerComplexSample()], queue, CL_MEM_WRITE_ONLY, CL_MEM_READ_ONLY), - devFilteredData(queue, CL_MEM_READ_WRITE, ps.settings.antennaFields.size() * NR_POLARIZATIONS * ps.nrSamplesPerChannel() * ps.nrChannelsPerSubband() * sizeof(std::complex<float>)), - bandPassCorrectionWeights(boost::extents[ps.nrChannelsPerSubband()], queue, CL_MEM_WRITE_ONLY, CL_MEM_READ_ONLY), - delaysAtBegin(boost::extents[ps.nrBeams()][ps.settings.antennaFields.size()][NR_POLARIZATIONS], queue, CL_MEM_WRITE_ONLY, CL_MEM_READ_ONLY), - delaysAfterEnd(boost::extents[ps.nrBeams()][ps.settings.antennaFields.size()][NR_POLARIZATIONS], queue, CL_MEM_WRITE_ONLY, CL_MEM_READ_ONLY), - phaseOffsets(boost::extents[ps.nrBeams()][NR_POLARIZATIONS], queue, CL_MEM_WRITE_ONLY, CL_MEM_READ_ONLY), - devCorrectedData(queue, CL_MEM_READ_WRITE, ps.settings.antennaFields.size() * ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() * NR_POLARIZATIONS * sizeof(std::complex<float>)), - beamFormerWeights(boost::extents[ps.settings.antennaFields.size()][ps.nrChannelsPerSubband()][ps.nrTABs(0)], queue, CL_MEM_WRITE_ONLY, CL_MEM_READ_ONLY), - devComplexVoltages(queue, CL_MEM_READ_WRITE, ps.nrChannelsPerSubband() * ps.nrSamplesPerChannel() * ps.nrTABs(0) * NR_POLARIZATIONS * sizeof(std::complex<float>)), - //transposedComplexVoltages(boost::extents[ps.nrTABs(0)][NR_POLARIZATIONS][ps.nrSamplesPerChannel()][ps.nrChannelsPerSubband()], queue, CL_MEM_READ_ONLY, CL_MEM_READ_WRITE) - transposedComplexVoltages(boost::extents[ps.nrTABs(0)][NR_POLARIZATIONS][ps.nrChannelsPerSubband()][ps.nrSamplesPerChannel()], queue, CL_MEM_READ_ONLY, CL_MEM_READ_WRITE), - DMs(boost::extents[ps.nrTABs(0)], queue, CL_MEM_READ_ONLY, CL_MEM_WRITE_ONLY), - - intToFloatKernel(ps, queue, pipeline.intToFloatProgram, devFilteredData, inputSamples), - fftKernel(ps, pipeline.context, devFilteredData), - delayAndBandPassKernel(ps, pipeline.delayAndBandPassProgram, devCorrectedData, devFilteredData, delaysAtBegin, delaysAfterEnd, phaseOffsets, bandPassCorrectionWeights), - beamFormerKernel(ps, pipeline.beamFormerProgram, devComplexVoltages, devCorrectedData, beamFormerWeights), - transposeKernel(ps, pipeline.transposeProgram, transposedComplexVoltages, devComplexVoltages), - dedispersionForwardFFTkernel(ps, pipeline.context, transposedComplexVoltages), - dedispersionBackwardFFTkernel(ps, pipeline.context, transposedComplexVoltages), - dedispersionChirpKernel(ps, pipeline.dedispersionChirpProgram, queue, transposedComplexVoltages, DMs) - - { - if (ps.correctBandPass()) { - BandPass::computeCorrectionFactors(bandPassCorrectionWeights.origin(), ps.nrChannelsPerSubband()); - bandPassCorrectionWeights.hostToDevice(CL_TRUE); - } - } - - - void BeamFormerSubbandProc::doWork() - { - //queue.enqueueWriteBuffer(devFIRweights, CL_TRUE, 0, firWeightsSize, firFilterWeights); - bandPassCorrectionWeights.hostToDevice(CL_TRUE); - DMs.hostToDevice(CL_TRUE); - - double startTime = ps.startTime(), currentTime, stopTime = ps.stopTime(), blockTime = ps.CNintegrationTime(); - -#pragma omp barrier - - double executionStartTime = omp_get_wtime(); - - for (unsigned block = 0; (currentTime = startTime + block * blockTime) < stopTime; block++) { -#pragma omp single nowait - LOG_INFO_STR("block = " << block << ", time = " << to_simple_string(from_ustime_t(currentTime))); - - memset(delaysAtBegin.origin(), 0, delaysAtBegin.bytesize()); - memset(delaysAfterEnd.origin(), 0, delaysAfterEnd.bytesize()); - memset(phaseOffsets.origin(), 0, phaseOffsets.bytesize()); - - // FIXME!!! - if (ps.settings.antennaFields.size() >= 3) - delaysAtBegin[0][2][0] = 1e-6, delaysAfterEnd[0][2][0] = 1.1e-6; - - delaysAtBegin.hostToDevice(CL_FALSE); - delaysAfterEnd.hostToDevice(CL_FALSE); - phaseOffsets.hostToDevice(CL_FALSE); - beamFormerWeights.hostToDevice(CL_FALSE); - -#pragma omp for schedule(dynamic), nowait - for (unsigned subband = 0; subband < ps.nrSubbands(); subband++) { -#if 1 - { -#if defined USE_B7015 - OMP_ScopedLock scopedLock(pipeline.hostToDeviceLock[gpu / 2]); -#endif - inputSamples.hostToDevice(CL_TRUE); - pipeline.samplesCounter.doOperation(inputSamples.event, 0, 0, inputSamples.bytesize()); - } -#endif - - //#pragma omp critical (GPU) - { - if (ps.nrChannelsPerSubband() > 1) { - intToFloatKernel.enqueue(queue, pipeline.intToFloatCounter); - fftKernel.enqueue(queue, pipeline.fftCounter); - } - - delayAndBandPassKernel.enqueue(queue, pipeline.delayAndBandPassCounter, subband); - beamFormerKernel.enqueue(queue, pipeline.beamFormerCounter); - transposeKernel.enqueue(queue, pipeline.transposeCounter); - dedispersionForwardFFTkernel.enqueue(queue, pipeline.dedispersionForwardFFTcounter); - dedispersionChirpKernel.enqueue(queue, pipeline.dedispersionChirpCounter, ps.subbandToFrequencyMapping()[subband]); - dedispersionBackwardFFTkernel.enqueue(queue, pipeline.dedispersionBackwardFFTcounter); - - queue.finish(); - } - - //queue.enqueueReadBuffer(devComplexVoltages, CL_TRUE, 0, hostComplexVoltages.bytesize(), hostComplexVoltages.origin()); - //dedispersedData.deviceToHost(CL_TRUE); - } - } - -#pragma omp barrier - -#pragma omp master - if (!profiling) - LOG_INFO_STR("run time = " << omp_get_wtime() - executionStartTime); - } - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/BeamFormerWorkQueue.h b/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/BeamFormerWorkQueue.h deleted file mode 100644 index 312edce089000e1a7eeabf850fcb996a668c524b..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/BeamFormerWorkQueue.h +++ /dev/null @@ -1,83 +0,0 @@ -//# BeamFormerSubbandProc.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_BEAM_FORMER_WORKQUEUE_H -#define LOFAR_GPUPROC_OPENCL_BEAM_FORMER_WORKQUEUE_H - -#include <complex> - -#include <Common/LofarLogger.h> -#include <CoInterface/Parset.h> - -#include <GPUProc/MultiDimArrayHostBuffer.h> -#include <GPUProc/BandPass.h> -#include <GPUProc/Pipelines/BeamFormerPipeline.h> - -#include <GPUProc/Kernels/IntToFloatKernel.h> -#include <GPUProc/Kernels/Filter_FFT_Kernel.h> -#include <GPUProc/Kernels/DelayAndBandPassKernel.h> -#include <GPUProc/Kernels/BeamFormerKernel.h> -#include <GPUProc/Kernels/BeamFormerTransposeKernel.h> -#include <GPUProc/Kernels/DedispersionForwardFFTkernel.h> -#include <GPUProc/Kernels/DedispersionBackwardFFTkernel.h> -#include <GPUProc/Kernels/DedispersionChirpKernel.h> - -#include "SubbandProc.h" - -namespace LOFAR -{ - namespace Cobalt - { - class BeamFormerSubbandProc : public SubbandProc - { - public: - BeamFormerSubbandProc(BeamFormerPipeline &, unsigned queueNumber); - - void doWork(); - - BeamFormerPipeline &pipeline; - - MultiArraySharedBuffer<char, 4> inputSamples; - DeviceBuffer devFilteredData; - MultiArraySharedBuffer<float, 1> bandPassCorrectionWeights; - MultiArraySharedBuffer<float, 3> delaysAtBegin, delaysAfterEnd; - MultiArraySharedBuffer<float, 2> phaseOffsets; - DeviceBuffer devCorrectedData; - MultiArraySharedBuffer<std::complex<float>, 3> beamFormerWeights; - DeviceBuffer devComplexVoltages; - MultiArraySharedBuffer<std::complex<float>, 4> transposedComplexVoltages; - MultiArraySharedBuffer<float, 1> DMs; - - private: - IntToFloatKernel intToFloatKernel; - Filter_FFT_Kernel fftKernel; - DelayAndBandPassKernel delayAndBandPassKernel; - BeamFormerKernel beamFormerKernel; - BeamFormerTransposeKernel transposeKernel; - DedispersionForwardFFTkernel dedispersionForwardFFTkernel; - DedispersionBackwardFFTkernel dedispersionBackwardFFTkernel; - DedispersionChirpKernel dedispersionChirpKernel; - }; - - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/CorrelatorWorkQueue.cc b/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/CorrelatorWorkQueue.cc deleted file mode 100644 index 8b19a58879b2983c556b8f9d735007df7c32e720..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/CorrelatorWorkQueue.cc +++ /dev/null @@ -1,516 +0,0 @@ -//# CorrelatorSubbandProc.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "CorrelatorSubbandProc.h" - -#include <cstring> -#include <algorithm> - -#include <Common/LofarLogger.h> - -#include <GPUProc/OpenMP_Lock.h> -#include <GPUProc/BandPass.h> -#include <GPUProc/Pipelines/CorrelatorPipelinePrograms.h> - -namespace LOFAR -{ - namespace Cobalt - { - /* The data travels as follows: - * - * [input] -> devInput.inputSamples - * -> firFilterKernel - * -> devFilteredData - * -> fftKernel - * -> devFilteredData - * -> delayAndBandPassKernel - * -> devInput.inputSamples - * -> correlatorKernel - * -> devFilteredData = visibilities - * [output] <- - */ - CorrelatorSubbandProc::CorrelatorSubbandProc(const Parset &parset, - cl::Context &context, - cl::Device &device, - unsigned gpuNumber, - CorrelatorPipelinePrograms & programs, - FilterBank &filterBank - ) - : - SubbandProc( context, device, gpuNumber, parset), - prevBlock(-1), - prevSAP(-1), - devInput(ps.nrBeams(), - ps.settings.antennaFields.size(), - NR_POLARIZATIONS, - ps.nrHistorySamples() + ps.nrSamplesPerSubband(), - ps.nrBytesPerComplexSample(), - queue, - - // reserve enough space in inputSamples for the output of - // the delayAndBandPassKernel. - ps.settings.antennaFields.size() * NR_POLARIZATIONS * ps.nrSamplesPerSubband() * sizeof(std::complex<float>)), - devFilteredData(queue, - CL_MEM_READ_WRITE, - - // reserve enough space for the output of the - // firFilterKernel, - std::max(ps.settings.antennaFields.size() * NR_POLARIZATIONS * ps.nrSamplesPerSubband() * sizeof(std::complex<float>), - // and the correlatorKernel. - ps.nrBaselines() * ps.nrChannelsPerSubband() * NR_POLARIZATIONS * NR_POLARIZATIONS * sizeof(std::complex<float>))), - devFIRweights(queue, - CL_MEM_READ_ONLY, - ps.nrChannelsPerSubband() * NR_TAPS * sizeof(float)), - firFilterKernel(ps, - queue, - programs.firFilterProgram, - devFilteredData, - devInput.inputSamples, - devFIRweights), - fftKernel(ps, - context, - devFilteredData), - bandPassCorrectionWeights(boost::extents[ps.nrChannelsPerSubband()], - queue, - CL_MEM_WRITE_ONLY, - CL_MEM_READ_ONLY), - delayAndBandPassKernel(ps, - programs.delayAndBandPassProgram, - devInput.inputSamples, - devFilteredData, - devInput.delaysAtBegin, - devInput.delaysAfterEnd, - devInput.phaseOffsets, - bandPassCorrectionWeights), -#if defined USE_NEW_CORRELATOR - correlateTriangleKernel(ps, - queue, - programs.correlatorProgram, - devFilteredData, - devInput.inputSamples), - correlateRectangleKernel(ps, - queue, - programs.correlatorProgram, - devFilteredData, - devInput.inputSamples) -#else - correlatorKernel(ps, - queue, - programs.correlatorProgram, - devFilteredData, - devInput.inputSamples) -#endif - { - // put enough objects in the inputPool to operate - // TODO: Tweak the number of inputPool objects per SubbandProc, - // probably something like max(3, nrSubbands/nrSubbandProcs * 2), because - // there both need to be enough items to receive all subbands at - // once, and enough items to process the same amount in the - // mean time. - // - // At least 3 items are needed for a smooth Pool operation. - size_t nrInputDatas = std::max(3UL, ps.nrSubbands()); - for(size_t i = 0; i < nrInputDatas; ++i) { - inputPool.free.append(new SubbandProcInputData( - ps.nrBeams(), - ps.settings.antennaFields.size(), - NR_POLARIZATIONS, - ps.nrHistorySamples() + ps.nrSamplesPerSubband(), - ps.nrBytesPerComplexSample(), - devInput)); - } - - // put enough objects in the outputPool to operate - for(size_t i = 0; i < 3; ++i) { - outputPool.free.append(new CorrelatedDataHostBuffer( - ps.settings.antennaFields.size(), - ps.nrChannelsPerSubband(), - ps.integrationSteps(), - devFilteredData, - *this)); - } - - // create all the counters - // Move the FIR filter weight to the GPU -#if defined USE_NEW_CORRELATOR - addCounter("compute - cor.triangle"); - addCounter("compute - cor.rectangle"); -#else - addCounter("compute - correlator"); -#endif - - addCounter("compute - FIR"); - addCounter("compute - delay/bp"); - addCounter("compute - FFT"); - addCounter("input - samples"); - addCounter("output - visibilities"); - - // CPU timers are set by CorrelatorPipeline - addTimer("CPU - read input"); - addTimer("CPU - process"); - addTimer("CPU - postprocess"); - addTimer("CPU - total"); - - // GPU timers are set by us - addTimer("GPU - total"); - addTimer("GPU - input"); - addTimer("GPU - output"); - addTimer("GPU - compute"); - addTimer("GPU - wait"); - - queue.enqueueWriteBuffer(devFIRweights, CL_TRUE, 0, ps.nrChannelsPerSubband() * NR_TAPS * sizeof(float), filterBank.getWeights().origin()); - - if (ps.correctBandPass()) - { - BandPass::computeCorrectionFactors(bandPassCorrectionWeights.origin(), ps.nrChannelsPerSubband()); - bandPassCorrectionWeights.hostToDevice(CL_TRUE); - } - } - - // Get the log2 of the supplied number - unsigned CorrelatorSubbandProc::flagFunctions::get2LogOfNrChannels(unsigned nrChannels) - { - ASSERT(powerOfTwo(nrChannels)); - - unsigned logNrChannels; - for (logNrChannels = 0; 1U << logNrChannels != nrChannels; - logNrChannels ++) - {;} // do nothing, the creation of the log is a side effect of the for loop - - //Alternative solution snipped: - //int targetlevel = 0; - //while (index >>= 1) ++targetlevel; - return logNrChannels; - } - - void CorrelatorSubbandProc::flagFunctions::propagateFlagsToOutput( - Parset const &parset, - MultiDimArray<LOFAR::SparseSet<unsigned>, 1>const &inputFlags, - CorrelatedData &output) - { - unsigned numberOfChannels = parset.nrChannelsPerSubband(); - - // Object for storing transformed flags - MultiDimArray<SparseSet<unsigned>, 2> flagsPerChannel( - boost::extents[numberOfChannels][parset.settings.antennaFields.size()]); - - // First transform the flags to channel flags: taking in account - // reduced resolution in time and the size of the filter - convertFlagsToChannelFlags(parset, inputFlags, flagsPerChannel); - - // Calculate the number of flafs per baseline and assign to - // output object. - switch (output.itsNrBytesPerNrValidSamples) { - case 4: - calculateAndSetNumberOfFlaggedSamples<uint32_t>(parset, flagsPerChannel, output); - break; - - case 2: - calculateAndSetNumberOfFlaggedSamples<uint16_t>(parset, flagsPerChannel, output); - break; - - case 1: - calculateAndSetNumberOfFlaggedSamples<uint8_t>(parset, flagsPerChannel, output); - break; - } - } - - void CorrelatorSubbandProc::flagFunctions::convertFlagsToChannelFlags(Parset const &parset, - MultiDimArray<LOFAR::SparseSet<unsigned>, 1>const &inputFlags, - MultiDimArray<SparseSet<unsigned>, 2>& flagsPerChannel) - { - unsigned numberOfChannels = parset.nrChannelsPerSubband(); - unsigned log2NrChannels = get2LogOfNrChannels(numberOfChannels); - //Convert the flags per sample to flags per channel - for (unsigned station = 0; station < parset.settings.antennaFields.size(); station ++) - { - // get the flag ranges - const SparseSet<unsigned>::Ranges &ranges = inputFlags[station].getRanges(); - for (SparseSet<unsigned>::const_iterator it = ranges.begin(); - it != ranges.end(); it ++) - { - unsigned begin_idx; - unsigned end_idx; - if (numberOfChannels == 1) // if number of channels == 1 - { //do nothing, just take the ranges as supplied - begin_idx = it->begin; - end_idx = std::min(parset.nrSamplesPerChannel(), it->end ); - } - else - { - // Never flag before the start of the time range - // use bitshift to divide to the number of channels. - // - // NR_TAPS is the width of the filter: they are - // absorbed by the FIR and thus should be excluded - // from the original flag set. - // - // At the same time, every sample is affected by - // the NR_TAPS-1 samples before it. So, any flagged - // sample in the input flags NR_TAPS samples in - // the channel. - begin_idx = std::max(0, - (signed) (it->begin >> log2NrChannels) - NR_TAPS + 1); - - // The min is needed, because flagging the last input - // samples would cause NR_TAPS subsequent samples to - // be flagged, which aren't necessarily part of this block. - end_idx = std::min(parset.nrSamplesPerChannel() + 1, - ((it->end - 1) >> log2NrChannels) + 1); - } - - // Now copy the transformed ranges to the channelflags - for (unsigned ch = 0; ch < numberOfChannels; ch++) { - flagsPerChannel[ch][station].include(begin_idx, end_idx); - } - } - } - } - - - namespace { - unsigned baseline(unsigned stat1, unsigned stat2) - { - //baseline(stat1, stat2); This function should be moved to a helper class - return stat2 * (stat2 + 1) / 2 + stat1; - } - } - - template<typename T> void CorrelatorSubbandProc::flagFunctions::calculateAndSetNumberOfFlaggedSamples( - Parset const &parset, - MultiDimArray<SparseSet<unsigned>, 2>const & flagsPerChannel, - CorrelatedData &output) - { - // loop the stations - for (unsigned stat2 = 0; stat2 < parset.settings.antennaFields.size(); stat2 ++) { - for (unsigned stat1 = 0; stat1 <= stat2; stat1 ++) { - unsigned bl = baseline(stat1, stat2); - - unsigned nrSamplesPerIntegration = parset.nrSamplesPerChannel(); - // If there is a single channel then the index 0 contains real data - if (parset.nrChannelsPerSubband() == 1) - { - //The number of invalid (flagged) samples is the union of the flagged samples in the two stations - unsigned nrValidSamples = nrSamplesPerIntegration - - (flagsPerChannel[0][stat1] | flagsPerChannel[0][stat2]).count(); - - // Moet worden toegekend op de correlated dataobject - output.nrValidSamples<T>(bl, 0) = nrValidSamples; - } - else - { - // channel 0 does not contain valid data - output.nrValidSamples<T>(bl, 0) = 0; //channel zero, has zero valid samples - - for(unsigned ch = 1; ch < parset.nrChannelsPerSubband(); ch ++) - { - // valid samples is total number of samples minus the union of the - // Two stations. - unsigned nrValidSamples = nrSamplesPerIntegration - - (flagsPerChannel[ch][stat1] | flagsPerChannel[ch][stat2]).count(); - - output.nrValidSamples<T>(bl, ch) = nrValidSamples; - } - } - } - } - } - - // Instantiate required templates - template void CorrelatorSubbandProc::flagFunctions::calculateAndSetNumberOfFlaggedSamples<uint32_t>( - Parset const &parset, - MultiDimArray<SparseSet<unsigned>, 2>const & flagsPerChannel, - CorrelatedData &output); - template void CorrelatorSubbandProc::flagFunctions::calculateAndSetNumberOfFlaggedSamples<uint16_t>( - Parset const &parset, - MultiDimArray<SparseSet<unsigned>, 2>const & flagsPerChannel, - CorrelatedData &output); - template void CorrelatorSubbandProc::flagFunctions::calculateAndSetNumberOfFlaggedSamples<uint8_t>( - Parset const &parset, - MultiDimArray<SparseSet<unsigned>, 2>const & flagsPerChannel, - CorrelatedData &output); - - void CorrelatorSubbandProc::flagFunctions::applyWeightingToAllPolarizations(unsigned baseline, - unsigned channel, float weight, CorrelatedData &output) - { // TODO: inline??? - for(unsigned idx_polarization_1 = 0; idx_polarization_1 < NR_POLARIZATIONS; ++idx_polarization_1) - for(unsigned idx_polarization_2 = 0; idx_polarization_2 < NR_POLARIZATIONS; ++idx_polarization_2) - output.visibilities[baseline][channel][idx_polarization_1][idx_polarization_2] *= weight; - } - - template<typename T> void CorrelatorSubbandProc::flagFunctions::applyFractionOfFlaggedSamplesOnVisibilities(Parset const &parset, - CorrelatedData &output) - { - for (unsigned bl = 0; bl < output.itsNrBaselines; ++bl) { - // Calculate the weights for the channels - // - // Channel 0 is already flagged according to specs, so we can simply - // include it both for 1 and >1 channels/subband. - for(unsigned ch = 0; ch < parset.nrChannelsPerSubband(); ch ++) - { - T nrValidSamples = output.nrValidSamples<T>(bl, ch); - - // If all samples flagged weights is zero - // TODO: make a lookup table for the expensive division - float weight = nrValidSamples ? 1e-6f / nrValidSamples : 0; - - applyWeightingToAllPolarizations(bl, ch, weight, output); - } - } - } - - // Instantiate required templates - template void CorrelatorSubbandProc::flagFunctions::applyFractionOfFlaggedSamplesOnVisibilities<uint32_t>(Parset const &parset, - CorrelatedData &output); - template void CorrelatorSubbandProc::flagFunctions::applyFractionOfFlaggedSamplesOnVisibilities<uint16_t>(Parset const &parset, - CorrelatedData &output); - template void CorrelatorSubbandProc::flagFunctions::applyFractionOfFlaggedSamplesOnVisibilities<uint8_t>(Parset const &parset, - CorrelatedData &output); - - - void CorrelatorSubbandProc::processSubband(SubbandProcInputData &input, CorrelatedDataHostBuffer &output) - { - timers["GPU - total"]->start(); - - size_t block = input.block; - unsigned subband = input.subband; - - { - timers["GPU - input"]->start(); - -#if defined USE_B7015 - OMP_ScopedLock scopedLock(pipeline.hostToDeviceLock[gpu / 2]); -#endif - input.inputSamples.hostToDevice(CL_TRUE); - counters["input - samples"]->doOperation(input.inputSamples.deviceBuffer.event, 0, 0, input.inputSamples.bytesize()); - - timers["GPU - input"]->stop(); - } - - timers["GPU - compute"]->start(); - - // Moved from doWork() The delay data should be available before the kernels start. - // Queue processed ordered. This could main that the transfer is not nicely overlapped - - unsigned SAP = ps.settings.subbands[subband].SAP; - - // Only upload delays if they changed w.r.t. the previous subband - if ((int)SAP != prevSAP || (ssize_t)block != prevBlock) { - input.delaysAtBegin.hostToDevice(CL_FALSE); - input.delaysAfterEnd.hostToDevice(CL_FALSE); - input.phaseOffsets.hostToDevice(CL_FALSE); - - prevSAP = SAP; - prevBlock = block; - } - - if (ps.nrChannelsPerSubband() > 1) { - firFilterKernel.enqueue(queue, *counters["compute - FIR"]); - fftKernel.enqueue(queue, *counters["compute - FFT"]); - } - - delayAndBandPassKernel.enqueue(queue, *counters["compute - delay/bp"], subband); -#if defined USE_NEW_CORRELATOR - correlateTriangleKernel.enqueue(queue, *counters["compute - cor.triangle"]); - correlateRectangleKernel.enqueue(queue, *counters["compute - cor.rectangle"]); -#else - correlatorKernel.enqueue(queue, *counters["compute - correlator"]); -#endif - - queue.flush(); - - // ***** The GPU will be occupied for a while, do some calculations in the - // background. - - // Propagate the flags. - flagFunctions::propagateFlagsToOutput(ps, input.inputFlags, output); - - // Wait for the GPU to finish. - timers["GPU - wait"]->start(); - queue.finish(); - timers["GPU - wait"]->stop(); - - timers["GPU - compute"]->stop(); - - { - timers["GPU - output"]->start(); - -#if defined USE_B7015 - OMP_ScopedLock scopedLock(pipeline.deviceToHostLock[gpu / 2]); -#endif - output.deviceToHost(CL_TRUE); - // now perform weighting of the data based on the number of valid samples - - counters["output - visibilities"]->doOperation(output.deviceBuffer.event, 0, output.bytesize(), 0); - - timers["GPU - output"]->stop(); - } - - timers["GPU - total"]->stop(); - } - - - void CorrelatorSubbandProc::postprocessSubband(CorrelatedDataHostBuffer &output) - { - // The flags are alrady copied to the correct location - // now the flagged amount should be applied to the visibilities - switch (output.itsNrBytesPerNrValidSamples) { - case 4: - flagFunctions::applyFractionOfFlaggedSamplesOnVisibilities<uint32_t>(ps, output); - break; - - case 2: - flagFunctions::applyFractionOfFlaggedSamplesOnVisibilities<uint16_t>(ps, output); - break; - - case 1: - flagFunctions::applyFractionOfFlaggedSamplesOnVisibilities<uint8_t>(ps, output); - break; - } - } - - - // flag the input samples. - void SubbandProcInputData::flagInputSamples(unsigned station, - const SubbandMetaData& metaData) - { - - // Get the size of a sample in bytes. - size_t sizeof_sample = sizeof *inputSamples.origin(); - - // Calculate the number elements to skip when striding over the second - // dimension of inputSamples. - size_t stride = inputSamples[station][0].num_elements(); - - // Zero the bytes in the input data for the flagged ranges. - for(SparseSet<unsigned>::const_iterator it = metaData.flags.getRanges().begin(); - it != metaData.flags.getRanges().end(); ++it) - { - void *offset = inputSamples[station][it->begin].origin(); - size_t size = stride * (it->end - it->begin) * sizeof_sample; - memset(offset, 0, size); - } - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/CorrelatorWorkQueue.h b/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/CorrelatorWorkQueue.h deleted file mode 100644 index bd3c937a5e3bf36b8fb163f62c0181ac5eed463a..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/CorrelatorWorkQueue.h +++ /dev/null @@ -1,285 +0,0 @@ -//# CorrelatorSubbandProc.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_CORRELATOR_WORKQUEUE_H -#define LOFAR_GPUPROC_OPENCL_CORRELATOR_WORKQUEUE_H - -// @file -#include <complex> - -#include <Common/Thread/Queue.h> -#include <Stream/Stream.h> -#include <CoInterface/Parset.h> -#include <CoInterface/CorrelatedData.h> -#include <CoInterface/SmartPtr.h> -#include <CoInterface/SparseSet.h> -#include <CoInterface/SubbandMetaData.h> - -#include <GPUProc/global_defines.h> -#include <GPUProc/MultiDimArrayHostBuffer.h> -#include <GPUProc/FilterBank.h> -#include <GPUProc/Pipelines/CorrelatorPipelinePrograms.h> -#include <GPUProc/Kernels/FIR_FilterKernel.h> -#include <GPUProc/Kernels/Filter_FFT_Kernel.h> -#include <GPUProc/Kernels/DelayAndBandPassKernel.h> -#include <GPUProc/Kernels/CorrelatorKernel.h> - -#include "SubbandProc.h" - -namespace LOFAR -{ - namespace Cobalt - { - /* - * The CorrelatorSubbandProc does the following transformation: - * SubbandProcInputData -> CorrelatedDataHostBuffer - * - * The SubbandProcInputData represents one block of one subband - * of input data, and the CorrelatedDataHostBuffer the complex - * visibilities of such a block. - * - * For both input and output, a fixed set of objects is created, - * tied to the GPU specific for the SubbandProc, for increased - * performance. The objects are recycled by using Pool objects. - * - * The data flows as follows: - * - * // Fetch the next input object to fill - * SmartPtr<SubbandProcInputData> input = queue.inputPool.free.remove(); - * - * // Provide input - * receiveInput(input); - * - * // Annotate input - * input->block = block; - * input->subband = subband; - * - * // Fetch the next output object to fill - * SmartPtr<CorrelatedDataHostBuffer> output = queue.outputPool.free.remove(); - * - * // Process block - * queue.doSubband(input, output); - * - * // Give back input and output objects to queue - * queue.inputPool.free.append(input); - * queue.outputPool.free.append(output); - * - * The queue.inputPool.filled and queue.outputPool.filled can be used to - * temporarily store filled input and output objects. Such is needed to - * obtain parallellism (i.e. read/process/write in separate threads). - */ - class CorrelatorSubbandProc; - - // The pool operates using a 'free' and a 'filled' queue to cycle through buffers. Producers - // move elements free->filled, and consumers move elements filled->free. - template <typename T> - struct Pool - { - typedef T element_type; - - Queue< SmartPtr<element_type> > free; - Queue< SmartPtr<element_type> > filled; - }; - - // A CorrelatedData object tied to a HostBuffer and SubbandProc. Such links - // are needed for performance -- the visibilities are stored in a buffer - // directly linked to the GPU output buffer. - class CorrelatedDataHostBuffer: public MultiArrayHostBuffer<fcomplex, 4>, public CorrelatedData - { - public: - CorrelatedDataHostBuffer(unsigned nrStations, unsigned nrChannels, unsigned maxNrValidSamples, DeviceBuffer &deviceBuffer, CorrelatorSubbandProc &queue) - : - MultiArrayHostBuffer<fcomplex, 4>(boost::extents[nrStations * (nrStations + 1) / 2][nrChannels][NR_POLARIZATIONS][NR_POLARIZATIONS], CL_MEM_WRITE_ONLY, deviceBuffer), - CorrelatedData(nrStations, nrChannels, maxNrValidSamples, this->origin(), this->num_elements(), heapAllocator, 1), - queue(queue) - { - } - - // Annotation required, as we'll loose track of the exact order - size_t block; - unsigned subband; - - CorrelatorSubbandProc &queue; - - private: - CorrelatedDataHostBuffer(); - CorrelatedDataHostBuffer(const CorrelatedDataHostBuffer &); - }; - - // - // Collect all inputData for the correlatorSubbandProc item: - // \arg inputsamples - // \arg delays - // \arg phaseOffSets - // \arg flags - // It also contains a read function parsing all this data from an input stream. - class SubbandProcInputData - { - public: - - // The set of GPU buffers to link our HostBuffers to. - struct DeviceBuffers - { - DeviceBuffer delaysAtBegin; - DeviceBuffer delaysAfterEnd; - DeviceBuffer phaseOffsets; - DeviceBuffer inputSamples; - - DeviceBuffers(size_t n_beams, size_t n_stations, size_t n_polarizations, - size_t n_samples, size_t bytes_per_complex_sample, - cl::CommandQueue &queue, - size_t inputSamplesMinSize = 0, - cl_mem_flags deviceBufferFlags = CL_MEM_READ_ONLY) - : - delaysAtBegin(queue, deviceBufferFlags, n_beams * n_stations * n_polarizations * sizeof(float)), - delaysAfterEnd(queue, deviceBufferFlags, n_beams * n_stations * n_polarizations * sizeof(float)), - phaseOffsets(queue, deviceBufferFlags, n_stations * n_polarizations * sizeof(float)), - inputSamples(queue, CL_MEM_READ_WRITE, std::max(inputSamplesMinSize, n_stations * n_samples * n_polarizations * bytes_per_complex_sample)) - { - } - }; - - // Relevant block - size_t block; - - // Relevant subband - unsigned subband; - - MultiArrayHostBuffer<float, 3> delaysAtBegin; //!< Whole sample delays at the start of the workitem - MultiArrayHostBuffer<float, 3> delaysAfterEnd;//!< Whole sample delays at the end of the workitem - MultiArrayHostBuffer<float, 2> phaseOffsets; //!< Remainder of delays - - // inputdata with flagged data set to zero - MultiArrayHostBuffer<char, 4> inputSamples; - - // The input flags - MultiDimArray<SparseSet<unsigned>,1> inputFlags; - - // Create the inputData object we need shared host/device memory on the supplied devicequeue - SubbandProcInputData(size_t n_beams, size_t n_stations, size_t n_polarizations, - size_t n_samples, size_t bytes_per_complex_sample, - DeviceBuffers &deviceBuffers, - cl_mem_flags hostBufferFlags = CL_MEM_WRITE_ONLY) - : - delaysAtBegin(boost::extents[n_beams][n_stations][n_polarizations], hostBufferFlags, deviceBuffers.delaysAtBegin), - delaysAfterEnd(boost::extents[n_beams][n_stations][n_polarizations], hostBufferFlags, deviceBuffers.delaysAfterEnd), - phaseOffsets(boost::extents[n_stations][n_polarizations], hostBufferFlags, deviceBuffers.phaseOffsets), - inputSamples(boost::extents[n_stations][n_samples][n_polarizations][bytes_per_complex_sample], hostBufferFlags, deviceBuffers.inputSamples), // TODO: The size of the buffer is NOT validated - inputFlags(boost::extents[n_stations]) - { - } - - // set all flagged inputSamples to zero. - void flagInputSamples(unsigned station, const SubbandMetaData& metaData); - }; - - class CorrelatorSubbandProc : public SubbandProc - { - public: - // Collection of functions to tranfer the input flags to the output. - // \c propagateFlagsToOutput can be called parallel to the kernels. - // After the data is copied from the the shared buffer - // \c applyFractionOfFlaggedSamplesOnVisibilities can be used to weight - // the visibilities - class flagFunctions - { - public: - // 1. Convert input flags to channel flags, calculate the amount flagged samples and save this in output - static void propagateFlagsToOutput(Parset const & parset, - MultiDimArray<LOFAR::SparseSet<unsigned>, 1>const &inputFlags, - CorrelatedData &output) ; - - // 2. Calculate the weight based on the number of flags and apply this weighting to all output values - template<typename T> static void applyFractionOfFlaggedSamplesOnVisibilities(Parset const &parset, - CorrelatedData &output); - - // 1.1Convert the flags per station to channel flags, change time scale if nchannel > 1 - static void convertFlagsToChannelFlags(Parset const &parset, - MultiDimArray<LOFAR::SparseSet<unsigned>, 1>const &inputFlags, - MultiDimArray<SparseSet<unsigned>, 2> &flagsPerChannel); - - // 1.2calculate the number of flagged samples and set this on the output dataproduct - // This function is aware of the used filter width a corrects for this. - template<typename T> static void calculateAndSetNumberOfFlaggedSamples(Parset const &parset, - MultiDimArray<SparseSet<unsigned>, 2>const & flagsPerChannel, - CorrelatedData &output); - - // 1.3 Get the LOG2 of the input. Used to speed up devisions by 2 - static unsigned get2LogOfNrChannels(unsigned nrChannels); - - // 2.1 Apply the supplied weight to the complex values in the channel and baseline - static void applyWeightingToAllPolarizations(unsigned baseline, - unsigned channel, float weight, CorrelatedData &output); - }; - - public: - CorrelatorSubbandProc(const Parset &parset,cl::Context &context, - cl::Device &device, unsigned queueNumber, - CorrelatorPipelinePrograms &programs, - FilterBank &filterBank); - - // Correlate the data found in the input data buffer - void processSubband(SubbandProcInputData &input, CorrelatedDataHostBuffer &output); - - // Do post processing on the CPU - void postprocessSubband(CorrelatedDataHostBuffer &output); - - private: - // The previously processed SAP/block, or -1 if nothing has been - // processed yet. Used in order to determine if new delays have - // to be uploaded. - ssize_t prevBlock; - signed int prevSAP; - - // Raw buffers, these are mapped with boost multiarrays - // in the InputData class - SubbandProcInputData::DeviceBuffers devInput; - - DeviceBuffer devFilteredData; - - public: - // A pool of input data, to allow items to be filled and - // computed on in parallel. - Pool<SubbandProcInputData> inputPool; - - // A pool of output data, to allow items to be filled - // and written in parallel. - Pool<CorrelatedDataHostBuffer> outputPool; - - private: - // Compiled kernels - DeviceBuffer devFIRweights; - FIR_FilterKernel firFilterKernel; - Filter_FFT_Kernel fftKernel; - MultiArraySharedBuffer<float, 1> bandPassCorrectionWeights; - DelayAndBandPassKernel delayAndBandPassKernel; -#if defined USE_NEW_CORRELATOR - CorrelateTriangleKernel correlateTriangleKernel; - CorrelateRectangleKernel correlateRectangleKernel; -#else - CorrelatorKernel correlatorKernel; -#endif - - friend class SubbandProcInputData; - }; - - } -} -#endif diff --git a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/UHEP_WorkQueue.cc b/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/UHEP_WorkQueue.cc deleted file mode 100644 index 9d52e1a29049aef962f9b1e1849ebad54cc73f0f..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/UHEP_WorkQueue.cc +++ /dev/null @@ -1,137 +0,0 @@ -//# UHEP_SubbandProc.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "UHEP_SubbandProc.h" - -#include <Common/LofarLogger.h> -#include <ApplCommon/PosixTime.h> -#include <CoInterface/Parset.h> - -#include <GPUProc/global_defines.h> -#include <GPUProc/OpenMP_Lock.h> - -#include <GPUProc/UHEP/InvertedStationPPFWeights.h> -#include <GPUProc/Kernels/UHEP_TransposeKernel.h> -#include <GPUProc/Kernels/UHEP_InvFFT_Kernel.h> -#include <GPUProc/Kernels/UHEP_InvFIR_Kernel.h> -#include <GPUProc/Kernels/UHEP_TriggerKernel.h> -#include <GPUProc/Kernels/UHEP_BeamFormerKernel.h> - -#include "SubbandProc.h" - -namespace LOFAR -{ - namespace Cobalt - { - UHEP_SubbandProc::UHEP_SubbandProc(UHEP_Pipeline &pipeline, unsigned gpuNumber) - : - SubbandProc( pipeline.context, pipeline.devices[gpuNumber], gpuNumber, pipeline.ps), - pipeline(pipeline), - hostInputSamples(boost::extents[ps.settings.antennaFields.size()][ps.nrSubbands()][ps.nrSamplesPerChannel() + NR_STATION_FILTER_TAPS - 1][NR_POLARIZATIONS][ps.nrBytesPerComplexSample()], queue, CL_MEM_WRITE_ONLY), - hostBeamFormerWeights(boost::extents[ps.settings.antennaFields.size()][ps.nrSubbands()][ps.nrTABs(0)], queue, CL_MEM_WRITE_ONLY), - hostTriggerInfo(boost::extents[ps.nrTABs(0)], queue, CL_MEM_READ_ONLY) - { - size_t inputSamplesSize = ps.settings.antennaFields.size() * ps.nrSubbands() * (ps.nrSamplesPerChannel() + NR_STATION_FILTER_TAPS - 1) * NR_POLARIZATIONS * ps.nrBytesPerComplexSample(); - size_t complexVoltagesSize = ps.nrSubbands() * (ps.nrSamplesPerChannel() + NR_STATION_FILTER_TAPS - 1) * ps.nrTABs(0) * NR_POLARIZATIONS * sizeof(std::complex<float>); - size_t transposedDataSize = ps.nrTABs(0) * NR_POLARIZATIONS * (ps.nrSamplesPerChannel() + NR_STATION_FILTER_TAPS - 1) * 512 * sizeof(std::complex<float>); - size_t invFIRfilteredDataSize = ps.nrTABs(0) * NR_POLARIZATIONS * ps.nrSamplesPerChannel() * 512 * sizeof(std::complex<float>); - - size_t buffer0size = std::max(inputSamplesSize, transposedDataSize); - size_t buffer1size = std::max(complexVoltagesSize, invFIRfilteredDataSize); - - devBuffers[0] = cl::Buffer(pipeline.context, CL_MEM_READ_WRITE, buffer0size); - devBuffers[1] = cl::Buffer(pipeline.context, CL_MEM_READ_WRITE, buffer1size); - - size_t beamFormerWeightsSize = ps.settings.antennaFields.size() * ps.nrSubbands() * ps.nrTABs(0) * sizeof(std::complex<float>); - devBeamFormerWeights = cl::Buffer(pipeline.context, CL_MEM_READ_ONLY, beamFormerWeightsSize); - - devInputSamples = devBuffers[0]; - devComplexVoltages = devBuffers[1]; - - devReverseSubbandMapping = cl::Buffer(pipeline.context, CL_MEM_READ_ONLY, 512 * sizeof(int)); - devInvFIRfilterWeights = cl::Buffer(pipeline.context, CL_MEM_READ_ONLY, 1024 * NR_STATION_FILTER_TAPS * sizeof(float)); - devFFTedData = devBuffers[0]; - devInvFIRfilteredData = devBuffers[1]; - - devTriggerInfo = cl::Buffer(pipeline.context, CL_MEM_WRITE_ONLY, ps.nrTABs(0) * sizeof(TriggerInfo)); - } - - - void UHEP_SubbandProc::doWork(const float * /*delaysAtBegin*/, const float * /*delaysAfterEnd*/, const float * /*phaseOffsets*/) - { - UHEP_BeamFormerKernel beamFormer(ps, pipeline.beamFormerProgram, devComplexVoltages, devInputSamples, devBeamFormerWeights); - UHEP_TransposeKernel transpose(ps, pipeline.transposeProgram, devFFTedData, devComplexVoltages, devReverseSubbandMapping); - UHEP_InvFFT_Kernel invFFT(ps, pipeline.invFFTprogram, devFFTedData); - UHEP_InvFIR_Kernel invFIR(ps, queue, pipeline.invFIRfilterProgram, devInvFIRfilteredData, devFFTedData, devInvFIRfilterWeights); - UHEP_TriggerKernel trigger(ps, pipeline.triggerProgram, devTriggerInfo, devInvFIRfilteredData); - double startTime = ps.startTime(), stopTime = ps.stopTime(), blockTime = ps.CNintegrationTime(); - unsigned nrBlocks = (stopTime - startTime) / blockTime; - - queue.enqueueWriteBuffer(devInvFIRfilterWeights, CL_FALSE, 0, sizeof invertedStationPPFWeights, invertedStationPPFWeights); - queue.enqueueWriteBuffer(devReverseSubbandMapping, CL_TRUE, 0, 512 * sizeof(int), reverseSubbandMapping); - -#pragma omp barrier - - double executionStartTime = omp_get_wtime(); - -#pragma omp for schedule(dynamic), nowait - for (unsigned block = 0; block < nrBlocks; block++) { - double currentTime = startTime + block * blockTime; - - //#pragma omp single nowait // FIXME: why does the compiler complain here??? - LOG_INFO_STR("block = " << block << ", time = " << to_simple_string(from_ustime_t(currentTime))); - -#if 0 - { -#if defined USE_B7015 - OMP_ScopedLock scopedLock(pipeline.hostToDeviceLock[gpu / 2]); -#endif - queue.enqueueWriteBuffer(devInputSamples, CL_TRUE, 0, sampledDataSize, hostInputSamples.origin(), 0, &samplesEvent); - } -#endif - - queue.enqueueWriteBuffer(devBeamFormerWeights, CL_FALSE, 0, hostBeamFormerWeights.bytesize(), hostBeamFormerWeights.origin(), 0, &beamFormerWeightsEvent); - pipeline.beamFormerWeightsCounter.doOperation(beamFormerWeightsEvent, 0, 0, hostBeamFormerWeights.bytesize()); - - queue.enqueueWriteBuffer(devInputSamples, CL_FALSE, 0, hostInputSamples.bytesize(), hostInputSamples.origin(), 0, &inputSamplesEvent); - pipeline.samplesCounter.doOperation(inputSamplesEvent, 0, 0, hostInputSamples.bytesize()); - - beamFormer.enqueue(queue, pipeline.beamFormerCounter); - transpose.enqueue(queue, pipeline.transposeCounter); - invFFT.enqueue(queue, pipeline.invFFTcounter); - invFIR.enqueue(queue, pipeline.invFIRfilterCounter); - trigger.enqueue(queue, pipeline.triggerCounter); - queue.finish(); // necessary to overlap I/O & computations ??? - queue.enqueueReadBuffer(devTriggerInfo, CL_TRUE, 0, hostTriggerInfo.bytesize(), hostTriggerInfo.origin()); - } - -#pragma omp barrier - -#pragma omp master - if (!profiling) - LOG_INFO_STR("run time = " << omp_get_wtime() - executionStartTime); - } - - - - } -} diff --git a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/UHEP_WorkQueue.h b/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/UHEP_WorkQueue.h deleted file mode 100644 index 5fb7452f663f8f6d1daa9e97cd5e54817d4665db..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/UHEP_WorkQueue.h +++ /dev/null @@ -1,69 +0,0 @@ -//# UHEP_SubbandProc.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_UHEP_WORKQUEUE_H -#define LOFAR_GPUPROC_OPENCL_UHEP_WORKQUEUE_H - -#include <complex> - -#include <Common/LofarLogger.h> -#include <CoInterface/Parset.h> - -#include <GPUProc/global_defines.h> -#include <GPUProc/MultiDimArrayHostBuffer.h> -#include <GPUProc/Pipelines/UHEP_Pipeline.h> -#include <GPUProc/Kernels/UHEP_TriggerKernel.h> -#include "SubbandProc.h" - -namespace LOFAR -{ - namespace Cobalt - { - class UHEP_SubbandProc : public SubbandProc - { - public: - UHEP_SubbandProc(UHEP_Pipeline &, unsigned queueNumber); - - void doWork(const float *delaysAtBegin, const float *delaysAfterEnd, const float *phaseOffsets); - - UHEP_Pipeline &pipeline; - cl::Event inputSamplesEvent, beamFormerWeightsEvent; - - cl::Buffer devBuffers[2]; - cl::Buffer devInputSamples; - MultiArrayHostBuffer<char, 5> hostInputSamples; - - cl::Buffer devBeamFormerWeights; - MultiArrayHostBuffer<std::complex<float>, 3> hostBeamFormerWeights; - - cl::Buffer devComplexVoltages; - cl::Buffer devReverseSubbandMapping; - cl::Buffer devFFTedData; - cl::Buffer devInvFIRfilteredData; - cl::Buffer devInvFIRfilterWeights; - - cl::Buffer devTriggerInfo; - MultiArraySharedBuffer<TriggerInfo, 1> hostTriggerInfo; - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/WorkQueue.cc b/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/WorkQueue.cc deleted file mode 100644 index b020c6ecca18753b944dc1d5dcec4247d2442800..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/WorkQueue.cc +++ /dev/null @@ -1,60 +0,0 @@ -//# SubbandProc.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "SubbandProc.h" - -#include <Common/LofarLogger.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - SubbandProc::SubbandProc(cl::Context &context, cl::Device &device, unsigned gpuNumber, const Parset &ps) - : - gpu(gpuNumber), - device(device), - ps(ps) - { -#ifdef USE_B7015 - set_affinity(gpu); -#endif - - queue = cl::CommandQueue(context, device, profiling ? CL_QUEUE_PROFILING_ENABLE : 0); - } - - - void SubbandProc::addCounter(const std::string &name) - { - counters[name] = new PerformanceCounter(name, profiling); - } - - - void SubbandProc::addTimer(const std::string &name) - { - timers[name] = new NSTimer(name, false, false); - } - - } -} - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/WorkQueue.h b/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/WorkQueue.h deleted file mode 100644 index 516022016fc3617d013982fe2ca65ff4af555b68..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/WorkQueues/WorkQueue.h +++ /dev/null @@ -1,59 +0,0 @@ -//# SubbandProc.h -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_WORKQUEUE_H -#define LOFAR_GPUPROC_OPENCL_WORKQUEUE_H - -#include <string> -#include <map> - -#include <Common/Timer.h> -#include <CoInterface/Parset.h> -#include <CoInterface/SmartPtr.h> -#include <GPUProc/PerformanceCounter.h> -#include <GPUProc/gpu_incl.h> - -namespace LOFAR -{ - namespace Cobalt - { - class SubbandProc - { - public: - SubbandProc(cl::Context &context, cl::Device &device, unsigned gpuNumber, const Parset &ps); - - const unsigned gpu; - cl::Device &device; - cl::CommandQueue queue; - - std::map<std::string, SmartPtr<PerformanceCounter> > counters; - std::map<std::string, SmartPtr<NSTimer> > timers; - - protected: - const Parset &ps; - - void addCounter(const std::string &name); - void addTimer(const std::string &name); - }; - } -} - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/fft2.cl b/RTCP/Cobalt/GPUProc/src/opencl/fft2.cl deleted file mode 100644 index d768d66ecf611272f16ec9eacb9d89015b7e3197..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/fft2.cl +++ /dev/null @@ -1,362 +0,0 @@ - - -// Copyright (C) 2010-2012 Advanced Micro Devices, Inc. All Rights Reserved. - - -__constant float2 twiddles[7] = { - (float2)(1.0000000000000000000000000000000000f, -0.0000000000000000000000000000000000f), - (float2)(1.0000000000000000000000000000000000f, -0.0000000000000000000000000000000000f), - (float2)(1.0000000000000000000000000000000000f, -0.0000000000000000000000000000000000f), - (float2)(1.0000000000000000000000000000000000f, -0.0000000000000000000000000000000000f), - (float2)(0.7071067811865475727373109293694142f, -0.7071067811865474617150084668537602f), - (float2)(0.0000000000000000612323399573676604f, -1.0000000000000000000000000000000000f), - (float2)(-0.7071067811865474617150084668537602f, -0.7071067811865475727373109293694142f), -}; - - -#define fvect2 float2 - -#define C8Q 0.70710678118654752440084436210485f -#define C5QA 0.30901699437494742410229341718282f -#define C5QB 0.95105651629515357211643933337938f -#define C5QC 0.50000000000000000000000000000000f -#define C5QD 0.58778525229247312916870595463907f -#define C5QE 0.80901699437494742410229341718282f -#define C3QA 0.50000000000000000000000000000000f -#define C3QB 0.86602540378443864676372317075294f - -__attribute__((always_inline)) void -FwdRad2B1(float2 *R0, float2 *R1) -{ - - float2 T; - - (*R1) = (*R0) - (*R1); - (*R0) = 2.0f * (*R0) - (*R1); - - -} - -__attribute__((always_inline)) void -InvRad2B1(float2 *R0, float2 *R1) -{ - - float2 T; - - (*R1) = (*R0) - (*R1); - (*R0) = 2.0f * (*R0) - (*R1); - - -} - -__attribute__((always_inline)) void -FwdRad4B1(float2 *R0, float2 *R2, float2 *R1, float2 *R3) -{ - - float2 T; - - (*R1) = (*R0) - (*R1); - (*R0) = 2.0f * (*R0) - (*R1); - (*R3) = (*R2) - (*R3); - (*R2) = 2.0f * (*R2) - (*R3); - - (*R2) = (*R0) - (*R2); - (*R0) = 2.0f * (*R0) - (*R2); - (*R3) = (*R1) + (fvect2)(-(*R3).y, (*R3).x); - (*R1) = 2.0f * (*R1) - (*R3); - - T = (*R1); - (*R1) = (*R2); - (*R2) = T; - -} - -__attribute__((always_inline)) void -InvRad4B1(float2 *R0, float2 *R2, float2 *R1, float2 *R3) -{ - - float2 T; - - (*R1) = (*R0) - (*R1); - (*R0) = 2.0f * (*R0) - (*R1); - (*R3) = (*R2) - (*R3); - (*R2) = 2.0f * (*R2) - (*R3); - - (*R2) = (*R0) - (*R2); - (*R0) = 2.0f * (*R0) - (*R2); - (*R3) = (*R1) + (fvect2)((*R3).y, -(*R3).x); - (*R1) = 2.0f * (*R1) - (*R3); - - T = (*R1); - (*R1) = (*R2); - (*R2) = T; - -} - -__attribute__((always_inline)) void -FwdPass0(uint rw, uint b, uint me, uint inOffset, uint outOffset, __global float2 *bufIn, __local float *bufOutRe, __local float *bufOutIm, float2 *R0, float2 *R1, float2 *R2, float2 *R3) -{ - - - if(rw) - { - (*R0) = bufIn[inOffset + ( 0 + me * 1 + 0 + 0 ) * 1]; - (*R1) = bufIn[inOffset + ( 0 + me * 1 + 0 + 2 ) * 1]; - (*R2) = bufIn[inOffset + ( 0 + me * 1 + 0 + 4 ) * 1]; - (*R3) = bufIn[inOffset + ( 0 + me * 1 + 0 + 6 ) * 1]; - } - - - FwdRad4B1(R0, R1, R2, R3); - - - if(rw) - { - bufOutRe[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 0 ) * 1] = (*R0).x; - bufOutRe[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 1 ) * 1] = (*R1).x; - bufOutRe[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 2 ) * 1] = (*R2).x; - bufOutRe[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 3 ) * 1] = (*R3).x; - } - - - barrier(CLK_LOCAL_MEM_FENCE); - - if(rw) - { - (*R0).x = bufOutRe[outOffset + ( 0 + me * 2 + 0 + 0 ) * 1]; - (*R1).x = bufOutRe[outOffset + ( 0 + me * 2 + 0 + 4 ) * 1]; - (*R2).x = bufOutRe[outOffset + ( 0 + me * 2 + 1 + 0 ) * 1]; - (*R3).x = bufOutRe[outOffset + ( 0 + me * 2 + 1 + 4 ) * 1]; - } - - - barrier(CLK_LOCAL_MEM_FENCE); - - if(rw) - { - bufOutIm[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 0 ) * 1] = (*R0).y; - bufOutIm[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 1 ) * 1] = (*R1).y; - bufOutIm[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 2 ) * 1] = (*R2).y; - bufOutIm[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 3 ) * 1] = (*R3).y; - } - - - barrier(CLK_LOCAL_MEM_FENCE); - - if(rw) - { - (*R0).y = bufOutIm[outOffset + ( 0 + me * 2 + 0 + 0 ) * 1]; - (*R1).y = bufOutIm[outOffset + ( 0 + me * 2 + 0 + 4 ) * 1]; - (*R2).y = bufOutIm[outOffset + ( 0 + me * 2 + 1 + 0 ) * 1]; - (*R3).y = bufOutIm[outOffset + ( 0 + me * 2 + 1 + 4 ) * 1]; - } - - - barrier(CLK_LOCAL_MEM_FENCE); - -} - -__attribute__((always_inline)) void -FwdPass1(uint rw, uint b, uint me, uint inOffset, uint outOffset, __local float *bufInRe, __local float *bufInIm, __global float2 *bufOut, float2 *R0, float2 *R1, float2 *R2, float2 *R3) -{ - - - - { - float2 W = twiddles[3 + 1 * ((2 * me + 0) % 4) + 0]; - float TR, TI; - TR = (W.x * (*R1).x) - (W.y * (*R1).y); - TI = (W.y * (*R1).x) + (W.x * (*R1).y); - (*R1).x = TR; - (*R1).y = TI; - } - - { - float2 W = twiddles[3 + 1 * ((2 * me + 1) % 4) + 0]; - float TR, TI; - TR = (W.x * (*R3).x) - (W.y * (*R3).y); - TI = (W.y * (*R3).x) + (W.x * (*R3).y); - (*R3).x = TR; - (*R3).y = TI; - } - - FwdRad2B1(R0, R1); - FwdRad2B1(R2, R3); - - - if(rw) - { - __global float4 *buff4g = bufOut; - - buff4g[ 1 * me + 0 + 0 ] = (float4)((*R0).x, (*R0).y, (*R2).x, (*R2).y); - buff4g[ 1 * me + 0 + 2 ] = (float4)((*R1).x, (*R1).y, (*R3).x, (*R3).y); - } - -} - -__attribute__((always_inline)) void -InvPass0(uint rw, uint b, uint me, uint inOffset, uint outOffset, __global float2 *bufIn, __local float *bufOutRe, __local float *bufOutIm, float2 *R0, float2 *R1, float2 *R2, float2 *R3) -{ - - - if(rw) - { - (*R0) = bufIn[inOffset + ( 0 + me * 1 + 0 + 0 ) * 1]; - (*R1) = bufIn[inOffset + ( 0 + me * 1 + 0 + 2 ) * 1]; - (*R2) = bufIn[inOffset + ( 0 + me * 1 + 0 + 4 ) * 1]; - (*R3) = bufIn[inOffset + ( 0 + me * 1 + 0 + 6 ) * 1]; - } - - - InvRad4B1(R0, R1, R2, R3); - - - if(rw) - { - bufOutRe[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 0 ) * 1] = (*R0).x; - bufOutRe[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 1 ) * 1] = (*R1).x; - bufOutRe[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 2 ) * 1] = (*R2).x; - bufOutRe[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 3 ) * 1] = (*R3).x; - } - - - barrier(CLK_LOCAL_MEM_FENCE); - - if(rw) - { - (*R0).x = bufOutRe[outOffset + ( 0 + me * 2 + 0 + 0 ) * 1]; - (*R1).x = bufOutRe[outOffset + ( 0 + me * 2 + 0 + 4 ) * 1]; - (*R2).x = bufOutRe[outOffset + ( 0 + me * 2 + 1 + 0 ) * 1]; - (*R3).x = bufOutRe[outOffset + ( 0 + me * 2 + 1 + 4 ) * 1]; - } - - - barrier(CLK_LOCAL_MEM_FENCE); - - if(rw) - { - bufOutIm[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 0 ) * 1] = (*R0).y; - bufOutIm[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 1 ) * 1] = (*R1).y; - bufOutIm[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 2 ) * 1] = (*R2).y; - bufOutIm[outOffset + ( ((1 * me + 0) / 1) * 4 + (1 * me + 0) % 1 + 3 ) * 1] = (*R3).y; - } - - - barrier(CLK_LOCAL_MEM_FENCE); - - if(rw) - { - (*R0).y = bufOutIm[outOffset + ( 0 + me * 2 + 0 + 0 ) * 1]; - (*R1).y = bufOutIm[outOffset + ( 0 + me * 2 + 0 + 4 ) * 1]; - (*R2).y = bufOutIm[outOffset + ( 0 + me * 2 + 1 + 0 ) * 1]; - (*R3).y = bufOutIm[outOffset + ( 0 + me * 2 + 1 + 4 ) * 1]; - } - - - barrier(CLK_LOCAL_MEM_FENCE); - -} - -__attribute__((always_inline)) void -InvPass1(uint rw, uint b, uint me, uint inOffset, uint outOffset, __local float *bufInRe, __local float *bufInIm, __global float2 *bufOut, float2 *R0, float2 *R1, float2 *R2, float2 *R3) -{ - - - - { - float2 W = twiddles[3 + 1 * ((2 * me + 0) % 4) + 0]; - float TR, TI; - TR = (W.x * (*R1).x) + (W.y * (*R1).y); - TI = -(W.y * (*R1).x) + (W.x * (*R1).y); - (*R1).x = TR; - (*R1).y = TI; - } - - { - float2 W = twiddles[3 + 1 * ((2 * me + 1) % 4) + 0]; - float TR, TI; - TR = (W.x * (*R3).x) + (W.y * (*R3).y); - TI = -(W.y * (*R3).x) + (W.x * (*R3).y); - (*R3).x = TR; - (*R3).y = TI; - } - - InvRad2B1(R0, R1); - InvRad2B1(R2, R3); - - - if(rw) - { - __global float4 *buff4g = bufOut; - - buff4g[ 1 * me + 0 + 0 ] = (float4)((*R0).x, (*R0).y, (*R2).x, (*R2).y) * 1.2500000000000000e-01f; - buff4g[ 1 * me + 0 + 2 ] = (float4)((*R1).x, (*R1).y, (*R3).x, (*R3).y) * 1.2500000000000000e-01f; - } - -} - -typedef union { uint u; - int i; -} cb_t; - -__kernel __attribute__((reqd_work_group_size (64,1,1))) -//void fft_fwd(__constant cb_t *cb __attribute__((max_constant_size(32))), __global const float2 * restrict gbIn, __global float2 * restrict gbOut) -void fft_fwd(__global const float2 * restrict gbIn, __global float2 * restrict gbOut) -{ - uint me = get_local_id(0); - uint batch = get_group_id(0); - - __local float lds[256]; - - uint iOffset; - uint oOffset; - __global float2 *lwbIn; - __global float2 *lwbOut; - - float2 R0, R1, R2, R3; - - //uint rw = (me < ((cb[0].u) - batch*32)*2) ? 1 : 0; - uint rw = (me < ((1) - batch * 32) * 2) ? 1 : 0; - - uint b = 0; - - iOffset = (batch * 32 + (me / 2)) * 8; - oOffset = (batch * 32 + (me / 2)) * 8; - lwbIn = gbIn + iOffset; - lwbOut = gbOut + oOffset; - - FwdPass0(rw, b, me % 2, 0, (me / 2) * 8, lwbIn, lds, lds, &R0, &R1, &R2, &R3); - FwdPass1(rw, b, me % 2, (me / 2) * 8, 0, lds, lds, lwbOut, &R0, &R1, &R2, &R3); -} - -__kernel __attribute__((reqd_work_group_size (64,1,1))) -//void fft_back(__constant cb_t *cb __attribute__((max_constant_size(32))), __global const float2 * restrict gbIn, __global float2 * restrict gbOut) -void fft_back(__global const float2 * restrict gbIn, __global float2 * restrict gbOut) -{ - uint me = get_local_id(0); - uint batch = get_group_id(0); - - __local float lds[256]; - - uint iOffset; - uint oOffset; - __global float2 *lwbIn; - __global float2 *lwbOut; - - float2 R0, R1, R2, R3; - - //uint rw = (me < ((cb[0].u) - batch*32)*2) ? 1 : 0; - uint rw = (me < ((1) - batch * 32) * 2) ? 1 : 0; - - uint b = 0; - - iOffset = (batch * 32 + (me / 2)) * 8; - oOffset = (batch * 32 + (me / 2)) * 8; - lwbIn = gbIn + iOffset; - lwbOut = gbOut + oOffset; - - InvPass0(rw, b, me % 2, 0, (me / 2) * 8, lwbIn, lds, lds, &R0, &R1, &R2, &R3); - InvPass1(rw, b, me % 2, (me / 2) * 8, 0, lds, lds, lwbOut, &R0, &R1, &R2, &R3); -} - - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/gpu_incl.h b/RTCP/Cobalt/GPUProc/src/opencl/gpu_incl.h deleted file mode 100644 index 9db413b2c52996b987814888aa6bb35af2ff74b2..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/gpu_incl.h +++ /dev/null @@ -1,34 +0,0 @@ -//# gpu_incl.h: portable OpenCL header include with our option(s) -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_GPU_INCL_H -#define LOFAR_GPUPROC_OPENCL_GPU_INCL_H - -// OpenCL include option(s) -#define __CL_ENABLE_EXCEPTIONS - -#if defined(__APPLE__) || defined(__MACOSX) -# include <OpenCL/cl.hpp> -#else -# include <CL/cl.hpp> -#endif - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/gpu_utils.cc b/RTCP/Cobalt/GPUProc/src/opencl/gpu_utils.cc deleted file mode 100644 index 001816c6d931f17ba5367a3ee96fc613ef869754..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/gpu_utils.cc +++ /dev/null @@ -1,206 +0,0 @@ -//# gpu_utils.cc -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "gpu_utils.h" - -#include <cstdlib> -#include <cstring> -#include <iomanip> // std::setprecision() -#include <fstream> -#include <sstream> - -#include <Common/LofarLogger.h> -#include <Common/SystemUtil.h> - -#include <GPUProc/global_defines.h> - -namespace LOFAR -{ - namespace Cobalt - { - - void createContext(cl::Context &context, std::vector<cl::Device> &devices) - { - const char *platformName = getenv("PLATFORM"); - -#if defined __linux__ - if (platformName == 0) -#endif - platformName = "NVIDIA CUDA"; - //platformName = "AMD Accelerated Parallel Processing"; - - cl_device_type type = CL_DEVICE_TYPE_DEFAULT; - - const char *deviceType = getenv("TYPE"); - - if (deviceType != 0) { - if (strcmp(deviceType, "GPU") == 0) - type = CL_DEVICE_TYPE_GPU; - else if (strcmp(deviceType, "CPU") == 0) - type = CL_DEVICE_TYPE_CPU; - else - LOG_ERROR_STR("Unrecognized device type: " << deviceType); - } - - const char *deviceName = getenv("DEVICE"); - - std::vector<cl::Platform> platforms; - cl::Platform::get(&platforms); - - for (std::vector<cl::Platform>::iterator platform = platforms.begin(); platform != platforms.end(); platform++) { - LOG_INFO_STR("Platform profile: " << platform->getInfo<CL_PLATFORM_PROFILE>()); - LOG_INFO_STR("Platform name: " << platform->getInfo<CL_PLATFORM_NAME>()); - LOG_INFO_STR("Platform version: " << platform->getInfo<CL_PLATFORM_VERSION>()); - LOG_INFO_STR("Platform extensions: " << platform->getInfo<CL_PLATFORM_EXTENSIONS>()); - } - - for (std::vector<cl::Platform>::iterator platform = platforms.begin(); platform != platforms.end(); platform++) { - if (platform->getInfo<CL_PLATFORM_NAME>() == platformName) { - platform->getDevices(type, &devices); - - if (deviceName != 0) - for (std::vector<cl::Device>::iterator device = devices.end(); --device >= devices.begin(); ) - if (device->getInfo<CL_DEVICE_NAME>() != deviceName) - devices.erase(device); - - for (std::vector<cl::Device>::iterator device = devices.begin(); device != devices.end(); device++) { - LOG_INFO_STR("Device: " << device->getInfo<CL_DEVICE_NAME>()); - LOG_INFO_STR("Max mem: " << device->getInfo<CL_DEVICE_MAX_MEM_ALLOC_SIZE>()/1024/1024 << " MByte"); - } - - cl_context_properties cps[3] = { CL_CONTEXT_PLATFORM, (cl_context_properties)(*platform)(), 0 }; - context = cl::Context(type, cps); - return; - } - } - - LOG_FATAL_STR("Platform not found: " << platformName); - exit(1); - } - - - cl::Program createProgram(const Parset &ps, cl::Context &context, std::vector<cl::Device> &devices, const char *sources) - { - std::stringstream args; - args << "-cl-fast-relaxed-math"; - - std::vector<cl_context_properties> properties; - context.getInfo(CL_CONTEXT_PROPERTIES, &properties); - - if (cl::Platform((cl_platform_id) properties[1]).getInfo<CL_PLATFORM_NAME>() == "NVIDIA CUDA") { - args << " -cl-nv-verbose"; - args << " -cl-nv-opt-level=99"; - //args << " -cl-nv-maxrregcount=63"; - args << " -DNVIDIA_CUDA"; - } - - //if (devices[0].getInfo<CL_DEVICE_NAME>() == "GeForce GTX 680") - //args << " -DUSE_FLOAT4_IN_CORRELATOR"; - - args << " -I" << dirname(__FILE__); - args << " -DNR_BITS_PER_SAMPLE=" << ps.nrBitsPerSample(); - args << " -DSUBBAND_BANDWIDTH=" << std::setprecision(7) << ps.subbandBandwidth() << 'f'; - args << " -DNR_SUBBANDS=" << ps.nrSubbands(); - args << " -DNR_CHANNELS=" << ps.nrChannelsPerSubband(); - args << " -DNR_STATIONS=" << ps.settings.antennaFields.size(); - args << " -DNR_SAMPLES_PER_CHANNEL=" << ps.nrSamplesPerChannel(); - args << " -DNR_SAMPLES_PER_SUBBAND=" << ps.nrSamplesPerSubband(); - args << " -DNR_BEAMS=" << ps.nrBeams(); - args << " -DNR_TABS=" << ps.nrTABs(0); - args << " -DNR_COHERENT_STOKES=" << ps.nrCoherentStokes(); - args << " -DNR_INCOHERENT_STOKES=" << ps.nrIncoherentStokes(); - args << " -DCOHERENT_STOKES_TIME_INTEGRATION_FACTOR=" << ps.coherentStokesTimeIntegrationFactor(); - args << " -DINCOHERENT_STOKES_TIME_INTEGRATION_FACTOR=" << ps.incoherentStokesTimeIntegrationFactor(); - args << " -DNR_POLARIZATIONS=" << NR_POLARIZATIONS; - args << " -DNR_TAPS=" << NR_TAPS; - args << " -DNR_STATION_FILTER_TAPS=" << NR_STATION_FILTER_TAPS; - - if (ps.delayCompensation()) - args << " -DDELAY_COMPENSATION"; - - if (ps.correctBandPass()) - args << " -DBANDPASS_CORRECTION"; - - args << " -DDEDISPERSION_FFT_SIZE=" << ps.dedispersionFFTsize(); - return createProgram(context, devices, dirname(__FILE__).append("/").append(sources).c_str(), args.str().c_str()); - } - - cl::Program createProgram(cl::Context &context, std::vector<cl::Device> &devices, const char *sources, const char *args) - { - // Let the compiler read in the source file by passing an #include as source string. - std::stringstream cmd; - cmd << "#include \"" << std::string(sources) << '"' << std::endl; - cl::Program program(context, cmd.str()); - - try { - program.build(devices, args); - std::string msg; - program.getBuildInfo(devices[0], CL_PROGRAM_BUILD_LOG, &msg); - - LOG_INFO(msg); - } catch (cl::Error &error) { - if (strcmp(error.what(), "clBuildProgram") == 0) { - std::string msg; - program.getBuildInfo(devices[0], CL_PROGRAM_BUILD_LOG, &msg); - - LOG_FATAL(msg); - exit(1); - } else { - throw; - } - } - -#if 1 - std::vector<size_t> binarySizes = program.getInfo<CL_PROGRAM_BINARY_SIZES>(); -#if 0 - // cl::Program::getInfo<> cl.hpp broken - std::vector<char *> binaries = program.getInfo<CL_PROGRAM_BINARIES>(); -#else - std::vector<char *> binaries(binarySizes.size()); - - for (unsigned b = 0; b < binaries.size(); b++) - binaries[b] = new char[binarySizes[b]]; - - cl_int error = clGetProgramInfo(program(), CL_PROGRAM_BINARIES, binaries.size() * sizeof(char *), &binaries[0], 0); - - if (error != CL_SUCCESS) - throw cl::Error(error, "clGetProgramInfo"); // FIXME: cleanup binaries[*] -#endif - - for (unsigned i = 0; i < 1 /*binaries.size()*/; i++) { - std::stringstream filename; - filename << sources << '-' << i << ".ptx"; - std::ofstream(filename.str().c_str(), std::ofstream::binary).write(binaries[i], binarySizes[i]); - } - -#if 1 - for (unsigned b = 0; b < binaries.size(); b++) - delete [] binaries[b]; -#endif -#endif - - return program; - } - - } // namespace Cobalt -} // namespace LOFAR - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/gpu_utils.h b/RTCP/Cobalt/GPUProc/src/opencl/gpu_utils.h deleted file mode 100644 index 373618c0a9b0786d527cf3c7cc5785dd06c32451..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/gpu_utils.h +++ /dev/null @@ -1,50 +0,0 @@ -//# gpu_utils.h -//# Copyright (C) 2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#ifndef LOFAR_GPUPROC_OPENCL_GPU_UTILS_H -#define LOFAR_GPUPROC_OPENCL_GPU_UTILS_H - -#include <string> -#include <vector> - -#include <CoInterface/Parset.h> - -#include "gpu_incl.h" - -namespace LOFAR -{ - namespace Cobalt - { - - void createContext(cl::Context &, std::vector<cl::Device> &); - - - cl::Program createProgram(const Parset &ps, cl::Context &context, - std::vector<cl::Device> &devices, - const char *sources); - // called by the above ("internal"). - cl::Program createProgram(cl::Context &, std::vector<cl::Device> &, - const char *sources, const char *args); - - } // namespace Cobalt -} // namespace LOFAR - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/gpu_wrapper.cc b/RTCP/Cobalt/GPUProc/src/opencl/gpu_wrapper.cc deleted file mode 100644 index 586893ea35cf6c617f08470d11f9c2b647fbca2e..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/gpu_wrapper.cc +++ /dev/null @@ -1,183 +0,0 @@ -//# gpu_wrapper.cc: OpenCL-specific wrapper classes for GPU types. -//# -//# Copyright (C) 2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> - -#include "gpu_wrapper.h" - -#include <iostream> - -#include <Common/Exception.h> -#include <Common/Thread/Mutex.h> - -// Use our own terminate handler -LOFAR::Exception::TerminateHandler th(LOFAR::Cobalt::gpu::terminate); - -namespace LOFAR -{ - namespace Cobalt - { - namespace gpu - { - std::string errorMessage(cl_int error) - { - switch (error) { - case CL_SUCCESS: - return "Success"; - case CL_DEVICE_NOT_FOUND: - return "Device not found"; - case CL_DEVICE_NOT_AVAILABLE: - return "Device not available"; - case CL_COMPILER_NOT_AVAILABLE: - return "Compiler not available"; - case CL_MEM_OBJECT_ALLOCATION_FAILURE: - return "Memory object allocation failure"; - case CL_OUT_OF_RESOURCES: - return "Out of resources"; - case CL_OUT_OF_HOST_MEMORY: - return "Out of host memory"; - case CL_PROFILING_INFO_NOT_AVAILABLE: - return "Profiling information not available"; - case CL_MEM_COPY_OVERLAP: - return "Memory copy overlap"; - case CL_IMAGE_FORMAT_MISMATCH: - return "Image format mismatch"; - case CL_IMAGE_FORMAT_NOT_SUPPORTED: - return "Image format not supported"; - case CL_BUILD_PROGRAM_FAILURE: - return "Program build failure"; - case CL_MAP_FAILURE: - return "Map failure"; - case CL_INVALID_VALUE: - return "Invalid value"; - case CL_INVALID_DEVICE_TYPE: - return "Invalid device type"; - case CL_INVALID_PLATFORM: - return "Invalid platform"; - case CL_INVALID_DEVICE: - return "Invalid device"; - case CL_INVALID_CONTEXT: - return "Invalid context"; - case CL_INVALID_QUEUE_PROPERTIES: - return "Invalid queue properties"; - case CL_INVALID_COMMAND_QUEUE: - return "Invalid command queue"; - case CL_INVALID_HOST_PTR: - return "Invalid host pointer"; - case CL_INVALID_MEM_OBJECT: - return "Invalid memory object"; - case CL_INVALID_IMAGE_FORMAT_DESCRIPTOR: - return "Invalid image format descriptor"; - case CL_INVALID_IMAGE_SIZE: - return "Invalid image size"; - case CL_INVALID_SAMPLER: - return "Invalid sampler"; - case CL_INVALID_BINARY: - return "Invalid binary"; - case CL_INVALID_BUILD_OPTIONS: - return "Invalid build options"; - case CL_INVALID_PROGRAM: - return "Invalid program"; - case CL_INVALID_PROGRAM_EXECUTABLE: - return "Invalid program executable"; - case CL_INVALID_KERNEL_NAME: - return "Invalid kernel name"; - case CL_INVALID_KERNEL_DEFINITION: - return "Invalid kernel definition"; - case CL_INVALID_KERNEL: - return "Invalid kernel"; - case CL_INVALID_ARG_INDEX: - return "Invalid argument index"; - case CL_INVALID_ARG_VALUE: - return "Invalid argument value"; - case CL_INVALID_ARG_SIZE: - return "Invalid argument size"; - case CL_INVALID_KERNEL_ARGS: - return "Invalid kernel arguments"; - case CL_INVALID_WORK_DIMENSION: - return "Invalid work dimension"; - case CL_INVALID_WORK_GROUP_SIZE: - return "Invalid work group size"; - case CL_INVALID_WORK_ITEM_SIZE: - return "Invalid work item size"; - case CL_INVALID_GLOBAL_OFFSET: - return "Invalid global offset"; - case CL_INVALID_EVENT_WAIT_LIST: - return "Invalid event wait list"; - case CL_INVALID_EVENT: - return "Invalid event"; - case CL_INVALID_OPERATION: - return "Invalid operation"; - case CL_INVALID_GL_OBJECT: - return "Invalid OpenGL object"; - case CL_INVALID_BUFFER_SIZE: - return "Invalid buffer size"; - case CL_INVALID_MIP_LEVEL: - return "Invalid mip-map level"; - default: - std::stringstream str; - str << "Unknown (" << error << ')'; - return str.str(); - } - } - - void terminate() - { - // terminate() may be called recursively, so we need a mutex that can - // be locked recursively. - static Mutex mutex(Mutex::RECURSIVE); - - // Make sure that one thread has exclusive access. - ScopedLock lock(mutex); - - // We need to safe-guard against recursive calls. E.g., we were called - // twice, because a rethrow was attempted without an active exception. - static bool terminating = false; - - if (!terminating) { - // This is the first time we were called. Make sure there was an active - // exception by trying to rethrow it. If that fails, std::terminate() - // will be called, again. - terminating = true; - try { - throw; - } - // Print detailed error information if a cl::Error was thrown. - catch (cl::Error& err) { - try { - std::cerr << "cl::Error: " << err.what() << ": " - << errorMessage(err.err()) << std::endl; - } catch (...) {} - } - // Catch all other exceptions, otherwise std::terminate() will call - // abort() immediately. - catch (...) {} - } - // Let the LOFAR Exception::terminate handler take it from here. - Exception::terminate(); - } - - } // namespace gpu - - } // namespace Cobalt - -} // namespace LOFAR - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/gpu_wrapper.h b/RTCP/Cobalt/GPUProc/src/opencl/gpu_wrapper.h deleted file mode 100644 index 69a345053b9adb56cebb3932fec3a49ac4548c88..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/gpu_wrapper.h +++ /dev/null @@ -1,88 +0,0 @@ -//# gpu_wrapper.h: OpenCL-specific wrapper classes for GPU types. -//# -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -// \file opencl/gpu_wrapper.h -// GPU types on top of OpenCL. - -#ifndef LOFAR_GPUPROC_OPENCL_GPU_WRAPPER_H -#define LOFAR_GPUPROC_OPENCL_GPU_WRAPPER_H - -#include <sstream> - -#include <Common/Exception.h> - -#include <GPUProc/gpu_wrapper.h> // GPUException -#include "gpu_incl.h" - -namespace LOFAR -{ - namespace Cobalt - { - namespace gpu - { - // Exception class for GPU errors. - EXCEPTION_CLASS(OpenCLException, GPUException); - - // Return the OpenCL error string associated with \a errcode. - std::string errorMessage(cl_int errcode); - - // The sole purpose of this function is to extract detailed error - // information if a cl::Error was thrown. Since we want the complete - // backtrace, we cannot simply try-catch in main(), because that would - // unwind the stack. The only option we have is to use our own terminate - // handler. - void terminate(); - } - } -} - -#if 0 -//# Don't know how useful this is, because you can't wrap constructors this way. -//# If CL-exceptions are enabled the object will be defined inside the -//# try-block of the macro; if they're disabled the object will be defined -//# inside the do-while block *and* you would need to check the error returned -//# in one of the constructor arguments :( - -// Convenience macro to catch an OpenCL exception (cl::Error) and rethrow -// it as a LOFAR OpenCLException. -#if defined(__CL_ENABLE_EXCEPTIONS) -# define CHECK_OPENCL_CALL(func) \ - try { \ - func; \ - } catch (cl::Error &err) { \ - std::ostringstream oss; \ - oss << err.what() << ": " << LOFAR::Cobalt::gpu::errorMessage(err.err()); \ - THROW (LOFAR::Cobalt::gpu::OpenCLException, oss.str()); \ - } -#else -# define CHECK_OPENCL_CALL(func) \ - do { \ - cl_int result = func; \ - if (result != CL_SUCCESS) { \ - THROW (LOFAR::Cobalt::gpu::OpenCLException, \ - #func << ": " << LOFAR::Cobalt::gpu::errorMessage(result)); \ - } \ - } while(0) -#endif -#endif - -#endif - diff --git a/RTCP/Cobalt/GPUProc/src/opencl/math.cl b/RTCP/Cobalt/GPUProc/src/opencl/math.cl deleted file mode 100644 index 9620d47ab97e22d9a345b077ed4a1add292f7e7c..0000000000000000000000000000000000000000 --- a/RTCP/Cobalt/GPUProc/src/opencl/math.cl +++ /dev/null @@ -1,39 +0,0 @@ -//# math.cl -//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -typedef float2 fcomplex; -typedef float4 fcomplex2; -typedef float8 fcomplex4; - -typedef char4 char_complex2; -typedef short4 short_complex2; - - -fcomplex cmul(fcomplex a, fcomplex b) -{ - return (fcomplex) (a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x); -} - - -fcomplex cexp(float ang) -{ - return (fcomplex) (native_cos(ang), native_sin(ang)); -} -