integrating patches from dimitris

This commit is contained in:
Jerome Kieffer 2012-06-21 13:49:30 +02:00
parent 5c41d06821
commit fc71ff362f
16 changed files with 2621 additions and 2124 deletions

2
benchmark/benchmark.py Executable file → Normal file
View File

@ -103,7 +103,7 @@ out=ai.xrpd2(data,500,360)""" % (param, fn)
except Exception as error:
print("Failed to find an OpenCL GPU (useFp64:%s) %s" % (useFp64, error))
continue
print(" device: %s.%s" % ai._ocl.get_ids())
print(" device: %s.%s" % ai._ocl.get_contexed_Ids())
self.print_init(t1 - t0)
ref = ai.xrpd(data, N)
R = utilstest.Rwp(res, ref)

File diff suppressed because it is too large Load Diff

View File

@ -45,13 +45,13 @@ cdef class Integrator1d:
"""
Simple wrapper for ocl_xrpd1d.ocl_xrpd1D_fullsplit C++ class
"""
cdef ocl_xrpd1d.ocl_xrpd1D_fullsplit* cpp_integrator
cdef char* _devicetype
cdef char* filename
cdef ocl_xrpd1d.ocl_xrpd1D_fullsplit * cpp_integrator
cdef char * _devicetype
cdef char * filename
cdef int _nBins, _nData, _platformid, _deviceid,
cdef cpp_bool _useFp64
cdef float tth_min, tth_max,_tth_min, _tth_max
cdef float* ctth_out
cdef float tth_min, tth_max, _tth_min, _tth_max
cdef float * ctth_out
def __cinit__(self, filename=None):
"""
@ -75,14 +75,14 @@ cdef class Integrator1d:
del self.cpp_integrator
def __repr__(self):
return os.linesep.join(["Cython wrapper for ocl_xrpd1d.ocl_xrpd1D_fullsplit C++ class. Logging in %s"%self.filename,
"device: %s, platform %s device %s 64bits:%s image size: %s histogram size: %s"%(self._devicetype,self._platformid,self._deviceid, self._useFp64, self._nData,self._nBins),
",\t ".join(["%s: %s"%(k,v) for k,v in self.get_status().items()])])
return os.linesep.join(["Cython wrapper for ocl_xrpd1d.ocl_xrpd1D_fullsplit C++ class. Logging in %s" % self.filename,
"device: %s, platform %s device %s 64bits:%s image size: %s histogram size: %s" % (self._devicetype, self._platformid, self._deviceid, self._useFp64, self._nData, self._nBins),
",\t ".join(["%s: %s" % (k, v) for k, v in self.get_status().items()])])
@cython.cdivision(True)
@cython.boundscheck(False)
@cython.wraparound(False)
def _calc_tth_out(self,float lower, float upper):
def _calc_tth_out(self, float lower, float upper):
"""
Calculate the bin-center position in 2theta
"""
@ -91,11 +91,11 @@ cdef class Integrator1d:
# cdef numpy.ndarray[numpy.float32_t, ndim = 1] tth_out = numpy.empty(self._nBins,dtype=numpy.float32)
if self.ctth_out:
free(self.ctth_out)
self.ctth_out= <float*> malloc(self._nBins*sizeof(float))
cdef float delta = (upper - lower ) / (< float > (self._nBins))
self.ctth_out = < float *> malloc(self._nBins * sizeof(float))
cdef float delta = (upper - lower) / (< float > (self._nBins))
with nogil:
for i in range(self._nBins):
self.ctth_out[i] = <float>( self.tth_min + (0.5 +< float > i) * delta)
self.ctth_out[i] = < float > (self.tth_min + (0.5 +< float > i) * delta)
# self.tth_out = tth_out
@ -107,11 +107,11 @@ cdef class Integrator1d:
"""
cdef int rc
if useFp64 is not None:
self._useFp64 = <cpp_bool> bool(useFp64)
self._useFp64 = < cpp_bool > bool(useFp64)
self._nBins = Nbins
self._nData = Nimage
with nogil:
rc = self.cpp_integrator.getConfiguration(<int> 1024, <int> Nimage, <int> Nbins, <cpp_bool> self._useFp64)
rc = self.cpp_integrator.getConfiguration(< int > 1024, < int > Nimage, < int > Nbins, < cpp_bool > self._useFp64)
return rc
def configure(self, kernel=None):
@ -129,10 +129,10 @@ cdef class Integrator1d:
if os.path.isfile(kernel_name):
kernel = kernel_name
else:
kernel = os.path.join(os.path.dirname(os.path.abspath(__file__)),kernel_name)
kernel = os.path.join(os.path.dirname(os.path.abspath(__file__)), kernel_name)
else:
kernel = str(kernel)
cdef char* ckernel = <char*> kernel
cdef char * ckernel = < char *> kernel
cdef int rc
with nogil:
rc = self.cpp_integrator.configure(ckernel)
@ -146,20 +146,20 @@ cdef class Integrator1d:
loadTth is required and must be called at least once after a configure()
"""
cdef int rc
cdef numpy.ndarray[numpy.float32_t, ndim = 1] tthc,dtthc
tthc = numpy.ascontiguousarray(tth.ravel(),dtype=numpy.float32)
dtthc = numpy.ascontiguousarray(dtth.ravel(),dtype=numpy.float32)
cdef numpy.ndarray[numpy.float32_t, ndim = 1] tthc, dtthc
tthc = numpy.ascontiguousarray(tth.ravel(), dtype=numpy.float32)
dtthc = numpy.ascontiguousarray(dtth.ravel(), dtype=numpy.float32)
self._tth_max=(tthc+dtthc).max()*(1.0 + numpy.finfo(numpy.float32).eps)
self._tth_min=max(0.0,(tthc-dtthc).min())
self._tth_max = (tthc + dtthc).max()*(1.0 + numpy.finfo(numpy.float32).eps)
self._tth_min = max(0.0, (tthc - dtthc).min())
if tth_min is None:
tth_min = self._tth_min
if tth_max is None:
tth_max = self._tth_max
self._calc_tth_out(tth_min,tth_max)
self._calc_tth_out(tth_min, tth_max)
with nogil:
rc=self.cpp_integrator.loadTth(<float*> tthc.data, <float*> dtthc.data, <float> self.tth_min, <float> self.tth_max)
rc = self.cpp_integrator.loadTth(< float *> tthc.data, < float *> dtthc.data, < float > self.tth_min, < float > self.tth_max)
return rc
def setSolidAngle(self, numpy.ndarray solidAngle not None):
@ -173,9 +173,9 @@ cdef class Integrator1d:
@return: integer
"""
cdef numpy.ndarray[numpy.float32_t, ndim = 1] cSolidAngle
cSolidAngle = numpy.ascontiguousarray(solidAngle.ravel(),dtype=numpy.float32)
cSolidAngle = numpy.ascontiguousarray(solidAngle.ravel(), dtype=numpy.float32)
return self.cpp_integrator.setSolidAngle(<float*> cSolidAngle.data)
return self.cpp_integrator.setSolidAngle(< float *> cSolidAngle.data)
def unsetSolidAngle(self):
"""
@ -200,7 +200,7 @@ cdef class Integrator1d:
else:
cMask = numpy.ascontiguousarray(mask.astype(numpy.int).ravel())
return self.cpp_integrator.setMask(<int*> cMask.data)
return self.cpp_integrator.setMask(< int *> cMask.data)
def unsetMask(self):
"""
@ -218,7 +218,7 @@ cdef class Integrator1d:
"""
cdef int rc
with nogil:
rc=self.cpp_integrator.setDummyValue(dummy,delta_dummy)
rc = self.cpp_integrator.setDummyValue(dummy, delta_dummy)
return rc
def unsetDummyValue(self):
@ -240,7 +240,7 @@ cdef class Integrator1d:
def unsetRange(self):
"Resets the 2th integration range back to tth_min, tth_max"
self._calc_tth_out(self._tth_min,self._tth_max)
self._calc_tth_out(self._tth_min, self._tth_max)
return self.cpp_integrator.unsetRange()
@ -248,20 +248,20 @@ cdef class Integrator1d:
"""Take an image, integrate and return the histogram and weights
set / unset and loadTth methods have a direct impact on the execute() method.
All the rest of the methods will require at least a new configuration via configure()"""
cdef int rc,i
cdef numpy.ndarray[numpy.float32_t, ndim = 1] cimage, histogram, bins,tth_out
cimage = numpy.ascontiguousarray(image.ravel(),dtype=numpy.float32)
histogram = numpy.empty(self._nBins,dtype=numpy.float32)
bins = numpy.empty(self._nBins,dtype=numpy.float32)
tth_out = numpy.empty(self._nBins,dtype=numpy.float32)
cdef int rc, i
cdef numpy.ndarray[numpy.float32_t, ndim = 1] cimage, histogram, bins, tth_out
cimage = numpy.ascontiguousarray(image.ravel(), dtype=numpy.float32)
histogram = numpy.empty(self._nBins, dtype=numpy.float32)
bins = numpy.empty(self._nBins, dtype=numpy.float32)
tth_out = numpy.empty(self._nBins, dtype=numpy.float32)
assert cimage.size == self._nData
with nogil:
rc = self.cpp_integrator.execute(<float*> cimage.data, <float*> histogram.data, <float*> bins.data)
if rc!=0:
raise RuntimeError("OpenCL integrator failed with RC=%s"%rc)
rc = self.cpp_integrator.execute(< float *> cimage.data, < float *> histogram.data, < float *> bins.data)
if rc != 0:
raise RuntimeError("OpenCL integrator failed with RC=%s" % rc)
memcpy(tth_out.data,self.ctth_out,self._nBins*sizeof(float))
return tth_out,histogram,bins
memcpy(tth_out.data, self.ctth_out, self._nBins * sizeof(float))
return tth_out, histogram, bins
def clean(self, int preserve_context=0):
"""Free OpenCL related resources.
@ -273,7 +273,7 @@ cdef class Integrator1d:
################################################################################
# Methods inherited from ocl_base class
################################################################################
def init(self,devicetype="gpu",useFp64=True, platformid=None, deviceid=None ):
def init(self, devicetype="gpu", useFp64=True, platformid=None, deviceid=None):
"""Initial configuration: Choose a device and initiate a context. Devicetypes can be GPU,gpu,CPU,cpu,DEF,ACC,ALL.
Suggested are GPU,CPU. For each setting to work there must be such an OpenCL device and properly installed.
E.g.: If Nvidia driver is installed, GPU will succeed but CPU will fail. The AMD SDK kit is required for CPU via OpenCL.
@ -283,29 +283,35 @@ cdef class Integrator1d:
@param devid: integer
"""
cdef int forceIDs, rc
self._useFp64 = <cpp_bool> useFp64
self._devicetype = <char*> devicetype
self._useFp64 = < cpp_bool > useFp64
self._devicetype = < char *> devicetype
if (platformid is not None) and (deviceid is not None):
self._platformid = <int> int(platformid)
self._deviceid = <int> int(deviceid)
self._platformid = < int > int(platformid)
self._deviceid = < int > int(deviceid)
forceIDs = 1
else:
forceIDs = 0
with nogil:
if forceIDs:
rc = self.cpp_integrator.init(<char*>self._devicetype, <int>self._platformid, <int>self._deviceid, <cpp_bool> self._useFp64)
rc = self.cpp_integrator.init(< char *> self._devicetype, < int > self._platformid, < int > self._deviceid, < cpp_bool > self._useFp64)
else:
rc = self.cpp_integrator.init(<char*>self._devicetype, <cpp_bool> self._useFp64)
rc = self.cpp_integrator.init(< char *> self._devicetype, < cpp_bool > self._useFp64)
return rc
def show_devices(self):
"Prints a list of OpenCL capable devices, their platforms and their ids"
self.cpp_integrator.show_devices()
def show_devices(self, to_log=True):
"""
Prints a list of OpenCL capable devices, their platforms and their ids"
@param to_log: Set to false if you want to have info printed on screen
"""
self.cpp_integrator.show_devices(< int > to_log)
def show_device_details(self):
"Print details of a selected device"
self.cpp_integrator.show_device_details()
def show_device_details(self, to_log=True):
"""
Print details of a selected device
@param to_log: Set to false if you want to have info printed on screen
"""
self.cpp_integrator.show_device_details(< int > to_log)
def reset_time(self):
'Resets the internal profiling timers to 0'
@ -325,13 +331,13 @@ cdef class Integrator1d:
def get_status(self):
"return a dictionnary with the status of the integrator"
retbin = numpy.binary_repr(self.cpp_integrator.get_status(),8)
out={}
for i,v in enumerate(['dummy', 'mask', 'solid_angle', 'pos1', 'pos0', 'compiled', 'size', 'context']):
out[v]=bool(int(retbin[i]))
retbin = numpy.binary_repr(self.cpp_integrator.get_status(), 8)
out = {}
for i, v in enumerate(['dummy', 'mask', 'solid_angle', 'pos1', 'pos0', 'compiled', 'size', 'context']):
out[v] = bool(int(retbin[i]))
return out
def get_ids(self):
def get_contexed_Ids(self):
"""
@return: 2-tuple of integers corresponding to (platform_id, device_id)
"""
@ -339,8 +345,8 @@ cdef class Integrator1d:
self.cpp_integrator.get_contexed_Ids(platform, device)
return (platform, device)
_INTEGRATORS_1D={} #key=(Nimage,NBins), value=instance of Integrator1d
lock =threading.Semaphore()
_INTEGRATORS_1D = {} #key=(Nimage,NBins), value=instance of Integrator1d
lock = threading.Semaphore()
def histGPU1d(numpy.ndarray weights not None,
@ -376,12 +382,12 @@ def histGPU1d(numpy.ndarray weights not None,
assert pos0.size == size
assert delta_pos0.size == size
assert bins > 1
cdef float pos0_min,pos0_max,pos0_maxin
cdef float pos0_min, pos0_max, pos0_maxin
if (size,bins) not in _INTEGRATORS_1D:
if (size, bins) not in _INTEGRATORS_1D:
with lock:
if (size,bins) not in _INTEGRATORS_1D:
if (size, bins) not in _INTEGRATORS_1D:
if pos0Range is not None and len(pos0Range) > 1:
pos0_min = min(pos0Range)
pos0_maxin = max(pos0Range)
@ -391,7 +397,7 @@ def histGPU1d(numpy.ndarray weights not None,
if pos0_min < 0.0:
pos0_min = 0.0
pos0_max = pos0_maxin * (1.0 + numpy.finfo(numpy.float32).eps)
OCL_KERNEL = os.path.join(os.path.dirname(os.path.abspath(__file__)),"ocl_azim_kernel_2.cl")
OCL_KERNEL = os.path.join(os.path.dirname(os.path.abspath(__file__)), "ocl_azim_kernel_2.cl")
integr = Integrator1d()
if platformid and deviceid:
@ -401,27 +407,27 @@ def histGPU1d(numpy.ndarray weights not None,
useFp64=useFp64)
else:
rc = integr.init(devicetype, useFp64)
if rc!=0:
raise RuntimeError('Failed to initialize OpenCL deviceType %s (%s,%s) 64bits: %s'%(devicetype,platformid,deviceid,useFp64))
if rc != 0:
raise RuntimeError('Failed to initialize OpenCL deviceType %s (%s,%s) 64bits: %s' % (devicetype, platformid, deviceid, useFp64))
if 0!= integr.getConfiguration(size, bins):
raise RuntimeError('Failed to configure 1D integrator with Ndata=%s and Nbins=%s'%(size,bins))
if 0 != integr.getConfiguration(size, bins):
raise RuntimeError('Failed to configure 1D integrator with Ndata=%s and Nbins=%s' % (size, bins))
if 0!= integr.configure(<char*> OCL_KERNEL):
raise RuntimeError('Failed to compile kernel at %s'%(OCL_KERNEL))
if 0 != integr.configure(< char *> OCL_KERNEL):
raise RuntimeError('Failed to compile kernel at %s' % (OCL_KERNEL))
if 0!= integr.loadTth(pos0, delta_pos0, pos0_min, pos0_max):
if 0 != integr.loadTth(pos0, delta_pos0, pos0_min, pos0_max):
raise RuntimeError("Failed to upload 2th arrays")
#if 0!= integr.setSolidAngle(solid)
#a.setMask(mask)
else:
_INTEGRATORS_1D[(size,bins)]=integr
integr = _INTEGRATORS_1D[(size,bins)]
_INTEGRATORS_1D[(size, bins)] = integr
integr = _INTEGRATORS_1D[(size, bins)]
return integr.execute(weights)
def initocl_azim(*arg,**kwarg):
def initocl_azim(*arg, **kwarg):
"""Place holder:
It seams this must exist in this module to be valid"""
print("Calling initocl_azim with:")
print(arg)
print(kwarg)
print(kwarg)

View File

@ -84,18 +84,14 @@ cdef extern from "ocl_xrpd1d.hpp":
int init(char * devicetype, bool useFp64) nogil
int init(char * devicetype, int platformid, int devid, bool useFp64) nogil
#Prints a list of OpenCL capable devices, their platforms and their ids
void show_devices() nogil
#Same as show_devices but displays the results always on stdout even
#if the stream is set to a file
void print_devices() nogil
void show_devices(int ignoreStream) nogil
#Print details of a selected device
void show_device_details() nogil
void show_device_details(int ignoreStream) nogil
# Provide help message for interactive environments
void help() nogil
#Resets the internal profiling timers to 0
void reset_time() nogil
@ -109,10 +105,17 @@ cdef extern from "ocl_xrpd1d.hpp":
#Returns the time spent on memory copies
float get_memCpy_time() nogil
#Returns the pair ID (platform.device) of the active device
void get_contexed_Ids(int & platform, int & device) nogil
#Get the status of the intergator as an integer
#bit 0: has context
#bit 1: size are set
#bit 2: is configured (kernel compiled)
#bit 3: pos0/delta_pos0 arrays are loaded (radial angle)
#bit 4: pos1/delta_pos1 arrays are loaded (azimuthal angle)
#bit 5: solid angle correction is set
#bit 6: mask is set
#bit 7: use dummy value
int get_status() nogil
void print_active_platform_info() nogil
void print_active_device_info() nogil
void return_pair(int & platform, int & device) nogil

View File

@ -1,4 +1,4 @@
/* Generated by Cython 0.17pre on Mon Jun 4 22:08:21 2012 */
/* Generated by Cython 0.17pre on Thu Jun 21 13:23:56 2012 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"

View File

@ -1,4 +1,4 @@
<!-- Generated by Cython 0.17pre on Mon Jun 4 22:08:21 2012 -->
<!-- Generated by Cython 0.17pre on Thu Jun 21 13:23:56 2012 -->
<html>
<head>
@ -38,7 +38,7 @@ function toggleDiv(id) {
</script>
</head>
<body>
<p>Generated by Cython 0.17pre on Mon Jun 4 22:08:21 2012
<p>Generated by Cython 0.17pre on Thu Jun 21 13:23:56 2012
<p>Raw output: <a href="bilinear.c">bilinear.c</a>
<pre class='line' style='background-color: #FFFF79' onclick='toggleDiv("line1")'> 1: # -*- coding: utf8 -*-</pre>
<pre id='line1' class='code' style='background-color: #FFFF79'>

View File

@ -1,4 +1,4 @@
/* Generated by Cython 0.17pre on Mon Jun 4 22:10:27 2012 */
/* Generated by Cython 0.17pre on Thu Jun 21 13:23:56 2012 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
@ -1104,7 +1104,7 @@ static char __pyx_k_11[] = "Non-native byte order not supported";
static char __pyx_k_13[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_14[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_17[] = "Format string allocated too short.";
static char __pyx_k_21[] = "/home/jerome/workspace/azimuthal/pyFAI/src/histogram.pyx";
static char __pyx_k_21[] = "/home/kieffer/workspace/pyFAI/src/histogram.pyx";
static char __pyx_k__B[] = "B";
static char __pyx_k__H[] = "H";
static char __pyx_k__I[] = "I";
@ -2433,26 +2433,26 @@ static PyObject *__pyx_pf_9histogram_histogram(CYTHON_UNUSED PyObject *__pyx_sel
{
__pyx_v_i = 0;
#ifdef _OPENMP
#pragma omp parallel private(__pyx_t_21, __pyx_t_4, __pyx_t_22, __pyx_t_23, __pyx_t_15, __pyx_t_16)
#pragma omp parallel private(__pyx_t_23, __pyx_t_4, __pyx_t_21, __pyx_t_15, __pyx_t_16, __pyx_t_22)
#endif /* _OPENMP */
{
#ifdef _OPENMP
#pragma omp for lastprivate(__pyx_v_a) lastprivate(__pyx_v_fbin) lastprivate(__pyx_v_bin) lastprivate(__pyx_v_dIntL) lastprivate(__pyx_v_d) lastprivate(__pyx_v_dtmp) lastprivate(__pyx_v_dIntR) firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_dest) lastprivate(__pyx_v_dInt) lastprivate(__pyx_v_ffbin)
#pragma omp for lastprivate(__pyx_v_bin) lastprivate(__pyx_v_dtmp) firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_dest) lastprivate(__pyx_v_dIntR) lastprivate(__pyx_v_dInt) lastprivate(__pyx_v_dIntL) lastprivate(__pyx_v_ffbin) lastprivate(__pyx_v_d) lastprivate(__pyx_v_fbin) lastprivate(__pyx_v_a)
#endif /* _OPENMP */
for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_20; __pyx_t_19++){
{
__pyx_v_i = 0 + 1 * __pyx_t_19;
/* Initialize private variables to invalid values */
__pyx_v_a = ((double)__PYX_NAN);
__pyx_v_fbin = ((double)__PYX_NAN);
__pyx_v_bin = ((long)0xbad0bad0);
__pyx_v_dIntL = ((double)__PYX_NAN);
__pyx_v_d = ((double)__PYX_NAN);
__pyx_v_dtmp = ((double)__PYX_NAN);
__pyx_v_dIntR = ((double)__PYX_NAN);
__pyx_v_dest = ((long)0xbad0bad0);
__pyx_v_dIntR = ((double)__PYX_NAN);
__pyx_v_dInt = ((double)__PYX_NAN);
__pyx_v_dIntL = ((double)__PYX_NAN);
__pyx_v_ffbin = ((double)__PYX_NAN);
__pyx_v_d = ((double)__PYX_NAN);
__pyx_v_fbin = ((double)__PYX_NAN);
__pyx_v_a = ((double)__PYX_NAN);
/* "histogram.pyx":144
* with nogil:
@ -2749,18 +2749,18 @@ static PyObject *__pyx_pf_9histogram_histogram(CYTHON_UNUSED PyObject *__pyx_sel
{
__pyx_v_idx = 0;
#ifdef _OPENMP
#pragma omp parallel reduction(+:__pyx_v_tmp_count) reduction(+:__pyx_v_tmp_data) private(__pyx_t_24, __pyx_t_4, __pyx_t_17, __pyx_t_25, __pyx_t_23, __pyx_t_26, __pyx_t_28, __pyx_t_27)
#pragma omp parallel reduction(+:__pyx_v_tmp_data) reduction(+:__pyx_v_tmp_count) private(__pyx_t_23, __pyx_t_28, __pyx_t_4, __pyx_t_26, __pyx_t_27, __pyx_t_25, __pyx_t_24, __pyx_t_17)
#endif /* _OPENMP */
{
#ifdef _OPENMP
#pragma omp for firstprivate(__pyx_v_idx) lastprivate(__pyx_v_idx) lastprivate(__pyx_v_dest) lastprivate(__pyx_v_t)
#pragma omp for lastprivate(__pyx_v_t) lastprivate(__pyx_v_dest) firstprivate(__pyx_v_idx) lastprivate(__pyx_v_idx)
#endif /* _OPENMP */
for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_5; __pyx_t_19++){
{
__pyx_v_idx = 0 + 1 * __pyx_t_19;
/* Initialize private variables to invalid values */
__pyx_v_dest = ((long)0xbad0bad0);
__pyx_v_t = ((long)0xbad0bad0);
__pyx_v_dest = ((long)0xbad0bad0);
/* "histogram.pyx":172
*
@ -5029,7 +5029,7 @@ static PyObject *__pyx_pf_9histogram_2histogram2d(CYTHON_UNUSED PyObject *__pyx_
{
__pyx_v_i = 0;
#ifdef _OPENMP
#pragma omp parallel private(__pyx_t_93, __pyx_t_92, __pyx_t_84, __pyx_t_85, __pyx_t_90, __pyx_t_82, __pyx_t_23, __pyx_t_83, __pyx_t_86, __pyx_t_87, __pyx_t_88, __pyx_t_91, __pyx_t_89)
#pragma omp parallel private(__pyx_t_87, __pyx_t_91, __pyx_t_88, __pyx_t_83, __pyx_t_86, __pyx_t_23, __pyx_t_90, __pyx_t_93, __pyx_t_92, __pyx_t_89, __pyx_t_84, __pyx_t_82, __pyx_t_85)
#endif /* _OPENMP */
{
#ifdef _OPENMP

View File

@ -1,4 +1,4 @@
<!-- Generated by Cython 0.17pre on Mon Jun 4 22:10:27 2012 -->
<!-- Generated by Cython 0.17pre on Thu Jun 21 13:23:56 2012 -->
<html>
<head>
@ -38,7 +38,7 @@ function toggleDiv(id) {
</script>
</head>
<body>
<p>Generated by Cython 0.17pre on Mon Jun 4 22:10:27 2012
<p>Generated by Cython 0.17pre on Thu Jun 21 13:23:56 2012
<p>Raw output: <a href="histogram.c">histogram.c</a>
<pre class='line' style='background-color: #FFFF79' onclick='toggleDiv("line1")'> 1: #!/usr/bin/env python</pre>
<pre id='line1' class='code' style='background-color: #FFFF79'>
@ -1454,22 +1454,22 @@ static PyObject *__pyx_pf_9histogram_histogram(CYTHON_UNUSED PyObject *__pyx_sel
#endif /* _OPENMP */
{
#ifdef _OPENMP
#pragma omp for lastprivate(__pyx_v_a) lastprivate(__pyx_v_fbin) lastprivate(__pyx_v_bin) lastprivate(__pyx_v_dIntL) lastprivate(__pyx_v_d) lastprivate(__pyx_v_dtmp) lastprivate(__pyx_v_dIntR) firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_dest) lastprivate(__pyx_v_dInt) lastprivate(__pyx_v_ffbin)
#pragma omp for lastprivate(__pyx_v_bin) lastprivate(__pyx_v_dtmp) firstprivate(__pyx_v_i) lastprivate(__pyx_v_i) lastprivate(__pyx_v_dest) lastprivate(__pyx_v_dIntR) lastprivate(__pyx_v_dInt) lastprivate(__pyx_v_dIntL) lastprivate(__pyx_v_ffbin) lastprivate(__pyx_v_d) lastprivate(__pyx_v_fbin) lastprivate(__pyx_v_a)
#endif /* _OPENMP */
for (__pyx_t_19 = 0; __pyx_t_19 <code><</code> __pyx_t_20; __pyx_t_19++){
{
__pyx_v_i = 0 + 1 * __pyx_t_19;
/* Initialize private variables to invalid values */
__pyx_v_a = ((double)__PYX_NAN);
__pyx_v_fbin = ((double)__PYX_NAN);
__pyx_v_bin = ((long)0xbad0bad0);
__pyx_v_dIntL = ((double)__PYX_NAN);
__pyx_v_d = ((double)__PYX_NAN);
__pyx_v_dtmp = ((double)__PYX_NAN);
__pyx_v_dIntR = ((double)__PYX_NAN);
__pyx_v_dest = ((long)0xbad0bad0);
__pyx_v_dIntR = ((double)__PYX_NAN);
__pyx_v_dInt = ((double)__PYX_NAN);
__pyx_v_dIntL = ((double)__PYX_NAN);
__pyx_v_ffbin = ((double)__PYX_NAN);
__pyx_v_d = ((double)__PYX_NAN);
__pyx_v_fbin = ((double)__PYX_NAN);
__pyx_v_a = ((double)__PYX_NAN);
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line144")'> 144: d = cdata[i]</pre>
<pre id='line144' class='code' style='background-color: #FFFFff'>
/* "histogram.pyx":144
@ -1798,14 +1798,14 @@ static PyObject *__pyx_pf_9histogram_histogram(CYTHON_UNUSED PyObject *__pyx_sel
#endif /* _OPENMP */
{
#ifdef _OPENMP
#pragma omp for reduction(+:__pyx_v_tmp_count) reduction(+:__pyx_v_tmp_data) firstprivate(__pyx_v_idx) lastprivate(__pyx_v_idx) lastprivate(__pyx_v_dest) lastprivate(__pyx_v_t)
#pragma omp for reduction(+:__pyx_v_tmp_data) reduction(+:__pyx_v_tmp_count) lastprivate(__pyx_v_t) lastprivate(__pyx_v_dest) firstprivate(__pyx_v_idx) lastprivate(__pyx_v_idx)
#endif /* _OPENMP */
for (__pyx_t_19 = 0; __pyx_t_19 <code><</code> __pyx_t_5; __pyx_t_19++){
{
__pyx_v_idx = 0 + 1 * __pyx_t_19;
/* Initialize private variables to invalid values */
__pyx_v_dest = ((long)0xbad0bad0);
__pyx_v_t = ((long)0xbad0bad0);
__pyx_v_dest = ((long)0xbad0bad0);
</pre><pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line172")'> 172: outPos[idx] = bin_edge_min + (0.5 +&lt; double &gt; idx) * bin_width</pre>
<pre id='line172' class='code' style='background-color: #FFFFff'>
/* "histogram.pyx":172

View File

@ -1,4 +1,4 @@
/* Generated by Cython 0.17pre on Mon Jun 4 22:08:14 2012 */
/* Generated by Cython 0.17pre on Thu Jun 21 13:23:57 2012 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
@ -1009,7 +1009,7 @@ static char __pyx_k_14[] = "Format string allocated too short.";
static char __pyx_k_16[] = "Jerome Kieffer";
static char __pyx_k_17[] = "Jerome.kieffer@esrf.fr";
static char __pyx_k_18[] = "GPLv3+";
static char __pyx_k_21[] = "/home/jerome/workspace/azimuthal/pyFAI/src/relabel.pyx";
static char __pyx_k_21[] = "/home/kieffer/workspace/pyFAI/src/relabel.pyx";
static char __pyx_k__B[] = "B";
static char __pyx_k__H[] = "H";
static char __pyx_k__I[] = "I";

View File

@ -1,4 +1,4 @@
<!-- Generated by Cython 0.17pre on Mon Jun 4 22:08:14 2012 -->
<!-- Generated by Cython 0.17pre on Thu Jun 21 13:23:57 2012 -->
<html>
<head>
@ -38,7 +38,7 @@ function toggleDiv(id) {
</script>
</head>
<body>
<p>Generated by Cython 0.17pre on Mon Jun 4 22:08:14 2012
<p>Generated by Cython 0.17pre on Thu Jun 21 13:23:57 2012
<p>Raw output: <a href="relabel.c">relabel.c</a>
<pre class='line' style='background-color: #FFFFff' onclick='toggleDiv("line1")'> 1: </pre>
<pre id='line1' class='code' style='background-color: #FFFFff'></pre><pre class='line' style='background-color: #FFFF62' onclick='toggleDiv("line2")'> 2: __author__ = "Jerome Kieffer"</pre>

View File

@ -1,4 +1,4 @@
/* Generated by Cython 0.17pre on Mon Jun 18 16:58:33 2012 */
/* Generated by Cython 0.17pre on Thu Jun 21 13:23:57 2012 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
@ -1011,7 +1011,7 @@ static char __pyx_k_6[] = "Non-native byte order not supported";
static char __pyx_k_8[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_9[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_12[] = "Format string allocated too short.";
static char __pyx_k_16[] = "/users/kieffer/workspace-ssd/pyFAI/src/splitBBox.pyx";
static char __pyx_k_16[] = "/home/kieffer/workspace/pyFAI/src/splitBBox.pyx";
static char __pyx_k__B[] = "B";
static char __pyx_k__H[] = "H";
static char __pyx_k__I[] = "I";

View File

@ -1,4 +1,4 @@
<!-- Generated by Cython 0.17pre on Mon Jun 18 16:58:34 2012 -->
<!-- Generated by Cython 0.17pre on Thu Jun 21 13:23:57 2012 -->
<html>
<head>
@ -38,7 +38,7 @@ function toggleDiv(id) {
</script>
</head>
<body>
<p>Generated by Cython 0.17pre on Mon Jun 18 16:58:34 2012
<p>Generated by Cython 0.17pre on Thu Jun 21 13:23:57 2012
<p>Raw output: <a href="splitBBox.c">splitBBox.c</a>
<pre class='line' style='background-color: #FFFF79' onclick='toggleDiv("line1")'> 1: #!/usr/bin/env python</pre>
<pre id='line1' class='code' style='background-color: #FFFF79'>

View File

@ -1,4 +1,4 @@
/* Generated by Cython 0.17pre on Mon Jun 4 22:08:16 2012 */
/* Generated by Cython 0.17pre on Thu Jun 21 13:23:58 2012 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
@ -1037,7 +1037,7 @@ static char __pyx_k_37[] = "Non-native byte order not supported";
static char __pyx_k_39[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_40[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_43[] = "Format string allocated too short.";
static char __pyx_k_47[] = "/home/jerome/workspace/azimuthal/pyFAI/src/splitPixel.pyx";
static char __pyx_k_47[] = "/home/kieffer/workspace/pyFAI/src/splitPixel.pyx";
static char __pyx_k__B[] = "B";
static char __pyx_k__H[] = "H";
static char __pyx_k__I[] = "I";

View File

@ -1,4 +1,4 @@
<!-- Generated by Cython 0.17pre on Mon Jun 4 22:08:16 2012 -->
<!-- Generated by Cython 0.17pre on Thu Jun 21 13:23:58 2012 -->
<html>
<head>
@ -38,7 +38,7 @@ function toggleDiv(id) {
</script>
</head>
<body>
<p>Generated by Cython 0.17pre on Mon Jun 4 22:08:16 2012
<p>Generated by Cython 0.17pre on Thu Jun 21 13:23:58 2012
<p>Raw output: <a href="splitPixel.c">splitPixel.c</a>
<pre class='line' style='background-color: #FFFF79' onclick='toggleDiv("line1")'> 1: #!/usr/bin/env python</pre>
<pre id='line1' class='code' style='background-color: #FFFF79'>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff